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 |
|---|---|---|---|---|---|---|---|---|
defd7bd6f62b792d860718440ef414557e067445 | 56846823d7c363e995c9d07ddbe3b481ab5219a1 | ioio-creative/Prototype2_OpenPose | /prototype2_openpose_osc.cpp | C++ | cpp | 26,472 | no_license | // This code is adapted from 1_extract from image.cpp
// ------------------------- OpenPose Library Tutorial - Pose - Example 1 - Extract from Image -------------------------
// This first example shows the user how to:
// 1. Load an image (`filestream` module)
// 2. Extract the pose of that image (`pose` module)
// 3... |
7ddc64ca92da81808f1ffec3e34cfc41cdbf39fd | 2d209ac25095cee0e6c18246fc2918fdf5e60cf0 | emsyscode/ETK6207 | /ETK6207_code_youtube_V3.cpp | C++ | cpp | 33,451 | no_license | /****************************************************/
/* This is only one example of code structure */
/* OFFCOURSE this code can be optimized, but */
/* the idea is let it so simple to be easy catch */
/* where can do changes and look to the results */
/***************************************... |
931ced0a60349671e5fc3c58d883ef78dd406213 | ad48497fe0a6777b6c1af69ea7e049c600b752b0 | onexcash/onex-core | /src/test/merkle_tests.cpp | C++ | cpp | 5,908 | permissive | // Copyright (c) 2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "consensus/merkle.h"
#include "test/test_onex.h"
#include "random.h"
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_... |
bc24cf342db9fd4c2dcfd2ed606b4e259d124bde | f02d96eb2e857403d15a539a729945876b6be4d5 | Mallas011/Modset | /@twc_config/addons/twc_millennial/config.cpp | C++ | cpp | 4,730 | no_license | class CfgPatches
{
class twc_1990
{
units[]=
{
"1990_British_Base",
"1990_British_SectionCommander",
"1990_British_Rifleman",
"1990_British_Gunner",
"1990_British_2IC",
"1990_British_CGG",
"1990_British_CGAss",
"1990_British_Platoon_Commander",
"1990_British_Platoon_Sergeant",
"1990_... |
4c743b0a17f66a2d596680275df87d2afecd3c70 | 3ee788668709d25144af1daf6c1ee2198980efca | Japroriple/chromium | /net/socket/ssl_client_socket_openssl.cc | C++ | cc | 45,154 | 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.
// OpenSSL binding for SSLClientSocket. The class layout and general principle
// of operation is derived from SSLClientSocketNSS.
#include "net/sock... |
e17ecfb21133d09439e213a4d9932ff86e6e2c61 | dfbb242713e62a239f86d7150858fa4a48ad43d7 | Drizshko/openvino | /inference-engine/src/vpu/common/include/vpu/utils/error.hpp | C++ | hpp | 3,437 | permissive | // Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <cassert>
#include <details/ie_exception.hpp>
#include <vpu/utils/io.hpp>
#include <string>
#include <memory>
#include <utility>
namespace vpu {
// TODO: replace with VPU_THROW_FORMAT/VPU_THROW_UNLESS/VPU... |
5e0096c3a8a949fd6de40351d66e3c2489af9860 | 9586d5aca1a947cb1f49387bdc43f6f048fdf4c9 | joker-eph/llvm-project-with-mlir | /llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | C++ | cpp | 37,968 | permissive | //===- DWARFUnit.cpp ------------------------------------------------------===//
//
// 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
//
//===---------------------------... |
17e484af989958d97e3410770228c971c636827e | 4d21a7e1cce991ef5e9c5865f0ae1c37306dc107 | madeso/euphoria | /libs/core/src/core/vec2.test.cc | C++ | cc | 2,080 | permissive | #include "core/vec2.h"
#include "tests/approx_equal.h"
#include "catch.hpp"
using namespace euphoria::tests;
namespace euco = euphoria::core;
TEST_CASE("vec2-add", "[vec2]")
{
const auto v = euco::vec2i(10, 20) + euco::vec2i(1, 2);
REQUIRE(v.x == 11);
REQUIRE(v.y == 22);
}
TEST_CASE("vec2-add_assign",... |
23131a752c6b2de90c19e723d4bb340216aef3f1 | f58b6321500ed0dca3da78b1cea34158a85b74f8 | abdulhanan1000/27-QUESTION-CPP-ASSIGNMENT | /QUESTION 16.cpp | C++ | cpp | 434 | no_license | #include<iostream>
#include<conio.h>
#include<cctype>
#include<cmath>
#include<string>
using namespace std;
void main() {
//**********ASSIGNMENT 3*************
//QUESTION 16
int arr[5];
for (int i = 0; i < 5; i++) {
cout << "enter number: ";
cin >> arr[i];
}
int sum=0;
for (int i = 0; ... |
d3bf976b422335658b2b7e2942fd8475e82af5e3 | 5c59b98bf50f5208d0bd301cbc5ef2e0ee0a9100 | 02OX/BitcoinShine | /src/qt/bitcoin.cpp | C++ | cpp | 23,972 | permissive | // Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
#endif
#include "bitcoingui.h"
#include "chainparams.h"
#incl... |
07f028f9b9d6bd2863ee25f9ecbda9f214b6b79d | 29ce6b0f58e1033260caf17ef5978f59b6df50b2 | aatsuty/pytorch | /torch/lib/c10d/ProcessGroupGloo.cpp | C++ | cpp | 93,410 | permissive | #include <c10d/ProcessGroupGloo.hpp>
#include <c10d/GlooDeviceFactory.hpp>
#include <chrono>
#include <exception>
#include <ratio>
#include <tuple>
#ifdef _WIN32
#include <gloo/common/win.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <netdb.h>
#include <sys/socket.h>
#include <unistd.h>
#endif
#includ... |
e8c8ccc60c95c8f84add4c887036abde5159d28f | 09e5a486393bf21b96d2a5a0724f398215530056 | powi2/MINNO | /2019_06_03 Inno3_MX_v0.06j/Inno3_MX/SR_Trim_S.cpp | C++ | cpp | 7,116 | no_license | //==============================================================================
// SR_Trim_S.cpp (User function)
//
// void SR_Trim_S_user_init(test_function& func)
// void SR_Trim_S(test_function& func)
//
//==============================================================================
#include "asl.h"
// Dis... |
f53101a3e5e1a3acbb3b9f3149ec5af7b2dcfb8e | e04a7fc92181e985f959bbe4a1974d00ff16d58c | mmanoharahere/CodingChallenges | /CTCI/3.5_Sortstack/main.cpp | C++ | cpp | 720 | no_license | #include <iostream>
#include<stack>
using namespace std;
stack<int>sortStack(stack<int>& input){
stack<int>tmpStack;
while(!input.empty()){
int tmp = input.top();
input.pop();
while(!tmpStack.empty() && tmpStack.top() > tmp){
input.push(tmpStack.top());
tmpStack... |
4c70a1d88dad786f2f79a3c8393a09f38ee0ac1b | 931851eb58d41cba84f2c28a170d294e1d0a6eb0 | DreamLolita/BZOJ | /201804/0420/test/rotate.cpp | C++ | cpp | 5,705 | no_license | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cctype>
#define N 1020
#pragma GCC optimize("O3")
using namespace std;
class Node
{
public:
Node *s[2];
char v;
int z;
bool f;
Node(int _v = 0) : v(_v), z(1), f(false)
{
s[0] = s[1] = NULL;
return;
}
... |
fd21612ec72dc918dd3381e56796a7b431b7fef1 | 9222232d669d1d9216732b8d7979081b75ff94c0 | higorbreno/Arena | /Arena/Window.cpp | C++ | cpp | 8,698 | no_license | /**********************************************************************************
// Window (Código Fonte)
//
// Criação: 19 Mai 2007
// Atualização: 01 Nov 2021
// Compilador: Visual C++ 2019
//
// Descrição: A classe abstrai todos os detalhes de configuração de
// uma janela para um jogo.
//
*... |
04b5370ebd3b808b47a9d7f968e4258747c678d4 | 6518b880233efe6d2f395f1af7de192cf0868c0b | yps158/randomGraph | /testdata/12/15/src/node9.cpp | C++ | cpp | 2,264 | no_license |
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "unistd.h"
#include <sstream>
#include <random>
std::random_device rd;
std::mt19937 gen(rd());
std::normal_distribution<> d(0.024950, 0.005);
class Node9{
public:
Node9(){
sub_5_9_flag = 0;
sub_5_9 = n.subscribe("topic_5_9", 1,... |
fc6c70864e93a0286dae47acd15f642d36979e95 | 92c930e33eaa71be60e601b9a70b60389520a4a2 | KiCad/wxWidgets | /samples/joytest/joytest.cpp | C++ | cpp | 5,099 | no_license | /////////////////////////////////////////////////////////////////////////////
// Name: joytest.cpp
// Purpose: Joystick sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////... |
7a44243f5c365f6988efb5395ff507068e4e7619 | 7a86f3de1a725352bfe30cd0fddd1b6db08ac581 | xiehaison/andawell | /utils/socket/clientsocket/CltSock.cpp | C++ | cpp | 2,528 | no_license | // CltSock.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "CltSock.h"
#include "clientsock.h"
#include "../include/packet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
///////////////////////////////////////////////////////////////... |
e8de7c31f49c424c1e053e080c2ba7ffc887cfdb | f3d150dd4c15a75135320c9c7cde89e1f86b7127 | angilyu/Utility | /Utility/Queue/ArrayQueue.cc | C++ | cc | 1,140 | no_license | #include <iostream>
#include <list>
#include "ArrayQueue.h"
using namespace std;
ArrayQueue::ArrayQueue(int queueSize):
size(queueSize), array(new int[queueSize]) {
// Change to C++ style initialization
headIndex = 0;
tailIndex = 0;
count = 0;
}
bool ArrayQueue::isFull() const {
return ... |
f79ae6183a56b87f64f9a07a2a986d4a326e001f | 223c87ab6cd5389555b2b48d51eccd949070ffb3 | jeffherman/vtr-verilog-to-routing | /vpr/src/pack/pb_type_graph.cpp | C++ | cpp | 68,166 | permissive | /**
* Jason Luu
* July 17, 2009
* pb_graph creates the internal routing edges that join together the different
* pb_types modes within a pb_type
*
* Daniel Chen
* July, 2013
* Pb_graph checks implemented:
* - Double edges between two pins
* - Input pin equivalence mismatch with architecture file (warning)
... |
84dd7c92854db5cb000ef18082577caf69d1607e | 4319ad361f0ebd66d1663f3fcddbd76839899571 | fU9ANg/ab | /tools/ChenyuanTypes/ChenyuanTypes.cpp | C++ | cpp | 470 | no_license |
#include <stdio.h>
#include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <map>
#include "ChenyuanProcess.h"
#define XML_FILENAME "./ChenyuanTypes.xml"
using namespace std;
int main ()
{
xmlChenyuanDefine tmpdefine;
const std::string strFile = X... |
3008eb9a3a727598b06451c7fff82287f8c5ff28 | bed9a2dbcb9ffd6dd6361c12e7c3a9e1af068010 | Yuu-233/slang | /source/slang/slang-emit-source-writer.cpp | C++ | cpp | 14,526 | permissive | // slang-emit-source-writer.cpp
#include "slang-emit-source-writer.h"
// Disable warnings about sprintf
#ifdef _WIN32
# pragma warning(disable:4996)
#endif
// Note: using C++ stdio just to get a locale-independent
// way to format floating-point values.
//
// TODO: Go ahead and implement the Dragon4 algorithm so
//... |
c73eacea4a7fef31e11e5593a2fcffdddf5f5b5a | fc89a0e0a6084c8ed5858a29ac0be3a0f67ceade | stefanreuther/afl | /u/t_container_memberiterator.cpp | C++ | cpp | 1,844 | no_license | /**
* \file u/t_container_memberiterator.cpp
* \brief Test for afl::container::MemberIterator
*/
#include "afl/container/memberiterator.hpp"
#include <map>
#include "u/t_container.hpp"
#include "afl/container/dereferencingiterator.hpp"
/** Simple test. */
void
TestContainerMemberIterator::testIt()
{
std:... |
bd7ec343b14bb688edbc9998a73ac8cb445d138d | fcb40e74a20c18e0c975564e49d6252aa5226991 | cabincabin/argos3-kheperaiv | /src/plugins/robots/kheperaiv/real_robot/real_kheperaiv_ultrasound_sensor.cpp | C++ | cpp | 1,027 | no_license | #include "real_kheperaiv_ultrasound_sensor.h"
/****************************************/
/****************************************/
CRealKheperaIVUltrasoundSensor::CRealKheperaIVUltrasoundSensor(knet_dev_t* pt_dspic) :
CRealKheperaIVDevice(pt_dspic) {
kh4_activate_us(0x1F, GetDSPic());
}
/******************... |
2566b183b22d05eb7831aaeb880b13600aa50b7d | ada5d339d759404c66594d0236f0b4a7cb5e9e75 | cmbruns/osgpyplusplus | /src/modules/osgSim/generated_code/LineOfSight.pypp.cpp | C++ | cpp | 6,219 | no_license | // This file has been generated by Py++.
#include "boost/python.hpp"
#include "wrap_osgSim.h"
#include "LineOfSight.pypp.hpp"
namespace bp = boost::python;
void register_LineOfSight_class(){
bp::class_< osgSim::LineOfSight, boost::noncopyable >( "LineOfSight", "\n Helper class for setting up and acquiring line ... |
1501dd5490a8986a135cfbd96c6f3d181f651baa | a9c43cfa8083c60bc0efa0b59c6b499e49a1736e | wozaiwogu/cocos2dx | /cocos/platform/winrt/CCDevice.cpp | C++ | cpp | 7,970 | no_license | /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentati... |
adfe95beda39052664f44a93466dfa5c639c5978 | 3240393a465571968076f791128632d57cd9ffb9 | Whisky92/UDProg-Introduction | /source/Ch04/chapter/unit3.cpp | C++ | cpp | 476 | permissive | #include "../../std_lib_facilities.h"
int main()
{
constexpr double cm_per_inch = 2.54;
double length = -1;
char unit = 0;
cout << "Please enter a length followed by a unit (c or i):\n";
cin >> length >> unit;
switch (unit){
case 'i':
cout << length << "in==" << cm_per_inch*length << "cm\n";
break;
cas... |
8401d6aa18bc5a2259187966fc04e711a4c228c3 | e9e0320a082cc2177dfcad5667039e2aa342881a | cloudwu/RmlUi | /Samples/basic/databinding/src/main.cpp | C++ | cpp | 12,221 | permissive | /*
* This source file is part of RmlUi, the HTML/CSS Interface Middleware
*
* For the latest information, see http://github.com/mikke89/RmlUi
*
* Copyright (c) 2018 Michael R. P. Ragazzon
* Copyright (c) 2019 The RmlUi Team, and contributors
*
* Permission is hereby granted, free of charge, to any person obtai... |
4d970039b04d0e229461b4b6c403d8a3af3a5a4c | 60ebc8e8dde4d1e23159febae6536f7c5b7b8c9d | hazelnusse/ut | /example/mut.cpp | C++ | cpp | 609 | permissive | //
// Copyright (c) 2019 Kris Jusiak (kris at jusiak dot net)
//
// 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)
//
#include <boost/ut.hpp>
int main() {
using namespace boost::ut;
auto i = 0; // mutable
... |
6bfdf9eaba03ecab7d023d537e368402d1627a32 | 679face58a4573a937ef7c125d5b266ad8acc2fc | vikashkumarjha/missionpeace | /lc/lc/2021_target/companies/fb/youtube/lc_455_assign_cookies.cpp | C++ | cpp | 1,239 | no_license | /*
* Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum size of a cookie that the child will be content with; and each cookie j has a size sj. If sj >= gi, we can assign the cookie j ... |
2a7fe13d4a20829a674dcb3d4864c48239daa26e | 8bfa7e53a04790244ea62803a725e41746c507b8 | aharthcock/phantomjs | /src/qt/qtwebkit/Source/WebKit/win/WebInspector.cpp | C++ | cpp | 6,901 | permissive | /*
* Copyright (C) 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditi... |
ae5d7bf062797a9c187524abd01a576ea46f305e | 434c3a15205b8934e233ccf62126a660cfa42716 | amitpatle10/Problems | /Codeforces /Contest/round 727/C_Stable_Groups.cpp | C++ | cpp | 1,542 | no_license | #include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric... |
cc434cc280c21056b26d5c34f9f2815620414d46 | d0df789497a1b6e23f1daffa2bc103dbd2a1ba15 | SerVB/pph-native | /pheroes/Game/Dlg_ArmyRoom.cpp | C++ | cpp | 2,685 | permissive | /*
* This file is a part of Pocket Heroes Game project
* http://www.pocketheroes.net
* https://code.google.com/p/pocketheroes/
*
* Copyright 2004-2010 by Robert Tarasov and Anton Stuk (iO UPG)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in comp... |
42f8bd999822d834f9e2b082c91f668298b73eb3 | 4e34513adb2a011184f3dd08d42ef86dc0036184 | KDSBest/service-fabric | /src/prod/src/Common/AsyncFile.WriteFileAsyncOperation.cpp | C++ | cpp | 4,741 | permissive | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using name... |
bffe7f4bd5b19b8d531b48dae1d2e863bbe89c4f | 6ff423c824f31f75b963daea654ac22385e62648 | Galenika/CSS-Internal | /src/tools/math.cpp | C++ | cpp | 4,556 | no_license | #include "math.h"
void math::MatrixSetColumn(const Vector &in, int column, matrix3x4_t& out)
{
out[0][column] = in.x;
out[1][column] = in.y;
out[2][column] = in.z;
}
void math::SinCos(float a, float* s, float*c)
{
*s = sin(a);
*c = cos(a);
}
void math::AngleVectors(const Vector &angles, Vector& forward)
{
Asse... |
848f1318ea2584b1dd25ff35c3a62d982bc68d6b | 8574d7c91bfa7c09d4baa03e9db13ff5913b01bb | Anchit1999/3dgame | /src/volcano.cpp | C++ | cpp | 2,970 | no_license | #include "volcano.h"
#include "main.h"
#define N 100
Volcano::Volcano(float x, float y,float z, color_t color)
{
this->position = glm::vec3(x, y, z);
this->rotation = glm::vec3(0, 0, 0);
speed = 1;
speedz = 0.0f;
speedy = 5.0f;
// Our vertices. Three consecutive floats give a 3D vertex; Three c... |
1921716b18dbd6ba69181e8a9ac14a3bf4c1846e | cc7746f45978767381122a6f28818ff0db65fe2b | bluehenggege/quiche | /spdy/core/hpack/hpack_encoder.cc | C++ | cc | 13,481 | 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 "spdy/core/hpack/hpack_encoder.h"
#include <algorithm>
#include <limits>
#include <utility>
#include "http2/hpack/huffman/hpack_huffman_encoder... |
4f28833db4de37f828209f7613b0662ffceba324 | fd814e1aa6e6cce96384097cb743289076d3c62a | staticfloat/liblsl | /lslboost/boost/core/swap.hpp | C++ | hpp | 2,068 | permissive | // Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
//
// 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)
// For more information, see http://www.boost.org
#ifndef BOOST_CORE_SWAP_HPP
#defin... |
4a07da2dd42faeb655d09d72161544a0f965f50c | 864fd14863a61a335c1c86ce89030472f9538c1a | quinsmpang/game-LostStar | /Classes/UI/Biguangka.cpp | C++ | cpp | 42,991 | no_license | #include "Biguangka.h"
#include "Debug.h"
#include "VersionControl.h"
#include "font.h"
#include "LFStrings.h"
#include "ResManager.h"
#include "UserDataManager.h"
#include "GameInforEditer.h"
#include "LevelManager.h"
#include "Myobject.h"
#include "Uimsg.h"
#include "GameLayerFactory.h"
#include "Starseneui.h"
#incl... |
a96e984bf3e014349830a148ee4ac2e40c61466f | a19f3dc4cd0053433fd156f58ef6a45eddb824dc | YueLeeGitHub/algorithm | /alibaba/0308/1.cpp | C++ | cpp | 858 | no_license | //
// Created by admin on 2021/3/8.
//
using namespace std;
#include <iostream>
#include <vector>
class Solution{
public:
int find(int k,vector<int>& nums){
int cnt = 0;
int pre = nums[0];
for (int i = 1; i < nums.size(); ++i) {
if(nums[i] != pre+1){
cnt += nums... |
2dce7b0dc5202edadf723c875e6fbe22f3f73e0e | de320bbef350bfebef8517e909f796bbf8fe94e5 | MasterIceZ/Code_CPP | /Code_15/TOI15/NC_Superjump.cpp | C++ | cpp | 1,489 | no_license | /*
TASK:NC_Superjump
LANG: CPP
AUTHOR: KersaWC
SCHOOL: REPS
*/
#include<bits/stdc++.h>
using namespace std;
struct A{
int i;
double w;
int ch;
bool operator<(const A&o)const{
return w>o.w;
}
};
struct B{
int i;
double w;
};
priority_queue< A >h;
vector<B> g[10010];
double... |
7b34610f904308e8209e72e42fdabaa67f46593a | b721d95104b470ee82a5e3370ce6e485b610ae26 | zyxeeker/Qt_Component | /component/ScalableMenu/scalable_menu.cpp | C++ | cpp | 2,678 | no_license | //
// Created by zyx on 2021/7/21.
//
// You may need to build the project (run Qt uic code generator) to get "ui_ScalableMenu.h" resolved
#include "scalable_menu.h"
#include "ui_Scalable_Menu.h"
ScalableMenu::ScalableMenu(int rMin, int rMax, int btnW, int btnH, int handleW, QWidget *main, QWidget *menu,
... |
a0ba2811ed7f98478dff6cd43c39a3432f98d4ba | e8257a503fcd9b3b37b02e87caeaf6e275f60073 | kant/mozc | /src/base/multifile_test.cc | C++ | cc | 5,255 | permissive | // Copyright 2010-2017, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of condit... |
2652a87fed950ab9b09b0166120b0fbaf60057c5 | b4e6e44144633b8d9a37ae3133cd7b0ad43743ce | radix-io-archived/iofsl | /src/iofwd/frontend/bmi/IOFWDReadRequest.cpp | C++ | cpp | 5,608 | no_license | #include "IOFWDReadRequest.hh"
#include "zoidfs/zoidfs-proto.h"
#include "iofwd_config.h"
#include "iofwdevent/BMIResource.hh"
namespace iofwd
{
namespace frontend
{
//===========================================================================
IOFWDReadRequest::~IOFWDReadRequest ()
{
zoidfs::hints::zoidfs_h... |
5b612397ccea3ddc7606dc161de78260f3d73090 | 89c4c6bb3707a18fecfcc676a4788f6758297dd7 | mfkiwl/eve | /test/unit/module/core/convert/int8/convert.hpp | C++ | hpp | 1,903 | permissive | //==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright 2020 Joel FALCOU
Copyright 2020 Jean-Thierry LAPRESTE
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
**/
//=====... |
7f2274a9e16684b0db8d73f3d919793ccc57d6d9 | 8b850c648edc72690bc72c24158432a6eac420e3 | JeremyBois/Tefnout | /Tefnout/src/Tefnout/Core/Logger.cpp | C++ | cpp | 2,889 | permissive | #include "Logger.hpp"
#include <spdlog/common.h>
// This ignores all warnings raised inside External headers (for both clang and GCC)
// https://nelkinda.com/blog/suppress-warnings-in-gcc-and-clang/#d11e364
_Pragma("GCC diagnostic push")
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/stdout_color_sin... |
4e6e04ece97a33c67b3a9d73806478c0795ccd96 | cb43c6085bdf065fb45b0e650cc94e658d086691 | grpatter/GameServer_Legacy | /src/swganh_core/object/object.cc | C++ | cc | 45,247 | permissive | // This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include "object.h"
#include <glm/gtx/transform2.hpp>
#include <sstream>
#include <vector>
#include "object_events.h"
#include "swganh/logger.h"
#include "swganh/crc.h"
#include "swganh/obs... |
cd0d579ba671be4f43d322473d8d0c524e81daec | 01467cb4d72ea0826ca59c5f87d454b592fdbf30 | mcopik/cxx-langstat | /lib/Analyses/TemplateInstantiationAnalysis.cpp | C++ | cpp | 20,312 | permissive | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/raw_os_ostream.h"
#include "llvm/ADT/StringRef.h"
#include "clang/AST/TemplateBase.h"
#include <nlohmann/json.hpp>
#include "cxx-langstat/Analyses/TemplateInstantiationAnalysis.h"
#... |
07cd551f1e5f6641b6dee0e6bf0ae052c0a509dd | 480b268848e4c9dbfe53ac4c6598456c338d4364 | AsheSSS/so_gauss | /app/src/main/cpp/fast_test.cpp | C++ | cpp | 3,236 | no_license |
#include "log4z.h"
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <android/log.h>
using namespace zsummer::log4z;
#ifdef WIN32
#include <windows.h>
#endif
#define LOGAAA(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
extern "C"
JNIEXPORT jint JNICALL
Java_com_example_alw_myap... |
62c7cd57e2370afc6ac7d75a31fe5ff2e5a400c6 | c43efb642a688ef1dd9e78c796df74c9d9d6f7ed | guiraldelli/coding_exercises | /kattis/dicegame.cpp | C++ | cpp | 1,927 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef unsigned short us_t;
typedef unsigned int ui_t;
typedef unsigned long ul_t;
int main() {
array<us_t, 4> gunnar_dice;
array<us_t, 4> emma_dice;
for (us_t i = 0; i < 4; ++i) {
cin >> gunnar_dice[i];
}
for (us_t i = 0; i < 4; ++i) {
... |
5f1f997aaefbdf68ddfca894a3c9401edff4803b | 91341adfa1d39b38e7aa48f916a12781988dd637 | Jeremy-Fries/CCME | /Individual.hpp | C++ | hpp | 12,292 | no_license | //
// Individual.hpp
// Mapping_Elites v1
//
// Created by Jeremy Fries on 10/26/15.
// Copyright © 2015 Jeremy Fries. All rights reserved.
//
class Individual;
#ifndef Individual_hpp
#define Individual_hpp
#include <stdio.h>
#include <iostream>
#include <iterator>
#include <vector>
#include <algorithm>
#include... |
ac548ec935f0695ca0350197b0e6381f0f55c9e6 | 17e515cb1bd95e5e5a6736a8fd2c9be862b95f61 | Victoreges/lab03CPE | /registro.cpp | C++ | cpp | 2,514 | no_license | // feito por: Lucas Rodrigues
#include <iostream>
#include <vector>
#include <string>
using namespace std;
void menu(){ // função para exibição do menu
cout << "************** Cadastro de aluno ENE **************" << endl;
cout << "1 - Inclusão aluno\n";
cout << "2 - Exclusão aluno\n";
cout << "3 - Pesqu... |
23953dc9089d76507a3bb289f53b2c095ca52d7c | aa808a359a56f968da4a8f3a777bf14518103ad0 | waitingchange/ModifyLayanative2.0 | /Conch/source/render/LayaGL/JCLayaGL.cpp | C++ | cpp | 57,737 | permissive | /**
@file JCLayaGL.cpp
@brief
@author James
@version 1.0
@date 2018_5_25
*/
#include "JCLayaGL.h"
#include <util/Log.h>
#include <stdio.h>
#include <stdlib.h>
#include "../JCCmdStruct.h"
#include <math/Matrix32.h>
#include <util/JCCommonMethod.h>
#include "JCLayaGLDispatch.h"
#include <Bridge/JCConchBridge.h... |
887662b0108b539ac1f9b7b8c848465fd106b7e0 | 21011723cd8291c8af43ba9bdba1c02c87dbcdd3 | ric2b/Vivaldi-browser | /chromium/chrome/browser/user_notes/user_note_service_factory.cc | C++ | cc | 2,085 | permissive | // Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/user_notes/user_note_service_factory.h"
#include <utility>
#include "base/memory/singleton.h"
#include "chrome/browser/profiles/profile.h"
#include "... |
053762c2d59b39ac6883bf4f2d01c7bf2b48e1f6 | 5f649b2b0ead411b47dac6c6e046900d8d528e80 | Aidanv1/Alpha-GameEngine | /Source/AlphaEngine/AlphaEngine/Graphics3D/Scene/LightNode.cpp | C++ | cpp | 3,438 | no_license | #include "LightNode.h"
#include "Scene.h"
// -----------------------------------------------------------------------
LightNode::LightNode() :
m_lightProperties(),
m_lightID(0),
m_distanceToCamera(0),
m_shape(NULL)
{
}
// -----------------------------------------------------------------------
LightNode::~Li... |
c92ca9c17c703d882a2e576e16ea0006e416f95e | b3f572e2e9bfa2ff1a195d060f36b87c5c731849 | google-code/atf2flightsim | /ATF2/control-software/epics-3.14.8/extensions/src/ChannelArchiver/ThirdParty/xerces-c-src2_4_0/src/xercesc/dom/impl/DOMNodeListImpl.hpp | C++ | hpp | 4,245 | permissive | #ifndef DOMNodeListImpl_HEADER_GUARD_
#define DOMNodeListImpl_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provid... |
0b8d0c23a45956513f65504aeb4a4787e56c34cd | 20eb570851172a17bc6fa16d5a8d52d24905851a | orcd/code | /ee/C/15/dict_qt/widget.cpp | C++ | cpp | 1,385 | no_license | #include "widget.h"
#include "ui_widget.h"
#include <QDebug>
#define cout qDebug() //没有分号
//C++包含C的头文件
extern "C"
{
#include "dict.h"
}
//全局变量
Dict * p; //指针变量
int n; //单词个数
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
//构造函数初... |
a9cc00fe034d3987d21c4404ce224b7141338274 | fe7e405f4b86a14b2826e3d84f347f4b24bf5e20 | esotericwarrior/CS162 | /Lab 7/inputValidation.hpp | C++ | hpp | 559 | no_license | /************************************************************************
** Program name: que *
** Author: Tristan Santiago *
** Date: February 28, 2018 *
** Description: header file for input validation *
************************************************************************/
#ifndef INPUTVALIDAIT... |
ae66fa73ceec21983d8d74cb44b3dce2ba5d473c | b2cf751d363eb80605bb2f06a2c2eb30a2f84d7b | joschu/surgical | /MotionPlanning/benchmark_runner.cpp | C++ | cpp | 1,362 | no_license | #include <boost/program_options.hpp>
#include <boost/timer.hpp>
#include <iostream>
#include <stdio.h>
#include <omp.h>
#include <signal.h>
using namespace std;
namespace po = boost::program_options;
omp_lock_t writelock;
int main(int argc, char* argv[]) {
omp_init_lock(&writelock);
unsigned int seed;
flo... |
cc4430921eb1a30c8779762493ef9f2baaafd026 | 5bc2e766d5730d86b0bcf0382bdebf82a09a49c2 | gitarmpit/libarmpit | /examples/SYSTICK/keil_f4/main.cpp | C++ | cpp | 1,796 | no_license | /*
* The MIT License (MIT)
*
* Copyright (c) 2015 igorS
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, cop... |
22e791843f087ba41b1b59382cec598e109e9022 | 79e6f9512a0dc7617dea9dcc1d983c831528170e | TSC21/rtabmap | /corelib/src/RtabmapThread.cpp | C++ | cpp | 18,313 | no_license | /*
Copyright (c) 2010-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... |
759bbc0c27f6c019ab4f30d5e8425f3f233a7cd2 | 45f2ed1a76cdcf5671a174f7673c64cf35ef3384 | kbains6/Piezas | /PiezasTest.cpp | C++ | cpp | 3,499 | permissive | /**
* Unit Tests for Piezas
**/
#include <gtest/gtest.h>
#include "Piezas.h"
class PiezasTest : public ::testing::Test
{
protected:
PiezasTest(){} //constructor runs before each test
virtual ~PiezasTest(){} //destructor cleans up after tests
virtual void SetUp(){} //sets up before each test (after constructo... |
97c8b7e6b880707730f440aa7e425d1a2164c39a | 46004a135669d68a00237768af7abd3ff0acaec2 | marwahaha/netfix | /src/StringUtils.cpp | C++ | cpp | 2,215 | no_license |
//if the compiler is MSVC (as MSC_VER is also set by Intel Compiler, the condition had to be adapted)
#if _MSC_VER && !__INTEL_COMPILER
//#include "stdafx.h"
#endif // _MSC_VER
#include "StringUtils.h"
#include <sstream>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
StringUtils:... |
a8b07bb40253a5c4027464aa3c68e33181787177 | 01a5be36dc7b9867b2263e9c2060433fc459d80f | jackinelee/kaze_opencv | /KazeOpenCV.cpp | C++ | cpp | 4,629 | no_license | // KazeOpenCV.cpp : 定义控制台应用程序的入口点。
//
#include "predep.h"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "KAZE/kaze_features.h"
#pragma comment( lib, cvLIB("core") )
#pragma comment( lib, cvLIB("imgproc") )
#pragma comment( lib, cvLIB("h... |
e3dd4bbf760d50225cd584eb5597e31a893b27b0 | fa5dddd3dcd8565f893fc655b610f442f747ac08 | dholle2/RayTracer | /src/Utilities/Mesh.cpp | C++ | cpp | 1,230 | no_license | // Copyright (C) Kevin Suffern 2000-2007.
// This C++ code is for non-commercial purposes only.
// This C++ code is licensed under the GNU General Public License Version 2.
// See the file COPYING.txt for the full license.
#include "Mesh.h"
// ----------------------------------------------------------------... |
6b2f623dea91ed8628c9a941439cb56f90b248f0 | bc1944be4d52eedf3a60b13608fe3db16e08050f | fernandesitalo-zz/Competitive-Progamming | /UVA OJ - ALL/00532 - Dungeon Master.cpp | C++ | cpp | 4,459 | no_license | //Geometria computacional
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <set>
#include <functional>
#include <string.h>
#include <bitset>
#include <queue>
#include <limits.h>
#include <map>
#include <stack... |
a61a8ea0cc87e5efc8ce681f0307e80ed058e0a5 | 35067c6ba388419a3f77e88382184a513cd9c05a | ZeroBone/ZBoss | /include/zboss/components/ui/label.hpp | C++ | hpp | 1,374 | permissive | #ifndef ZBOSS_UI_LABEL_COMPONENT_HPP
#define ZBOSS_UI_LABEL_COMPONENT_HPP
#include <zboss/engine.hpp>
#include <zboss/entity/entity.hpp>
#include <zboss/entity/component.hpp>
#include <zboss/components/transform.hpp>
#include <zboss/assets/loaders/font.hpp>
using namespace std::literals;
namespace zboss {
cl... |
0acc137756b6433bbf945ba36498e8bb4e0916cb | bcde1ffee51e6d658d0304ac66c778da2b084864 | 007Robin/Practice | /session13/08LockAccountThread.cc | C++ | cc | 958 | no_license | #include<thread>
#include<iostream>
#include<unistd.h>
#include<mutex>
//use mutex will take long time. lock/unlock slow.
using namespace std;
class Account{
private:
double bal;
mutex m;
public:
Account() {bal = 0;}
void deposit(double amt){
//first read bal into register, add amt, write back
m.lock()... |
e083832d7a864963e0ec2cec8dc0f36c22729ff5 | c989b542c2385eb57637038eede1ad8bee637396 | mpound/carma | /carma/sdp/SpwBandRelationships.cc | C++ | cc | 4,791 | permissive | /**
*
* @file SpwBandRelationships.cc
*
* Mapping of correlator bands and sidebands to output spectral windows.
*
* $Id: SpwBandRelationships.cc,v 1.11 2009/12/31 04:11:03 friedel Exp $
*
* @author Athol Kemball
*/
// Carma includes
#include "carma/sdp/SpwBandRelationships.h"
// Carma tools includes
// C++ ... |
198212be2ad7e8a33d8998d7bcc88ef9928424fe | e77a8b0cc2c410b84e95b0a00845d829651dbef7 | VB6Hobbyst7/OSGAddOnsGV | /Bindings/Python/OSGWindow/module/generated/FBOBackground.pypp.hpp | C++ | hpp | 1,307 | no_license | // This file has been generated by Py++.
// PyOpenSG is (C) Copyright 2005-2009 by Allen Bierbaum
//
// This file is part of PyOpenSG.
//
// PyOpenSG is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License as published by the Free
// Software Foundation; ... |
ac720ad0a9fe23f572d9db63ef934239838f886e | 70cb01dfbde528551fcb98dc1392eb0c1ad4a9e2 | galator001/sgi-evaluation | /TestCK/main.cpp | C++ | cpp | 3,195 | no_license | #include <iostream>
#include "Point2D.h"
#include "Rectangle.h"
#include "FactorChecker.h"
#include <assert.h>
using namespace std;
/*
Running tests to make sure the bottom left point, width and height are getting set correctly
*/
void RunCreateRectangleTests(){
Point2D point = Point2D(2, 2);
Rectangle re... |
17050ae0531f4b777cd66bb5de42d58fdb4c5f5c | 676cca7e80f20df87c58cbc550e32efe1f305624 | DTidd/OpenRDAAPI | /payroll/payw2mm.cpp | C++ | cpp | 74,091 | no_license | /* payw2mm.c - Create Magnetic Media for W2's */
#ifndef WIN32
#define __NAM__ "payw2mm.lnx"
#endif
#ifdef WIN32
#define __NAM__ "payw2mm.exe"
#endif
#include <app.hpp>
#include <mix.hpp>
#include <ldval.hpp>
#include <pay.hpp>
/*ADDLIB mix */
/*ADDLIB olh */
/*ADDLIB sec */
/*ADDLIB trans */
/*ADDLIB gui */
/*ADDLIB ... |
267733c7e62681d78f21898e64dfe36305410b5a | fd0eccc145d805a5b88ff7e6d033af4ae8ad3765 | digitalshekel/digitalshekel | /src/qt/askpassphrasedialog.cpp | C++ | cpp | 9,924 | permissive | // Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "askpassphrasedialog.h"
#include "ui_askpassphrasedialog.h"
#include "guiconstants.h"
#include "walletmodel.h"
#inc... |
aaf9120d788b303e005ab03469f578bbc4153f4b | 29fbf3212bebb35a76f74a722e8a5ac6e5fd0bb7 | huaxz1986/tensorflow | /tensorflow/compiler/xla/hlo/experimental/auto_sharding/auto_sharding_dot_handler.cc | C++ | cc | 46,867 | permissive | /* Copyright 2022 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... |
a0d92b6c26cf4fb46d419ba4c91c0245188d046d | 51b4b0e08b145c0eb210372b9304c64db977aeae | tectas/redex | /libredex/JarLoader.cpp | C++ | cpp | 26,833 | permissive | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <boost/iostreams/device/mapped_file.hpp>
#include <cstdint>
#include <iostream>
#include <utility>
#include <vector>
#i... |
a49958e57912d1cdbb1f0a070a9c89be070cc6b1 | bc89a6d8aaff8ff50db9d7624959eb48f657f8db | multicgu/cpp | /tsinghua/rhombus.cpp | C++ | cpp | 412 | no_license | #include<iostream>
#include<stdio.h>
using namespace std;
void recursion(int n,int i);
int main()
{
int n,i=1;
cin>>n;
recursion(n,i);
return 0;
}
void recursion(int n,int i)
{
int m=0;
for(m=0;m<(2*n-1)/2;m++)
printf(" ");
for(m=0;m<2*i-1;m++)
printf("*");
puts("");
if(n==1)
return;
recursion(n-1,i+1);... |
e557562ee4609848c986749b64318606c035bf2c | 1a8b92d111d10e6892f4184d6caaaeba76ab74ae | atulagrwl/InstantMirror | /asio/src/tests/unit/read.cpp | C++ | cpp | 25,722 | permissive | //
// read.cpp
// ~~~~~~~~
//
// Copyright (c) 2003-2008 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)
//
// Disable autolinking for unit tests.
#if !defined... |
140855042670fdd3f4a77d154b170942e17702f2 | d79512ceb9c70c6eff2c09882bbf33c03e51c383 | linjieshi/zhongzhui--houzhui | /中缀表达式转换为后缀表达式.cpp | C++ | cpp | 4,583 | no_license | #include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#define STACK_INIT_SIZE 20
#define STACKINCREMENT 10
#define MAXBUFFER 10
typedef char ElemType;
typedef struct
{
ElemType *base;
ElemType *top;
int stacksize;
}sqStack;
void InitStack(sqStack *s)
{
s->base = (ElemType *)malloc(STACK_INIT_S... |
d8db67d267e4002722e38970069cdeafe7bd9fa6 | 493cd7f04bdc9c6f38ee4cb94edb3eac9e17a3df | m-sobieszek/fonline | /ThirdParty/span/test/test_span.cpp | C++ | cpp | 23,307 | permissive |
#define TCB_SPAN_NO_DEPRECATION_WARNINGS
#include <tcb/span.hpp>
#include <cassert>
#include <deque>
#include <initializer_list>
#include <vector>
#include "catch.hpp"
using tcb::span;
struct base {};
struct derived : base {};
TEST_CASE("default construction")
{
static_assert(std::is_nothrow_default_construct... |
6073feabac30dee78b54933d2c16df633f3dd39e | 9d139a659afa6d9437583b723c9cc9cc2b94445c | saerich/RaiderZ-Evolved-Develop | /Server/GameServer/main/GServerDumper.cpp | C++ | cpp | 5,333 | no_license | #include "stdafx.h"
#include "GServerDumper.h"
#include "GPlayerObjectManager.h"
#include "GPlayerObject.h"
#include "GEntityPlayer.h"
#include "GGlobal.h"
#include "GConst.h"
#include "GConfig.h"
#include "GFieldMgr.h"
#include "GField.h"
#include "GSharedField.h"
#include "GSharedFieldMaster.h"
#include "GDynamicFiel... |
65e3781db9cc361484742a25a8f1ce234d8acd9f | 68979f05d2ff13acd486cfe1708e0e7c27a7f0ce | BaldrLector/Arcane-Engine | /Arcane/src/graphics/renderer/renderpass/forward/ForwardLightingPass.cpp | C++ | cpp | 4,859 | permissive | #include "arcpch.h"
#include "ForwardLightingPass.h"
#include <utils/loaders/ShaderLoader.h>
namespace Arcane
{
ForwardLightingPass::ForwardLightingPass(Scene3D *scene, bool shouldMultisample) : RenderPass(scene), m_AllocatedFramebuffer(true)
{
m_ModelShader = ShaderLoader::loadShader("src/shaders/forward/PBR_Mod... |
77859c680295f411a86ef4032c7b655dffc9bbd0 | 15eea6c3e85305453136c75dbab1921513e595b3 | yogesh1202/ENSC-251-Object-Oriented-Programming | /L5/lab5.cpp | C++ | cpp | 8,212 | no_license | /**
* @file Lab5.cpp
* @author Yogesh Mundhra
* @Date 22th June 2018
* @version 1.0
* @section This program is supposed to play the letter game Ladder
* given two words and a dictionary file.
*/
// I declare that this assignment is my own work and that I have correctly acknowledged the
// work of others. I acknowle... |
00d5b00c9b634675e12e9ef7f08c6e030aae0cb8 | c30a8a3b7f37c41a0e881389febe539b41e9a6a0 | malaifa/source | /src/protocols/simple_filters/ResidueDepthFilter.hh | C++ | hh | 9,349 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet;
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
d1ad627506624f5f6e34b76878f63777e841390c | ff5a0afa392dbf32dba1c694378fd7dc9bb74953 | ashishc534/Codeforces | /A. Anton and Danik.cpp | C++ | cpp | 335 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
long long n,a=0,b=0;
cin>>n;
cin>>s;
for(int i=0;i<s.size();i++)
{
if(s[i]=='A')
a++;
else
b++;
}
if(a>b)
cout<<"Anton"<<endl;
else if(b>a)
cout<<"Danik"<<endl;
else
cout<<"Friendship"<<endl;
... |
edc747530a43807fde6b102b693795bb8737f5cd | 45f64e97734464937b016070ea46002007ce4773 | rajputji/Problem-Solutions-CPP | /CF-1331D.cpp | C++ | cpp | 302 | no_license | #include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
string s;
cin >> s;
char ch = s[s.length() - 1];
int n = (int)ch;
if (n % 2 == 0) cout << 0 << endl;
else cout << 1 << endl;
return 0;
} |
a12c2f34be2819ae4655e408734e5562948935ae | 6436a4ebdbeed6581436f7b10b7004c316b3c0d5 | wyaadarsh/LeetCode-Solutions | /C++/0360-Sort-Transformed-Array/soln.cpp | C++ | cpp | 292 | permissive | class Solution {
public:
vector<int> sortTransformedArray(vector<int>& nums, int a, int b, int c) {
vector<int> ans;
for(int num : nums) {
ans.push_back(a * num * num + b * num + c);
}
sort(ans.begin(), ans.end());
return ans;
}
};
|
6490725034d8ec4db08265a4a7c9a016c2e35760 | 631e2b1735931228a7c56e37001c74f00f6dac40 | TenFifteen/SummerCamp | /spw_lintcode/152-combinations/solve.cc | C++ | cc | 931 | no_license | /**
* Problem: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
* Solve: dfs
* Tips: none
*/
class Solution {
public:
/**
* @param n: Given the range of numbers
* @param k: Given the numbers of combinations
* @return: All the combinatio... |
3541ff25fc92c15345bb45460f48fd2612943460 | ecdd1acf151112bdbbe9ab1ef98d512cd101c966 | warishaw99/Software-Testing-A4-A5 | /Code(A4&5).cpp | C++ | cpp | 780 | no_license | #include<iostream>
using namespace std;
int main() {
int num1,num2,num3;
cout<<" Enter value for first number : ";
cin>>num1;
cout<<" Enter value for second number : ";
cin>>num2;
cout<<" Enter value for third number : ";
cin>>num3;
if (( (num1>0) && (num2>0) && (num3>0) ) && !(num1 == num2 && num2 ==... |
6c65532ffab48aeffcf13b40134a4f4e419ca824 | 36ae4ab7f9cc2ddac903a8c096d2767a5a2d91fa | drobertduke/envoy | /source/common/http/filter/fault_filter.cc | C++ | cc | 5,894 | permissive | #include "fault_filter.h"
#include "envoy/event/timer.h"
#include "envoy/http/codes.h"
#include "envoy/http/header_map.h"
#include "envoy/stats/stats.h"
#include "common/common/assert.h"
#include "common/common/empty_string.h"
#include "common/http/codes.h"
#include "common/http/header_map_impl.h"
#include "common/ht... |
ccd4ea251966b8e804a0af4df4fb8ac034222d15 | a8d0ab13f50a813a07a627f3f3a6e88921b2f63d | raozhiming/Elastos.ELA.SPV.Cpp | /SDK/Plugin/Transaction/Payload/CRCProposalReview.cpp | C++ | cpp | 6,598 | permissive | /*
* Copyright (c) 2019 Elastos Foundation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, ... |
3ee3ddbab47efee6933f28f794b5bb2ec855349f | f980648ab925ba0caf34fa0ef394cab8e7c4043e | IntelEdisonDemoDay/maa | /examples/c++/I2c-compass.cpp | C++ | cpp | 4,002 | permissive | /*
* Author: Brendan Le Foll <brendan.le.foll@intel.com>
* Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
* Copyright (c) 2014 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal... |
b06368fcb78fc8bd698de3086ba473e0945d62d7 | b0c833a89479c1f600dda408b077cdcfea720e40 | blusno1/chromium-1 | /content/public/test/url_loader_interceptor.cc | C++ | cc | 11,508 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/test/url_loader_interceptor.h"
#include "base/test/bind_test_util.h"
#include "content/browser/frame_host/render_frame_host_impl... |
58e10d11392859d23aed8a3f778c550810e329ed | fb0ea2e244b7ef0e634d94af1df5f3ed1a54b289 | makrattaur/ogldesktop | /VideoPlayerEngine/videorenderer.cpp | C++ | cpp | 16,149 | no_license | #include "videorenderer.h"
extern "C"
{
#include <libavutil/pixdesc.h>
#include <libavutil/imgutils.h>
#include <libavutil/opt.h>
}
#include <fstream>
#include <sstream>
#include <iostream>
#include "ffutils.h"
#include "iclocksource.h"
#include <ienginecontext.h>
#include <oglutils.h>
#define ENGINE_ROOT "C:\\User... |
d732f77918ef299b4d2b7678bc1c4f6e2bc80747 | 992790832b56e80cd7e12d9fc171e054d59994e7 | Jeean007/Vulcoin | /src/rest.cpp | C++ | cpp | 20,314 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2019 The Vulcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-lic... |
1577c33ea1a51f9a3197f4d1c846ab5bf761f4cb | 5f00aed228a47e124fd62bddcda21665e32f4111 | RickyJun/live_plugin | /back/RtmpLivePushSDK/boost/boost/range/algorithm/remove_copy.hpp | C++ | hpp | 1,406 | permissive | // Copyright Neil Groves 2009. Use, modification and
// distribution is subject to 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)
//
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ALGORIT... |
d65b3a8d6826c99401a48e0b4685827eed823004 | a886d4f8c623829e0a61ea4e71adfce52e49c20c | Bukhta/SW | /Task4/Task 4/Task 4.cpp | C++ | cpp | 1,838 | no_license | #include <iostream>
#include <cstdlib>
#include <iomanip>
#include <ctime>
using namespace std;
int** createMatrix(int row, int column)
{
int** matrix = new int* [row];
for (int i = 0; i < row; i++)
matrix[i] = new int[column];
return matrix;
}
void inputMatrix(int** matrix, int row, int column)
... |
e67f6ab1a3c805b9fb262ddd11abf88d2fe83ea5 | 33c31cafd42c87e4a724f79650f8442d380b86c3 | bg1bgst333/Sample | /winapi/PathStripPath/PathStripPath/src/PathStripPath/PathStripPath/PathStripPath.cpp | C++ | cpp | 1,665 | permissive | // ヘッダファイルのインクルード
#include <windows.h> // 標準WindowsAPI
#include <tchar.h> // TCHAR型
#include <stdio.h> // 標準入出力
#include <shlwapi.h> // シェルAPI
// _tmain関数の定義
int _tmain(int argc, TCHAR *argv[]){ // main関数のTCHAR版.
// 変数の宣言と初期化.
TCHAR tszFilePath[] = _T("C:\\Users\\B.G\\Documents\\test\\test.txt"); // tszFilePathを"... |
b9d40a621fbe5e1736082435715746b95a80c384 | 5c6301436413bc389e92c344e83748b662c8c47f | 907riley/Battleship | /PA8main.cpp | C++ | cpp | 9,960 | no_license | /* Name: Riley Sikes
Class: CptS 121, Fall 2019
Date: November 24, 2019
Programming Assignment: PA8
Description: This program has the user playing the game battleship against the comptuer.
Notes: I added battlship ASCII art for the welcome and end screens. The terminal has to have a large enou... |
00537f362a7ff75901264b295f47182081300ab9 | 34a417aee2c3f5a466c5b64f6a4540d3d27648c9 | baminmru/dsdesigner | /DSDESIGN/ABOUT.CPP | C++ | cpp | 693 | no_license | //---------------------------------------------------------------------
#include <vcl.h>
//nclude "VerInfo.hpp"
#pragma hdrstop
#include "About.h"
//---------------------------------------------------------------------
#pragma resource "*.dfm"
TAboutBox *AboutBox;
//---------------------------------------------------... |
0b609ef3a89cffc0d30fdacf7b4c387bcef753af | a90a16091042f1e861e6ed5b270e1b1ee7f02fec | billcai/amazon-kinesis-video-streams-producer-sdk-cpp | /kinesis-video-pic/src/utils/tst/BitReader.cpp | C++ | cpp | 14,328 | permissive | #include "UtilTestFixture.h"
class BitReaderFunctionalityTest : public UtilTestBase {
};
TEST_F(BitReaderFunctionalityTest, NegativeInvalidInput_BitReaderReset)
{
BitReader bitReader;
BYTE tempBuffer[1000];
UINT32 size = SIZEOF(tempBuffer);
EXPECT_NE(STATUS_SUCCESS, bitReaderReset(NULL, tempBuffer, si... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.