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 |
|---|---|---|---|---|---|---|---|---|
c182e8248de8b6aac1fd01a406d5c36081acf864 | 77c137124ca56f4c82446bd6debf6c4280c74e6c | webstorage119/chromium | /components/url_pattern_index/url_pattern.cc | C++ | cc | 9,290 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// The matching logic distinguishes between the terms URL pattern and
// subpattern. A URL pattern usually stands for the full thing, e.g.
// "example.com... |
e60b02dc991ed234d47782fdd10e92b4946b011c | 5cfab28a6ddd84fa662d97c6eff866316eaca191 | SKKU-ESLAB/Auto-Compression | /kernel/U-XNNPACK/bench/bankers-rounding.cc | C++ | cc | 7,924 | permissive | // Copyright 2020 Google LLC
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
#include <algorithm>
#include <array>
#include <cmath>
#include <functional>
#include <limits>
#include <random>
#include <vector>
#include <xnnpack.h>
#... |
6e16530b9c197501c49f95001a87c307fbcfdd62 | 2b055b3fc536753f9aa663f46cdb65b30d9e9bef | chromium/chromium | /components/password_manager/core/browser/browser_save_password_progress_logger.cc | C++ | cc | 16,248 | permissive | // Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/password_manager/core/browser/browser_save_password_progress_logger.h"
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include... |
78598d53bf95b4844d8b048d2cb220dda59751be | d5d0b217f449b4433aa36635ae44969a0b10a604 | DQ9911/Number-Theory | /euler_sieve.cpp | C++ | cpp | 429 | no_license | //欧拉筛 or 线性筛...
const int N = 1e6 + 7;
bool np[N];
int p[N / 8], pn = 0;
void sieve() {
for(int i = 2; i < N; i++) {
if(!np[i]) p[pn++] = i;
for(int j = 0; j < pn && i * p[j] < N; j++) { //将最小素因数为p[j] 的 i * p[j]标记为非质数....
np[i * p[j]] = true;
if(i % p[j] == 0) break; //下一个质数不... |
43857a81ba2d9c9643c9067c778fdc81e62a19ef | 3ae0703d46f67d5a9c04113579d3ba09a25d4bd3 | rosoareslv/SED99 | /c++/folly/2015/4/FutureTest.cpp | C++ | cpp | 42,379 | no_license | /*
* Copyright 2015 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
eb516488c4fc84501a2807a07be46a2fb7162ceb | 48d8de7988bdf8482842f32afef2323b35834ef7 | StephenCathcart/terrain-generation | /src/TerrainOpenGL/Shader.cpp | C++ | cpp | 2,951 | no_license | #include "Shader.h"
#include "Mesh.h"
Shader::Shader(const string &vertex,const string &fragment ,const string &geometry,const string &tcs,const string &tes) {
glewInit();
program = glCreateProgram();
objects[SHADER_VERTEX] = generateShader(vertex ,GL_VERTEX_SHADER );
objects[SHADER_FRAGMENT] = 0;
objects[SHADER... |
62168bcfee24a334530154080c4b17cb4d717d07 | 18080acb96abffc390fa5402f0fd16eae6dc8c18 | syj716/CodeSet | /代码/11.cpp | C++ | cpp | 517 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
struct show {
int start;
int end;
bool operator <(const show& s) {
return end < s.end;
}
};
vector<show> a(100);
int main() {
int n;
while (cin >> n && n != 0) {
for (int i = 0;i < n;i++) {
cin >> a[i].start >> a[i].end;
}
so... |
e6a88cd47487749d04f5dda68847cd42385c4efb | 6384501885ea3e7b4b545fa109784f5ee23bacc1 | aardvarkxr/aardvark | /src/thirdparty/sentry-native/external/breakpad/src/common/dwarf/dwarf2diehandler.cc | C++ | cc | 8,324 | permissive | // Copyright (c) 2010 Google Inc. All Rights Reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions ... |
bbc4c50442c12d8c0697db3b4f30977acfc1d77a | 33741761234442ac09bf3ec14def79b32e48a04e | yongjin-shin/oop | /Mid/Mid1_20090488/Collidar.cpp | C++ | cpp | 246 | no_license |
#include "Collidar.h"
void Collider::setPosition(struct Vector2D pos) {
this->pos.x = pos.x;
this->pos.y = pos.y;
}
Collider::Collider() {
pos.x = 0;
pos.y = 0;
}
struct Vector2D Collider::getPosition() {
return pos;
}
|
fbdc834ac85c1dd00138d6b4a7510b3481e50cc6 | a4e01c0398f62e6477538b8b93f53390a61befef | Yeolar/coral-proxygen | /proxygen/httpserver/filters/test/ZlibServerFilterTest.cpp | C++ | cpp | 13,338 | permissive | /*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#include <fo... |
00a7fbbf66aca324fddaf3c2526c3f76db993680 | 31ff32f2e8e05141e14feb2ca4182526cd3edf16 | Dmitrivm/msu_cpp_autumn_2018 | /Makin/02/calculator.cpp | C++ | cpp | 2,903 | permissive | #include <iostream>
#include <stdexcept>
using std::endl;
using std::cout;
using std::invalid_argument;
using Int = int64_t;
enum class Token
{
Plus,
Minus,
Multiply,
Divide,
Number,
Invalid,
Eof
};
class Tokenizer
{
public:
void set(const char* tokens)
{
this->tokens = tokens;
value = 0;
Current... |
54c6f9b56032b0ef8f9e83612eb1915e951c18fd | b2a4943847b712fda7bdc6d0b19deb17b56245bf | WSCKY/RDA5981_Develop | /features/FEATURE_CLIENT/mbed-client/source/m2mserver.cpp | C++ | cpp | 9,309 | permissive | /*
* Copyright (c) 2015 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* 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... |
004f2a8b85da7f304e949fbce408998ba8c1f74a | 0ed6b3ac9ab09ab87416d9155c53488e33b60e1e | jahid-coder/competitive-programming | /Codeforces/1372/A.cpp | C++ | cpp | 1,650 | permissive | /****************************************************
* Template for coding contests *
* Author : Sanjeev Sharma *
* Email : thedevelopersanjeev@gmail.com *
*****************************************************/
#pragma GCC optimize ("O3")
#pragma GCC optimize(... |
c537f85c3cdd9df65582746c6b3564ca24e1a96a | 4cbc88f0514a30e6b47cd40b4ce10b160a2893a5 | tomscut/fastpr | /PeerNode.cc | C++ | cc | 20,473 | no_license | #include "PeerNode.hh"
// read the information from the config file
PeerNode::PeerNode(Config* conf){
_chunk_size = conf->_chunk_size;
_packet_size = conf->_packet_size;
_meta_size = conf->_meta_size;
_ecK = conf->_ecK;
_data_path = conf->_localDataPath;
_coordinator_ip = conf->_coordinatorIP;
... |
0d3327d32f471be817577d4386e853269d74f10e | 655df74b79d66f808ea1a9e3658598224c15f92c | ArmenGishyan/Diploma | /readshapesfromfile.cpp | C++ | cpp | 607 | no_license | #include "readshapesfromfile.h"
#include <assert.h>
#include <fstream>
ReadWriteFile::ReadWriteFile(const std::string& fileName, std::ios_base::openmode mode)
{
m_file.open(fileName);
if(!m_file.is_open()) {
assert(false);
}
}
std::vector<std::string> ReadWriteFile::getLinesFromFile... |
cbbe01ea2463b88ad934cb291aca42f37df431aa | fbb4f530ffae8364f756dd0c05caca5144007111 | luke-c-sargent/ogre_networking | /Player.cpp | C++ | cpp | 2,113 | no_license | #include <Player.h>
#include <btBulletDynamicsCommon.h>
using std::cout;
//multiplayer stuff
Player::Player(Ogre::SceneManager* smp, Ogre::String inname):
l(25),
w(25),
h(50)
{
//set scene manager pointer
sceneMgr=smp;
//physical constants
l=25;
w=25;
h=50;
pos0=btVector3(0,-120+... |
3ba3689678d656956322b985cdc1306792fd8630 | 26b062cda507885c24392839dbd6b3a6ea699112 | hyrise/hyrise-v1 | /src/bin/perf_regression/simple.cpp | C++ | cpp | 602 | permissive | // Copyright (c) 2012 Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH. All rights reserved.
#include <gtest/gtest.h>
#include <gtest/gtest-bench.h>
#include <string>
/*class ProjectionBase : public ::testing::Benchmark
{
protected:
int myVal;
public:
void SetUp()
{
myVal = rand() % 100;
}
... |
3d2fae5c20314b9bea8eeb5dfeb86d4a035ab8b6 | 80032c775c0e8f9987176d4632af7b30d3f2b793 | open-space-collective/open-space-toolkit-core | /src/OpenSpaceToolkit/Core/Error/RuntimeError.cpp | C++ | cpp | 696 | permissive | /// Apache License 2.0
#include <OpenSpaceToolkit/Core/Error/RuntimeError.hpp>
namespace ostk
{
namespace core
{
namespace error
{
RuntimeError::RuntimeError(const String& aMessage)
: Exception(String::Empty()),
message_(aMessage),
stackTrace_(boost::stacktrace::to_string(boost::stacktrace::stacktrac... |
6bb97590ed43fea85375193eebe009f5f73226ea | f02d30e6cc9cfb7ac9d946b8018f63e6f86d3845 | EscobarMariaSol/TP3-Taller-de-Programacion | /server_src/forbidden.cpp | C++ | cpp | 342 | no_license | #include "forbidden.h"
/******************** Métodos públicos de la clase Forbidden *****************/
Forbidden::Forbidden(): Response() {
}
Forbidden::~Forbidden() {
}
void Forbidden::operator()(std::stringbuf& str_serialize) {
std::string resp= "HTTP/1.1 403 FORBIDDEN\n\n";
str_serialize.sputn(resp.c_str... |
a393bb0c442f892195b716290a5a561dd72025eb | f04ac919e9d9b624443cca29ae0bd676868e54ae | minblock/qtip | /src/qt/optionsmodel.cpp | C++ | cpp | 19,630 | permissive | // Copyright (c) 2011-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/qstees-config.h>
#endif
#include <qt/optionsmodel.h>
#include <qt/qsteesunits.h... |
36c7adb359a0036d05aed1a30ad62bf25e980ac6 | fffb375737321510c30cc69d9ad18ec9e4cfd0ab | sraaphorst/daily-coding-problem | /dcp_cpp/test/TestDay035.cpp | C++ | cpp | 1,012 | permissive | /**
* TestDay035.cpp
*
* By Sebastian Raaphorst, 2019.
*/
#include <catch.hpp>
#include <string>
#include "day035/day035.h"
using namespace dcp::day035;
TEST_CASE("Day035: Empty case") {
std::string str{};
REQUIRE(arrange_rgb_string(str).empty());
}
TEST_CASE("Day035: All Rs") {
std::string str{"RR... |
c47532064c54f896c722f0837e068f53e24c3305 | 1ed5579fc1a7643e437750775bbb40d2f2de3de8 | chgogos/oop | /lab2020-2021/lab01/class1.cpp | C++ | cpp | 4,376 | permissive | /**
* Ζητείται η δημιουργία μιας κλάσης circle με ιδιωτικά μέλη δεδομένων center_x, center_y για τις συντεταγμένες του κέντρου του κύκλου και το ιδιωτικό μέλος δεδομένων radius για την ακτίνα του κύκλου.
* Συμπληρώστε 2 constructors και τον destructor έτσι ώστε να εμφανίζονται μηνύματα όταν δημιουργείται και όταν κα... |
7f69d9d7914b5547d2ffff4f8c8486dfa31e3fff | e92042dc21ec1387e5fd0e5912412068f643509b | sw93/algorithm | /SW_TEST(samsung)/BOJ_15683/BOJ_15683/boj15683.cpp | C++ | cpp | 2,197 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct CCTV {
int type, y, x;
};
int n, m, ans = 987654321;
const int rotateCount[] = { 4,2,4,4,1 };
int map[8][8];
vector<CCTV> cctv;
void init() {
cin >> n >> m;
for (int y = 0; y < n; y++) {
for (int x = 0; x < m; x++) {
cin >> m... |
7c34cf25d6be7ad313aac273361b9624142c7a29 | d8dea5fe5ceb672f0b088f5768c2ccd29ba253d3 | Sonzy/Flow | /Flow/Source/Flow/UserInterface/imgui/ImGui_Win32.cpp | C++ | cpp | 38,020 | no_license | // dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications)
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
// Implemented features:
// [X] Platform: Clipboard support (for Win32 this is actually part of core imgui)
// [X] Platform: Mouse curs... |
efdfd9766b99ea3d06e84ce97d0f4ca77f934907 | 52ab7f9d034822fc5818b519723752d52e185413 | pantherNZ/ReflexEngine | /ReflexEngine/ReflexEngine/QuadTree.cpp | C++ | cpp | 3,475 | no_license | #include "QuadTree.h"
namespace Reflex
{
namespace Core
{
QuadTree::QuadTree( const sf::FloatRect& boundary )
: m_boundary( boundary )
{
m_objects.reserve( QUAD_TREE_SPACE );
}
void QuadTree::SetBoundary( const sf::FloatRect& boundary )
{
m_boundary = boundary;
}
void QuadTr... |
70936f1bff9c62bec1d4b34ab0f3d902acfff786 | f8ad69e13877a7154d5e013d80d4ff5db4c499e7 | rchen95/cocos2d-js | /LuoLiRun/Classes/GameMark.cpp | C++ | cpp | 2,644 | no_license | //
// GameMark.cpp
// LuoLiRun
//
// Created by iMac on 2014-05-13.
//
//
#include "GameMark.h"
GameMark::GameMark(void)
{
}
GameMark::~GameMark(void)
{
}
void GameMark::onExit()
{
Node::onExit();
}
void GameMark::onEnter()
{
Node::onEnter();
Size size = Director::getInstance()->getWinSize();
th... |
2b7c9a43dfa1d68bc7a07201ee54176f8b5f21ef | 6aa63d1d760860f8b4e960cf2f513b113230347f | apache/openoffice | /main/ucb/source/ucp/file/bc.cxx | C++ | cxx | 44,885 | 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 y... |
4e57fadf144fb3ac374325a14072d81e9975d4b6 | c479389aa167ad71d2de4755189aaf6ec1f91aa8 | ExpLife0011/V8 | /LiveShow/src/Room3/roomsetting/RoomOption.cpp | C++ | cpp | 15,964 | no_license | #include "StdAfx.h"
#include "RoomOption.h"
#include "coredefine.h"
#include "..\Room.h"
#include "utility/StringHelper.h"
#include "utility/SystemHelper.h"
#include "utility/expat++/expat_document.h"
#define NOTICE_DELIM L"^*(nd)*^"
RoomOption::RoomOption(uint32 unRoomID)
: m_uRoomID(unRoomID)
{
common... |
ea1f90ea88066723af260f98f9474fcaa05bcef5 | d275f261cf1b88137e1b14647dc6efe41eaac542 | sebjf/EnvironmentMapPlayer | /CPUCode/EnvironmentMap.hpp | C++ | hpp | 7,576 | no_license | /*
* EnvironmentMap.hpp
*
* Created on: Jan 20, 2015
* Author: demo
*/
#ifndef ENVIRONMENTMAP_HPP_
#define ENVIRONMENTMAP_HPP_
#include <string>
#include <vector>
#include "SDL/SDL.h"
#include "SDL/SDL_rotozoom.h"
#include "Maxfiles.h"
#include "MaxSLiCInterface.h"
#include <string.h>
/*https://www.libsdl... |
fc805f1beafabfc60bbbbc01900e779c693d4382 | f376d01ede2a940285f6ee9a513ab69f338287d0 | SJZEZ/Introduction-to-Search | /01-素数环/简单.cpp | C++ | cpp | 614 | no_license | #include <cstdio>
bool is_prime(int x) {
for (int i = 2; i * i <= x; ++i)
if (x % i == 0)
return false;
return true;
}
int ans[25], n;
void print_answer() {
for (int i = 1; i <= n; ++i)
printf("%d ", ans[i]);
printf("\n");
}
bool used[25];
void search(int now) {
if (now > n) {
if (is_prime(ans[1]... |
2d09510957227389495d20c69aae0b7173262b75 | a76b2e0e734f9e6b3ba34300e8b6a0148b849dee | sus-scrofa/SKIRMISH_WARS | /view/HPbar.cpp | C++ | cpp | 2,320 | no_license | #include "HPbar.h"
#include <iostream>
#include <allegro5\allegro_primitives.h>
#define RATIO(num, denom) ((float)(num) / (float)(denom))
using namespace std;
HPbar::HPbar(float leftX, float topY, float width, float height,
unsigned int maxHP, hpBarPalette_t palette, bool emptyFromRight)
{
if (!wid... |
2ba05945a8e9429e4c02fea0d9b8fe8974d5bbb6 | cd329edda4fab506e1ab80b9d2b71b5dd40db7a5 | btcchain/DHA | /src/qt/qrcodedialog.cpp | C++ | cpp | 4,306 | permissive | #include "qrcodedialog.h"
#include "ui_qrcodedialog.h"
#include "bitcoinunits.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include <QPixmap>
#include <QUrl>
#include <qrencode.h>
QRCodeDialog::QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent) :
... |
f4f779489e75d006e30d9d571180cc3f24e6c977 | c76e0253cd7c2b077b77847a8fe34f51df866187 | gajgeospatial/clBLAS-1.10 | /src/msvc/include/AutoGemmKernelSources/sgemm_Col_NN_B1_MX096_NX096_KX08_src.cpp | C++ | cpp | 12,401 | permissive | /*******************************************************************************
* This file was auto-generated using the AutoGemm.py python script.
* DO NOT modify this file! Instead, make changes to scripts in
* clBLAS/src/library/blas/AutoGemm/ then re-generate files
* (otherwise local changes will be lost a... |
0422ce0174ef900cef97fbad71d78a2fab4aefca | 90e8dbeab7629c707656b4d34ad87600d298c87f | LuoIvan/MediaSDK | /samples/sample_multi_transcode/src/transcode_utils.cpp | C++ | cpp | 94,409 | permissive | /******************************************************************************\
Copyright (c) 2005-2018, Intel Corporation
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 c... |
56f23dd00e61a3a9eff7986275f1ba925692ad12 | 2a0dad5ef732b5cb29e81b1a670169f0b0bb6d55 | CS-Pacific-University/06polymorphism-daiperez | /06Polymorphism_Classes/Postcard.cpp | C++ | cpp | 5,373 | no_license | #include "Postcard.h"
#include <iostream>
#include<string>
using namespace std;
//***************************************************************************
// Constructor: Postcard
//
// Description: Initializes the link between Postcard and Parcel classes
//
// Parameters: None
//
// Returned: None
//************... |
1168861adc6d38144057976df8e7e5e5d6549a24 | 214b06d8f1783e87369ff8778c5394a94f23c33c | arvindr9/competitive-programming | /Contests/Leetcode/W212/C.cpp | C++ | cpp | 1,370 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
#define pi pair<int, int>
#define mp make_pair
#define f first
#define s second
void dfs(int cand, vector<vector<int>>& heights, vector<vector<int>>& visited, int i, int j, int i0, int j0) {
int n = heights.si... |
627f73301a98f0fcfbd29013b285a7aec8919b73 | f968ce4caf7c094823cf04cf0b642677f890f0a8 | larryzen/Project3.x | /lottery/Classes/lottery/ppc/PPCTableArea.cpp | C++ | cpp | 8,172 | no_license | #include "PPCTableArea.h"
#include "ToolKit.h"
PPCTableArea::PPCTableArea():
m_llChipValueSum(0),
m_llChipValueSelf(0)
{
m_pIcon = nullptr;
m_pLight = nullptr;
}
PPCTableArea::~PPCTableArea()
{
}
void PPCTableArea::resetTableArea()
{
// 清除数据
m_llChipValueSum = 0;
m_llChipValueSelf = 0;
m_pLabChipValueSum->... |
d3525fa06e3ebdb226eb9420f19542c8c0d3e93e | d97a23d8f976d159f3cfd3c44e1055f67fdbb08a | ZhenyiZhang/CS349-Breakout | /breakout.cpp | C++ | cpp | 14,477 | no_license | // CS 349 Fall 2018
// A1: Breakout code sample
// You may use any or all of this code in your assignment!
// See makefile for compiling instructions
#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include <sys/time.h>
#include <vector>
#include <stdlib.h>
#include <string>
#include <cmath>
#include <X11/... |
361c0bd285bfe9cf4ff008adc07b72c705c75bce | 1dd4fb70bf0eb4806422d5a27a795459206c4cf6 | sdlu1992/LittleBall_Cocos2dx | /Classes/Hero.cpp | C++ | cpp | 1,974 | no_license | //
// Hero.cpp
// LittleAnd
//
// Created by sdlu on 13-3-12.
//
//
#include "Hero.h"
#include "SimpleAudioEngine.h"
using namespace cocos2d;
using namespace CocosDenshion;
bool Hero::init(){
isGuarding = false;
guardTime = 5.0f;
vX = 0;
vY = 0;
flag = 3;
this->initWithFile("hero1.png");
... |
6178d523767ea01cbc1bf9ee704f6b4a628b2beb | 69dc7e8f23e1b3cbcdeb489194d723a2e2e1901c | junxuezheng/chromium | /chrome/browser/ui/webui/sync_internals_message_handler.cc | C++ | cc | 15,492 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/sync_internals_message_handler.h"
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/command_l... |
ffeb23e181e9558c82416eee85d71818a106c2a5 | c073c2969cbba7f96a2482ab920d634c4ede6eac | dm0/dynalo | /include/dynalo/dynalo.hpp | C++ | hpp | 4,613 | permissive | #pragma once
#include "detail/config.hpp"
#if defined(DYNALO_HAS_LINUX)
#include "detail/linux/dynalo.hpp"
#elif defined(DYNALO_HAS_WINDOWS)
#include "detail/windows/dynalo.hpp"
#endif
/// DYNAmic LOading of shared libraries and access to their exported functions
namespace dynalo
{
namespace native
{
/// N... |
d8351575ff1f223a014445bf13bece1706ae4c34 | 7393f4af7b51691d1a88fc746e4c7f7df458ac82 | zenoalbisser/chromium | /chrome/browser/media_galleries/media_galleries_permissions_unittest.cc | C++ | cc | 6,124 | permissive | // Copyright 2013 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 "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "chrome/browser/extensions/extension_prefs_unittest.h"
#include "chrome/browser/ex... |
b93dc66ed86f93ddbf0003bfddd53b7b9137a2eb | 49025f2dd56d8f1bf637d0fee6a7b95bb3e2b2a4 | enricop/qt-training | /addon/modelview/sol-friendlist/friendslistmodel.cpp | C++ | cpp | 3,778 | no_license | #include <QMessageBox>
#include "friendslistmodel.h"
QStringList FriendsList::friends(QString key) {
QStringList retval;
const_iterator itr = constFind(key);
while (itr != constEnd()) {
retval << itr.value();
itr++;
}
return retval;
}
bool FriendsList::friendsWith(QString a, QStri... |
331078350e295ef45d52496168f10f180cce9175 | d4bdcb0458cb987b395daf82472be926c93be50e | nagydniel/esp32-snippets | /cpp_utils/I2C.cpp | C++ | cpp | 3,552 | no_license | /*
* I2C.cpp
*
* Created on: Feb 24, 2017
* Author: kolban
*/
#include <driver/gpio.h>
#include <driver/i2c.h>
#include <esp_err.h>
#include <stdint.h>
#include <sys/types.h>
#include "I2C.h"
#include "sdkconfig.h"
/**
* Create an instance of an I2C object.
* @param[in] sdaPin The pin number used for the... |
a5c40df2ffca382a74fdab8076224f5493ecb1cc | 71450bf871d78b09a77fc067a4e6787bf37872ce | skylazart/tcpipcppdecoder | /src/udp.hpp | C++ | hpp | 1,219 | no_license | #ifndef UDP_H
#define UDP_H
#include <iomanip>
#include <memory>
#include <cstring>
#include <unordered_map>
#include "layer_parser.hpp"
#include "observer.hpp"
#include "tcp_data.hpp"
#include "ip_data.hpp"
#include "layer_data.hpp"
#include "util.hpp"
#include "report.hpp"
class Udp : public LayerParser, public Ob... |
728ad5466670a8336dfd8a4f8a6126d1a7b1162e | 11073875de86d93dcf6a74ed20da6e6b46193a33 | freesurfer-rge/linesidecabinet | /libpigpiodpp/include/pigpiodpp/pinassignedexception.hpp | C++ | hpp | 369 | permissive | #pragma once
#include <stdexcept>
namespace PiGPIOdpp {
//! Exception for when an already assigned pin is requested
class PinAssignedException : public std::runtime_error {
public:
explicit PinAssignedException(const unsigned int pin);
const unsigned int pinId;
std::string message;
virtual co... |
c38081ab3ec94caadfac29ac7bf0f1a3947bba58 | 7e7882effb8ce46789bb85f9e439fdf20c7e1ffb | vatsalm93/CMPE-243-Autonomous-RC-Car | /Sensor_Controller_Module/lpc1758_freertos_sensor_node/L5_Application/c_code/c_io.cpp | C++ | cpp | 488 | no_license | /*
* c_io.cpp
*
* Created on: Mar 4, 2019
* Author: Aakash
*/
#include "c_code/c_io.h"
#include "io.hpp"
void setLED(uint8_t ledNum, bool on)
{
LE.set(ledNum, on);
}
void dispDataOnLedDisplay(uint8_t byte_to_display)
{
LD.setNumber(byte_to_display);
}
void dispDataSetRightDigit(uint8_t alpha)
{
... |
45a26c7f6c20c64874354c4aa572869ec7101a69 | 6ef08efb5d3fc1f369121e9e8aae7ff95bd07683 | nikitakit/trajopt | /src/sco/sco_fwd.hpp | C++ | hpp | 1,443 | permissive | // autogenerated forward declaration header
#pragma once
#include <boost/shared_ptr.hpp>
namespace sco {
class GurobiModel;
typedef boost::shared_ptr<GurobiModel> GurobiModelPtr;
class ConvexObjective;
typedef boost::shared_ptr<ConvexObjective> ConvexObjectivePtr;
class ConvexConstraints;
typedef boost::shared_ptr<Conv... |
e4734e675e32429678efdfe3089223337642cf68 | abe3c5c73e8b91ab71951a01b2d00343ab2c969f | joelkaltman/TAM2C | /SDL_Wrapper/Source/SDLJoystickManager.cpp | C++ | cpp | 1,218 | no_license | #include <SDL_Wrapper/Include/SDLJoystickManager.h>
#include <SDL_Wrapper/Include/MissingJoysticksException.h>
//STL
#include <iostream>
SDLJoystickManager::SDLJoystickManager(unsigned int id)
{
this->joystick = SDL_JoystickOpen(id);
this->id = id;
if (!this->joystick)
{
MissingJoysticksExce... |
7f675ee9aa6dcff29d75efd6e32b2a128a186aa9 | 275f0303504686ef0477fe5dded3f34d3415ec72 | andreyor/MediaSDK | /_studio/mfx_lib/encode_hw/h265/src/mfx_h265_encode_hw_ddi.cpp | C++ | cpp | 13,939 | permissive | // Copyright (c) 2017-2019 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge,... |
5759a7505521b9241b5b903cb191a973eb12cbe6 | 273a1a112dbbbf40af62148372c61ff28adb6aa6 | YunWGui/LeetCode-300 | /String/14_Longest-Common-Prefix.cpp | C++ | cpp | 941 | no_license | /*
Title:
14. Longest Common Prefix
14. 最长公共前缀
Description:
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty string "".
Address:
https://leetcode-cn.com/problems/longest-common-prefix/
*/
#include <iostream>
#incl... |
c0d43e650f2a9c7e8ba64dbd339b9b4df2f65e03 | dee110b76b2dd7077ad193db2d4cdf19b09fb3c7 | malavikarajeshvikraman/DS-basics | /DynamicProgramming/Minnoofcoins.cpp | C++ | cpp | 883 | permissive | class Solution{
public:
int minCoins(int coins[], int M, int V)
{
int t[M+1][V+1];
for(int i=0;i<M+1;i++)
{
for(int j=0;j<V+1;j++)
{
if(i==0)
t[0][j]=INT_MAX-1;
else if(j==0)
t[i][0]=0;
else if (i==1)
... |
ffe3d39523bcd17860e855f6016a7233a49f4496 | a5e93a38e5077ba0e6208f3fcb49aa545e49941b | DLR-TS/gdal | /ogr/ogrsf_frmts/filegdb/FGdbDatasource.cpp | C++ | cpp | 37,291 | permissive | /******************************************************************************
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Implements FileGDB OGR Datasource.
* Author: Ragi Yaser Burhum, ragi@burhum.com
* Paul Ramsey, pramsey at cleverelephant.ca
*
********************... |
4bd7a8c21e2741b2faf0db0d60b784b772a899b9 | c550db54c1a6f955c0ed437db70ecf78150736c8 | sh3ll0ck3r/inter-process-communication | /server/server.cpp | C++ | cpp | 880 | no_license | #include <Windows.h>
#include <iostream>
#include <string>
//data struct, must be same as client
typedef struct data {
char data[255];
} s_data;
int main() {
HWND msg_window = nullptr;
printf("[server] waiting for client\n");
while (!msg_window) {
msg_window = FindWindowA("SharedMemoryHidde... |
450bdfa36d020da9d377558a4dae6601baadac8b | 1d1227bd79f1a833fb104a652eb3ff2b4c2703da | xeronm/rtstat | /test.cpp | C++ | cpp | 10,722 | permissive | /*
Copyright (c) 2019 Denis Muratov <xeronm@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, me... |
c9ba84e13044f03ff6b61203ee0cee923324f384 | d18380037f668e784d3d772fce2b949c56cefbe3 | prabhhav/cpluspluscpp | /reverse.cpp | C++ | cpp | 452 | no_license | #include <bits/stdc++.h>
using namespace std;
/* Iterative function to reverse digits of num*/
int reversDigits(int num)
{
int rev_num = 0;
while(num > 0)
{
rev_num = rev_num*10 + num%10;
num = num/10;
}
return rev_num;
}
/*Driver program to test reversDigits*/
int ... |
ea8e148c7239cb84fb92d805b0018a33c13b37c5 | bf6548ca540bad466985dac8ccd1f6195af79c52 | N1k1tung/EzAnder | /EzAnder/EzAnder/EzAnder.cpp | C++ | cpp | 6,549 | no_license | // firefox.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "ezander.h"
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // Th... |
5522e9813892996483e560603ce3ddae01e21275 | 27dfc59c41e32c428f679db9a0e7268dacf50049 | warrenween/Elastos | /Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/net/DummyDataStateTracker.cpp | C++ | cpp | 6,648 | permissive | //=========================================================================
// Copyright (C) 2012 The Elastos 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
//
// ... |
d784f6721cb7e928b347da3687f805c8a6ab1980 | c07de4550fc9bd34a8a2b89f55deae7d8e6524f6 | gd-Jason/chromium | /chrome/installer/setup/install.cc | C++ | cc | 29,273 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/installer/setup/install.h"
#include <windows.h>
#include <shlobj.h>
#include <time.h>
#include <memory>
#include <string>
#includ... |
205077eb89cf028e1a85159c897a0f50baaf3a3f | 32f2eb48c1311b4ce22a8af19aa2df4c96070e87 | clevijoki/vapid | /source/CacheServerMain.cpp | C++ | cpp | 682 | permissive | #include "CacheServer.h"
#include "AtScopeExit.h"
BOOL MutexProtectedResourceCloseHandle(HANDLE handle)
{
return CloseHandle(handle);
}
int main(int argc, const char** argv)
{
WSADATA wsa_data;
EXPECT_EQ(NO_ERROR, WSAStartup(MAKEWORD(2,2), &wsa_data));
AT_SCOPE_EXIT([](){ WSACleanup(); });
SocketCreateListenerR... |
e43a544c2b969b6f827710ed861c87e9c85bde16 | 14b19244ff89a6277a6578ca3f3efc8dc9fde8c3 | Cakewalk/Cakewalk-Control-Surface-SDK | /Framework2/MixParam.cpp | C++ | cpp | 27,361 | permissive | #include "stdafx.h"
#include "MixParam.h"
#include "StringCruncher.h"
#include <math.h>
#pragma warning(disable:4100)
//--------------------------------------------------------------------------
// This is a simple Mix Parameter class which abstracts a single mixing
// parameter in the host. The class h... |
2cf5dad1654b40d658187808d70f66e334d97ab3 | d77688a8195654bd7d9b985128fc4e3b45bf53ec | tgg/lsystem | /lsystem.cc | C++ | cc | 366 | no_license | #include <sstream>
#include <algorithm>
#include "lsystem.hh"
const std::string&
lsystem::evolve()
{
std::ostringstream out;
std::for_each(current_.begin(), current_.end(),
[&](char c)
{
auto res = rules_.find(c);
if(res != rules_.end())
out << res->second;
else
out << c;
});
... |
97b77e223cd57c81b04937c7ed796d9b71c350d2 | b1f838a62065d2965cffa8a54d5ffe39d13fa0e5 | willmbaker/forge | /src/forge/Scheduler.cpp | C++ | cpp | 21,070 | permissive | //
// Scheduler.cpp
// Copyright (c) Charles Baker. All rights reserved.
//
#include "Scheduler.hpp"
#include "Target.hpp"
#include "Graph.hpp"
#include "Forge.hpp"
#include "Job.hpp"
#include "Context.hpp"
#include "Executor.hpp"
#include "Reader.hpp"
#include "Filter.hpp"
#include "Arguments.hpp"
#inc... |
63d6630010412688e7333e329d048c2bcc6ac31f | 58fd9b2ab93b8391de053b910ff93780f82aabdd | adzhou/oragle | /WebKit/Source/WebCore/Modules/webaudio/AudioBasicInspectorNode.cpp | C++ | cpp | 4,796 | permissive | /*
* Copyright (C) 2012, Intel Corporation. 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 co... |
040d54b855bb251bbc50122ac33650e21a9fc325 | 17b15416e141ef564668dc07d628684dd83da119 | mwpowellhtx/quickcpplib | /include/ringbuffer_log.hpp | C++ | hpp | 38,791 | permissive | /* Very fast threadsafe ring buffer log
(C) 2016-2017 Niall Douglas <http://www.nedproductions.biz/> (21 commits)
File Created: Mar 2016
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 in the accompan... |
80ad43f5b05f4ddbd5e639850c36a0c21d3746d0 | a720898ca47dc8d264af858e3c7747bccae1aa0c | windystrife/UnrealEngine_NVIDIAGameWorks | /Engine/Source/Developer/ScreenShotComparisonTools/Private/ScreenShotToolsModule.cpp | C++ | cpp | 1,290 | permissive | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
ScreenShotToolsModule.cpp: Implements the FScreenShotToolsModule class.
=============================================================================*/
#include "CoreMinimal.h"... |
6ab6b20aa594516f3ebeb870455120c91be4d79a | a19289bd3f899270c7007374b4a83f080e342035 | WopsS/RED4ext.SDK | /include/RED4ext/Scripting/Natives/Generated/game/data/VisualTagsPrereq_Record.hpp | C++ | hpp | 777 | permissive | #pragma once
// clang-format off
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/Scripting/Natives/Generated/game/data/IPrereq_Record.hpp>
namespace RED4ext
{
namespace game::data
{
struct VisualTagsPrereq_Record : game::data::IPrereq_Reco... |
71429976af86182935f424be67d8401a793c8d1a | 77c0d1c6fc227a04751e73cbe36694205e317377 | etrizzo/PersonalEngineGames | /DFS1/Adventure/Code/Game/Actor.cpp | C++ | cpp | 25,685 | no_license | #include "Actor.hpp"
#include "ActorDefinition.hpp"
#include "Game.hpp"
#include "Map.hpp"
#include "Player.hpp"
#include "Item.hpp"
#include "ItemDefinition.hpp"
#include "Game/DebugRenderSystem.hpp"
#include "Engine/Renderer/SpriteAnimSet.hpp"
#include "Game/ClothingSetDefinition.hpp"
#include "Game/Quest.hpp"
#inclu... |
a1774edc3c2786ebbdf404fc647e01bc208dda0a | 2fa31abc134b0f5d315cd99260519ef4eb6c06fc | bonkoskk/peps | /pricer/payoff.hpp | C++ | hpp | 522 | no_license | #ifndef PAYOFF_HPP
#define PAYOFF_HPP
#pragma once
#include <gsl/gsl_rng.h>
#include "simulations.hpp"
extern double payoff_call_barrier_down_out(struct simulations::Params data, int J, double L, gsl_vector* simulations);
extern double payoff_call_vanilla(struct simulations::Params data, double st);
extern double p... |
10003b349f3539de9e6aa3b83313b47d8da0d18f | ae3f047658b7d21d9e5d0b210a2e5696b675afb5 | huba/polybar | /src/x11/tray_manager.cpp | C++ | cpp | 33,157 | permissive | #include <xcb/xcb_image.h>
#include <thread>
#include "components/config.hpp"
#include "errors.hpp"
#include "events/signal.hpp"
#include "utils/color.hpp"
#include "utils/factory.hpp"
#include "utils/math.hpp"
#include "utils/memory.hpp"
#include "utils/process.hpp"
#include "x11/ewmh.hpp"
#include "x11/icccm.hpp"
#i... |
99b4464dcadbcabb81583f5d43ada3dd68c41768 | 5e5992dd8724842ea98313b0c6017dcb4486fb91 | nextsux/shaka-player-embedded | /shaka/src/js/eme/media_key_session.cc | C++ | cc | 6,349 | permissive | // Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
412a9706374753c2239a74cacc11ebfdb98bb063 | ca1ef59e75b8daea5f42b062d6b59c224d4e44db | fensefa/test | /cpp/test_extern/2.cpp | C++ | cpp | 249 | no_license | #include <cstdio>
#include <iostream>
using namespace std;
extern int i;
extern int j;
// int j;
int main() {
printf("i = %d, j = %d\n", i, j);
cout << (5 and 6) << endl;
cout << (5 bitand 6) << endl;
cout << (5 xor 6) << endl;
}
|
2b60d468ea38192eff85f52a78e11ba70755bc59 | 3e696c57fd439f1fbb7a69aa077033d509af8f4a | Mon-ius/ITK | /Modules/Core/Common/include/itkVectorImage.hxx | C++ | hxx | 5,441 | permissive | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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.or... |
2d42e3e815f1dfcdebf9f86eab3f49e8e80f1c67 | 66ef4af45819d47e2ef9af7b7a801919005d2df9 | Sadalmalik/bomberman-sdl | /bomberman-sdl/tileset.cpp | C++ | cpp | 1,057 | no_license | #include "pch.h"
#include "functions.h"
#include "Tileset.h"
TileSet::TileSet(SDL_Texture*tex, int tileXSize, int tileYSize)
{
this->tileXSize = tileXSize;
this->tileYSize = tileYSize;
_texture = tex;
SDL_QueryTexture(tex, NULL, NULL, &textureXSize, &textureYSize);
tilesXCount = textureXSize / tileXSize;
tilesY... |
a726c543853f2df3507b2151bc7303c669900456 | 894a027b4a393024cdfc9842e632b5ea7f1dd9c9 | Saikat-S/acm-problems-solutions | /Codechef/Codechef_AC/Chef and Rainbow Array.cpp | C++ | cpp | 2,686 | permissive | /***************************************************
* Problem Name : Chef and Rainbow Array.cpp
* Problem Link : https://www.codechef.com/problems/RAINBOWA
* OJ : Codechef
* Verdict : Trying
* Date : 2018-12-11
* Problem Type : Easy
* Author Name : Saikat Sharma
* University : CSE, MB... |
b0d923aa9dafb619718d278fb58307d06dd11411 | 299963a2889965e346a9f1c86cb264435ce47179 | 1125204893/CNStream | /easydk/src/easybang/resize_and_convert/resize_and_colorcvt.cpp | C++ | cpp | 16,624 | permissive | /*************************************************************************
* Copyright (C) [2019] by Cambricon, Inc. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License a... |
c38e1cebdd20bd135e683e072203e1940aec1c4e | 3ee605bcfc720e8260cda861b7555bc64e0b7214 | LauraDiosan-CS/lab5-6-template-stl-adrianag9 | /Monede.cpp | C++ | cpp | 1,141 | no_license | #include "Monede.h"
Monede::Monede()
{
this->numar = 0;
this->valoare = 0;
}
Monede::~Monede()
{
}
Monede::Monede(int numar, int valoare)
{
this->numar = numar;
this->valoare = valoare;
}
Monede::Monede(const Monede& m)
{
this->numar = m.numar;
this->valoare = m.valoare;
}
int Mon... |
c048569db898f7268cf441483c7ca91586267115 | c1439a5628a822397737fdda482c47a9d83a95d2 | mmarineBlueQuartz/SIMPL | /Source/SIMPLib/ITK/itkDream3DImage.hxx | C++ | hxx | 4,121 | permissive | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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://ww... |
e89a8ad4df7d343a71a7d89e2b096ecc07c14e56 | 26b2f68e187832db7b1b051cf87ee02f15ee1943 | enaim/Competitive_Programming | /2016/May/Test.cpp | C++ | cpp | 603 | no_license | #include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define deb(a) cout<<__LINE__<<"# "<<#a<<" -> "<<a<<endl;
int main()
{
int i,input;
vector<int> vec;
cout... |
2d09e85946a442a3852b1ded36de028cd2d14c3e | 801693600c16604ad157d7d239ab5a32df0412fe | nishantrai18/alternate_paths | /check_acc/as_sstplotter.cpp | C++ | cpp | 32,582 | no_license | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <limits>
#include <map>
#include <stack>
#include <cmath>
#include <set>
#include "random_graph.h"
using namespace std;
#define INF 1000000000
#define N 410000
typedef pair< int ... |
844f33daf2860b413e2301275ddc1bcfdf7d5062 | 8a0e48b486d485a15269d915539d9e94a1d7c5fc | JoregeSanz/MyRepo | /Cocos2d-x/solitare/Classes/MovingCardGroup.cpp | C++ | cpp | 2,250 | no_license | //
// MovingCardGroup.cpp
// RealSolitaire
//
// Created by LightSky on 2/11/15.
//
//
#include "MovingCardGroup.h"
MovingCardGroup::MovingCardGroup()
{
m_fFaceDeltaY = Utils::GetFaceCardDistance();
}
void MovingCardGroup::setCard(int nCardNumber)
{
float dy = 0;
if( getCardCount() > 0 )
{
... |
08b852ef75b31c4878a692ba17560173443257a7 | 3f08686c3be1e868afd50314c69a5e87ea8746bb | Wlammm/CommonUtilities | /CU/CommonUtilities/Matrix3x3.hpp | C++ | hpp | 7,060 | no_license | #pragma once
#include "Matrix2x2.hpp"
#include "Vector3.hpp"
namespace CommonUtilities
{
template<class T>
class Matrix4x4;
template<class T>
class Matrix3x3
{
public:
Matrix3x3<T>();
Matrix3x3<T>(
const T m11, const T m12, const T m13,
const T m21, const T m22, const T m23,
const T m31, const T m3... |
b9d80da4f04d7bda2e918523c4d312c24d8a4c36 | a5c8a4dd963b2527050599b094c9b3e549c07c75 | tybins99/CRYPTANALYSIS.BabyStep_GiantStep_GMP | /LIB/argv_273.cpp | C++ | cpp | 737 | no_license | // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@ FILE: argv_273.cpp
// @@
// @@ DESCRIPTION:
// @@ This argv_1314 contains the argv_1073 structures and
// @@ functions declarations necessary for other
// @@ parts to use the system tool argv_2785 that
// @@ permits to perform platform independant
// @... |
36fb032c03b6dba1a75d1c261674deadb25690f9 | 6044235e474d95dc0a194b466185ba7c4577bc5b | ShuhengLi/LeetCode | /week4/1235.MaximumProfitinJobScheduling.cpp | C++ | cpp | 1,682 | no_license | /*1235. Maximum Profit in Job Scheduling
*We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i].
You're given the startTime , endTime and profit arrays, you need to output the maximum profit you can take such that there are no 2 jobs in the subset wit... |
cf063fea8402c578e2b8d484245056e51def7e5a | 3ec55e9c82a0a2c35c88ce87dbe2258917799fba | ZeroxCorbin/tm_driver | /src/tm_driver/tm_msgs/srv/AskSta.hpp | C++ | hpp | 417 | permissive | // Ask: request 'Read' sta
// More details please refer to the TM_Robot_Expression.pdf Chapter 8.5
// wait_time : set wait time.
namespace tm_msgs {
namespace srv {
namespace AskSta {
struct Request {
std::string subcmd;
std::string subdata;
float wait_time;
};
struct Response {
std::string... |
ef7dddd21c50ed4615ef04c8d415db6a71720901 | 4d3f88275eb77a313774ec89d37c7b865ff42261 | udoe/DebugViewPP | /Win32Lib/Win32Lib.cpp | C++ | cpp | 18,987 | permissive | // (C) Copyright Gert-Jan de Vos and Jan Wilmans 2013.
// 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)
// Repository at: https://github.com/djeedjay/DebugViewPP/
#include "stdafx.h"
#include <vector>
... |
30e003b206d61c6a3bbdb1d4331611d29babf020 | 9b76180fc476d05e782ddec2b7ebf27642188551 | sirasirasira/gtb | /bfs/gspan.cpp | C++ | cpp | 8,077 | no_license | #include "Gspan.h"
#define CLASS Gspan
#include "Database.h"
extern Database db;
#include "Calculator.h"
#include "Spliter.h"
void CLASS::run() {
// std::cout << "debug" << std::endl; // debug
auto& gdata = db.gdata;
map<Triplet, GraphToTracers> heap;
for (ID gid = 0; gid < (ID) gdata.size(); gid++) {
EdgeTr... |
6f2289505694ab106b82878a3c571350f52ce25d | ec6411cc56d469a849672824dbbc8b9fb5a0d803 | Adityasharma15/Codeforces | /636 div3/C.cpp | C++ | cpp | 1,599 | no_license | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll t;
cin >> t;
while(t--)
{
ll n;
cin >> n;
ll arr[n];
for(ll i = 0; i<n; i++)
cin >> arr[i];
ll ans = 0;
ll temp1 = INT_MIN;
bool po... |
1445f639417b4fab74faf01bde7ee5a0b05acb8a | 735d1a16401ba3494d7e178c3a239b9a59cc2cdb | 2lx/wayout_solver | /test/test_wo2s5.cpp | C++ | cpp | 4,112 | permissive | #define BOOST_TEST_MODULE WayOut2Section5Tests
#include <boost/test/unit_test.hpp>
#include "test_common.h"
BOOST_AUTO_TEST_CASE(Section5Level01)
{
const char * indata = 1 + R"(
__.._
_Y..y
X_y_.
.X.Y_
_Y.__
)";
const char * outdata = 1 + R"(
__.1_
_.2.3
._4_5
6.7._
_8.__
)";
test(indata, {outdata});
}
B... |
4e2a1af8cb06b3c41d478471bc73e5fbc4801626 | 4129b304815583a5247f0dd4df138a61357ce98c | abdirakhman/Olymp | /Codeforces/Vk cup qual/A/main.cpp | C++ | cpp | 2,500 | no_license | /**
SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnA... |
4e85b1662761aa1a6637133da6e4f4d67239d91e | 85be1e4db59a5c2cbc05fd67c8cf199a9f941bbd | lulyon/poj-archive | /emperorlu/2406/3167847_WA.cc | C++ | cc | 1,210 | permissive | #include<iostream>
using namespace std;
char T[1000000];
int next[1000000];
bool same(char T[])
{
int len = strlen(&T[1]);
if(len==1)return 1;
else
{
for(int i=2;i<=len;++i)
if(T[1]!=T[i])return 0;
return 1;
}
}
int gcd(int m,int n)
{
int tmp;
... |
16181297edd313c8014a92a2c13f32efda40a5ec | 5dc3173dfcadf130f50fa63f3a4ea455e95030c8 | Rui2018/didi | /word_anagram.cpp | C++ | cpp | 1,180 | no_license | #include <vector>
#include <string>
#include <unordered_map>
#include <locale>
#include "word_anagram.h"
vector<string> anagrams(vector<char> chars, vector<string> dictionary) {
vector<string> res;
int charSize = chars.size();
if(charSize == 0){
return res;
}
unordered_map<char, ... |
d6f71bf1ba3ca148079cfe84270d8a686354e476 | 3a2247094478bed4f71e933d73f296db20ce9109 | kssenii/ClickHouse | /dbms/src/Common/OptimizedRegularExpression.cpp | C++ | cpp | 14,365 | permissive | #include <Common/Exception.h>
#include <Common/PODArray.h>
#include <Common/OptimizedRegularExpression.h>
#define MIN_LENGTH_FOR_STRSTR 3
#define MAX_SUBPATTERNS 5
namespace DB
{
namespace ErrorCodes
{
extern const int CANNOT_COMPILE_REGEXP;
}
}
template <bool thread_safe>
void OptimizedRegular... |
e6daf909f16ce830e6ea9955648469429e6f2ad5 | e9c0d2bfe8c20e6886d2f417d06905d327cf253f | XbitCC/xbitcoin | /src/test/logging_tests.cpp | C++ | cpp | 1,102 | permissive | // Copyright (c) 2019 The XBit Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <logging.h>
#include <logging/timer.h>
#include <test/util/setup_common.h>
#include <chrono>
#include <boost/test/unit_tes... |
749c352b82eb6957cbf409643105ad79e4c34336 | 7c24d10c1370c403c68a67d07f11569638547c41 | bino7/chromium | /net/dns/mdns_client_impl.cc | C++ | cc | 23,623 | permissive | // Copyright 2013 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 "net/dns/mdns_client_impl.h"
#include <algorithm>
#include <queue>
#include <utility>
#include "base/bind.h"
#include "base/location.h"
#includ... |
818781e8e1a17cfd845efb0d2625014f208550ca | a180e07be1e9dad84334e4c6ac781fb25b9dee92 | uvafan/ICPC_Practice | /codeforces/1032/b.cpp | C++ | cpp | 1,514 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef long long ll;
#define repr(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define d(arg) do {cerr << #arg << ": "; cerr << arg; cerr << endl;} while(0)
#define pb push_back
#define INF (int)1e... |
a241494b69c60e53aa164d2a0b8cdbbac99d4e11 | 4193453b9a85cb1848707dea99e9ad5251cfc454 | chensguo8099/practice | /niuke/4.cpp | C++ | cpp | 346 | no_license | /*回文判断*/
#include <stdio.h>
#include <string.h>
int main(){
char str[1005];
int flag = 1;
while(scanf("%s", str) != EOF){
for(int i = 0; i < strlen(str)/2; i++){
if(str[i] == str[strlen(str)-i-1])
continue;
else
flag = 0;
}
if(flag == 0)
printf("No!\n");
else
printf("Yes!\n");
flag = 1... |
234f72bb95166a2a60408e4a1455dc945afee37e | 4acacce148b580796fe7bdf9ca76b4827e5bd07b | MontyTRC89/TOMB5 | /SPEC_PC_N/TIME.CPP | C++ | cpp | 681 | permissive | #include "TIME.H"
#define _X86_
#include <profileapi.h>
#include "STYPES.H"
#include "INCLUDE.H"
double LdSync, LdFreq;
LARGE_INTEGER LdUnk;
void TIME_Reset()// (F)
{
QueryPerformanceCounter(&LdUnk);
}
bool TIME_Init()// (F)
{
Log(LT_Enter, "TIME_Init");
LARGE_INTEGER freq;
if (!QueryPerformanceFrequency(&freq... |
abdd20d8e4ab9a77c34411d158f0bb46e0b795ab | 8c6547613d790d4d76360bd8057f54536df7584e | thejiaman/AchaoCalculator | /cal2.cpp | C++ | cpp | 1,930 | no_license | #include<iostream>
#include<time.h>
#include<stdio.h>
using namespace std;
void cal(int i) {
int num1, num2, num3, a, b, c = 0;
char ope1, ope2;
while (c < i) {
num1 = rand() % 100;
num2 = rand() % 100;
num3 = rand() % 100;
a = 1 + rand() % 3;
b = 1 + rand() % 3;
switch (a) {
case 1:... |
4483de6b1454769bd52aa2978546cc4d7961f19b | ebdbfda7e2bdb732e4c85ccd6a47dc8d01d8b239 | akawashiro/sonnx | /sonnx.cpp | C++ | cpp | 7,720 | no_license | #include <vector>
#include <iomanip>
#include <chrono>
#include <string>
#include <cmath>
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
using namespace std;
class Node{
public:
virtual std::vector<float> calc(const std::vector<float> &x) = 0;
};
class CompressedGemm : Nod... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.