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 |
|---|---|---|---|---|---|---|---|---|
d3344483c67b436e6dde5aeb9d3377a1f7f5bedc | 469d36d4eade1ebf5541949e73386c4feefa7d56 | k0zmoz/CPProjet | /character.cpp | C++ | cpp | 2,373 | no_license | #include <SFML/Graphics.hpp>
#include <iostream>
#include "main.hpp"
#include "character.hpp"
using namespace sf;
using namespace std;
Character::Character ()
{
dir_ = Down;
x_ = 0;
y_ = 0;
change_look_ = true;
attacking_ = false;
step_mov_ = 0;
step_atk_ = 0;
clk_atk_ = new Clock()... |
1f4bdbfdd5b1083cb6bbda55ecc2f7096266e498 | f060e3a1b69d306c9783c4a8b0b85565552342a7 | seonghyun-code/C-Cpp | /2. doodle/두들낙서/65_/69-1.cpp | C++ | cpp | 2,506 | no_license | // 깊은 복사도 나름 단점이 있다.
// 객체 크기가 클수록 복사해야 하는 양이 많아짐.
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
class String {
public:
String() {
cout << "String() : " << this << endl;
strData = NULL;
len = 0;
}
String(const char* str) {
cout << "String(const char*) : " << this... |
ba81e9f8ac825418453bc6004d06ebc9d31e53e0 | 07506abeb976f05ce7fa159adbb2f960be493aa3 | hwlsniper/enudex-core | /libraries/chain/db_init.cpp | C++ | cpp | 30,655 | permissive | /*
* Copyright (c) 2017 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* 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... |
1bc8330258bbe8498d7c0633c5d1342593a7ea64 | 864079effd1b3f62fb6f77ddeeb4e40c60d70141 | mynameisfiber/amr | /cell.hpp | C++ | hpp | 1,672 | no_license | #include <vector>
#include <cstdlib>
#include <cmath>
#include <stdio.h>
class Cell;
struct Neighboor
{
Cell *cell;
std::vector<double> dx;
double distance;
Neighboor(Cell *me, Cell *them);
};
struct Face
{
Cell *cell;
std::vector<double> start, end; // Endpoints of the face
short int orientation; ... |
1b95c8a2d9694045a784ab26e0327bf0cb11e88a | 07674bd5cfab1d3ffa7490e9e4d971a10ef76651 | airhoodz/GameIssue | /src/ComponentPairHash.hpp | C++ | hpp | 364 | no_license | #ifndef ComponentPairHash_hpp
#define ComponentPairHash_hpp
#include <cstddef>
struct ComponentPairHash
{
template <typename T>
std::size_t operator()(T t) const
{
std::size_t x = t.first->owner->instanceID->Get();
std::size_t y = t.second->owner->instanceID->Get();
return (x >= y) ? (x * x + x... |
8be97e48607fd12495f385b8a856473daca88d17 | 77b7ed781810486ee3c021843b7f297ab93a2340 | WhiZTiM/coliru | /Archive2/a6/fdb6b997c161b9/main.cpp | C++ | cpp | 547 | no_license | template <class O1, class O2>
struct Outer {
template <class I1, class I2>
struct Inner { double d; };
};
template <class O1, class O2>
template <class I2>
struct Outer<O1, O2>::Inner<int, I2> { int i; };
template <>
template <class I2>
struct Outer<double, int>::Inner<char, I2> { char c; };
int main() {
Out... |
8fa6aeb77f1009e68bcbe092ea3857dcfd4618c1 | b585376d61ee6a144639817933da1766ea604c92 | junpfeng/millionTCPServer | /HelloSocket/dependence/include/EasyTcpServer.hpp | C++ | hpp | 6,616 | no_license | #ifndef _EasyTcpServer_hpp_
#define _EasyTcpServer_hpp_
#include"CELL.hpp"
#include"CELLClient.hpp"
#include"CELLServer.hpp"
#include"INetEvent.hpp"
#include "CELLNetWork.hpp"
#include<thread>
#include<mutex>
#include<atomic>
class EasyTcpServer : public INetEvent
{
private:
// 线程管理对象
CELLThread _thread;
SOCKET... |
5bc612822b2e31456881800f0adbd17614bf9f85 | fa3fe926fcd93fb16143ca1cba909f73ac9c043c | zhanb/benson-style | /C++/synchronize/lockfree&pthread_mutex/my_lockfree.cpp | C++ | cpp | 2,375 | no_license | #include <pthread.h>
#include <boost/lockfree/queue.hpp>
#include <iostream>
#include <time.h>
#include <boost/atomic.hpp>
using namespace std;
//生产数量
boost::atomic_int producer_count(0);
//消费数量
boost::atomic_int consumer_count(0);
//队列
boost::lockfree::queue<int> queue(512);
//迭代次数
const int iterations = 10000;
/... |
1b345f54d8ef6d877e44bf190f49fe20c88202fe | b5cfa47e54cc4efe97aa969f190ddf5a8ffcee02 | sradl1981/rayfactor | /src/TaperedCylinderSurface.cpp | C++ | cpp | 9,676 | no_license | #include "TaperedCylinderSurface.h"
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TaperedCylinderSurface::TaperedCylinderSurface
//
// Comments : Default constructor
//
// Arguments : obID is the objects identification number
// sR is the radius o... |
2514cf3c071fd4348806d349a53fa076589d3de0 | 708b9d77db716144befbb11e16f6b1a5c36c8eb4 | Code-Guy/leetcode | /Array/46. Permutations.cpp | C++ | cpp | 1,513 | no_license | // Solution 1 backtracking
class Solution {
public:
vector<vector<int>> permute(vector<int>& nums) {
vector<vector<int>> permutations;
vector<int> permutation;
permute(nums, permutations, permutation);
return permutations;
}
private:
void permute(const vector<int>& nums,... |
a097aca6349ae50b3254679f10edf1bd8f931edb | ed3d45f6919e2965b1527ffef7bd2b568d70f606 | ryppl/boost-history | /boost/boost/interprocess/smart_ptr/detail/sp_counted_base_atomic.hpp | C++ | hpp | 2,309 | permissive | #ifndef BOOST_INTERPROCESS_DETAIL_SP_COUNTED_BASE_ATOMIC_HPP_INCLUDED
#define BOOST_INTERPROCESS_DETAIL_SP_COUNTED_BASE_ATOMIC_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media L... |
5b2016a1aafdd7d0bc3edafe4c0f918edcf10781 | ffb6806248040f71e45f6b1b0777f98cb8e47f19 | caomw/cuc_double | /lib/magma-2.2.0/sparse/control/magma_zmlumerge.cpp | C++ | cpp | 3,246 | no_license | /*
-- MAGMA (version 2.2.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date November 2016
@precisions normal z -> s d c
@author Hartwig Anzt
*/
#include "magmasparse_internal.h"
#define RTOLERANCE lapackf77_dlamch( "E" )... |
9922424019ae634cce78eefeebae54261c6e9cd4 | b73d3c77147e2d843f16b2c415842dbaa8aa62fd | gchanan/pytorch | /aten/src/ATen/native/AdaptiveAveragePooling.cpp | C++ | cpp | 10,561 | permissive | #include <ATen/ATen.h>
#include <ATen/NativeFunctions.h>
#include <ATen/Parallel.h>
#include <tuple>
namespace at {
namespace native {
namespace {
inline int start_index(int a, int b, int c) {
return (int)std::floor((float)(a * c) / b);
}
inline int end_index(int a, int b, int c) {
return (int)std::c... |
518ecb2a3ff7e7fe126a169219d911a3d0229bb9 | 62fe9c237a2018df739ea9962ac90ab02acc217c | zoolib/zoolib_cxx | /Project/zoolib/HTTP/Requests.cpp | C++ | cpp | 9,582 | permissive | // Copyright (c) 2008 Andrew Green. MIT License. http://www.zoolib.org
#include "zoolib/HTTP/Requests.h"
#include "zoolib/Chan_Bin_Data.h"
#include "zoolib/ChanW_Bin_More.h"
#include "zoolib/Chan_XX_Tee.h"
#include "zoolib/ChanRU_XX_Unreader.h"
#include "zoolib/Channer_XX_Wrapper.h"
#include "zoolib/HTTP.h"
#include ... |
da9266c2abd48512f9813c03587ed8d4b8cd65ed | 17dc6f680687313265ce410fb82e8be28dcc3a82 | aethalas/Beat-My-Bot | /BMB Program/myinputs.cpp | C++ | cpp | 25,919 | no_license | // My inputs.cpp Version 10 11/5/05
// The definition file for the MyInputs class - declared in myinputs.h
// 6b - NewMouseUp and NewMouseDown methods added
// 9.3 fixed bug caused by not setting pointers to null in destructor
// 10 Added ErrorLogger support.
// Tidied up safety of code.
// Added more error me... |
cca1cc7703096e71d90ad40d5112f967c5c1690c | 7d3836e333ede21c4b551e8bfdf4dc15afeaebe8 | nampud/chromium | /components/password_manager/core/browser/password_store_unittest.cc | C++ | cc | 53,994 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#... |
46f5684c20cfda2b1df1e0d044a49aaaf09d4ff6 | 95a58675aefb8a0bc8223583cddd1f8ee17d6c62 | achen889/Warlockery_Engine | /Engine/Sound/SoundSystemFMOD.hpp | C++ | hpp | 5,264 | permissive | //==============================================================================================================
//SoundSystemFMOD.hpp
//by Albert Chen Mar-7-2016.
//==============================================================================================================
#pragma once
#ifndef _included_SoundSyste... |
5baac82b856afd44e83983293bb9577a479c180f | 08ba9313387dce07d5895f622ad4551547824b74 | tanmoy13/LightOj | /1010 - Knights in Chessboard/main.cpp | C++ | cpp | 2,143 | no_license | /*
MMP""MM""YMM db `7MN. `7MF'`7MMM. ,MMF' .g8""8q.`YMM' `MM'
P' MM `7 ;MM: MMN. M MMMb dPMM .dP' `YM.VMA ,V
MM ,V^MM. M YMb M M YM ,M MM dM' `MM VMA ,V
MM ,M `MM M `MN. M M Mb M' MM MM MM VMMP
MM AbmmmqMA ... |
e404225e8b6d6605d2efce6461813dbf381b309c | 331951395f4dfa26f46796a9713573480c6c1b3d | My-phd-degree/G-VRP-instance-generation | /src/models/gvrp_models/gvrp_feasible_solution_heuristic.cpp | C++ | cpp | 2,759 | no_license | #include "models/vertex.hpp"
#include "models/distances_enum.hpp"
#include "models/gvrp_models/gvrp_feasible_solution_heuristic.hpp"
#include "models/gvrp_models/gvrp_instance.hpp"
#include "models/gvrp_models/gvrp_solution.hpp"
#include "utils/util.hpp"
#include <float.h>
#include <iostream>
#include <list>
#include ... |
43a4c733bf266826cd175462fe84b399b884a786 | 9bf9d04dc419e1ce0c6e750aa3da4e4ed39f884a | MagnusDrumsTrumpet/JamTaba | /Client/src/audio/vst/PluginFinder.cpp | C++ | cpp | 245 | no_license | #include "PluginFinder.h"
using namespace Vst;
void PluginFinder::clearScanFolders(){
scanFolders.clear();
}
void PluginFinder::addFolderToScan(QString path){
if(!scanFolders.contains(path)){
scanFolders.append(path);
}
}
|
4664b09ed17b7b85f4ac35c10cd6b30073a2a285 | f3a823167d2640a1e6f816037a7b80be55203040 | SiCheng-Zheng/incubator-pegasus | /src/reporter/pegasus_counter_reporter.cpp | C++ | cpp | 13,528 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
395f91e7b21313a3dad49c6e656168a00b966c47 | cc0abace645c56730d312ac7276a5ca4688913b4 | amitray1608/PCcodes | /Google/GKS21/B/b.cpp | C++ | cpp | 531 | no_license |
//Sleepy as Hell.
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> a(n);
for (int &i : a) {
cin >> i;
}
int maxi = 0;
vector<int> b;
for (int i = 0; i < n; i++) {
b.push_back(
for (int j = i + 1; j < n; j++) {
}
}
cout << maxi << '\n... |
54887fb44d1f5bd3fe6e4f8cde2d1935c78b0c33 | a5ee792f4af8855e73330928d10894eccd4fe074 | blusno1/chromium-1 | /chrome/browser/engagement/important_sites_util.cc | C++ | cc | 19,855 | 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/engagement/important_sites_util.h"
#include <algorithm>
#include <map>
#include <memory>
#include <set>
#include <utility>
#inc... |
aff85a74836d9e94cb3a12a8b82c42a3e2dfe7df | 3794a7ab3ff9d2afcbe5f2c863fcb97536d82cc3 | tuxianchao/electron | /atom/browser/api/atom_api_debugger.cc | C++ | cc | 6,161 | permissive | // Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/browser/api/atom_api_debugger.h"
#include <memory>
#include <string>
#include <utility>
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/... |
95b85002ed0e751b5a95746cc9dc2f8dde87e561 | e93d009b9d0f2ec9ab54d969cf6aa3a6c9d4e220 | Tynk3r/sp2017grp7 | /SP1Framework/Framework/console.cpp | C++ | cpp | 8,559 | no_license | #include "console.h"
#include <cstdio>
/* Standard error macro for reporting API errors */
#define PERR(bSuccess, api) { if(!(bSuccess)) printf("%s:Error %d from %s \
on line %d\n", __FILE__, GetLastError(), api, __LINE__); }
//--------------------------------------------------------------
// Purpose : Setting ... |
ae1cbcc1193f6290008f8795db0f545c3f8ac265 | bef290c9b16756432a1b977d1f8f04ef2d5b8c1b | Casprovy/numerical-methods-in-finance-with-cpp | /Exe1-9_Main07.cpp | C++ | cpp | 880 | no_license | #include "BinModel01.h"
#include "Exe1-9_Options03.h"
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double S0,U,D,R;
if (GetInputData(S0,U,D,R)==1) return 1;
double K; //strike price
int N; //steps to expiry
cout << "Enter call option data:" << endl;
... |
7a1303ffa9558641ed008809c9532a872664a02d | 621a4fa8685ffc603673762a10133cc1dd15f4e2 | michjuc/TD_2020_44353 | /Lab7/Lab7/Lab7.cpp | C++ | cpp | 6,861 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
class Signal {
public:
const std::string BITS;
const int G_MATRIX[7][4] = { {1,1,0,1},{1,0,1,1},{1,0,0,0},{0,1,1,1},{0,1,0,0},{0,0,1,0},{0,0,0,1} };
const int PARI... |
ec674188ca178f201408735a838f8773e202bb8e | 967dedf41df019f945ff6ba0824de5ae85f04b0e | praveenmunagapati/SMTK | /smtk/resource/Component.cxx | C++ | cxx | 921 | permissive | //=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
8aadb87e1094d6228605bfae61e5a793f571f9ae | 031a85db6e74e75db98fa1680fb1c2dc73f18ac2 | cwlmyjm/functionflow | /ff/src/common.cpp | C++ | cpp | 1,827 | permissive | /***********************************************
The MIT License (MIT)
Copyright (c) 2012 Athrun Arthur <athrunarthur@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without ... |
0c89accbaddbe172d85235091c1539a030260e97 | 21138e3e1195f95d9dd9da71e1a5f0b384abcb5e | syldrathecat/nxtlauncher | /src/nxt_message.cpp | C++ | cpp | 2,834 | permissive |
#include "nxt_message.hpp"
#include <algorithm>
#include <array>
#include <stdexcept>
#include <cstring>
namespace
{
unsigned int decode_short_le(const char* src)
{
const unsigned char* src_uc = reinterpret_cast<const unsigned char*>(src);
return static_cast<unsigned int>(src_uc[0] << 8)
| static_cast... |
9618af1a861bb0204a4d029f490531ba1a8530e4 | dd6adaac7f3e5be3fa7ec7ab14db203ff4ffdeca | pshoben/llutils | /include/llutils_unsigned_cstr_to_num.hpp | C++ | hpp | 7,548 | permissive | #ifndef llutils_unsigned_cstr_to_num_hpp
#define llutils_unsigned_cstr_to_num_hpp
#include <cstdlib>
#include <cstring>
#include <type_traits>
#include <utility>
#include <limits>
#include <algorithm>
#include <limits.h>
//#include "llutils_harness_utils.hpp"
#include <iostream>
#if __GNUC__
#define LLUTILS_BUILTIN_... |
4986f487a38d02e555ec63849853fc7bf01a9e6b | fe47467fed1bb24290be06b413accee76035f860 | Torashi1069/xenophase | /custom/client-rfexe/src/network/Packet.hpp | C++ | hpp | 1,825 | no_license | #pragma once
#include <assert.h>
#include <stdint.h>
#include <type_traits> // std::is_empty<>
#if defined(_MSC_VER) && _MSC_VER == 1500 // vs2008 compat
namespace std { using std::tr1::is_empty; }
#endif
/// RO packet container.
class Packet
{
public:
explicit Packet(size_t size) : m_size(size) { }
short type() c... |
6bb02fdd391017f61842e1cfa037380712eaf829 | 4369dd6a69f14fc5539257f7169e5273f5cb18ab | germanohn/competitive-programming | /camp1-usp/dia7/f.cpp | C++ | cpp | 1,810 | no_license | #include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define debug(args...) fprintf (stderr, args)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
// ATENCAO: cuidado com as variaveis dadas no exercicio, nao as reutilize
const int MAX = 25;
const ... |
f9d9d25c991bc4fc3f2600c925f375de670751d8 | ed74d7cbc32d9bfd159b333c999ec0651d52e420 | kablammyjr/ArcadeShooter | /ArcadeShooter/Intermediate/Build/Win64/UE4Editor/Inc/ArcadeShooter/ArcadeShooterCharacter.gen.cpp | C++ | cpp | 15,697 | no_license | // Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
==============================================================... |
a663fb375b69b687285fd269a04ef65ad37ba1ca | 9c503363b17dbf0908a44a18c4ee8c8a890eb7c8 | PacktPublishing/Hands-On-Functional-Programming-with-Cpp | /Chapter03/immutabilityPassByReference.cpp | C++ | cpp | 480 | permissive | #include <iostream>
using namespace std;
auto increment = [](int& value) {
return ++value;
};
auto incrementImmutable = [](const int& value){
return value + 1;
};
int main(){
int valueToIncrement = 41;
cout << increment(valueToIncrement) << endl;// prints 42
cout << valueToIncrement << endl;// ... |
825608410795d10d47764e1aeaf84a3ff29a9c60 | 633d1ee4ce58049e4cc3bba6e18d9848d5107383 | ankur-kayal/Contests | /codeforces/1566/A.cpp | C++ | cpp | 378 | no_license | #include <bits/stdc++.h>
using namespace std;
#define nl '\n'
void run_cases() {
int n, s;
cin >> n >> s;
int half = n / 2;
int eq = s / (half + 1);
cout << eq << '\n';
}
int main() {
ios_base::sync_with_stdio(0); cin.tie(nullptr);
int tests = 1;
cin >> tests;
for(int tes... |
121cf0d0c466632c6336d330139f780320d4744c | 052e805e209e811a2254f2d3b0096dbc82dce72d | tanmesh/cuddly-enigma | /gcd_lcm.cpp | C++ | cpp | 254 | no_license | //gcd and lcm
#include <stdio.h>
int main()
{
printf("give number to find gcd and lcm\n");
int a,b,tmp;
scanf("%d%d",&a,&b);
while(b!=0) {
tmp=a%b;
a=b;
b=tmp;
}
printf("gcd = %d\n",b);
int lcm=(a*b)/b;
printf("lcm =%d\n",lcm);
return 0;
} |
89922cc4fc801d539b16a0cef0e0168b7f351efd | ab7c58635bb93e57b67db6a396489c563f4fbb0d | bramnyadewi007/Pixels | /Pixels.cpp | C++ | cpp | 52,514 | no_license | /*
* Pixels. Graphics library for TFT displays.
*
* Copyright (C) 2012-2015 Igor Repinetski
*
* The code is written in C/C++ for Arduino and can be easily ported to any microcontroller by rewritting the low level pin access functions.
*
* Text output methods of the library rely on Pixelmeister's font dat... |
2f9f9a7fae928027c5a7c7f8443f9f318a089c68 | 716b82e08199535ed7ddeebe393a398d0fbd9c45 | bolidezhang/socketlite | /src/SL_Crypto_SHA1.cpp | C++ | cpp | 1,254 | permissive | #include "SL_Crypto_SHA1.h"
#ifdef SOCKETLITE_USE_OPENSSL
SL_Crypto_SHA1::SL_Crypto_SHA1()
{
init();
}
SL_Crypto_SHA1::~SL_Crypto_SHA1()
{
}
int SL_Crypto_SHA1::get_digest_len()
{
return SHA_DIGEST_LENGTH;
}
int SL_Crypto_SHA1::init()
{
return SHA1_Init(&ctx_);
}
int SL_Crypto_SHA1::update(const unsign... |
e5fd2a118c1803fad585a6eacc7281320f9e0f0f | fe46687f3c5569fd2f08b457ce5767226d2071a0 | benadski/badge | /src/Fri3dBadge/examples/Fri3dBadge_IR.cpp | C++ | cpp | 4,009 | permissive | #include <avr/sleep.h>
#include "Arduino.h"
#include "Fri3dBadge_IR.h"
// RGB LED
#define red_pin 5
#define green_pin 10
#define blue_pin 9
// Button
#define button_pin 0
// IR
#define ir_tx_pin 13
#define ir_rx_pin 1
#define ir_rx_vcc 4
Fri3dBadge::Fri3dBadge() {
// prepare RGB LED pin
pi... |
06c20841b392424b74d0f674f3c3a4edcd7a7555 | b1c867188e9b7d28e6b09376d3589aed2661182c | liu1700/Fire-Engine | /Fire-Engine/textureclass.cpp | C++ | cpp | 744 | no_license |
//////////////////////////////////////////////////////////
//文件名: textureclass.cpp 日期: 创建于:2014/1/11
//////////////////////////////////////////////////////////
#include "textureclass.h"
TextureClass::TextureClass()
{
m_texture = NULL;
}
TextureClass::TextureClass(const TextureClass& other)
{
}
TextureClass::~Tex... |
c2f1c04d7c0748ed070b24f1add44de0258a44e4 | ac81e4e52e7a643df6d5cee1f201e49787284ba3 | microsoft/tensorflow-directml | /tensorflow/compiler/xla/service/gather_expander_test.cc | C++ | cc | 5,241 | permissive | /* Copyright 2018 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... |
0b96fa3270b30432ee086a3825a513992fe2b924 | ecd53cd56ce067c53a7a4e87595ece0cd6765910 | timxx/VC6-Platform-SDK | /VC6PLATSDK/samples/sysmgmt/mmc/mmc2.0/simple/compdata.cpp | C++ | cpp | 8,034 | no_license | /////////////////////////////////////////////////////////////////////////////
//
// This source code is only intended as a supplement to existing
// Microsoft documentation.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIM... |
4edd3b8a661cc48c2cc28713e056409153214103 | 9c662d2c86a3079ab1d8418d527d33bbb1dad76c | cfreeman/the_room | /openframeworksSynapse/addons/ofxOpenNI/src/ofxHandGenerator.cpp | C++ | cpp | 9,542 | no_license | #include "ofxHandGenerator.h"
#include "ofxOpenNIMacros.h"
#include "ofxTrackedHand.h"
// ctor
//--------------------------------------------------------------
ofxHandGenerator::ofxHandGenerator(){
// set defaults
setMinDistBetweenHands(100);
setMaxNumHands(2);
setSmoothing(1);
setMinTimeBetweenHands(1000);
}
//... |
d1a0d51502e3f30ed323edff014a5de715ecedfe | 4f957f3610c2f4daa46b14987209fdcdf27eafd4 | sasq64/musicplayer | /src/plugins/openmptplugin/openmpt/common/mptFileIO.cpp | C++ | cpp | 10,554 | permissive | /*
* mptFileIO.cpp
* -------------
* Purpose: File I/O wrappers
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#include "stdafx.h"
#include "mptFileIO.h"
#ifdef MODPLUG_TRACKER
#if MPT_OS_WINDOWS
#include <WinI... |
e7175c7b6c58c60ddaa4ffaaf0fe834c061c8ce4 | 882839adbe7faccb4ae21d83d4935f1bfb191c99 | nirmalya-broad/PatHCap_PL | /shell_scripts/Dev/COORDS_TO_CP.cpp | C++ | cpp | 3,950 | no_license | #include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
#include <cctype>
#include <sstream>
#include <cstdlib>
using namespace std;
/*---------------------------------------------------------------------------
This program takes in a file with start, stop coords and dir of transripts
and outputs... |
6436e1f135051a9a6b97feebd84f7c46d4ca9120 | f90b7092d4966c906ded73d65197616eb44f628d | BronzeDrum/llvm | /lib/Fuzzer/FuzzerLoop.cpp | C++ | cpp | 25,490 | permissive | //===- FuzzerLoop.cpp - Fuzzer's main loop --------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
3d90a6cd66f75c7a8ac812a801ddc9a2a42fe1a5 | 1d6dbf3492d3b42535563f82bea0ab86a2d4b4cb | open-goal/jak-project | /game/graphics/opengl_renderer/Shadow_PS2.cpp | C++ | cpp | 86,659 | permissive | #include "common/log/log.h"
#include "game/graphics/opengl_renderer/ShadowRenderer.h"
void ShadowRenderer::run_mscal10_vu2c() {
// ENTER_10:
// iaddiu vi01, vi00, 0x358 | nop 10
vu.vi01 = 0x358; /* 856 */
// iaddiu vi02, vi00, 0x364 | nop 11
vu.vi0... |
c8bc8680175fe60b91e0091f708fae2a091ac3a2 | a209806147459d5309e2ccb0ffccd13ba3f30d4a | dava-bot/dava.framework | /Tools/ResourceEditor/Classes/Qt/LicenceDialog/LicenceDialog.cpp | C++ | cpp | 1,432 | no_license | #include "LicenceDialog.h"
#include "ui_licencedialog.h"
#include "Settings/SettingsManager.h"
namespace
{
}
LicenceDialog::LicenceDialog( QWidget* parent )
: QDialog( parent, Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint )
, ui( new Ui::LicenceDialog )
, accepted( false )
{
ui->setupU... |
6450dab049d104ef8e35277da08d88e77d55d80e | d04252a2ca715e80c8f898b5dd5c7d07b36e1e5d | Dimillian/openmw | /apps/openmw/mwworld/class.cpp | C++ | cpp | 13,173 | no_license | #include "class.hpp"
#include <stdexcept>
#include <components/esm/defs.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/world.hpp"
#include "../mwworld/esmstore.hpp"
#include "ptr.hpp"
#include "refdata.hpp"
#include "nullaction.hpp"
#include "failedaction.hpp"
#... |
55c197ab5dd784b39f7318017297d1bcd579aff4 | 28ffa59dd68fe4f202a0efa53193b77149349209 | kiransdas/Labs | /Computer Networks/Routing Protocols/netanim.cc | C++ | cc | 3,806 | no_license | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program 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 Foundation;
*
* This program is distributed in the hope that it will be us... |
ff3616e0fa76241c8393fe59ab1326069e191f98 | 9c146bc5b317c9fd2d41d5209c1665493665bb21 | shahzadlone/chromium | /fuchsia/app/cast/bindings/cast_channel_browsertest.cc | C++ | cc | 7,636 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/fidl/cpp/binding.h>
#include "base/barrier_closure.h"
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/macros.h"
#in... |
2245c5f02f1f7bb74fc2b61a7a674b89177df18c | be8ba420cb190d6c4a6eb43035b81ca3c73f35a4 | TheGCCcoin/global-cryptocurrency | /src/test/multisig_tests.cpp | C++ | cpp | 11,949 | permissive | // Copyright (c) 2011-2013 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "key.h"
#include "keystore.h"
#include "policy/policy.h"
#include "script/script.h"
#include "script/script_error.h"... |
42e73e4b664eba931e5156cca582d1bc500d22e4 | ec781404bb57b2856a1c1162aec4b0e162c7286f | anujdeshpande/scripts | /backup/CL-II/cl2/cl2/practice/webservice/crap/soapC.cpp | C++ | cpp | 67,718 | no_license | /* soapC.cpp
Generated by gSOAP 2.7.9l from calc.h
Copyright(C) 2000-2007, Robert van Engelen, Genivia Inc. All Rights Reserved.
This part of the software is released under one of the following licenses:
GPL, the gSOAP public license, or Genivia's license for commercial use.
*/
#include "soapH.h"
SOAP_SOU... |
2e4230fdbfc4b30516555bb9a6818098663b0529 | 84d9acd6bc216ab876826f3bd4cfbcb1400f6563 | Azur0/kmint-burak-mark | /pigisland-start-301120/pigisland/include/kmint/pigisland/boat/boat_state_roaming.hpp | C++ | hpp | 707 | no_license | #ifndef KMINT_PIGISLAND_BOAT_STATE_ROAMING_HPP
#define KMINT_PIGISLAND_BOAT_STATE_ROAMING_HPP
#include "kmint/pigisland/boat.hpp"
#include "kmint/pigisland/interfaces/base_state.hpp"
namespace kmint {
namespace pigisland {
class BoatStateRoaming : public BaseState
{
public:
BoatStateRoaming(StateContext& s... |
74632a5c14d5bb8980360ccd26800e5c8fa5b1b8 | 14ad94dd1320b68c1386b324e720e7cc94ec503c | Jamiroquai88/IMS | /train_generator.cpp | C++ | cpp | 1,430 | no_license | /*
* train_generator.cpp
*
* Created on: Dec 6, 2015
* Author: pavel
*/
#include "train_generator.h"
#include "time_interval.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
CTrainGenerator::CTrainGenerator(const std::string& trainTitle,
CStation& ... |
3f8375086128bff5140741547819d02a5234c35d | 23020bfa437ea1dc1f4b8415594a6b50ddef48f1 | boonemiller/Ray-Tracer | /RayTracer/RayTracer/bvh.hpp | C++ | hpp | 645 | no_license | //
// bvh.hpp
// RayTracer
//
// Created by Bo Miller on 2/1/19.
// Copyright © 2019 Bo Miller. All rights reserved.
//
#include "SceneObjects.hpp"
#include <vector>
#ifndef bvh_hpp
#define bvh_hpp
class Node
{
public:
int left;
int right;
bool isleaf = false;
int objs[3];
int numObjs;
//so... |
badeefd1cf61470c4d22b809c481ec41cf02f081 | 6f232d1f26ef03da30d640b29417ea9bd0d145d1 | mlomb/halite2-bot | /versions/v37/Navigation.cpp | C++ | cpp | 17,250 | no_license | #include "Navigation.hpp"
#include <deque>
#include <queue>
#include <unordered_set>
#include <algorithm>
#include "Instance.hpp"
#include "Log.hpp"
#include "Image.hpp"
const double angular_step_rad = M_PI / 180.0; // 1 degree
static bool check_entity_between(const Vector2& start, const Vector2& target, const Enti... |
6a847596d43e112083a1e6cfa6c14bf6dada5dcc | 662c4ba91979f2e8c77a153affbdbe5ec7573afb | MidnightProject/AVR-Programming-Library | /SPI/spi.cpp | C++ | cpp | 6,554 | permissive | #include <avr/io.h>
#include "spi.h"
SPI::SPI()
{
}
SPI::SPI(int8_t ch)
{
#if defined( __AVR_ATmega328PB__ )
if (ch >= 2)
{
return;
}
#endif
#if defined( __AVR_ATmega328__ ) || defined( __AVR_ATmega328P__ )
if (ch >= 1)
{
return;
}
#endif
SetChannel(ch);
#if F_SPI0
if (this->ch == 0... |
cf527cc955110087c73bb48323ee367ae8d831bc | 50b0da3be0a431849e246707be73efad90999a5e | sradigan/libmspdb | /include/type_info/LF_BUILTIN.hh | C++ | hh | 1,340 | permissive | /*
* Copyright 2021 Assured Information Security, 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 a... |
27748099f1b32ca49d36d9b76d3b128c789ce9c4 | 2348520674d7e63432ced1d27035d1073d9b0b56 | filimonov/ClickHouse | /dbms/src/Storages/StorageSet.cpp | C++ | cpp | 6,403 | permissive | #include <Storages/StorageSet.h>
#include <Storages/StorageFactory.h>
#include <IO/ReadBufferFromFile.h>
#include <IO/CompressedReadBuffer.h>
#include <IO/WriteBufferFromFile.h>
#include <IO/CompressedWriteBuffer.h>
#include <DataStreams/NativeBlockOutputStream.h>
#include <DataStreams/NativeBlockInputStream.h>
#includ... |
062a00490a3116b8e4775ca2b745bdfbaadee517 | ed51410863631b6a56b7bbe2592ef6d844092b17 | johnno1962/swift | /lib/ClangImporter/SwiftLookupTable.cpp | C++ | cpp | 79,957 | permissive | //===--- SwiftLookupTable.cpp - Swift Lookup Table ------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
bce506b72eb4fc70022b00454b85b6d7652f1cd4 | d2014fdb21fa998af50d783b59021ed635193f35 | Atmog/Tehos | /Application/Log.hpp | C++ | hpp | 1,162 | no_license | #ifndef APP_LOG_HPP
#define APP_LOG_HPP
#include <fstream>
namespace app
{
class Log
{
public:
enum Type
{
INFO,
WARNING,
ERROR,
};
Log(std::string const& filename);
~Log();
friend Log& operator << (Log& log, const Type type)
... |
78d05e297965ab119324d5f598a191fcc1c9b451 | a7d088124d0c6a06e11b53328eb8d434a63bd94c | Memertayasa/BlockDX | /src/blocknetdx-tx.cpp | C++ | cpp | 20,315 | permissive | // Copyright (c) 2009-2014 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 "base58.h"
#include "clientversion.h"
#include "coins.h"
#include "core_io.h"
#include "keystore.h"
#include "primiti... |
1a9e0bfd711f56757354a6d7b31541521fc98dfe | b8ab29827dcdc07cd658a1ab949e651150d7b7e6 | Hinara/NanoTekSpice | /src/Components/ComponentFactory.hpp | C++ | hpp | 833 | no_license | /*
** EPITECH PROJECT, 2018
** Nanotekspice
** File description:
** component factory
*/
#ifndef COMPONENTFACTORY_HPP_
#define COMPONENTFACTORY_HPP_
#include <memory>
#include <functional>
#include <map>
#include "IComponent.hpp"
namespace nts
{
class ComponentFactory {
public:
using CompPtr = std::unique_pt... |
3fd702226bdd6415d1acc7c1d1054e3b878db444 | 9ead037fa38fbc541b776e7f559a8cd5de217a36 | Artexety/inflatecpp | /source/decompressor.cc | C++ | cc | 11,233 | permissive | #include "decompressor.h"
unsigned int CopyStored(BitReader *bit_reader, unsigned char *out, unsigned int out_offset, unsigned int block_size_max)
{
if (bit_reader->ByteAllign() < 0)
return -1;
if ((bit_reader->GetInBlock() + 4) > bit_reader->GetInBlockEnd())
return -1;
unsigned short stored_length = ((unsign... |
bdeaee8e5208ef02ffd5e97003fbe6436226150e | c0f023634c741374d26533b1db1338b13c1bf420 | ZhanruiLiang/MSRA-Python-Clone | /SDK/cpp/msra.cpp | C++ | cpp | 8,019 | no_license | #include "msra.h"
#include<iostream>
#include<cmath>
#include<string>
#include<cstring>
#include<cctype>
using std::cerr;
using std::cout;
using std::endl;
using std::string;
void print(string s){
cerr << s << endl;
}
char _buf[30];
// These two function comes from:
// http://www.jb.man.ac.uk/~slowe/cpp/itoa.htm... |
70e9ba38e3f07e8726f0b0871545a39205b7d698 | 0dc981073ef9d32e8add958ae25bfa3ab9f995f4 | Butanosuke/prpr-man-readable-code-tsukuba | /recipe.cpp | C++ | cpp | 1,265 | permissive | #include <iostream>
#include <fstream>
#include <string>
using namespace std;
const int File_Path_Nothing = 1;
const int ID_Nothing = 2;
void printRecipeNames(string recipe_file_path, unsigned int select_ID=0){
// レシピファイルが見つからなかった時のエラー処理
ifstream recipe_file(recipe_file_path);
if(recipe_file.fail()){
cout <... |
32adb8ebf8bd2a08fdbf469e7316e4b0c64fa1ec | e5628a1dfb41990a5b486fb1d4cebd412005478b | blockspacer/twvx | /twbase/log/debugconsole.cpp | C++ | cpp | 634 | no_license | #include "stable.h"
#include <stdio.h>
#include "debugconsole.h"
DebugConsole::DebugConsole(void)
{
#ifdef _DEBUG
#pragma warning(disable:4996)
AllocConsole();
SetConsoleTitleW(L"Debug Console");
freopen("conin$", "r+t", stdin);
freopen("conout$", "w+t", stdout);
freopen("con... |
561fb2626853b021ae57d7dead0c813bacbb1b9a | 5f21c56afaa698fd18162610aaa52067443a1052 | InTheShadow/Project | /五子棋小游戏/GoBang-master/board.cpp | C++ | cpp | 1,883 | no_license | #include "board.h"
#include <QPainter>
#include <QPixmap>
Board::Board(QWidget *parent):QFrame(parent)
{
}
//初始化棋盘(主要是棋子分布图)
void Board::initBoard()
{
boardChess = QPixmap(450,450);
boardChess.fill(Qt::transparent);
}
void Board::paintEvent(QPaintEvent * event)
{
//在棋盘上绘制棋子分布图
Q_UNUSED(event);
Q... |
b94d307cdcf517aabebe28fd4bfb16287f50828d | 8bac72f2007745dfae2223809dbfd2e91dede047 | wtrsltnk/vsthost | /src/tracks-domain/track.cpp | C++ | cpp | 4,043 | no_license | #include "track.h"
#include "base64.h"
#include <spdlog/spdlog.h>
static uint32_t s_TrackCounter = 1;
Track::Track(
uint32_t id)
: _id(id)
{
_color[0] = _color[1] = _color[2] = _color[3] = 0;
}
Track::Track()
: Track(s_TrackCounter++)
{}
void Track::StartRecording()
{
_activeRegion = -1;
}
std... |
37acade00db894410d69e91f98fa2bbcedcf5a7a | dcbce7d5d5f55a2ca239ba3ef8754affee936fc5 | veelo/coin | /src/fields/SoMFVec2s.cpp | C++ | cpp | 4,973 | permissive | /**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Red... |
76df27ad9ad30cf99e2b425d187c9de22569b33a | e6775912719b2bd1d2c362732da296aa804509bc | lliurex/lsf | /include/lsf-1.0/n4d.hpp | C++ | hpp | 992 | no_license |
#ifndef _LSF_N4D_
#define _LSF_N4D_
#include <xmlrpc-c/base.hpp>
#include <vector>
#include <string>
namespace net
{
namespace lliurex
{
namespace n4d
{
/*!
Gets available variables
\param server_addr address of a valid n4d server
*/
xmlrpc_c::value GetVariableList(std::string server_addr=std... |
7c2b5b712fbc13b9a3c2c6f95c95160ae6bab7f2 | c73a48e2048f3e7143b2acc07a7009fbc0e4e045 | NasdaCash/NSDC | /src/qt/nasdacash/sendcustomfeedialog.cpp | C++ | cpp | 6,085 | permissive | // Copyright (c) 2019-2020 The PIVX developers
// Copyright (c) 2020 The Nasda Cash developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "qt/nasdacash/sendcustomfeedialog.h"
#include "qt/nasdacash/forms/ui_sendcus... |
b22753ee3408e59c9282da070cfd9bbb93123412 | f96c49816a16ca52df7c92c0e2466de6c89efdb7 | ffdd270/My-Console-Project-File | /콘솔/C_CPP 160620/cpp.cpp | C++ | cpp | 310 | no_license | #include <iostream>
#include <conio.h>
using namespace std;
class Data
{
private:
int data;
public:
Data(int num) : data(num)
{}
void ShowData()
{
cout << " data : " << data;
}
void Add(int num)
{
data += num;
}
};
int main(void)
{
Data obj(20);
obj.Add(10);
obj.ShowData();
_getch();
} |
905d4f1db38f506f757dea1d1c8cfcaa0f11cc3d | 40420f172205a50f1b9451f77947559d569f2d8c | Lyricia/Computer-Graphics | /Computer Graphics/Examples 1~10/Exam 5/Exam 5/main.cpp | C++ | cpp | 4,285 | no_license | #include<iostream>
#include<time.h>
#include<gl\glut.h>
#define W_Width 800
#define W_Height 600
GLvoid RegesterCallBack();
GLvoid drawScene(GLvoid);
GLvoid Reshape(int w, int h);
GLvoid Timer(int);
GLvoid Keydown(unsigned char, int, int);
GLvoid MouseMove(int, int);
GLvoid MouseEvent(int, int, int, int);
GLvoid ... |
558cd711ea99b45d4e8d0aeab26ebc1c182d97f4 | e681f401aafabda209b0b8fdd51f0c9ef43a2781 | virtyaluk/leetcode | /problems/1658/solution.cpp | C++ | cpp | 601 | no_license | class Solution {
public:
int minOperations(vector<int>& nums, int x) {
int ans = INT_MAX, cur = 0, left = 0, n = nums.size();
for (int num: nums) {
cur += num;
}
for (int right = 0; right < nums.size(); right++) {
cur -= nums[right];
... |
cc2facc9e47c7fae7ec276d97b9883eb8e5ba022 | 8b6f63dc1bd11b99ddf614f088664e9075e9e71c | thesimonzhu/Potato-Growing-Simulator | /allegroGraphics.cpp | C++ | cpp | 526 | no_license | #include <stdio.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_native_dialog.h>
#include <allegro5/allegro_image.h>
#include "potatoes.h"
void loadMenu(ALLEGRO_FONT *font){
char title[50] = "THE MARTIAN:";
char title2... |
991e7311aaccb2a09d5a8c74dba4dd4067a8d79b | 462d3f0c6b723b1eaaf326876f59510bd756b426 | johcarvajal/OpenEaagles | /src/basic/nethandlers/UdpMulticastHandler.cpp | C++ | cpp | 11,323 | no_license | //------------------------------------------------------------------------------
// Class: UdpMulticastHandler
//------------------------------------------------------------------------------
//
// M$ WinSock has slightly different return types, some different calling, and
// is missing some of the calls that are ... |
6a8c9d0ce7adf68258c155c43be8d55a70df7930 | be1bebc9b470c8f4c447a7560823e367b9fd084d | fcharlie/Planck | /vendor/bela/include/bela/simulator.hpp | C++ | hpp | 9,078 | permissive | // Environment simulator
#ifndef BELA_SIMULATOR_HPP
#define BELA_SIMULATOR_HPP
#include "env.hpp"
namespace bela::env {
struct StringCaseInsensitiveHash {
using is_transparent = void;
std::size_t operator()(std::wstring_view wsv) const noexcept {
/// See Wikipedia
/// https://en.wikipedia.org/wiki/Fowler%E... |
14800b6babf923210c308d692ae814e6962cbafc | b90ccdd5ef89522c780932eded01c4f66540f2a7 | korca0220/Algorithm_study | /Programmers/Level1/2.cpp | C++ | cpp | 807 | no_license | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
int solution(int n, vector<int> lost, vector<int> reserve) {
int answer = n-lost.size();
for(int i=0; i<lost.size(); i++){
for(int j=0; j<reserve.size(); j++){
if(lost[i] == reserve[j]){
answer +=1... |
0a23a3ea348f85355c73686a7343137623a2118d | be3f26925bd0dc18b90e58b9ac85c2929a80ecf3 | megapete/PCH_PListReader | /PCH_PListReader/main.cpp | C++ | cpp | 1,053 | no_license | //
// main.cpp
// PCH_PListReader
//
// Created by Peter Huber on 2019-12-18.
// Copyright © 2019 Peter Huber. All rights reserved.
//
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include "PCH_PList.hpp"
#include "PCH_NSKeyedArchiver_Analyzer.hpp"
usi... |
37d0acdd0dcecd86cfba64888113ab9b48526969 | b00011bfd459c475ca66cfbbf431c37a041bcd99 | tkopacz/2017IotHubGatewaySDK | /Demo_SRC/deps/iot-sdk-c/iothub_service_client/tests/iothub_srv_client_auth_ut/iothub_service_client_auth_ut.cpp | C++ | cpp | 63,390 | permissive | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <cstdlib>
#ifdef _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <cstdbool>
#include <cstddef>
#include <csignal>
#include "testrunnerswitcher.h"
#inclu... |
c9c6414315cd596752b9c8fe7fac46b87de95577 | 951db85213ef6acc59c3671051dacebafdf4a519 | bypasscc/Distance | /Server/include/ServerConfigurator.hpp | C++ | hpp | 666 | permissive | #ifndef _DISTANCE_SERVER_CONFIGURATOR_HPP_
#define _DISTANCE_SERVER_CONFIGURATOR_HPP_
#include <boost/json.hpp>
#include <fstream>
#include <string>
#include <exception>
#include <stdexcept>
namespace Distance
{
struct TcpServerSettings
{
std::string ip;
std::uint16_t port;
};
class ... |
3e90ec646c2429f03a4d3ed9c0a779a7d73ac3e9 | 3e6e7a6ac2753c129b5bd5a5961a1358c8cf8196 | jnikhilreddy/acm-conventions | /online-judges/uva/11504-dominos.cpp | C++ | cpp | 1,786 | no_license | #include <bits/stdc++.h>
#define forn(i, n) for (int i = 0; i < (n); ++i)
#define sqr(x) ((x) * (x))
#define eq(x, y) (((x) > (y) ? (x) - (y) : (y) - (x)) <= eps)
#define sz(x) int((x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
... |
3caf05a4f651448a556cfc28d2b03d7a8c4866ea | 5f0d58d150c609f9aa4e86579e0c768a3ac3da93 | newdaytrue/PS | /BOJ/10992/10992.cpp14.cpp | C++ | cpp | 655 | no_license | #include <iostream>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <string>
#include <algorithm>
#include <deque>
#include <queue>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
int main(){
int N;
cin >> N;
int block = N - 1;
for (int i = 1; i <= ... |
e6030eaf9803a8fce369f115140489b80edaae80 | cfc2e43d40c7e3c801b99981c58094a1c68da0c3 | JaredEzz/RelationalDatabase | /Token.cpp | C++ | cpp | 849 | no_license | //
// Created by Jared Hasson on 2019-03-11.
//
#include "Token.h"
#include <sstream>
using namespace std;
Token::Token(tokenType t, string v, int l) : mType(t), mValue(v), mLine(l)
{
// Empty but needed constructor
}
map<int, string> convertType()
{
map<int, string> m;
m[0] = "COMMA";
m[1] = "PER... |
892e5eb114294a433a9cd48f2021fe0d56e1f4c8 | 77a1db75f854e3c55586e261f701a94afe4ab6bf | sysfce2/MAME-Plus-Plus-Kaillera | /mameppk/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp | C++ | cpp | 29,624 | permissive | /*
* Copyright 2011-2015 Branimir Karadzic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
//
// Copyright (c) 2009-2013 Mikko Mononen memon@inside.org
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be h... |
14782bad9df771a9f84a2f25ab51330b5db4fd6b | e0e4680542dfe0962d2115ba550f269e7795c622 | abhiyansh/Text-Compression | /Uncompress.cpp | C++ | cpp | 604 | no_license | //takes in a compressed string and converts it into string of binaries
//range(0-7)
int toInt(string st){
int x = 0;
for(int i=0;i<3;i++){
if(st[i]=='1') x+=pow(2, 2-i);
}
return x;
}
string uncompress(string compressed_file){
string bin = "";
string temp;
for(int i=0;i<compressed_file.length();i++){
... |
04a2d8744085591ac8b13ed8832049ced7335925 | b35b89b4646a5f5e189b6cb028f4c647518006aa | TheDenison/lab6 | /friends.cpp | C++ | cpp | 6,345 | no_license | #pragma once
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <iomanip>
#include <cstring>
#include <windows.h>
#include "Common.h"
#include "Date.h"
#include "delivery1.h"
#include "delivery2.h"
#include "FIO.h"
using namespace std;
istream& opera... |
05259faba64fe140dcb536c030d6242efd7379e8 | f89abcb159dfd995cf594d797828c0aad9de324b | iattarla/TARLA_EPICS | /support/streamdevice/streamDevice/src/RawConverter.cc | C++ | cc | 4,667 | no_license | /***************************************************************
* StreamDevice Support *
* *
* (C) 1999 Dirk Zimoch (zimoch@delta.uni-dortmund.de) *
* (C) 2005 Dirk Zimoch (dirk.zimoch@psi.ch) ... |
7ac6db2148c2d8c57ab5d77cf7eeca107f4d1511 | 070c629882ef16e10f8ab3c566b53e6cc3bb5604 | jgoday/gdal | /gdal/frmts/l1b/l1bdataset.cpp | C++ | cpp | 133,684 | permissive | /******************************************************************************
*
* Project: NOAA Polar Orbiter Level 1b Dataset Reader (AVHRR)
* Purpose: Can read NOAA-9(F)-NOAA-17(M) AVHRR datasets
* Author: Andrey Kiselev, dron@ak4719.spb.edu
*
* Some format info at: http://www.sat.dundee.ac.uk/noaa1b.html... |
2ff80ed169ec66b8a449578c7a6a8b45c9c09e47 | 2fda07d4d4d8059afe499bf49403b4610b9f3879 | zeroplusone/AlgorithmPractice | /POJ/PKU-1971-Parallelogram_Counting.cpp | C++ | cpp | 2,538 | no_license | /******************
Judge : PKU
Problem : 1971-Parallelogram_Counting.cpp
Course : Course1
discribe: find out how many Parallelogram are there in these point
Input : t
(n
x0 y0
x1 y1
.
.
xn-1 yn-1
)x t
Output : num
Solve : greedy+sort
fi... |
05899214df8f6fe91d57a1623de6c7e3c8d936b4 | 01e023e90761a3b710e32eb9f0d79e9ce6d78282 | BenLubar/SwarmDirector2 | /src/game/client/swarm/gameui/optionssubvoice.cpp | C++ | cpp | 11,879 | permissive | //========= Copyright © Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//==========================================================================//
#include "OptionsSubVoice.h"
#include "CvarSlider.h"
#include <vgui/IVGui.h>
#include <vgui_controls/ImagePanel.h>
#include <vgui_controls/Che... |
d3ec2e7c50996ae8851215bcf710d954fcc309b6 | 74e45782faa50f329d4a0c786e87432ae7c608ac | j1249845202/chromium | /third_party/blink/renderer/core/css/resolver/style_adjuster.cc | C++ | cc | 39,094 | permissive | /*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
* Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
* All rights reserved.
* Copyright (C) 2007 Alexe... |
d00b39fa60127103c13c332bf8c780ef78413132 | b816167738702fc032d4a6acefc8a0ad72576d70 | 097nitinkumar/Hackerearth | /basic-programming/implementation/main.cpp | C++ | cpp | 231 | no_license | #include <iostream>
using namespace std;
int main() {
char s[100]={'0'};
int arr2[10]={0};
scanf("%s",s);
for(int i=0;s[i];i++)
{
arr2[s[i]-'0']++;
}
for(int i=0;i<10;i++)
{
printf("%d %d\n",i,arr2[i]);
}
}
|
23984fd54696a4e93d35a3deec3008e21710839b | 606d3835b4200c0681762d49d61185fa40faccf7 | chang-yu0928/algorithms | /solutions/reverseKNodes.cpp | C++ | cpp | 1,392 | no_license | #include <iostream>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
ListNode* reverse(ListNode **head, int k) {
ListNode *tail = *head, *prev = *head, *temp;
*head = (*head)->next;
for(int i = 0;i < k-1;i ++) {
temp = (*head)->next;
(*head)... |
ad1cf8fc3401b39d4fbbb68b7f9d2c26ef695831 | 3b2dc0769b7fb194909fe91fcc3050c375a25372 | emsr/tr2 | /test_type_traits_2.cpp | C++ | cpp | 580 | no_license |
// $HOME/bin/bin/g++ -std=c++14 -o test_type_traits_2 test_type_traits_2.cpp
#include<experimental/type_traits>
#include<iostream>
#if __cplusplus >= 201300L // > 201402L
//namespace std {
// template<typename _Tp>
// constexpr bool
// is_void_v = is_void<_Tp>::value;
//}
#endif // __cplusplus >= 201300L // >... |
45433394d7c055a300ec89cae261e985972796f2 | 8df3a2a3a9c5a48ca5286565faba7665981a7e08 | jahid-coder/competitive-programming | /Codeforces/1530/A.cpp | C++ | cpp | 1,439 | permissive | #pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("fast-math")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_... |
8dfe126a3ab15283bdde77784cccd9e362b47d39 | 95ef03eb561f82fce3c64c1f8368f1605be44621 | indypj/emscripten-fastcomp-clang | /lib/Tooling/Tooling.cpp | C++ | cpp | 16,709 | permissive | //===--- Tooling.cpp - Running clang standalone tools ---------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.