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 |
|---|---|---|---|---|---|---|---|---|
c812cd9ceaeb015067cf8fb75124987b61d2ad7d | 2a7f31542a277bd5962a8878e87ab954932073a1 | ALEHACKsp/RoCo-SDK | /SDK/RoCo_MasterMelee_WeaponComponent_functions.cpp | C++ | cpp | 8,619 | no_license | // Rogue Company (0.60) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "RoCo_MasterMelee_WeaponComponent_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
... |
28d0deb1fee94344bb4fc599b877769ecfc178cb | dbb7dc06dd781565f6f3d043d16c8acc38e5094f | fernando0315/Combinational-Circuit-Logic-Simulator | /CCircuit.cpp | C++ | cpp | 3,148 | no_license | #ifndef CCIRCUIT_H
#define CCIRCUIT_H
#include "CCircuit.h"
#include <bitset>
void node::calcOut()
{
output = *input[0];
if(gateType == Gate::NOT)
output = !(*input[0]);
else if(gateType == Gate::AND)
for (int i = 1; i < input.size(); i++)
output &= *input[i];
else if (gateType == Gate::OR)
{
for (int ... |
6fb48bdfad60ec982a28e00e088322fc5d4f1de7 | a7fa23e6a7467f0d43250da8f4513164ba7d743d | Cobotic/Open3D | /cpp/open3d/utility/Eigen.cpp | C++ | cpp | 14,240 | permissive | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
189cd8cc625eb54e41ab0da0d7bcdfa970021539 | a204e6ea1d1522aca47e4850e2c2bc84e6fc8d85 | vikram-rathore1/competitive_programming | /interviewbit/length-of-longest-subsequence.cpp | C++ | cpp | 1,296 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int longestSubsequenceLength(const vector<int> &A);
};
int Solution::longestSubsequenceLength(const vector<int> &A) {
int this_dp_first, this_dp_second, ans = 0;
vector<pair<int, int> > dp(A.size());
if (dp.size()) {
dp[0].... |
697655a48b5da5cf297e131cff9e64c5ed31ddf6 | 297b9ce5350676aa1df7408d55bec351411b18c5 | sagarbabalsure/Codes-of-All-Languages | /c++/cp/even_odds.cpp | C++ | cpp | 380 | no_license | #include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int n,k;
cin>>n>>k;
int arr1[n],arr2[n],s[n];
int x=0,y=0;
for(int i=1;i<=n;i++)
{
if(i%2==0)
{
arr1[x]=i;
x++;
}
else{
arr2[y]=i;
y++;
}
}
for(int i=0;i<y;i++)
{
s[i]=arr2[i];
}
for(int i=0,m=y;i<x,m<... |
c1d562d781cf1d5840fb7974c589e8803212fbf3 | 1dc85312a5f08e9d1a2523b7d540fb52bfeb5be9 | jankdc/glcookbook | /src/transform/main.cpp | C++ | cpp | 8,264 | permissive | #include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <FreeImagePlus.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
#include <fstream>
#include <vector>
using std::cout;
using std::vector;
using std::string;
using std::ifstream;
using std::ios_ba... |
3f2d207af589fe7da32dd3a7054a8b2a20ace878 | b07d7bcd43a43cbd3cb9e12f07418242c150246d | osphea/zircon-rpi | /zircon/system/ulib/zxtest/death-statement.cc | C++ | cc | 8,682 | permissive | // Copyright 2019 The Fuchsia 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 <threads.h>
#include <cstdint>
#include <string>
#include <fbl/auto_call.h>
#include <lib/fit/function.h>
#include <lib/zx/channel.h>
#include <... |
b93b8ce9c27b4a2f64854fe0da9e686ddcdd215f | 13b251f1b6e265843524ba41e43ab9061c0ae1f8 | HemantNegi/stunning-algos | /binary_tree.cpp | C++ | cpp | 407 | no_license | #include<bits/stdc++.h>
using namespace std;
int arr[20];
void print_tree();
int left_child(int i){
return (2 * i) + 1;
}
int right_child(int i){
return (2 * i) + 2;
}
int main(){
cout << "Program implements Binary tree\n\n";
arr[0] = 10;
arr[1] = 20;
arr[2] = 30;
arr[3] = 40;
prin... |
506f6477c15edf74a164e595ee510e9cbfd3d65b | 3467a9a45b496c90a80456acf6efac07a7e59198 | Machine-Mavericks/FRC-2020-Development-Build | /src/main/cpp/subsystems/Winch.cpp | C++ | cpp | 5,574 | 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... |
f635fba83154bc69e4aa6c0b5fa24719beaf6093 | 05eab64250e31183ab0910abfbd22fdb80eb04f2 | jonesnl/proj_euler | /4/main.cpp | C++ | cpp | 868 | no_license | #include <iostream>
#include <vector>
using namespace std;
typedef long long int big_int;
int main() {
big_int largest = 0;
int a = 0, b = 0;
for (int i = 1; i < 1000; ++i) {
for (int j = i; j < 1000; ++j) {
big_int cur_num = i * j;
big_int cur_num_temp = cur_num;
//digits of form 10^inde... |
d57e579fb879d5fbe8d7c897679eb6a2a1ea1c74 | f67bd1a94603fdaf039ae8454b73537b95418214 | wx2486/aoj | /23.cpp | C++ | cpp | 1,220 | no_license | #include <iostream>
#include <queue>
using namespace std;
struct number
{
long long n;
int id, seq;
};
bool operator < (number a, number b)
{
if (a.n != b.n)
return a.n > b.n;
return a.id > b.id;
}
priority_queue<number> pq, emp;
long long get_number(long long k, long long n)
{
return n + (k-2) * ((n * (n-1... |
92033363c7a6b19b27b0bc2205d18db805c21ba5 | 3f0ca268e725dd48e88787905578377dbfab600e | flaschenpost/erastothenes | /oc.cpp | C++ | cpp | 787 | no_license | #include <CL/cl.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
cl_platform_id platform;
cl_device_id device;
cl_context context;
cl_command_queue command_queue;
cl_int error;
if(clGetPlatformIDs(1, &platform, NULL) != CL_SUCCESS) {
cout << "platform error" ... |
2d927a1906a151e316c18ac27cb32c6bfa49c562 | 352e8b312e78688c0a54fca9ba5857fad1e5491a | maciejjaskiewicz/Xenon | /examples/Sandbox/src/Sandbox.cpp | C++ | cpp | 5,322 | permissive | #include <Xenon/Xenon.hpp>
#include <Xenon/Graphics.hpp>
#include <Xenon/Services/Time/Timer.hpp>
#include <Xenon/Utils/ResourceCache.hpp>
#include <imgui.h>
#include <glm/gtc/type_ptr.hpp>
#include <numeric>
class Sandbox final : public Xenon::Application
{
public:
explicit Sandbox(const Xenon::ApplicationConfig... |
0f1d373b935d21a189d4c9d742b483ff24ba8e24 | f4e5623781b124c859fb78fe9822ce712e621f0e | totolol123/tyano-core | /sources/dispatcher.cpp | C++ | cpp | 4,722 | no_license | ////////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
////////////////////////////////////////////////////////////////////////
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License ... |
3ef593546bbbadcaa407f6bb620a057ae4ea885e | 0bebedbd659ba23d9d5b3e539b680b7361f5bca0 | alteredworlds/Altered3D | /AWSaverGame/AWSaverGame.cpp | C++ | cpp | 38,106 | no_license | #include "AWSaverGame.h"
#include <AW3DTools/AWGLRenderer.h>
#include <AW3DTools/AWRocket.h>
#include <AW3DTools/AWImageProcessor.h>
#include "AWSndProviderWin.h"
#include "AWWinUtils.h"
#include "AWSettings/res/AlteredSettingsRes.h"
#include <pbt.h>
#define WM_AWSWITCHSCENE WM_USER + 22
char* AWSaverGame::m_szApp... |
1d09716c6953338b783c244590b4d079fda6b180 | 0e96a08ec5eebb3fa805906e59f133cda8f9d561 | timblechmann/nt2 | /modules/core/predicates/unit/simd/is_ltz.cpp | C++ | cpp | 3,097 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
2a9b2db4116c41cb21c4b2de6e6a49b1e80c6a43 | b0a57c15acbb1d1e17f7e6391568bbd9fe165ee1 | trustcrypto/chromium | /ash/assistant/ui/caption_bar.cc | C++ | cc | 4,295 | 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 "ash/assistant/ui/caption_bar.h"
#include <memory>
#include "ash/assistant/ui/assistant_ui_constants.h"
#include "ash/assistant/ui/base/assista... |
b9e48f5dae84efeda33a0ca18b9f66609423934c | 60929a190d5577df43bcc6791c7473d9a26bd7f0 | Anvenante/SxsHelper | /src/MainDlg.cpp | C++ | cpp | 11,713 | permissive | #include "StdAfx.h"
// 注册查找对话框事件
UINT CFindDlg::WM_FINDMESSAGE = ::RegisterWindowMessage(FINDMSGSTRING);
CMainDlg::CMainDlg(LPCTSTR szPath) :
m_hThread(NULL),
m_hMenu(NULL),
m_hFont(NULL),
m_tree(WC_TREEVIEW, this, 1),
m_filter(WC_EDIT, this, 2)
{
ZeroMemory(&m_szExport, sizeof(m_szExport));
nodeRoot.szName =... |
c6033ad5a0cf60c6677efdf2a0b8fe3706eb3d77 | 0f7f7c30cd8484d02280d5988c092885f68d82f8 | bobsmile/chromium | /storage/browser/database/database_tracker_unittest.cc | C++ | cc | 36,755 | permissive | // Copyright 2014 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 <stdint.h>
#include <memory>
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.... |
42f87c647133f626ef4e698eedb8ca46ba27e8e8 | 78d27834a51806fed8832deaa3a10afe26990a40 | N-911/cpp_examples | /variadic_templates/02.3.2.serialization_specialization.cpp | C++ | cpp | 988 | permissive | #include <iostream>
// { Name, LastName }
// { Name, LastName, 1992 }
void serializeValues()
{
}
template <typename T> void serializeValue(const T& value)
{
std::cout << value;
}
template <> void serializeValue<int>(const int& value)
{
std::cout << "int : " << value;
}
void serializeValue(const char value[... |
d02f2f4edfb613cf69e4e9109c2ac6cdeee6dab5 | 7c5b5396b43632f57608249af1e3d6fbdbb5a3a8 | digitalassetgroup/-BIBS-Game | /BIBs/games/game_flappy_crocodile/Classes/CommonClasses/CorePlatform/CommonProperties.cpp | C++ | cpp | 1,775 | no_license | #include "CommonProperties.h"
#include "LogHelper.h"
static bool _isNeedRetina = true;
bool CommonProperties::IsNeedRetina() { return _isNeedRetina; }
static float _screenScale = 1.0f;
//вернуть скейл экрана относительно картинок (1 - идентичный размер картинок)
float CommonProperties::GetScreenScale() { return _scre... |
2d3ae333443d8678548ee41780b970d053efd0fe | f522181944e278d29331618a821bf8bb7a8a45cb | YoshuaNava/VisionPercepcion_USB2015 | /Code/Thesis_ws/src/usbgm_pfs/test/horizon_search/test_prob_floor_prior.cpp | C++ | cpp | 3,270 | no_license |
#include <global.h>
#include <probabilistic_functions.h>
#include <segmentation_handler.h>
using namespace std;
using namespace cv;
using namespace ProbFloorSearch;
cv::Mat frame, seg_image, gray, floor_prior; // Mat Declarations
VideoCapture cap;
SegmentationHandler segHandler("SLIC");
vector<Superpixel> superpi... |
79ea9071fb4570f9de67bc9a949f75eb4651fc99 | 697ae87da01c359693bc72ca4e64308670c2739a | Jumes/Phoenix3D | /Phoenix3D/PX2Edit/PX2TerrainBrush.hpp | C++ | hpp | 2,138 | no_license | // PX2TerrainBrush.hpp
#ifndef PX2TERRAINBRUSH_HPP
#define PX2TERRAINBRUSH_HPP
#include "PX2EditPre.hpp"
#include "PX2Brush.hpp"
#include "PX2Terrain.hpp"
#include "PX2TerrainPage.hpp"
#include "PX2RawTerrain.hpp"
#include "PX2RawTerrainPage.hpp"
namespace PX2
{
class VertexAffectInfo
{
public:
VertexAffectInf... |
95443fd31a6a44292fbfa5f5aa845cb913ce7b39 | 48ab6c035e66207105aa237ff138fa67a6b9bd85 | VladasZ/cpp_utils | /source/cpp_utils/transmission/PacketFooter.hpp | C++ | hpp | 456 | no_license | //
// PacketFooter.hpp
// cpp_utils
//
// Created by Vladas Zakrevskis on 07/05/20.
// Copyright © 2020 VladasZ. All rights reserved.
//
#pragma once
#include "PacketHeader.hpp"
namespace cu {
struct PacketFooter {
using EndData = uint16_t;
static constexpr EndData _end_data = 'ne';
... |
0a23aa324b682901942a33a6c21f07c5f3c3918f | 8c337898e6faf1354f0fc75436377c3ef5ed08a3 | MZayed47/Online_Judge_UVa | /UVa12250.cpp | C++ | cpp | 853 | no_license | /* Language Detection */
#include<bits/stdc++.h>
using namespace std;
int main()
{
int count=0;
string s;
while(cin>>s){
count++;
if(s=="#"){
break;
}
if(s=="HELLO"){
cout<<"Case "<<count<<": ENGLISH"<<endl;
}
else if(s=="HOLA"){
... |
f5d13040ff3efaac5ea46bf1d07103657a6c9d62 | 3bf02f9f8b6db0bf3e02c9c34449f2c9dcccf017 | bit-zll/cpp | /20200720/test.cpp | C++ | cpp | 6,434 | no_license | #define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
//缺省参数:在声明或定义函数时,给函数的参数带上默认值,在函数调用时,如果传递了实参
//就用实参,没有传递实参则使用默认值
//void TestFunc(int a = 10)
//{
// cout << a << endl;
//}
//int main()
//{
// TestFunc(100);
// TestFunc();
// return 0;
//}
//缺省参数的分类
//1.全缺省参数:所有参数都带有默认值
//2.半缺省参数:部分参数带有默认值
... |
b1bbf18d631d9ced92201ad5c3953ff9c904e439 | 6d7ce54b3dc2e40112ad04460827f92136cb5124 | Mike-Leo-Smith/Watery | /Watery/ThirdParty/ASIO/asio/detail/win_iocp_socket_send_op.hpp | C++ | hpp | 3,308 | no_license | //
// detail/win_iocp_socket_send_op.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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)
//
... |
d22a8e6af33ceb6468e4779daac3da99f3d52a41 | 9eed8b47bb7e256bfe8479154435473eba208e38 | Dovahstrun/TheAdventuresOfJimmy | /Game Code/Sources/checkPos.cpp | C++ | cpp | 458 | no_license | #include "..\Headers\checkPos.h"
#include "../../Framework/Headers/AssetManager.h"
checkPos::checkPos()
: TextObject()
{
m_text.setFont(AssetManager::GetFont("resources/fonts/mainFont.ttf"));
m_text.setString("Pos: 0, 0");
m_text.setPosition(100, 100);
}
void checkPos::Update(sf::Time _frameTime)
{
}
void checkP... |
5bcde397eeca039519edc665cafeb3c052c2a0f5 | 3c9492fbe560e17eeebc2be5d6c976f0a5d3a3f6 | google-code/atf2flightsim | /ATF2/control-software/epics-3.14.8/extensions/src/ChannelArchiver/ThirdParty/xerces-c-src2_4_0/src/xercesc/sax/SAXParseException.hpp | C++ | hpp | 8,979 | permissive | /*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of sou... |
70869d9113cd7146eafafd8de0e5f6bc9a2c155b | f1d04d5cc021dab8d7278d94399a3a7313be0067 | Vizionnation/chromenohistory | /base/test/test_switches.cc | C++ | cc | 4,184 | 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 "base/test/test_switches.h"
// Flag to show the help message.
const char switches::kHelpFlag[] = "help";
// Flag to run all tests and the l... |
29e2838e487bb47d5264b077ad6dd295089c4e03 | 9a2b881bd0bf12f4dde1bd4804751c1087fd8ec0 | AndyEagling/ChessGameCW | /Bishop.cpp | C++ | cpp | 750 | no_license | #include "Bishop.h"
#include <cmath>
#include <iostream>
using namespace std;
Bishop::Bishop()
{
}
Bishop::~Bishop()
{
}
//inherit piece constructor
Bishop::Bishop(float x, float y, float boardXsize, float boardYsize, int type) : Piece(x, y, boardXsize, boardYsize, type)
{
}
//move bishop
boo... |
3dd2223f6911011cbbe63759484833d5264e6f08 | 9a5f8d9b82bde790c4c13cf9fa1fc6fb7cdfee54 | jfmherokiller/TheOuterWorldsSdkDump | /Indi/SDK/Indi_EliteRich_03_Var1_functions.cpp | C++ | cpp | 352 | no_license | // TheOuterWorlds SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "Indi_EliteRich_03_Var1_parameters.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
}
#ifdef _MS... |
6e259f014a50725f7593541eb50f4ba2af46dac1 | 278ce86329d63902144db360574fbadf9734a0c1 | MitchsGreer/KINC | /src/core/similarity_opencl_outlier.cpp | C++ | cpp | 2,029 | permissive | #include "similarity_opencl_outlier.h"
using namespace std;
/*!
* Construct a new Outlier kernel object with the given OpenCL program and qt parent.
*
* @param program
* @param parent
*/
Similarity::OpenCL::Outlier::Outlier(::OpenCL::Program* program, QObject* parent):
::OpenCL::Kernel(program, "remove... |
0f6d749302de1f55f95ce37cccb57c9aa7df1c21 | beee1eae3964b14e8d9bb32104a645ecda74418f | sadrulhc/chromium | /chromecast/browser/accessibility/flutter/flutter_semantics_node_wrapper.cc | C++ | cc | 21,372 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromecast/browser/accessibility/flutter/flutter_semantics_node_wrapper.h"
#include "base/check.h"
#include "base/strings/string_util.h"
#inclu... |
64765abbdf5da6f307268c41721bf701b3640152 | ae79e4926665c2f9ae142493c880938b18bbb266 | SeungoneKim/algorithms | /Programming Paradigms/Dynamic Programming/Status[k]Type/BitMask/BJ3056_mycode.cpp | C++ | cpp | 928 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <cmath>
#include <iomanip>
using namespace std;
int n;
double matrix[21][21];
double dp[1<<20];
bool check[1<<20];
double go(int ord, int s){
if(ord==n){
return 1.0;
}
if(check[s]){
return dp[s];
}
... |
a3d64b467e376d74c566b216cf4f2f823979692a | e33da7dd937c23bc6b436a92aea6819b3b13010e | austinwillis/unixsystems | /project2/lslong.cpp | C++ | cpp | 4,105 | no_license | //Austin Willis
//Project 2
#include <pwd.h>
#include <ctime>
#include <time.h>
#include <algorithm>
#include <grp.h>
#include <string.h>
#include <string>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <vector>
#include <iostream>
#include <cstdlib>
#include <iomanip>
usi... |
55fcdf6dab7ad1f4212423c2d7897f48204946e4 | a9f6c50e867dc50bb2a25bbaadc6fc97ed94a5d2 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-quicksight/source/model/SeriesItem.cpp | C++ | cpp | 1,433 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/quicksight/model/SeriesItem.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespa... |
d737a2e6d3f87f77f30dbbfe7acf62fdb0e1c1fb | 9b87ec798e93aade4fc45ad30adf73fa76cf48a2 | HumorLogic/Effective-C-plus-plus | /Basics/Code/Function/fun_ptr.cpp | C++ | cpp | 849 | permissive | //fun_ptr.cpp -- 函数指针示例
#include<iostream>
using namespace std;
double pam(int);
double betsy(int);
void Print(string);
void estimate(int lines, double (*pf)(int));
// 把main_*() 改为main()再运行
int main_funptr() {
/*void (*pf)(string);
pf = Print;
pf("你好");
(*pf)("世界");
cout << Print << endl;
Print("Hello World"... |
1586bb01617e5f845d1985393adb3d774d06632c | f17027d98cd84d0ee56115925a31ad1ef7350240 | digint/openmptl-reg-arm-cortex | /arm/cortex/Spansion/MB9BF32xM/include/arch/reg/mfs4.hpp | C++ | hpp | 24,920 | no_license | /*
* OpenMPTL - C++ Microprocessor Template Library
*
* This program is a derivative representation of a CMSIS System View
* Description (SVD) file, and is subject to the corresponding license
* (see "License.txt" in the parent directory).
*
* This program is distributed in the hope that it will be useful,
* bu... |
dccb639976e7021679de468bb14e2f1c8f575263 | 938a61ca5235a8f3ea0dfe953a6212f0b067a9ec | byncoin-project/byncoin | /src/init.cpp | C++ | cpp | 39,436 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "walletdb.h"
#include "bitcoinrpc.h"
#include "net.h"
#i... |
d6a768e99c93818ff8da83b7cca3b6f2b46421cb | c88e68f264a9f65be95f6b51a951a469e11839ed | towhid1zaman/Problem__Solving | /codeforces/92/A.cpp | C++ | cpp | 1,167 | no_license | #include<bits/stdc++.h>
using namespace std;
using LL=long long;
#define nl "\n"
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define MAX INT_MAX
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) a * (b / gcd(a, b))
#define check() {printf("OK\n");}
#define FOR(i,a,b) for(int i=(a);i<(b);i++)... |
9cb9e1bd51d41539b917f5616c46ec8a43088496 | 4a062e9ba97123393caf5fc07d035f259a386c90 | straussed/openSavanna | /prey.cpp | C++ | cpp | 4,313 | no_license | //
// prey.cpp
// openSavanna
//
// Created by Eli Strauss on 1/15/13.
//
//
#include "prey.h"
prey::prey(){
int i;
nrPointingAtMe=1;
ancestor=NULL;
for(i=0;i<maxNodes;i++){
states[i]=0;
newStates[i]=0;
nodeMap[i]=(unsigned char) i;
}
hmmus.clear();
}
prey::~prey(){
for(int i=0;i<hmmus.size();i... |
89595dc7b69ec8cb4a5560bd834e36ad550202a6 | 77ba85d6d40e6c7015d325812307163c7d1cd6a2 | Manzood/CodeForces | /Educational/Educational-Round-125/C/C.cpp | C++ | cpp | 1,015 | no_license | #include "bits/stdc++.h"
#ifdef local
#include "custom/debugger.h"
#else
#define debug(...) 42;
#endif
using namespace std;
#define int long long
void solve([[maybe_unused]] int test) {
int n;
scanf("%lld", &n);
string s;
cin >> s;
int ind = -1;
int sum = 0;
char p;
bool lt = false;
... |
6040ec39e99c1c1a7de04ad81da6bb020b212bdb | 79816b211e55cbcbec19b4c447dcd5d8f7aaa9ae | zixuanwang/Research | /Coclustering/LinearKernel.cpp | C++ | cpp | 444 | no_license | #include "LinearKernel.h"
LinearKernel::LinearKernel(std::vector<Sample>* pSampleArray): Kernel(pSampleArray)
{
}
LinearKernel::~LinearKernel(void)
{
}
float LinearKernel::operator()(int i, int j) const{
Sample& s1=mpSampleArray->at(i);
Sample& s2=mpSampleArray->at(j);
float innerProduct=0.0f;
... |
2fd29680f24c5e8ba35b730fc4f749ecf1291142 | b7c638629715331d565cf36ab900a89e0814b1f1 | kullo/client-libkullo | /tests/api/test_draftattachments.cpp | C++ | cpp | 25,307 | permissive | /*
* Copyright 2013–2020 Kullo GmbH
*
* This source code is licensed under the 3-clause BSD license. See LICENSE.txt
* in the root directory of this source tree for details.
*/
#include "tests/api/apimodeltest.h"
#include <kulloclient/api/AsyncTask.h>
#include <kulloclient/api/DraftAttachmentsAddListener.h>
#incl... |
fbe89b85114b4d49ba65b059ba080ac75bd91c8e | 7aa0a19062b89b4997cc6c0fc45ce4d3f6a62ed4 | snsinfu/micromd | /include/md/potential/harmonic_potential.hpp | C++ | hpp | 888 | permissive | // Copyright snsinfu 2018.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef MD_POTENTIAL_HARMONIC_POTENTIAL_HPP
#define MD_POTENTIAL_HARMONIC_POTENTIAL_HPP
// This module provides the harmonic potential.
#incl... |
4b849d71aa89d52da086571ad75816ea88f1d405 | 7d4e11a649239f64c2bd96a2ff38cbc0d3422709 | cuddandr/edep-sim | /src/EDepSimUserDetectorConstruction.cc | C++ | cc | 25,346 | permissive | #include "EDepSimUserDetectorConstruction.hh"
#include "EDepSimDetectorMessenger.hh"
#include "EDepSimRootGeometryManager.hh"
#include "EDepSimSDFactory.hh"
#include "EDepSimUniformField.hh"
#include "EDepSimEMFieldSetup.hh"
#include "EDepSimArbEMField.hh"
#include "EDepSimArbElecField.hh"
#include "EDepSimArbMagField.... |
6dad73ef10d1129344dd8672f50e4671bf30c899 | 23f8a5ae7e0df7c5fabb125d80438fd927a3b6dc | pangpang20/data-structure | /src/median2/main.cpp | C++ | cpp | 2,194 | no_license | /******************************************************************************************
* Data Structures in C++
* ISBN: 7-302-33064-6 & 7-302-33065-3 & 7-302-29652-2 & 7-302-26883-3
* Junhui DENG, deng@tsinghua.edu.cn
* Computer Science & Technology, Tsinghua University
* Copyright (c) 2003-2020. All rights r... |
255ac3a2fd6704054b296d7ccb174bf362aa8f41 | 9d0ada8786443fc03b3d0c99a08a88504c953709 | arsmx/ITMO | /algorithms and data structures 1st sem/6/A-set.cpp | C++ | cpp | 2,108 | no_license | #include <fstream>
#include <vector>
using namespace std;
vector<int> array[1000001];
unsigned search(vector<int> temp, unsigned value) {
for (unsigned i = 0; i < temp.size(); i++)
//ищем элемент в ячейке, если нашли - выводим номер места, нет - 0
if (temp[i] == value) {
return i;
... |
6329bf66d923dc899506e11f76b517d2c73fd142 | b23117f7ea3af7d17305ffdc5b13918748c73b6c | JakubGrobelny/University | /2019-2020/zima/C++ zaawansowany/L2/zad1/main.cpp | C++ | cpp | 2,415 | no_license | #include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <random>
class counter {
uint64_t i = 1;
public:
friend auto operator<< (std::ostream&, const counter&) -> std::ostream&;
auto operator*= (uint64_t n) -> counter& {
this->i *= n;
return *t... |
46e0d52bf95c8307ae81da608f629b835986157f | 343a51b12993da36eb0288f6bd9a09de73ed1b83 | zhaopufeng/chromium | /chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc | C++ | cc | 16,910 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h"
#include <stddef.h>
#include <memory>
#include <utility>
#include "... |
abbc40b0f3a84258a5662115c14740a2709aa8c3 | 27ab004a1473da0505e3fff1c842d262b189905d | RolandTaverner/ctp2 | /ctp2_code/robotcom/goals/OA_Pillage.cpp | C++ | cpp | 3,465 | no_license | #include "ctp/c3.h"
#include "user-robotcom/shared/globals.h"
#include "gs/outcom/C3World.h"
#include "gs/outcom/C3Rand.h"
#include "gs/outcom/C3Player.h"
#include "gs/gameobj/AgreementTypes.h"
#include "gs/world/MapPoint.h"
#include "robotcom/goals/OA_Pillage.h"
#include "aimain.h"
#include "robot/aibackdoor/bset.h... |
abce92f43fd5f0e5311f3a0d034d53be98b173f1 | 8ad61bfd6f5b48d207a9e11e4b4caf9078c291dc | oigami/Siv3D_NovelEngine | /mmd_novel/kag_executor/executor/kag_executor.cpp | C++ | cpp | 1,433 | permissive | #include <MmdNovel/kag_executor.h>
#include <kag_executor/executor/impl/kag_executor_impl.h>
#include <MmdNovel/imanager.h>
namespace kag
{
Executor::Executor() :pimpl_(std::make_shared<Pimpl>()) {}
PageLayer& Executor::GetLayer(std::pair<LayerType, int> layer_num) const
{
auto it = manager_.find(layer_num.... |
bec59058c2f69792bd96547819e6aca53caf34a7 | b2d146fa4253e1c3ecbd62ad210c63d480367864 | ccgalindog/Kuramoto_Model | /kuramoto_functions.cpp | C++ | cpp | 13,614 | no_license | #include <iostream>
#include <fstream>
#include <boost/numeric/odeint.hpp>
#include <stdio.h>
#include <math.h>
#include <iomanip>
#include <complex>
#include <string>
#include <cmath>
#include <valarray>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeri... |
71c184a8c820a20fc2388f4f171eb25fb4a7c992 | 473ce7eb07d92899b8204e68cc6ffb4e8d5dddd9 | skidau/visualboyadvance-m | /src/win32/MainWndTools.cpp | C++ | cpp | 13,829 | no_license | #include "stdafx.h"
#include "MainWnd.h"
#include "AccelEditor.h"
#include "AVIWrite.h"
#include "Disassemble.h"
#include "FileDlg.h"
#include "GBDisassemble.h"
#include "GBMapView.h"
#include "GBMemoryViewerDlg.h"
#include "GBOamView.h"
#include "GBPaletteView.h"
#include "GBTileView.h"
#include "GDBConnection.h"
#in... |
a26240631351179a646c139de47bd94af691dcce | 06d088daa921e622d8532a773fb422bdf538f0c7 | zhjiehua/check_pump | /pump/weiduodianzi/glpinfopage.cpp | C++ | cpp | 4,805 | no_license | #include "glpinfopage.h"
#include <QDebug>
#include "baseMainPage.h"
#include <QApplication>
#include <QKeyEvent>
//#define TIME_UNIT_BASE 1//单位是s,测试用;
#define TIME_UNIT_BASE 3600//单位小时,真正用;
static quint32 curPumpType;
GlpInfoPage::GlpInfoPage(QWidget *parent /*= 0*/, quint8 index, quint8 previndex, quint32 add)
: ... |
a09089efcc67f10eaa15ce1cf183ffcfaf9ba439 | 0e8469c32f55c5dafb4960979861d21046f65b44 | wlokhorst/freebayes | /src/ResultData.cpp | C++ | cpp | 33,277 | permissive | #include "ResultData.h"
#include "TryCatch.h"
using namespace std;
vcflib::Variant& Results::vcf(
vcflib::Variant& var, // variant to update
BigFloat pHom,
long double bestComboOddsRatio,
//long double alleleSamplingProb,
Samples& samples,
string refbase,
vector<Allele>& altAllelesInclud... |
010149610c6dc284dca3a0a1615f60ee9da242dc | 25d027224507081439d4cbfb5f39c94909e1dc2d | Manu343726/Sprout | /sprout/type_traits/is_member_object_pointer.hpp | C++ | hpp | 1,146 | permissive | /*=============================================================================
Copyright (c) 2011-2015 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
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.tx... |
93508ab923737a0038c51b3de31ccbacf774ff28 | 27a9f6b7473921cef445c2ee5770a98581112527 | IllusoryY/Cpp-Primer5 | /ch03/ex03_04a.cpp | C++ | cpp | 345 | no_license | #include<string>
#include<iostream>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main04a() {
for (string str1, str2; cin >> str1 >> str2; ) {
if (str1 == str2)
cout << "Your enter strings are equal" << endl;
else
cout << "The larger string is " + ((str1 > str2) ? str1 : str2) <<... |
513fdcdc23cfbad21e8e255ffcbe4b8e7bea15cb | c1f5341addeb934f8f1190a6407c9e01b6853905 | preritpaliwal/Competitive-Programming | /Algorithms/segTree.cpp | C++ | cpp | 2,880 | no_license | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define mod 1000000007
#define lli long long
#define fi first
#define se second
#define pb emplace_back
#define FOR(i,n) for(int i=0;i<n;i++)
#define FORR(x,v) for(auto... |
e3e539bf995af11397aecdd4fc0de49e388eb9a9 | 5fb5957432cf86577d13e2620b8e9325334b2271 | nneesshh/mytoolkit | /src_vc141/thirdparty/stlsoft/STLSoft/include/stlsoft/shims/access/string/std/basic_string.hpp | C++ | hpp | 24,767 | permissive | /* /////////////////////////////////////////////////////////////////////////
* File: stlsoft/shims/access/string/std/basic_string.hpp
*
* Purpose: Contains the c_str_ptr, c_str_ptr_null, c_str_len, and
* c_str_size accessors.
*
* Created: 16th January 2002
* Updated: 19th February... |
893f93d3d703b83525fb366fea0febcb067cab73 | ff0a7b326cce69d89796f9e382c2fa9c42770038 | gcamargo96/Competitive-Programming | /problem-solutions/halim/data_structures/35.cpp | C++ | cpp | 1,583 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define endl "\n"
#define For(i,a,b) for(int (i)=(a);(i) < (b); ++(i))
const int N = 100002;
int n, m, a, b;
int seg[4*N];
int v[N], fr[N], esq[N], di... |
fb526fe9ef7934f6b2ac4ba213d39a68d81ebdd4 | 62b15184791fe548c3c4d4aa0515affa56e365f4 | andychow01/nebula | /src/graph/ShowExecutor.cpp | C++ | cpp | 7,644 | permissive | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "graph/ShowExecutor.h"
#include "network/NetworkUtils.h"
namespace nebula {
namespace graph {
using nebula::n... |
a2454661c385ee077afe50eecc59a04f4171da59 | 7e4a4b2dcd3bb972cdd0f9eddb4e2d903af3d0ba | MoniGrow/MonigrowMCUFirmware | /src/main.cpp | C++ | cpp | 3,689 | no_license |
/**
* Created by K. Suwatchai (Mobizt)
*
* Email: k_suwatchai@hotmail.com
*
* Github: https://github.com/mobizt
*
* Copyright (c) 2021 mobizt
*
*/
//This example shows how to create a document in a document collection. This operation required Email/password, custom or OAUth2.0 authentication.
#if defined(... |
c8f198b30abddd11cec950d23032844e653bf75d | 4cff3a9e6bf71b37c8fdb27e7006f76ab93d3300 | jeremiahar/llvm-project | /llvm/tools/llvm-profgen/PerfReader.cpp | C++ | cpp | 28,579 | permissive | //===-- PerfReader.cpp - perfscript reader ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
f210a638fb8a91bc0b99ec9cb8a3028ac702ac78 | 70c8b8c81822dc794b4ccd1be09f843082bb4951 | warrenween/Elastos | /Sources/Elastos/Packages/Apps/Settings/src/elastos/droid/settings/deviceinfo/CStorageItemPreference.cpp | C++ | cpp | 3,210 | permissive | //=========================================================================
// Copyright (C) 2012 The Elastos Open Source Project
//
// 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
//
// ... |
ac4ea393156b0a489ca04b77e064c3c15152bb61 | f1eafb40cf253fcdb6c3864761c3e95f37dd36bd | DinuCristian/Card-G-Game | /CardG/RandomNumberGenerator.cpp | C++ | cpp | 429 | no_license | #include "RandomNumberGenerator.h"
RandomNumberGenerator::RandomNumberGenerator()
{
this->random = gcnew Random();
}
RandomNumberGenerator^ RandomNumberGenerator::getInstance()
{
if (instance == nullptr)
{
instance = gcnew RandomNumberGenerator();
}
return instance;
}
int RandomNumberGen... |
d883b7d5077f81234a91b95f71561b3d4482b414 | 2b0aec201f7f3068b2ec8f8a39dfcc3df69961e2 | lecalvmy/CPF_Projet | /src/AsianOption.cpp | C++ | cpp | 1,071 | no_license | //
// Created by lecalvmy on 9/18/18.
//
#include "AsianOption.hpp"
/**
* Constructeur de la classe
* @param[in] T : maturité
* @param[in] nbTimeSteps : nombre de pas de temps de discrétisation
* @param[in] size : dimension du modèle
* @param[in] weights : poids des actifs
* @param[in] strike : prix d'exercice de... |
5f494fdcb7ae9526d829ec194a83ebd3da10aea1 | 7c2f6ba37a6c582cd49cb4a238599e47a603e293 | mnrn/xxx-coder | /abc068_b.cc | C++ | cc | 931 | permissive | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, int(n) + 1)
#define RREP(i, n) RFOR(i, 0, n)
#define RREP1(i, n) RFOR(i, 1, int(n) + 1)
#def... |
60b908c7e1a175fef5a1fe01830957e9bb50a097 | 5b752269a6d75d80eb5ace7287754cf321894946 | zero9230/FiveDiff | /ReportGenerator/DrawField.cpp | C++ | cpp | 7,222 | no_license | /* ==========================================================================
File : DrawField.cpp
Class : CDrawField
Date : 07/27/04
Purpose : "CDrawField" represents a simple drawable field.
Description : The class contain attributes for the objects, as well
as members to load and draw.
Usage... |
ecfa78f4a146199b3f28dfad6353a74e327fcaef | 128ef1ab4ff361a1c04f5044d524d2967fc2cc01 | denghe/xxlib_cocos_cpp | /cocos2d/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp | C++ | cpp | 8,141 | permissive | /*
* Copyright (c) 2012 cocos2d-x.org
* http://www.cocos2d-x.org
*
* Copyright 2012 Stewart Hamilton-Arrandale.
* http://creativewax.co.uk
*
* Modified by Yannick Loriot.
* http://yannickloriot.com
*
* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
*
* Permission is hereby granted, fre... |
b5fbc38de76dd9624c758edcef073017617837bb | fd27a0262bfab8aac6119154df005337c9f8f8cc | samshadwell/sorbet | /core/types/calls.cc | C++ | cc | 102,937 | permissive | #include "absl/strings/match.h"
#include "absl/strings/str_split.h"
#include "common/common.h"
#include "common/sort.h"
#include "common/typecase.h"
#include "core/GlobalState.h"
#include "core/Names.h"
#include "core/Symbols.h"
#include "core/TypeConstraint.h"
#include "core/Types.h"
#include "core/errors/infer.h"
#in... |
45bfe891d40e73a2de3be1b37c02f37a25ec17e2 | 41875630f62d4af356cc9235d9fed3d97502280a | Yann4/Final-Year-Project | /Connection.cpp | C++ | cpp | 707 | no_license | #include "Connection.h"
Connection::Connection(Node* start, Node* end, int cost, ID3D11DeviceContext* context, ID3D11Device* device, ID3D11InputLayout* splineLayout): start(start), end(end), cost(cost)
{
std::vector<DirectX::XMFLOAT3> cp;
if (start != nullptr)
{
cp.push_back(start->Position());
}
if ... |
c17388da55371145acc79e4c5b0e23aa5814280d | a64c6ca0809e3a7ab811a6dc98de8312b57f414a | PetrelEngine/MiddleArch | /Source/OpenGLESCase/CaseShaderProgram.cpp | C++ | cpp | 4,060 | no_license | //
// Created by liuqian8 on 2019/6/26.
//
#include "CaseShaderProgram.h"
CaseShaderProgram::CaseShaderProgram()
{
}
CaseShaderProgram::~CaseShaderProgram()
{
if (vertexShader_)
glDeleteShader(vertexShader_);
if (fragmentShader_)
glDeleteShader(fragmentShader_);
if (programId_)
... |
febc704b65c6907045f95a37c686142f81586b4f | 0f870f7036b6bf8172cf5ddb8b0bbcaa7d06471e | chunziwang/catboost | /catboost/libs/algo/helpers.cpp | C++ | cpp | 8,513 | permissive | #include "helpers.h"
#include <catboost/libs/helpers/exception.h>
#include <catboost/libs/logging/logging.h>
#include <library/malloc/api/malloc.h>
#include <util/generic/algorithm.h>
#include <util/generic/utility.h>
#include <util/system/mem_info.h>
void GenerateBorders(const TPool& pool, TLearnContext* ctx, TVec... |
d4288fb521675a09077cbd60b1116f9e2f1808a0 | 1b1bd3815515eca26eb84b5b96c597f7ae742c1f | 24tangs/ccc | /CCC 2007/S1-federal-voting-age.cpp | C++ | cpp | 498 | no_license | #include <iostream>
using namespace std;
int year, month, day, n;
bool isLegal(){
if(2007 - year > 18)
return true;
if(2007 - year < 18)
return false;
if(month < 2)
return true;
if(month == 2 && day <= 27)
return true;
return false;
}
int main(int argc, char const *argv[])
{
freopen("input.in", "r", s... |
784a5bc65f9c8765411c91081fc7354c56306321 | 4280f9f51fea5af7410b79534eef2d0a5c41e789 | WarfareCode/mixr | /src/models/system/Jammer.cpp | C++ | cpp | 1,563 | no_license |
#include "mixr/models/system/Jammer.hpp"
#include "mixr/models/player/Player.hpp"
#include "mixr/models/system/Antenna.hpp"
#include "mixr/models/Emission.hpp"
#include "mixr/base/PairStream.hpp"
#include "mixr/base/Pair.hpp"
#include "mixr/base/units/angles.hpp"
#include "mixr/base/units/frequencies.hpp"
... |
f077beccf127420c7fd60192a7cff9dca303749e | 7d0359037da91c609ebb36544d4ceeb9ef47a397 | heyanlong/nebula | /src/storage/http/StorageHttpDownloadHandler.cpp | C++ | cpp | 6,453 | permissive | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "storage/http/StorageHttpDownloadHandler.h"
#include <proxygen/httpserver/RequestHandler.h>
#include <proxygen/httpserver/ResponseBuilder.h>
#include <proxygen/lib/http/ProxygenErrorEnum.h>... |
5ab79f6ae2e7f78dcbc83a3bb44ed7f820839dd5 | 657d38b0f53f02f2fb70bf0061e64e7018fd631f | rharriso/learning-c-17 | /hello.cpp | C++ | cpp | 673 | no_license | #include<memory>
#include<iostream>
#include<vector>
#include<string>
#include<numeric>
void printIntPointer(const int &int_ptr) {
std::cout << int_ptr << '\n';
std::cout << &int_ptr << '\n';
}
int main () {
auto hey = std::make_shared<int>(10);
printIntPointer(*hey);
std::vector<std::string> messages {"... |
59bdfa44c9af21f305e88906152f5ffb3c4a833e | 984d0617e6438d234a94d821f5fb48dc456e49e6 | FyodorovAleksej/Spovm | /Server/main.cpp | C++ | cpp | 9,319 | no_license | #ifdef WIN32
#define CRT_SECURE_NO_WARNINGS
#include <Windows.h>
#include <iostream>
#include <stdio.h>
#include <string>
#include <cstring>
#include <conio.h>
#include <process.h>
#include <locale.h>
#include <fstream>
#include <stdlib.h>
#endif
#ifdef linux
#include <QCoreApplication>
#include "compiler.h"
#include <... |
f0f9869477503644343cf8efa65a47e9d3922069 | 24f04a44b28f8892739276c8e383208a95d3c2c0 | M0WA/SolidSBC | /SolidSBCCliSvc/SolidSBCCliConfigSocket.cpp | C++ | cpp | 3,971 | no_license | // ServerConfigSocket.cpp : implementation file
//
#include "stdafx.h"
#include "SolidSBCCliConfigSocket.h"
CSolidSBCCliConfigSocket::CSolidSBCCliConfigSocket()
: CSolidSBCSocketClient()
, m_pszClientUUID(NULL)
{
}
CSolidSBCCliConfigSocket::~CSolidSBCCliConfigSocket()
{
Close();
}
bool CSolidSBCCl... |
3cc057a6a837e69e448baadd04f34317ae60c879 | 52595e8ca6e8c7020b76ae63a211da23b50e6c5c | yougren/Engine | /Engine/Engine/Input/MouseData.hpp | C++ | hpp | 777 | permissive | #pragma once
#include <SFML/Graphics.hpp>
class MouseData
{
public:
MouseData();
~MouseData();
enum MouseStates {Unheld = 0, Hit, Held, Released};
void setLeftData(const unsigned int& state);
void setRightData(const unsigned int& state);
void setButtonData(const unsigned int& stateLeft, const unsigned int& ... |
ee3b762feb1938143516f5f98b3b17e96e3f4b8b | b7d3429353ab9d99af2aa7e7f7ebf59e5d2f38d3 | rikuya6/ICPC_learning | /AtCoder/ABC043/A.cpp | C++ | cpp | 251 | no_license | #include <iostream>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int main() {
int n;
cin >> n;
int ans = 0;
for (int i = 1; i <= n; ++i) {
ans += i;
}
cout << ans << endl;
}
|
02d5a2d912be2b82058b0960920e2fc21f7b5886 | aa7b23a85ad026f1bbef3870a7a6e2455fd8bbe0 | bbinn/csc361_a1 | /ServerLogic.cpp | C++ | cpp | 4,951 | no_license |
/*
A Simple web server - Using C++
Csc 361 programming assigment #1
Brett Binnersley
V00776751
ServerLogic.cpp
Desc: Contains functionality to initialize, run and shutdown the server.
*/
#include "ServerLogic.h"
#include "MessageToClient.h"
#include "MessageFromClient.h"
#include "LogResults.h"
#include "Validato... |
66ae2890ff469071a5808b3373d5f7925b62bba6 | 8b159977c2a79bba410a17a45341657dd9f728b5 | alanthie/Chess-001 | /Tablebase/TBH_mgr.hpp | C++ | hpp | 10,774 | permissive | #pragma once
//=================================================================================================
// Copyright (C) 2017 Alain Lanthier - All Rights Reserved
//=================================================================================================
//
// T... |
a3bc9c7632781b283c899cc34acfd9d57a9d7ab8 | 933b7417cb592b121d048cafeea02e3f2c8e4ab2 | Lazybird-Chao/UTC | /utc-0.1/src/Barrier.cc | C++ | cc | 6,791 | no_license | #include "Barrier.h"
#include "TaskManager.h"
#include "RootTask.h"
#include "Task.h"
#include "UtcBasics.h"
#include <cassert>
#include "TaskUtilities.h"
namespace iUtc{
Barrier::Barrier()
{
m_numLocalThreads = 0;
m_intraThreadSyncCounterComing[0] = m_intraThreadSyncCounterComing[1]=0;
m_intra... |
708323d7559e25c464c3aba04e4c6d9a32297413 | 9fe47c272cce59f1b28b739278e38d543b92aabb | vlanore/new_bayescode | /src/lib/BranchSitePath.cpp | C++ | cpp | 6,910 | no_license | #include <cmath>
#include <sstream>
#include "BranchSitePath.hpp"
#include "PathSuffStat.hpp"
#include "PoissonSuffStat.hpp"
#include "SubMatrix.hpp"
using namespace std;
//-------------------------------------------------------------------------
// * BranchSitePath
//-----------------------------------------------... |
dcae4e390c019d5b1bbce003ad656175b823df14 | 4156f4f600b8409cd9ad40d49614bab6aaa8c7e3 | lw000/android_stdio_game | /newdemo/lw_common/Platform.cpp | C++ | cpp | 318 | no_license | //
// Created by 李伟 on 2018/8/22.
//
#include "Platform.h"
#include <stdio.h>
#include <stdlib.h>
Platform::Platform() {
printf("%s %d", __FILE__, __LINE__);
}
Platform::~Platform() {
printf("%s %d", __FILE__, __LINE__);
}
int Platform::start() {
return 0;
}
int Platform::stop() {
return 0;
} |
a5854f30980b36e435c2c0f8848a8d4d16b59d95 | ef30b4169f2d7b6dd28cab650c36305366539ac7 | AyushSri19-777/Coding-2020 | /Data Structures/Bitmagic/HammingDistance.cpp | C++ | cpp | 895 | no_license | /*The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Given two integers x and y, calculate the Hamming distance.
Note:
0 ≤ x, y < 231.
Example:
Input: x = 1, y = 4
Output: 2
Explanation:
1 (0 0 0 1)
4 (0 1 0 0)
↑ ↑
The above arrows poi... |
cdb94898e270b410c8a0f4e41f56549b3897d32f | f0f52cbc6cb107f8a4209acad763c8c73dd5f6a9 | amritshukla001/3rdsem_code_c- | /nptel/5.cpp | C++ | cpp | 255 | no_license | #include <iostream>
#include <string>
using namespace std;
class Data {
int _d;
public:
int set_d(int d) const {
_d = d;
}
int get_d() const {
return _d;
}
};
int main() {
Data obj;
obj.set_d(5);
cout << obj.get_d();
return 0;
}
|
eba13d9e37300cdb222cde76af37132269729928 | bf5b298a46140e60b5c7075105be00e7e44d7613 | czxxjtu/wxPython-1 | /tags/wxPy-2.9.5.0/src/html/htmltag.cpp | C++ | cpp | 20,116 | no_license | /////////////////////////////////////////////////////////////////////////////
// Name: src/html/htmltag.cpp
// Purpose: wxHtmlTag class (represents single tag)
// Author: Vaclav Slavik
// RCS-ID: $Id$
// Copyright: (c) 1999 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////... |
060b504805e1c8c5d5fbe12f9a80aef7872a8798 | 0d3d1c7aa02f91ef096aa7fe66b1d87d6d059900 | eurogiciel-oss/Tizen_Crosswalk | /src/chrome/browser/history/android/android_provider_backend_unittest.cc | C++ | cc | 86,981 | 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 "chrome/browser/history/android/android_provider_backend.h"
#include <vector>
#include "base/file_util.h"
#include "base/files/file_path.h"... |
084edb9a7f049c717b005ebdb21ca317f1b27c37 | 832c1e11ff3f13e825b3086da1a4ec3acbed1c1f | JaehyeonHeo/studyC-pp | /studyC++/CstyleRTTI.cpp | C++ | cpp | 711 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
class Parent
{
public:
char classname[32];
Parent() {
strcpy(classname, "Parent");
}
virtual void PrintMe() {
printf("I am Parent\n");
}
};
class Child : public Parent
{
private:
int num;
public:
Child(int anum) : num(anum) {
strcpy(c... |
7b0c6f033d5ab2665dd39baa03b1c9ca094f0b85 | 459cac7f7cfbf0dd08d6e8050fa3b6cb8d8fa9f1 | moleculas/narCo-in | /src/qt/sendcoinsentry.cpp | C++ | cpp | 4,210 | permissive | #include "sendcoinsentry.h"
#include "ui_sendcoinsentry.h"
#include "guiutil.h"
#include "bitcoinunits.h"
#include "addressbookpage.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#include "addresstablemodel.h"
#include <QApplication>
#include <QClipboard>
SendCoinsEntry::SendCoinsEntry(QWidget *parent) :
Q... |
ea9a6166c564d8041f55116bc3e640bdf41ca3f5 | f8b0ceb020d527cc4bd84735cf384bd2a54bf49e | zwsatan/Sanguosha | /src/sgs_ui/sgsui_BlockTimer.cpp | C++ | cpp | 1,057 | no_license | #include "sgsui_BlockTimer.h"
#include "sgsui_GUIStaticData.h"
#include "sgsui_output.h"
#include <QTimer>
namespace sgsui {
BlockTimer::BlockTimer(QObject *parent)
: QObject(parent)
{
m_blockTimer = new QTimer(this);
m_blockTimer->setSingleShot(true);
connect(m_blockTimer, SIGNAL(timeout()), this, SLOT(unblock()... |
969c31afd2b3abab2f21b3b5b06cc40f97bfb923 | e6b84618744510b770adde1b358a586e45a55c51 | leoliuliang/Audio-Video | /H264MediaCodecDemo/rtmpliving/src/main/cpp/rtmp-lib.cpp | C++ | cpp | 8,795 | no_license | #include <jni.h>
#include <string>
#include <android/log.h>
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,"---->",__VA_ARGS__)
extern "C"{
#include "librtmp/rtmp.h"
}
typedef struct {
RTMP *rtmp;
int16_t sps_len;
int8_t *sps;
//
int16_t pps_len;
int8_t *pps;
} Live;
Live *live = NULL;
... |
7bbf311b007bd2b3423d06c2607fc0c4404be244 | 4e54e19ae05e5a33c23450aab72dda30a70ce0e1 | WIZARD-CXY/pl | /leetcode2/sudokusolver.cpp | C++ | cpp | 1,531 | permissive | class Solution {
public:
void solveSudoku(vector<vector<char>>& board) {
helper(board);
}
bool isvalid(vector<vector<char> > &board, int x, int y){
//check col
for(int i=0; i<9; i++){
if(i!=y){
if(board[x][y]==board[x][i]){
return ... |
337cd0192e4f6f7b8b97c4df6d7116f98a2294ef | 237a78b58d9765588576eb2dd7761401091896d8 | Niko-r/geofeatures | /GeoFeatures/Internal/boost/test/utils/basic_cstring/io.hpp | C++ | hpp | 2,163 | permissive | // (C) Copyright Gennadiy Rozental 2004-2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... |
4fc2a7fcb3292783494721c50c3be8dbb9187293 | d9948fd73f825d228fdf6b96d33d68ce7ed08ae9 | aditya-10012002/DSA_Assignments | /base.cpp | C++ | cpp | 297 | no_license | #include<iostream>
using namespace std;
void convert(int n, int b) {
if(n <= 0) cout << "";
else {
convert(n/b, b);
if(b == 16 && n%b >= 10)
cout << (char)(55 + n%b);
else
cout << (n%b);
}
}
int main() {
int n, b;
cin >> n >> b;
convert(n, b);
}
|
a71f8e795904b4087834c1396d2424a5bc8ab942 | 9834868131754d3f21e594cb4663e17f0cd2b479 | bastianhjaeger/rosbag2 | /rosbag2_cpp/include/rosbag2_cpp/cache/message_cache.hpp | C++ | hpp | 4,825 | permissive | // Copyright 2020, Robotec.ai sp. z o.o.
//
// 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 ag... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.