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 |
|---|---|---|---|---|---|---|---|---|
df2d0cd91658f4fc90bdf03d6e9c425d9c86d52d | 899bfda7bbe7ca24e0aabd02a2e689462337ee4d | Lucifer1662/c-compiler | /Compiler/CmpMemory.cpp | C++ | cpp | 2,710 | no_license | #include "CmpMemory.h"
#include "Scope.h"
#include "Regester.h"
#include "Stack.h"
const char* CmpMemory::ComparisonNames[] = {
"je",
"jne",
"jz",
"jns",
"jg",
"jng",
"jge",
"jnge",
"jl",
"jnl",
"jle",
"jnle",
"je",
"jne",
};
CmpMemory::CmpMemory(ComparisonEnum comparison, std::shared_ptr<Type> dataType) :
compar... |
44c22f88958d374c2bef493a724fb2550953eab9 | 5278d3b0c24442a28ec7aee8c4943f834031f6c7 | ric2b/Vivaldi-browser | /chromium/services/service_manager/tests/service_manager/service_manager_unittest.cc | C++ | cc | 21,297 | permissive | // Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <utility>
#include "base/base_switches.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/... |
535cd563ce6f23d932a48df7559866d495993b3b | 3996eb8b9da406bf721f1f632867c0dffd4ce31e | melpame/NatTester | /jni/stunserver/all/socketaddress.cpp | C++ | cpp | 8,256 | permissive | /*
Copyright 2011 John Selbie
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 wri... |
8b22a3dad3489c67b5f1d055832d63f02ba6e0d5 | 31513cffb865e33e5c40389f158f8a5c8f3be10c | hardelc/Bomberman | /Graphic/GraphicObject.cpp | C++ | cpp | 1,835 | no_license | /*
** Model.cpp for Graphic in /home/leroy_v/github/Bomberman/Graphic
**
** Made by vincent leroy
** Login <leroy_v@epitech.eu>
**
** Started on Wed May 15 13:32:10 2013 vincent leroy
** Last update Sun Jun 09 20:31:09 2013 vincent leroy
*/
#include <cmath>
#include <GL/gl.h>
#include <GL/glu.h>
#include "GraphicObj... |
afd7197db3b06e689fc8dbd88073fe7611518a94 | 6ca0e0ac7e30e095e4026383cf35b1dc39f644fc | SeobinYun/2021_C_practice | /HW모음/HW39.cpp | C++ | cpp | 584 | no_license | #include <stdio.h>
#pragma warning(disable:4996)
int main(void) {
int money = 0, res = 1;
while (res == 1) {
printf("현재 당신의 소유 금액 입력 : ");
res = scanf("%d", &money);
if (res == 1) {
for (int a = 1; a <= money / 500; a++) {
for (int b = 1; b <= money / 700; b++) {
for (int c = 1; c <= money / 400; c+... |
58797cf66e57245855b1008e927848f233fbb9eb | d8efd2ac578be5e7941c9184d2a46c957075de15 | samcom12/metall | /example/graph_data_structure/csr_using_vector.hpp | C++ | hpp | 2,203 | permissive | // Copyright 2019 Lawrence Livermore National Security, LLC and other Metall Project Developers.
// See the top-level COPYRIGHT file for details.
//
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
#ifndef METALL_EXAMPLE_GRAPH_DATA_STRUCTURE_CSR_USING_VECTOR_HPP
#define METALL_EXAMPLE_GRAPH_DATA_STRUCTURE_CSR_USING_VEC... |
adbdeae635c83abe3085a3f8843fc2983bf22aaf | 87170ec6e87c958870c0b183d563f34a3e0d25e0 | rolffokkens/sap-cpp | /cpu16.cpp | C++ | cpp | 17,178 | no_license | #include <string>
#include "cpu16.h"
const char *CPU16::Alu16::OpNames[] = { "-", "IND", "ADD", "SUB" };
const struct CPU16::MicroInstruction CPU16::prefix[] = {
{.enable = R_PC, .load = R_MAR }
, {.enable = R_MDR, .load = R_IR, .clk_pc = 1, ... |
27e5f65b610d815e8bb90605516e716f6478c6ad | ba494eba8a0ab9780f9d81e4186b49b380233732 | anadon/graph | /example/weighted_matching_example.cpp | C++ | cpp | 4,580 | no_license | //=======================================================================
// Copyright (c) 2018 Yi Ji
//
// 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)
//
//======================================================... |
80deb6bd191ac66c8a6fabe4d1c290f99daf7646 | 3771d10ae290fb8ae4df0750a8e3cb67d684c862 | hadiwibocil/kelas-ku | /penjualan tiket.cpp | C++ | cpp | 5,163 | no_license | #include <conio.h>
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char kodeKonser,jenisTiket,jenis[30],namaPembeli[30],judulKonser[30],ulang;
int jmlBeli,ttlHarga,ttlBayar,Kembalian,uangBayar,hargaSatuan;
float disc;
atas:
cout<<"=============================================... |
ff0a65df287221e4b2ddd621348ac5beefe51530 | 953e4a4441ad1ed2b8f1d07d56a4c268dce81a88 | Jerry2001/SPOJ | /NKABD.cpp | C++ | cpp | 1,122 | no_license | // Contest: vn.spoj.com/problems/NKABD/
// Author : Nguyen Minh Tuan
// Lang : C/C++
#include <bits/stdc++.h>
using namespace std;
#define _for(i,a,b) for(int i = a; i <= b; i++)
#define _ford(i,a,b) for(int i = a; i >= b; i--)
#define _it(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i)
#define ... |
05ee82a402a4ba67e800f9e8ba112391760b251e | a4c33907bf37293fbdbac58d1b7413806e6817f2 | avioXD/SlidingWindowProblemsC- | /FindAnagram.cpp | C++ | cpp | 741 | no_license | #include<bits/stdc++.h>
using namespace std;
int findAnagram(string str, string ana){
unordered_map<char , int> Map ;
int count = 0;
int i = 0;
int z = 0;
int size = ana.length();
int len = str.length();
int ans = 0;
for(auto a: ana) Map[a]++;
count = Map.size();
while(z<len){
if(Map.find(s... |
6c6263b4688655d40f1f971487e66fe16890581b | 078ae179dd0d0279f6eaf49049d2378981c82b9d | chunyang-wen/leetcode | /InsertInterval.cpp | C++ | cpp | 1,381 | no_license | /**
* Definition for an interval.
* struct Interval {
* int start;
* int end;
* Interval() : start(0), end(0) {}
* Interval(int s, int e) : start(s), end(e) {}
* };
*/
class Solution {
public:
vector<Interval> insert(vector<Interval> &intervals, Interval newInterval) {
in... |
4195f1050d14317ae089db98aa8ae77b2b9c5677 | 0f8c791010174e94c58fa026b9fdbb33b468d89a | fxb20170613/chromium | /content/browser/appcache/appcache_subresource_url_factory.cc | C++ | cc | 15,847 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/appcache/appcache_subresource_url_factory.h"
#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/debug/... |
33a91a56a40e4bb5545584dfeeb6ae076e7d6396 | f4b8761594f914d8cdc3a918120e1f608a517010 | bhupkas/Backup | /programs/codes/scc.cpp | C++ | cpp | 3,288 | no_license | /* Team name: Omega
* Problem name: Strongly Connected Components
*/
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostrea... |
602f121e8fa6f709cbe4a0d8e553b212c53c94d2 | 4f0d98e477d6c0911fafcddb6e3c8536170f9488 | fcccode/xbyak_translator_aarch64 | /translator/tests/pattern/vmaxps/vmaxps003.cpp | C++ | cpp | 4,262 | permissive | /*******************************************************************************
* Copyright 2020 FUJITSU LIMITED
*
* 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.apa... |
893982c9d9892272f325758f0dfe37e543263cc7 | c46834498ddb852d993d91b888e9e15f7983f026 | marco-c/gecko-dev-wordified | /third_party/msgpack/include/msgpack/cpp_config.hpp | C++ | hpp | 489 | permissive | /
/
/
/
MessagePack
for
C
+
+
C
+
+
03
/
C
+
+
11
Adaptation
/
/
/
/
Copyright
(
C
)
2013
-
2016
KONDO
Takatoshi
/
/
/
/
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
MSGPACK_CPP_C... |
2fad300029abda640bb8d8289091c2289a130733 | ef2973f6268bcbf2f51b11ac77a8b2bf8f1dd4a3 | mehra-deepak/CN-DS-ALGO | /Binary Trees/24_Path_Sum_Root_To_Leaf.cpp | C++ | cpp | 1,006 | no_license | // Following is the Binary Tree node structure
/******
class BinaryTreeNode {
public :
T data;
BinaryTreeNode<T> *left;
BinaryTreeNode<T> *right;
BinaryTreeNode(T data) {
this -> data = data;
left = NULL;
right = NULL;
}
};
*****/
#include<bits/stdc++.h>
#include<iostrea... |
6e8d45234520d59091ecb6dfe08104996b28cb2f | 07fb53254cd34d7f0ad10693d5c734ecf729d865 | nameofuser1/RoboticsBaselines | /algorithm/astar/node.hpp | C++ | hpp | 795 | no_license | #ifndef NODE_HPP
#define NODE_HPP
#include <vector>
struct Node
{
Node() :
id(0), x(0), y(0), heuristic_cost(0), occupied(false),
ctx(nullptr)
{}
Node(int id, double x, double y, double cost, bool occupied=false) :
id(id), x(x), y(y), heuristic_cost(cost), occupied(occupied),
... |
d12b7b8b28b3968be81920f7d372b2baa6ff0891 | 08b703ce84e24e4446642d39796f9c818c8c5698 | MutantEel/eeltech | /include/EelTech/graphics/Texture.hpp | C++ | hpp | 2,311 | permissive | //
// Texture.hpp
// EelTech
//
// Created by Sean on 7/29/13.
// Copyright 2013 Mutant Eel. All rights reserved.
//
#ifndef _TEXTURE_HPP_
#define _TEXTURE_HPP_
#include <eeltech/graphics/Image.hpp>
namespace eeltech
{
namespace blendmode
{
enum Mode
{
None = 0,
SourceAlpha = 1,
};
}
namespace filter
{
... |
8362ef097609bb35d6bb8931a5a5abee909e1817 | 96daaabf963ff43d81eb8658bd5f5b15b0f66f4d | amitandgithub/STM32F1xx_CPP_FW | /STM32F1xx_CPP_FW - CPF - SPI 1.6 TFT/HW_Modules/ST7735/ST7735.cpp | C++ | cpp | 5,040 | no_license | /******************
** FILE: ST7735.cpp
**
** DESCRIPTION:
** ST7735 implementation
**
** CREATED: 28/12/2019, by Amit Chaudhary
******************/
#include "ST7735.h"
namespace BSP
{
ST7735::ST7735(HAL::Spi* pSpiDriverLCD, Port_t CSPort, PIN_t CSPin,Port_t DCPort, PIN_t DCPin, Port_t RstPort, PIN_t RstPin, Po... |
d9e57d5a2c48d29704da07b4bae5f734b7dc5ed9 | d09fc527a4accd39538fd2d43e41d14ff652069f | sahuaman83/Competetive | /DP Frog_jump.cpp | C++ | cpp | 735 | no_license | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mem(x,val) memset(x,val,sizeof(x))
#define F(i,n) for(ll i=0;i<n;i++)
#define pb push_back
#define endl '\n'
#define mod 1000000007
#define crap ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
ll n,a[100005],dp[100005];
ll func(ll ind)
{
... |
884a66cfabf9018d80c62fa8e0dba13e14769f1e | 2b0594a9d0e669745a6bc8d6078bbdd75374e9bc | ZouYa99/data_structure | /cpp/cpp/BinarySearch/sqrtx.cpp | C++ | cpp | 1,491 | no_license | //
// sqrtx.cpp
// cpp
//
// Created by ZouYa on 2021/8/30.
//
#include <stdio.h>
#include <math.h>
/*
计算并返回 x 的平方根,其中 x 是非负整数。
由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。
*/
class Solution {
public:
int mySqrt(int x) {
if(x==0){
return 0;
}
// MARK: - 二分查找法
// int i=0,j=x,ans;
... |
45b892bcfdde0884b197cdb7bb699895fe6315c6 | 4d6d993462fa8bdcc91d06a581870a25279cd2ca | danpape/btcr-DID-method | /src/curlWrapper.cpp | C++ | cpp | 1,400 | permissive | #include "curlWrapper.h"
#include <curl/curl.h>
#include <curl/easy.h>
#include <sstream>
namespace {
size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) {
std::string data(static_cast<const char*>(ptr), size * nmemb);
*(static_cast<std::stringstream*>(stream)) << data;
... |
ccec28105c62c6e9479bdac374bd2d663bb850cd | b2434796a9b58b447fa9b8ffb3dd87ebb4c22bbf | northmatt/Mecha-Mayhem-engine | /Mecha Mayhem/projects/Prototype/src/main.cpp | C++ | cpp | 1,849 | no_license | #include "Utilities/Gameloop.h"
#include "DemoScene.h"
#include "Tutorial.h"
#include "MainMenu.h"
#include "LeaderBoard.h"
int main() {
int width = 1280, height = 720;
const bool usingImGui = true;
GLFWwindow* window = Gameloop::Start("Mecha Mayhem", width, height, usingImGui);
if (!window) return 1;
... |
4e1cb5537fcdc009228d73b849ec22140e19ecd6 | 3fa9443f8a18a4a1a02507f70e6e157fd037e908 | drbenmorgan/SNCabling | /source/sncabling/calo_signal_cabling.cc | C++ | cc | 9,922 | no_license | // sncabling/calo_signal_cabling.cc - Implementation of signal readout cabling table
//
// Copyright (c) 2018 by François Mauger <mauger@lpccaen.in2p3.fr>
//
// This file is part of SNCabling.
//
// SNCabling is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License... |
30e6fd9c225b058624fe92ab6c005b7e8c18e618 | 23064b0cf3352a90f5ff27dafebfbdaed7a98d61 | dhnesh12/codechef-solutions | /02-CodeChef-Easy/478--Vote for the Noodle Soup.cpp | C++ | cpp | 871 | no_license | #include <iostream>
#include<cstdlib>
using namespace std;
int main()
{
int n;
long long int p,x;
char c;
while(1)
{
cin>>n;
if(n==0)
return 0;
p=0;
while(n--)
{
cin>>c>>x;
if(c=='P')
x--;
else if(c=='M')
x++;
... |
3b6fc54447a7f25bb8ecd587c544ee6cc3d75e86 | 49a7bb3fe67ff63d6825ff5892339090f231b54a | ftkalcevic/DCC | /STM32F469_Controller/Source/TouchGFX/TouchGFX/gui/include/gui/containers/FunctionButtons.hpp | C++ | hpp | 313 | permissive | #ifndef FUNCTIONBUTTONS_HPP
#define FUNCTIONBUTTONS_HPP
#include <gui_generated/containers/FunctionButtonsBase.hpp>
class FunctionButtons : public FunctionButtonsBase
{
public:
FunctionButtons();
virtual ~FunctionButtons() {}
virtual void initialize();
protected:
};
#endif // FUNCTIONBUTTONS_HPP
|
965cf45f27c7a73b59cab00dc214eac20df401f2 | 32594ee6af6dc894bce81dcd014af88a629365e3 | pcomitz/ukf | /tools.cpp | C++ | cpp | 1,169 | no_license | #include <iostream>
#include "tools.h"
using Eigen::VectorXd;
using Eigen::MatrixXd;
using std::vector;
Tools::Tools() {}
Tools::~Tools() {}
VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations,
const vector<VectorXd> &ground_truth) {
/**
TODO:
* Calculate the RMSE... |
ee3bac5d8f44353b5721d73223fbb5eb3048b4fa | d21cac22768d1b0cd962e8bf85a1ff94b9035089 | pr0-n00b/code | /HackerEarth/duration.cpp | C++ | cpp | 256 | no_license | #include <iostream>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--) {
int a,b,c,d;
cin >> a >> b >> c >> d;
a = a*60;
c = c*60;
a = a+b;
c = c+d;
c = c-a;
cout << c/60 << " " << c%60 << endl;
}
return 0;
}
|
64c2d901e4ca6452ac718e84468b33222354761a | 6027e97535f1587be1262932f4e0f091bf554f32 | mbutkereit/conveyor | /Projekt/Hal/SerialInterface/Serial.cpp | C++ | cpp | 2,291 | no_license | #include "Hal/SerialInterface/Serial.h"
Serial::Serial(string deviceNameWrite,string deviceNameRead){
this->dev_write_ = deviceNameWrite.c_str();
this->fdesc_write_ = open(this->dev_write_, O_WRONLY);
if(this->fdesc_write_ == -1){
LOG_ERROR << "Seriale Interface kann nicht geoeffnet werden:" <<dev... |
65de8a796fa9f82c334f3a0ff71ec2fe2716b967 | ec2e7dcde8cbb543dca301aa342523552591ba10 | Ashik1704026/codeforce | /1037D.cpp | C++ | cpp | 452 | no_license | #include <bits/stdc++.h>
using namespace std;
map<int,int>bfs[200020];
int main()
{
int n;
int arr[200020];
cin>>n;
for(int i=0;i<n-1;i++)
{
int a,b;
cin>>a>>b;
bfs[a][b]=1;
bfs[b][a]=1;
}
for(int i=0;i<n;i++)
cin>>arr[i];
int i=0,j=1;
for(;i<n;i++)
whi... |
5047f67be63facc2466e48b993408e8fe3f3ae9c | 86d3cf85d6f0d1bf911b646d4ceb816d75d61b13 | gky360/contests | /atcoder/past202012-open/g/Main.cpp | C++ | cpp | 1,317 | no_license | /*
[past202012-open] G - Snake
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double DD;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(c) (c).begin(), (c).end()
const int MAX_H ... |
8a040a4671c96f2018aae285c42810e3c5b94b4d | 16cd04f647faead21a818e64be9b33d728b870d9 | ssnetsim/supersim | /src/router/outputqueued/Router.cc | C++ | cc | 17,762 | permissive | /*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. You may obtain a copy of the License at
*
* http://www.apache.org/li... |
4837c658f9eb5eb43d84a8b7770db41e632305a0 | 682e623e3abab74edac95b4855d661fc077ef2f4 | wuestholz/seahorn | /include/seahorn/Transforms/Instrumentation/BufferBoundsCheck.hh | C++ | hh | 6,085 | permissive | #ifndef __BUFFER_BOUNDS_CHECK__HH__
#define __BUFFER_BOUNDS_CHECK__HH__
#include "seahorn/Analysis/CanAccessMemory.hh"
#include "llvm/Pass.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/Analys... |
4727427bae1233a04676baab873758d3fcd614d3 | 1c3d3b3a976ead1170ffa92cbac79914ff036a6d | DreadArceus/HackerRank | /Practice/Algorithms/Implementation/The_Time_in_Words.cpp | C++ | cpp | 2,489 | no_license | #include <bits/stdc++.h>
using namespace std;
// Complete the timeInWords function below.
string timeInWords(int h, int m) {
string time;
unordered_map <int, string>convert;
convert[0] = "o' clock";
convert[1] = "one";
convert[2] = "two";
convert[3] = "three";
convert[4] = "four";
conv... |
421c384df385d188f1e924d73bd1fd2f1ff0cbe6 | 5e116bedeb04622d7f528ddf4cde0b53a646e6dd | drtconway/varoom | /include/varoom/hgvs/hgvsc_formatter.hpp | C++ | hpp | 2,993 | no_license | #ifndef VAROOM_HGVS_HGVSC_FORMATTER_HPP
#define VAROOM_HGVS_HGVSC_FORMATTER_HPP
#ifndef VAROOM_HGVS_HGVSC_HANDLER_HPP
#include "varoom/hgvs/hgvsc_handler.hpp"
#endif
#include <functional>
#include <boost/format.hpp>
namespace varoom
{
namespace hgvs
{
class hgvsc_formatter : public hgvsc_handler
... |
59821aa1736e1fd6a8e9d6574848903a1e9911e7 | 388f863cc56a44d657f3f7d89214c8b505301f5c | NEULiee/algorithm | /boj/1003/main.cpp | C++ | cpp | 491 | no_license | //
// main.cpp
// 1003 피보나치 함수 (DP)
//
// Created by Ha Neul Iee on 2021/02/01.
//
#include <iostream>
using namespace std;
int dp0[41];
int dp1[41];
int main(int argc, const char * argv[]) {
int T, N;
cin >> T;
dp0[0] = 1;
dp1[1] = 1;
for (int i=2; i<=40; i++) {
dp0[i] = dp0[i-1] + dp... |
c6e406dba1703b68e20794a3e504de2176766316 | 3231015a9598b49a198042984ad02c8b2b537a09 | victor-timoshin/Switch | /src/Switch/include/Switch/Switch.hpp | C++ | hpp | 321 | permissive | #pragma once
#include "Switch/Switch.Core"
#include "Switch/Switch.System"
#include "Switch/Switch.System.Core"
#include "Switch/Switch.System.Drawing"
#include "Switch/Switch.System.ServiceModel"
#include "Switch/Switch.System.Windows.Forms"
#include "Switch/Switch.TUnit.Core"
#include "Switch/Switch.TUnit.Framework"... |
f76602af8061d7f5c2c9c68e137a9eb9eb3b458a | ee0c33dce033da228779f115dd3c835c1c7439fb | dyg540/chromium | /services/network/public/cpp/cert_verifier/mojo_cert_verifier_unittest.cc | C++ | cc | 13,957 | 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 "services/network/public/cpp/cert_verifier/mojo_cert_verifier.h"
#include <map>
#include "base/bind.h"
#include "base/callback_helpers.h"
#incl... |
f5a9dad283c5a39c3b354ac8ef8a846920d597fd | c2086efb1c8319d7ff8d7de5e0fab5949660ce13 | kventinel/Contests | /Yandex.Algorithm/2017/Round1/B.cpp | C++ | cpp | 804 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main() {
long long n, a;
cin >> n >> a;
vector<bool> v(500);
long long start_a = a;
for (int i = 0; i < 500; ++i) {
if (a + start_a <= n) {
v[a % 500] = true;
}
++a;
}
int money = 0;
a = ... |
b560567dd9172c4f12388f9585e4c78b4857bccb | 9f833bce6adda473cf5c7ebc54b299129ee644d3 | codeheng/freshman_code | /dev-c++写的代码/郝斌老师的代码/插入排序.cpp | C++ | cpp | 223 | no_license | # include<stdio.h>
#define N 8
//Κδ³φΚύΧι
void printArray(int a[],int n)
{
int i;
for(i=0;i<n;i++)
printf("%d ",a[i]);
printf("\n");
}
int main(void)
{
int a[N] = {1,5,4,3,9,8,7,2};
printArray(a,N);
}
|
997a16b97972f6c23d7f58b51508afa2cdc10736 | bde78a10949c0a3d337e4a8e0c9bca32cc770449 | Ankurrana/cfiles_basics | /fact.cpp | C++ | cpp | 779 | no_license | #include "iostream"
#include "vector"
#include "algorithm"
using namespace std;
vector<unsigned short int> multiply(vector<unsigned short int> a ,int k){
int i,carry = 0 ,temp;
vector<unsigned short int>ans;
int size = a.size();
for(i=0;i<size;i++){
temp = a[size - i - 1]*k + carry;
ans.push_back(temp%10);... |
fc05732ab751f13e1240cbe39e14817e3f28c25f | 65f4052c6fad38969c2fa17b066d44a357c96368 | KyleKaiWang/titan-infinite | /titan-infinite/src/spline.cpp | C++ | cpp | 13,955 | permissive | /*
* Vulkan Renderer Program
*
* Copyright (C) 2020 Kyle Wang
*/
#include "pch.h"
#include "spline.h"
#include <stack>
#include <iostream>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/compatibility.hpp>
#include <glm/gtc/type_ptr.hpp>
Spline::Spline(Device* device)
: m_device(device), m_lineWidth(10.0f), ... |
0cc2359a500a5c318bdf20b6a562767136041c6f | 554695c25d172c84a2af141f3b604d01ef5dad6e | CerebralStorm/CS3505 | /Assignment4/tester.cc | C++ | cc | 2,353 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include "warehouse.h"
#include "food_item.h"
#include "date.h"
#include "parser_helper.h"
#include "receive.h"
#include "request.h"
using namespace std;
string first_word(const string& line);
int main(int argc, char* argv[])
{
string fi... |
b8c547d52395bdc50175d59a8c2f4ef8f0e684a3 | 5cad87c8278bc83a0d36617bdf9eeb0bdea28a5e | GuidoBR/Algoritmos | /UVa Online Judge/10070 - Leap Year or Not Leap Year and/10070 - Leap Year or Not Leap Year and.cpp | C++ | cpp | 1,390 | no_license | /*
* Guido Luz Percú - 11-07-2012
* Baseado em: http://tausiq.wordpress.com/2009/06/02/acm-uva-10070/
*/
#include <iostream>
#include <string.h>
using namespace std;
int main ()
{
long leap_year, huluculu_year, bulukulu_year, primeira_vez = 0, Mod4, Mod100, Mod400, Mod15, Mod55, tamanho;
char ano [1000000]; //fuck... |
a98215f149170a4ad86735c96a43422bc2a0dfdc | ee7281cc22469aecefe83fae3d322408a317c488 | KirillFurtikov/OrionUO | /OrionUO/Managers/IntlocManager.cpp | C++ | cpp | 4,421 | permissive | // This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/***********************************************************************************
**
** IntlocManager.cpp
**
** Copyright (C) October 2017 Hotride
**
******... |
5218054c520939c2f196af9cb3c1d217f5c564d8 | 89b7b1dbc7532740c828bfa0eda25a51a8dc9190 | zrbecker/simpleraytracing | /src/Ray.cpp | C++ | cpp | 505 | no_license | /*
* Ray.cpp
*
* Created on: Sep 19, 2012
* Author: zrbecker
*/
#include "Ray.hpp"
#include "Sphere.hpp"
#include "Plane.hpp"
#include <cmath>
namespace z3d {
Ray::Ray()
: origin(0, 0, 0), direction(0, 0, -1) {
}
Ray::Ray(const Vector3d &origin, const Vector3d &direction)
: origin(origin), direction(di... |
7cbf73715115c979dfb08f6274271ae10c44d835 | 2a53ed454ccea13d3a43c5bbdd2f7bb13cbfd910 | lihao779/linuxsys | /c++Primer/4单元/7.cpp | C++ | cpp | 522 | no_license | #include <iostream>
#include <stdexcept>
using namespace std;
int main()
{
int a = 2;
cout << "input a:";
while(cin >> a)
{
try
{
if(a == 1)
cout << "a == 1"<<endl;
else
throw runtime_error("1 != 2");
}
catch(runtime_error err)
{
cou... |
969de4f11895e5780821783a537602e45b46722a | 0eea12ceb64e6bfc9b806cddbe717f4718f7d5fe | stacksta/cannonball-psp | /src/main/romloader.cpp | C++ | cpp | 3,724 | no_license | /***************************************************************************
Binary File Loader.
Handles loading an individual binary file to memory.
Supports reading bytes, words and longs from this area of memory.
Copyright Chris White.
See license.txt for more details.
********************... |
df5f1a56a50ab3ae0ba426aa67e98e4f51f38e74 | 726000863f9ce27d5604c39cf01cec4e51de63ff | AkisAya/ZJU_DSA_2016 | /计时.cpp | C++ | cpp | 334 | no_license | # include <iostream>
# include <ctime>
using namespace std;
int main() {
int i = 0;
clock_t start, stop;
start = clock();
while (i < 1000000000) {
i++;
}
stop = clock();
cout << CLK_TCK << endl;
cout << CLOCKS_PER_SEC << endl << start << endl << stop << endl;
cout << double(stop - start) / CLOCKS_PER_SEC;
... |
6a7dec6699ec2952067e41d66758a060b843fc43 | 609952042d34093d8e881d675faee38060a808d4 | vplotton/cpp_pool | /rush00/done/Enemy.hpp | C++ | hpp | 364 | no_license | #ifndef ENEMY_HPP
# define ENEMY_HPP
#include "AbstractObject.hpp"
#include <iostream>
class Enemy : public AbstractObject
{
public:
Enemy();
Enemy(unsigned int, int, int);
Enemy(Enemy const & src);
~Enemy();
Enemy & operator=(Enemy const & rhs);
private:
};
std::ostream & operator<<(std::ostream & o,... |
eb89bf75016aaf9578edf1c2e32a5f17b7ecfc03 | f2a6c0c28b16c11ae8d4bc911021686d1c02c375 | zmichaels11/gloopcpp | /gloop/application.hpp | C++ | hpp | 2,065 | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
#pragma once
#include <functional>
#include <iostream>
#include <string>
#include <SDL2/SDL.h>
#include "context.hpp"
#include "co... |
e2d78a8a1a30cfef6484d108d2bfb9ec7e353e50 | 135e3ccf7c2bde18e69f29f0108b68e7edea6f01 | FRC701/astrid-2020 | /src/main/cpp/commands/Shoot.cpp | C++ | cpp | 1,974 | no_license | /*----------------------------------------------------------------------------*/
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
90cde6fefc47738f8a55a81453f4be924efbb043 | aa22e7c5100f466f6549bc890f4c851d16848c3a | gmy987/ACM | /模板/计算几何/计算几何代码/判断N点是否共面.cpp | C++ | cpp | 1,023 | no_license | /*fzu_1393*/
#include <iostream>
#include <cmath>
using namespace std;
typedef struct TPoint
{
double x;
double y;
double z;
}TPoint;
const double eps = 1e-6;
int main()
{
TPoint a, b, c, d, ab, ac, abc;
int n, i;
cin >> n;
while(n--){
cin >> a.x >> a.y >> a.z... |
4a8727a81fc0f171a73c44b632a9e1978681299f | e53c9b2641509d79c8fb7e0bf2769dcd2f5e0472 | noooaah/solved_problem | /codeforces/101341/e/e.cpp | C++ | cpp | 1,829 | no_license | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair < int , int >;
using i3 = pair < int , ii >;
using vi = vector < int >;
using vl = vector < ll >;
using vii = vector < ii >;
using vi3 = vector < i3 >;
const int N = 2e5 + 5;
const ll INF = 1e12;
const double eps = 1e... |
12059b4e1d9f29b4527699c152db2e5dc98cf1ab | f3770406b6997b43f335c347301454a79856fed4 | georgerapeanu/c-sources | /A. Watching TV/main.cpp | C++ | cpp | 561 | no_license | #include <iostream>
#include <cstring>
using namespace std;
int fr[100000];
string a;
int nr;
int T;
int N;
int main()
{
cin>>T;
while(T--)
{
memset(fr,0,sizeof(fr));
cin>>N;
int rez=0,tmp=0;
while(N--)
{
cin>>a>>nr;
fr[nr]++;
if(fr... |
5a32c9f3ec49730714231df5d370bbad9e7c5853 | 8a5e805e8bdad3eff486a5498d176e2b1c367271 | cppbits/Core | /include/bit/core/traits/relationships/pointer_rank.hpp | C++ | hpp | 2,637 | permissive | /*****************************************************************************
* \file
* \brief This header defines the type-trait for determining the level of
* indirection
*****************************************************************************/
/*
The MIT License (MIT)
CppBits Core Library.
h... |
fc508eb312a20fb15de6870f954942b08173034c | 7139bdc20a02615779e675d020600fc023b86d18 | libterty/con_prepare | /swapping-node-linkedlist/main.cpp | C++ | cpp | 746 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(): val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};
/**
* @see https://leetcode.com/explore/challenge/card/march-l... |
d29408d58836ae80fd7b12e407bcdd42d01639ac | 7feaca1f72a3fe97b9cbba4d2b7512820f40079e | dadapoof/feet | /feet.cpp | C++ | cpp | 1,914 | no_license | #include <iostream>
using namespace std;
// Prototype functions:
int inch(int, int);
int centimeters(int);
int m(int);
int cm(int);
// Declaring and Initializing Global Constants
const int INCH_MULTIPLIER = 12;
const double CENTS_MULTIPLIER = 2.54;
int main() {
// Declaring the user's input variables
int fe... |
bb2e9e06805dcfca43f8ec97c5d8f5331e428ba8 | c8d2e8b6accdf5e4e1ddfb0b8f5d7c3575a294fc | ZSShen/IntrospectiveProgramming | /LintCode/Foundation/BinaryTree/480_Binary_Tree_Paths.cpp | C++ | cpp | 1,330 | no_license | /**
* Definition of TreeNode:
* class TreeNode {
* public:
* int val;
* TreeNode *left, *right;
* TreeNode(int val) {
* this->val = val;
* this->left = this->right = NULL;
* }
* }
*/
class Solution {
public:
/**
* @param root: the root of the binary tree
* @retu... |
2ae0b62dfa1fdbf99ac43f52ea18040ef33fbb2b | 9eae3c127476b8aedbbd5dde08ae6a2f9ba0ea95 | guardianofetherra/mirror | /include/mirror/transform.hpp | C++ | hpp | 1,388 | permissive | /**
* @file mirror/transform.hpp
* @brief Implementation of the `transform` operation
*
* Copyright Matus Chochlik.
* 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 MIRROR_TRANSFORM_1105240825_HPP
... |
5f926dd71714c223b922ca4d5238bc8a892342cb | b893cb6d020b88924a9e2dd09a6ecaf2f1ce237e | shtanriverdi/CS487-Introduction-to-Competitive-Programming-Progress | /Contests/Weekly Contest 100/Orderly Queue.cpp | C++ | cpp | 753 | permissive | // Question Link ---> https://leetcode.com/problems/orderly-queue/
class Solution {
public:
string orderlyQueue(string S, int K) {
if (K == 1) {
string curNewStr = getMovedStr(S);
string minStr = min(curNewStr, S);
while (curNewStr != S) {
curNewS... |
6c43d38b11bfcca06cb4ec61c8923f7a67dbabab | 6fa5f1331cbe84552ec7f62538d20258c6f50c8e | ButterflyNetwork/tensorflow | /tensorflow/compiler/tf2xla/mlir_bridge_pass.cc | C++ | cc | 13,936 | permissive | /* Copyright 2019 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... |
91a40b307295d955e7c95875e618c9a7b56eb9ad | aa72f3d861a08cf0a7f13d0ee2cad9130021a986 | hfrappier/chromium | /chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_url_loader_interceptor.cc | C++ | cc | 10,896 | 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/prefetch/prefetch_proxy/prefetch_proxy_url_loader_interceptor.h"
#include <memory>
#include "base/bind.h"
#include "base/callba... |
1b5644c4c336e441d65681239bff047c12a2fed0 | adc7110410a79ba0e663aa6921998727907c0789 | CadQuery/pywrap | /opencascade/RWMesh_NodeAttributes.hxx | C++ | hxx | 1,315 | permissive | // Author: Kirill Gavrilov
// Copyright (c) 2016-2019 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free So... |
fade624112f691655e0c0b5183c02ecde8bfd4c8 | e92c56f2964d48b82745f2693b1b10edb3de54f3 | Virtual-Dev/virtual | /src/wallet/wallet.cpp | C++ | cpp | 157,471 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet.h"
#include "misc/base58.h"
#include "misc/coincontrol.h"
#include "... |
1cb0ea140a23fc7b5773e9568af02cc180133a3c | 7d69e1d975325c79531c1ce726511a9818350b28 | Gushley110/Analisis_de_Algoritmos | /Robado/AnalisisAlgoritmos/Practica9/codigo/huffman.cpp | C++ | cpp | 2,305 | no_license | /*
INSTITUTO POLITÉCNICO NACIONAL
ESCUELA SUPERIOR DE CÓMPUTO
Análisis de Algoritmos
GRUPO: 3CV2
Martinez Berumen Luis Daniel
Profesor: Benjamin Luna Benoso
*/
#include <bits/stdc++.h>
using namespace std;
#include "huff.h"
void codificar(){
FILE *archivoOrigen = fopen("origen.txt","r"... |
bf027aa0755141b6ac5507c0ce6b7ede3db23c65 | 9a9265fbf0593b4e47a48615b3b9325c160db0f1 | amitray1608/PCcodes | /cpp_code/islink.cpp | C++ | cpp | 404 | no_license | #include<bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node* next;
};
void printlist(Node* n)
{
while(n != NULL)
{
cout << n->data << " ";
n = n->next;
}
}
int main()
{
Node *head = new Node();
Node *a = new Node();
Node *b = new Node();
head->data = 1;
head->next = a;
... |
b6c9676818cf5bdaa78096f582f753ae3352cdcc | edac72e98063b3731957d86b28c4ca7b9a0cbfeb | morriscb/astro-stomp | /stomp/stomp_tree_pixel_test.cc | C++ | cc | 27,915 | no_license | #include <stdint.h>
#include <iostream>
#include <math.h>
#include <string>
#include <gflags/gflags.h>
#include "stomp_core.h"
#include "stomp_angular_coordinate.h"
#include "stomp_angular_bin.h"
#include "stomp_angular_correlation.h"
#include "stomp_tree_pixel.h"
#include "stomp_util.h"
void TreePixelBasicTests() {
... |
1375e0da0203a79852cc9d29ed7d5dd8c5a3944d | d09bcfad8a67b34e32689109128a66a7674e8e96 | P4NAD3ROXIS/DearPyGui | /DearPyGui/src/core/AppItems/mvAppItem.cpp | C++ | cpp | 34,266 | permissive | #include "mvAppItem.h"
#include "mvApp.h"
#include "mvInput.h"
#include "mvItemRegistry.h"
namespace Marvel{
mvAppItem::mvAppItem(const std::string& name)
{
m_core_config.name = name;
m_label = name + " ###" + name;
m_core_config.label = name;
m_state.setParent(this);
}
mvAppItem::mvAppItem(const mvAppIt... |
9bcfb0ace1c24e755d1b4b7a4f6c08f44956b328 | 0df654524eecbe7dfb3f89a6f625d62c209e54bb | makio93/atcoder | /ABC/ABC174/D/main2.cpp | C++ | cpp | 1,277 | no_license | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vector<string>
#define vpii v... |
2aa9a0cd93f804de234ff98b75f13b2cf8243620 | fedb48739b06be61bb72de68d733f1fade5fd50e | denis-gubar/Leetcode | /Hash Table/0017. Letter Combinations of a Phone Number.cpp | C++ | cpp | 615 | no_license | class Solution {
public:
void calc(const string& digits, string& prefix, vector<string>& result)
{
if (prefix.size() == digits.size())
{
result.push_back(prefix);
return;
}
vector<string> M{ "", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" };
int digit = digits[prefix.size()] - '0';
... |
bf818ae53c569ad4c9fff0e860071bc10f5c57e2 | 9586cf9b0b1c8a6fd3efd668a1ec23d82a723e68 | robertu94/mlsvm | /src/ut_common.cc | C++ | cc | 994 | permissive | #include "ut_common.h"
#include <iostream>
void UT_Common::load_matrix(const char * f_name, Mat& m_data, bool print){
PetscViewer viewer_data_;
PetscViewerBinaryOpen(PETSC_COMM_WORLD, f_name,FILE_MODE_READ,&viewer_data_);
MatCreate(PETSC_COMM_WORLD,&m_data);
MatLoad(m_data,viewer_data_);
PetscV... |
251df150b04476ea17c018f1bd3485399b619746 | 65feafb002cc1013f8f470d033e428adbd9b3253 | lunar2296/DBTest | /examples/ex429_odbc.cpp | C++ | cpp | 1,632 | no_license | #include <iostream>
using namespace std;
#include <stdio.h>
#if !defined(_WIN32) && !defined(_WIN64) && !defined(__CYGWIN__)
#define OTL_ODBC_UNIX // Compile OTL 4.0/ODBC
#else
#define OTL_ODBC
#endif
#include <otlv4.h> // include the OTL 4.0 header file
otl_connect db; // connect object
void select()
{
otl_str... |
73254e9cb843bb7c35f313e66e6a3594b9716e69 | c6f8c193f8f0cfa0f793cb4c83c6d537523ebef2 | sadrulhc/chromium | /base/task/thread_pool/task_tracker_posix_unittest.cc | C++ | cc | 3,512 | 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 "base/task/thread_pool/task_tracker_posix.h"
#include <unistd.h>
#include <utility>
#include "base/bind.h"
#include "base/callback_helpers.h"
... |
cd9c15dc932a0edc85048c1e53720af938a8b266 | e4ccabc503cca25ad65379021c22ae0551ab5bf6 | arenas7307979/ComputeLibrary | /src/runtime/GLES_COMPUTE/functions/GCPoolingLayer.cpp | C++ | cpp | 2,725 | permissive | /*
* Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* 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
* ri... |
e0a3de71a94576972cf83e780082ecaf35043123 | deb7481453bde46806b9e2548a075cfe042c9b80 | hanrick2000/MyCompetitiveCoding | /ua 12541.cpp | C++ | cpp | 940 | no_license | #include<bits/stdc++.h>
#include <string.h>
using namespace std;
#define nl endl
#define vi vector<int>
#define vb vector<bool>
#define FOR(i,a,b) for(int i=a; i<b;i++)
#define REP(i, n) for (int i=0; i<n; i++)
#define IterV (j, v) for(vector<int>::iterator j = v.begin(); j!=v.end();j++)
#define pb push_back
#define m... |
98662ce7f408799fe8059fe591b5afb2d3f3c123 | 30b96ece017c86310806dbfa077771c8b28459d0 | BiwefC/VirtualKeyboard | /c/src/detect.cpp | C++ | cpp | 2,207 | no_license | #include "detect.hpp"
Detector::Detector()
{
cap.open(0);
assert(cap.isOpened() && "Camera is not open!");
capture_frame();
w = frame.cols;
h = frame.rows;
}
void Detector::capture_frame()
{
cap >> frame;
assert((!frame.empty()) && "Frame is empty!");
}
int* Detector::detect()
{
cv::M... |
71de9546b5dc281e39c84ecbbc68330ff5db3b95 | 4b8f8cfe7e3c7d27527e53eb3ea7cf04731a7f82 | capeanalytics/aws-sdk-cpp | /aws-cpp-sdk-s3/source/model/CreateMultipartUploadRequest.cpp | C++ | cpp | 5,767 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
8a1faf9e5c698c3481e03be0adbf5faa1548675d | c5e506d1bb1ae340852197d27756c57d173b1936 | petri33/XBranch-1 | /splitter/mb_splitter.cpp | C++ | cpp | 31,627 | no_license | /*
*
* The splitter main program.
*
* $Id: mb_splitter.cpp,v 1.1.2.6 2007/08/16 23:03:19 jeffc Exp $
*
*/
#include "sah_config.h"
#undef USE_MYSQL
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <strings.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/statvfs.h>
#include <sys/wa... |
5a9e8692c04afb0ea1de52182f016d154fdae869 | 1fc7b9c13cbec51e0c079f89d9e2961d9769cb33 | afewcool/tcp-ue4 | /Source/TCPWrapper/Private/TCPClientComponent.cpp | C++ | cpp | 3,546 | permissive |
#include "TCPClientComponent.h"
#include "Async.h"
#include "TCPWrapperUtility.h"
#include "Runtime/Sockets/Public/SocketSubsystem.h"
#include "Runtime/Engine/Classes/Kismet/KismetSystemLibrary.h"
TFuture<void> RunLambdaOnBackGroundThread(TFunction< void()> InFunction)
{
return Async(EAsyncExecution::Thread, InFunct... |
94735f38e5a2febdf52d3d8d6ca6b912c82e2cb1 | 74e098c330bf75794445de1b6c5cc564712c341d | plWang/crack-leetcode | /Algorithms/071-simplifyPath/simplifyPath.cpp | C++ | cpp | 1,141 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
string simplifyPath(string path) {
vector<string> result;
int start = 0;
for (int i=0; i<path.size(); i++) {
if (path[i] == '/' || i == path.size()-1) {
string subpath;
if (path[i] == '... |
156536aee22491baca2882f1493699665e8f2b72 | 30570e67c1a6251867452f635a95ceec51815a3b | adidasMADHackathon/Eyelight | /OpenCV2/main.cpp | C++ | cpp | 25,277 | no_license | //Written by Kyle Hounslow 2013
// modified by: Ahmad Kaifi, Hassan Althobaiti
//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 t... |
6de92bbc615e15b9cfae68177c5a000921bfec32 | 7b6e2b5a78ed3dd528a0471468bcc1c982ec7fed | seobyeongky/multi-ai | /src/basic/logger.cpp | C++ | cpp | 1,481 | no_license | #include "logger.h"
#include <chrono>
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <Windows.h>
Logger::Logger(const wstring & file_name, WindowHandle h_wnd)
: _f_stream(), _clock(), _h_wnd(h_wnd)
{
_f_stream.imbue(locale("korean"));
_f_stream.open(file_name, fstream::app);
typedef chr... |
84a6641ab1aca7b2b19b084e4bc6474986268d1c | 8e062c3d9c346abf6d74771ac3033024c198cd84 | UdjinM6/dash | /src/test/denialofservice_tests.cpp | C++ | cpp | 16,153 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Unit tests for denial-of-service detection/prevention code
#include <arith_uint256.h>
#include <banman.h>
#include <chain... |
d06e1a71e2191059a107a8b501deef3663495418 | 89d2f9b48a36386fc8a450c04416ec6113d356ef | lgaeun/algorithm_study | /28주차/2230_정하늘.cpp | C++ | cpp | 1,623 | no_license | #include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
int getMin(int x, int y) {
return x <= y ? x : y;
}
int main() {
int n, M;
scanf("%d%d", &n, &M);
vector<int> arr;
for (int i = 0; i < n; i++) {
int x;
scanf("%d", &x);
arr.push_back(x);
}
sort(arr.begin(... |
fa2faf3805a770c6965a7993e49491d628d5bca2 | b7735a2aa6f2556a384959c6666f2e0493baf2c8 | ericbls/fabrica_inteligente | /app_desafio3/beacon/enviar_dados.cpp | C++ | cpp | 313 | no_license | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fstream>
#include <time.h>
#include <ctime>
#include "get_machine_data.h"
int main(){
getMachineData dados_maq;
while(true)
{
dados_maq.get_machines();
dados_maq.execute();
sleep(10);
}
return 0;
}
|
b807b8d2e70e106c561177e81c4054a8251f5957 | 26d50ff84c42edd7e2087ff6394ebccd186803d7 | dashboardijo/TechWrap | /Algorithms/DynamicProgramming/LCS.cpp | C++ | cpp | 2,263 | no_license | /**
* LCS Problem Statement: Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example, “abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, .. etc are subsequences of “abcdefg”. So a string of ... |
0280ee53a9789098bfc68da06da4f9a1cd220060 | d273689c67e6e6bd11c57af388c4d4dcdfddcab6 | votca/votca | /xtp/src/libxtp/gyration.cc | C++ | cc | 8,003 | permissive | /*
* Copyright 2009-2020 The VOTCA Development Team
* (http://www.votca.org)
*
* 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
*
* h... |
7736bea721bfe0fb37d3272155f274902fdcbc95 | 3b4ac18d3b3304788a68fe2bbafc39896456b601 | mokul791/Vertex-Cover-Problem-Optimization | /InputParser.cpp | C++ | cpp | 4,036 | no_license | #include <iostream>
#include <sstream>
#include <vector>
#include "InputParser.hpp"
std::shared_ptr<Command> CommandParser::getCommand(std::string const & line) {
if(line.size() < 3) {
return std::shared_ptr<Command>(NULL);
}
std::string cmdSymbol = line.substr(0, 1);
std::string par... |
19972037e8f55c3b88c0c38d6f55f1aa65d0f5ef | c8588122971cac56cdfa48991e5e04bbb693ed8b | liuyuhua1984/aliyun-openapi-cpp-sdk | /cloudapi/src/model/ImportSwaggerResult.cc | C++ | cc | 2,478 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud 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... |
49400d854d182728b7fc108c5927243397cc0b3f | 3aa8ec1582d24e07c3fb40c380e3fd67c4a73774 | emk/pstsdk | /samples/pstvalues/main.cpp | C++ | cpp | 1,164 | no_license | #include "values.h"
#include <string>
#include <iostream>
#include <regex>
#include <stdexcept>
#ifdef USE_BOOST
namespace REGEX = boost;
#else
namespace REGEX = std::tr1;
#endif
void print_value(int i)
{
using namespace std;
wcout << values[i].name;
wcout << L": " << dec << values[i].v... |
520ee48a5fba20c5983a6124d2f0ffb90032f14b | 3ccf4ded37dc9a0a414772ce87bade0be6217add | henrikuuste/ESTCube-TechTalks | /Metaprogramming/libs/brigand/brigand/functions/arithmetic/divides.hpp | C++ | hpp | 616 | permissive | /*==================================================================================================
Copyright (c) 2015 Edouard Alligand and Joel Falcou
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
======================... |
099d4c36cc4f0252f1221226c9046aea044f89ef | 3b87cbf747b746171559d93da7572298ad66eb2a | rahulroshan96/placement | /OOPs/inheritance.cpp | C++ | cpp | 944 | no_license | #include <iostream>
using namespace std;
class Base{
private:
int t;
public:
Base(){
cout<<"Base Class Constructor\n";
}
static void setT(int n)
{
t = n;
}
int getT()
{
return t;
}
~Base(){
cout<<"Base Class Destructor\n";
}
};
class Derived : public Base {
private:
int d;
public:
... |
cc094a71e4a6a1b0456a9dff9c8783979eca5abc | 89d29e72217174d393caeba4521befc0b3a2ecdc | researcherben/course-notes | /introduction_to_C++_programming/labfiles_from_zip/examples/3/3-6.cpp | C++ | cpp | 319 | no_license | //
// 3-6.cpp
//
#include <iostream>
int main( )
{
int x, y;
std::cout << "input a value ";
std::cin >> x;
std::cout << "You input " << x << "\n";
std::cout << "input two values ";
std::cin >> x >> y;
std::cout << x << " * " << y
<< " is " << x * y << "\n";
return 0;
}
|
4e1a8155ab96b7b3346f9a4ddcfb2e8010af8a3c | 7826ae187c8d4fdcce810d023dfbf4af8502e2d1 | merrymercy/Halide | /src/runtime/openglcompute.cpp | C++ | cpp | 36,623 | permissive | #include "HalideRuntimeOpenGLCompute.h"
#include "device_buffer_utils.h"
#include "device_interface.h"
#include "mini_opengl.h"
#include "printer.h"
// Implementation note: all function that directly or indirectly access the
// runtime state in halide_openglcompute_state must be declared as WEAK, otherwise
// the beha... |
c8a58654d443d84c8c3592fa1eb3006061115a7a | 2b74f7b062cbf93125265b9bd299f344be50e39a | avocadoboi/Save-him | /Desktop-project/Source/ChooseDifficulty.hpp | C++ | hpp | 2,765 | no_license | #pragma once
#include "App.hpp"
#include "Game.hpp"
#include "Slider.hpp"
#include "../Resources/Strings.hpp"
#include "../Resources/Paths.hpp"
//------------------------------
class App;
class ChooseDifficulty : public AvoGUI::View
{
public:
static constexpr float TITLE_POSITION = 0.2f;
static constexpr float M... |
543e87ae16821879d545477bb57e621209bd38a3 | f9803096ddd086fe995667251fae1d45565b61e6 | Vizionnation/chromenohistory | /third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.cc | C++ | cc | 6,619 | 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 "third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h"
#include "base/synchronization/waitable_event.h"
#include "third_party... |
25bf337adc74a2a58a042e2a782bf400694b2dd7 | a7fcfc88fcf039d8c43bd94c6ce0f36898d0abc3 | sailfish-os-apps/wht | /src/Launcher.cpp | C++ | cpp | 2,249 | permissive | /*
Copyright (C) 2017 Olavi Haapala.
<harbourwht@gmail.com>
Twitter: @0lpeh
IRC: olpe
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 not... |
e9f8e26e2377a653db36947a9cc24a67d44ef860 | a03255c62667599bcb9286283e174c169e79950a | xierensong/learngit | /timus/t1260.cpp | C++ | cpp | 499 | no_license | #include <iostream>
using namespace std;
int main()
{
int dp[56];
int N = 0, i = 0;
cin >> N;
if (N == 1 || N == 2)
cout << 1 << endl;
else
{
dp[1] = 1;
dp[2] = 1;
dp[3] = 2;
for (i = 4; i ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.