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 |
|---|---|---|---|---|---|---|---|---|
b31757e97ced4a5e2b81afbdac889a6838536828 | bf2f857564ec02c4322944eeab7e2a2939ea2779 | SRI-IPS/general-tools | /third_party/Catch/include/internal/catch_result_builder.hpp | C++ | hpp | 6,769 | permissive | /*
* Created by Phil on 28/5/2014.
* Copyright 2014 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_RESULT_BUILDER_HPP_INCLUDED
#defin... |
1284eb65dae3dc4f833865cb46ddf08ed1e10512 | e9feab8dae74598628a57933b40933b4830c0a8b | randomwalk10/my_leetcode_solutions | /889_Construct_Binary_Tree_from_Preorder_and_Postorder_Traversal_2nd.cpp | C++ | cpp | 1,310 | no_license | #include <stack>
#include <vector>
#include <unordered_map>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
TreeNode* constructFromPrePost(vector<int>& pre, vector<int>& post) {
std:... |
b326fefa1eb931bc42995a0aa1bbb69a4a0919b3 | 77d0b5686f311b768dfec57b64234f8b607d7f50 | IshanX111/CODEFORCES | /A. Dragons.cpp | C++ | cpp | 890 | no_license | #include<bits/stdc++.h>
typedef long long ll;
using namespace std;
bool compare(const pair<int,int>&i,const pair<int,int>&j){
return i.first<j.first;
}
int main(){
vector<int>v,v1;
vector< pair <int,int> > vect;
int s,t,x,y;
cin>>s>>t;
while(t--){
cin>>x;
... |
9782a5e52b97e265adf1f0788c267de0d76f7db2 | d7fc1446c26ec11443f38b32ddac9b3269153097 | shijiawu/hiphop-php | /hphp/vixl/a64/assembler-a64.cc | C++ | cc | 62,612 | permissive | // Copyright 2013, ARM Limited
// 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 a... |
8942ec2aaedaab89b6837c0dcb663e6f1b4ececa | 76f03ad166a03388344c107c42431d7513801d65 | ilelann/adobe_platform_libraries | /adobe/key_handler_concept.hpp | C++ | hpp | 1,919 | no_license | /*
Copyright 2013 Adobe
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
/*************************************************************************************************/
#ifndef ADOBE_KEY_HANDLER_HPP
#de... |
919f015b1440ec09c655a56e97975e0e446f7031 | a364763a9ac87dc505416209061305aa9bac839f | CS246-CS247-Quadris/jlam732-quadris | /jBlock.cc | C++ | cc | 6,232 | no_license | #include "jBlock.h"
using namespace std;
jBlock::jBlock(gameBoard * pBoard, int pId):Block(pBoard) {
cells.push_back(new Cell(pId,1,0,'J',current_level,true));
cells.push_back(new Cell(pId,2,0,'J',current_level,true));
cells.push_back(new Cell(pId,2,1,'J',current_level,true));
cells.push_back(new Cell(pId,2,2,'J',... |
c0ac1e7c57046322ac72d97fcefa985b8df5d410 | 195cccf5dfc4c92b4a24991a7214263688d6e2ed | Sangil-Lee/RefCode | /kstar/siteApp/IRTV/IRTVApp/src/irtvBMP.cpp | C++ | cpp | 5,158 | no_license | #include <time.h>
#include <stdlib.h>
#include <afxwin.h>
#include <sys/timeb.h>
#include <epicsTime.h>
#include "irtvBMP.h"
IrtvBMP::IrtvBMP ()
{
init ();
}
IrtvBMP::~IrtvBMP ()
{
this->close ();
}
void IrtvBMP::init ()
{
m_width = 0;
m_height = 0;
m_nPageNo = 0;
}
const int... |
80d3adc5bca79d1a926518ff4530e85fa343a725 | 1ddca5fd5605c996276ac12b46d5bafab07f1bf0 | arthurherbout/crypto_code_detection | /data/code-jam/files/635101_rho_598111_0_extracted_rank.cpp | C++ | cpp | 1,075 | no_license | #include<stdio.h>
#define MOD 100003
int main(void)
{
FILE* fin = fopen("rank.in", "r");
FILE* fout = fopen("rank.out", "w");
long vals[501][501];
long c[501][501];
for(int i=0; i<=500; i++)
{
c[i][0]=1;
for(int j=0; j<i; j++)
{
c[i][j+1]=(c[i... |
998debef09b2aca048b96fa3aad20486d5308abb | b900b8343679e5fcd8d0313ac061361d8a6ba15a | besimbicer89/SoT-SDK | /SDK/SOT_wld_bush_cluster_01_i_classes.hpp | C++ | hpp | 1,241 | no_license | #pragma once
// SeaOfThieves (1.6.4) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass wld_bush_cluster_0... |
0437a769c0af646d8ea6c8e79aaca2ec75c41b4c | ef63921db2a44cbaec2c07c0209fb55a0282eae8 | liuyujing89/orchid-fst | /src/main/common/common/util/string_util.cpp | C++ | cpp | 3,240 | permissive | /*********************************************************************************
*Copyright(C),dingbinthu@163.com
*All rights reserved.
*
*FileName: string_util.cpp
*Author: dingbinthu@163.com
*Version: 1.0
*Date: 4/27/21
*Description:
***********************************... |
2ed23e4a088f5bb1e2dcf6d0e72cb83ef109302d | 6ec67c019973687c50f05ec48a7a5cf7f13cc6ad | Dimash1905/d_cs-1905 | /task 119.cpp | C++ | cpp | 251 | no_license | #include<iostream>
using namespace std;
int main() {
for (int i = 1000; i <= 9999; i++) {
int a = i % 10;
int b = i / 10 % 10;
int c = i / 10 / 10 % 10;
int d = i / 10 / 10 / 10 % 10;
if (a + b + c + d == 15) {
cout << i << " ";
}
}
} |
ff40f565ed18e3514cf1e31a91969d0218a14186 | 3b10ab3349cc6942d9cc8d89eb08153380256b2f | bootingman/fuchsia2 | /zircon/kernel/dev/pdev/uart/uart.cpp | C++ | cpp | 1,522 | permissive | // Copyright 2017 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <pdev/uart.h>
#include <arch/arch_ops.h>
#include <err.h>
static int default_getc(bool wait) {
return ZX_ERR_NOT_SU... |
32481e87cdd3f35ee366d75c9357785ffd02237c | e8b7c51968ac8f195c4e7121002145663c6d6806 | IgorKrol/cppTask4 | /Demo.cpp | C++ | cpp | 1,235 | no_license | /**
* A demo program for bull-pgia.
*
* @author Erel Segal-Halevi
* @since 2019-04
*/
#include <iostream>
using namespace std;
#include "play.hpp"
#include "DummyChoosers.hpp"
#include "DummyGuessers.hpp"
#include "SmartGuesser.hpp"
using namespace bullpgia;
int main() {
ConstantChooser c1... |
3c313a986582b3be7f8439d9461e764dc1901c39 | ff6bfaaa13eb2f6c18f6031ed41a6464b21a32a7 | wymdrose/HTTP3 | /TCPHTTP/tcpserver.cpp | C++ | cpp | 1,559 | no_license | #include "tcpserver.h"
#include <QSettings>
#include <QDir>
#include <qDebug>
TcpServer::TcpServer(QWidget *parent, Qt::WindowFlags f)
: QDialog(parent, f)
{
setWindowTitle(tr("TCP Server"));
ContentListWidget = new QListWidget;
PortLabel = new QLabel(tr("PORT:"));
PortLineEdit = new QLineEdit;
CreateBtn = new... |
2cc50745878ad00ddaf996a500e88059bc0bcfb4 | 2409a939a0a0e5c269cbd542cfe195d9afeaa83b | Team20610N/2018-2019 | /src/initialize.cpp | C++ | cpp | 2,516 | permissive | #include "main.h"
/*
Runs initialization code. This occurs as soon as the program is started.
All other competition modes are blocked by initialize; it is recommended
to keep execution time for this mode under a few seconds.
*/
// Toggle button for parking in auton
void on_center_button() {
if (IsParking ==... |
7278f65dbd0da628fde64198086cc8716ddcf083 | de806082a9effa1c2cc7710d8a725aef12d08711 | x-kollo/Codewars | /C++/rgb_to_hex_conversion.cpp | C++ | cpp | 580 | no_license | //www.codewars.com/kata/513e08acc600c94f01000001/cpp
#include <iostream>
#include <sstream>
#include <iomanip>
class RGBToHex
{
private:
static std::string ith(int x)
{
if(x > 255) x = 255;
if(x < 0) x = 0;
std::stringstream s;
s << std::showbase << std::uppercase... |
3a70d6ef9a4040412fad60374f037174c2b6c08f | a60114018bbc11c7dd9cb430d88c80beebf0f1cd | litao1009/SimpleRoom | /externals/OCCTLib/inc/StepAP214_HArray1OfPersonAndOrganizationItem.hxx | C++ | hxx | 3,246 | 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 _StepAP214_HArray1OfPersonAndOrganizationIt... |
532e3a22f9b0c7c973e056de8f5a729af314085c | a8e90fc6fed441c89dbdc92b49dfdebeb3b4167a | pzins/tensorflow-profiler | /interception-libraries/src/hsa_queue_profiling.cpp | C++ | cpp | 4,030 | no_license | #include "hsa_queue_profiling.h"
hsa_status_t aql_callback(const hsa_aql_trace_t *aql_trace, void *user_arg)
{
switch (aql_trace->type) {
case HSA_PACKET_TYPE_VENDOR_SPECIFIC:
tracepoint(interceptionTracer, aql_packet_submitted, "queue_profiling", aql_trace->packet_id,
"vendor_s... |
b301f6d0ad623f2f9798e82e9470e06fc2e2ca17 | 54d743dd2c8f525d8f6cbbcae1f54e6233c57c0d | whiteToBlack123/GRE-of-CS | /第二章/2.6.cpp | C++ | cpp | 499 | no_license | #include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
#define OFFSET 500000
int Hash[1000001] = { 0 };
int main()
{
int n, m;
while(scanf("%d%d", &n, &m))
{
for(int i = 0; i < n; i++)
{
int x;
scanf("%d", x);
Hash[x+OFF... |
ea46b0b6ac71734475df5857bef91417b2243b02 | cdcdcb2df9b1de854370e87a8a50a3a002d7b962 | sundsx/RevBayes | /src/revlanguage/datatypes/evolution/trees/RlBranchLengthTree.cpp | C++ | cpp | 4,093 | no_license | /**
* @file
* This file contains the implementation of RlBoolean, which is
* a RevBayes wrapper around a regular bool.
*
* @brief Implementation of RlBoolean
*
* (c) Copyright 2009-
* @date Last modified: $Date: 2012-09-04 20:14:58 +0200 (Tue, 04 Sep 2012) $
* @author The RevBayes Development Core Team
* @lic... |
93a63e16a648aede6a7e62f38579e191ad93cfa4 | 550f7c0902d41eb75cc02f603d30baf60c54c2f1 | Rahulkumar878/dsa-code | /deletion_linkedlist.cpp | C++ | cpp | 1,225 | no_license | #include <iostream>
using namespace std;
class node
{
public:
int data;
node *next;
node(int x)
{
data = x;
next = NULL;
}
};
void creation(node *&head, int data)
{
node *newnode = new node(data);
if (head == NULL)
{
head = newnode;
retu... |
2e04bc7173c149e5ab800d79f7a3290193b2a690 | 13ede669b6be9747886bcd48afb381af1e795a55 | johnny6464/UVA | /UVA10000-10999/UVA10449.cpp | C++ | cpp | 1,967 | no_license | #include<iostream>
#include<set>
#include<vector>
using namespace std;
#define INF 100000000
#define pow(x) ((x)*(x)*(x))
struct Node {
int distance = INF;
int busyness = 0;
bool negativeCycle = false;
set<pair<int, int>> neighbor;
};
void dfsNC(vector<Node>& city, int now) {
city[now].negativeCycle = true;
fo... |
898e5e7da658ff7c761839d56b47d9320368c338 | bc767629609ec02be2d295a46f0cd73c0a078435 | mabrow05/ParallelAnalyzer-1 | /systematics/WirechamberEfficiency/determineWirechamberThresh.cpp | C++ | cpp | 3,249 | no_license | #include <TChain.h>
#include <TH1D.h>
#include <TFile.h>
#include <TTree.h>
#include <TMath.h>
#include <vector>
#include <iostream>
int main() {
/*East trigg = 25.7736 +/- 0.0356907
East no trigg = 0.0427383 +/- 0.00702683
East efficiency = 0.998345 +/- 0.000271735
West trigg = 25.2393 +/- 0.0353165
... |
0b191344330eb42ad46b3c7a3bd62b1004b3bd4a | 4be62ac670008ed855006a0ab1e68c9270811e9e | HarisonP/OOP-exams-and-homeworks | /homework1/hw_zad2_tina_nakova_71550.cpp | C++ | cpp | 7,960 | no_license | #include <iostream>
#include <cassert>
#include <cstring>
using namespace std;
struct Date
{
int day,
month,
year;
Date()
{
day = 0;
month = 0;
year = 0;
}
Date(int day, int month, int year)
{
this->day = day;
this->month = month;
this->year = year;
}
Date(const Date& other)
{
day = other.... |
dffbedb22c786420d7310cda5819c997a8234107 | ad72c4b86efc18fb62b174b8ae6f36e1b51893b5 | bamit-dev/bamit | /src/qt/qtipcserver.cpp | C++ | cpp | 4,929 | permissive | // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/version.hpp>
#if defined(WIN32) && BOOST_VERSION == 104900
#define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTT... |
10dc303ad45323bf7b5ba5ca3c322cbbaae997cf | 87737d9dd0caeb4a34fe408f83d21fd17fcf04d0 | last-resort-gaming/LRG-Mission-Files | /LRG-YAINA/clientAceTfar.Altis/Functions/YAINA/CfgFunctions.hpp | C++ | hpp | 484 | no_license | #include "Missions\CfgFunctions.hpp"
#include "Vehicles\CfgFunctions.hpp"
#include "General\CfgFunctions.hpp"
#include "Spawns\CfgFunctions.hpp"
#include "AirDefence\CfgFunctions.hpp"
#include "Arsenal\CfgFunctions.hpp"
#include "Tablet\CfgFunctions.hpp"
#include "Commands\CfgFunctions.hpp"
#include "Metrics\CfgFunctio... |
1e0a8299588e17b4d79f26098ad512b0bb8ee127 | 0359d24fffefc5b9425dce32273a91ade0ac3d25 | mcanthony/DISTRHO-Ports | /ports/pitchedDelay/source/gui/DelayGraph.cpp | C++ | cpp | 11,075 | no_license | /*
==============================================================================
This is an automatically generated file created by the Jucer!
Creation date: 26 Aug 2012 12:42:01am
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections wil... |
a31542eebcdc9bfe34de3fa8f2ae976d3f7e04e9 | ecff395d70abb9e63c149aee29cd985c27440272 | Muttley/retroremakes-framework | /modules/bah.mod/boost.mod/src/libs/thread/src/pthread/thread.cpp | C++ | cpp | 19,258 | no_license | // Copyright (C) 2001-2003
// William E. Kempf
// Copyright (C) 2007-8 Anthony Williams
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/thread/detail/config.hpp>
#include <boost/thread/thread... |
accd6691ee821f770c50044ee55a06da7b7e76b0 | b28b4c3477807f99dbbaba8e1b311a915d03ebd3 | bokunimowakaru/xbeeCoord | /xbee_arduino/LiquidCrystalDFR/LiquidCrystalDFR.cpp | C++ | cpp | 10,216 | permissive | /*********************************************************************
DF ROBOT LCD Keypad Shield 用 液晶&キーパッドドライバ
Arduino 標準ライブラリにLiquidCrystalにDF ROBOT社Keypad用関数を
追加しました。
関連 http://www.geocities.jp/bokunimowakaru/diy/arduino/lcds.html
本ソースリストおよびソフトウェアはGPL V2に基づくライセンスを有します。
利用、編集、再配布等が自由に行えますが、著作権表示の改変は禁止します。
... |
04007d2a43bd8ecb223eb926ed2ea11d6c714956 | e56ed58425cbe14a41c80b3d242f7f0618f5784f | iyangsj/chromium | /chrome/browser/chromeos/arc/arc_util.cc | C++ | cc | 23,090 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/arc/arc_util.h"
#include <linux/magic.h>
#include <sys/statfs.h>
#include <map>
#include <set>
#include <string>
#inclu... |
2b076aa7f955a6382eb9b21e2f0aac0baeef62b6 | 236b94923531ac5bd453b04e284a06c8d933caef | villevoutilainen/bde | /groups/bal/balst/balst_stacktraceresolverimpl_xcoff.cpp | C++ | cpp | 80,532 | permissive | // balst_stacktraceresolverimpl_xcoff.cpp -*-C++-*-
// ----------------------------------------------------------------------------
// NOTICE
//
// This component is not up to date with current BDE coding standards, and
// should not be used as an example f... |
f0f97f347c24014239d89a4ed940dfb42716bfba | 6bca9f664549bafc479f02b8e8b1699f0ce81a70 | long-gong/switch-simulator-qps-r | /example/scheduler_example.cc | C++ | cc | 879 | no_license | // Examples for schedulers
#include <iostream>
#include <nlohmann/json.hpp>
#include <chrono> // for std::chrono::system_clock::now()
#include <sstream>
#include <scheduler/scheduler_factory.h>
#include "example_macros.h"
using namespace std;
using namespace saber;
using json = nlohmann::json;
EXAMPLE_BEGIN;
EXA... |
0a30d17a9edf7101e8bdd864efe2daf434a022b8 | 9d466eda69146f2e58341aeb3c582f095179f331 | zysps1/lena-plus | /model/epc-mme.cc | C++ | cc | 10,015 | no_license | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
* Copyright (c) 2015, University of Padova, Dep. of Information Engineering, SIGNET lab.
*
* This program is free software; you can redistribute it and/or modify
... |
ab89c8307549fce9ee7b4e38f16b3648e24e6d18 | 5182653add7b94ef606f66f1d7b517826ac7c37e | basert/hl2sdk | /game/server/client.cpp | C++ | cpp | 44,522 | no_license | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
/*
===== client.cpp ========================================================
client/server game specific s... |
aa5c5f752773192ce254618534506f2870a01fff | d58024ee7af6b729e93646c4a6f94898d3150544 | Lawrencemm/LM-Engine | /lmgl/src/vulkan/buffer/vulkan_buffer.cpp | C++ | cpp | 865 | permissive | #include <buffer.h>
#include <lmlib/variant_visitor.h>
#include "../vulkan_renderer.h"
#include "vulkan_buffer.h"
namespace lmgl
{
buffer vulkan_renderer::create_buffer(const buffer_init &init)
{
return std::make_unique<vulkan_buffer>(init, this);
}
vulkan_buffer::vulkan_buffer(
const buffer_init &init,
vul... |
3bb5356118c7a05b18ba4a3f74049e86c65f5b9c | 3f2c63305d8f3e2163ebd2e7649f62dcbcd498ff | YevhenHordiichuk-itstep/ITStep_Lesson_5 | /homework_5_06.cpp | C++ | cpp | 487 | no_license | //homework_5_06 "Evklid distance"
#include <cmath>
#include <cstdio>
struct tPoint {
float x, y, z;
};
float Evklid (tPoint A, tPoint B) {
return sqrt((A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y) + (A.z - B.z) * (A.z - B.z));
}
int main(int argc, char** argv) {
tPoint A, B;
printf("point1 "... |
01b00a49882ad2d97a86bbf47147c29dee766175 | cc4b2edc5ff0e29824831ce647db34bc09582343 | jridgewell/amphtml | /validator/cpp/htmlparser/bin/atomgen.cc | C++ | cc | 8,978 | permissive | // To regenerate atom.h file, run:
// bazel build htmlparser/bin:atomgen
// bazel-bin/htmlparser/bin/atomgen
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#incl... |
7145a0ac21053b8f3a2977951ee6f283b90449d0 | 584f44121bb1a2381d70efdd22d2783a7f46e598 | widVE/FionaOgre | /SDK/include/sbm/SteerSuiteEnginerDriver.cpp | C++ | cpp | 4,372 | no_license | //
// Copyright (c) 2009-2010 Shawn Singh, Mubbasir Kapadia, Petros Faloutsos, Glenn Reinman
// See license.txt for complete license.
//
/// @file SteerSuiteEngineDriver.cpp
/// @brief Implements the SteerSuiteEngineDriver functionality.
///
/// @todo
/// - update documentation in this file
///
#include "... |
f63f33840a9d80346aaeebd07c931784db9276be | 1cf606668788180a86e658fba824d95ac58be008 | chromium/chromium | /chrome/browser/ash/borealis/borealis_disk_manager_impl.cc | C++ | cc | 30,852 | permissive | // Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/borealis/borealis_disk_manager_impl.h"
#include <string>
#include "ash/constants/ash_features.h"
#include "base/functional/bind.h"
#include "base... |
82649f5190284a707893c385e0398770f5366128 | 05be9decb181acb38c471f78858751fe8ac3ad1d | mariuszwitek/Resume_Portfolio | /physics_decoder/SRawEventDict.cxx | C++ | cxx | 124,753 | no_license | //
// File generated by rootcint at Wed Feb 24 14:33:18 2016
// Do NOT change. Changes will be lost next time file is generated
//
#define R__DICTIONARY_FILENAME SRawEventDict
#include "RConfig.h" //rootcint 4834
#if !defined(R__ACCESS_IN_SYMBOL)
//Break the privacy of classes -- Disabled for the moment
#define priva... |
1483df59898d794a8caeb1057ecfba570b10eed0 | a622f7203ba5f5805360d7e669ecef98f66a0faf | boostorg/hana | /include/boost/hana/suffix.hpp | C++ | hpp | 1,597 | permissive | /*!
@file
Defines `boost::hana::suffix`.
Copyright Louis Dionne 2013-2022
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_SUFFIX_HPP
#define BOOST_HANA_SUFFIX_HPP
#include <boost/hana/fwd/suffix.hpp>
#in... |
cab0b7f0d958b7f9d0fb29e67eab802a81a1f5e0 | df7470595ef75dc018592363ea7760b98665bf71 | tkim949/interview-practice | /EDUCATIVE/DP/longest_common/main.cpp | C++ | cpp | 4,087 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
class LCSubstring {
public:
int findLCSLength(const string &s1, const string &s2) {
vector<vector<int>> dp(s1.length() +1, vector<int>(s2.length() +1, 0));
int maxLength = 0;
for(int i =1; i <= s1.length(); i++) ... |
45bb608b3ca68a49cbe1918ebd4c961efe79e8b7 | f30ff50ee524623b6bd073f0d055ab30eb73805a | DevMaster2013/Factorio-Clone | /Factorio Clone/ResourceDictionary.cpp | C++ | cpp | 1,951 | no_license | #include "stdafx.h"
#include "ResourceDictionary.h"
ResourceDictionary::ResourceDictionary()
{
}
ResourceDictionary::~ResourceDictionary()
{
}
void ResourceDictionary::initialize()
{
// Load the resources
std::vector<ResourceID> resources;
std::ifstream inFile("media/ResourcesDictionary.dat", std::ios_base::binar... |
e6b2aac809c5faf47838e9f19e616ed83fa4583f | b97812feb35c09140ca54974dba900a8a5e90c6f | AKarunakaran/CodeForces | /GB19/Dtest.cpp | C++ | cpp | 1,630 | no_license | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define REP(i,n) for(int i=0;i<(n);++i)
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define FORD(i,a,b) for(int i=(a);i>=(b);--i)
inline bool EQ(double a, double b) { return fabs(a-b) < 1e-9; ... |
bd0a13eaed60cb529a8bd0611d69ba90ac04e093 | 799ff5ab1ef8a3889d120d99a0a9c93de4ffdaa7 | whuhenry/leetcode_solution | /70-climbing-stairs.cpp | C++ | cpp | 477 | no_license | class Solution {
public:
int climbStairs(int n) {
if (0 == n) {
return 0;
} else if (1 == n) {
return 1;
}
int *a = new int[n];
for (int i = 0; i < n; ++i) {
a[i] = 0;
}
a[0] = 1;
a[1] = 2;
for (int i = 2; ... |
08e6557cb1eb3b8bf9c64e52f9ca2c77cd0dcfca | 8aafc8c3879602e0362a4613ba152082c2a0b473 | wzj1695224/BinClone | /lshkit/trunk/3rd-party/boost/boost/mpl/contains.hpp | C++ | hpp | 1,092 | permissive |
#ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED
#define BOOST_MPL_CONTAINS_HPP_INCLUDED
// Copyright Eric Friedman 2002
// Copyright Aleksey Gurtovoy 2004
//
// 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)
//
// See ... |
abcf142886342a07d1daa2e85d47db1b282c23aa | db68fa2d9e9f7bdc8b0c011858a9dce040752749 | harajune/m5stack-avatar | /src/Eye.cpp | C++ | cpp | 1,882 | permissive | // Copyright (c) Shinya Ishikawa. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full
// license information.
#include "Eye.h"
namespace m5avatar {
Eye::Eye(uint16_t x, uint16_t y, uint16_t r, bool isLeft) : Eye(r, isLeft) {}
Eye::Eye(uint16_t r, bool isLeft) : r{r}... |
d78dd2fe59ccebe20cd10eb3b51f89de2d501cde | 2287a1577d490be8ca681a36c9c9b496a77a5df7 | TeamVault/tauCFI | /C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-14822.cpp | C++ | cpp | 3,113 | no_license | struct c0;
void __attribute__ ((noinline)) tester0(c0* p);
struct c0
{
bool active0;
c0() : active0(true) {}
virtual ~c0()
{
tester0(this);
active0 = false;
}
virtual void f0(){}
};
void __attribute__ ((noinline)) tester0(c0* p)
{
p->f0();
}
struct c1;
void __attribute__ ((noinline)) tester1(c1* p);
struct c1 : virtual... |
af221fa21a820d02f366eec0f5968b0602bb38af | 0b807d37bee353735e70746731c86b57dbf0e739 | begeekmyfriend/yasea | /library/src/main/cpp/libyuv/source/compare_msa.cc | C++ | cc | 2,972 | permissive | /*
* Copyright 2017 The LibYuv Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing p... |
b8d57e9b704d7a0be3226ca9b79a73c474aa3398 | 661d6e364c3387d7261986d1261a92d41cd442cc | Tsaanstu/new_project_2 | /Game/project/include/item.hpp | C++ | hpp | 1,677 | no_license | #ifndef NEW_STRATEGY_1_PROJECT_INCLUDE_ITEM_HPP
#define NEW_STRATEGY_1_PROJECT_INCLUDE_ITEM_HPP
#include "object.hpp"
#include "misting.hpp"
#include "mistborn.hpp"
#include "soldier.hpp"
#include "metal.hpp"
#include "button.hpp"
#include "store_definitions.hpp"
#include "definitions.hpp"
class Item {
private:
... |
0d903ef9b584ef4916b2b01937302a9187712885 | c458df206574b61fb69601bf7a9537dbc83fb565 | thatgamesguy/ai_experiments-evolution | /Part 2/src/SceneGame.cpp | C++ | cpp | 2,639 | permissive | #include "SceneGame.hpp"
SceneGame::SceneGame(WorkingDirectory& workingDir, ResourceAllocator<sf::Texture>& textureAllocator, Window& window) : workingDir(workingDir), textureAllocator(textureAllocator), mapParser(textureAllocator), window(window) { }
void SceneGame::OnCreate()
{
const unsigned int numOfUFOsToSpa... |
63cd1ee69aca994e06898cc6ec8abd4a2f400754 | b0e26a32287f973741cf59e2d6e07df0a5cc5195 | Nozbe/zacs | /examples/native/ios/Pods/boost-for-react-native/boost/date_time/dst_transition_generators.hpp | C++ | hpp | 2,350 | permissive | /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Jeff Garland, Bart Garst
*/
#ifndef DATE_TIME_DATE_DST_TRANSIT... |
10aff68d7cb1546a240532bc230079763b1dfc44 | ff134a19713384efa9c0629643a8c449ddd6c01d | TheXPerienceProject/android_external_skia | /src/core/SkBitmap.cpp | C++ | cpp | 19,883 | permissive | /*
* Copyright 2008 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/core/SkBitmap.h"
#include "include/core/SkData.h"
#include "include/core/SkMallocPixelRef.h"
#include "include/core/SkMath.h"
#include "... |
dabf32f4b087499089e86665eaa04c6c54d85248 | 7ab3a2892432b28a43a925fcbee24b024f4a675e | boostorg/math | /test/cardinal_quintic_b_spline_test.cpp | C++ | cpp | 9,411 | permissive | /*
* Copyright Nick Thompson, 2019
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include "math_unit_test.hpp"
#include <cstdint>
#include <numeric>
#include <utility>
#inc... |
d81433dc60e1384d6a72bc6e8448c0dfbf5c3df4 | c1bdaf364e7811d6750245387b49b24bf48f5fe0 | guerarda/rt1w | /include/rt1w/rng.hpp | C++ | hpp | 343 | permissive | #include "rt1w/sptr.hpp"
constexpr float OneMinusEpsilon_f32 = 0.99999994f;
constexpr double OneMinusEpsilon_f64 = 0.99999999999999989;
struct RNG : Object {
static uptr<RNG> create();
virtual uint32_t u32() = 0;
virtual float f32() = 0;
virtual uint32_t u32(uint32_t bound) = 0;
virtual float f3... |
8fa3b6df1329595ac39a5c96fba0fdbdc826e3a4 | a19a0a7154cd88fa78981900dfa6bcfab25a2f8b | uel-dataexchange/Opencascade_uel | /inc/Handle_StepElement_HSequenceOfCurveElementSectionDefinition.hxx | C++ | hxx | 929 | 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 _Handle_StepElement_HSequenceOfCurveEl... |
f3ab8c930549b703cfd89d67227c5a2d11e1460e | e6a76159259977a39a79f8eb88874c295152dd26 | stjordanis/libcxxwrap-julia | /include/jlcxx/smart_pointers.hpp | C++ | hpp | 6,499 | permissive | #ifndef JLCXX_SMART_POINTER_HPP
#define JLCXX_SMART_POINTER_HPP
#include "module.hpp"
#include "type_conversion.hpp"
namespace jlcxx
{
struct NoSmartOther {};
struct NoSmartBase {};
template<typename T> struct IsSmartPointerType<std::shared_ptr<T>> : std::true_type { };
template<typename T> struct IsSmartPointerT... |
2f453f17a6332ee6f5568731d4621cf9c7b0ffe2 | ea711877be28bc58535188798f7795a4da0d29b6 | tarotene/procon-archive | /atcoder.jp/abc160/abc160_c/Main.cpp | C++ | cpp | 741 | no_license | #include <bits/stdc++.h>
using namespace std;
void solve(long long K, long long N, std::vector<long long> A)
{
vector<long long> B(N, 0);
for (int i = 0; i < N - 1; i++)
{
B[i] = A[i + 1] - A[i];
}
B[N - 1] = K + A[0] - A[N - 1];
sort(B.begin(), B.end());
cout << K - B[N - 1] << en... |
bb0bb297dd7e08039cea6004f2159102878c7751 | fc6ec4f744934de2c82c4bd019928fe5d8226a80 | Linzertorte/Hackerrank | /Search/Flowers.cpp | C++ | cpp | 364 | no_license |
#include<iostream>
#include<stdio.h>
#include<algorithm>
#define REP(n) for(int i=0;i<n;i++)
using namespace std;
int N,K;
int c[100];
int main()
{
scanf("%d%d",&N,&K);
REP(N) scanf("%d",c+i);
sort(c,c+N);
int k=1,cnt=0;
long long cost=0;
for(int i=N-1;i>=0;i--)
{
cnt+=1;
cost+=k*c[i];
if(cnt==K) k++,cnt=... |
1f0c8af5eda9fd3b7983563a534dc73d48ff03f7 | bb36bd7263a33b1bbd672d2f301a7954e9dfd4f9 | edzer/gdal | /alg/gdalpansharpen.cpp | C++ | cpp | 68,284 | permissive | /******************************************************************************
*
* Project: GDAL Pansharpening module
* Purpose: Implementation of pansharpening.
* Author: Even Rouault <even.rouault at spatialys.com>
*
******************************************************************************
* Copyrigh... |
cdf387dfc56d1aa32cdeb8a8f77d8fc86c4f387f | 3c89a6102510b1bbb05dbed2b13b40360422f459 | CozmaVictor/Stacks | /ackermanstacking.cpp | C++ | cpp | 1,529 | no_license | #include<iostream>
using namespace std;
class stack
{
public:
stack() {top = 0;}
int push(int value)
{
if (top+1<=maxsize) {
top++;
S[top]=value;
return 1;}
return 0;}
int pop(int *old);
int whathight()... |
a09a3977d443e93f86c8cf5e396f928efc359a6f | fd9ae57a10503f26d4e4f1d2a44ca4593b5fef4f | MatthewBorja/2019_Fall_CSC-CIS_17a | /Proj/Project_2_V3/Deck.cpp | C++ | cpp | 2,131 | no_license | /*
* File: Deck.h
* Author: Matthew Borja
* Created on December 3, 2019, 1:25 PM
* Purpose: The implementation for the Deck class. Inspired by in-class lecture.
*/
#include "Deck.h"
#include <cstdlib>
#include <ctime>
#include <iostream>
using namespace std;
Deck::Deck(char num){
//Set the random number s... |
61ed4c083bd2656cfb31bf71647cb31b513acbcf | e47f14df234f4e7a9dc2b655faf094661c52a68a | i9or/cpp-crash-course | /src/chapter2/types.cpp | C++ | cpp | 3,300 | no_license | #include <cstdio>
struct Book {
char name[256];
int year;
int pages;
bool hardcover;
};
union Variant {
char string[10];
int integer;
double floating_point;
};
struct ClockOfTheLongNow {
void add_year() {
year++;
}
bool set_year(int new_year) {
if (new_year < ... |
06a0ae4900bddffd9c4703533c455f63d11f077f | 52bba4b8a518acc0a303c2268558f9f7a9a5d643 | fros1y/antimony | /app/src/render/render_image.cpp | C++ | cpp | 3,530 | permissive | #include <Python.h>
#include <QCoreApplication>
#include "render/render_image.h"
#include "ui/viewport/depth_image.h"
#include "fab/types/shape.h"
#include "fab/util/region.h"
#include "fab/tree/render.h"
#include "fab/formats/png.h"
RenderImage::RenderImage(Bounds b, QVector3D pos, float scale)
: QObject(), bo... |
fe38b308b96838f378e949c6b7e02b21e75e506b | 9eca88787f107f3532b9ea59337b5ad95a5ee5b9 | HazardyKnusperkeks/fol | /forward.hpp | C++ | hpp | 840 | no_license | /**
* @file
* @brief Contains forward declarations for all classes.
*/
#ifndef FOL_FORWARD_HPP
#define FOL_FORWARD_HPP
namespace fol {
template<char... String>
class Name;
class RtName;
template<char c, char... Name>
struct Variable;
struct RtVariable;
template<typename Name, typename... A... |
c51bd853804b8492834285b56833e736123766cb | 8a441ce404b95ee29da66b77c1e7235d10ddfcbb | clementval/fc | /lib/transforms/LoopStructuresToStdLowering.cpp | C++ | cpp | 8,592 | permissive | // Copyright (c) 2019, Compiler Tree Technologies Pvt Ltd.
// 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
... |
1b9974871a0a37eab87a8b003b720cdc35f3442f | da1c8b675b70431de5ce3c82cbe88dd9064bd051 | github188/dbdky_cac | /test/echo/main.cpp | C++ | cpp | 287 | no_license | #include "echo.h"
#include <utils/Logging.h>
#include <port/EventLoop.h>
int main()
{
LOG_INFO << "pid = " << getpid();
dbdky::port::EventLoop loop;
dbdky::port::InetAddress listenAddr(2007);
EchoServer server(&loop, listenAddr);
server.start();
loop.loop();
}
|
039c2a81329de808689319537b85d9dc460df767 | 55db83fe853703a567bec2f1e806c672418e20e0 | varunnagpaal/mlpack | /src/mlpack/methods/mean_shift/mean_shift.hpp | C++ | hpp | 5,620 | permissive | /**
* @file mean_shift.hpp
* @author Shangtong Zhang
*
* Mean Shift clustering
*/
#ifndef __MLPACK_METHODS_MEAN_SHIFT_MEAN_SHIFT_HPP
#define __MLPACK_METHODS_MEAN_SHIFT_MEAN_SHIFT_HPP
#include <mlpack/core.hpp>
#include <mlpack/core/kernels/gaussian_kernel.hpp>
#include <mlpack/core/kernels/kernel_traits.hpp>
#i... |
029ac68d9e1ef5f55cb7e7fb278af114e09f5318 | 8e60b4c7331cb68209f509d1426c5da3e282f80f | akuCL/QT | /mySemaphores/main.cpp | C++ | cpp | 1,355 | no_license | #include <QtCore>
#include <stdio.h>
#include <stdlib.h>
#include <QDebug>
const int DataSize = 10;
const int BufferSize = 5;
char buffer[BufferSize];
QSemaphore freeBytes(BufferSize);
QSemaphore usedBytes;
// 生产者线程类
class Producer : public QThread
{
public:
void run();
};
void Producer::run()
{
qsrand(QTim... |
da0348fa471636f2eda57eda39d50d6c88a43fde | cf07aaf126f98272389cd4108e51ed48fab74d4d | ifbowen/spine-cocos2dx | /spine-cocos2dx/MBSpineFramework/cocos2d-x-3.17.2/tests/cpp-empty-test/Classes/AppDelegate.cpp | C++ | cpp | 6,305 | permissive | /****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... |
b6f801190ef81936fa91ebeda8b30e3c59d46ef1 | 23bb1751df4fb19db79cf6f5f4280a1ee2648bd2 | ashishsingh14/placement | /coding2/codechefcookoff/main.cpp | C++ | cpp | 1,402 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <limits.h>
#include <assert.h>
#include <math.h>
using namespace std;
void xornumber()
{
int t;
cin>>t;
long long int n;
cin>>t;
while(t--)... |
6d2a689f2cee7e777fb485d66e11cca268bc2c33 | a6a7eba95e5750bd4c57764024dbfa26bd832b0a | capeanalytics/aws-sdk-cpp | /aws-cpp-sdk-mturk-requester/source/model/CreateHITTypeResult.cpp | C++ | cpp | 1,354 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
6ef70ad8e3d40848b108499984a922b294667218 | 1cce8b73eb7bd455e9e8880a7249354cc22122b4 | mohcicin/metaheuristics | /meta-heuristics-1.2/lib/edaDAGEdge.cpp | C++ | cpp | 444 | no_license | #include "edaDAGEdge.h"
#include "edaDAGVertex.h"
edaDAGEdge::edaDAGEdge(int _key, edaDAGVertex *_fromVertex, edaDAGVertex *_toVertex) :
fromVertex (_fromVertex),
toVertex (_toVertex),
edgeKey (_key)
{
}
edaDAGEdge::~edaDAGEdge()
{
}
int edaDAGEdge::getKey() const
{
return edgeKey;
}
edaDAGVertex* edaDAGEdg... |
14e567b2d89129a59987183704e0700e425ce33f | 7fb9b8aac028f700d4d1e2879c4eeca0bb01b32c | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE590_Free_Memory_Not_on_Heap/s02/CWE590_Free_Memory_Not_on_Heap__delete_char_static_54d.cpp | C++ | cpp | 1,240 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE590_Free_Memory_Not_on_Heap__delete_char_static_54d.cpp
Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete.nonpointer.label.xml
Template File: sources-sink-54d.tmpl.cpp
*/
/*
* @description
* CWE: 590 Free Memory Not on Heap
* BadSource: static Data... |
a704e3c23f1100ee5cbb5fbbd72e888610ee839b | 581c2b1609fcfc64088a88a71cff4e66c71d3544 | NoahRoseLedesma/LovePotion | /source/modules/timer.cpp | C++ | cpp | 1,778 | permissive | #include "common/runtime.h"
#include "modules/timer.h"
#include <time.h>
//Deltatime
int prevTime = 0;
int currTime = 0;
float dt = 0;
//Frames per second
float frames = 0;
float fps = 0;
u64 lastCountTime = 0;
//Löve2D Functions
//love.timer.getFPS
int Timer::GetFPS(lua_State * L)
{
lua_pushnumber(L, round(fp... |
3f9fed0bd5a1125f51fe26b0e843ec2fe48302a7 | caaa49575e0c23dd7bb38ba92ec6130326e53613 | cfinck67/FOOT | /libs/src/TAIRbase/TAIRparTools.hxx | C++ | hxx | 1,129 | no_license | #ifndef _TAIRparTools_HXX
#define _TAIRparTools_HXX
/*!
\file
\brief Declaration of TAIRparTools.
\author Ch. Finck
*/
/*------------------------------------------+---------------------------------*/
#include "Riostream.h"
#include "TObject.h"
#include "TString.h"
#include "TVector3.h"
#include "TAGpara.hx... |
a9f9c6d1ee396383c545c2e18030c5661997419d | dd1e855d37f5841761237b40e3fbf54e9fb18268 | miladHakimi/custom-op | /tensorflow_zero_out/cc/kernels/custom_quantizer.cc | C++ | cc | 1,254 | permissive | #include "tensorflow/core/framework/op_kernel.h"
#include <string.h>
#include <cmath>
using namespace tensorflow;
class CustomQuantizerOp : public OpKernel {
public:
int bit_width;
explicit CustomQuantizerOp(OpKernelConstruction* context) : OpKernel(context) {
context->GetAttr("bit_width", &bit_wid... |
893e5ac2a28375b70495639d050020cc3538fb87 | 0a4480a96ac2adac442d24f117a6b254dfab06d8 | rock-core/tools-orocosrb | /test/data/echo/tasks/EchoSubmodel.hpp | C++ | hpp | 3,015 | no_license | /* Generated from orogen/lib/orogen/templates/tasks/Task.hpp */
#ifndef ECHO_ECHOSUBMODEL_TASK_HPP
#define ECHO_ECHOSUBMODEL_TASK_HPP
#include "echo/EchoSubmodelBase.hpp"
namespace echo {
class EchoSubmodel : public EchoSubmodelBase
{
friend class EchoSubmodelBase;
protected:
public:
Echo... |
6a8c8deea5e94f6dc63534fd205a891f44d3451c | 91d46bfb59fcb2ca52e3b2613805e210a908cac8 | massich/findmkl_openmeeg | /apps/gain.cpp | C++ | cpp | 10,347 | no_license | /*
Project Name : OpenMEEG
© INRIA and ENPC (contributors: Geoffray ADDE, Maureen CLERC, Alexandre
GRAMFORT, Renaud KERIVEN, Jan KYBIC, Perrine LANDREAU, Théodore PAPADOPOULO,
Emmanuel OLIVI
Maureen.Clerc.AT.inria.fr, keriven.AT.certis.enpc.fr,
kybic.AT.fel.cvut.cz, papadop.AT.inria.fr)
The OpenMEEG software is a C++... |
4924e817c8dee72359bc141cac7266c98099cf90 | 661f4c0aa6a4c0e820eb0a3afe167c54b50085f6 | elysionlab/client | /Filerun_candle_vgrid_원본/Webhard/src_client/up_client/up_client.cpp | C++ | cpp | 1,023 | no_license | #include "stdafx.h"
#include "up_client.h"
#include "use_window.h"
BEGIN_MESSAGE_MAP(up_client, CWinApp)
END_MESSAGE_MAP()
up_client::up_client()
{
}
up_client theApp;
BOOL up_client::InitInstance()
{
WNDCLASS wndClass;
::GetClassInfo(AfxGetInstanceHandle(), "#32770", &wndClass);
wndClass.lpszClassName ... |
c1b58f45f8cd1a060c4ed04d234ce00265d76dc3 | 250b1d2be36efe89aa06742c9f9c67b9925bfa57 | milram/ogre-1.7.4-osx | /Samples/Water/src/Water.cpp | C++ | cpp | 18,499 | permissive | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2011 Torus Knot Software Ltd
Also see acknowledgements in Readme.html
You may use this sa... |
52e5cc71d24bfaf61c89257794a84dc7f04b2b8f | 68ad3a46ddfe06d7302769d89329af54aa5bfc8d | paradise-fi/divine | /test/libcxx/containers/db_splice_pos_list_iter.pass.cpp | C++ | cpp | 989 | no_license | /* TAGS: c++ fin */
/* CC_OPTS: -std=c++2a */
/* VERIFY_OPTS: -o nofail:malloc */
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-Lice... |
6d8d659b78833985a5391f36a135b5e0225fc678 | 1d3bfa20147344cfe50df09b078a01a89f19f108 | waltzrobotics/mrpt | /libs/opengl/src/CGridPlaneXZ.cpp | C++ | cpp | 3,415 | permissive | /* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| |
| Cop... |
943270a1f751838564edd244eb1125e15cf63e5f | fb9ff37834bfbd98384f178f76eeb0e565ef504a | cajoshi/ProjectEuler | /Special Pythagorean triplet.cpp | C++ | cpp | 1,417 | no_license | #include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#inclu... |
ad5c64f8df67434489e3c7804c2196d94da090a7 | 4292162363081cc9b07f46d9935e4181f2d03970 | hackerhgl/flutter-ci-testing | /windows/win32_window.cc | C++ | cc | 4,903 | no_license | // Copyright 2013 The Flutter 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 "win32_window.h"
#include "resource.h"
#include "shellscalingapi.h"
namespace {
// the Windows DPI system is based on this
// constant for mach... |
c6432e6220e81147973824671285616cf972c696 | 78b1b4116a78be78fddadd05d53435100ea53267 | Yatin-Singla/pgraph-tascel | /tests/test_stl_container_performance.cpp | C++ | cpp | 7,693 | permissive | #include "config.h"
#include <sys/time.h>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iterator>
#include <list>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include <boost/unordered_set.hpp>
#if HAVE_CXX_UNORDERED_SET
#include <unordered_set>
u... |
bdd2629263198e2991856346bc664f6cd34373a5 | 1b49d983c791e8d3b55fe785aea49a2bccd19398 | otcshare/chromium-src | /chrome/chrome_cleaner/ipc/mojo_sandbox_hooks.cc | C++ | cc | 2,994 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/chrome_cleaner/ipc/mojo_sandbox_hooks.h"
#include <string>
#include <utility>
#include "base/check.h"
#include "base/rand_util.h"
#incl... |
a7eed23ac99669bdd484e08c458677954f304af4 | e25f290667dca3966b4918259452e071a0dd8cd1 | jhertz/gb-rta-bruteforce-1 | /libgambatte/src/sdl/gambatte_sdl.cpp | C++ | cpp | 22,541 | no_license | /***************************************************************************
* Copyright (C) 2007 by Sindre Aam�s *
* sinamas@users.sourceforge.net *
* *
* This pr... |
f13bdef64ba3f10c57d7039ba96261e186c50378 | 7047797b0d83483558879ca86d9bdaf99239b30a | omergolan/opencv-samples | /dnn/train/fileio.hpp | C++ | hpp | 681 | no_license | #ifndef __FILEIO_HPP__
#define __FILEIO_HPP__
#include <iostream>
#include <fstream>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/core/persistence.hpp>
#include <opencv2/dnn.hpp>
using namespace std;
void loadImages(string listFileName, string rootPath,
vector<cv::M... |
d26c78985e2a8a33face0bd26a4b8c5c14cd5945 | 3ce3f30a683015ac7a560aafb409283c3981baa0 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14433/function14433_schedule_6/function14433_schedule_6_wrapper.cpp | C++ | cpp | 921 | no_license | #include "Halide.h"
#include "function14433_schedule_6_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){
Halide::Buffer<int32_t> buf00(524288);
Halide::Buffer<int32_t> buf0(524288, ... |
2e6fd7f472e99329d47f3ae0953d157eb10ebb8a | 72894345ebdff2b471194326576781e344c2ea62 | jsugino/ahiru2021b | /Machine.cpp | C++ | cpp | 7,038 | no_license | //
// Machine.cpp
//
// Copyright © 2021 Ahiruchan Koubou. All rights reserved.
//
#include "Machine.hpp"
#include "Logger.hpp"
Machine::Machine() {
log("Machine constructor");
leftMotor = new ev3api::Motor(PORT_C);
rightMotor = new ev3api::Motor(PORT_B);
tailMotor = new AngleMotor(PORT_D);
... |
dca397bd16219fe33c6484da5e2eecd4b33faf3a | b0b069bff4ba4f09b9a11a32cdbebefa7100bec5 | OS2World/LIB-Cubus_OS2_Class_Library | /Samples/NextHand/Source/NextHand.cpp | C++ | cpp | 11,252 | permissive | // Nexthand.cpp
// Next like Toolbar
// $Header: W:/Projects/OCL/Samples/NextHand/Source/rcs/NextHand.cpp 1.50 1996/08/11 23:48:43 B.STEIN Release $
#define __OCL_RESOLVE_TEMPLATES__
#include "..\Source\NextHand.hpp"
#ifdef __EMX__
template class OList<OIcon>;
template class OList<NextBarEvent>;
#endif
pNextH... |
c12793603dc7a020069b02ed37a08dee7f163419 | 8d39868516915ddfbae5fbf29b0bcad7bba830dc | antdvid/folding | /folding_helper.cpp | C++ | cpp | 6,452 | no_license | #include <FronTier.h>
#include "spring_solver.h"
#include <unordered_map>
#include "../iFluid/ifluid_state.h"
#include "folding.h"
//helper functions to convert FronTier data structures
//to spring mesh
static void unsortIntfc(INTERFACE*);
static void unsortSurface(SURFACE*);
static void unsortCurve(CURVE*);
static v... |
099f8bfdc280a6cb84da2d7ebb7f6ab3c572fc4b | e727a3817666c27b147522113425a3b5550d0861 | Ayush007-pro/swift | /lib/Sema/CSBindings.cpp | C++ | cpp | 71,193 | permissive | //===--- CSBindings.cpp - Constraint Solver -------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
4f2994b2603e059898dd2c1f5b997e1c4087f67d | a2fce0ac20f959fd4565c2d777f94f82db4df486 | levelp/cpp | /04/02_inherit_Shapes/main.cpp | C++ | cpp | 604 | no_license | #include <iostream>
using namespace std;
struct Shape {
char name[100]; // У всех фигур есть имя
int color; // Цвет фигуры
void method() {
cout << "method" << endl;
}
};
class Point : public Shape {
public:
double x, y;
};
class Circle : public Shape {
public:
Point center; // Центр
double radiu... |
f9f4f881bb4eb050fb87ed9e96c82db14c4b1b35 | 5e4c7eb4aa13c60f07b52b8d11eff01743e941b8 | ComeOnSweetCandy/Iridescent-Game-Engine | /Source/core/particle/IEparticle.cpp | C++ | cpp | 432 | no_license | #define __IE_DLL_EXPORTS__
#include "IEparticle.h"
IE_BEGIN
IEParticle::IEParticle()
{
}
IEParticle::~IEParticle()
{
}
void IEParticle::Initialization(char * textureName)
{
IESprite::Initialization(textureName);
}
IEParticle * IEParticle::Create(char * textureName)
{
IEParticle * particle = new IEParticle();
... |
7c797f6d2c261300b208503e3aed5638b3067285 | 8b1039d5590cc79c9c46550fe93377ed96f9cd70 | HolyBlackCat/tau_plus_plus | /src/window.cpp | C++ | cpp | 7,621 | permissive | #include "window.h"
#include "program.h"
#include <utility>
static constexpr char window_data_name_this_ptr[] = "*";
static SDL_Window *active_window = 0;
void Window::OnMove(Window &&/*from*/, Window &to) noexcept
{
SDL_SetWindowData(*to.window, window_data_name_this_ptr, (void *)&to);
}
SDL_Window *Window::... |
5c2d6bd6627aba4a8bc3fdda6d99fb9576c91cc4 | 215c2f1123cd6748194c1f3905340eda26cb22d6 | xtracko/nnxo | /net/functions.hpp | C++ | hpp | 830 | no_license | #pragma once
#include "math.hpp"
#include <cmath>
#include <algorithm>
struct Fast_sigmoid {
static Scalar root(const Scalar x)
{
return x / (1 + std::abs(x));
}
static Scalar derivative(const Scalar x)
{
const Scalar tmp = 1 + std::abs(x);
return Scalar(1) / (tmp * tmp);
... |
02f4edf18a3d8fccd0d213b92d0bdbefc4e99144 | 5e8e78c3f778d9d201a364c902fe67896203c47f | dabao085/GraphAlgorithm | /main.cpp | C++ | cpp | 687 | no_license | #include "graphAlgorithm.h"
#include <iostream>
using namespace std;
int main()
{
CGraph graph;
graph.CreateGraph("inputDijkstra.txt");
cout << "----------Print Graph Reuslt ----------------" << endl;
graph.PrintGraph();
cout << "----------Print Indegree Result--------------" << endl;
graph.PrintIndegree();
/... |
259bc305303fe5285e32a972ea8b8916dc36735c | 76723de5b5ebe3b6678f371761358441ea64fe16 | Chringo/SSP | /SSPSolution/SSP_Editor/SSP_Editor.cpp | C++ | cpp | 5,028 | permissive | #include "SSP_Editor.h"
SSP_Editor::SSP_Editor(QWidget *parent)
: QMainWindow(parent)
{
m_ui.setupUi(this);
/*making a fileSystemModel to enable a file viewer in the treeView widget*/
this->m_model = new QFileSystemModel(this);
this->m_model->setRootPath("C:/");
this->m_model->setFilter(QDir::NoDotAndDotDot | QD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.