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 |
|---|---|---|---|---|---|---|---|---|
89ee5b14f420263665bd2a0b2045c354a4bc3c2a | 99f6a4b6c08199a3a6fc00dd17bbb57aaa3c91e9 | sekheng/AdvancedGDevA1 | /NYP_Framework/Base/Source/PlayerInfo/PlayerInfo.cpp | C++ | cpp | 14,114 | no_license | #include "PlayerInfo.h"
#include <iostream>
#include "MouseController.h"
#include "KeyboardController.h"
#include "Mtx44.h"
// Allocating and initializing CPlayerInfo's static data member.
// The pointer is allocated but not the object's constructor.
//CPlayerInfo *CPlayerInfo::s_instance = 0;
#define CAMERA_SPEED ... |
86fe5dd59633486723ac12fefdf3ebff036eeb98 | dfa25cacaeaf48183b120adfba68bbaf0f08fadc | yanick/timewarrior | /src/timew.cpp | C++ | cpp | 3,877 | permissive | ////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 - 2016, Paul Beckingham, Federico Hernandez.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the... |
b5e08bd14c99c268433adb8adb7a0d0f768c2d06 | c3828e33abae3ca68c8229886d1417be9ec29a5b | akshitj1/faster | /src/acl-mapping/global-mapper/global_mapper/test/voxel_grid_indexer_tests.cc | C++ | cc | 33,326 | permissive | #include <chrono>
#include <algorithm>
#include "gtest/gtest.h"
#include "voxel_grid/voxel_grid.h"
/******************************************************************************/
// GridToIndex
/******************************************************************************/
// (ixyz) [ind... |
c92cf6a5f648348bf5f0a8a70f0ea5153a0ea3f2 | f491e9b49d39a465b935e9f96d7ea5b09bd17977 | canyudeguang/NDSIntersectionEventDetector | /classes/ransac/ransac.cpp | C++ | cpp | 2,959 | no_license | #include "ransac.h"
using namespace std;
ransac::ransac(){}
void ransac::runRansac(cv::Mat image) {
ransac::extractPoints(image);
allPointsLength = allPoints.size();
if(allPointsLength>10)
{
ransac::createLine();
}
}
void ransac::extractPoints(cv::Mat& img) {
allPoints.clear();
for... |
6422b637c25a405d4323a562d0f80612b025e35c | aac4c293748ab4b818ac29f9d1b8094c93a10061 | baker12335h4990k/wqweg | /test wave/RenderManager.cpp | C++ | cpp | 19,116 | permissive | /*credits by DETONATOR*/
#pragma once
#include "RenderManager.h"
#define _CRT_SECURE_NO_WARNINGS
#define IDR_FONT1 101
#ifdef STRICT
typedef void *HANDLE;
#if 0 && (_MSC_VER > 1000)
#define DECLARE_HANDLE(name) struct name##__; typedef struct name##__ *name
#else
#define DECLARE_... |
3d7c0585d4793083f84a0c4dc193e8e0da0f92aa | 8bdcf2b37b36a3d9d37ac01ea8b8b86036445c7f | lecalvmy/CPF_Projet | /tests/test_price_t_methode2.hpp | C++ | hpp | 15,156 | no_license | //
// Created by lecalvmy on 9/20/18.
//
#ifndef MC_PRICER_TEST_PRICE_T_METHODE_2_HPP
#define MC_PRICER_TEST_PRICE_T_METHODE_2_HPP
#include <gtest/gtest.h>
#include "jlparser/parser.hpp"
#include "pnl/pnl_random.h"
#include "pnl/pnl_vector.h"
#include "pnl/pnl_matrix.h"
/**
* Programme de test pour le prix en t des ... |
c92933846b3009dba71fe23a892b42d45fcbb0c6 | 7f97bb41d01df7187a119ad4e4a59ff185ea9040 | Tingji2419/Dancing_robot_car | /dance_testE5_ordinary/JY901.cpp | C++ | cpp | 3,052 | no_license | #include "JY901.h"
#include "string.h"
CJY901 ::CJY901 ()
{
ucDevAddr =0x50;
}
void CJY901::StartIIC()
{
ucDevAddr = 0x50;
Wire.begin();
}
void CJY901::StartIIC(unsigned char ucAddr)
{
ucDevAddr = ucAddr;
Wire.begin();
}
void CJY901 ::CopeSerialData(unsigned char ucData)
{
static unsigned char ucRxBuffer[250];
... |
2133308f2b155f072847acb9752015cef04a5954 | 5ece15a759eaf10634fcec5260823e9815a2844c | VadimChorrny/Polimorphism-Task | /Polimorphism/DomesticAnimal.cpp | C++ | cpp | 340 | no_license | #include "DomesticAnimal.h"
DomesticAnimal::DomesticAnimal(const size_t& age, const size_t& weight, const string& owner)
:Animal(age,weight), owner(owner)
{
}
void DomesticAnimal::type() const
{
cout << "It is domectic animal" << endl;
}
void DomesticAnimal::print() const
{
cout << "Owner:\t" << owner << endl;
... |
dbd70e059458261d71f234b74e8e08386fd68c42 | b21ce48c36d69c28145338de8d717f2bb3194abc | Yonas-A/CS-003A | /Projects/10 Sorted List/source/main.cpp | C++ | cpp | 1,229 | permissive | #include <ctime>
#include <iostream>
#include "../../!includes/Linked_List_Sorted/linked_list_sorted_test.h"
#include "../../!includes/Sorted_List/sorted_test.h"
using namespace std;
int main() {
srand(time(nullptr));
// test_Ascending ();
// test_Descending ();
// test_Unique ();
// ... |
9e199fcf0332e21a37968695e5f0e6c9aa2a9379 | 5b7f06f9762e4e197c405b0b2bece21246e794c5 | lantus/cannonball | /src/main/hwaudio/soundchip.cpp | C++ | cpp | 1,602 | no_license | /***************************************************************************
Sound Chip
This is an abstract class, used by the Sega PCM and xYM2151 chips.
It facilitates writing to a buffer of sound data.
Copyright Chris White.
See license.txt for more details.
**********************************... |
69bb3bc9dd74b79a6996e03abb8f3d8c9c7124bd | d90225547ac6794c1b3c6e5796ec55f82765b073 | rodrigargar/ClickHouse | /src/Storages/NamedCollections.cpp | C++ | cpp | 13,732 | permissive | #include "NamedCollections.h"
#include <Interpreters/Context.h>
#include <IO/WriteBufferFromString.h>
#include <IO/Operators.h>
#include <Storages/NamedCollectionConfiguration.h>
#include <Storages/NamedCollectionUtils.h>
#include <Poco/Util/AbstractConfiguration.h>
#include <ranges>
namespace DB
{
namespace ErrorC... |
848d798435d2241fc18b2377ceb8cdb626cd4822 | 24b35159e78073123d6e7cf5ba928886e8131065 | stenniswood/bk_code | /core/adrenaline/include/progressbar.hpp | C++ | hpp | 1,237 | no_license | #ifndef _ProgressBar_
#define _ProgressBar_
#include "control.hpp"
/* Warning the show percentage option will show below the 'bottom'
rectangular outline! May correct this later so that all controls
are gauranteed to be within the client rectangle.
*/
class ProgressBar : public Control
{
public:... |
3e005bf3ec40941977e85a71db38fbb9a2b44a35 | 16a30c4f4e380316823e7decae4f94bf4e2559d7 | nzahara/projects | /BEL/codes/SerialComm/SerialComm/SerialComm.cpp | C++ | cpp | 268 | no_license | // SerialComm.cpp : Defines the entry point for the console application.
//
#using <System.dll>
using namespace System;
using namespace System::IO::Ports;
using namespace System::Threading;
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
|
346df05316cedd63a77d7350b5b69a4ecf042d06 | 3cf597df8ef3a363927fd40c92f7fdcf310357c5 | Leryud/Data_struct | /Lab_8/BST/BST/BST/bstree.cpp | C++ | cpp | 6,172 | no_license | #include <iostream>
#include <queue>
#include "bstree.h"
template < class TE, class KF >
BSTreeNode<TE, KF>::BSTreeNode(const TE& elem, BSTreeNode* leftPtr, BSTreeNode* rightPtr)
:element(elem), left(leftPtr), right(rightPtr)
{
}
template < class TE, class KF >
BSTree<TE, KF>::BSTree()
:root(0)
{
}... |
81243c8a42594b171e58a38b191fbd4267e05c24 | 5ed013c21da3b5e42cf5f39c044116e38c24ab78 | spillerrec/AnimeRAster | /jpgtests/src/CsvFile.hpp | C++ | hpp | 1,463 | no_license | /*
This file is part of AnimeRaster.
AnimeRaster 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 3 of the License, or
(at your option) any later version.
AnimeRaster is distributed in the ho... |
891cb779967dce759282a23e958232b93e648231 | 8d8701d2f8972ce3ec907d3b56fd630735fd36c4 | xinala1122/Qt-1 | /QHTool/example/DebugMsgExample/main.cpp | C++ | cpp | 2,656 | no_license | #include "DebugMsgMainWnd.h"
#include <QApplication>
//#define QH_D_MSG_FLG 0
//#define QH_D_MSG_FLG QH_D_MSG_CRITICAL_UP
#include "QHTool/qhDebugMsg.h"
TrackHelper *g_pTrackHelper = NULL;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qhInstallMsgHandler_file(QString("debugfile.txt"),
... |
13c3c1497e024a488a4852ae36dbed36818411d3 | bcec4c7ad3a4afd4036a5a760f1758c46689074d | cv2111842/myFirstRep | /Homework/Assignment 4/gch5hw4/main.cpp | C++ | cpp | 579 | no_license | /*Calories Burned
Running on a particular treadmill you burn 3.6 calories per minute. Write a program that
uses a loop to display the number of calories burned after 5, 10, 15, 20, 25, and 30 minutes.*/
#include <iostream>
using namespace std;
int main() {
float minute;
float calories;
float b... |
b53fdee011999965403aff5a3f8435cf481f7559 | 99f4b4e3946d939a549e884807d02fe9f37a4536 | foxpy/homework | /semester 6/programming-methods/queue-template/test.cpp | C++ | cpp | 2,061 | no_license | #include <iostream>
#include <array>
#include <queue>
#include <cassert>
#include "queue.hpp"
void test_int() {
std::array<int, 8> input = { 4, 2, 9, 6, 1, 8, 13, 2 };
std::queue<int> stdq;
queue<int> myq;
assert(stdq.empty());
assert(myq.empty());
stdq.push(7);
myq.push(7);
assert(!stdq.empty());
assert(!m... |
2f5f18fc40ff17b7739ac7aaf5e9c991928a79e9 | 67e2c3089d049046cfb61696a2a7362fc1ebe163 | ucsd-cse125-sp20/cse125-sp20-group1 | /client/src/TerrainMesh.cpp | C++ | cpp | 850 | permissive | //
// TerrainMesh.cpp
// Gaia
//
// Created by Wenlin Mao on 4/26/20.
// Copyright © 2020 SphereEnix. All rights reserved.
//
#include "TerrainMesh.hpp"
TerrainMesh::TerrainMesh(){
vertices = std::vector<glm::vec3>();
normals = std::vector<glm::vec3>();
}
TerrainMesh::~TerrainMesh(){
}
void TerrainMesh:... |
aa4dd6e8d0ea7115e00624da7fa5064c3b5a8c0b | 0065ff651a072f71a6b9be588bc8acb2f4e4088b | CyberSys/VehFuncs | /VehFuncs/IndieVehHandlingsAPI.cpp | C++ | cpp | 3,927 | permissive | #include <game_sa\cHandlingDataMgr.h>
#include "IndieVehHandlingsAPI.h"
#include <bitset>
#include <sstream>
using namespace std;
using namespace injector;
extern fstream lg;
extern bool useLog;
struct handlingBlocKInfo
{
void *start, *end;
int size;
handlingBlocKInfo() : start(nullptr), end(null... |
7883da682be790c20124da4fc733bb95ec5153a5 | 4bace11897e773c8df895aba00ed6cd1fbadbc19 | ue4sdk/DRG-SDK | /DRG-SDK/SDK/DRG_AudioMixer_enums.hpp | C++ | hpp | 1,133 | no_license | #pragma once
// Deep Rock Galactic (0.22) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Enums
//---------------------------------------------------------------------------
// Enum AudioMixer.ESubmixEffectDynamicsPe... |
a13913eaca06f85f70adfa59922a546192b9be56 | c870e8506237c05798b97a4ff1ab71df86cbc620 | pateldhruvil96/chromium | /chrome/browser/ui/webui/settings/settings_ui.cc | C++ | cc | 20,935 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/settings/settings_ui.h"
#include <stddef.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
... |
06bb66aa279bad2f40ce1ac2fd9dc6214d4bb7d4 | b2eeb45e2c16cf8bda57f0fbb0c68b6a627e95fb | Vladyslav13/Qt | /modules/libnb/src/PhoneNum.cpp | C++ | cpp | 463 | no_license | #include "PhoneNum.h"
namespace notebook
{
//
// Definition of PhoneNum class.
//
PhoneNum::PhoneNum(PhoneParserShPtr parser)
: parser_{ parser }
{
}
std::string PhoneNum::Get() const
{
return parser_->Make(type_, countryCode_, phoneCode_, number_);
}
void PhoneNum::Set(const std::string& number, const PhoneType... |
8e50af5d846af43ab703020ba51257528e977c6c | 974d6576b68c835f6cb18655f54650eb17fe7066 | MrDoniz/Computability-and-algorithms | /CyA-P02-Eratosthenes/erathostenes.cc | C++ | cc | 2,461 | no_license | /**
* Universidad de La Laguna
* Escuela Superior de Ingeniería y Tecnología
* Grado en Ingeniería Informática
* Computabilidad y Algoritmia
* Práctica Nº: 2
*
* AUTHOR: Dóniz García Daniel
* DATE: 6 Oct 2020
* EMAIL: alu0101217277@ull.edu.es
* VERSION: 1
* BRIEF: Sieve of Eratosthenes is an ancient... |
965f7d6e5a3744eb31fe87c082e820d0ee84ca90 | 201cd5c1dbb3f411abab06839f23c759b5d5df00 | bobquest33/nntpchan | /contrib/backends/nntpchan-daemon/src/storage.cpp | C++ | cpp | 1,142 | permissive | #include "storage.hpp"
#include <errno.h>
#include <sys/stat.h>
#include <sstream>
namespace nntpchan
{
ArticleStorage::ArticleStorage()
{
}
ArticleStorage::ArticleStorage(const std::string & fpath) {
SetPath(fpath);
}
ArticleStorage::~ArticleStorage()
{
}
void ArticleStorage::SetPath(const st... |
59aab8c98659266d7f6bc9b975f6a5c21a59c850 | 4783243d51e8fc119fe3da4681fd67e6ee9ff923 | gabriel-grime/ClassicalStatPhys | /clstatphys/tests/integrator/velocity_velret_parallel.cpp | C++ | cpp | 2,382 | permissive | #include <gtest/gtest.h>
#include <clstatphys/physics/harmonic_oscillator.hpp>
#include <clstatphys/lattice/chain.hpp>
#include <clstatphys/integrator/velocity_velret_parallel.hpp>
namespace {
class VelocityVelretParallelTest: public ::testing::Test {
protected:
virtual void SetUp(){
// set by lattice::Chain... |
539e06fcbcb70ac6298528352494d2072b530374 | 237ac8df82ddd0f61a5ca2e7c0c768c910e804d7 | jamping/wdm | /wdm/universalcharset/nsLatin1Prober.cpp | C++ | cpp | 6,922 | no_license | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the Lice... |
e29efb4b6ad5ae553bece20ff98445c50041ee16 | 36619f7fcd5a313b698a18a81003e74d04a3804f | ngeorge337/Danimator | /src/strmanip.cpp | C++ | cpp | 7,746 | no_license | #include "libs.h"
#include "token.h"
#include "strmanip.h"
std::wstring StringToWideString(const std::string &s)
{
int len;
int slength = (int)s.length() + 1;
len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
wchar_t* buf = new wchar_t[len];
MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, l... |
f097fbe0293b38f41960cfcc434770eb5a1f9bf8 | 562233390c759ac244c29414777cc637323abf3c | jpcruzca/NOTAS-DE-CLASE | /NOTAS/ejercicios/hanoi.cpp | C++ | cpp | 443 | no_license | #include<iostream>
int hanoi(int n, int e, int l , int y);
int main()
{
int e=1,l=2,y=3;
int n=5;
hanoi(n,e,l,y);
}
int hanoi(int n, int e, int l , int y)
{
if(n==1)
{
std::cout<< "mueve la ficha "<< n << " desde " << e << " hasta " << y << std::endl;
}
else
{
hanoi(n-1,e,y,l);
... |
98af1ece855ac580aa099df631bf074c28ee8485 | 906970bc4b60e8804a118d107f4bac28b406f41f | Learningchipmunk/3D-Animation-Project | /Code_of_the_Human_and_the_Bird/vcl/math/transformation/special_transform/special_transform.hpp | C++ | hpp | 226 | no_license | #pragma once
#include "../../vec/vec.hpp"
#include "../../mat/mat.hpp"
namespace vcl
{
mat3 rotation_from_axis_angle_mat3(const vec3& axis, float angle);
mat3 rotation_between_vector_mat3(const vec3& a, const vec3& b);
}
|
c3b7cc4e4b0d8f1adfba081a2949bd859bce96eb | d0917b91143772b88c1d6b8e2bb40b824c71b64b | woodpecker12/iii | /src/num_rule/Sprint3Rule.cpp | C++ | cpp | 238 | no_license | #include "num_rule/Sprint3Rule.h"
#include "report/ConvertRule.h"
ReportResult Sprint3Rule::report(BYTE num) const
{
return ConvertRule(num).sprint3Convert();
}
Sprint3Rule& getSprint3Rule()
{
static Sprint3Rule rule;
return rule;
}
|
eb561bde5ca33dcc11a5f6ef52f448ed3cbf02e4 | c883eed05caef80e45716e38f36ac618c31ff34b | litao1009/SimpleRoom | /externals/OCCTLib/inc/RWStepShape_RWDimensionalCharacteristicRepresentation.hxx | C++ | hxx | 2,285 | no_license | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _RWStepShape_RWDimensionalCharacteristicRep... |
bb2f7f95e98c07b86117486ed706cb9e6494fd7c | 70306144fed4f83242f219869117d7d7a9948b22 | arazosman/Genetic-Path-Finder | /cli.hpp | C++ | hpp | 2,755 | permissive | // A simple command line interface for the program.
#ifndef CLI_H
#define CLI_H
#include <iostream>
#include <string>
#include <vector>
#ifdef _WIN32
#include <Windows.h> // for Windows OS
#else
#include <unistd.h> // for Posix
#endif
// an array which represents directions, elements are left, up, right and down ... |
52a1ca49835a7f57f92d20e7aea93d0acf8991d1 | cfbf85ca7d6f9f691e426ddb1065ca3e632853e8 | osphea/zircon-rpi | /src/sys/appmgr/introspector.cc | C++ | cc | 1,664 | permissive | // Copyright 2020 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/sys/appmgr/introspector.h"
#include <fuchsia/sys/internal/cpp/fidl.h>
#include <zircon/assert.h>
#include <zircon/errors.h>
#include <zircon... |
01a82ebe7b555e338e3468fa9cb7c169ce2f89a4 | fbf9a1c8392112a314b65a9061bcfcc5c674a646 | jyahina/coursera_brown_belt | /2week/restructuring/stats_aggregator.cpp | C++ | cpp | 1,779 | no_license | #include "stats_aggregator.h"
using namespace std;
template <typename T>
ostream& operator << (ostream& os, const optional<T>& v) {
if (v) {
os << *v;
} else {
os << "undefined";
}
return os;
}
void StatsAggregators::Composite::Process(int value) {
for (auto& aggr : aggregators) {
aggr->Process... |
3d7c117fa418cd91b64e470ae4a048622eec5da9 | d2f683acac0719d094888bcf557bcb96a0f5ecc6 | thegamer1907/Code_Analysis | /Codes/AC/4066.cpp | C++ | cpp | 3,943 | no_license | //VISHAL ANAND
#include <bits/stdc++.h>
using namespace std;
#define ios std::ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define Int long long int
#define fl(i,x,y) for(int i=x; i<y; i++)
#define vi vector<Int>
#define vvi vector< vi >
#define si set<Int>
#define msi multiset<Int>
... |
5ffab37f7c89ed70aec2f03defdff1bfd13b2e3f | 3f1c28fb02c2fa86a21b05ef5afc179af7da0e94 | DDR13GIT/Codeforces-Solve | /B_Borze.cpp | C++ | cpp | 440 | no_license | //Author: Debopriya Deb Roy
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false); cin.tie(NULL);
int i,j,n,t;
string s;
cin >> s;
for(i=0; i <=s.size(); i++){
if(s[i] == '.')
{
cout << '0';
}
else if(s[i] == '-' && s[i+1] == '.')
{
cout << '1';
... |
112dc6aac7b97c7c88dfcb466a3962c8b23ae66a | 0689fb70004fe84fabc606b22c69a410b7743715 | urisabate/Perosnal_Research_Audio-Music_Manager | /code/Game/Source/Font.cpp | C++ | cpp | 964 | permissive | #include "Font.h"
Font::Font(SDL_Texture* atlas, int count, int rows, int cols, int padding)
{
// NOTE: To load a bitmap font atlas we must adjust to some constraints:
// - Characters are ordered: Start at first char value and consecutive values follow
// - All characters width is the same
// - All cha... |
5bc378c17e4f0eeb3edce135c8c495fc7487b1fd | 3ba88ff1b9183f6c80bb71b69cfcf1676e37db35 | dodong471520/fastbuild | /Code/Tools/FBuild/FBuildTest/Tests/TestIncludeParser.cpp | C++ | cpp | 17,723 | permissive | // TestIncludeParser.cpp
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include "FBuildTest.h"
#include "Tools/FBuild/FBuildCore/FBuild.h"
#include "Tools/FBuild/FBuildCore/Helpers/CIncludeP... |
9aa8a60e9df2c24fada259cb09543293bb7045a8 | 45c9887892250d6bcc0056fbc9c6d6d9e517718c | radioactiveannie/Talent_Group2 | /project/main.cpp | C++ | cpp | 436 | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: main.cpp
* Author: djarv
*
* Created on den 5 juli 2017, 00:05
*/
#include <cstdlib>
#include <iostream>
using na... |
fadd8071433667740d3832c9869d052530fdb0d7 | c1f79a4b0f0bd5d67aec7ff0bcaec09671ef0918 | hekailing/rDSN | /src/dist/replication/lib/replica_stub.cpp | C++ | cpp | 44,599 | permissive | /*
* The MIT License (MIT)
*
* Copyright (c) 2015 Microsoft Corporation
*
* -=- Robust Distributed System Nucleus (rDSN) -=-
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software witho... |
ad8118115ab4a11b18d617eb2c44bc7b923eb7f1 | 0de41fe78fc752fb659b1e73808240b1059196d9 | cescgie/EMS-Project | /QTReversi/ai.cpp | C++ | cpp | 48,034 | no_license | #include "ai.h"
ai::ai()
{
board = new Board();
playerTable[p1] = new Player( p1 );
playerTable[p2] = new Player( p2 );
movesList.clear();
regularMovesListTemp.clear();
currentPlayer = p1;
isFinished = false;
movesPlay.clear();
INFINITY = 10000;
... |
34bde5b13b575378f57bbb6e395acee891545d40 | 49c4919eda11f4a4bec43e5bfcd1d79780bd418a | JamesLinus/node-chakracore | /src/node_zlib.cc | C++ | cc | 20,432 | permissive | // Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modi... |
834bd57478b07483736d8c977355a7d151769b97 | f69a9fb6003bf8a392c184b18c4d7f0be6511143 | cryingen/CPA-Programing-Essentials-in-C- | /Modul2/2.9/lab2.9.3.cpp | C++ | cpp | 456 | no_license | #include <iostream>
int main(void) {
int vector[] = {1, 7, 3, 8, 3, 7, 1};
bool ispalindrome = true;
int n = sizeof(vector) / sizeof(vector[0]);
for(int i = 0; i < n ; i++)
{
if(vector[n - 1 - i] != vector[i])
{
ispalindrome = false;
break;
}
}
... |
c4cf0b10c4c693b688eab3d977d9620bcf516e70 | 9d16d88435f6cafb28992072935ea25033dde648 | Spxct/nyancoin-client | /src/qt/clientmodel.cpp | C++ | cpp | 12,290 | permissive | // Copyright (c) 2011-2021 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "clientmodel.h"
#include "bantablemodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "peertablemodel.... |
25cfdde8a8557b05b3070d98e03a9fdce2a86316 | d8579f92659213b7fdaa628c32001ba8cdc58648 | SergeyStrukov/CCore-3-xx | /Desktop/Lib/CCore/src/video/lib/Window.Progress.cpp | C++ | cpp | 602 | permissive | /* Window.Progress.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CCore 3.50
//
// Tag: Desktop
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// ... |
f1486adef76d8df8451cd41b6f8d2734aef5ad86 | e310f8e497e2daf1a75ad99bbb9d841d44aa320d | realm/realm-core | /test/test_util_scope_exit.cpp | C++ | cpp | 2,256 | permissive | /*************************************************************************
*
* Copyright 2016 Realm 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/lice... |
5130176699800f1ea103203c80dfcb0495786f0e | 7a1eb1243787b2b6315bff07112179ee343df10d | alfarom256/Mordhau_SDK | /SDK/Mordhau_BP_ThrowingAxeProjectile_classes.hpp | C++ | hpp | 720 | no_license | #pragma once
// Mordhau (Dumped by Hinnie) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClas... |
d804f05d46e4d543418f50e151aa0561429883b5 | a4a285144fd3965866d634206a39591837b96c34 | asifazamali-zz/programming | /Lisa_chapter.cpp | C++ | cpp | 651 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
int n,k;
cin>>n>>k;
vector<int> v(n);
for(int i=0;i<n;i++)
cin>>v[i];
int special=0;
int prepages=0;
int curch=0;
int endch=0;
int numch=0;
int curpages=0;
for(int i=0;i<n;i++){
n... |
8fe9adc1c4f9234b76a104a0d08e7db4a9393104 | 2306a190d0f316de5760125ab6c7e7149f9fdb7d | microsoft/BPerf | /CoreCLRProfiler/native/coreclr_headers/src/pal/tests/palsuite/filemapping_memmgt/FreeLibraryAndExitThread/test1/test1.cpp | C++ | cpp | 4,628 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*=====================================================================
**
** Source: test1.c (FreeLibraryAndExitThread)
**
** Purpose: Tests the PAL implementation of the FreeLibr... |
f6ea2921353e65111d5ca6d1dd669afa038ad372 | 950c067a1ebbc0b285c638bfcf19473ef8a05224 | cms-sw/cmssw | /Validation/Geometry/plugins/MaterialBudgetHcalProducer.cc | C++ | cc | 21,773 | permissive | #include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.... |
f7d32b69ccbb412e268d6a4dc10c665ad27e6e86 | 046a3e7ec43773114b1a930b529d68fa4aa541fc | UmutOrman/hackerrank | /C++/strings/stringstream.cpp | C++ | cpp | 654 | no_license | #include <sstream>
#include <vector>
#include <iostream>
using namespace std;
vector<int> parseInts(string str) {
vector<int> results;
int count = 0;
for(int i = 0; i < str.size(); i++){
if(str[i] == ',')
count++;
}
stringstream ss(str);
for(int i = 0; i < count; i++){
int next;
char c;
... |
4880a92b2e5f194dfcc8d4c9f261bcb7bbdee3ad | 030c003acabe01f7b96ad67e36306f7a8ac215f8 | cduang/Plug-in-Tool | /ExecTool.cpp | C++ | cpp | 19,271 | permissive | //至可乐
#include <stdio.h>
#include <stdlib.h>
#include <sys/uio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include <pthread.h>
#include <math.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#... |
6028f1e8f374e28eb7b5ca3463b0dd6e00641aaa | cccac329c0dc80e55cbab96bca8468918a0e82b9 | jcd1994/MatlabTools | /Compiled/blaze-3.2/blazetest/src/mathtest/svecdvecouter/VCaV2a.cpp | C++ | cpp | 3,792 | permissive | //=================================================================================================
/*!
// \file src/mathtest/svecdvecouter/VCaV2a.cpp
// \brief Source file for the VCaV2a sparse vector/dense vector outer product math test
//
// Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved
//
// Thi... |
25af7d094a8957785ff55882d8ede9b5cbb6c0e7 | 5fb4fa015dd00e47c004d8a9a6db6d9a8f290625 | shagunshaily/resiprocate | /repro/ReproRunner.cxx | C++ | cxx | 60,706 | permissive | #if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
#include <iostream>
#include <fstream>
#include <stdexcept>
#include "rutil/Log.hxx"
#include "rutil/Logger.hxx"
#include "rutil/DnsUtil.hxx"
#include "rutil/dns/DnsStub.hxx"
#include "rutil/GeneralCongestionManager.hxx"
#include "rutil/TransportType.... |
2d71ec9302a60622e945d2e8ba2c5b64790789b3 | e39be7a4544290fe6711837833279e1bc41a1c30 | TrellixVulnTeam/Chromium_7C66 | /components/offline_pages/offline_page_model_impl_unittest.cc | C++ | cc | 49,130 | 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/offline_pages/offline_page_model_impl.h"
#include <stdint.h>
#include <algorithm>
#include <utility>
#include "base/bind.... |
e3a7ec5a5149ab76c0ad00ad9e81e8b98dd28459 | b047992d023d766abdc8394eac0c91e1d3d5bb99 | mulesoft-labs/avro | /lang/c++/impl/Resolver.cc | C++ | cc | 25,391 | 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"); yo... |
93348f7157e251b294417576167053928f2733d3 | 740c308c1b46f360cffdf3c13441f476a9e7874e | qucker135/demo-labyrinth | /main.cpp | C++ | cpp | 3,895 | no_license | #include <iostream>
#include <ncurses.h>
#include <cstdlib>
#include <math.h>
using namespace std;
enum WALL{BOTTOM,TOP,LEFT,RIGHT};
string* gen_labyrinth(const unsigned height,const unsigned width,const WALL w1,const int wh1,const WALL w2,const int wh2){
if(height<1 || width<1 || (w1==w2 && wh1==wh2)){
return NUL... |
39be926d486ab62f922261fa3bb634cc914fd3da | 1ec7a6978c0312704390684578bf79f37a5ffff0 | VeriSilicon/tensorflow | /tensorflow/core/grappler/optimizers/data/enable_gradient_descent.cc | C++ | cc | 2,567 | permissive | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
46582954bed516e37e02b09308199328c1cda7f3 | db91b034d9619fb88d11b3aad7798a8aa1404ad1 | runtimeee/rlibv2 | /core/qps/dc.hh | C++ | hh | 6,832 | permissive | #pragma once
#include "../rmem/handler.hh"
#include "./impl.hh"
#include "./mod.hh"
namespace rdmaio {
using namespace rmem;
namespace qp {
struct __attribute__((packed)) DCAttr
{
long unsigned int lid;
u32 dct_num;
int dc_key;
};
/**
* An abstraction of DC target. When receive the `connection` request
* ... |
e9b7489ee9045ab2d214fa2c3850c5ff36dbefff | 541b91dcb485a2c96feed612ada0d1561c39a829 | lineCode/sprout | /source/core/scene/animation/animation_loader.hpp | C++ | hpp | 456 | no_license | #ifndef SU_CORE_SCENE_ANIMATION_LOADER_HPP
#define SU_CORE_SCENE_ANIMATION_LOADER_HPP
#include <memory>
#include "base/json/json_types.hpp"
#include "base/math/transformation.hpp"
namespace scene::animation {
class Animation;
std::shared_ptr<animation::Animation> load(json::Value const& animation_value,
... |
8cf4033c1640a6715ddc4e1062d4d45d616ebf82 | d4e3739506353b9bce51a103a9d28d4ceb57b187 | honzikpce/JN | /src/Sprite.cpp | C++ | cpp | 2,429 | no_license | //
// Sprite.cpp
// GameEngine
//
// Created by Honzik on 10.11.16.
// Copyright © 2016 Honzik. All rights reserved.
//
#include "Sprite.hpp"
#include "ResourceManager.hpp"
namespace JN {
void Sprite::init(float x, float y, float width, float height, std::string texturePath) {
_x = x;
_y = y;
_width ... |
cb75c339eb050e37c6513295a2315f632f7365e6 | 3f868a81e8741ee93171dd4381eb507b3897e322 | Nahusa/SCIRun | /src/Core/Datatypes/Legacy/Color/Color.cc | C++ | cc | 2,009 | permissive | /*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2015 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (... |
4abefb3eaf667b245472b913f3e34faf9efc751f | 0b3380878105c894ba047e30b6b0e2f16e6dbb22 | mikestaub/arangodb | /3rdParty/V8/V8-5.0.71.39/test/cctest/wasm/test-run-wasm-js.cc | C++ | cc | 12,995 | permissive | // Copyright 2015 the V8 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.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#i... |
8a58c8f4527a49d3fb95f9fe20e0e0823b2a1e8f | c6a3b90418ff1d37b4b24c558dd4640eea2ddd94 | zH4x/SoT-Insider-SDK | /Cpp/Internal (Offsets Only)/SDK/BP_FishingFish_Pondie_05_Colour_01_Charcoal_functions.cpp | C++ | cpp | 1,031 | no_license | // Name: SoT-Insider, Version: 1.102.2382.0
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------... |
6dc4f0f3272b6e079b00f8ecacfe8d256d2dccd1 | e4eb958b18b68dcf33f4da0b0556fee28e747be1 | readlnh/patsolution | /basic/B1022.cc | C++ | cc | 353 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main() {
int a,b,c,d;
cin >> a >> b >> d;
c = a + b;
vector<int>v;
if(c == 0) v.push_back(c);
while(c) {
v.push_back(c % d);
c = c / d;
}
for(int i = v.size() - 1; i >= 0; i--)
cout << v[i];
... |
87b41526507ac51ff757a1e443d826f123f4d2fd | 9d0f0a6abc88cb74d6813d9dc4346060ad6ee4dd | akash350poria/CodingBlocks | /Bit Manipulation/isUnique.cpp | C++ | cpp | 380 | no_license | #include <iostream>
using namespace std;
//Given an array where each element occurs twice except one element
//Find the element that occurs only once
// 5^5=0
// 5^0=5
// 5^7^5=7
int main()
{
int a[] = {1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 6};
int n = sizeof(a) / sizeof(int);
int ans = 0;
for (int i = 0; i < n; i++... |
2049c07bf78e5bed37e42782d5fb0fd692d90b8a | e95e0993d5f70f9bfbfe1ea93a0c35f6285a91d0 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_new_hunk_2346.cpp | C++ | cpp | 1,517 | no_license | ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
"proxy: *: found forward proxy worker for %s",
*url);
*balancer = NULL;
*worker = conf->forward;
access_status = OK;
/*
... |
623f0702ff8c5b8b4e12401821c7b6bb3001eafa | 0cc8552b9615e1da3cd235cc50bf4634cea7ecf4 | Rpraj86906/C-Programs | /Binary search.cpp | C++ | cpp | 884 | no_license | #include<iostream>
using namespace std;
int Bsearch(int A[],int n, int item)
{
int beg, last , mid;
beg=0;
last=n-1;
while (beg<=last)
{
mid=(beg+last)/2;
if (A[mid]==item)
return mid;
else if(A[mid]<item)
{
beg=mid+1;}
else
{
last=mid-1;
... |
9bf1ed211df4f8ca7c1f23b57202cb0c03d057b0 | 70cca60a1c459adc2111a49b6386b9ac6cf0e588 | rystrauss/boids | /src/pyboids.cpp | C++ | cpp | 2,278 | permissive | //
// Created by Ryan Strauss on 11/18/21.
//
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "Simulation.h"
namespace py = pybind11;
PYBIND11_MODULE(pyboids, m) {
py::class_<Simulation>(m, "Simulation")
.def(py::init<>([](int window_width, int window_height, float boid_size, float... |
d8290cb29d3d8e26caab5bf72bd917ac96ab648e | fdad50e8d46b70fe5772d5d15df8088a7517014f | emperorstarfinder/Secondlife-Official-Viewer | /indra/llinventory/llinventorysettings.cpp | C++ | cpp | 3,931 | no_license | /**
* @file llinventorysettings.cpp
* @author optional
* @brief A base class for asset based settings groups.
*
* $LicenseInfo:2011&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2017, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the ter... |
eaecc9b8f5e98057f09bd669db68c26749272f82 | 6577691f01f34bae6ba24191a6a396a1a60060e5 | Littleele/2021-computer-networking | /编程实验/文件打包实验/StructRead.cpp | C++ | cpp | 1,071 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<time.h>
using namespace std;
#define BUF_LEN 100
#define USER_NAME_LEN 20
#define EMAIL_LEN 80
#define TIME_BUF_LEN 30
typedef unsigned long DWORD;
struct Person
{
char username[USER_NAME_LEN]; // 员工名
int level; // 工资级别
char email[E... |
4ab8cecad666c52db1bbd140797814a534f56e77 | 36b35d74001f0d3e7b98dfded574dc9b549e65e1 | YJieZhang/Tengine | /executor/lib/cpu_driver.cpp | C++ | cpp | 12,048 | 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 ma... |
962ec3361d23d1cf99ca75759b42bb3113e7a087 | 50a5b62556a67bb24049a68acf8b9c8bea5a78fb | AntonYermilov/kinect-ros | /src/create_map_2.cpp | C++ | cpp | 1,055 | no_license | #include <octomap/octomap.h>
#include <octomap/OcTree.h>
using namespace std;
using namespace octomap;
int main(int argc, char** argv) {
OcTree tree(0.1);
for (int x = -20; x < 60; x++) {
for (int y = 0; y < 40; y++) {
for (int z = 20; z < 60; z++) {
point3d pt((float)... |
5b4b05f3908fbe9b7f9e6eb3950ea3110e41ff01 | 6b14ee4dbaa76b371a09351771bc7fb1898efb16 | fp-magic/ACM-ICPC-codes | /codeforces/cf_525b.cpp | C++ | cpp | 453 | no_license | #include<cmath>
#include<cstdio>
#include<vector>
#include<cstring>
#include<algorithm>
using namespace std;
long long a[100005];
int main()
{
int i,j,n,k;
long long s,t;
scanf("%d%d",&n,&k);
for(i=1;i<=n;i++)
scanf("%d",&a[i]);
sort(a+1,a+n+1);
s=0;
j=1;
for(i=1;i<=k;i++)
{
... |
6b6f4e94cfcb48977074b2a1b8e95f8728569f0c | 46ebd1f1f74833f031fba4fe15b12f925f0d3c48 | ganeshib/Bus_Reservation_System | /bus reservation.cpp | C++ | cpp | 5,019 | no_license | #include<bits/stdc++.h>
using namespace std;
int p=0;
class bus_details
{
char bus_no[5];
char driver[10];
char arrival[5];
char departure[5];
char src[20];
char dest[20];
char seat[8][4][10];
public:
void install();
void reservation();
void empty();
void ... |
6a472cbd0224798cf313e96a7b5f11aef335df61 | 165c9c36fecf26eb96f48dd52b60ba8a4be84c9e | samcoppini/xrfc | /src/parser.cpp | C++ | cpp | 3,098 | permissive | #include "parser.hpp"
using namespace std::string_literals;
namespace xrf {
namespace {
/**
* @brief Attempts to parse a XRF chunk, which will result in either a new,
* valid, chunk being added to the passed-in list of chunks, or new error
* messages being added to the list of errors
*
* @param file
* The... |
f290649739d3e39066d912c8f050097440f1db18 | 77f56705cd7cfee16cbc16899c1f289e5bf2c063 | seth-huffman/DSMCommunityCollege | /Memory/memory.cpp | C++ | cpp | 449 | no_license | /////////////////////////////////////////////////////
// Seth Huffman / 10/1/19 / sethwhuffman@gmail.com
/////////////////////////////////////////////////////
#include <iostream>
using namespace std;
int main ()
{
int x = 2;
int *y = new(nothrow) int[x];
for (int i = 0; i < x; i++) {
y[i... |
5cf39273c6f07d2c214a092a997825e96d87357a | 719dafdd1bdf8c87dd7e685035a1a43c160f4106 | mereckaj/LockBenchmarking | /TestAndTestAndSetLock.cpp | C++ | cpp | 702 | no_license | //
// Created by mereckaj on 12/3/15.
//
#include "Headers/TestAndTestAndSetLock.hpp"
#include <iostream>
using namespace std;
void TestAndTestAndSetLock::acquirePessimistic() {
do{
while(lock){
_mm_pause();
}
}while(InterlockedCompareExchange(&lock,true,false));
}
void TestAndTestA... |
c703ced64a720fd511db155ed25b4be474aa87f8 | a8851f74cdabb9f391dfa32b44650e8b5a00d2d6 | arowwne/TesraSupernet | /src/contract/libdevcore/FileSystem.cpp | C++ | cpp | 2,826 | permissive | /*
This file is part of cpp-ethereum.
cpp-ethereum 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 3 of the License, or
(at your option) any later version.
... |
6aa1059ad07b117e472bd19d2048a018118bdcf7 | fb6cc104e2ce88e9c7a20a79006301e3ff21809f | juchanei/BackjoonOnlineJudge | /BackjoonOnlineJudge/2146_다리_만들기.cpp | C++ | cpp | 2,497 | no_license | #include <iostream>
using namespace std;
const char Dir[4][2] = {
0, -1,
0, 1,
-1, 0,
1, 0
};
int map[102][102] = { 0, };
void init(int mapSize)
{
for (int i = 0; i < mapSize + 2; ++i){
for (int j = 0; j < mapSize + 2; ++j){
map[i][j] = -1;
}
}
mapSize = 0;
}
struct Node{
int x... |
d96345400d8689f6788c9f0981277ca042d94fa1 | 59cd9e818f4aa3b88931ecbe4874b1547d6d2882 | niuxu18/logTracker-old | /second/download/collectd/gumtree/collectd_repos_function_1623_collectd-5.0.1.cpp | C++ | cpp | 853 | no_license | static int cpy_init(void) {
cpy_callback_t *c;
PyObject *ret;
static pthread_t thread;
sigset_t sigset;
if (!Py_IsInitialized()) {
WARNING("python: Plugin loaded but not configured.");
plugin_unregister_shutdown("python");
return 0;
}
PyEval_InitThreads();
/* Now it's finally OK to use python threads. *... |
cd0e5254b86943388a1f8e41ac07014ade08cdfd | 605911b1ef0bf4533d84bfb4bab12d89c96a2466 | SREERAGI18/chromium | /chrome/browser/metrics/power/battery_level_provider_win.cc | C++ | cc | 8,438 | permissive | // Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/metrics/power/battery_level_provider.h"
#define INITGUID
#include <windows.h> // Must be in front of other Windows header files... |
6aad73c489e8b52bf28bcbd9810d57fa3360ff48 | a922252a5dc8dad7e8af1416bf77aeb08f12cc8a | ciryiping/rippled | /src/ripple/rpc/handlers/LedgerRequest.cpp | C++ | cpp | 4,444 | permissive | //------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012-2014 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby g... |
8ad2a22134998886f1554d976f48136d9ac411c0 | 90df9672e201afbaaebc95e8f0540a71a65d3301 | xLLLxLLLx/xLLLx | /cf/1151/A.cpp | C++ | cpp | 586 | no_license | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<vector>
#include<cmath>
#define fr(i,x,y) for(int i=x;i<=y;++i)
#define rf(i,x,y) for(int i=x;i>=y;--i)
#define LL long long
using namespace std;
const int N=55;
char lx[N],ll[5]={'A','C','T','G'};
int main(){
int n;scanf("%d",&n);
scan... |
35eb06528da9f64d46151f5f6d3dd7c94b94eb2d | c3f1fca93adacc2a5493ac11ece14d3e3a89310f | ahavrius/piscine-cpp | /rush01/IMonitorModule.hpp | C++ | hpp | 351 | no_license | #ifndef IMONITORMODULE_HPP
# define IMONITORMODULE_HPP
#include <iostream>
#include <vector>
#include <string>
class IMonitorModule {
public:
virtual ~IMonitorModule() {}
virtual void cicle(void) = 0;
virtual std::vector<std::string> const &getResult(void) const = 0;
virtual std::string const &getT... |
a7bfe27cedfb775f5207355f1f611698ea9f7679 | 9f4d71561672560bf3710344720cf0e1c34ad367 | EyciaZhou/acm | /codepart/qsort.cpp | C++ | cpp | 644 | no_license | #include <iostream>
using namespace std;
long int a[1000000];
void _qsort(long int *cc, long int s, long int e) {
if (s < e) {
long int te;
long int k = cc[e];
long int i = s - 1;
for (long int j = s; j <= e - 1; j++) {
if (cc[j] <= k) {
i++;
te = cc[i];
cc[i] = cc[j];
cc[j] = te;
}
}... |
c76a16f5414ac008fb09c3b44b0fac9e723b74c9 | f5bb88453dd3ab5fe0f2c5236acce7015833a720 | Joejiong/mindspore | /mindspore/lite/src/ops/concat.cc | C++ | cc | 3,033 | permissive | /**
* Copyright 2019-2020 Huawei Technologies 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 applicabl... |
de779166511611e099ae3be91fc19f32d5aacdc0 | b034e791832c5bc64e21c7971d6c1cea19d60669 | pierreboutin/RT | /interface/build-interface-Desktop_Qt_5_6_0_clang_64bit-Release/moc_editscene.cpp | C++ | cpp | 3,698 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'editscene.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.0)
**
** WARNING! All changes made in this file will be lost!
***********************************************************... |
120c5ae2a30fed656f81e258c02f8790017dd7bf | 0c540b36dbc9caccd01ac08174e35f7f99191360 | mkanai/ChunkChromosome | /libsrc/Sort.cpp | C++ | cpp | 8,678 | permissive | //////////////////////////////////////////////////////////////////////
// libsrc/Sort.cpp
// (c) 2000-2011 Goncalo Abecasis
//
// This file is distributed as part of the Goncalo source code package
// and may not be redistributed in any form, without prior written
// permission from the author. Permission is ... |
49877438ee1d55676775cc661d6cc18897b7fad5 | 15c1b69781e2cc222f16ac9a111642cf88f8a83b | Farmak09/2013-RPG-Righter | /2013 RPG Fighter/Extras.cpp | C++ | cpp | 18,738 | no_license | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <cassert>
#include "creatures.h"
#include "Mystrings.h"
void reberu_appu(hero_data* hero)
{
if (hero->xp >= 90 * hero->level)
{
hero->combat.hp += 25;
hero->full_hp += 25;
hero->combat.attack_min += 4;
hero->combat.a... |
6722fe553b84d1d805f35771bde061071e215cbe | 74e46230f2ac5bb4a635c4a14e97178333641f7e | IronOnet/football | /third_party/gfootball_engine/src/utils/animation.hpp | C++ | hpp | 14,109 | permissive | // Copyright 2019 Google LLC & Bastiaan Konings
// 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... |
c0c5a3bb08261dbde64dd6d93db467f8a780f938 | ac5ae926e0672fb427d7fe6380462780065e92fe | petersont/o3d | /googleclient/third_party/skia/files/src/core/SkMatrix.cpp | C++ | cpp | 52,975 | no_license | /* libs/corecg/SkMatrix.cpp
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
... |
128bdc054235c97743222f7f05fd4332ddce5789 | ccfa0dc6dfcb362c5c8ba3f30bbf71857652460e | sequencing/EAGLE | /src/c++/libexec/diffBam/BamDiffOptions.hh | C++ | hh | 1,121 | permissive | /**
** Copyright (c) 2014 Illumina, Inc.
**
** This file is part of Illumina's Enhanced Artificial Genome Engine (EAGLE),
** covered by the "BSD 2-Clause License" (see accompanying LICENSE file)
**
** \description Command line options for 'bamDiff'
**
** \author Lilian Janin
**/
#ifndef EAGLE_MAIN_BAM_ANALYSE... |
4e641d1cb4f14b3812a616c6108a6873cd999dc6 | 7e370d7ad5d403844dd9eaeaf1f3fad149c6e110 | K-Wu/libcxx.doc | /test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp | C++ | cpp | 544 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
055798f70ef6fb817bf3ac53ff4d4bc03b955128 | 355c4831c6419e9e559a3a8db0c9fde33fb0d387 | Ashik1704026/codeforce | /282B.cpp | C++ | cpp | 429 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long int n;
cin>>n;
long long sum=0;
int a,b;
for(int i=0;i<n;i++)
{
cin>>a>>b;
if(abs(sum+a)<=500)
{
cout<<"A";
sum+=a;
}
... |
6d0d0f92e4cc15976516be650217f07d26b99c7d | d4d95f139269bfe87a510b5344016846c948887c | stjimreal/leetcode-101 | /ch5.sortingAlgor/347.topKFrequency.medium.cc | C++ | cc | 1,195 | no_license | /*
* @Date: 2021-08-11 20:05:46
* @LastEditors: LIULIJING
* @LastEditTime: 2021-08-11 20:09:56
*/
#include <iostream>
#include <vector>
#include <iterator>
#include <unordered_map>
#include <queue>
using namespace std;
class Solution {
public:
struct Comp {
bool operator()(pair<int, int> v1, pair<int, ... |
7356cb791fe37eca6e594b0ed2a23305ad308c24 | 1a46f6113a733b413e19daa94bd7f1ce5743f7b0 | AartOdding/VulkanClasses | /src/Vulkan/Utils/FileUtils.hpp | C++ | hpp | 495 | permissive | #pragma once
#include <filesystem>
#include <fstream>
#include <vector>
namespace Vulkan::Utils
{
inline std::vector<char> readFileBytes(const std::filesystem::path& path)
{
std::ifstream file(path, std::ios::ate | std::ios::binary);
if (!file.is_open())
{
throw std::runtime_error("Failed to open file!"... |
d84a48f62e08f0f164b08a4dfe5a88543abd9d6f | bb3c2e7a2b1807e02fe9d1d234ec464c350ccfa6 | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/admin/wmi/wbem/providers/win32provider/providers/pagefileusage.cpp | C++ | cpp | 16,782 | no_license | //=================================================================
//
// PageFileUsage.CPP --PageFile property set provider
//
// Copyright (c) 1996-2001 Microsoft Corporation, All Rights Reserved
//
// Revisions: 08/01/96 a-jmoon Created
// 10/23/97 a-hhance converted to optimized frame... |
e9e026fb056ab00e5d43e409bc8547f42a9bd1bf | 00245c027b355277a2d11d2f0e1aa6977054ba2e | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-lexv2-runtime/source/model/StartConversationHandler.cpp | C++ | cpp | 13,639 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lexv2-runtime/model/StartConversationHandler.h>
#include <aws/lexv2-runtime/LexRuntimeV2ErrorMarshaller.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/utils/event/EventStr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.