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 |
|---|---|---|---|---|---|---|---|---|
a64b62d7d83617bac19f1ef90c240b6b4a743092 | 293ee0a2254ed3234c37a769419853e13aba55de | tkanerva/eleveldb | /c_src/eleveldb.cc | C++ | cc | 42,611 | no_license | // -------------------------------------------------------------------
//
// eleveldb: Erlang Wrapper for LevelDB (http://code.google.com/p/leveldb/)
//
// Copyright (c) 2011-2015 Basho Technologies, Inc. All Rights Reserved.
//
// This file is provided to you under the Apache License,
// Version 2.0 (the "License"); y... |
282a33d0637c0bcba731faddb5338c37ef617549 | 0ca3c2d2ffd3434637a95e35a9a667bea8e193ef | matheusvagner/SubstitutivaProgAplicada | /aluno.hpp | C++ | hpp | 6,370 | no_license | #ifndef __aluno_hpp
#define __aluno_hpp
#include <iostream>
#include <string>
#include "aluno.h"
using namespace std;
void PrintarNomes(string nomes[]){
cout << "\n\n";
for(int i=0; i<5; i++){
if (i == 4){
cout << nomes[i] << endl;
}else{
cout << nomes[i] << " / ";
}
}
}
tAluno aluno; ... |
50389b6e551863cd0a0f10c1f901536ce21796d0 | 00a44832abe9ee6cccf9933f038fa47c4be4878e | cyberpay/galilel | /src/wallet/test/wallet_tests.cpp | C++ | cpp | 14,631 | permissive | // Copyright (c) 2012-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2018-2018 The Galilel developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit... |
d7d728f951147ddf28be42fcaf6b257a7f3a7482 | a2c2148d760d69a4faa78a26d862182fa3f01239 | sim9108/SDKS | /SDK/LibDiy/src/tests/double-foreach.cpp | C++ | cpp | 2,456 | permissive | #include <diy/master.hpp>
#include "opts.h"
#define CATCH_CONFIG_RUNNER
#include "catch.hpp"
struct Block
{};
struct DoubleForeachFixture
{
static int nblocks;
static unsigned int iter;
diy::mpi::communicator world;
};
int DoubleForeachFixture::nblocks = 0;
unsigned int DoubleForeachFixture::iter = 2;
TE... |
6530f973329117dc856d87ea8f3eb39254d7d992 | fe490964eaf2fbce55942ff71b2f70796e78662a | ujjwald7/C--Templates | /DP_Bit_Classy Numbers_Codeforces.cpp | C++ | cpp | 2,325 | no_license | #include<bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define F first
#define S second
#define P pair<int,int>
#define V vector
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define endl "\n"
// #pragma comment(linker, '/STACK:200000') //pre... |
3ccc2174eab3e53dd32bc88718e233c3d98e2c22 | f39ac263e5d026b3b83ef284a78096fae2c365f8 | atdavidpark/problem-solving | /baekjoon/11375.cpp | C++ | cpp | 1,109 | no_license | #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
const int MAX_N = 1000;
int N, M;
bool adj[MAX_N + 1][MAX_N + 1];
vector<int> aMatch, bMatch;
vector<bool> visited;
bool dfs(int a)
{
if(visited[a]) return false;
visited[a] = true;
for(int b = 0; b < M; ++b)
if(adj[a][b... |
0c3d45e4e2d085e1187b604e03258bff3c939ce0 | be94c9ab7c261894152b0c768c9356100a2ec7b9 | patefacio/codegen | /cpp/libs/fcs/mongoid/unit_test/test_mongoid.cpp | C++ | cpp | 1,079 | no_license | /******************************************************************************
* test_mongoid.cpp
*
* Copyright (c) Daniel Davidson
*
* Distributed under the Boost Software License
* (http://www.boost.org/LICENSE_1_0.txt)
*******************************************************************************/
/*!
* \... |
83d8203f9b1a9ec37b0e6a3776620e77690fb26b | 27d886a1a343fc672fa4c8bf985afc89ff6d6153 | marrakesh/learnC | /9-SimpleNumber.cpp | C++ | cpp | 401 | no_license | #include "iostream"
using namespace std;
int main(int argc, char const *argv[])
{
const int N = 150;
bool SimpleNumbers[N];
for(int i = 2; i < N+1; i++)
SimpleNumbers[i] = true;
for(int i = 2; i < N+1; i++)
{
if(SimpleNumbers[i])
for(int j = i * i; j<= N; j+=i)
SimpleNumbers[j] = false;
}
for(in... |
5604e0106c3cb2e3c595f261d552f7170c015fd4 | 10bd78c230356c435f8283c0b2c292f0ec78c18f | msdd13579/codeforces-problems | /496B - Secret Combination.cpp | C++ | cpp | 1,984 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ulli unsigned long long int
#define li long int
#define ff(i,a,b) for(int i=a;i<=b;i++)
#define fb(i,b,a) for(int i=b;i>=a;i--)
#define w(t) while(--t >= 0)
#define l(s) s.le... |
891c522531fbae362e34f2c8bfbef4eaa56c090f | bb01403d701ee8f43c3073e54a88ab8fafd06f9f | sophistcxf/study | /sgi_stl/test_traits.cpp | C++ | cpp | 771 | no_license | /*************************************************************************
> File Name: test_traits.cpp
> Author: xiangfei.cui
> Mail: xiangfei.cui@alibaba-inc.com
> Created Time: Sat 04 Jun 2016 05:08:08 PM CST
************************************************************************/
#include <iostream>
usin... |
7db389522c469a5b7953820b8aee8ce2f8378f1c | 6bfecb1a239887399ddc17a4d5094cefe768f242 | ilanprais/Graph-Algorithms-Server | /src/cachemanager/CacheManager.cpp | C++ | cpp | 5,217 | no_license | #include "CacheManager.hpp"
#include "../exceptions/OperationExceptions.hpp"
#include <fstream>
#include <algorithm>
#include <iterator>
#include <sys/stat.h>
#include <unistd.h>
using namespace operation;
namespace cache
{
CacheManager::CacheManager(const uint32_t maxSize, std::string directoryPath)
: m... |
452dc34cf8a2fbdcbdeb32d6c2d4222032c02a17 | 78b4c06e003c8e3584fe44613e424a66a44ceb18 | Amanda21088/code1 | /判断机器大小端/判断机器的大小端.cpp | C++ | cpp | 374 | no_license | #define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
// 代码1
int check_sys()
{
int i = 1;
return (*(char*)&i);
}
int main()
{
int ret = check_sys();
if (1 == ret)
{
printf("小端\n");
}
else
{
printf("大端\n");
}
system("pause");
return 0;
}
//代码2
int check_sys()
{
union
{
int a;
char... |
cdf63e34ee250bbbe8758ae977775c630149642b | 40fdec761597d6f259d2fbb1f68ff35eba2dc4b0 | siyinyang/SDSA | /sds/Node.cpp | C++ | cpp | 636 | no_license | #include "StdAfx.h"
#include "Node.h"
template <typename key_type, typename value_type>
bool Node<key_type, value_type>::operator< (const Node<key_type, value_type>& node){
return this->key < node.key;
}
template <typename key_type, typename value_type>
bool Node<key_type, value_type>::operator> (const ... |
5af37da5bfdf336ca026dd22d9d4eb101c1d05b1 | bc89445d09cf87b3a3362475d07afc4a2c60e7f8 | gameoverhack/Jungle | /src/SceneView.cpp | C++ | cpp | 4,171 | no_license | /*
* SceneView.cpp
* Jungle
*
* Created by gameover on 29/06/11.
* Copyright 2011 trace media. All rights reserved.
*
*/
#include "SceneView.h"
SceneView::SceneView(float width, float height) : BaseView(width ,height) {
// Set up cameras
// temp use static images for cam
ofImage frameImage;
assert(fra... |
2ae36cfbc88db20450109c97d9e19fd5dab82ff4 | f2cc3a3caf63e5e6cf8749fd0e8238285407868e | akakeiz/KmLib | /KmSerializer/Source/Test/Source/Dummy.cpp | C++ | cpp | 1,589 | no_license | #include "PCH.h"
#include "Dummy.h"
bool PktDummy::Serialize( StreamWriter& writer ) const
{
if ( !(writer << m_uint8) ) return false;
if ( !(writer << m_uint16) ) return false;
if ( !(writer << m_int32) ) return false;
if ( !(writer << m_int64) ) return false;
if ( !(writer << m_string) ) return false;
if ( !(... |
5bbfc88c22e538483ae8af6e26fef3bf9f03cabc | da3a5c815cb3db02f4debb064f8608e3f5604695 | Annihilater/Cpp-Primer-Plus-Source-Code-And-Exercise | /Chapter 7/7_13_2.cpp | C++ | cpp | 903 | no_license | //
// Created by klause on 2020/7/22.
//
#include <iostream>
#define MAXSIZE 10
using namespace std;
int input(double ar[], int n);
void show(double ar[], int n);
double avg(const double ar[], int n);
int main() {
double ar[MAXSIZE] = {};
int n;
n = input(ar, MAXSIZE);
show(ar, n);
cout << "... |
9e13eb51b242c514aaa64e9ecb7058e13b22377b | 9f65336d4b27ae0a92b22547ade6b7ad7bd408e4 | wasawi/my_examples | /08_fbo_coordinates/src/ofApp.cpp | C++ | cpp | 4,136 | no_license | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofEnableSmoothing();
ofEnableDepthTest();
//fbo
fbo.allocate(ofGetWidth()/2, ofGetHeight(), GL_RGBA);
//img
img.loadImage("chilis.jpg");
// GIF
gifEncoder.setup(ofGetWidth(), ofGetHeight(), 0.02, 255);
... |
1f1ca1df79d3a6d8d9a627a7700bb91381323a16 | 6168f8fa2a47d08c4b469dace05df4e3072dfe92 | Jballard419/BST | /Ballard_lab08/skew_heap/main.cpp | C++ | cpp | 1,687 | no_license | #include "skew_heap.h"
#include <fstream>
void printMenu() //prints the options available to the user
{
std::cout << ".........................................................." << '\n';
std::cout<<"\n"<<std::endl;
std::cout<<"Select an action:"<<std::endl;
std::cout<<"1) insert"<<std::endl;
std::cout<<"2) del... |
83e6d9a06ed6e5aba1a0079b572547d323339809 | 3f5b2d4d29fe3030eaec23a832260507b6337802 | sriharikrishna/OpenAnalysis | /src/OpenAnalysis/DataFlow/CallGraphDFSolver.cpp | C++ | cpp | 9,407 | permissive | /*! \file
\brief Definition of a dataflow algorithm for CallGraphs
\authors Michelle Strout (Nov 2004)
adapted from John Mellor-Crummey's dsystem
CallGraphFlowInsensitiveDFProblem
\version $Id: CallGraphDFSolver.cpp,v 1.3 2005/06/10 02:32:03 mstrout Exp $
Copyright (c) 2002-2005, Ric... |
4e7a978f1e79d7550944d2065a80eb3f703a6d43 | dc9ab16482bbdc210323a15cdbfd46a5a8954247 | SINAABBASI/Useful-Algorithms | /dp/Eggs_drop.cpp | C++ | cpp | 525 | no_license | #include <bits/stdc++.h>
#include <string>
using namespace std;
#define fr first
#define sc second
#define inf 10000001
int main(){
int flowr,mx,egg;
cin>>flowr >>egg;
int dp[egg+1][flowr+1];
memset(dp,0,sizeof dp);
for(int i=1;i<=flowr;i++) dp[1][i]=i;
for(int i=2;i<=egg;i++){
for(int j=1;j<=flowr;j++){
... |
51f6375a593bf7a83c5859132222e0858ac6a597 | c912f24189a33da8c08a52879f691c822086f578 | kyx0r/FA_Patcher | /boost_lib/boost/range/adaptor/sliced.hpp | C++ | hpp | 2,947 | permissive | // Boost.Range library
//
// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boos... |
85a3d41c5b1dabb4a60191dc5974d0e24eaed943 | 1a6ba4a798ff001c09e734da8762cf8db1cac60a | uchihabloodline/competitive | /quick.cpp | C++ | cpp | 1,038 | no_license |
//QUICKSORT
#include<stdio.h>
#include<stdlib.h>
void QuickSort(int A[],int start,int end);
int Partition(int A[],int start,int end);
int main()
{
int A[50],n,i;
printf("Enter the number of elements: ");
scanf("%d",&n);
printf("\nEnter the elements: ");
for(i=0;i<n;i++)
scanf("%d",&A[i]);
... |
8aaf0e6853baf212d8b3d13432e72b12542c44a4 | a8af526713c06b253e492b1d81af5521968ef447 | Pchelolo/blizzard-node-rdkafka | /src/topic.cc | C++ | cc | 4,150 | permissive | /*
* node-rdkafka - Node.js wrapper for RdKafka C/C++ library
*
* Copyright (c) 2016 Blizzard Entertainment
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE.txt file for details.
*/
#include <string>
#include <vector>
#include "src/common.h"
#include "src... |
e239a44b57316fd20e0c264b0fedaa7534ac7c28 | dfed0983c1a3daa879bddc0c6ca7e4f94cf6db1f | pwjones/ccv_pgr | /libs/OSC/oscpacklib/oscpacklib/osc/OscOutboundPacketStream.cpp | C++ | cpp | 14,727 | permissive | /*
oscpack -- Open Sound Control packet manipulation library
http://www.audiomulch.com/~rossb/oscpack
Copyright (c) 2004-2005 Ross Bencina <rossb@audiomulch.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
(the "Software"), to ... |
c7474b2854a16a23a687420384c28a52caf51e3e | 4f8b3ead737966ee85aed2425550ee96a7533aa2 | tristanhuyanhngo/Programming-Techniques_Snake-Game_20CLC7 | /Snake Game/19127095_19127392_19127459_19127476_19127627/main.cpp | C++ | cpp | 386 | no_license | #include "Header.h"
int main(int argc, char* argv[]) {
srand((unsigned int)time(NULL));
ios_base::sync_with_stdio(0);
HiddenCursor(0);
Menu* menu;
while (true) {
menu = new Menu;
if (Run(menu) == 1) {
system("cls");
delete menu;
break;
... |
d8b390770422d9f0f29941b317d6b5a56252befb | acec5cd17801b8eb5e20707e5088e889b96549b3 | yiique/TranslationSystemSimple | /src/LanguageTools/tibet/tibetseg/PerSeg.cpp | C++ | cpp | 1,853 | no_license | #include <string>
#include <vector>
#include <cmath>
#include <iostream>
#include <fstream>
#include <ctime>
#include <algorithm>
#include "Segmentor.h"
#include "splitutf.h"
//#include "MultiThreadPack.h"
using namespace std;
/*struct TestPara
{
ifstream* fin;
ofstream* fout;
};
class ConvThreadClass : publ... |
1466783dd266d1de927ecf7a04db94b46e5a209d | 8e6b364c32b0bc3432ee38de07f57ff5686dbe56 | Bram-Reuling/PersonalProject1-Unreal-Demo | /Source/FinalProduct/TargetManager.cpp | C++ | cpp | 2,183 | no_license | // Project made by Bram Reuling (2020)
#include "TargetManager.h"
// Sets default values
ATargetManager::ATargetManager()
{
// 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;
SpawnTargets();
}
// Called when the... |
68b85508d27b1cbe0863712697df746624cab6c5 | 6999fc4104d4e4a890064896e82207ae12618190 | OrsoEric/2020-07-26-Longan-Screen-Class-Demo | /src/longan_nano_screen.hpp | C++ | hpp | 166,315 | permissive | /**********************************************************************************
BSD 3-Clause License
Copyright (c) 2020, Orso Eric
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... |
9e90f7b9ab4279b9d1437bc0525fc89b763faac1 | 6e1be6d967120dca3b2798c5df20c3c0fb15bc24 | TencentCloud/tencentcloud-sdk-cpp-intl-en | /mdl/src/v20200326/model/CreateStreamLiveChannelResponse.cpp | C++ | cpp | 3,856 | 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
... |
4fd659ce7c2470ed72fa3211ad15f23f3be8c823 | 70918d19770d214de43a3ee40da32509fe4d7ece | j316chuck/Competitive-Programming | /C++_Solutions/Lessons/Patrick Ho's Lessons/Week 8/Shortest Path/Floyd/floyd2.cpp | C++ | cpp | 975 | no_license | /*
ID: j316chuck
PROG: cowtour
LANG: C++
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include <cmath>
#include <bitset>
#include <utility>
#inc... |
3772d813e8c793c099dd6dd4f3f4f972a35967cb | 940f9d7d7751070d14187b4d9575906e6c04fdc1 | iagsav/AS | /T3/AvdeevaAN/task1.cpp | C++ | cpp | 840 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
void sort(int *array, size_t size)
{
for(size_t i = 1; i < size; ++i)
{
for(int j = 0; j < size-i; j++)
{
if(array[j] > array[j+1])
{
int temp = array[j];
array... |
2314c491113809021b4258895c819574aa6d0e18 | da33998057c2131e72ac46437ffe4385a4bd94f5 | dongsug-song/windows-backend | /Dali/dali-adaptor/dali/internal/system/common/logging.cpp | C++ | cpp | 2,188 | no_license | /*
* Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* 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... |
590eaf5a65da2983267caa9be42651f04f749acf | 4a0134adf68e25273b53480c60730c56906b2c31 | somnathjena2011/codeosoccer2021 | /code-o-soccer-master/GoalKeeper.hpp | C++ | hpp | 1,704 | no_license | #pragma once
#include "skills.h"
/*
Vec2D can be used to make variables that can store points as (x,y) and provide utility functions.
Vec2D point1;
Vec2D point2;
point1.x = HALF_FIELD_MAXX;
point1.y = 0;
similarly for point2 can be specified
Some utility functions:
These will appear automatically as you type V... |
37f88a0ad1d686975c616fb40231d7b7690dcaa5 | 97efb172b7510e686fb1960f6714ec9dc7689ddc | flameshimmer/leet2019.io | /Leet2019/ExpressionAddOperators.cpp | C++ | cpp | 1,898 | no_license | #include "stdafx.h"
//Given a string that contains only digits 0-9 and a target value, return all
//possibilities to add binary operators (not unary) +, -, or * between the digits
//so they evaluate to the target value.
//
//Example 1:
//Input: num = "123", target = 6
//Output: ["1+2+3", "1*2*3"]
//
//Example 2:
//In... |
681ae70c15dfa40dd72974878d058d3d068952e9 | 95c8102254c0b58e14b2181854371123386a8e83 | lantoli/Google-Code-Jam | /GCJ2015_Qualif_4_Omino/gennady_4.cpp | C++ | cpp | 762 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
freopen("in", "r", stdin);
freopen("out", "w", stdout);
int tt;
scanf("%d", &tt);
for (int qq = 1; qq <= tt; qq++) {
printf("Case #%d: ", qq);
int x, r, c;
scanf("%d %d %d", &x, &r, &c);
if (r > c) {
swap(r, c);
... |
4bbd960070737cc286b15ac37e63c251c1e359e9 | 834ebcdc1c44f022a4cae7aa66cbccf94a8d4044 | radtek/TrapperKeeper | /GnutellaProtector/FalseQueryHit.cpp | C++ | cpp | 5,629 | no_license | // FalseQueryHit.cpp
#include "stdafx.h"
#include "FalseQueryHit.h"
//
//
//
FalseQueryHit::FalseQueryHit()
{
m_swarm_trailer=NULL;
Clear();
}
//
//
//
FalseQueryHit::~FalseQueryHit()
{
v_results.clear();
if(m_swarm_trailer!=NULL)
{
delete [] m_swarm_trailer;
m_swarm_trailer=NULL;
}
}
//
//
//
void FalseQ... |
4530215c67657a7213d0e6d79e6813967e6bdce8 | 615bd22e8cb501ae704952cf3961233853b6603c | Fizza-Rubab/OOP-Game-Maskless-in-the-Pandemic | /Maskless in the Pandemic/button.hpp | C++ | hpp | 1,100 | no_license | #pragma once
#include <SDL.h>
#include <string>
#include <iostream>
using namespace std;
/**
* \brief this class is used for making buttons that are rendered on the main welcome screen of th game.
* It inherits from Entity Class
*/
class button{
string name;
string location;
SDL_Rect mover;
SDL_Re... |
eec9cf5807761a03ab8be6059f7861626067cd94 | 55a6802c4a11148a3ba30645675a5477c211dcea | mobius-software-ltd/iotbroker.cloud-arduino-client | /IoTbrokerClient/src/iot-protocols/amqp/classes/enums/amqpterminusdurability.cpp | C++ | cpp | 1,654 | no_license | /**
* Mobius Software LTD
* Copyright 2015-2018, Mobius Software LTD
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later ve... |
26cbed743378527ba3d9e575b2828ed641bdd54d | 6fa742b07073982a8b274a12bffa597ababcfd22 | ryru/nxscanner | /src/nxscan.cpp | C++ | cpp | 510 | permissive | #include "nxscan.h"
void nxscan::Nxscan::start() {
// generate data set
allProbes = nxscan::scanner::getProbes(allDomain);
// scan
nxscan::scanner::Scanner scanner{allProbes};
timeStart = std::chrono::high_resolution_clock::now();
scanner.scan();
timeEnd = std::chrono::high_resolution_clock::now();
}
st... |
84b1d1276743e2e37e16157e0226aa2d5addcda7 | 33392372e7d25690462d06b1cba03f7aadd37001 | MinaToma/verible | /verilog/preprocessor/verilog_preprocess.cc | C++ | cc | 10,097 | permissive | // Copyright 2017-2020 The Verible Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law o... |
5c0173fba1dec8e95f08f14c87c465d199d6ad57 | 938aca643bff468264f0922ef261fc70ddb3e3aa | veelo/coin | /src/engines/SoDecomposeVec3f.cpp | C++ | cpp | 3,537 | permissive | /**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Red... |
081e81867681aa9ed5d50ef81685c428a48bdb34 | 5b7d2e6def33d364691d9368573705eaf38039e0 | TheUnicum/OpenGL-Beginner-to-Advance | /OpenGL-Beginner-to-Advance/src/tests/06_PBR/03_IBL/01_Diffuse_irradiance/T01_Diffuse_irradiance_01.cpp | C++ | cpp | 14,587 | permissive | #include "T01_Diffuse_irradiance_01.h"
#include "GLFW/glfw3.h"
namespace test {
T01_Diffuse_irradiance_01::T01_Diffuse_irradiance_01()
: m_f_fov(45.0f),
m_b_firstMouse(true),
m_mouse_lock(false),
m_b_VSync_disabled(false), m_b_VSync_disabled_i_1(false),
m_framebufferWidth(WINDOW_WIDTH), m_framebufferHeight... |
dbde67041515934c45b8399eca4ac13b1f89dbbd | 79e7c26d1752890be4f7bf822f446ad0a2c2c0d3 | nekonomicon/Go-mod30 | /cl_dll/in_camera.cpp | C++ | cpp | 16,163 | no_license | //========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#include "hud.h"
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#... |
5dd2906b3d808851f1672b28e71762e896326437 | a6c929fdd2504e5b18b00ca0b9b98886bb5c05aa | hundundadi/libgit | /Libgit 10-9/GSP/cloneresource.cpp | C++ | cpp | 2,172 | no_license | #include "cloneresource.h"
CloneResource::CloneResource() : Http::Resource("/Clone")
{ // 服务启动时 就加载了滴
}
CloneResource::~CloneResource()
{
}
void CloneResource::Test_Html_Page(Http::Response& response)
{
response.setStatusCode(Http::Ok);
response.setHeader(Http::ContentType, "application/json");//application/... |
c3edb893a55c542e34765e013c1df1c976678315 | 7fe33c31cf4892a181252c8ce2496bdfb86768c1 | githu86/MTConnectToolbox | /Adapters/840DNcDdeAdapter/MTConnectAdapter/internal.hpp | C++ | hpp | 3,199 | permissive | /*
* Copyright (c) 2008, AMT – The Association For Manufacturing Technology (“AMT”)
* 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 abo... |
76bc328a7773a316aee023d13fd834674aa40507 | 4cb72b2d5cfcb55bc77ff9c5b6fb03e3fa45b074 | LenaWil/tom7 | /smeight/wave.cc | C++ | cc | 1,733 | no_license | #include "wave.h"
#include <cstdio>
#include <cstdlib>
#include "base/logging.h"
using uint16 = uint16_t;
using int16 = int16_t;
WaveFile::WaveFile(const string &filename, int r) : wsize(0) {
outfile = fopen(filename.c_str(), "wb");
CHECK(outfile);
/* Write the header. */
fputs("RIFF", outfile);
fseek(ou... |
a1f31427101775bfd324e3079fece6366f528181 | 41ae9ee139b9d42105f28e5e7674f59781eb518d | yomichi/rokko | /test/product.cpp | C++ | cpp | 3,475 | permissive | #include <mpi.h>
// Eigen3に関するヘッダファイル
#include <Eigen/Dense>
#include <iostream>
using namespace std;
#include <rokko/grid.hpp>
#include <rokko/distributed_matrix.hpp>
#include <rokko/scalapack.hpp>
#include <rokko/pblas.hpp>
#include <rokko/collective.hpp>
#include <rokko/frank_matrix.hpp>
int main(int argc, ch... |
850a8eeb0b697f4e593aa9653bfc5e781ed2cfb8 | 11c92662d171c10284d62887a08d76ceabdd1c8a | Hi-Pete/leetcode | /List/234.Palindrome_LinkedList.cpp | C++ | cpp | 1,080 | no_license | // 234. 回文链表
// 判断一个链表是否为回文链表
//
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};
class Solution {
public:
ListNode* reverseList(ListNode* head){
List... |
ff1ad63c1a5f32b1efb2c810dd4464ae91f6bfa7 | cf08123edade57c6b8816514382135fce4355041 | zhmu/ananas | /external/gcc-12.1.0/libstdc++-v3/testsuite/experimental/optional/cons/value.cc | C++ | cc | 6,725 | permissive | // { dg-do run { target c++14 } }
// Copyright (C) 2013-2022 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundatio... |
97c18b5b1b283a0a83e0d5a8f87f2da8ff7a43e4 | c0452d42b5005f973293f6efb29766e6d2da6f15 | cwhuang1937/CP | /practice/graph/MST/AIZU 1280 Slim Span/main.cpp | C++ | cpp | 1,404 | no_license | #include<bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
struct edge {
int u, v, w;
};
int g[105];
int Find(int a) {
if(a == g[a])
return a;
return g[a] = Find(g[a]);
}
void Union(int a, int b) {
g[Find(a)] = Find(b);
}
int main() {
ios::sync_with_stdio(0)... |
713130c4d0dadef2d18a52f62ace853971e9fdde | a08fffd298d029a3b99cb921171c9f8e88f51d57 | kailasspawar/DS-ALGO-PROGRAMS | /Algorithms/DP/CountNoofPathsToreachTopLeftToBottRight.cpp | C++ | cpp | 396 | no_license | #include<iostream>
using namespace std;
int countNoofPaths(int m,int n)
{
int count[m][n];
for(int i = 0;i<m;i++)
count[i][0] = 1;
for(int i = 0;i<n;i++)
count[0][i] = 1;
for(int i = 1;i<m;i++)
for(int j = 1;j<n;j++)
count[i][j] = count[i-1][j] + count[i][j-1];
return count[m-1][n-1];
}
int m... |
0b8adf1605e1397dcd43fb80a0d0920a11dc3526 | a0f816ec4b7d57003a82e5d8eb944b3712fa2caf | Sensrdt/Leet-Code-Sol | /May 30 Days/Remove K Digits.cpp | C++ | cpp | 749 | no_license | class Solution {
public:
string removeKdigits(string num, int k) {
stack<char> st;
int n = num.size();
for (auto a : num){
while(st.empty() == false && st.top() > a && k>0){
st.pop();
k--;
}
if... |
df9c06e80d587a44068ab03a3835c8f42bde9a49 | 2bd9c334108a2e473a6338b993576b14d74f44c7 | babak01/LiDAR-Obstacle-Detection | /src/quiz/ransac/ransac2d.cpp | C++ | cpp | 5,677 | no_license | /* \author Aaron Brown */
// Quiz on implementing simple RANSAC line fitting
#include "../../render/render.h"
#include <unordered_set>
#include "../../processPointClouds.h"
// using templates for processPointClouds so also include .cpp to help linker
#include "../../processPointClouds.cpp"
pcl::PointCloud<pcl::PointX... |
b4bc73a5c867d41a97326b6c23f3f44df7f002ca | 1334603552557693b6fcb0dc49c47a15e7d8672b | bradbell/sparse_ad | /example/f2cpp_ok.cpp | C++ | cpp | 2,905 | no_license | # include <cstring>
# include <cmath>
# include <src/fun_obj/fun_base.hpp>
bool f2cpp_ok(fun_base& fun_obj)
{ bool ok = true;
//
// the standard starting point
d_vector xs = fun_obj.start();
//
// number of variables
size_t n = xs.size();
//
// x = xs
d_vector x = xs;
//
/... |
51a61f9ec9b19e7fbf16340a11cc6e85feb3a998 | 1ca61e8382dfd7402536c2f6a1b187140aeddb1d | Afonso-2403/universal | /include/universal/adapters/adapt_integer_and_posit.hpp | C++ | hpp | 3,196 | permissive | #pragma once
// adapt_integer_and_posit.hpp: adapter functions to convert integer<size> type and posit<nbits,es> types
//
// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc.
//
// This file is part of the UNIVERSAL project, which is released under an MIT Open Source license.
#include <iostream>
// include this... |
d0dc9c4f1ba9fe2b06d5594958c1f4ca4acf3f41 | 9b42729543afbf3065b47c3a9dcdc54d90d1afa9 | ksercs/informatics_algo_practice | /Прим и Краскал/2/C/C.cpp | C++ | cpp | 1,828 | no_license | #include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
#include <iomanip>
#include <set>
#include <map>
#include <utility>
#define SZ size()
#define VEC vector
#define PB push_back
#define MP make_pair
#define SS second
#define FF first
#define... |
104c2e8f1957e1efe620ee7e077644c7bec43c14 | f9099c57651e9865cc6d64a3a5fcc2982b948cbf | lisnb/leetcode | /leetcode/Combinations/源.cpp | C++ | cpp | 2,549 | permissive | #include <string>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
class Solution {
public:
vector<vector<int> > combine(int n, int k) {
vector<vector<int>> re;
vector<int> num;
bfs(num, re, 1, n, k, 0);
return re;
}
... |
c40a1efed8d2cd7e96252b2da3d982cc56b9e09d | c0f2d51b56e244c0efcb6f27aebdbbf7bd88fe2d | demarle/OSPRay | /apps/volumeViewer/main.cpp | C++ | cpp | 8,680 | no_license | // ======================================================================== //
// Copyright 2009-2014 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... |
331647d08edb1a6e6a86fb696eb2734c7becaa69 | c5ca7b6baf5935314bda7ac65c2d780a29213190 | drownedout/datamap | /node_modules/gdal/deps/libgdal/gdal/ogr/ogrsf_frmts/idb/ogridbselectlayer.cpp | C++ | cpp | 6,480 | permissive | /******************************************************************************
* $Id: ogridbselectlayer.cpp 28375 2015-01-30 12:06:11Z rouault $
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Implements OGRIDBSelectLayer class, layer access to the results
* of a SELECT s... |
5a0e5f05eb744bae75dc1bf00fa1429898798e2f | 273ec6ca559e728a6ce2178bb12aefc31805d6bc | NKH123/Competitive-Programming | /ICPC_Practice_2019/T5/ICPC16D.cpp | C++ | cpp | 2,095 | no_license | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fast ios_base::sync_with_stdio(NULL), cin.tie(0),cout.tie(0)
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
return os << "(" << p.first << ", " << p.second << ")";
}
template < typename ... |
05ba88754d074e270f0e4b03b93bcd15956a4a50 | a60e3cc8cfbf4047e78a7b16d822ccf65c853bb9 | Sounak-Dey/Coding | /Level 1 Foundation/3. Dynamic Programming/2. Time & Space Complexity/7. Quick Sort.cpp | C++ | cpp | 1,600 | no_license | #include<iostream>
#include<vector>
using namespace std;
// used for swapping ith and jth elements of array
void swap(vector<int> &arr, int i, int j)
{
cout<<"Swapping " << arr[i] << " and " << arr[j]<<endl;
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
void print(vector<int> &arr)
{
for(i... |
595c45d046d5801133e46b23768a7da01b8dcb86 | 2e0a6d5ffda7341c3278000b78ba74884c4787cf | HandongProblemSolvers/Problem-Solving | /problems/Divide and Conquer/BOJ 1992/지승윤.cpp | C++ | cpp | 875 | no_license | #include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
using namespace std;
int n;
int a[64][64];
void q(int size, int x, int y) {
if (size == 1) {
cout<<a[y][x];
return;
}
bool eq = true;
for (int i = y; i < y + size; i++) {
if (!eq)
break;
... |
2b2eef98817ca26d4a27385133e76e12fb3d6235 | f9c0817ec766b11056f17cb77b14a0dbdb1a9a2d | Real32/4SEM_DataStructures | /Static Huffman/Huffman.cpp | C++ | cpp | 5,515 | no_license | #include <iostream>
#include <fstream>
#include <cstring>
#include <time.h>
#include <vector>
#include <map>
using namespace std;
struct tree
{
unsigned long frequency;
unsigned char symbol;
tree * left;
tree * right;
};
void get_statistic(ifstream&is);
void BuildCodeTable(tree*root);
tree* create_tree(t... |
570efe675ea57a3a31c3d119a45af09d6644fcbd | 08171352c8d412145180e98bc691452d540e3e71 | ywapple/chromium | /content/child/sync_load_context.cc | C++ | cc | 4,317 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/child/sync_load_context.h"
#include <string>
#include "base/logging.h"
#include "base/synchronization/waitable_event.h"
#include "cont... |
a8d09932b0127a7b77e779d4fc06f5959373af79 | 9dad3f951ead1dfb60193e84d138e81c089713d0 | KqSMea8/sstd_library | /sstd_boost/sstd/libs/math/example/policy_ref_snip1.cpp | C++ | cpp | 2,501 | permissive | // Copyright John Maddock 2007.
// Copyright Paul A. Bristow 2010.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Note that this file contains quickbook mark-up as well ... |
e08ac0850e77da40eeb0e6948e2d43240138c868 | baaf42174344d37ac564a404a219202e1fa56302 | rikuTanide/atcoder_endeavor | /abc140/abc140_c.cpp | C++ | cpp | 493 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef long long ll;
const int INF = 1001001001;
int main() {
int n;
cin >> n;
vector<int> b(n - 1);
rep(i, n - 1) {
cin >> b[i];
}
vector<int> a(n);
a[n - 1] = b[n - 2];
for(int... |
8723aeed3afc06a87711c4c800991d52a7367634 | 549135743410a4abe462f4c63caf937f8a1b5e28 | Masaki-/FirstVJ | /src/ofApp.cpp | C++ | cpp | 4,854 | no_license | #include "ofApp.h"
#include "myScene1.hpp"
#include "scene/avis3Scene.h"
#include "scene/Scene2.h"
#include "scene/Scene3.h"
#include "scene/Scene4.h"
#include "scene/Scene5.h"
#include "scene/Scene6.h"
#include "scene/Scene7.h"
#include "scene/Scene8.h"
#include "scene/Scene9.h"
//-------------------------------------... |
e348912f124fd727fdc1d3af4ac75d6976378901 | da69db8f22fe9c210f0cefa270324aeded9842fc | virtines/wasp | /test/multithread/main.cpp | C++ | cpp | 728 | permissive | #include <wasp/Virtine.h>
#include <wasp/Cache.h>
#include <wasp/util.h>
#include <bench.h>
#include <pthread.h>
wasp::Cache cache(4096);
void *worker(void *p) {
cache.set_binary(MINIMAL_VIRTINE, MINIMAL_VIRTINE_SIZE, 0);
int id = (long)p;
for (int i = 0; i < 1000; i++) {
auto start = wasp::time_us();
... |
54395b02b5fc18cc9aec4aa01271f4a3cdc503a0 | 977aea21ab7fb4906aafe24c56479409a5c7c758 | alex-epp/chess | /include/chess/backend/move.hpp | C++ | hpp | 3,233 | no_license | #pragma once
#include "piece.hpp"
#include "square.hpp"
namespace chess {
class Move {
public:
static constexpr unsigned int QUIET = 0b0000;
static constexpr unsigned int D_P_PUSH = 0b0001;
static constexpr unsigned int K_CASTLE = 0b0010;
static constexpr unsigned int Q_CASTLE = 0b0011;
static constexpr... |
a11e3acc4744fec0d128e6e6a4470311729de2a1 | 07e749ad3df48e1af20b84f4ad37f13036982dbe | mpb-cal/MPB-Game-Library | /old/MPBPhysicsObject.cpp | C++ | cpp | 37,354 | no_license |
#include "MPBPhysics.h"
#include "MPBPhysicsParticle.h"
#include "MPBGlobal.h"
#include "MPBFrameCounter.h"
#include "MPBCollision.h"
#include "MPBGameEntities.h"
#include "MPBMessageWindow.h"
#include "MPBPlane.h"
#include "MPBOpenGL.h"
#include "MPBSoundManager.h"
#include "MPBShadow.h"
#include "MPBParticleSystem.h... |
6b0aef5122542e3f07699df6558a497147e30c57 | f41f18011aa738f70e112449ad4528c1792f0144 | Shyran-Systems/chromium | /components/policy/core/common/legacy_chrome_policy_migrator_unittest.cc | C++ | cc | 3,804 | 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 "components/policy/core/common/legacy_chrome_policy_migrator.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/strings/string1... |
3b7d69cb33e619d64c77f16b2dc3a91426af1fc8 | c2a4e060006f96299a5be1f4063fda0cb82b2f96 | VitalyKononenko/chromium | /content/browser/accessibility/accessibility_auralinux_browsertest.cc | C++ | cc | 39,483 | 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 <atk/atk.h>
#include <dlfcn.h>
#include "base/bind_helpers.h"
#include "base/macros.h"
#include "content/browser/accessibility/accessibility_bro... |
3162e682c3f8947e559fe52474fed0d6d6d25f14 | 32f2eabe506e334a2020146ff4e646f572ad4ca4 | TrellixVulnTeam/Chromium_7C66 | /chrome/browser/prefs/proxy_policy_unittest.cc | C++ | cc | 9,914 | 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 <memory>
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
#include "base/memory... |
4cee49cff77fadc3760ff3ebcb01b2f4d9f68f5f | 35a0b4469f902bc512c33099fd153a0d722c1582 | Funsom/Leetcode | /Guess Number Higher or Lower.cpp | C++ | cpp | 358 | no_license | int guess(int num);
class Solution {
public:
int guessNumber(int n) {
long left=1,right=n;
while(left<=right){
long mid=(left+right)/2;
int res=guess(mid);
if(res>0)left=mid+1;
else if(res<0)right=mid-1;
else return mid;
... |
be9e4bd5ddc18894db427b79f60464a10a706e93 | 5a17c6caf165353aee96c5b56fad2c86dc6499ec | birsoyo/libunifex | /include/unifex/sender_awaitable.hpp | C++ | hpp | 4,504 | permissive | /*
* Copyright 2019-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... |
bc2acca3039030c5686afcc2137c2a9c706483a3 | 16c259ea2b8b75b12389534a0b96f6c67197d55f | opensource-assist/fuschia | /src/media/playback/mediaplayer/ffmpeg/lpcm_util.cc | C++ | cc | 4,925 | permissive | // Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/media/playback/mediaplayer/ffmpeg/lpcm_util.h"
#include "src/lib/syslog/cpp/logger.h"
#include "src/media/playback/mediaplayer/graph/formatt... |
c37b020bccd981dd261e5c2e3f763ce33cc9a6e7 | fb7a4a4725afa60481df57c1fa75f1fa14765b9a | kcatt/OpenGL-Raytracer | /src/Affine.cpp | C++ | cpp | 3,946 | no_license | #include "Affine.h"
/* Affine4 methods start here. */
Affine4::Affine4() {
setIdentityMatrix();
}
void Affine4::setIdentityMatrix() {
for (int i = 0; i < 16; i++) {
if (i % 5 == 0)
matrix[i] = 1;
else
matrix[i] = 0;
}
}
void Affine4::set(Affine4 a) {
for (int ... |
3f2e1291ed8d92a03cfbbed69481f40260373dea | 88f400051dce793af6627450dac040fd8347bfb3 | massbrowser/android | /third_party/WebKit/Source/core/html/LabelableElement.cpp | C++ | cpp | 1,664 | permissive | /*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
* (C) 2006 Alexey Proskuryakov (ap@nypop.com)
*
* This library is free sof... |
f572a3a6b184089a2c321bac0ff92a9b1f1f2b8a | 1051de613af8704fa5b12917a2ad984553dfd927 | dimitrov570/uni-data-structures-and-algorithms-course | /HW3/Task1(solution).cpp | C++ | cpp | 1,472 | no_license | #include <iostream>
int findPosition(long long int *boxes, int start, int end, long long int &element)
{
int mid = start + (end - start) / 2;
if (mid == 0 && boxes[mid] >= element) //prevents accessing random memory in next else if with boxes[mid-1]
{
return 1;
}
else if (boxes[mid] >= elem... |
0ae6c9c6b0e00596e792d0c72d3e09acd3350f6c | 1ccf4fe6d88c156e64548b5b17d0952bcbf4a8e3 | Distrobonet/OriginalSimulator | /Object.cpp | C++ | cpp | 5,043 | no_license | //
// Filename: "Object.cpp"
//
// Programmer: Ross Mead
// Last modified: 22Dec2010
//
// Description: This class implements a 2-dimensional object.
//
// preprocessor directives
#include "Environment.h"
#include "Object.h"
// <protected static data members>
GLint Object::nObjects = 0; // initi... |
c134c0ea8e78c045c5bce09baab33fbaf1d6f0f8 | d0724fef28614d3f3f853399aa5d70528af93424 | DLSA/DATA-STRUCTURE-LAB | /PROGRAMS/p4_ds_lab_quicksort.cpp | C++ | cpp | 1,673 | no_license | #include<iostream>
#include<vector>
#include<cstdlib>
#include<ctime>
using namespace std;
class sorting
{
private:
int i,j,k,n,pivotpos,partitions;
public:
vector<int>vec;
vector<int>vec1;
int arrayin()
{
cout<<"ENTER THE SIZE OF THE ARRAY\n\n"<<endl;
cin>>n;
srand((int)time(0));
for(i=0;i<n;i++)
... |
02bed0f159b1d9700eaef7ac71f2474d0b403d0f | 91a8456bfda797c2f44c47a339fa028b3109d659 | muttleyxd/chromium | /components/sync/model/model_type_store_backend.cc | C++ | cc | 8,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 "components/sync/model/model_type_store_backend.h"
#include <utility>
#include "base/memory/ptr_util.h"
#include "components/sync/protocol/mode... |
e5464ed1f7d7904610adac31b7f4dc56e97c9525 | 113981910ed29490ee830c7fcbe3cd3ceb38c8fb | GuilhermePSC/orocos_kinematics_dynamics | /python_orocos_kdl/PyKDL/pybind11/PyKDL.cpp | C++ | cpp | 1,452 | no_license | //Copyright (C) 2020 Ruben Smits <ruben dot smits at intermodalics dot eu>
//
//Version: 1.0
//Author: Ruben Smits Ruben Smits <ruben dot smits at intermodalics dot eu>
//Author: Zihan Chen <zihan dot chen dot jhu at gmail dot com>
//Author: Matthijs van der Burgh <MatthijsBurgh at outlook dot com>
//Maintainer: Rub... |
eb7e61d7b0657212e3732281a052db697278f01b | 7ead5870acca8d050ce45094e11a6a4113a915fb | digital-nomad-cheng/study | /cpp/udacity_cpp/03_object_oriented_programming/02_intro_to_oop/encapsulation.cpp | C++ | cpp | 259 | no_license | #include <iostream>
class Encapsulation
{
public:
void set(int a)
{
x = a;
}
int get()
{
return x;
}
private:
int x;
};
int main()
{
Encapsulation obj;
obj.set(5);
std::cout << obj.get() << "\n";
}
|
4585ec9d2ddbfbb21f7a491184d610d54dbf0c98 | 274079f2eac0c7e1135b7eb2a42ac3dc15362093 | swift-nav/albatross | /tests/test_radial.cc | C++ | cc | 25,527 | permissive | /*
* Copyright (C) 2018 Swift Navigation Inc.
* Contact: Swift Navigation <dev@swiftnav.com>
*
* This source is subject to the license found in the file 'LICENSE' which must
* be distributed together with this source. All other rights reserved.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY O... |
d77542f96cd897051c5be236c798f23f4f6245e5 | 9dbae3663c6fd461cc7c582080637a3781eb84d3 | ModOrganizer2/modorganizer-bsapacker | /src/NullArchiveBuilder.cpp | C++ | cpp | 498 | permissive | #include <bsapacker/NullArchiveBuilder.h>
namespace BsaPacker
{
uint32_t NullArchiveBuilder::setFiles()
{
return 0;
}
void NullArchiveBuilder::setShareData(const bool)
{
}
std::unique_ptr<libbsarch::bs_archive_auto> NullArchiveBuilder::getArchive()
{
return nullptr;
}
uint32_t NullArchiveBuilder::getF... |
0bbf7c789bb1b960dc7b867decb1a004b6291812 | 458d25acb06bf864467e9a2c5bd48d52254d5ed9 | yc322/Memory_Database | /Buffer.cpp | C++ | cpp | 2,838 | no_license | #include "Buffer.h"
#include <iostream>
#include <cstring>
using namespace std;
/**********************************************************
Buffer
***********************************************************/
Buffer::Buffer(unsigned long size)
{
capacity_ = size;
head_ = new char[size];
free_=... |
119d6f9f61c848a54a7cc998ee0b1d30722cb8ec | 6e78e0095e34f49482b60ea23e8efad8409377d6 | RoshanVarghese/cpp-programs | /access_ele_in_arr.cpp | C++ | cpp | 751 | no_license | #include<iostream>
#define MAX 10
using namespace std;
int main()
{
int arr[MAX],n,i;
char ch='a';
do
{
system("cls");
cout<<"Enter the number of elements in the array:"<<endl;
cin>>n;
if(n<=MAX || n>=0)
{
cout<<"\n Enter elements in the array:"<<endl;
for(i=0;i<n;i... |
3d2ad12d9f8974083e1686084b21b9d34394db29 | 28ec1a2a9a823415ab13f920a6e5c20363ba96b1 | Constellation/v8-promise | /src/arm/full-codegen-arm.cc | C++ | cc | 169,439 | permissive | // Copyright 2012 the V8 project authors. 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 ... |
3f0328a79a6555bdcc65717c328783974cc24a80 | 3261f2de3c0ac570e0d6ce5b44be89825aef58d0 | nigomezcr/Programming-Basics | /01-Introduction/4-read-screen.cpp | C++ | cpp | 269 | no_license | // Reading at the execution
#include <iostream>
#include <cmath>
int main(int argc, char **argv)
{
std::cout << argc << std::endl;
std::cout << argv[0] << std::endl;
std::cout << argv[1] << std::endl;
std::cout << argv[2] << std::endl;
return 0;
}
|
184635eb7f7f7f7ec8cb7f275b319546e162b520 | 5fcd6689bef8860b15f124e857d906017fb01c23 | StarKnowData/robinerp | /D_Platform_Ver3.020/games/30200200_ZGWQ/GameCode/Client/RegretChess.cpp | C++ | cpp | 1,791 | no_license | #include "StdAfx.h"
#include "ClientGameDlg.h"
#include ".\regretchess.h"
CRegretChess::CRegretChess():CGameFaceGo(CAdmitDefeat::IDD)
{
m_pParnet=NULL;
TCHAR path[MAX_PATH] = {0};
wsprintf(path,TEXT("image\\%s\\huiqi.bmp"),SKIN_FOLDER);
m_bk.SetLoadInfo(path,CGameImageLink::m_bAutoLock);
}
CRegretChes... |
99ffd62cf5a86d0b3582f42f631deec73f88d320 | 6d0edb77416ec9dbf722ed5831e9d6787cdab83c | linearregression/chronos | /src/test/test_timer_store.cpp | C++ | cpp | 30,405 | no_license | /**
* @file test_timer_store.cpp
*
* Project Clearwater - IMS in the Cloud
* Copyright (C) 2013 Metaswitch Networks Ltd
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version ... |
6ded5788d1c33a670cfe187279a946d44a3665ec | a3e11693ffcf831ac9135ab69dd253d252a61efb | Taeyeong201/RnD | /Cpp_Standard_Library/Smart_Pointer/sharedPointer/shared.cpp | C++ | cpp | 5,610 | no_license | #include <iostream>
#include <memory>
#include "blockingconcurrentqueue.h"
#include "concurrentqueue.h"
using namespace moodycamel;
template <typename T>
struct Array_Deleter
{
void operator()(T* p)
{
delete[] p;
}
};
//class Packet {
//public:
// Packet() :data(nullptr)
// {
//
// }
// Packet(Packet&& pack) {... |
a7e4f3b6a10c7b347446cc1145c2fda8b727f32b | d79bdebe869cd04c14a6fba31d4051c96d1884db | juslee/boost-svn | /boost/thread/future.hpp | C++ | hpp | 100,987 | permissive | // (C) Copyright 2008-10 Anthony Williams
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_THREAD_FUTURE_HPP
#define BOOST_THREAD_FUTURE_H... |
31be42785dab0fac4c2bc857a5b106da38d7d160 | 835042284667f7ff4db40dfec5ae85177b87807a | dzcoin/DzCoinService | /src/beast/beast/http/impl/basic_url.cpp | C++ | cpp | 3,567 | permissive | //------------------------------------------------------------------------------
/*
this file is part of beast: https://github.com/vinniefalco/beast
copyright 2013, vinnie falco <vinnie.falco@gmail.com>
permission to use, copy, modify, and/or distribute this software for any
purpose with or without ... |
b08f41f253c789947bd946d3b0dad528b6a8eaea | c7d84451d237ba2dbfeeaa3b626c4783d1067bf6 | cmmakerclub/QT_MQTT_TEMP_HUMIDITY | /qt_temp_humidity/qrc_src.cpp | C++ | cpp | 96,826 | no_license | /****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.3.2
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <QtCore/q... |
519249fdc90600c885dff71c6ace7fbf6faf43c3 | d880cbedaac1a89a7e5e0385f15780c87bd1cc83 | alessandrocapialbi/ProgressBar | /test/lib/googletest/test/gtest_premature_exit_test.cc | C++ | cc | 4,421 | permissive | // Copyright 2013, 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 conditions ... |
b9bd05d30f4a0b7215a2fac225f3261bb1a95754 | 2fba5e924a86fc866cdbe2f171ee605757aa3be6 | ldc0111/learn | /python/3.pyp/2.jisuanke_cainiao/data/787/习题二:有趣的输出/n 阶数字正方形.cpp | C++ | cpp | 270 | no_license | #include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main() {
int x;
cin >> x;
for (int i = 1; i <= x; i++) {
for (int j = 1; j < x; j++) {
cout << i << " ";
}
cout << i << endl;
}
return 0;
} |
cf0bb6894331b84d87eaa609660481444d257060 | 0713f13a756766295f80b6f6d11eaa2bf9a43e71 | tfiner/adobe_asl | /platform_release/windows/adobe/future/platform_periodical_data.hpp | C++ | hpp | 1,426 | no_license | /*
Copyright 2005-2007 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
*/
/****************************************************************************************************/
#ifndef ADOBE_PERIODICAL... |
2190592a0d5ee5c4e2758b451c3ce736cee5ea9b | a97bb4a9bac09676e4a0f4825e4e44201f641bd6 | a-kashirin-official/spbspu-labs-2018 | /maikenova.karina/A3/test-rectangle.cpp | C++ | cpp | 2,622 | no_license | #include <boost/test/unit_test.hpp>
#include "rectangle.hpp"
const double epsilon = 0.00001;
BOOST_AUTO_TEST_SUITE(Rectangle_Tests)
BOOST_AUTO_TEST_CASE(InitRectangleTest)
{
BOOST_CHECK_THROW(maikenova::Rectangle({15.32, 1.23}, -9, 9), std::invalid_argument);
}
BOOST_AUTO_TEST_CASE(Move_toPoint_Tests)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.