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 |
|---|---|---|---|---|---|---|---|---|
169328510d15a58f27b1fb10d74ad4fb904c4b57 | 87a0e9ca1e8b1630e8e852226883c42f6dae7dac | lizuoyue/LeetCode | /17-letterCombinationsOfAPhoneNumber.cpp | C++ | cpp | 858 | no_license | class Solution {
public:
vector<string> table, result;
void work(string &digits, int idx, string &str) {
if (idx == digits.length()) {
result.push_back(str);
return;
}
string can = table[digits[idx] - '2'];
for (int i = 0; i < can.length(); ++i) {
str.push_back(can[i]);
work(digits, idx + 1, str... |
fb5e0923325e5e75ca1b1a26a44c5e8026110c1c | bda5def13992058b62991481dfb078af42d227c3 | trago-project/tragocoin | /src/wallet/rpcdump.cpp | C++ | cpp | 25,050 | permissive | // Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2017-2018 The Proton Core developers
// Copyright (c) 2018 The tragocoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensourc... |
1bbd04c1bafc4d0db4c8fe1bb90428d19ebac332 | 11a37aeb33bb8b1e21d44b20047cc7b222ed0c40 | black-sat/black | /tests/units/solver.cpp | C++ | cpp | 6,955 | permissive | //
// BLACK - Bounded Ltl sAtisfiability ChecKer
//
// (C) 2019 Luca Geatti
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
... |
c1750a5f3814bd478b286411bce977cbdce82e98 | 4049febc8ddafd51557282e373bf50ba392700c4 | pu2oqa/muServerDeps | /_Include/boost/accumulators/statistics/covariance.hpp | C++ | hpp | 7,588 | no_license | ///////////////////////////////////////////////////////////////////////////////
// covariance.hpp
//
// Copyright 2006 Daniel Egloff, Olivier Gygi. 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 ... |
dc7094c87004d91a8030a3f0cf933316d60dc7bf | 57e4cf5582f142ca6598ec533c6933b8c3da4bd4 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/MP+dmb.sy+addr-ctrl-[ws-rf]-ctrlisb.c.cbmc_out.cpp | C++ | cpp | 55,277 | no_license | // 0:vars:4
// 4:atom_1_X0_1:1
// 5:atom_1_X7_2:1
// 6:atom_1_X8_0:1
// 7:thr0:1
// 8:thr1:1
// 9:thr2:1
#define ADDRSIZE 10
#define NPROC 4
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( c... |
c49643cb2577b5e5156d5985cd3836c5ca21b007 | 8e4f47d83bf43a825a0ff71dad6a33bd9b7ff7e5 | Eric-NLU/sling | /sling/nlp/parser/parser-state.cc | C++ | cc | 11,126 | permissive | // Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
01ee76be584c4f7459d549f3eeb240b840a6e5d9 | bca47a53962539e42c339f82f67145379d11815f | liyoung1992/mediasoup-sfu-cpp | /deps/boost/include/boost/safe_numerics/checked_default.hpp | C++ | hpp | 7,351 | permissive | #ifndef BOOST_NUMERIC_CHECKED_DEFAULT_HPP
#define BOOST_NUMERIC_CHECKED_DEFAULT_HPP
// Copyright (c) 2017 Robert Ramey
//
// 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)
// contains operation implemen... |
5d75226d98f2e5b984be321274a4458ce8982c54 | 0273253ffeb5c5f451ef9b745686db4671327c15 | lecious/coronavision | /src/qt/signverifymessagedialog.cpp | C++ | cpp | 8,997 | permissive | // Copyright (c) 2011-2013 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 "signverifymessagedialog.h"
#include "ui_signverifymessagedialog.h"
#include "addressbookpage.h"
#include "base58.h"... |
fbd5c153693585a92361e1d41c9c80e94ea8e6f0 | e330095cafcf8e91e601e081fe78b26e8507907b | RoboJackets-Software-Training/week-1-programming-exercise-rvessell | /exercise_1_2/exercise_1_2_2.cpp | C++ | cpp | 664 | no_license | #include <iostream>
int main()
{
// Part 2: Palindrome Check
// Input string from command-line
std::string str;
std::cout << "Enter String:" << std::endl;
std::cin >> str;
// Palindrome Check
// WRITE YOUR PALINDROME CHECK HERE
int left = 0;
int right = str.length() - 1;
boo... |
6ee7cac82b8ce601411dda9f46bf52c656698aae | 73a0d56bd8d738c06caa6585eaecd9f8f9d5e4b1 | Alfret/AlfLibCpp | /include/alflib/alflib.hpp | C++ | hpp | 2,097 | permissive | // MIT License
//
// Copyright (c) 2019 Filip Björklund
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, mod... |
58b883b59fa6bb5bc5c7da21e230a7fc40e74c26 | 867284509dcf4aee946854ea8d9c2b4cfa1fbcc4 | khart1ine/AIPathing | /Source/ShipAITest/Graph/GraphAlgorithms.cpp | C++ | cpp | 10,323 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "GraphAlgorithms.h"
#include "Engine.h"
#include "../DataStructure/PriorityQueue.h"
#include "AStarHeuristicPolicies.h"
bool Graph_SearchDFS::Search()
{
//create a std stack of edges
TArray<const NavGraphEdge*> Stack;
//create... |
061a24455d300d0c3f3f99f7cf0898cacf2fd0cb | 7ba096790eb791ff39e2429fed308a456fa86a46 | codegoalie/networkedOgre | /TutorialApplication.cpp | C++ | cpp | 3,951 | no_license | /*
-----------------------------------------------------------------------------
Filename: TutorialApplication.cpp
-----------------------------------------------------------------------------
This source file is part of the
___ __ __ _ _ _
/___\__ _ _ __ ___ / / /\ \ (_) | _(_)
// //... |
5fdad10670b359a7318c9bf07838dc768821d573 | ac537b30185dc46333070dcb2bd244e47dd83d5b | tangxulab/QitVenture-6 | /HPLC-MS/tmp/moc_loginwindow.cpp | C++ | cpp | 3,391 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'loginwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.3)
**
** WARNING! All changes made in this file will be lost!
********************************************************... |
8bbe2c6527d421cf719bfba177283f2a3149bbbc | b9c17ac70a177d943ea517c98b023e69dbc7afc4 | NEITGNART/EXCERSISE3 | /LCS/Source.cpp | C++ | cpp | 604 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef long long ll;
const int INF = 0x3f3f3f3f;
#define PB push_back
#define F first
#define S second
#define MP make_pair
#define REP(i, a, b) for (int i = a; i <= b; ++i)
int F[1000][1000];
int main(void) {
... |
e0bc9dc0562876b302478e5b87ab5a8c405fa53a | 9573c3ef6dcf22ae200b4ea8c2ced40f08915469 | digideskio/thrill | /thrill/data/file.cpp | C++ | cpp | 7,111 | permissive | /*******************************************************************************
* thrill/data/file.cpp
*
* Part of Project Thrill - http://project-thrill.org
*
* Copyright (C) 2015-2016 Timo Bingmann <tb@panthema.net>
*
* All rights reserved. Published under the BSD-2 license in the LICENSE file.
*************... |
39070a5f4629641458ed82bd0d59febfa5ddd921 | 3b7943ce4bc1afab8c8e3f10b2c31aeef0da1055 | Updownquark/DISEnumerations | /src/main/cpp/disenum/Weapons.cpp | C++ | cpp | 2,502 | permissive | #include <sstream>
#include <cstddef>
#include <disenum/Weapons.h>
namespace DIS {
hashMap<int,Weapons*> Weapons::enumerations;
Weapons Weapons::GUN_ELEVATION_DRIVE(2000, "gun elevation drive");
Weapons Weapons::GUN_STABILIZATION_SYSTEM(2010, "gun stabilization system");
Weapons Weapons::GUNNERS_PRIMARY_SIGHT_GPS(2... |
8e8739757e52e0a876afeb9e9ad495ba79ee193d | 3f5daf1724633e20ca6d2eb88626ddbb8ed5d899 | gitvipin/LeetSol | /src/btree/BSTIterator.cpp | C++ | cpp | 1,388 | no_license |
/*
Solution for : https://leetcode.com/problems/binary-search-tree-iterator/
TODO : Using std::list was a temporary solution as proof of concept. Replace it with Stack and see if it makes it in top 5 %ile
in terms of runtime. Currently it is too bad.
*/
class BSTIterator {
public:
list<TreeNode*> pRoots;
... |
dffd981203a5557a170cf290c24ca404a487b3ae | a9885f7a755a0611f635b40df50861bb3b7881ef | Kehczar/scum_sdk | /SCUM_Sexy_Jeans_Shorts_03_classes.hpp | C++ | hpp | 826 | no_license | #pragma once
// Scum 3.79.22573 (UE 4.24)
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace Classes
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass Sexy_Jeans_Sh... |
a2ebdbd86122588824845ddc3548d9aa87b8a1cf | ed2f5e24f827a803c52146bcbb57c6ed1bc906df | KqSMea8/v8-1 | /src/objects-debug.cc | C++ | cc | 88,654 | permissive | // Copyright 2012 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/objects.h"
#include "src/assembler-inl.h"
#include "src/bootstrapper.h"
#include "src/counters.h"
#include "src/date.h"
#include "src/dis... |
e7cfbf195005cfe3b198928842cca314e0d90bab | 0af102c60220037b48954c7c0577ab22f922b56e | szte-wsn/szte-wsn | /support/cpp/TestShimmer_MultiMote/src/SDCard/Win32BlockDevice.cpp | C++ | cpp | 3,575 | no_license | /** Copyright (c) 2010, University of Szeged
* 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 condition... |
5cd0405a53741f7fa1d74f65306f24874360c891 | 37534d5d4c7905583b4e1f481954934f455ee30a | janciesko/Heat-Sim-Parallel-2Dblocked | /src/smp/solver_ompss.cpp | C++ | cpp | 2,659 | no_license | #include <algorithm>
#include <iostream>
#include "common/heat.hpp"
inline double solveBlock(block_t *matrix, row_t ** halo_row, col_t ** halo_col, int nbx, int nby, int bx, int by)
{
block_t &targetBlock = matrix[bx*nby + by];
const block_t ¢erBlock = matrix[bx*nby + by];
const block_t &topBlock = matrix[... |
aa4f4c38fa314ae86704883e850f8b328ecf657e | 10f499c251706a93acad0096c30cb65f8fa63655 | hangzhangac/Algorithm-Problem | /Codeforces/Codeforces Round #582 (Div. 3)/G.cpp | C++ | cpp | 1,404 | no_license | #include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <string>
#include <queue>
#include <cmath>
#include <stack>
#include <time.h>
#include <map>
#include <set>
#define mem(a,x) memset(a,x,sizeof(a))
#define gi(x) scanf("%d",&x)
#define gi2(x,y) scanf("%d%d",&x,&y)
#... |
4559b8fff0d4db6aa42f92b97087dc55286e48cf | 9ef6663ddfaeeb8efe925f61883a07fb988bcb77 | ML3110/SmartAutoPillbox | /Major - Node OO Code/OO/Schedule.cpp | C++ | cpp | 5,643 | no_license | /*
* ############################# April 2020 #############################
* ## Major project - Developing a smart automated medication dispenser ##
* ## Submitted as part of the BSc Software Engineering award ##
* ## by Matthew Dene Lewington ##
* #############... |
6a8627a3aac22c509c366f44db709ae32536053d | 77ed2316d9acafadbeb06d85de647ad77561eb2a | sapariduo/reindexer | /cpp_src/core/cbinding/resultserializer.cc | C++ | cc | 7,762 | permissive | #include "resultserializer.h"
#include "core/cjson/jsonbuilder.h"
#include "core/cjson/tagsmatcher.h"
#include "core/queryresults/joinresults.h"
#include "core/queryresults/queryresults.h"
#include "replicator/walrecord.h"
#include "tools/logger.h"
namespace reindexer {
constexpr uint64_t GetKnownFlagsBitMask(int max... |
7e46dadf93cd27ab5f2a897efcf8f4260f746dbd | c15d2da0afee232f929e15725cff4e30c55fe01a | tonkoandrew/GLSL-PathTracer | /thirdparty/RadeonRays/bvh.cpp | C++ | cpp | 17,738 | permissive | /**********************************************************************
Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without... |
6261bc89789053b6c2f7708f853d171201e01ead | d1e53afa728c1ebb3879e5e8ba9f4817d5331b0f | adamdai/px4_ros_com_ros2 | /build/px4_msgs/rosidl_generator_cpp/px4_msgs/msg/vehicle_torque_setpoint__traits.hpp | C++ | hpp | 1,047 | no_license | // generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from px4_msgs:msg/VehicleTorqueSetpoint.idl
// generated code does not contain a copyright notice
#ifndef PX4_MSGS__MSG__VEHICLE_TORQUE_SETPOINT__TRAITS_HPP_
#define PX4_MSGS__MSG__VEHICLE_TORQUE_SETPOINT__TRAITS_HPP_
#include "px4_msgs/... |
579327275fdcf1994818616d9737c4dd16d4a71e | 7fb42706e98a0883deb4676c43ff6bf024f170ad | Sean10/Algorithm_code | /leetcode_archived/LeetCode_783.cpp | C++ | cpp | 1,188 | permissive | /**
* 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:
int ans = INT_MAX, pre = -1;
int minDiffInBST(TreeNode* root) {
if (root->left)
... |
f73f4f297106d74cf32dda532a2de443492b65a1 | 6a168e9db3f25c4ff69ce052a4a9a39b29f78b4d | bitslab/CompilerInterrupts | /benchmarks/accuracy_and_overhead/parsec-benchmark/pkgs/libs/tbblib/src/src/rml/test/test_thread_monitor.cpp | C++ | cpp | 4,374 | permissive | /*
Copyright 2005-2010 Intel Corporation. All Rights Reserved.
This file is part of Threading Building Blocks.
Threading Building Blocks is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundat... |
b45b233c15ab575085881780b52675e5b9f98506 | 54a12dcade99fe4d9caf4347ec7f3936693f4a77 | brucelevis/zenith | /src/display/types/color.hpp | C++ | hpp | 1,558 | permissive | /**
* @file
* @author __AUTHOR_NAME__ <mail@host.com>
* @copyright 2021 __COMPANY_LTD__
* @license <a href="https://opensource.org/licenses/MIT">MIT License</a>
*/
#ifndef ZEN_DISPLAY_TYPES_COLOR_HPP
#define ZEN_DISPLAY_TYPES_COLOR_HPP
#include <cstdint>
namespace Zen {
/**
* Holds a single color value and ... |
f7d6ea964b7ec2a4aed0fa5250529f7805655eae | 810011e06e6d5f3a9bca9b6001a02ee6b3ff9a41 | okey001/leetcode | /64.最小路径和.cpp | C++ | cpp | 861 | no_license | /*
* @lc app=leetcode.cn id=64 lang=cpp
*
* [64] 最小路径和
*/
// @lc code=start
class Solution {
public:
int minPathSum(vector<vector<int>>& grid) {
int n = grid.size();
int m = grid[0].size();
vector<vector<int>> f(n);
for (auto&& i : f) i.resize(m);
for(int i = 0; i < n; i... |
640c5519e08495500946b531b73955375b41691b | a30c3e0f8ae49e8c20ee0bd2b4520516b372f13f | eirinaga/APREM2-2019-2 | /Atividades/Nicolas Veneziani/Lista 3/Ex21.cpp | C++ | cpp | 2,087 | no_license | /**********************************************************
- Autor: Nicolas Veneziani
- Descrição: Exercício 21 da lista 3.
**********************************************************/
#include <iostream>
#include <locale.h>
#include <cstdlib>
using namespace std;
main()
{
int iEscolha = 0;
int iCand1 = ... |
15442c31bac4bd0a224fd2dabb732c6cf60288f9 | ccf4231aa0e0069915431a7e16b771fbd53f908c | arichardson/juliet-test-suite-c | /testcases/CWE122_Heap_Based_Buffer_Overflow/s08/CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int64_t_loop_83_goodG2B.cpp | C++ | cpp | 1,804 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__c_CWE805_int64_t_loop_83_goodG2B.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__c_CWE805.label.xml
Template File: sources-sink-83_goodG2B.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSo... |
0c963d099f5634ea9519df2d1346323eaae2e517 | 651fa0b4b39189d69607bc458ba69dcb78b28047 | rogersxiao/skia | /src/sksl/SkSLParser.cpp | C++ | cpp | 78,753 | permissive | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/sksl/SkSLParser.h"
#include <memory>
#include "stdio.h"
#include "src/sksl/SkSLASTNode.h"
#include "src/sksl/ir/SkSLModifiers.h"
#include "src/sksl/ir/SkSLSymb... |
3621fc403d83c63fbe1ac585b7776733c285f137 | 5f107ce2c19765d72b73e161c0c9ba9b78b1e9f7 | ballisticengine/ballistic_engine | /src/resources/ResourceManager.cpp | C++ | cpp | 3,189 | no_license | #include "resources/ResourceManager.hpp"
ResourceManager::ResourceManager() {
this->setWD("./data");
}
ResourceManager::~ResourceManager() {
}
factory_items_vector ResourceManager::getByType(ResourceType type = NONE) {
factory_items_vector type_items;
if (type != NONE) {
for (size_t i = 0; i < i... |
d3656a90ec6b60b44467e9dbdd96126fe4628340 | 6a49537cef363fe909222467bb1771d7a502e86e | mbittle3/War-Card-Game- | /War.cpp | C++ | cpp | 7,395 | no_license | #include "War.h"
#include "Cards.h"
#include "Deck.h"
#include <iostream>
War::War()
{
// Get players human players name
std::cout << "Welcome to the card game War. Please enter your name: ";
std::cin >> this->playerName;
std::cout << "Hello, " << this->playerName << ". Lets play!" << std::endl;
std::c... |
96c67097d4451da34fb296bf08385b9d8e59ef53 | 3f955b6071428320a6d30b992c8a4529116e7ca3 | Devurauxe/Vortex_Engine | /Vortex_Core/src/graphics/picoPNG.cpp | C++ | cpp | 31,913 | no_license | #include "picoPNG.h"
#include <vector>
/*
decodePNG: The picoPNG function, decodes a PNG file buffer in memory, into a raw pixel buffer.
out_image: output parameter, this will contain the raw pixels after decoding.
By default the output is 32-bit RGBA color.
The std::vector is automatically resized to the correct siz... |
eca0417190c9dedd18dd44eb8974b619e3457200 | b8a591a540dbd03e0da5162a56aec518828ed126 | xuxiaowei007/Medusa | /Medusa/Medusa/Rendering/RenderDevice.cpp | C++ | cpp | 831 | permissive | // Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
#include "MedusaPreCompiled.h"
#include "RenderDevice.h"
MEDUSA_BEGIN;
RenderDevice::RenderDevice()
{
mCurrentThreadHandle = 0;
}
RenderDevice::~RenderDevice(void... |
84839f21b5ed075c9bb1c8fde83fac5f27e3bd3b | 96690da6a9fb77acb4c14d3ce5409adb8083a719 | ZhouHanyu18/BlockBreaker | /BlockBreaker/main.cpp | C++ | cpp | 8,895 | no_license | #include "Block.h"
#include <windows.h>
Block block;
Bar bar;
Ball ball;
vector <Sharp*> list;
Star star_show1(-100, -270, 10, RED);
Triangle star_show2(-50, -270, 20, GREEN);
Arrow star_show3(0, -270, 30, RED);
Triangle star_show4(50, -270, 40, YELLOW);
Star star_show5(100, -270, 50, GREEN);
void ... |
c48a8517d8f035c3777579359c909b7e74833ad1 | e2701d6b4e865722875ad2855b5878b4697b11f6 | rayz/algorithms | /cf/669/b.cpp | C++ | cpp | 1,269 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <cctype>
#include <stack>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <math.h>
#include <iomanip>
using namespace std;
const long long MOD = 1e9 + 7;
int gcd(int a , int b)
{
if(b==0) return a;
a%=b;
return gcd(... |
59c97a2ec693e40fac311d80cec7c3d8377cb765 | 44849895e2dbef7cd7a900423094d1d41c5edd9a | RiccardoGiachin/Progress | /test/RiorseTest.cpp | C++ | cpp | 541 | no_license | //
// Created by giack on 30/10/18.
//
#include "gtest/gtest.h"
#include "../ResourceFile.h"
TEST(RisorseTest, Test_Costruttore) {
ResourceFile *r[2];
r[0] = new ResourceFile("Risorsa", 4);
ASSERT_EQ("Risorsa", r[0]->getFileName());
ASSERT_EQ(4, r[0]->getBit());
r[1] = new ResourceFile("Risorsa_2"... |
62f6326bc1bbe7a328d983084cb7afc949c0dab3 | 27382ae741ceff903b83faceb9bf4e4d8ac6ded4 | chinmay-ghosh/gull | /src/common/config.cc | C++ | cc | 2,700 | no_license | #include <cstddef> // size_t
#include <map>
#include <iostream>
#include <fstream>
#include <string>
#include "shelf_mgmt/shelf_manager.h"
#include "config.h"
#include "yaml-cpp/yaml.h"
namespace nvmm {
Config config;
void Config::PrintConfigFile(std::string path) {
YAML::Node file = YAML::LoadFile(path);
i... |
d656e51f7e32b8f140c40f066ee52be0a7a5dd35 | 637be00ccff67be4ff7dd2286440003ea36ef2c0 | TallineauHugo/Epitech_projects_TEK3 | /PocketDungeon/include/Menu/MainMenu.hpp | C++ | hpp | 1,327 | no_license | #pragma once
#include <vector>
#include "TextSprite.hpp"
enum Menus {
MAIN,
PLAY,
OPTION
};
class MainMenu {
public:
MainMenu(OtterEngine::Engine *oe);
~MainMenu();
void whileOnIt();
void displayMenu();
void modifyCursorPos();
void quit();
... |
1a659fd9e808b9ceea5b227b4f8d4a8a7c2b0990 | e5c24ac6402836a0161d8280912d74fa67ecd644 | Rejjell/Arcanoid | /gamefield.cpp | C++ | cpp | 1,998 | no_license | #include "gamefield.h"
GameField::GameField()
{
ball = new Ball(QPoint(50,50),10);
blocks = new QList<QRect>;
platforms = new QList<QRect>;
platforms->append(QRect(130,290,40,10));
platforms->append(QRect(130,0,40,10));
//blocks->append(QRect(130,290,40,10));
blocks->append(QRect(-5,0,5,... |
dfad33fb16e3351b06e17211410e977cd5f5bd34 | 91ca503b1d0e5f443a265b93894a4a1a56b3ceb7 | semenovf/archive | /pfs-dom/src/pfs-dom/text.cpp | C++ | cpp | 1,306 | no_license | /**
* @file text.cpp
* @author wladt
* @date Jan 9, 2014
*/
#include "node_p.hpp"
#include "nodelist_p.hpp"
#include "namednodemap_p.hpp"
#include "attr_p.hpp"
#include "element_p.hpp"
#include "chardata_p.hpp"
#include "text_p.hpp"
#include "document_p.hpp"
namespace pfs { namespace dom {
text_impl::text_impl ... |
04f59c9a6c5a7e6889435edfc7ca167f8cfdf475 | 13678f83d92a8f9601bde72c4fd6ce92997930b9 | chromium/chromium | /third_party/blink/renderer/core/layout/layout_shift_region.cc | C++ | cc | 9,941 | permissive | // Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/layout/layout_shift_region.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
namespace blink {
namespace {
// A segm... |
21c0bd208d47ad87e276585fa1ab774f48122ced | d4681d2ec2631897394cc8bf84f1f63d3486741a | kaidokert/weos | /src/mutex.hpp | C++ | hpp | 2,736 | permissive | /*******************************************************************************
WEOS - Wrapper for embedded operating systems
Copyright (c) 2013-2014, Manuel Freiberger
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the foll... |
741f90f822718a278553b0a0dee607ad690da3da | a9758dd8e8c5c3f3bbfa710eab64ff6da828ba34 | parthendo/Competitive-Programming | /P-Cube/Standard Problems/Brute Force/sorted_substring.cpp | C++ | cpp | 477 | no_license | #include <iostream>
#include <cstring>
using namespace std;
bool isSort(string str){
int l = str.length();
for(int i=1;i<l;i++){
if(str[i-1]>str[i])
return false;
}
return true;
}
int main(){
char c[] = "abcde";
int l = strlen(c);
for(int i=0;i<l;i++){
for(int j=i+1;j<l;j++){
string... |
50a8c443b6531ba3adb442fee5966a7c86635e0e | 764f93d90e1304e03307840fe0f2006cc0c924ae | Team5102/2014KitBot | /OurRobot.cpp | C++ | cpp | 377 | permissive | #include "OurRobot.hpp"
OurRobot::OurRobot():
myDrive()
{
myDrive.m_drive.SetExpiration(0.1);
}
void OurRobot::Disabled()
{
//TODO: Remove me and generate a file for it.
std::cout << "Robot is disabled";
}
void OurRobot::Test()
{
//TODO: Remove me and generate a file for it.
std::cout << "Test mode enabled";
... |
2f72d03a4ef6a44e0eb6aa2c6664acec06721a28 | be98fd0fc4fe163fdb9ae6090db8ad571577a70b | IsaacMulcahy/PenguinPanic | /Source/Cannon.cpp | C++ | cpp | 1,489 | no_license | #include "Cannon.h"
Cannon::Cannon(ASGE::Renderer* renderer)
{
base = std::make_unique<GameObject>();
base->loadObject(renderer, "..\\..\\Resources\\Textures\\Cannon\\Cannon.png");
loaded = std::make_unique<GameObject>();
loaded->loadObject(renderer, "..\\..\\Resources\\Textures\\Cannon\\CannonLoaded.png");
loa... |
5de8291bbbeda685873e58a8f2414ad12d1591f1 | 9b429f1816f49aec92578aafa54bcc08c31da6c8 | danielyamamoto/SnakesAndLadders | /Tile.cpp | C++ | cpp | 539 | no_license | #include "Tile.h"
Tile::Tile() { number = 0; }
Tile::Tile(int _number) { number = _number; }
Tile::~Tile() { }
string Tile::toString() { return getType(); }
int Tile::getNumber() { return number; }
int Tile::getBonus() { return 0; }
string Tile::getType() { return type; }
void Tile::setNumber(int _n) { number ... |
61d81145b43eb6ba8d6f71c6b49fde03c43ef019 | cb6708bf59513473a947374bc0ceae6fb746a200 | Claw-Lang/chromium | /chrome/browser/predictors/prefetch_manager_unittest.cc | C++ | cc | 21,486 | 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/predictors/prefetch_manager.h"
#include <map>
#include <vector>
#include "base/containers/flat_map.h"
#include "base/containers... |
384002c1bfd19fbcae9b3f06caa6adb33094c356 | c930fea0f4b5a4ae83e2880d61e660691ad9f1a8 | imptz/ABMI.00083-01 | /Software/Modules/Base/Sources/dispatcherClient.cpp | C++ | cpp | 3,587 | no_license | #include "dispatcherClient.h"
#include <iostream>
using namespace std;
const char* ExceptionDispatcherClientStart::what() const throw(){
return "Start dispatcher client failed";
}
const char* ExceptionDispatcherClientDispatcherUp::what() const throw(){
return "Dispatcher up failed";
}
DispatcherClient::Dispatche... |
3a45215cce48ff9f70ab3a2b4fe7a1947014fce6 | f6e78e1b801f77f908bd878402a2477b31d5beec | mebius5/Cornergame | /src/entity.cpp | C++ | cpp | 2,316 | no_license | #include "entity.h"
Entity::Entity(int id, float x, float y, int w, int h, int drawWidth, int drawHeight) :
id(id),
x(x),
y(y),
width(w),
height(h),
drawWidth(drawWidth),
drawHeight(drawHeight),
dir(1),
actionState(ACTION_IDLE),
rotates(false),
collision(NULL),
score(NUL... |
9b57c49ff6cce044b5f4902c73881a546650c574 | db64e6f9de16ef03879488a72424e3b73d42ca5d | kariem2k/playir | /native/engine/source/js/CCJSEngine.cpp | C++ | cpp | 123,549 | permissive | /*-----------------------------------------------------------
* http://softwareispoetry.com
*-----------------------------------------------------------
* This software is distributed under the Apache 2.0 license.
*-----------------------------------------------------------
* File Name : CCJSEngine.cpp
*-------... |
4bc25c7f320db273aba6172383303c7d6971f54f | d412458a2a027bdc976ec67e16cea7d6a1d04ad5 | thuyndieu/qmlfmt | /main.cpp | C++ | cpp | 6,441 | no_license | /*
Copyright (c) 2015-2018, Jesper Hellesų Hansen
jesperhh@gmail.com
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 ... |
68439d571c2c7b658f3081808390c6cf55eb50de | 402c429dd4074cfa8c6d4291f317e07da1787fd0 | zhoushiwei/CNN | /CNN/src/sample.cc | C++ | cc | 1,079 | no_license | #include "general_settings.h"
#include <time.h>
using namespace cv;
using namespace std;
double momentum_w_init = 0.5;
double momentum_d2_init = 0.5;
double momentum_w_adjust = 0.95;
double momentum_d2_adjust = 0.90;
double lrate_w = 0.0;
double lrate_b = 0.0;
bool is_gradient_checking = false;
bool use_log = false;
... |
00f390181251a5588a973edcd1c67754e7655c3e | ca769d05d3e71fb24057b98801326b83c09a758b | miaxon/cqtcontw | /containerwindow.cpp | C++ | cpp | 254 | no_license | #include "containerwindow.h"
#include "ui_containerwindow.h"
ContainerWindow::ContainerWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::ContainerWindow)
{
ui->setupUi(this);
}
ContainerWindow::~ContainerWindow()
{
delete ui;
}
|
23d632dc3f2a6d625ee5c633e523fe3351775727 | d8a19d453497f7bf14bf21fa1ffcbe0cb4b38fb2 | AndrewLam97/CS3 | /CS3_SFML_Starter/CS3_SFML_Starter/Main.cpp | C++ | cpp | 926 | no_license | #include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(1920, 1080), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
shape.setPosition(0,window.getSize().y / 2 - 100);
bool direction = true;
while (window.isOpen())
{
sf:... |
a536fe1eafd06bfc103ecba25bc05eac2d409498 | 03241724c381d506fae46f2417105f0959acd98d | cengels/skywriter | /src/text/FormattableTextArea/painting.cpp | C++ | cpp | 9,220 | permissive | //////////////////////////////////////////////////////////////////////////////
/// ///
/// Contains all code responsible for drawing the text area. ///
/// ///
////... |
2667818e642aa45230a7c95c0730c088ed7a7c13 | b94d8ea1f8b733e828a31e5b1a3b9714b51fc29d | jackros1022/UrRobotControllerInTCP | /packages/plugin_library/URRealTimeDriver/RealTimeAdapter/CobotUrComm.cpp | C++ | cpp | 2,463 | no_license | //
// Created by 潘绪洋 on 17-3-28.
// Copyright (c) 2017 Wuhan Collaborative Robot Technology Co.,Ltd. All rights reserved.
//
#include <cobotsys_logger.h>
#include <QtNetwork/QHostAddress>
#include "CobotUrComm.h"
#include "CobotUrFirmwareQueryer.h"
#include <cobotsys.h>
CobotUrComm::CobotUrComm(std::condition_variabl... |
a45c4295f53f8c44ffcb82e6ed6dbd28608f6d03 | 02a86a89745c00531a186dc3438786abaf1bc8ac | ashrika921/cp | /graph/3island.cpp | C++ | cpp | 1,129 | no_license | /*
3 Cycle
Send Feedback
Given a graph with N vertices (numbered from 1 to N) and Two Lists (U,V) of size M where (U[i],V[i]) and (V[i],U[i]) are connected by an edge , then count the distinct 3-cycles in the graph. A 3-cycle PQR is a cycle in which (P,Q), (Q,R) and (R,P) are connected an edge.
Input Format :
Line 1 : ... |
88fb4a3283cc64761b94c15949cdf5a062b2174d | b7bcbe540e5b6836466b8771ab0b68f4beec8981 | baku89/BKFX | /RichterStrip/RichterStrip.cpp | C++ | cpp | 10,976 | permissive | #include "RichterStrip.h"
#include "AEFX_SuiteHelper.h"
#include "Smart_Utils.h"
#include "AEOGLInterop.hpp"
#include "AEUtils.hpp"
#include "Settings.h"
#include "../Debug.h"
#include "Settings.h"
static PF_Err About(PF_InData *in_data, PF_OutData *out_data,
PF_ParamDef *params[], PF_LayerDef *o... |
a8e68a500a3eee55f2f8cfdecd48a8cf70db21c0 | 6ff5ff3556d91eca03a481fa51f3cd7e441e532e | ChenSi521/tensorflow | /tensorflow/core/kernels/data/captured_function.cc | C++ | cc | 27,514 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
243e4db8e171ac5cbdb5006709e61611b1f86bf9 | 5172488502d318e4ad90bf668c92916c2bebbe68 | Anshumaan031/DAA-Algorithm-examples | /Max preformance.cpp | C++ | cpp | 1,629 | no_license | // Assume you have given n jobs with their arrival and termination times. Select the maximum number of jobs using Greedy algorithms in such a way that can be performed by a single processor, assuming that a processor can only work on a single job at a time.
// Input:
// 6
// 1 3 0 5 8 5
// 2 4 6 7 9 9
//... |
8c6bad9cbc2058095a26339730fa175d49d89515 | 75fb15fd1f6833d8ae31a4a3598926ecf085550b | wangscript007/MediaServer-5 | /03_high_server/tcp_server_select.cpp | C++ | cpp | 4,043 | no_license | #include <iostream>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <algorithm>
#include <fcntl.h>
int main (int argc, char *argv[]) {
const int PORT = 8111;
int sock_fd;
sock_fd = socket(AF_INET, SOCK_STREAM, 0);
if (sock_fd < 0) {
... |
8c33fe0213bd5649645ad9178bcd836f08f55b8c | 4859391e524cfe13657ac661f868917f6bdff67f | IMAGE-ET/dicom3tools | /libsrc/src/dctool/attrseq.cc | C++ | cc | 3,923 | no_license | static const char *CopyrightIdentifier(void) { return "@(#)attrseq.cc Copyright (c) 1993-2015, David A. Clunie DBA PixelMed Publishing. All rights reserved."; }
#include "attr.h"
#include "attrlist.h"
#include "attrmxls.h"
#include "attrseq.h"
#include "elmconst.h"
#include "elmtype.h"
#include "mesgtext.h"
// The var... |
dbc23cd8fb0dd248dc83137451ae3119f4c4520d | c6abfb7800cf9dff8ff8de80439e7f8c4e32497a | senka/MultiBosons | /plugins/MmgFsrRecoAnalyzer.cc | C++ | cc | 20,647 | no_license | #include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <stdio.h>
#include <vector>
#include "CommonTools/CandUtils/interface/AddFourMomenta.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"
#include "CommonTools/UtilAlgos/interface/DeltaR.h"
#include "CondFormats/DataRecord/interface... |
9c50339492b130d0ddadc5fde664f35dfa30f498 | c25e6387e3a665476e9bd8fc7ddb3f766bd5672d | samuelemilanesi/learn-cpp | /exercises/ex_15_knapsackMultidim/src/MultiDimKnapsack.cpp | C++ | cpp | 1,715 | no_license | #include "MultiDimKnapsack.hpp"
#include <iostream>
#include <random>
MultiDimKnapsack::MultiDimKnapsack(int n_items, double max_weight,
double max_size)
: w(max_weight), s(max_size)
{
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_real_distribution<doubl... |
0ddb4c91daa802cc91b545d1df563772e4f80c26 | 7a3364a98466134219d892beb118aec3a7861151 | GabrieleRolleri/competitive_programming | /data-structures/sparse_table/main.cpp | C++ | cpp | 1,057 | permissive | #include <bits/stdc++.h>
using namespace std;
void build_st(int *v, vector<int> st[], int n, int K) {
for (int i = 0; i < n; ++i)
st[i][0] = v[i];
for (int j = 1; j < K; ++j)
for (int i = 0; i + (1 << j) <= n; ++i)
st[i][j] = st[i][j - 1] + st[i + (1 << (j - 1))][j - 1];
}
int qu... |
8e88a32492328d84537a69ce347dbddc880ae2fa | e4858eeda8b5728f6e16835da76117ab2534fd40 | tidus-open/ClickHouse | /programs/client/Client.cpp | C++ | cpp | 101,393 | permissive | #include "TestHint.h"
#include "ConnectionParameters.h"
#include "QueryFuzzer.h"
#include "Suggest.h"
#if USE_REPLXX
# include <common/ReplxxLineReader.h>
#elif defined(USE_READLINE) && USE_READLINE
# include <common/ReadlineLineReader.h>
#else
# include <common/LineReader.h>
#endif
#include <stdlib.h>
#include... |
86abf15c0e0065993ebf4510d5606de6478a1ff9 | 056351db6d29873c1aa9697cb2f58ddd30e61f48 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14640/function14640_schedule_1/function14640_schedule_1.cpp | C++ | cpp | 1,087 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14640_schedule_1");
constant c0("c0", 8192), c1("c1", 8192);
var i0("i0", 0, c0), i1("i1", 0, c1), i01("i01"), i02("i02"), i03("i03"), i04("i04");
input input00("input00", {i0}, p_int32... |
90e175feb9f65a9f6c667331aca5d5b3cd4ec6f7 | 88773b5d63c2ba2ba78b4493defcf05be4d44934 | Aimiaomiao1314/temControl | /AL808_DRV/AL808/SetPortDialog.cpp | C++ | cpp | 3,317 | no_license | #include "SetPortDialog.h"
#include "ui_SetPortDialog.h"
#include <QSerialPortInfo>
#include <QDebug>
#include <QSettings>
SetPortDialog::SetPortDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SetPortDialog)
{
ui->setupUi(this);
}
SetPortDialog::~SetPortDialog()
{
delete ui;
}
void SetPortDialo... |
0bdf4606329b3a9106a3bfca2dd8760c7161a0ca | cc56dfabf75f69617268fe24706a7fab9494dd43 | Mutescu-Andrei/Mini-Programs | /LeafNodes/Project59/Source.cpp | C++ | cpp | 2,976 | permissive |
#include<iostream>
#include<fstream>
using namespace std;
ifstream f("TextFile2.txt");
struct NODA
{
int info;
int nr;
NODA* *FII;
};
struct NODL
{
NODA* adr;
NODL* next;
};
NODA* R;
NODL *vf, *sf;
void push(NODA* a)
{
NODL* nou = new (nothrow) NODL;
if (nou == nullptr)
{
cout << " Eroare de alocare " << e... |
bbdd6aa91155e603d0e3eb0321a988976ebfdfff | 2b9e35748c17fbc387b6afc6ee8b18656fa2e685 | hillyuan/Albany | /src/LandIce/evaluators/LandIce_ResponseSurfaceVelocityMismatch_Def.hpp | C++ | hpp | 17,479 | permissive | //*****************************************************************//
// Albany 3.0: Copyright 2016 Sandia Corporation //
// This Software is released under the BSD license detailed //
// in the file "license.txt" in the top-level Albany directory //
//**************************************... |
8dbccf64e97e804eae0b03524f3d728a8568483f | 4fff1ec062bdf971a51f0d19d1bae5c3f7b4af51 | Crawping/httpproxy | /HTTP_Proxy/utilities.cpp | C++ | cpp | 18,163 | no_license | /*
HTTP Proxy can proxy HTTP and HTTPS connections.
Copyright (C) 2016-2017 Eric Kutcher
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 Foundation, either version 3 of the License, or
(at your opti... |
a455501398d9fa149b48949701b33439ddaaa166 | 773e92352267abcd02c3aa9af61a3046f6359125 | tingru0203/Tower-Defense | /GameEngine.hpp | C++ | hpp | 6,246 | no_license | #ifndef GAMEENGINE_HPP
#define GAMEENGINE_HPP
#include <allegro5/allegro.h>
#include <string>
#include <unordered_map>
#include "Point.hpp"
/// <summary>
/// All general classes are under this namespace for clarity.
/// </summary>
namespace Engine {
class IScene;
/// <summary>
/// The one and only GameEngine for t... |
d39f88ae3091fcd36ee79725227faae4f7dad8c4 | 9937c7a50e0a7222d7e1a22efcbb31074ddbbd1f | Tillkoeln/S.C.A.M | /src/walletdb.cpp | C++ | cpp | 23,827 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// 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 "walletdb.h"
#include "wallet.h"
#include <boost/version.hpp>
#include <b... |
821b77ef62dd5d5fc39fde64269036edd1fc68c8 | 0b686420eb8cf7d6ce9723f7433a221a71c4f052 | zxnxzf/pdfium | /fxbarcode/qrcode/BC_QRCoderEncoder.cpp | C++ | cpp | 16,271 | permissive | // Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
// Original code is licensed as follows:
/*
* Copyright 2008 ZXing authors
*
... |
3ead19bbcc5d7937a49e6b4e963cdc0061658fa5 | 3a424134ee17e2cf8bb84b1c9180662f8e160b1d | ashtov/cs102-project | /draw_sand_mites.cpp | C++ | cpp | 1,035 | permissive | #include "project.h"
void draw_sand_mites (cairo_t* cr)
{
static int m = 0;
double angle = 2 * PI;
cairo_set_source_rgb (cr, 0, 0, 0); // black paint
cairo_arc (cr, 0 + m, 0, 4, 0, angle);
cairo_fill (cr);
cairo_arc (cr, 19 + m, 10, 4, 0, angle);
cairo_fill (cr);
cairo_arc (cr, 0 + m, 1... |
00301ed93d692aa3ef0eaf3cff518fd666f6cfc3 | 05cd17360af12941b2e28fad9ac4ba5c77d18ba7 | dummas2008/chromium | /src/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc | C++ | cc | 7,904 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.h"
#include "ash/shelf/shelf_util.h"
#include "ash/shell.h"
#include "a... |
6c736dbd989f39dd6f7facd61ef28ebc8eec0a38 | b56c6381c67b44a3c197cbdfad2fb999f44dd8e6 | ericyao2013/mscsim | /src/gui/Aircrafts.cpp | C++ | cpp | 12,048 | permissive | /****************************************************************************//*
* Copyright (C) 2019 Marek M. Cel
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, ... |
18dce4b5ed543801eeb9a74bf28cce939a92d6bd | 44721ab97f0ec4073c570b7fb4ce7f30d25e66ce | coderbradlee/LeanClub | /src/utils.cpp | C++ | cpp | 3,686 | permissive | //
// utils.cpp
// leanclub
//
// Created by TYPCN on 2015/5/1.
//
//
#include "utils.h"
#include "config.h"
#include "restclient/restclient.h"
#include "oauth/md5.h"
#include "redis3m/include/redis3m/redis3m.hpp"
#include <boost/thread/thread.hpp>
#include <boost/random/random_device.hpp>
#include <boost/random/u... |
f8f26d977481d2eed3eb7a51a8ff72979907ce73 | cd1ba5d5781f5949fea9ebf10952ab653d34e34e | probonopd/OpenBoardView | /src/openboardview/Renderers/imgui_impl_sdl_gl3.cpp | C++ | cpp | 16,637 | permissive | // ImGui SDL2 binding with OpenGL3
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll nee... |
7907cf41c1151f6288623592fa3ac65702428e72 | 1a0872502efe800a4b1a50f147c959f38c2de2ae | daiab/mxnet | /plugin/caffe/caffe_loss.cc | C++ | cc | 1,666 | permissive | /*!
* Copyright (c) 2016 by Contributors
* \file caffe_loss.cc
* \brief caffe loss
* \author Haoran Wang
*/
#include "./caffe_loss-inl.h"
namespace mxnet {
namespace op {
template <>
Operator *CreateOp<cpu>(CaffeLossParam param, int dtype) {
Operator *op = NULL;
switch (dtype) {
case mshadow::kFloa... |
151bab0107973f97f2fc2abeaa64f0e64628bb6c | dfa4082cc47fcc2d4fbcc5fa55cde5563154e568 | vicobill/QuantumGate | /QuantumGateLib/Core/Peer/PeerEvent.cpp | C++ | cpp | 1,791 | permissive | // This file is part of the QuantumGate project. For copyright and
// licensing information refer to the license file(s) in the project root.
#include "pch.h"
#include "PeerEvent.h"
namespace QuantumGate::Implementation::Core::Peer
{
Event::Event(Type type, PeerLUID pluid, PeerUUID puuid) noexcept :
m_Type(type), ... |
fdcb423eebaf453d1f0a0a8fa9d7671bb34863fc | e34b01feea558d16ede322018780319ae078f6a4 | KrzysztofKozubek/Projects | /RecognitionNLP - praca licencjacka/.localhistory/RecognitionNLP/1470225390$Recognitionnlp.cpp | C++ | cpp | 53,542 | no_license | #include "Recognitionnlp.h"
RecognitionNLP::RecognitionNLP(QWidget *parent) : QMainWindow(parent) {
ui.setupUi(this);
setParameters();
fillVectorValue();
fillDefaultValue();
//load data
connect(ui.buttonLoadData, SIGNAL(released()), this, SLOT(clickLoadData()));
//clear list data
connect(ui.buttonLoadClear... |
c2a063f3f11ec76c671051dd2f160295d10eda8c | 3717cf3d302aa71cf69bd3c67bc2dc9a200ae6a3 | Methane-Kun/SUSTech_C_CPP_LabCode | /Hw/lab15ex1/main.cpp | C++ | cpp | 415 | no_license | #include <iostream>
#include "tv.h"
int main() {
using std::cout;
Tv s42;
Remote grey;
cout << "Initial settings for 42\" TV:\n";
s42.settings();
grey.remote(s42.ison());
cout << "\nAdjusted settings for 42\" TV:\n";
s42.onoff();
s42.chanup();
s42.settings();
grey.onoff();
... |
3ac71d2c52cc2d5e012141f1d38bff73e85e7ece | d036d353c1ebbc3381319bff62e65bfb15a97d3c | pavelhron/dune-dycap | /appl/dfz_experiment/reaction_model.hh | C++ | hh | 23,103 | no_license | // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set ts=4 sw=2 et sts=2:
#ifdef DUNE_DYCAP_REACTION_MODEL_HH
#warning ***** WARNING ***** reactionmodel.hh was already included ******
#endif
#ifndef DUNE_DYCAP_REACTION_MODEL_HH
#define DUNE_DYCAP_REACTION_MODEL_HH
#include <vector>
#include<gs... |
8ff9b03987ae9a4d703c4c316fc937f88e3a62be | 795f50db1c3fd2e6ed1b2f193f345e1255b1821f | csehydrogen/caffe | /include/caffe/layers/wino_conv_layer.hpp | C++ | hpp | 4,760 | permissive | #ifndef CAFFE_WINO_CONV_LAYER_HPP_
#define CAFFE_WINO_CONV_LAYER_HPP_
#include <vector>
#include "caffe/blob.hpp"
#include "caffe/layer.hpp"
#include "caffe/proto/caffe.pb.h"
#include "caffe/layers/base_conv_layer.hpp"
namespace caffe {
/**
* @brief Convolves the input image with a bank of learned filters,
* ... |
3ba6879c042056efb005c4dce55a0736be274f80 | f1b3167babd764d3e761ec4a7ce7d1e424f6fb92 | tangjz/acm-icpc | /leetcode/2001-3000/2261-k-divisible-elements-subarrays.cpp | C++ | cpp | 484 | permissive | class Solution {
public:
int countDistinct(vector<int>& nums, int k, int p) {
int n = nums.size();
set<vector<int> > Hash;
for(int i = 0; i < n; ++i) {
vector<int> vec;
for(int j = i, c = 0; j < n; ++j) {
c += nums[j] % p == 0;
if(c > k... |
43ca196952d08a75a7ab7ea99513085656453fc9 | cc9604195b2684ab91acbafb05669686f569eee9 | abdulabbas/Multiverso | /src/io/io.cpp | C++ | cpp | 1,701 | permissive | #include "multiverso/io/io.h"
#include "multiverso/io/hdfs_stream.h"
#include "multiverso/io/local_stream.h"
namespace multiverso {
Stream* StreamFactory::GetStream(const URI& uri,
FileOpenMode mode) {
std::string addr = uri.scheme + "://" + uri.host;
if (instances_.find(addr) == instances_.end()) {
if (ur... |
9382e9c61282b5cffe7b8d4c9fb98c65d3f0dddd | 35a8df23b9d19b08ed8801b844d742d62ff5fccb | google/filament | /third_party/spirv-tools/source/opt/code_sink.cpp | C++ | cpp | 10,373 | permissive | // Copyright (c) 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
5beefaf75c7cdfc2b56479b06226a2342c37404b | c8f977952fe42a6331103a6606481691ec48c517 | sailfish009/binding_affinity_calculator | /lib/rosetta/source/src/core/conformation/parametric/Parameter.cc | C++ | cc | 6,659 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
959e4feab3609cd1bc3509781f1f1fb8e65e2628 | cf778f3d08cda250d3ec41f5ca4955012d606123 | mayank245/hiphop-php | /src/compiler/statement/statement.cpp | C++ | cpp | 2,563 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
+---------... |
17b881ab95a43bce15bf25d9b384dab9ec87e1db | 5e7ba4f1e542f643e9131ec87586455713351962 | kcat/zdoom | /src/posix/sdl/hardware.cpp | C++ | cpp | 9,948 | no_license | /*
** hardware.cpp
** Somewhat OS-independant interface to the screen, mouse, keyboard, and stick
**
**---------------------------------------------------------------------------
** Copyright 1998-2006 Randy Heit
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modific... |
a0f79ba4177895efc4d828a2389fe460a34df821 | 72905e1faad674c36c48eeb52b33bbfb807ebe9a | corinnegroth/HELICS | /tests/helics/application_api/FilterTests.cpp | C++ | cpp | 41,354 | permissive | /*
Copyright (c) 2017-2020,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC. See
the top-level NOTICE for additional details. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
#include "helics/application_api/BrokerApp.hpp"
#include "helics/appl... |
98e6337479a3e4d8131ce4f1abe9255696fd92b6 | 729203e72d8d3676172ee46ce6d6106e7fd4bdd9 | pruvi007/InterviewBit | /Math/Prime_Sum.cpp | C++ | cpp | 435 | no_license | bool isprime(int n)
{
if (n <= 1)
return false;
for (int i = 2; i < n; i++)
if (n % i == 0)
return false;
return true;
}
vector<int> Solution::primesum(int A) {
vector<int>b;
for (int i=0; i<A; i++)
{
if (isprime(i) && isprime(A-i))
... |
b2ee2d0efc87df5b4415dae39213d55927ce1aa7 | d4c72c7fbe5602943edc5093b0730f5d935045d5 | ReneLee95/codeup | /codeup 1990.cpp | C++ | cpp | 227 | no_license | #include <iostream>
using namespace std;
int function(unsigned long int a)
{
if(a%3==0)
{
cout<<"1"<<endl;
}
else
{
cout<<"0"<<endl;
}
}
int main()
{
unsigned long int a;
cin>>a;
function(a);
return 0;
}
|
73dc5fbb829554e7c49e331eca39c7cd7c53a9d7 | 0c59c86e0097a2675d24d3c226d61830aa0d28b0 | victor-anisimov/Umpire | /src/umpire/op/OpenMPTargetCopyOperation.cpp | C++ | cpp | 1,760 | permissive | //////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016-20, Lawrence Livermore National Security, LLC and Umpire
// project contributors. See the COPYRIGHT file for details.
//
// SPDX-License-Identifier: (MIT)
////////////////////////////////////////////////////////////////... |
e02458fe46cb8c55650e4011b395922ac4aba74d | dc22fa6d18d1220f1159d56a7cd0cd91bf43ed12 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14078/function14078_schedule_0/function14078_schedule_0_wrapper.cpp | C++ | cpp | 1,394 | no_license | #include "Halide.h"
#include "function14078_schedule_0_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(16384);
Halide::Buffer<int32_t> buf01(409... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.