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 |
|---|---|---|---|---|---|---|---|---|
60a1660e5af77af052b385b3414570c5d7d02fe9 | f390e07d74288df6f737525e261363455d93b1fc | ManuelSerna/random_games | /sudoku/SudokuGame.cpp | C++ | cpp | 552 | no_license | //***********************************************
// Sudoku Game
//***********************************************
#include "Sudoku.h"
using namespace std;
int main()
{
// Declarations
Sudoku Game;
int row = -1;// coords that user inputs
int col = -1;
int val = 0;// value to put on sudoku board
... |
ca57b1815db228bbeb6fe01aeb51140f8dcf4e76 | eeef94b7032d1a51d5e10ba9fc7a6ac90d694f8e | s-nandi/implicit-octree-nns | /include/implicit_octree_nns/detail/experiment_setup.hpp | C++ | hpp | 12,892 | permissive | #ifndef IMPLICIT_OCTREE_NNS_EXPERIMENT_SETUP_HPP
#define IMPLICIT_OCTREE_NNS_EXPERIMENT_SETUP_HPP
#include <chrono>
#include <fstream>
#include <iostream>
#include <random>
#include <string>
#include <tuple>
#include "implicit_octree_nns/detail/kd_tree.hpp"
#include "implicit_octree_nns/detail/utility.hpp"
#include "... |
28b5446052512f70d617195d4013ced0426edb8f | 72b72d11d1287f37687953626511c99b94888f61 | kshitij7890/DSA-Practice-Questions | /Searching and Sorting/Value Equals Index.cpp | C++ | cpp | 233 | no_license | class Solution{
public:
vector<int> valueEqualToIndex(int arr[], int n) {
vector<int> v;
for (int i = 0; i < n; i++) {
if (arr[i] == i + 1) {
v.push_back(i + 1);
}
}
return v;
}
}; |
d02e9025bec7c8c9b9b2d71d88a352ca9f080d13 | 83d5ff00b754aa063e7cc1529d5c51afb17b1c24 | yecol/aws-sdk-cpp | /aws-cpp-sdk-mturk-requester/source/model/GetQualificationScoreResult.cpp | C++ | cpp | 1,421 | permissive | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
21c40e74a88e5b6992278b9485219136a26b19a6 | cf46d40020e8da0521d3119a155c7524db94804a | dark-bytes/Competitive-Programming | /ALGORITHM/Graph/DFS.cpp | C++ | cpp | 1,950 | no_license | #include<iostream>
#include<vector>
#include<malloc.h>
#include<stack>
using namespace std;
typedef struct arc_datatype
{
int point;
struct arc_datatype* arc_point;
// int wt;
}arc;
typedef struct vertex
{
arc* arc_point;
}VERTEX;
class graph{
public:
vector<VERTEX> ver;
graph(){}
graph(int t_ver)
{
... |
c3b7f09c0d1c73675df3f09cb7329ffc142c6c81 | c3c383b90e07d6783a5b66956ccd2785b04cf06d | tgfrerer/ofxBerkelium | /example/src/testApp.cpp | C++ | cpp | 10,757 | no_license | #include "testApp.h"
#define WIDTH 1024
#define HEIGHT 768
#define USE_TRANSPARENCY false
//--------------------------------------------------------------
void testApp::setup(){
ofSetFrameRate(60);
Berkelium::init( Berkelium::FileString::empty() );
browser = new ofxBerkelium(WIDTH, HEIGHT, USE_TRANSPARENCY);
... |
8f4c26cece8b4ad45e893f20f296f2fd4551dad0 | e2949b5ece8e14a4bd032246ec07e04b78691a49 | Coopelia/LeetCode-Solution | /cpp/1114.cpp | C++ | cpp | 868 | no_license | #include <iostream>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <functional>
using namespace std;
class Foo
{
public:
mutex mt_1, mt_2, mt_3;
Foo()
{
mt_2.lock();
mt_3.lock();
mt_1.unlock();
}
void first(function<void()> printFirst)
{
... |
e97e486ab37bfab6d2880dd7d66482f4a9bdbe83 | 1adb08397655dbc2b04d56d210d250ac52615682 | nontokozo/Tut2-TicTacToe | /tictactoe/TicTacToeTest.cpp | C++ | cpp | 230 | no_license | #include<iostream>
#include "TicTacToe.h"// include definition of class Tic_Tac from Tic_Tac.h
using namespace std;
int main()
{
TicTacToe tic; // creating an object
tic.start();
tic.move();
system("pause");
return 0;
}
|
aec93d7e5672eb4ff855d7a3e66ef8c66a13a8cf | 21001057022940658c24646120b041f9b10ba8f1 | randauto/cpp-solutions | /solutions/bvUB3oVU.cpp | C++ | cpp | 1,547 | permissive | /*
Sưu tầm bởi @nguyenvanhieuvn
Thực hành nhiều bài tập hơn tại https://luyencode.net/
*/
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define MAX 100
void nhap (int a[], int &n)
{
do
{
printf("\nNhap so phan tu: ");
scanf("%d", &n);
if(n <= 0 || n > MAX)
{
... |
0e80b4596ca7bfb30f1fe0c78be66c58b71c7cf4 | 6dbd3eafd0f3323c6ae3ebbbc6272415e8b4f163 | Tanjim131/Problem-Solving | /Codeforces/1200/E85-2-A.cpp | C++ | cpp | 1,853 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main(int argc, char const *argv[])
{
int T;
cin >> T;
while(T--){
int n;
cin >> n;
vector <int> plays(n), clears(n);
// at most one level specific update
vector <int> status(1000 + 1, -1);
bool p... |
3e9fc4378eb2d5266be1331454851bc9f7336824 | 3a674bfe04fe98520ee50758754c183410f5d246 | nazriel/Daily-Coding-Problem | /day-2/solution.cpp | C++ | cpp | 4,351 | no_license | #define BOOST_TEST_MODULE day2
#include <boost/test/included/unit_test.hpp>
#include <vector>
#include <cstdint>
#include <unordered_map>
namespace std
{
ostream &operator <<(ostream &os, const vector<uint32_t> &v)
{
os << " { ";
if (v.size() > 1)
{
copy(v.begin(), v.end() -... |
dfe5283066c4025ba3abc51d32192ea81bafee59 | d432edd2b4bfa241155172b66bd72ddbb9d1c1e9 | helenol/Firmware | /src/modules/mavlink/mavlink_orb_subscription.cpp | C++ | cpp | 2,999 | no_license | /****************************************************************************
*
* Copyright (c) 2014 PX4 Development Team. 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. Redistri... |
67e59739ad605ad6f87bdb92cc224febd6595cdb | e0d95e837c6797868a505119ba91de16c3e7d82f | Avdeenko-Dasha/1-cours | /Option 1/3.5/Source.cpp | C++ | cpp | 3,103 | no_license | /*В следующих заданиях построить матрицу B по заданной целочисленной матрице А порядка n (n <= 100).
Обосновать алгоритм, выбранный для решения задачи.
1.Построить матрицу B, строки которой будут состоять из различных элементов соответствующей строки матрицы А.
Количество столбцов построенной матрицы
B равно наиболь... |
db7e3b9126a6795cdd49baff004f266160ccc06f | 6f042a00198d9679c66d31388dea3b1484db15a7 | theguiler/template | /pollard-rho.cpp | C++ | cpp | 1,479 | no_license | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <iostream>
using namespace std;
typedef long long ll;
ll gabs(ll a){
return (a<0 ? -a:a);
}
ll gcd(ll a,ll b){
ll r;
while (b){r=a%b;a=b;b=r;}
return a;
}
void add(ll &a,ll b,ll m)... |
78370a35976633586e82719683f3952ba9a32daf | ef6c7376d92256fe0230b3197fc180829b435ce9 | LiraLemur/kagome | /core/storage/trie/impl/ephemeral_trie_batch_impl.hpp | C++ | hpp | 1,309 | permissive | /**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef KAGOME_STORAGE_TRIE_IMPL_EPHEMERAL_TRIE_BATCH
#define KAGOME_STORAGE_TRIE_IMPL_EPHEMERAL_TRIE_BATCH
#include "storage/trie/codec.hpp"
#include "storage/trie/polkadot_trie/polkadot_trie.hpp"
#include "storage/t... |
e84b7baef35b043e70e0517a012f961a7199752e | d711ffaec45f354f80e30dff5b4e33464fac1902 | zhanghan2/leetcode | /algorithm/Permutations/Permutations2.cpp | C++ | cpp | 1,085 | no_license | class Solution {
public:
vector<vector<int>> permuteUnique(vector<int>& nums) {
vector<int> temp;
vector<vector<int>> res;
helper(res,nums,temp,0);
return res;
}
void helper(vector<vector<int>>& res,vector<int>& nums,vector<int>& temp,int idx)
{
if(idx =... |
16fc026a4b9d383cd8bf4ca8a3e57a7c94c2b584 | 5a31cc5808f48233e243f370d1e4bd77ba96e2ac | banh1996/experiment | /documents/Software-Architecture-with-Cpp/Chapter08/mobile_app/src/merchants/visited_merchant_history.cpp | C++ | cpp | 638 | permissive | #include "merchants/visited_merchant_history.h"
std::size_t history_of_visited_merchants::add(
std::unique_ptr<i_visited_merchant> merchant) {
merchants_.push_back(std::move(merchant));
return merchants_.size() - 1;
}
void history_of_visited_merchants::rate(std::size_t merchant_index,
... |
27057f59e8097bcce6bbdc4724e9a899302db692 | 837e6d7929ed0318780602758e7a6a2ed9c9346e | takadrarikuto/TeamSeisaku | /卒業制作作品/卒業制作作品/ObjExplosion.cpp | C++ | cpp | 3,149 | no_license | //使用するヘッダーファイル
#include "GameL\DrawTexture.h"
#include "GameL\HitBoxManager.h"
#include "GameL\Audio.h"
#include "GameHead.h"
#include "ObjExplosion.h"
//使用するネームスペース
using namespace GameL;
//コンストラクタ
CObjExplosion::CObjExplosion(float x, float y, float size, int Damage)
{
//位置情報登録(数値=位置調整)
m_Expx = x;
m_Expy = y;
... |
571ffa3580de377b7114d19712647d98f01ce2ab | 513a322f24e94512fe2753f2284b9d7b28c2abd2 | jmaureir/UDPPing | /src/UDPPingMsg_m.cc | C++ | cc | 9,338 | no_license | //
// Generated file, do not edit! Created by nedtool 4.6 from UDPPingMsg.msg.
//
// Disable warnings about unused variables, empty switch stmts, etc:
#ifdef _MSC_VER
# pragma warning(disable:4101)
# pragma warning(disable:4065)
#endif
#include <iostream>
#include <sstream>
#include "UDPPingMsg_m.h"
USING_NAMESPAC... |
8e33a132790a14c0738b93ef7b7b1b72060b346d | 3c37d3235f93a944dd16233dcdd73ed6a08f14ae | 4l3dx/DBOGLOBAL | /DboServer/Server/GameServer/World.cpp | C++ | cpp | 32,865 | no_license | #include "stdafx.h"
#include "World.h"
#include "WorldZone.h"
#include "WorldCell.h"
#include "TableContainerManager.h"
#include "TriggerObject.h"
#include "SpawnTable.h"
#include "MobTable.h"
#include "MobServerTable.h"
#include "NpcServerTable.h"
#include "Monster.h"
#include "SummonPet.h"
#include "CPlayer.h"
#inclu... |
c073b374d88f13c89715794798bf577aedb19328 | 2367865e2142d059db5066909b10f5be15e8e6d6 | ChaseTuring/acm-codes | /luogu/P2486.cpp | C++ | cpp | 3,401 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const double eps = 1e-5;
const int N = 1e5+10,M=N<<1;
int head[N],Next[M],ver[M],tot,son[N],size[N],f[N],rk[N],top[N],num,val[N],id[N],sx,sy;
int mod,cnt;
struct segtree{
int sum,l,r,lc,rc,tag... |
8032ae344c4adb239d0a5b7ebe6b4dd03dfbcc5d | 88a5d1f78c80aac1e83c9133bff7d5c69d6ebc22 | bradparks/mu | /077hash.cc | C++ | cc | 11,005 | no_license | // A universal hash function that can handle objects of any type.
//
// The way it's currently implemented, two objects will have the same hash if
// all their non-address fields (all the way down) expand to the same sequence
// of scalar values. In particular, a container with all zero addresses hashes
// to 0. Hopefu... |
76137d5b10eeb7bc8cf9c101616e70679e3bcc76 | ad1262069f3e82074aed904da38d4bbf1a99f3ca | lucasdutraf/competitive-programming | /codeforces/TEP/Ranked-3/A.cpp | C++ | cpp | 579 | no_license | #include <bits/stdc++.h>
using namespace std;
int main () {
int n; cin >> n;
while (n--) {
int s; cin >> s;
string tel; cin >> tel;
if (tel.size() < 11) {
cout << "NO" << endl;
continue;
}
else {
auto a = tel.find('8');
if (a == string::npos) {
cout << "NO" << ... |
d5f4eba2c821df825ab6e9e21a68728d43b51380 | 062333a64b361fb156d23e3a3df6d51794d2216b | chenshuo/software-tools-in-c | /orig/intro/settabs.cc | C++ | cc | 326 | permissive | #include "../p2c.h"
#include "intro.h"
// Copyright (C) 1981 by Bell Laboratories, Inc., and Whitesmiths Ltd.
// settabs -- set initial tab stops
void settabs(tabtype& tabstops)
{
const int TABSPACE = 4; // 4 spaces per tab
integer i;
for (i = 1; i <= MAXLINE; ++i)
tabstops[i] = (i % TABSPACE == ... |
aa55e1d7dcc605b164aef0ae27f64a5190ee224a | 97fadc73bbe8d24371e555685b39765b15e7fa48 | twentylemon/flow | /flow/test/cycle_itr.cpp | C++ | cpp | 767 | permissive |
#include "stdafx.h"
BOOST_AUTO_TEST_CASE( cycle_itr )
{
using namespace flow;
std::vector<int> vec = { 1, 2, 3 };
std::vector<int> ex = { 1, 2, 3, 1, 2 };
auto s = cycle(vec.begin(), vec.end()) | limit(5) | to_vector();
BOOST_CHECK_EQUAL_COLLECTIONS(s.begin(), s.end(), ex.begin(), ex.end... |
64241f619e20047c91b1f682e78757ac7fae03cd | 94ac87a7992f8ee59702063f8bfae33eeb02ae53 | FlorinP2602/Probleme-ECCPR- | /Retele neurlare.cpp | C++ | cpp | 938 | no_license | #include<iostream>
using namespace std;
int main()
{
int m,k, n,p,i,j,index;
signed int v[500][500],w[500][500],x[500],s[1000],y[1000];
cin>>m>>n>>p;
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
cin>>v[i][j];
}
}
for(j=1;j<=n;j++... |
7b35f922971660fa3322b4d4e6acac87b9538ba0 | 037744278d5c8185bdaf8bd475ef19a5d5411918 | lineCode/continuity | /src/ReactNative/SDK/DynamicReader.cpp | C++ | cpp | 2,367 | permissive | #include <string>
#include "DynamicReader.h"
namespace Microsoft::ReactNative
{
const folly::dynamic* FindDynamicChild(const folly::dynamic& data, const char* name) noexcept
{
const auto iter = data.find(name);
if (data.items().end() == iter)
{
return nullptr;
}
return &iter->second;
}
... |
5a46066322505ddb55f57363b0d1367a4d5ae53a | 235a8f49d687f9169b4349adb3956db755c1bda0 | Tigrolik/git_workspace | /cpp/stroustrup_exercises/tour_basics/loop_drill.cpp | C++ | cpp | 840 | no_license | #include <iostream>
using namespace std;
inline int square(const int x) {
int res {0};
if (x < 0) {
for (auto i = 0; i < -x; ++i)
res -= x;
return res;
}
for (auto i = 0; i < x; ++i)
res += x;
return res;
}
void letters() {
char c {'a' - 1};
while (+... |
ebd2c23a5001d7ff468e7d2c294118f657235c3c | 0cb63b71b8cd124ee9f3b120808d05e7a9be7c36 | eeue56/ovas-2 | /src/FlyingSaucersVol4D.cpp | C++ | cpp | 4,370 | no_license | /*
* File: FlyingSaucersVol4D.cpp
* Author: zoizoi
*
* Created on 23 February 2011, 20:04
*/
#include "FlyingSaucersVol4D.h"
FlyingSaucersVol4D::FlyingSaucersVol4D(OVASControl* oc, int numSaucers) : ImplicitVolume4D(oc) {
saucers=new vector<MovingAAElipsoid*>();
srand(28);
for (int i=0;i<numSauce... |
3687a7fff399bcd1dcf509287dd70a172baa33d9 | 84180d5b352a285549bae5381b9cb37f69112500 | charlie-x/epsilon | /apps/calculation/additional_outputs/scientific_notation_helper.cpp | C++ | cpp | 1,104 | no_license | #include "scientific_notation_helper.h"
#include <apps/shared/poincare_helpers.h>
#include <poincare/float.h>
using namespace Poincare;
namespace Calculation {
namespace ScientificNotationHelper {
bool HasAdditionalOutputs(Expression a, Context * context) {
Layout historyResult = Shared::PoincareHelpers::CreateLa... |
2eef269305fdde63ad965600164871d33cac9857 | 44b3679b188cfa69e6c00364bd8ed656f384adc7 | iridium-browser/iridium-browser | /third_party/pdfium/third_party/bigint/BigIntegerUtils.hh | C++ | hh | 2,770 | permissive | // Copyright 2014 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code by Matt McCutchen, see the LICENSE file.
#ifndef BIGINTEGERUTILS_H
#define BIGINTEGERUTILS_H
#include "BigInteger.hh"
#include <string>
#include <iosfwd>
/* T... |
71562124855a8a9a564c4c3d012227a2c4be4ab8 | 72bab51dcc054b1b99989bdd41f4fde241cb4b32 | stardusther/Conecta4Boom | /player.cpp | C++ | cpp | 8,229 | no_license | #include <iostream>
#include <cstdlib>
#include <vector>
#include <queue>
#include "player.h"
#include "environment.h"
using namespace std;
const double masinf=100000.0, menosinf=-100000.0;
// Constructor
Player::Player(int jug){
jugador_=jug;
}
// Actualiza el estado del juego para el jugador
void Player::Per... |
288b1e729ce2186097a5ae36b0b03e09ad3e59fc | 0d0cdfc78beacb8b96c06aebc702a6f93da703fc | est7/hybridDemo | /app/src/main/cpp/native-lib.cpp | C++ | cpp | 265 | no_license | #include <jni.h>
#include <string>
extern "C"
JNIEXPORT jstring JNICALL
Java_com_est7_hybriddemo_JNIActivity_stringFromJNI(
JNIEnv* env,
jobject /* this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
|
c66e28f70a4d641fe93a7213d285bc7a095cc447 | 027f1d481acc3f55354df91b80f542ad4817be42 | amarNetake/Graph-practice-work | /Graphs/4. Detect a loop in UNDIRECTED GRAPH/3. More efficient Detect cycle in undirected graph/code(Union by rank).cpp | C++ | cpp | 1,721 | no_license | #include<bits/stdc++.h>
using namespace std;
class status
{
public:
int rank=0;
int parent=-1;
};
status find(int node,vector<status>& parents)
{
if(parents[node].parent==-1)
{
status s;
s.parent=node;
s.rank=0;
return s;
}
else
{
status... |
2c398034beef58b205be5c9dbce97ca446c76690 | a2a4bae466d06cbd05516cb7774ad6257d871972 | fooad444/OS | /ex2/test2.2/test4.cpp | C++ | cpp | 884 | no_license | /*
* main.cpp
*
* Created on: Mar 17, 20015
* Author: danny
*/
#include "uthreads.h"
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
void assertTime(int tid, int tquantom, int time)
{
assert(uthread_get_tid() == tid);
assert(uthread_get_quantums(tid) == tquantom);
assert(uthread_get_total_qua... |
2b194780bec2d49f35c3af9773d11c86919e8e31 | c21898fb21f554f8f2852f11d41a91207b085ced | dreamvrutik/Codeforces-Solutions | /Codeforces Solutions/cf835_A.cpp | C++ | cpp | 1,427 | no_license | #include<bits/stdc++.h>
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define int long long
#define endl "\n"
#define double long double
#define mod 1000000007
using namespace std;
int po[101],s[101];
void pairsort(int a[],... |
77b2eddd477f680183df6bc84f83407e5f687054 | 941f75e15e4420836fd2a9ad336c42bf987d1091 | minghuayao1981/capu | /modules/capu/test/os/MemoryTest.cpp | C++ | cpp | 4,582 | permissive | /*
* Copyright (C) 2012 BMW Car IT GmbH
*
* 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... |
48c50fce42bb18d9cd8cdab915496af767de41d4 | 5a807d1e0eee2cafd88eb7a04ffbffbea1d45136 | dtbinh/MAI | /sem4/da/labs/6/main.cpp | C++ | cpp | 1,245 | no_license | #include <cstdio>
#include "big_integer.h"
int main()
{
char arg[100001];
while (scanf("%s", arg) == 1)
{
TBigInteger a(arg);
if (scanf("%s", arg) != 1)
{
printf("ERROR\n");
return 0;
}
TBigInteger b(arg);
TBigInteger c;
if (scanf("%s", arg) != 1)
{
printf("ERROR\n");
return ... |
c8e490bac85d1d8d49eb8078b4c50a6f85bf16c4 | 1aabc7c88cbf40216634a6c40e9d1d9acdf68777 | bundy-dns/bundy | /src/hooks/dhcp/user_chk/user.cc | C++ | cc | 5,965 | permissive | // Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS... |
9159295bdd51343285a87d7195270728c9e88819 | e1185cb14fbf006279cf207262f1b92f6b78b5a3 | 5l1v3r1/FUDPackage-c- | /FudPackageLib/FileOp.cpp | C++ | cpp | 1,123 | no_license | #include "stdafx.h"
#include "Base.h"
BOOL ReadInFile(LPCTSTR lpszFile, PVOID *outBuffer, UINT *outFileSize)
{
PVOID m_FileData;
UINT m_FileSize;
BOOL bRet = FALSE;
HANDLE hFile = CreateFile(lpszFile, FILE_ALL_ACCESS, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile != INVALID_HANDLE_V... |
a721582db189b9feadba8b09ff4fe8140e9c0cec | 384d2643974cecc8a62bf2d6965f5b71d367dcaf | rkbk2000/CodingTests | /TomTom/sort_single_swap.cpp | C++ | cpp | 1,363 | no_license | #include <vector>
#include <utility>
#include <algorithm>
// SCORE : 100
// you can write to stdout for debugging purposes, e.g.
// cout << "this is a debug message" << endl;
bool solution(std::vector<int>& A) {
// write your code in C++14 (g++ 6.2.0)
bool result = true;
std::vector<std::pair<int, int>> org... |
2be65069ab2ac7896f3e4674676d0221047ee859 | 13cab82f097e623a87974dbfff4c687df6312fd2 | Bardo91/grvc_catec | /library/src/core/comm/SocketUDP.cpp | C++ | cpp | 1,473 | no_license | /////////////////////////////////////////////////////////////////////////////////////////
// BOVIL: core
//
// Author: Pablo Ramon Soria
// Date: 2014-05-31
//
/////////////////////////////////////////////////////////////////////////////////////////
#include "SocketUDP.h"
namespace BOViL{
namespace comm{
//... |
407219fa1184a944a5a5f1197daffdb4ff55df06 | ab25d11957fbf6510233fa8acb7d206f9a7992c2 | kamilmaj94/ConsoleCubes | /ConsoleCubes/BlockLibrary.cpp | C++ | cpp | 2,527 | no_license | #include "PCH.hpp"
#include "BlockLibrary.hpp"
namespace Blocks
{
unsigned char longShape[] = { 1,
1,
1,
1, };
Block Long({ {longShape, 1, 4}, {longShape, 4, 1} });
unsigned char zLeftShape1[] = { 1, 1, 0,
... |
184200c3b56b298b330c7103fdd96635d0a27d6a | 91fa606b691f098d4c041cd0cb3854824b2ec474 | IGME-RIT/graphics-glfw-debugCamera | /Debug_Camera-GLFW/Debug_Camera-GLFW/Camera.cpp | C++ | cpp | 5,058 | no_license | /*
Debug Camera
(c) 2015
original authors: Benjamin Robbins
Written under the supervision of David I. Schwartz, Ph.D., and
supported by a professional development seed grant from the B. Thomas
Golisano College of Computing & Information Sciences
(https://www.rit.edu/gccis) at the Rochester Institute of Technology.
Thi... |
93fd90a89583866e65a468422e20b0999958ca39 | 3c695c81d04dda0655ee344e08bd015e12cbbf26 | PDi-Communication-Systems-Inc/lollipop_external_chromium_org | /third_party/webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc | C++ | cc | 14,604 | permissive | /*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
eb27b9ea970288552da93d704b1cb355cbd21152 | daa59326cbc5aba6fa6ccc8384cdecab71e4ea7c | Tudat/tudat | /src/math/basic/leastSquaresEstimation.cpp | C++ | cpp | 14,611 | permissive | /* Copyright (c) 2010-2019, Delft University of Technology
* All rigths reserved
*
* This file is part of the Tudat. Redistribution and use in source and
* binary forms, with or without modification, are permitted exclusively
* under the terms of the Modified BSD license. You should have received
*... |
e9e18616c7452cb3a51816f084abac7a9186a264 | 32e94c28a7617e4cdb1220ebe3328198e817bf37 | uditsalwan/swift | /lib/AST/NameLookup.cpp | C++ | cpp | 89,592 | permissive | //===--- NameLookup.cpp - Swift Name Lookup Routines ----------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
a783814262c93248c014c47c49af9fb4f8e69832 | 6bcc31f698b35af14c1cecdba2b81c2419237127 | berber1016/chromium | /content/browser/prerender/prerender_host_unittest.cc | C++ | cc | 9,063 | 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 "content/browser/prerender/prerender_host.h"
#include "base/test/scoped_feature_list.h"
#include "content/browser/prerender/prerender_host_regis... |
7509114d0bcbd6d43f31f1bf8cfec2189a23067b | 82bb3e0b36d796ceebfad0e2d4dfb106b078be85 | KeyviDev/keyvi-server | /src/3rdparty/brpc/src/brpc/policy/mongo_protocol.cpp | C++ | cpp | 11,835 | 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... |
f6fdecfb002dc76f1351ae6b3714db4e71026033 | 013f5d40837e64456efd6f351f5dd548448207c6 | 1Crazymoney/AdaptiveCards | /source/uwp/Renderer/lib/AdaptiveImage.cpp | C++ | cpp | 5,876 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "pch.h"
#include "AdaptiveImage.h"
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
using namespace ABI::AdaptiveNamespace;
using namespace ABI::Windows::Foundation;
using namespace ABI::W... |
2c48920ab56aed2e192c6840cedc9361ee61fcc6 | c12ee6bf81a5e4881c704b96c0de7b49b12e338d | andreadelprete/pinocchio | /src/multibody/fwd.hpp | C++ | hpp | 1,238 | permissive | //
// Copyright (c) 2017-2019 CNRS INRIA
//
#ifndef __pinocchio_multibody_fwd_hpp__
#define __pinocchio_multibody_fwd_hpp__
#include "pinocchio/fwd.hpp"
#include "pinocchio/multibody/joint/fwd.hpp"
namespace pinocchio
{
template<typename Scalar, int Options=0> struct FrameTpl;
template<typename Scalar, int Op... |
2baa52f52964e41b648fd8d80dc5f9e408ea25ef | 252e10b6fd61e40d95b204a78539da9b312f218c | facundobrondo/TP0 | /obsolete/dft.cpp | C++ | cpp | 1,280 | no_license | #include "dft.h"
void dft(Array<Complex> &in, Array<Complex> &out){
Complex result;
for(size_t k = 0; k < in.getSize(); k++){
result = 0;
for(size_t n = 0; n < in.getSize(); n++)
result += in[n] * Wn(n, k, in.getSize());
out += result;
}
}
void idft(Array<Complex> &in, Array<Complex> &out){
Compl... |
c55238901ca1c8adfdc1d4a47e48d406ae1e5320 | 6dd5a98ebcb9c50a8e308fe4b03ba4d8ed5be8fb | rendellc/The-Greatest-Exercises | /tdt4102/VisualStudioForelesning/VisualStudioForelesning/main.cpp | C++ | cpp | 302 | no_license | #include <iostream>
using namespace std;
int sumList(int v[], int length);
/*
int main() {
int v[] = { 1, 2, 3 };
cout << sumList(v, 3) << endl;
return 0;
}
*/
int sumList(int v[], int length) {
int sum = 0;
for (int i = 0; i < length; i++) {
sum += v[i];
}
return sum;
} |
5b6816ddb599ed40f24791b31f14f9a046aa8c3b | 87428ccb72705f9753f211e0b625c3a718625b63 | ahixon/webkit.js | /src/WebCoreDerived/JSWebGLLoseContext.cpp | C++ | cpp | 7,133 | permissive | /*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation... |
9964962643c9f387dc3d648901a54ea3e5a372ff | f1eb89a581dbee64d5c181a195172f19f4f02ba3 | mk533/Codes | /LinkedList/Reverse.cpp | C++ | cpp | 1,512 | no_license | // Reverse of Linked List
#include<cstdio>
#include<cstdlib>
using namespace std;
struct node
{
int data;
struct node *next;
};
struct node *NewNode(int val)
{
struct node *temp = (struct node *)malloc(sizeof(struct node));
temp -> data = val;
temp -> next = NULL;
return temp;
}
struct no... |
c660dd3d2f73e8272599843c568c932bad5ce698 | 7db95dcce604f6e28ab44d8d97ee6c3bbed50c7c | sins-sunding/AL_USDMaya | /usdmayautils/AL/usdmaya/utils/MeshUtils.cpp | C++ | cpp | 70,532 | permissive | //
// Copyright 2017 Animal Logic
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
fde1be89863ecd4c6c25b7f23dbdb1196a92f6f2 | 5d87ac417b96b96d5d40b88ef6b957cf6ab64ba8 | Creddit-lol/Creddit-Core | /src/sapling/crypter_sapling.cpp | C++ | cpp | 3,910 | permissive | // Copyright (c) 2016-2020 The ZCash developers
// Copyright (c) 2020 The CREDD developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "crypter.h"
#include "script/script.h"
#include "script/standard.h"
#include "u... |
24710cd15955b4318270ff94dd3d6b04c5805284 | 8787d0f0d9656521a74413d39d60742565c2a033 | NCAR/lrose-core | /codebase/apps/ingest/src/nexrad2dsr/main.cc | C++ | cc | 3,192 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
aee810572d0e21c57e07b459388eca1ba3a1c0eb | 1cf37be1227106cea9637f93f37b76ceb7f99351 | filipeabelha/gym-solutions | /imepp/c5/b.cpp | C++ | cpp | 1,018 | no_license | #include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define cl(x, v) memset((x), (v), sizeof(x))
#define db(x) cerr << #x << " == " << x << endl
#define dbs(x) cerr << x << endl
#define _ << ", " <<
#define gcd(x, y) __gcd((x), (y))
typedef long l... |
369816531ba232f875ad17363c3a4cf1251af474 | 86630e1ae39cc2e9f82e4c8ca84add0cd09e10e4 | gfx0/roguelike | /roguelike/MainMenuState.cpp | C++ | cpp | 3,565 | no_license | #include "MainMenuState.h"
#include "settings.h"
#include "Game.h"
#include "RenderingSystem.h"
#include "ImageLoader.h"
#include "FontLoader.h"
#include "OperatingSystem.h"
#include <stdio.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
#include <assert.h>
/**********************************************************... |
e499eb9fb5958401bea6abbafab936562fcd44d9 | 33454e8401ca1951e5d17839fbeb1f0413667293 | kajalbabar/CLinkedList | /LinkList/program/program3.cpp | C++ | cpp | 3,154 | no_license | /*
Write a program which add new node in singly linear
linked list at specified position.
Function Prototype :
int InsertAtPosition(
struct node **Head, int no, int pos
);
______________________________________________________________________________________________________________________________________
*/
#include... |
8cd97347185c5e690fd0c30c39ec250c3cb16808 | 8d47a0be87fcece336b89bd44b4a81d958d8eb03 | jangwoopark/exercises-CPP | /two-robots/two-robos.cpp | C++ | cpp | 1,184 | no_license | #include <iostream>
#include <vector>
using namespace std;
static int distance(int start, int pickup, int putdown) {
return abs(start - pickup) + abs(pickup - putdown);
}
int solve(int M, int N, vector<pair<int, int>>& query)
{
vector<vector<int>> dp(N+2, vector<int>(N+1, 0));
for (int i=N; i>0; i--) ... |
fac7677feddb6ec9f9ace108949c2ed2d6f12134 | 2f7ef95ab4e1e79c8602f7bf8c05bd7742fd1f4c | fengerhan/mfem | /miniapps/autodiff/taddensemat.hpp | C++ | hpp | 13,129 | permissive | // Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit ht... |
aac9277e19da9bbd480fa2bd1256171f41989cc1 | 2718850e9173f1ac9900b92632fd7c6c8ed53ef8 | hbrulin/CPP_Modules | /tests/streams/ostream.cpp | C++ | cpp | 964 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream monFlux("C:/Nanoc/scores.txt"); //possible chemin relatif aussi
//Déclaration d'un flux permettant d'écrire dans le fichier
// C:/Nanoc/scores.txt
/*attention, Avant le C++11 les constructeurs de ofstream et de ifstream ne p... |
1a2bd29784e0f785c6d34655fcf9ef3173724e74 | f1e81feda09cf3547014e8a9a709c90dbd565a3e | KaiYanagisawa/MyBallGame | /Temp/il2cppOutput/il2cppOutput/Il2CppCCFieldValuesTable.cpp | C++ | cpp | 124,492 | no_license | #include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
IL2CPP_EXTERN_C_CONST int32_t g_FieldOffsetTable4[1];
IL2CPP_EXTERN_C_CONST int32_t g_FieldOffsetTable5[1];
IL2CPP_EXTERN_C_CONST int32_t g_FieldOffsetTable6[1];
IL2CPP_EXTERN_C_CONST int32_t g_FieldOffsetTable7[1];
... |
26fd9c82a9b8a324a077a3479874bf7db173089e | a2bb7c90923f65abd3d3141c4e283cdf5edb81df | Adikso/NecroDancerHeaders | /headers/Map21.hpp | C++ | hpp | 3,698 | no_license | // Generated automatically. Do not edit!
#ifndef _Map21_
#define _Map21_
class Node75;
class NodeEnumerator5;
class Point;
class String;
#include "Object.hpp"
class Map21 : public Object {
public:
Node75 * root;
// Wrappers
inline Map21 * _New() { return ptr::_New(); }
inline virtual Node75 * FirstNo... |
576dd81c61061cf09a3fe41205ca6dff27c7d6b1 | 2cd2e424025cb1b64ca9981adf98910a8b36bbee | li9616/neonavigation | /planner_cspace/test/src/test_cyclic_vec.cpp | C++ | cpp | 5,183 | permissive | /*
* Copyright (c) 2017, the neonavigation 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, ... |
2930b01db8fdcd3314775f4f689d97e148834e52 | a806132ab6b243274ecf45ad08123320e1a7e8e8 | nasa/EMTG | /emtg/src/HardwareModels/ThrottleTable.cpp | C++ | cpp | 57,113 | no_license | // EMTG: Evolutionary Mission Trajectory Generator
// An open-source global optimization tool for preliminary mission design
// Provided by NASA Goddard Space Flight Center
//
// Copyright (c) 2013 - 2020 United States Government as represented by the
// Administrator of the National Aeronautics and Space Administratio... |
0a7e4db4ae4a3ae4e4816ca8a0f845b0a6026e32 | 50fdc167ed77877f306472b58582ea5737dcbb36 | TiagoJSM/AmberParser | /ParsingData/StructDescriptor.hpp | C++ | hpp | 426 | permissive | #pragma once
#include <vector>
#include "BaseDescriptor.hpp"
#include "FieldDescriptor.hpp"
#include "TranslationUnitDescriptor.hpp"
namespace AP
{
class StructDescriptor : public BaseDescriptor
{
public:
StructDescriptor(const TranslationUnitDescriptor& translationUnit, BaseDescriptor* parent, const std::strin... |
930620daed878a926cfb75a6e97e334534f32e20 | a24502fa87baa34a56feacaae38cbb3e97f72177 | tingyingwu2010/heuristicschallenge | /src/headers/util.hpp | C++ | hpp | 665 | no_license | /*
* util.hpp
*
* Created on: Jul 12, 2008
* Author: pedro
*/
#ifndef UTIL_HPP_
#define UTIL_HPP_
#include <boost/foreach.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/random_access_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/identity.... |
e6cc260d59c948b46e9d138569fc84e0f15511e3 | f26605681bdd39a320b35c178b7cd0e534f8a602 | Project-OSRM/osrm-backend | /include/util/to_osm_link.hpp | C++ | hpp | 694 | permissive | #ifndef OSRM_UTIL_TO_OSM_LINK_HPP
#define OSRM_UTIL_TO_OSM_LINK_HPP
#include "util/coordinate.hpp"
#include <iomanip>
#include <string>
namespace osrm::util
{
inline std::string toOSMLink(const util::FloatCoordinate &c)
{
std::stringstream link;
link << "http://www.openstreetmap.org/?zoom=18&mlat=" << std::s... |
5cb6b862b32bcba2a93ccba0be96902bd249c34a | 6bded5f71230350fa5658fabf0e48fa77ec2dce8 | winksaville/fuchsia | /src/lib/component/cpp/environment_services_helper.cc | C++ | cc | 619 | permissive | // Copyright 2017 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/lib/component/cpp/environment_services_helper.h"
#include <lib/fdio/directory.h>
#include <lib/fdio/fd.h>
#include <lib/fdio/fdio.h>
#inclu... |
c2b70b135b1878df60c5d1af77693472934ebf0d | da6e458d92b10f05e1f73e3f29af3699788ff2a7 | alexandraback/datacollection | /solutions_5709773144064000_0/C++/dsabelnikov/CookieClickerAlpha.cc | C++ | cc | 826 | no_license | #include <fstream>
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
typedef unsigned int uint;
#define do_times(N) for (uint i = 0; i < N; i++)
double solve_case(istream &input) {
// do stuff here
double C, F, X;
input >> C >> F >> X;
double time = 0;
double rate = 2;
while (... |
d1727700318a04e0884b75cd464da9bed11cd7d6 | c8c686e4c6c512a29550cc13d5ff6247d92d34cb | kbatoev/SpbSU-Homeworks | /1-semester/8 HomeTask/8-3/main.cpp | C++ | cpp | 1,871 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int **createGraph(int vertexCount)
{
int **graph = new int*[vertexCount];
for (int i = 0; i < vertexCount; i++)
{
graph[i] = new int[vertexCount];
for (int j = 0; j < vertexCount; j++)
graph[i][j] = 0;
}
return... |
d7b80588d1bfd91c52cbaefb667e30d21afbc62d | 8ea8cd91e6511957f398e012c9741c4fe7b34477 | kungfu-monkey/Supernova | /Supernova/unittest/projects/msrv/control/MSrv_Control_common/stubs/MSrv_System_Database_stub.cpp | C++ | cpp | 60,550 | no_license | //<MStar Software>
//******************************************************************************
// MStar Software
// Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
// All software, firmware and related documentation herein ("MStar Software") are
// intellectual property of MStar Semiconduc... |
6dded12800a8a4249ad1c380df036b98da4bf9b3 | f7f2e6722ea4569a44a5264467d01d140dbf5d20 | NoSuchProcess/shaders | /teapot/teapot.cxx | C++ | cxx | 9,016 | no_license | #define USE_IMGUI
#include "appglfw.hxx"
#include "teapot.h"
#include <vector>
inline float point_segment_distance(vec3 p, vec3 a, vec3 b) {
b -= a;
float t = dot(p - a, b) / dot(b, b);
t = clamp(t, 0.f, 1.f);
return distance(p, a + t * b);
}
[[using spirv: in, location(0)]]
vec4 vert_pos_in;
// Pass-through... |
69a279481b9fb3fdd994bb2694b81e8661001f96 | 59a40d417ff1a713df5d9e15f71f0f352e3926de | Johniel/contests | /codeforces/566div2/C/main.cpp | C++ | cpp | 3,413 | permissive | // codeforces/566div2/C/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template<type... |
f13cb376cf921b2b7786b432201d48d8aabb4c3a | ab921effb92ba1d97a0a525e7ebe198dd8852e43 | Cantredo/HomeWork | /Solution of Online Judge/HZOJ/p104.cpp | C++ | cpp | 364 | no_license | #include<stdio.h>
int main(){
int a ;
while(scanf("%d" , &a) != EOF){
int check = 0 ;
while (a > 0){
if (a % 10 == 9){
printf("YES\n") ;
check = 1 ;
break ;
}
a /= 10 ;
}
if (!check){
printf... |
b0dc4ad3748d4bc52ae5dc1d229b5cbdcfd15e5f | 53d968d88c7fa5bef3df64e5301ab4690af79466 | bvan-dyc/CPPPool | /J04/ex03/Character.cpp | C++ | cpp | 996 | no_license | #include "Character.hpp"
Character::Character(std::string const &newname) : name(newname)
{
int i;
i = 0;
while (i < 4)
{
this->materias[i] = NULL;
i++;
}
}
Character::~Character(void)
{}
Character::Character(Character const &other)
{
*this = other;
}
Character &Character::operator=(Character const &rhs... |
890572880c03aa895a443607b87773dc7c44ab5d | d75837ad2443e7f6665cf889d30351a9df4f633c | michaeldboyd/iroha | /irohad/multi_sig_transactions/transport/mst_transport_grpc.hpp | C++ | hpp | 3,639 | permissive | /**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef IROHA_MST_TRANSPORT_GRPC_HPP
#define IROHA_MST_TRANSPORT_GRPC_HPP
#include "mst.grpc.pb.h"
#include "network/mst_transport.hpp"
#include "cryptography/public_key.hpp"
#include "interfaces/common_objects/commo... |
191d609581e771e091bfb6874f9e34c9ad40e323 | 8d12556b5c8d11f27731c9ebb6e2ff5105f98b2c | andrewmilo/CSVToMap | /Date.cpp | C++ | cpp | 1,025 | no_license | #include "Date.h"
Date::Date(int month, int day, int year)
{
month_ = month;
day_ = day;
year_ = year;
}
Date::~Date()
{
}
bool Date::operator==(const Date& other)
{
if(this->month_ == other.month_ && this->day_ == other.day_ && this->year_ == other.year_)
return true;
return false;
}
b... |
e0d1a13d157822a7b2fbb2f26933689319e9c7d2 | ae49c2a11df049ed7b1317ef907fea529bcb6c10 | dfk789/CodenameInfinite | /common/configfile.cpp | C++ | cpp | 3,926 | permissive | // ConfigFile.cpp
#include "configfile.h"
#include <string>
#include <strutils.h>
#include <common.h>
ConfigFile::ConfigFile( tstring filename, tstring delimiter,
tstring comment, tstring sentry )
: myDelimiter(delimiter), myComment(comment), mySentry(sentry)
{
// Construct a ... |
599520cb869cb2d2bf1257b00c3711ca4c791ba6 | ed9751e7e59ef14f79f934cfdde563a95aa10e9c | HKLM/MultiTeamGame | /UnrealTournament/Plugins/MultiTeamGame/Source/Private/MultiTeamSkinName.cpp | C++ | cpp | 1,480 | no_license | /**
* The names of the Material Parameters used in Character skins
* Created by Brian 'Snake' Alexander, 2017
*/
#include "UnrealTournament.h"
#include "MultiTeamSkinName.h"
//general
const FName NAME_UseTeamColors(TEXT("Use Team Colors"));
const FName NAME_TeamSelect(TEXT("TeamSelect"));
const FName NAME_TeamRedCo... |
9e8895361f4fe46a148b039eefdb5699300ba09a | e16ce069673c3e63f567624aa229244dcfc67a11 | DiligentGraphics/DiligentCore | /Graphics/GraphicsEngine/include/BottomLevelASBase.hpp | C++ | hpp | 9,731 | permissive | /*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.... |
2207d7555645907cfc4ca3c34987728714be18f8 | 30512d3eaad979e0b98375883f10e4fc51136a00 | yhaenggi/datacoin-hp | /src/main.cpp | C++ | cpp | 178,196 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2013 PPCoin developers
// Copyright (c) 2013 Primecoin developers
// Distributed under conditional MIT/X11 software license,
// see the accompanying file COPYING
#include "alert.h"
#include "checkpoints.... |
55b6f466537edbd9d7822bd2e70357ae50eac75d | fdbd6b63d5e95737fe37b3db6d6f24b860878729 | fugitivepoet/soncoin | /src/qt/paymentserver.cpp | C++ | cpp | 4,503 | permissive | // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <QApplication>
#include "paymentserver.h"
#include "guiconstants.h"
#include "ui_interface.h"
#include "util.h"
#i... |
01c6dbbb1958d33f67abd13e2802b1f53570cd61 | 3d87e29ccfb83c52ca943c7f4e50b9060a3d4d91 | Kexula/vulkan-project-starter | /src/memory/VulkanImage.cpp | C++ | cpp | 12,443 | no_license | #include <iostream>
#include <string>
#include <cmath>
#include "vk_mem_alloc.h"
#include "VulkanBuffer.h"
#include "SingleTimeCommand.h"
#include "../utils/StbImageImpl.h"
#include "VulkanImage.h"
namespace VulkanImage {
void VulkanImage::destroy() {
vkDestroyImageView(VulkanGlobal::context.device, imageView, nu... |
717fffe42e20ccce4b6c6f6f3b3664f2aaa2d79f | 3f4b7166c2f981d537538c73bad0ff958507eea0 | Juajin/defiers-of-the-four | /src/Robot.cpp | C++ | cpp | 1,295 | permissive | //-----------------------------------------------------------------
// Robot Object
// C++ Source - Robot.cpp
//-----------------------------------------------------------------
//-----------------------------------------------------------------
// Include Files
//------------------------------------------------------... |
25387b984d95de67ebc470f4080007bd839ab01f | 11c28d4b8969153e6ee3a2da6874b68f22ed35ec | davidwc2008/midterm-prep | /dll.cpp | C++ | cpp | 2,733 | no_license | //program for a doubly linked list
//We will add a 2 to the beginning of the linked list
//We will remove all odd numbers from the LL
#include <iostream>
using namespace std;
struct Node {
int value;
Node* prev;
Node* next;
Node(int num) {
value = num;
prev = NULL;
next = NULL;
}
};
void print... |
91242ccab23979907e71370d796ee2cfb5a41ea7 | c2b432bac71e38fd432479e530cb4bcdb87048b9 | pauladams8/chromium | /ash/system/night_light/night_light_controller_impl.cc | C++ | cc | 48,744 | 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 "ash/system/night_light/night_light_controller_impl.h"
#include <cmath>
#include <memory>
#include "ash/constants/ash_features.h"
#include "ash... |
26f6406eb852df540c9e971fd298cbc9147fbee2 | 17a317e3179eb9962f47237d956c7cb70a207d4d | Clepoy3/LeakNet | /dlls/tf2_dll/tf_playermove.cpp | C++ | cpp | 10,720 | no_license | //========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#include "cbase.h"
#include "player_command.h"
#include "tf_player.h"
#include "igamemovement.h"
#include "tf_s... |
8d38f4eec30d1d5450b4fbe70813a0627570432b | e85515c213434d0a9e575c2e25809d74e2fa1020 | mrVanDalo-springer/midipp | /midipp/midipp_mutemap.cpp | C++ | cpp | 7,010 | no_license | /*-
* Copyright (c) 2010-2012 Hans Petter Selasky. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list... |
7c61125534420ed9757a4f55b01522c374a2993e | 2671af8485f8d405d72f4d3f0437a47e08ffb9d7 | vslavik/poedit | /deps/boost/libs/thread/test/test_barrier_size_fct.cpp | C++ | cpp | 1,233 | permissive | // (C) Copyright 2013 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)
#define BOOST_THREAD_PROVIDES_INTERRUPTIONS
#include <boost/thread/detail/config.hpp>
#include <boost/thread/thr... |
e08b2375ed9759c797f1f5c21772a5fb5a8c2857 | 60683e85048fb08d8fc4689793be9b09498ed29a | ryanpowellslo/ryanpowell-CSCI20-Spr2017 | /lab12/lab12.cpp | C++ | cpp | 1,052 | no_license | //Ryan Powell Lab12 1/31/17
#include <iostream>
using namespace std;
int main(){
cout << " 8 8 8 8 " << endl;
cout << " 8 8" << endl;
cout << " 8 8" << endl;
cout << " 8 8" << endl;
cout << " 8 8" << endl;
cout << "... |
26a4f90340a85788250fef5d4c673cf1fa613d98 | d2e1cfef93e282166da851256c95c0e6512c69ba | AtaLuZiK/ltframe | /LTFRAME_SRC/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp | C++ | cpp | 37,453 | permissive | /*
* Copyright (C) 2011 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condition... |
b3a36e2ee97dfab5ba3eef8d472026bcf1ebb6e8 | 9a4c00b7ba214e2cf8f4dbaf26794176d74efe72 | debankit/cs141 | /lab5_q9.cpp | C++ | cpp | 444 | no_license | #include<iostream>
using namespace std;
//main function
int main()
{
//declaring variables
char a;
//asking the user to enter a character
cout<< "Enter a character"<< endl;
//storing the character
cin>>a;
//using conditional statement
if((65<=a && a<=90) || (97<=a && a<=122))
{
cout<< a<<" is an alphabet "<... |
65cfb01bedf62b20845f9c32a13e980b3e879b79 | 890d434a638dd027509c56535db2ed04424fe59b | lealzhan/mitsuba | /src/volume/tiledvol.cpp | C++ | cpp | 5,511 | no_license | /*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2010 by Wenzel Jakob and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
... |
ff5117848b47c1b22a9f50172cee41833d3d46ab | 38d3ec3c425f05403f92a9e079c34258b50748c4 | JY1Lnz/AKOJ | /1519.cpp | C++ | cpp | 1,670 | no_license | #include<bits/stdc++.h>
using namespace std;
//贪吃蛇动态规划
/*
寻找吃的最多的路径可以看成每一个位置从上两个位置选最多的过来
将数组构造成每个位置对应之前路径的最大值
样例
1 2 3 7
3 4 2 1
1 5 4 8
10 3 0 3
构造后的数组
1 3 6 13
4 8 10 14
5 13 17 25
15 18 18 28
*/
int data[110][110];
struct vote
{
int x;
int y;
};
void pu(stack<vote> & path,int x,int y)
{
vote temp... |
01801f5a6de880e711440570bd77d46265ed3409 | e4779e85ac33bb410590f125962e6e3596f2bdd1 | InojosaCS/Codeforces_AC | /codeforces/1466/E.cpp | C++ | cpp | 1,127 | no_license | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int MOD = 1e9 + 7;
const int P = 60;
void solve(int test){
int n;
cin >> n;
vector<int64_t> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<int> f(P, 0);
for (int i = 0; i < P; i++)
{
for (in... |
5dbfbb8f326e7d5d76befe2233b4bd052ff7981c | 27cb172f622f276efca47d231d8653ba53a6ec0c | yannick-cn/book_caode | /算法竞赛宝典/第二部资源包/第十一章 动态规划/放置问题/双色马/src/优化/Binhorse.cpp | C++ | cpp | 1,286 | no_license | #include<iostream>
#include<fstream>
using namespace std;
ifstream fin("Binhorse.in");
ofstream fout("Binhorse.out");
const int MAX=500;
int horse,home;
int v[MAX+1][MAX+1],f[MAX+1][MAX+1];
short a[MAX+1];
int in_and_prepare()
{
int color[2],kind=0;;
a[0]=-1;
fin>>horse>>home;
for(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.