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 |
|---|---|---|---|---|---|---|---|---|
37115e92aef7797b4c7311f147b2492d135d858d | 6fd4c0aa0ac893000408acfc9391d11e42d31d03 | basecoded/leetcode | /practice/phone-number.cc | C++ | cc | 985 | no_license | #include <iostream>
#include <vector>
#include <string>
using namespace std;
const vector<string> keyboard {"", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
void dfs(vector<string>& result, string& tmp, int start, const string& str) {
if (start == str.size()) {
result.push_back(tmp);
return;
... |
cf69efdba5d7c0300c5096edb9710e75d955da81 | 2b31ef0283cf52b80435dd31109b36eabc26fede | ncberberi/SCBW-Bot | /Steamhammer_source/Steamhammer/Source/MicroManager.cpp | C++ | cpp | 5,451 | no_license | #include "MicroManager.h"
#include "MapTools.h"
using namespace UAlbertaBot;
MicroManager::MicroManager()
{
}
void MicroManager::setUnits(const BWAPI::Unitset & u)
{
_units = u;
}
BWAPI::Position MicroManager::calcCenter() const
{
if (_units.empty())
{
if (Config::Debug::DrawSquadInfo)
... |
c9890beed5496d0704095371b72cfb3dbb17fdb2 | 8d94019146a595e52366264be6f30316420d2767 | kaistshadow/bitcoin | /src/random.cpp | C++ | cpp | 26,126 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-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.
#include <random.h>
#include <crypto/sha512.h>
#include <support/cleanse.h>
#ifd... |
d21ec1a1057c892bff9cdd215c9b302085142746 | b04b96cf241fe24352352931b4a61fb4b3a8f49f | Donaldhan/Cprimer-Demo | /concurrent/network/linux/bio/server/TcpSimpleServer.cpp | C++ | cpp | 2,551 | permissive |
/*
* @ClassName: Server
* @Description:
* windows下winsock.h/winsock2.h
linux下sys/socket.h
不同平台头文件不一样
#include <winsock.h> 或者 #include <winsock2.h>
<arpa/inet.h>用<windows.h>代替
* @Author: Ravitn
* @Date: 2021-03-06 18:53
*/
#include <cstdio>
#include <cstring>
#include <cstdlib>
//#include <winsock.h>
#include <sy... |
028860f67d7cd465ede19bb8997d3c2ea3d9130e | 4600820b62ef503e7d08352682985787cea96a85 | IndrekZombieRun/toggldesktop | /src/toggl_api.cc | C++ | cc | 33,535 | permissive | // Copyright 2014 Toggl Desktop developers.
// No exceptions should be thrown from this library.
#include "./../src/toggl_api.h"
#include <fstream>
#include <cstring>
#include <set>
#include "./toggl_api_lua.h"
#include "./client.h"
#include "./const.h"
#include "./context.h"
#include "./custom_error_handler.h"
#in... |
da5744ea27b27bf9d70cef8758363f4f1c29044e | 36f02d08dd5f257e6bc9d05b9f5743e881aa8538 | faishol01/pelatnas-1 | /L11-4.cpp | C++ | cpp | 1,321 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
#define PUB push_back
#define fi first
#define se second
const ll INF = (1LL << 60);
const ll MOD = 1e9+7;
const ll MAXMASK = (1LL << 16)+5;
int N, M;
ll dist[20][20], memo[20][MAXMASK], ans = INF;
void DP(int pos, ll ma... |
42dae61449a24c8d0ec22bece8200ea0943f56e8 | bef327b1c416a8b3a7100470066b25731aa09124 | qqwqqwe/LuaPlusPlus | /src/lparser.hpp | C++ | hpp | 4,321 | no_license | #pragma once
/*
** $Id: lparser.h,v 1.76 2015/12/30 18:16:13 roberto Exp $
** Lua Parser
** See Copyright Notice in lua.h
*/
#include <llimits.hpp>
#include <lobject.hpp>
#include <lzio.hpp>
/*
** Expression and variable descriptor.
** Code generation for variables and expressions can be delayed to allow
** optimizat... |
87817da520f36f725f0bbef97c0c107b6bd8b945 | 3c8cb7f78df64f21fe20868f22482b311a10acc6 | perrozzi/cmg-cmssw | /SimG4Core/Geometry/src/DDDWorld.cc | C++ | cc | 1,096 | no_license | #include "SimG4Core/Geometry/interface/DDDWorld.h"
#include "SimG4Core/Geometry/interface/DDG4Builder.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "G4RunManagerKernel.hh"
#include "G4PVPlacement.hh"
using namespace edm;
DDDWorld... |
8ac267830321602af5a2b010d6db12ccbdd7d71b | 088c13325bcc5f5901da2fc8a4a025622a1e6d6c | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/WiFiEndpoint/UNIX_WiFiEndpoint_VMS.hxx | C++ | hxx | 1,807 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
529cf66d7f25df30792d0cd2825c0a080ae78dea | 0ea1b67a89666884c01b89996993e1ccfb928903 | freezestudio/database_wrapper | /database_wrapper/database/sqlserver/detail/event_connection.cpp | C++ | cpp | 4,673 | no_license |
#include "connection.h"
#include "event_connection.h"
msado::connection_event::connection_event(msado::connection* pevent)
: ref_(0)
, eventp_(pevent)
, dw_event_(0)
, pconnPointer(NULL)
, pconnPointerContainer(NULL)
{
init();
}
msado::connection_event::connection_event(msado::connection_event const& rhs)
: r... |
fef7ca3404dab02516bfa2362874bda542721b84 | 60a49b39fdcc27a84fbcf5faf937bb6b7e53071d | ttyang/sandbox | /sandbox/icl/libs/validate/test/test_sorted_assoc_bitset_back_/test_sorted_assoc_bitset_back.cpp | C++ | cpp | 1,361 | permissive | /*-----------------------------------------------------------------------------+
A Law Based Test Automaton 'LaBatea'
Author: Joachim Faulhaber
Copyright (c) 2007-2009: Joachim Faulhaber
+------------------------------------------------------------------------------+
Distributed under the Boost Software License,... |
36af210e9901c222853b2cea6fe8f33ea92719a7 | 3b10ebbe66645d327e22c984c8ad077a1de029b3 | UniStuttgart-VISUS/implicit-topology | /plugins/mmstd_datatools/src/table/TableJoin.cpp | C++ | cpp | 6,916 | no_license | /*
* TableJoin.cpp
*
* Copyright (C) 2016-2017 by VISUS (University of Stuttgart)
* Alle Rechte vorbehalten.
*/
#include "stdafx.h"
#include "TableJoin.h"
#include <limits>
using namespace megamol::stdplugin::datatools;
using namespace megamol::stdplugin::datatools::table;
using namespace megamol;
std::string ... |
71b18fde2ded03d80d6628b9e7f67bd6640a84cf | 2dec639188887fb613b07826a0fdc685005435d2 | jcrooke/swift | /lib/AST/Module.cpp | C++ | cpp | 57,660 | permissive | //===--- Module.cpp - Swift Language Module Implementation ----------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
9b92dd16df28adc7d87fc98f6aa5baeb08bd7b5a | 3dcb00fd5103f58d9cbf6b709a601368700d9cf7 | userwusir/Qt | /计算器/main.cpp | C++ | cpp | 207 | no_license | #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.setWindowTitle("计算器");
w.show();
return a.exec();
}
|
38b58d206087657781257782317832e29fa7586a | cdd752eba31be088de3e4a404e18594f896134d0 | gejx2010/leetcode | /add_binary/main.cpp | C++ | cpp | 914 | no_license | #include <iostream>
#include <vector>
#include <stack>
#include <queue>
using namespace std;
#define PR(x) cout << #x << ": " << x << endl;
#define PRV(x) cout << #x << ": "; for (auto& it: x) cout << it << ' '; cout << endl;
class Solution {
public:
string addBinary(string a, string b) {
string res;
... |
f244dce705af877cc564eb670f50d07284b93a2a | 9a5c56b1550cf2a4e893bd9e215d958993c02c71 | xypherorion/Framework | /Src/Game/GOMServer.hpp | C++ | hpp | 5,008 | no_license | #pragma once
#include "GOMObjects.hpp"
#include <cstdint>
#include <map>
namespace Game
{
class IGOMServer
{
public:
virtual ~IGOMServer()
{
}
/**
* @brief Will query each GOM Entry to see if it's dirty or not.
*/
virtual void Update() = 0;
/**
* @brief Remove a GOM Entry from the GOM Server.... |
b467b0b113f81158d5b028e0e95d1f1938497b42 | b8f79b926cc538dc32f8dc06e5d3222dbc192c16 | AlisaCodeDragon/UCPP | /main.cpp | C++ | cpp | 2,741 | no_license | #include <fstream>
#include <iostream>
#include <memory>
#include <filesystem>
namespace fs = std::filesystem;
#include <boost/program_options.hpp>
namespace opt = boost::program_options;
#include "preprocessor.h"
constexpr const auto lf = "\n";
std::unique_ptr<std::ofstream> output_file;
std::unique_ptr<std::ifst... |
9ebe4095af7db8be11d3dba47c50d9b9baafae37 | 8073c4a9de4f6bd4cac5ac50b399a6dddb01ff52 | Ti20-ntson/solutions | /PRMRNG.cpp | C++ | cpp | 1,321 | no_license | /*https://bom.to/nxtvde2k1m4l*/
#include<bits/stdc++.h>
using namespace std;
#define task "PRMRNG"
#define write(a) printf("%d\n",a)
#define debug2(a,b) printf("%d %d\n",a,b)
#define debug3(a,b,c) printf("%d %d %d\n",a,b,c)
#define debug4(a,b,c,d) printf("%d %d %d %d\n",a,b,c,d)
typedef pair<int,int> ii;
const... |
a61694f3306eef9d4045e8bf0b5f275d67586e6d | 2908aafc459220638f42cae5eab1afeb03e3fee9 | chenluyao/myLeetcodeSolution | /leetcodes/Construct Binary Tree from Preorder and Inorder Traversal.cpp | C++ | cpp | 1,612 | no_license | /**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode *subBuildTree(vector<int> &preorder,int preStart, int preEnd, vector<int... |
70567294fe9c61f93a99659b421347bcba6925f5 | 2009b2bb41e756be48df2a9dc79a688620452d99 | R4GH4V/Leetcode-Solutions | /Easy/461. Hamming Distance.cpp | C++ | cpp | 596 | no_license | /*
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Given two integers x and y, calculate the Hamming distance.
Note:
0 ≤ x, y < 231.
Example:
Input: x = 1, y = 4
Output: 2
Explanation:
1 (0 0 0 1)
4 (0 1 0 0)
↑ ↑
The above arrows po... |
6a8f30040d201f6624579f9bddd0e1d857f5460d | 4084508f96880f9f8514851cb961453d5d6cb95e | AdventureT/IgzModelConverter | /IgzModelConverterGUI/3rd_party/PreCore/datas/reflector.cpp | C++ | cpp | 10,444 | permissive | /* a source for Reflector class
more info in README for PreCore Project
Copyright 2018-2019 Lukas Cone
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
... |
a0fbe26215deb85534f443905c0f912ba5578421 | 90d525999252e224f80a531c1c5583b736f0a9de | NekoAndLoli/maze-bot | /libraries/DistanceUS/DistanceUS.cpp | C++ | cpp | 408 | no_license | #include "DistanceUS.h"
DistanceUS::DistanceUS(int trigPin, int echoPin) {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
this->trigPin = trigPin;
this->echoPin = echoPin;
}
float DistanceUS::read() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(... |
c0470dca21aad2a5b0fb7de0d469df9058b1a4c4 | d0f176d638d6fa9b3805fba73e4d9b7e29dcb4ef | rovinski/LSOracle | /lib/Galois/lonestar/experimental/aigRewriting/algorithms/PreCompGraphManager.cpp | C++ | cpp | 45,819 | permissive | /*
* This file belongs to the Galois project, a C++ library for exploiting parallelism.
* The code is being released under the terms of the 3-Clause BSD License (a
* copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
492b782c511a98582cefa2712d93bfb6c2d5bd5a | a2681041ef13e3cb3701abd1a83b6e33f73cbd42 | LeiShi1313/leetcode | /leetcode_cpp/153_find_minimum_in_rotated_sorted_array.cpp | C++ | cpp | 1,093 | no_license | //
// Created by Dicky Shi on 6/13/17.
//
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <string>
#include <ctime>
#include "utils.h"
using namespace std;
class Solution {
public:
int findMin(vector<int>& nums) {
int low = 0, high = nums.size()-1;
int mid;
... |
abbf8eae17167f9033ac02bdb50f59e2854e2640 | 17c7072905dedb96982c0d9b49aa1af591a6ec7a | dok-git/tetris | /GameController.cpp | C++ | cpp | 4,983 | no_license | #include "GameController.h"
void GameController::startGame(){
gameData->setNewFigure();
drawFigure();
updateGameData();
}
MoveResult GameController::move(Direction dir)
{
bool needToUpdate = true;
switch (dir)
{
case Direction::RIGHT:
needToUpdate = moveRight();
break;
case Direction::LEFT:
needToUpdate... |
431342af9692491aae999a0866cc70968d4119d3 | 753ef120c9b997bee09f810dcacdfcf5042711e4 | anqurvanillapy/cppl | /type/using_defs.cc | C++ | cc | 493 | permissive | /**
* Using definitions
* =================
*
* Note: Compile with -std=c++17.
*/
#include <iostream>
struct Color {
using ColorType = enum class ColorType : int {
Red,
Green,
Blue,
};
int ColorValue;
};
using X = struct {
int A;
};
int main()
{
Color c;
c.Co... |
d2299ec2539831ba3eac821c3e1c36daeb1a59bc | cad665bf219bbbd6a9ae0d5f61a82661d64dcdfc | picmonkey/skia | /src/core/SkPicturePlayback.cpp | C++ | cpp | 30,344 | permissive | /*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkCanvas.h"
#include "SkPatchUtils.h"
#include "SkPictureData.h"
#include "SkPicturePlayback.h"
#include "SkPictureRecord.h"
#include "SkReadBuffer.h"
#include "SkRS... |
de4dc029de597b6b6408f1a52a2ad36c6c8a9f1d | 0201dbbb5e9d140f2ba2b950e8d332ec83235e06 | njligames/Engine | /src/njli/steering/behavior/SteeringBehaviorPursuit.cpp | C++ | cpp | 6,584 | permissive | //
// SteeringBehaviorPursuit.cpp
// NJLIGameEngine_iOS
//
// Created by James Folk on 5/5/16.
// Copyright © 2016 NJLIGames Ltd. All rights reserved.
//
#pragma mark Implementation
#include "SteeringBehaviorPursuit.h"
#include "JLIFactoryTypes.h"
#include "World.h"
#include "SteeringBehaviorPursuitBuilder.h"
#d... |
b94c00f868ef553de280f743081bc3f1a3738f2f | 3ca9e3b4e9007b0e4c87055edb5374c33870af91 | blitz/vmmu | /test/memory.hpp | C++ | hpp | 4,500 | permissive | #pragma once
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <forward_list>
#include <functional>
#include <map>
#include <tuple>
// An exception that is thrown when the memory class is asked to access memory
// that has no defined value.
struct accessed_uninitialized_memory {
uint64_t address;... |
47f6257bd4d30fe6129aaec53fc0aa255444c09f | 227e219ead75b84968bd6f055a2b85457dbb3ba2 | sivikt/memoria | /include/memoria/core/linked/document/linked_document.hpp | C++ | hpp | 4,678 | permissive |
// Copyright 2019 Victor Smirnov
//
// 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... |
048159a50877552184b5af66a6938a39140a6944 | d21394e7b9945da1444533c424a605a05a587a79 | AHMAD7Y/ProblemSolving | /TopCoder Problems - Div 1 Hard/011_SRM_275_Div1_Hard_SantaClaus.cpp | C++ | cpp | 971 | no_license | #include<iostream>
#include<vector>
using namespace std;
class SantaClaus
{
public:
vector<int> exchange(vector<string> v)
{
prepare(v);
smallestPositiveCircle();
return result;
}
private:
vector<int> result;
vector<string> v;
int edge[50][50],dis[50][50],dis2[50][50],tmp;
void prepare(vector<string> v_... |
451535c06f21c220a728c0445bad5e1e18f9e507 | 3d809002a17d69f4cbfc1b648d85f5bd37345f5b | Calinou/godot | /modules/text_server_fb/thorvg_svg_in_ot.cpp | C++ | cpp | 11,377 | permissive | /**************************************************************************/
/* thorvg_svg_in_ot.cpp */
/**************************************************************************/
/* This file is part of: */
/* ... |
36e5ab1e6d9264da40bd41da2a70b6b4929d308b | 87bfbb9b5c27f945e883dd31699280d9ad7db356 | amyvmiwei/skia | /src/core/SkEdgeClipper.cpp | C++ | cpp | 17,375 | permissive |
/*
* Copyright 2009 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 "SkEdgeClipper.h"
#include "SkGeometry.h"
static bool quick_reject(const SkRect& bounds, const SkRect& clip) {
return bounds.fTop >= clip.f... |
d6b693cdd57516bad5788041deab7a15329c69f0 | 0fb33f632c838ee5e585bc31ed5b4d4786dcde25 | sarisaren/lab | /lab7-q3b.cpp | C++ | cpp | 488 | no_license | /* write a c++ program to print all odd numbers in given range using recursion */
//define library
#include<iostream>
using namespace std;
//declare the recursion
int Odd(int a,int n)
{
if(a%2!=0 and a<=n)
{
cout<<a<<endl;
Odd(a+2,n);
}
else if(a+1<=n)
{
cout<<a+1<<endl;
Odd(a+2,n);
}
}
//give the funct... |
78c5e38a0d5d5a54f835ac5db4071f8aea2a587a | da8d3756a00b2aff78a1304b46f612065aba8628 | jansvoboda11/llvm-project | /llvm/lib/Transforms/Utils/LoopUnroll.cpp | C++ | cpp | 34,329 | permissive | //===-- UnrollLoop.cpp - Loop unrolling utilities -------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
f90489d6b77474c282721541400de76ba4d58f1e | dfef6423c6466d36b6d78bbeba9a16e89127f322 | EmergentOrder/magma | /src/zbulge_applyQ_v2.cpp | C++ | cpp | 20,786 | no_license | /*
* Copyright (c) 2011 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
*
*
* @author Azzam Haidar
* @author Stan Tomov
* @author Raffaele Solca
*
* @precisions normal z -> s d c
*
... |
22b93fb7a710819e4efac3d10d6f5414fb2ff166 | 3ba2a6f19f29bf65a974bfcb95389b0481000d15 | WillowOfTheBorder/boost.simd | /test/constant/simd/nbexponentbits.cpp | C++ | cpp | 1,379 | permissive | //==================================================================================================
/*!
Copyright 2016 NumScale SAS
Copyright 2016 J.T Lapreste
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//======... |
468457e4fd5e95401f2218144487d29e4d7e9231 | 9a38fae9784ba643c08622e4ceefd55f05703936 | tejasbedi1/the-ultimate-ds-algorithms-checklist | /Specific Implementations/Priority Queue Reverse Using Inbuilt.cpp | C++ | cpp | 1,187 | no_license | #include <iostream>
#include <algorithm> // sort
#include <functional> // greater , less
#include <queue> // Obvious
using namespace std;
// Commented out bacuse already defined in functional with namespace std;
/*
template <class T>
struct greater
{
bool operator () (const T &x, const T &y) const
{
return... |
503a9a0ca3b695a0b963bca7183c8641fa3bbd78 | eef61d97c328b64086f4e9f79c2cff4815190e77 | SeraphinaMJ/Reformed | /Source/Engine/TempestEngine/External/EngineMetadataManipulator.cpp | C++ | cpp | 1,751 | no_license | /*!***************************************************************************************
\file EngineMetadataManipulator.cpp
\author Aaron Damyen
\date 1/10/2019
\copyright All content © 2018-2019 DigiPen (USA) Corporation, all rights reserved.
\par Project: Boomerang
\brief The definition of... |
4b8973d3eb98d5b7f80e60a98e837fbd667ddad0 | 5edaab92d5b8ea7985dc063757001b86664ad397 | testcc2c/hvh-cheat | /sdk/math/Vector.hpp | C++ | hpp | 8,656 | permissive | #pragma once
#include <sstream>
constexpr auto RadPi = 3.14159265358979323846;
constexpr auto DegPi = 180.0;
template<typename T>
T ToRadians(T degrees)
{
return (degrees * (static_cast<T>(RadPi) / static_cast<T>(DegPi)));
}
template<typename T>
T ToDegrees(T radians)
{
return (radians * (static_cast<T>(DegPi) / s... |
37fb92e8495f495792a19051a6f9c5a213281086 | 2306a29cf72a482fc6d862be85314976a84fc5d4 | cckung/gitexample | /mainwindow.cpp | C++ | cpp | 1,176 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
ui->lcdNumber->display(15.5);
}
void MainWindow::on_... |
2ea3796e06e24faf5547c05d895784c25ceaf068 | e4d4fb978522ed5540818e59ffe77ee11cbbaa1f | wfchiang/energy-measurement-benchmarks | /fptaylor/jet/5e-03/jet-5e-03-33.cpp | C++ | cpp | 1,219 | no_license | #include <iostream>
using namespace std;
int main (int argc, char **argv) {
double __const_4 = 3.0;
double __const_7 = 1.0;
double __const_9 = 3.0;
double __const_8 = 3.0;
float x2 = -14.5254093822;
double __const_6 = 6.0;
double __const_5 = 4.0;
double x1 = -1.44788393381;
double __const_3 = 2.0;
double __... |
3d4bd7c1b34837ca271aa1acbdb2383cf1fce519 | 709296c350ef34f890e9409545934d95c9eef33b | ganprad/pytorch | /torch/csrc/autograd/python_engine.cpp | C++ | cpp | 13,917 | permissive | #include <torch/csrc/autograd/python_engine.h>
#include <torch/csrc/DynamicTypes.h>
#include <torch/csrc/PtrWrapper.h>
#include <torch/csrc/THP.h>
#include <torch/csrc/autograd/edge.h>
#include <torch/csrc/autograd/engine.h>
#include <torch/csrc/autograd/function.h>
#include <torch/csrc/autograd/python_anomaly_mode.h>... |
de0ffaa279891ca8a72b8c482480cefa82701ce2 | 6dda5f4c41f73d95728641d036857e92a6c49445 | Yashvishnoi/Cpp | /recursionUsingClass.cpp | C++ | cpp | 381 | no_license | #include<iostream>
using namespace std;
class recursion
{
private:
int x;
public:
recursion(int y)
{
x=y;
}
int function(int x)
{
int f;
if(x==1)
return 1;
else
f=x*function(x-1);
return f;
}
};
int main()
{
int a,b;
cout<<"Enter the number"<<endl;
cin>>a;
recursion r(a);
b=r.function(a)... |
50f7add0fb2c6b25b85dac976fa7292a30c7f7ef | d9e267569d0e67c5a7fa5c661e23d64c0232916e | xiaooquanwu/IoTGateway | /source/Zigbee_Serialport_Parser.cpp | C++ | cpp | 5,334 | no_license | /*
* This file defines parser
*/
#include "Zigbee_Serialport_Parser.h"
#include "Zigbee_Serialport_Command.h"
#define SOP_STATE 0x00
#define CMD_STATE1 0x01
#define CMD_STATE2 0x02
#define LEN_STATE 0x03
#define DATA_STATE 0x04
#define FCS_STATE 0x05
#define MT_UART_SOF 0xFE... |
ebf444b5662bdaf5975ad728197b33cc9a53c740 | ee0b0e00a3fb7f613d297b8de48d7dee4b6b0dac | sadashivaks/cricket-core | /src/rpcmasternode-budget.cpp | C++ | cpp | 44,284 | permissive | // Copyright (c) 2014-2015 The Dash Developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2019 The Cricket Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.... |
3507fc1941323e18628187945a752d1164e9b604 | e3d76f58938f912dc03bf58f60212d9eb8e4a292 | sc2ad/BeatSaber-Quest-Codegen | /include/Newtonsoft/Json/Converters/CustomCreationConverter_1.hpp | C++ | hpp | 7,065 | permissive | // Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: Newtonsoft.Json.JsonConverte... |
9986d1aebf7bd4d10cf331896b1150a7a9daf0c1 | 0c66933df651ee4ec53e998e90f7b2c399a33ec9 | sametcem/cpp | /basicOOP/dyncast-62.cpp | C++ | cpp | 1,340 | no_license | // dyncast-62.cpp : This file contains the 'main' function. Program execution begins and ends there.
// The Forced Cast has form
/*
reinterpret_cast<Type>(expression)
It basically means that we do not want to check the legitimity of the conversion at all: neither at compile-time nor at run-time.
*/
#incl... |
608edf04f1f19cfdc9ab0cd4ff9f895489007f8b | 722b0274fd4878e610ec6292d1ba06c8f3154d91 | timblechmann/nt2 | /modules/extern/gsl_specfun/cover/scalar/gsl_sf_shi.cpp | C++ | cpp | 2,635 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
6edfa7dc25f7d73d9044e8af7c15f870434ddff3 | 5d2f6d03ac550f8ed24cc79e7160fba0d71601fb | AWhitehouseDeveloper/HalleyEngine | /halley/src/engine/audio/src/audio_event.cpp | C++ | cpp | 5,422 | permissive | #include "audio_event.h"
#include "audio_engine.h"
#include "audio_clip.h"
#include "halley/resources/resource_data.h"
#include "halley/bytes/byte_serializer.h"
#include "halley/file_formats/config_file.h"
#include "halley/text/string_converter.h"
#include "halley/core/resources/resources.h"
#include "audio_source_clip... |
1302ac91341e4b18669e6b4d37e9eab0b2f0e1d0 | defc26b772ed0266c361b9950a8be943b3e076c0 | tilialabs/qtjambi | /generator/parser/binder.cpp | C++ | cpp | 32,644 | no_license | /****************************************************************************
**
** Copyright (C) 1992-2009 Nokia. All rights reserved.
** Copyright (C) 2002-2005 Roberto Raggi <roberto@kdevelop.org>
**
** This file is part of Qt Jambi.
**
** $BEGIN_LICENSE$
** GNU Lesser General Public License Usage
** This file may b... |
8c6dea1ca5846fa68025267c51cb27b832b83338 | 2a4f60bbe7280a5c2bc25e747864b6c13f132de7 | wowfoot/xarm_ros | /xarm_api/src/xarm/port/socket.cc | C++ | cc | 1,960 | permissive | /* Copyright 2017 UFACTORY Inc. All Rights Reserved.
*
* Software License Agreement (BSD License)
*
* Author: Jimy Zhang <jimy92@163.com>
============================================================================*/
#include "xarm/port/socket.h"
#include <string.h>
#include <sys/socket.h>
#include <uni... |
04296e2579ed6d93519010df2c0d19fd5ccb3f1f | 7af167569bb70303270568cad043ecb493a588b4 | cycleke/CSHomeworkInHIT | /算法与数据结构/lab5/src/eval.cpp | C++ | cpp | 5,866 | permissive | #include <algorithm>
#include <cassert>
#include <chrono>
#include <climits>
#include <iostream>
#include <random>
using namespace std;
const int MAX_ARRAY_SIZE = (int)1e6;
long InsertionSort(int a[], const int n) {
auto start = chrono::high_resolution_clock::now();
for (int i = 1; i < n; ++i) {
int key = a[... |
d98a9134d621eec18cdc7f44a1a3e4e6cc8d9048 | d951d218e366cdf96e90f73fc68de25bfeb9b215 | jjzhang166/WinNT5_src_20201004 | /NT/com/oleutest/cfmex/ctest.hxx | C++ | hxx | 2,501 | no_license |
//+================================================================
//
// File: CTest.hxx
//
// Purpose: Declare the CTest class.
//
// This class is the test engine for the CreateFileMonikerEx
// API (CFMEx) DRTs.
//
//+=================================================... |
26b96f8b5c9270af1f647d86abcdafe23fb9d97c | 61283bc3febd32003aff662f0ced2b0b5be7d8a6 | mak6gulati/IBEO_sdk_check | /IbeoSDK6.0.4/sdk/source/sdk/test/src/pointCloudTests/PointCloudTests.cpp | C++ | cpp | 2,019 | no_license | //==============================================================================
//! \file
//!
//! $$IBEO_LICENSE_BEGIN$$
//! Copyright (c) Ibeo Automotive Systems GmbH 2010-2019
//! All Rights Reserved.
//!
//! For more details, please refer to the accompanying file
//! IbeoLicense.txt.
//! $$IBEO_LICENSE_END$$
//!
//... |
f2f9e62eb41c905f6fd12b8da53a6b85b392b87d | d275b445d2dc67174ccdb4c4d83b6cda6fba5d44 | TanJay/mapbox-gl-native | /bin/render.cpp | C++ | cpp | 4,498 | permissive | #include <mbgl/map/map.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/io.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/gl/headless_backend.hpp>
#include <mbgl/gl/offscreen_view.hpp>
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/storage/default_file_source.hpp>
#include <mbgl/util/url.hpp... |
a13c3135291623f1387986fabd43d6fb684a7793 | f700ad35ad752c0783f9237019a60067cbdeeeec | jb1361/Class-files-repo | /C343 Data Structures/OperatorOverloading/pointerTest/pointerTest/pointerTest.cpp | C++ | cpp | 496 | no_license | // pointerTest.cpp : Defines the entry point for the console application.
//
//Just shows off operator overloading where in this case ofstream>>
//has no definition so it it being created rather than overloaded
#include "stdafx.h"
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream my... |
e7edb39a09a49c75fb85cb483b4dd16860224a58 | 633ae5880a669cf541197b21b39e4fd394dc498e | dangeredwolf/chromium | /content/renderer/render_view_impl.cc | C++ | cc | 71,657 | 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 "content/renderer/render_view_impl.h"
#include <algorithm>
#include <cmath>
#include <memory>
#include <utility>
#include "base/auto_reset.... |
69559c237c684ba78eff2c490af02cea742c6f08 | 5096edd99e4d6a5d05063c7e90e6135d77705a7a | dendisuhubdy/fbthrift | /thrift/compiler/test/fixtures/exceptions/gen-cpp2/RaiserAsyncClient.cpp | C++ | cpp | 28,968 | permissive | /**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "thrift/compiler/test/fixtures/exceptions/gen-cpp2/RaiserAsyncClient.h"
#include <folly/io/IOBuf.h>
#include <folly/io/IOBufQueue.h>
#include <thrift/lib/cpp/TApplicationException.h>
#incl... |
d7e91258a84f4d1ff035fbc0b7fffd0aa6d6c609 | a9078428bc08f57d808d917ed85326ebbd8cce7c | chargen/wafr2016 | /dart/gui/osg/render/WarningShapeNode.hpp | C++ | hpp | 2,374 | permissive | /*
* Copyright (c) 2015-2016, Georgia Tech Research Corporation
* All rights reserved.
*
* Author(s): Michael X. Grey <mxgrey@gatech.edu>
*
* Georgia Tech Graphics Lab and Humanoid Robotics Lab
*
* Directed by Prof. C. Karen Liu and Prof. Mike Stilman
* <karenliu@cc.gatech.edu> <mstilman@cc.gatech.edu>
*
* T... |
08ba577538c0ad57efb72efd1e48fb07dc5e771d | 0ddf553bc214d3aeb42f6360c27e928452f5d775 | gagandeepahuja09/Trees | /LeetCode/RecoverTreeFromInorderTraversal.cpp | C++ | cpp | 932 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* recoverTree(string s, int& i, int l) {
if(i == s.size())
return N... |
996d0cbe16bc5a3861f0094f73b08801f261c5b4 | caeaeebb145d93cf7eb5a353858036fbaf4c7a09 | Chen-Zhihui/SeismicPackage | /CPSeis/spws_home/include/fg2d/fg2d_pick.hh | C++ | hh | 2,963 | permissive | /*<license>
-------------------------------------------------------------------------------
Copyright (c) 2007 ConocoPhillips Company
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 with... |
c5870c3f72907600d5de8ea21f11dabf9f0ac2fb | 09f133bada32d37ea8140bfdb32c521751ed072e | SREERAGI18/chromium | /chrome/browser/notifications/muted_notification_handler_unittest.cc | C++ | cc | 3,901 | permissive | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/notifications/muted_notification_handler.h"
#include <string>
#include "base/callback.h"
#include "base/test/mock_callback.h"
#... |
b4efba00247ee2d37b215e9ef7f1531e59bb99ab | c1fa9c5bedbeb5ffcada2f7a5ad70b7c837f292b | JuanM97/ProgrammingContests | /UVa/Cpp/P991_SafeSalutations.cpp | C++ | cpp | 679 | no_license | /*
* File: P991_SafeSalutations.cpp
* Author: JuanM
*
* Created on March 17, 2013, 9:37 PM
*/
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
//#define max 13
long long int cn[12];
void fc(){
cn[0]=1;cn[1]=1;cn[2]=2;cn[3]=5;cn[4]=14;
... |
a4d06c9d425493ceb5449db8eb854012c12ddf3f | 6e9eff7a6eb10ac2931ac0833c0d4bcd7f22dbdb | wyrover/WorkPlatForm | /PeraStartToolCom/PeraStartToolCom/dllmain.cpp | C++ | cpp | 1,577 | no_license | // dllmain.cpp : DllMain 的实现。
#include "stdafx.h"
#include "resource.h"
#include "PeraStartToolCom_i.h"
#include "dllmain.h"
#include "ToolsProUnity.h"
#include "Tools.h"
#include "CxBCGPVisualManager2007.h"
CStartToolComModule _AtlModule;
class CStartToolComApp : public CWinApp
{
public:
// 重写
virtual BOOL InitIns... |
4bff38ce520e9ae9bb6022fca203bf062dbd10fc | 4023daa8192abdc296845188dd68e8547e3d8810 | ddcc/llvm-project | /clang/test/CodeGenCXX/cxx11-thread-local.cpp | C++ | cpp | 17,261 | permissive | // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX %s
// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -O2 -disable-llvm-passes -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX,LINUX_AIX,CH... |
7be50db310602a2dd5e9c7e723887513be167dc9 | 78d36696a3f23d35f6540c270446f34d7639b7b8 | amir-toly/chromium | /ui/base/x/x11_window.cc | C++ | cc | 58,150 | permissive | // Copyright 2019 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 "ui/base/x/x11_window.h"
#include <algorithm>
#include <vector>
#include "base/location.h"
#include "base/memory/weak_ptr.h"
#include "base/str... |
0c52c5d5cdddf4afb462d267cae3fb43a83a68bd | c3b1843ceee88b1a2328af1ef39a6fde828ff330 | bstrong/libcxxabi | /src/cxa_personality.cpp | C++ | cpp | 55,225 | permissive | //===------------------------- cxa_exception.cpp --------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//
// This file implements the "Exception ... |
1cbf2144d1262027b8602aa1fb9c812d5a5d3d66 | c50a94a1e6cc0fe99b201e7a0137bf1a16fec57d | phoenix-aditya/codes | /others/tower of hanoi by recursion.cpp | C++ | cpp | 465 | no_license | using namespace std;
#include <bits/stdc++.h>
void towerofhanoi(int n, char start, char end, char auxie)
{
if(n==1)
{cout<<"disk 1 moved from "<<start<<" to "<<end<<"\n";
return;
}
else
{
towerofhanoi(n-1, start, auxie, end);
cout<<"disk "<<n<<" moved from "<<start<<" t... |
93d618d05cdfcd6a131e423da6cf88ac057577f3 | e0b4508650c4ae882fa87b2e8306cdbb65825ebf | intandstring/Programming-II-Lab | /Question 22to25/solution.cpp | C++ | cpp | 2,891 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
class Fraction {
private:
int numerator;
int denominator;
public:
Fraction(){
numerator = 0;
denominator = 1;
}
Fraction(int n, int d){
numerator = n;
denominator = d;
}
int getNumerator(){
r... |
a44b2657afbdd3303073eeb2a08716eeafd16f01 | 858a4ff572f8f5a7fa6d73469be33f3a8c7d9884 | YazaiHu/v8 | /src/parsing/pattern-rewriter.cc | C++ | cc | 27,953 | permissive | // Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/ast/ast.h"
#include "src/message-template.h"
#include "src/objects-inl.h"
#include "src/parsing/expression-scope-reparenter.h"
#include "s... |
e351463e33d589e03b65ec4e2d4f966a4a701eb6 | 7d79b180882264d78458b14d2ffe2021557d109d | goldiekapur/gof_design_patterns | /Observer/src/Observer/Event/Event.cpp | C++ | cpp | 671 | permissive | #include "Observer/Event/Event.h"
namespace GoF {
namespace Observer {
namespace Event {
Event::Event(const std::string & state)
: Subject(state)
{ }
Event::~Event()
{ }
void Event::addEventListener(Listener::EventListener * l... |
1e2e882f7c84a7e9973b5980b70c0a9602b436ae | e19ee3aabd7e5271206dafe00b7759c41c1ad9bc | karthikvarmak/esesc | /simu/libcore/FetchEngine.cpp | C++ | cpp | 10,863 | no_license | // Contributed by Jose Renau
// Milos Prvulovic
// Smruti Sarangi
// Luis Ceze
//
// The ESESC/BSD License
//
// Copyright (c) 2005-2013, Regents of the University of California and
// the ESESC Project.
// All rights reserved.
//
// Redistribution and use in source and bina... |
af898b239adee1e7334f44da75d1d22f7bf6a360 | c86358982c73d22b201fe5cb88a5519efca1c864 | Minganna/Shadow_Assignment | /src/Model.cpp | C++ | cpp | 3,513 | no_license | // This project was created with the help of the following tutorial: Computer Graphics with Modern OpenGl and C++
// Link to the Course: https://www.udemy.com/course/graphics-with-modern-opengl/
// The tutorial provided the theory of the topics and then help on implementation of the discussed topic
#include "Model.h"... |
5912877deda07d81810b116a296545962e569941 | 3a5a897ddeaf7014befefcaaa74af6719e03a5b5 | frbyles/ExcavatorSimulator | /PhysX.Net 3.3.1/PhysX.Net/PhysX.Net/Source/User Trigger Report.cpp | C++ | cpp | 1,021 | no_license | #include "StdAfx.h"
#include "User Trigger Report.h"
#include "Scene.h"
#include "Shape.h"
#include <NxUserContactReport.h>
using namespace StillDesign::PhysX;
UserTriggerReport::UserTriggerReport()
{
_internalUserTriggerReport = new InternalUserTriggerReport( this );
}
UserTriggerReport::~UserTriggerReport()
{
... |
93075a72a833162d58932fff3e0a83edf084c332 | 8435c2ffc90b3e4363f75f47964f9c7fbc3da136 | S0mn4mbul1st/CPlusPlus | /Problemsets/1293.Shortest_Path_in_a_Grid_with_Obstacles_Elimination.cpp | C++ | cpp | 2,081 | no_license | /*
*/
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=a; i<b; i++)
#define NFOR(i,a,b) for(int i=(a-1); i>=(b); i--)
#define ll long long int
#define ld long long double
#define f first
#define s second
#define pb push_back
#def... |
969f5cb1cd7632a367799d097fc688ab9fcf1f44 | 424ffaa6d25c1676233417c7033f998f37a878fb | konstulov/CarND-Extended-Kalman-Filter-Project | /src/kalman_filter.cpp | C++ | cpp | 2,103 | permissive | #include "kalman_filter.h"
#include <iostream>
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::cout;
using std::endl;
/*
* Please note that the Eigen library does not initialize
* VectorXd or MatrixXd objects with zeros upon creation.
*/
KalmanFilter::KalmanFilter() {}
KalmanFilter::~KalmanFilter() ... |
15ea93c913bc74c79e87030b42d4e06a3770e36d | e4d86a373b3e8d03d99bb99144078a4e3f0bd911 | kernal88/Elastos5 | /Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/net/SamplingDataTracker.cpp | C++ | cpp | 17,201 | permissive |
#include <Elastos.CoreLibrary.IO.h>
#include <Elastos.CoreLibrary.Utility.h>
#include "elastos/droid/net/SamplingDataTracker.h"
#include "elastos/droid/net/LinkQualityInfo.h"
#include "elastos/droid/net/ReturnOutValue.h"
#include "elastos/droid/os/SystemClock.h"
#include <elastos/core/AutoLock.h>
#include <elastos/cor... |
2035a151c5cc41f8ea4419ada191df5c0857474a | 0e5444f245302f98fca4bdf3c8b50d2c6292e345 | alexandraback/datacollection | /solutions_2692487_0/C++/SAAD/Osmos.cpp | C++ | cpp | 1,274 | no_license | #include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#define _for(i,n) for(int i = 0; i<n; i++)
#define _fora(i,n) for(int i = 1; i<=n; i++)
#define _forlor(i,n) for(int i=n-1; i>=0; i--)
#define max(a,b) a<b?b:a
#define min(a,b) a>b?b:a
using namespace std;
i... |
d8a9c5166b0f3a51ab3c9039d62a9ad8d7571b57 | 677cb78600b4701756ee168c49890a95aa15cab6 | ZeroCoolX/UnrealArena | /Source/UnrealArena/Private/STickerBot.cpp | C++ | cpp | 7,757 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "STickerBot.h"
#include "Components/StaticMeshComponent.h"
#include "Kismet/GameplayStatics.h"
#include "NavigationSystem/Public/NavigationSystem.h"
#include "NavigationSystem/Public/NavigationPath.h"
#include "GameFramework/Charac... |
2a1f764a00259fc7c775e1719ec11e5cc261e899 | 67fd9193cf790d72301feef783da31d98504e701 | microns-ariadne/zwatershed | /zwatershed/zwatershed_util/main_helper.hpp | C++ | hpp | 2,142 | no_license | //#pragma once
#include "agglomeration.hpp"
#include "region_graph.hpp"
#include "basic_watershed.hpp"
#include "limit_functions.hpp"
#include "types.hpp"
#include <memory>
#include <type_traits>
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cstddef>
#include <cstdint>
#include <queue>
#include <... |
2e6408aa6d0eb867db69b6dcd34f310690c13fdd | 4e9872c20a72be571d3a9774325e7fba3946ff3a | vm-t-yui/school | /Others/Tut02_Vertices/Vertices.cpp | C++ | cpp | 8,369 | no_license | //-----------------------------------------------------------------------------
// File: Vertices.cpp
//
// Desc: In this tutorial, we are rendering some vertices. This introduces the
// concept of the vertex buffer, a Direct3D object used to store
// vertices. Vertices can be defined any way we want by de... |
fa5d31d96a589d4a9e02c6e21c9db57c0dff341d | f7bbc844ca6b0cbd25ea88a6fa75e752c2861167 | brickgao/ACM_Workspace | /Segment-Tree/poj3154.cpp | C++ | cpp | 3,229 | no_license | //By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
#define out(v) cerr << #v << ": " << (v) << endl
#define SZ(v) ((int)(v).size())
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
const int ... |
1dd2e56bc80a9ad63889bd665630f1278d77418e | 91b93a12a966b7422c7fe662765c4eb5dbd1ce47 | abutaufique/my_kwiver | /arrows/core/transform.cxx | C++ | cxx | 9,097 | permissive | /*ckwg +29
* Copyright 2014-2016 by Kitware, 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 li... |
13e8fd9bbddf220cf7a858765180d88e59300bd4 | 0406d1c9717c8ab1c36fc49999aea7cb7400483a | vtns/tsduck | /src/libtsduck/plugins/private/tstspProcessorExecutor.cpp | C++ | cpp | 19,521 | permissive | //----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2021, Thierry Lelegard
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the f... |
66899d61a6f016aae03bd128606b3b4e970acc5e | 3a4f581a1b36f5761b7d40f18da3a05b81709ffc | dilongfa/nano-node | /nano/core_test/wallet.cpp | C++ | cpp | 39,628 | permissive | #include <nano/core_test/testutil.hpp>
#include <nano/crypto_lib/random_pool.hpp>
#include <nano/node/lmdb/wallet_value.hpp>
#include <nano/node/testing.hpp>
#include <gtest/gtest.h>
#include <fstream>
using namespace std::chrono_literals;
unsigned constexpr nano::wallet_store::version_current;
TEST (wallet, no_key... |
401cabe4a799cd32856b7dfa52263d25302ea888 | 959f2d7de663dd88c958b3fac38559075f4a00d9 | fithisux/FSL | /src/fdt/rearrange.cc | C++ | cc | 6,270 | no_license | /* Copyright (C) 2010 University of Oxford */
/* Stam Sotiropoulos */
/* Part of FSL - FMRIB's Software Library
http://www.fmrib.ox.ac.uk/fsl
fsl@fmrib.ox.ac.uk
Developed at FMRIB (Oxford Centre for Functional Magnetic Resonance
Imaging of the Brain), Department of Clinical Neurology, Oxfo... |
32e363c4392a8363574c1d5cc3c9882fa5be531b | 0ae550274dabf931b1dc6c5fc37fbb28eb07f836 | 15831944/job_mobile | /lib/lib_mech/src/tool/ServerMonitor/net/protocal/MonitorServer/M2A_MYTHOLOGY_MENU_RQ.hpp | C++ | hpp | 3,739 | no_license |
#ifndef MonitorServer___M2A_MYTHOLOGY_MENU_RQ__
#define MonitorServer___M2A_MYTHOLOGY_MENU_RQ__
#ifndef MonitorServer_jNOTUSE_PACKET_JXDEFINE
jxDECL_MonitorServer(MonitorServer);
jxDECL_MonitorServer(M2A_MYTHOLOGY_MENU_RQ);
#endif //MonitorServer_jNOTUSE_PACKET_JXDEFINE
namespace nMech { namespace nNET { namespace ... |
7cee7576eee7d09f79f5dbe0ecd08e2b4bff0c05 | 3c5f3c26887b0170153ec7a9008f9e9c49e59b65 | sriharikapu/curv | /curv/shapes.cc | C++ | cc | 706 | permissive | // Copyright 2016-2018 Doug Moen
// Licensed under the Apache License, version 2.0
// See accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0
#include "shapes.h"
#include <libcurv/function.h>
#include <sstream>
#include <iostream>
void
print_shape(
const curv::geom::Shape_Program& shape)
{
... |
9ba1658484bbb78537b7bbe23369d264d5392eb5 | f59f2ac3b7d566d65ea783f785668e38a6248058 | motianlun99/leetcode | /solution389.cpp | C++ | cpp | 623 | permissive | /**
* Find the Difference
*
* cpselvis(cpselvis@gmail.com)
* September 13th, 2016
*/
#include<iostream>
#include<unordered_map>
using namespace std;
class Solution {
public:
char findTheDifference(string s, string t) {
unordered_map<int, int> umap;
char ret;
for (auto i : s)
{
umap[i... |
c4d0c92f02095fb627be13e33d7dfc3f98000955 | 1b7e8b012a126425c1c88952c8ae2f0b36386ff9 | MazingR/liveemu | /src/modules/ui/uiscriptfile.hpp | C++ | hpp | 1,511 | no_license | #pragma once
#include <rendering/effect.hpp>
#include <common/serializable.hpp>
#include <common/maths.hpp>
#include <uielement.hpp>
class FeUiFont : public FeSerializable
{
public:
FeUiFont()
{
Size = 32;
Space = 16;
Interval = 1;
LineSpace = 2;
}
#define props(_d) \
_d(FeString, Name) \
_d(FePath, Tr... |
2fd57cca987166de39b4259d52c03f2a6df3e940 | 4d4a06394b34556cf78383a7e1a69e89bfec96e8 | veqcc/atcoder | /atcoder/2019_6_22/f.cpp | C++ | cpp | 2,027 | no_license | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <stack>
#include <set>
#include <map>
typedef long long ll;
using namespace std;
const ll MOD = 1000000007LL;
typedef pair <in... |
1b8b18393b8c666f9d03cf437bc0d1f4ccaa48c9 | fcd79bc670ff4ad842e1a2b7dd7cbe6b3fb5af60 | quinsmpang/thewe | /Classes/CellInfoMenu.cpp | C++ | cpp | 6,754 | no_license | #include "CellInfoMenu.h"
#include "Log.h"
#include "Localization.h"
CellInfoMenu::CellInfoMenu(Cell::WeakPtr cell, CellMenuSelector *selector)
: _cell(cell)
, _cellMenuSelector(selector)
{
init();
}
bool CellInfoMenu::init(void)
{
if (!cocos2d::Layer::init())
{
return false;
}
cocos2d::EventListenerKeyboa... |
e8a5893966e7a5f1d81d70bb831ed23a09874f6a | d596e2c63fcbb460276a46a1b974dc471f51e4d1 | vinzenz/oga | /src/oga/util/string_appender.hpp | C++ | hpp | 1,322 | permissive | //
// Copyright 2014-2016 Vinzenz Feenstra, Red Hat, Inc. and/or its affiliates.
//
// 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
//
// Unl... |
4313de2d79f4092f3bf9f5077691a4874606cbef | c89a027d586f2e32e869a35200d277111c0db45c | cpalmer-atx/cs3358 | /Assignment07/DPQueue.cpp | C++ | cpp | 10,601 | no_license | // FILE: DPQueue.cpp
// IMPLEMENTS: p_queue (see DPQueue.h for documentation.)
//
// INVARIANT for the p_queue class:
// 1. The number of items in the p_queue is stored in the member
// variable used.
// 2. The items themselves are stored in a dynamic array (partially
// filled in general) organize... |
ba30733cb0fa6122bfc01db223ce05ce5e481caf | 7690cdf5bfb26d0ef68ab70f6345cc659ceb3107 | bschran17/SF-TrafficLight-Model_Cpp | /controller/controller.hpp | C++ | hpp | 980 | no_license | #include <string>
#include <string.h>
#include <vector>
class TrafficLight
{
public:
TrafficLight(std::string, std::string, std::string, int, std::string);
std::string getColor();
std::string getCNN();
std::string getStreetName();
std::string getPoint();
int getCycleLength();
void setColor(std::string);
... |
5b552b46490267967546331ff8491aa8575d53c6 | 8b8023723c426ab0119131c6e77a6abb494a2b35 | drawing/jewel | /tests/http/http_static_test.cpp | C++ | cpp | 828 | no_license |
#include "http_static_handler.h"
#include <gtest/gtest.h>
TEST(HTTPStaticHandler, Normal)
{
HTTPStaticHandler router("/test/", "../http/data");
HTTPRequest request;
HTTPResponse response;
request.set_uri("/test/static_1.html");
int code = router.Process(request, response);
EXPECT_EQ(code, 200);
EXPECT_STREQ... |
3583a7628834953eb726184fca5a616dc3343453 | 8477576b3cfbbcd40d85c4cbce2f6ff4899c0708 | NitishBiswas/C_Programming | /C Programming/Test 20/main.cpp | C++ | cpp | 959 | no_license | #include<stdio.h>
main()
{
int a[9],i,sum=0,CSE,EETE,foreign,boys,girls;
printf("*************** DIU Campus(Green Road) *****************");
printf("\n");
for(i=1;i<10;i++)
{
printf(" Number of students in %d floor= ",i);
scanf("%d",&a[i]);
}
printf("\n");
for(i=1;i<10;i+... |
d40da2b171fb8641bafc878be334733cd9afb6d9 | 70d0c591016375ae824745f171cb91b14e3cbefe | shuyangzhang/relion1.4 | /relion-1.4/src/apps/reconstruct.cpp | C++ | cpp | 18,344 | no_license | /***************************************************************************
*
* Author: "Sjors H.W. Scheres"
* MRC Laboratory of Molecular Biology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software F... |
4ee3c7934148728a962cda29340834ae1e3a5bca | 0dd0b3e0d9161576add48291d2b881795f3410e0 | jade-cheng/ohana | /src/nemeco/jade.settings.hpp | C++ | hpp | 7,301 | no_license | /* -------------------------------------------------------------------------
Ohana
Copyright (c) 2015-2020 Jade Cheng (\___/)
Jade Cheng <info@jade-cheng.com> (='.'=)
------------------------------------------------------------------------- */
#ifndef... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.