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 |
|---|---|---|---|---|---|---|---|---|
62a57ca1c88b1e585f54def2328b2d9ac96df429 | 1b83c992b9518aa47dff5d9d80ccd860b7765e40 | lychees/ACM-Training | /Note/集训队作业/2015/ydc/我的集训队作业/codeforces/238E.cpp | C++ | cpp | 1,568 | no_license | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<bitset>
#include<vector>
#define each(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define maxn 110
using namespace std;
vector<int> can[maxn][maxn];
int dis[maxn][maxn];
int n,m,S,T,nB;
int ... |
a504f756d31b158ab19bab92efc12e126db3dd96 | c89e6e212831c853b4dbfaa638c1d873e31485ae | DavidBarbera/MathTeam | /OpenGL/Projects/MVCtoGLUI2/MVCtoGLUI2/Source.cpp | C++ | cpp | 37,258 | no_license | /****************************************************************************
A simple GLUT program using the GLUI User Interface Library
This program sets up a checkbox and a spinner, both with live variables.
No callbacks are used.
-----------------------------------------------------------------------
9/9/98 Pau... |
f7ff697037e66d4d6e5cf456de3f790e7e3badb5 | 28089c44bfcf69380a870d7d4963b35907d19499 | Igorjan94/CF | /CodeForce/1800/C2.cpp | C++ | cpp | 2,694 | no_license | // Igorjan94, template version from 13 October 2017. C++17 version, modified 18 march 2020 (writeln<tuple>, whole->all) {{{
#include <bits/stdc++.h>
#ifdef ONLINE_JUDGE
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#endif
using namespace std;
#define FOR(i, m, n) for (int i = m; i < (int) (n); ++i)
#define ROF(i,... |
f5898cbea0079b3839dae2609c577ced84062469 | f79efd7da78def9ac943b2630a4ef0fc0b6f2dc8 | dozzman/coding-practice | /C++/euler/problem14/problem14_2.cc | C++ | cc | 1,067 | permissive | #include <iostream>
#include <map>
long collatzLength( long x, long collatzArray[] );
int main()
{
long collatzArray[1000000];
memset( collatzArray, 0, sizeof(collatzArray) );
long longest_index = 1;
long longest_length = 1;
long length;
for ( int i = 0; i < 1000000; i++ )
{
lengt... |
7f55685ef223b132cbbaf424718c1844103da6b1 | d45792960613f3952e8555ed90ebdf2c2fda2520 | duki994/G900H-Platform-XXU1BOA7 | /vendor/samsung/common/packages/apps/SBrowser/src/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc | C++ | cc | 10,613 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h"
#include <string>
#include "base/callback.h"
#include "base/file_util... |
0ae4874aad619d2f11cd6c8b59c0c80b1df3b624 | bfe06261a530e03f71c63bfa75c83e99500a2246 | huhuhu1092/test-server | /seengine_c++/SE_Command.cpp | C++ | cpp | 430 | no_license | #include "SE_Command.h"
SE_Command::~SE_Command()
{}
bool SE_Command::expire(SE_TimeMS realDelta, SE_TimeMS simulateDelta)
{
SE_TimeMS compareTime;
if(mbRealTime)
{
compareTime = realDelta;
}
else
compareTime = simulateDelta;
if(mWaitTime > compareTime)
{
mWaitTime -=... |
fb949b820f184171edee8e258c0cddbdbc8bd35d | 146c99f9a69c16f33b61bcf97394ff42ae05f27c | weems/ion | /ion/port/asmjsfixes.cc | C++ | cc | 1,512 | permissive | /**
Copyright 2016 Google Inc. 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 agreed to in... |
add0a502550934c2400379f49d7610f5618adecc | 564676a2d44bc38874038fc800a3be34cb0d87d9 | parthasl/vespa | /searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp | C++ | cpp | 3,198 | permissive | // Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "hnsw_graph.h"
#include "hnsw_index.h"
#include <vespa/vespalib/datastore/array_store.hpp>
#include <vespa/vespalib/util/rcuvector.hpp>
namespace search::tensor {
HnswGraph::HnswGraph()
: node_... |
6d68c907fe29ec3dffb4810945913e65eb9a88c6 | f210c6a54be7ca1a424e5239d8a577b6dd47151a | fanghong2004/TabTest | /TabTest/TabTest.cpp | C++ | cpp | 4,572 | no_license |
// TabTest.cpp: 定义应用程序的类行为。
//
#include "stdafx.h"
#include "afxwinappex.h"
#include "afxdialogex.h"
#include "TabTest.h"
#include "MainFrm.h"
#include "TabTestDoc.h"
#include "TabTestView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CTabTestApp
BEGIN_MESSAGE_MAP(CTabTestApp, CWinApp)
ON_COMMAND(ID_APP_ABO... |
4153c192fb3c9f9d2650907378c68250f22f11c3 | 01b8aa2f3a07aaf5426424885f302ba83d2a93a5 | luosch/13-cpp-hw | /Week_08/DouList Advance (for hw)/DouListTest.cpp | C++ | cpp | 1,843 | no_license | #include <iostream>
#include "DouList.h"
using namespace std;
DouList list1, list2;
void display() {
cout << list1.empty() << ':' << list1 << endl;
cout << list2.empty() << ':' << list2.to_str() << endl;
}
int main() {
int t;
display();
list1.push_front(894);
list2.push_back(2136);
int t1 = list1.... |
2bfecd65b6b7f5d31f9748d55abcda818eddf315 | 88beb2af3a7cc49fd2644f563b279793992c7cdf | Dakrs/University-Assignments | /4-Year/PCP/TP2/src/yale_master.cpp | C++ | cpp | 2,819 | no_license | #include "yale_master.h"
MasterYale::MasterYale(int n_rows,int n_cols,float p_non_zeros,bool balanced){
int n_elem = n_rows * n_cols;
int n_zeros = ceil(n_cols*p_non_zeros) * n_rows;
matrix = new float[n_elem];
non_zero_values = new float[n_zeros];
non_zero_acu = new int[n_rows+1];
non_zero_p... |
acc20b94f7a856a3b47e409911de377f9bcf3806 | f970bff5b823498853bfd50281f321a4f74e4bb3 | c0d1007/NetWatch | /Client/Client.cpp | C++ | cpp | 6,146 | permissive | #include <iostream>
#include <Windows.h>
#include <stdlib.h>
#include <winternl.h>
#pragma comment(lib,"ws2_32.lib")
#define DEVICE_NAME L"\\Device\\EzFireWall"
#define DEVICE_SERVER_NAME L"EzFireWall"
/*
enum ReportType
{
r_income, //进来auth
r_output, //出去auth
r_stream_income, //TCP流交互
r_stream_output
};
enum Pro... |
39c5bb88b03ed8f6d89f540a3b624e2c109c04c6 | 1f5d346f21fb0ad5579cdcfac789e2bdb8fb54ab | ssp21/ssp21-cpp | /cpp/libs/ssp21/src/crypto/gen/RequestHandshakeBegin.cpp | C++ | cpp | 2,719 | no_license | //
// _ _ ______ _ _ _ _ _ _ _
// | \ | | | ____| | (_) | (_) | | | |
// | \| | ___ | |__ __| |_| |_ _ _ __ __ _| | | |
// | . ` |/ _ \ | __| / _` | | __| | '_ \ / _` | | | |
// | |\ | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_|
// |_| \_|\___/ |______\__,_|_|\... |
00a383dd48636791699c89557149e47695255f4e | 37559aaf672075304475b6aa2e86539a799402b9 | loctho1995/DemoDirectX | /DemoDirectX/Scene.cpp | C++ | cpp | 668 | no_license | #include "Scene.h"
Scene::Scene()
{
mSpriteHandler = GameGlobal::GetCurrentSpriteHandler();
mBackColor = 0x4866ff;
LoadContent();
}
Scene::~Scene()
{
}
void Scene::Update(float dt)
{
}
void Scene::LoadContent()
{
if (!mSpriteHandler)
mSpriteHandler = GameGlobal::GetCurrentSpriteHandler()... |
76d6cc3be5b83462746091b83ba15936e88cf70a | 979be9e2df94eee6084ee0c439a4530d5c1479b9 | engineerIOT/POO-P1 | /Motor.cpp | C++ | cpp | 221 | no_license | #include "Motor.h"
Motor::Motor() {
_val = 0;
}
Motor::Motor(double _value) {
_val = _value;
}
void Motor::getValue(double _value) {
_val = _value;
}
double Motor::_value() const {
return _val;
}
|
9f6a21380fd61d2b8baf115334702194262045aa | 9504bb39bf523d9eeb681936076a7f81dc8f2cab | rmax/Facebook-Hacker-Cup-Results | /2014/Qualification/Solutions/0061_希代_square-detector.cc | C++ | cc | 1,586 | no_license | #include <bits/stdc++.h>
#ifdef LOCAL
#include "local.h"
#endif
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(), (a).end()
#define clr(a, x) memset(a, x, sizeof(a))
#define sz(a) ((int)(a).size())
#define mp(a, b) make_pair(a, b)
template <typename T, typename U> ... |
f2d142deef6bc601a7dea814215e2bfbbe9352f6 | c06bd150ef42b936e46a91a7c2e04da7bc9cbecb | rovinbhandari/Programming_Scripting | /ACM-ICPC/ACM-ICPC_12/Amritapuri/online contest/ACM-ICPC Amritapuri 2012 Online Competition Accepted Solutions/C/cpp/00015911_C_SUMRANGE_amicpc120346.cpp | C++ | cpp | 1,838 | no_license | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
using namespace std;
typedef long long LL;
#define pb push_back
#define mp make_pair
... |
f791b853a659717b445a7b5b29894c37afe8ac24 | e056d965b4923b2f50e88e5cf3a7255ce967f107 | oylz/dynhook | /program.cc | C++ | cc | 1,653 | no_license | #include <iostream>
#include <cstdio>
#include <dlfcn.h>
#include <inttypes.h>
#include <iomanip>
#include <errno.h>
#include <cstring>
#include <unistd.h>
#include <boost/shared_ptr.hpp>
#include "base.h"
#include <boost/thread.hpp>
class B{
public:
virtual void DoPrint(double v) = 0;
};
class A: public B{
priva... |
aa386d8095a61cbf39c85984729b9a7de9b3ca0c | 0d1a0e269fb0840222eebb60f2d9d40d08798c59 | abunimeh/rogue | /src/rogue/hardware/pgp/EvrControl.cpp | C++ | cpp | 2,250 | permissive | /**
*-----------------------------------------------------------------------------
* Title : PGP Card EVR Control Class
* ----------------------------------------------------------------------------
* File : EvrControl.cpp
* Author : Ryan Herbst, rherbst@slac.stanford.edu
* Created : 2017-09-17
... |
acc52513d1d5eed93daf7ffe92ec642ea9dece29 | a95d4140761cd0fa5ed564fe4297f52dbaafb2ff | DBHeise/fileid | /fileid/document/excel/structures/Feat11TotalFmla.hpp | C++ | hpp | 608 | permissive | #pragma once
#include <string>
#include "../../../common.hpp"
#include "../IParsable.hpp"
#include "../MSExcel.common.hpp"
namespace oless {
namespace excel {
namespace structures {
// see: https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-xls/5a3dec07-10c6-45f4-9be0-72f7fcd71c2c
cl... |
c789e914dbcac3313c921b18b5f264c92c7da493 | ec0f205dc1bef293ddbc024301d23d3d3dfe5d53 | stevieMNwonder/FlashPhoto | /project/iteration3/libphoto/src/IPNGHandler.cpp | C++ | cpp | 2,522 | no_license | //
// IPNGHandler.cpp
// PhotoShop
//
// Created by Sarit Ghildayal on 4/2/15.
// Copyright (c) 2015 Sarit Ghildayal. All rights reserved.
//
#include "IPNGHandler.h"
#include "PixelBuffer.h"
#include "ColorData.h"
#include <cstring>
#include <iostream>
using std::cout;
using std::endl;
PixelBuffer* IPNGHandler:... |
586db1cf6766b12eedcf8cabfcd7157bf2630af5 | 6f70639b5451dfc5df3b1e42f98adea9bcfa7e91 | librehelbreath/HGserver | /src/Misc.cpp | C++ | cpp | 6,424 | no_license | // Misc.cpp: implementation of the CMisc class.
//
//////////////////////////////////////////////////////////////////////
#include "Misc.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMisc::... |
8594836831af69e3e6c85235c915e5f768ecc72e | 880e9232e91a02487085c9c7d784284c41d0b6b7 | michalPietraszko/Demo-Sensor-Network | /src/UI/TextUI/scenes/main-node-creator/model/MainNodeCreatorSceneModel.hpp | C++ | hpp | 438 | no_license | #pragma once
#include <ISceneModel.hpp>
class MainNodeCreatorSceneController;
class MainNodeCreatorSceneModel : public ISceneModel
{
friend class MainNodeCreatorSceneController;
public:
enum class SceneStates
{
start,
invalid,
acceptSettings,
settingsAccepted
};
bo... |
9de506ff582e95c6fe5201b32fa87f49475d2e22 | 512c3f64c459bd82e3d616e3b98c231e7748fa97 | desperadoray/POJ | /数字排序.cpp | C++ | cpp | 380 | no_license | #include<iostream>
using namespace std;
int main()
{
int a,i,k,p;
int b[10];
cin>>a;
i=0;
do
{
i++;
b[i]=a%10;
a=(a-a%10)/10;
}
while (a>0);
int j;
for (j=1;j<=i-1;j++)
{
for (k=1;k<=i-j;k++)
{
if (b[k]>b[k+1])
{
p=b[k];
b[k]=b[k+1];
b[k+1]=p;
}
}
}
for... |
f99a0415f158cc2ab4720c31787b3cec0d261879 | ce228a66d2826d9f6e42c7809194ba3332b1e64c | LordDarkHelmet/Dynamic | /src/qt/dynamicunits.cpp | C++ | cpp | 8,354 | permissive | // Copyright (c) 2016-2019 Duality Blockchain Solutions Developers
// Copyright (c) 2014-2019 The Dash Core Developers
// Copyright (c) 2009-2019 The Bitcoin Developers
// Copyright (c) 2009-2019 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opens... |
709474736bd1ddb361052392c0f32fbe26bd8472 | aa3a073206c36a63b28fc1dcb8cd698d3096bae9 | atatomir/work | /_Codeforces/Round 391/F/main.cpp | C++ | cpp | 2,632 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
#define mp make_pair
#define pb push_back
#define ll long long
#define maxN 200011
#define maxLog 19
#define inf (1LL << 60)
int n, m, R, i, x, y, w;
vector< pair<in... |
a1b5dc5c8aa741d3a1f6a967ad648f02236d8234 | d99c9ec7b8f8b02991c29a6b1d70b33932e44ec9 | ELLIEbleu/aliyun-openapi-cpp-sdk | /ess/src/EssClient.cc | C++ | cc | 75,489 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
3dfaa30f20439c85bedae4288403adb23ae8c420 | 8b576980b9519bcd6394d6881c9ff40fcfcc1bfa | fbudin69500/ITKTextureFeatures | /test/ScalarImageToTextureFeaturesImageFilterCreationTest.cxx | C++ | cxx | 1,445 | permissive | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... |
3157695f7f7dfe141c986b326138e6f31000c99a | 75955e8408c7d201f937cf1fcd37557c28b7a32d | Kamahl19/chromium | /ash/wm/window_cycle/window_cycle_list.cc | C++ | cc | 41,830 | 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 "ash/wm/window_cycle/window_cycle_list.h"
#include <map>
#include <string>
#include <utility>
#include "ash/accessibility/accessibility_control... |
54efe1decb9855a714c6a7f3c4add785fb6cc3da | bc728a3286444bf22f3f68e2efcce9ef713f492f | musyoku/face-alignment-at-3000fps | /src/lbf/sampler.cpp | C++ | cpp | 635 | no_license | #include <chrono>
#include "sampler.h"
namespace lbf {
namespace sampler{
int seed = std::chrono::system_clock::now().time_since_epoch().count();
std::mt19937 mt(seed);
void set_seed(int seed){
mt = std::mt19937(seed);
}
double bernoulli(double p){
std::uniform_real_distribution<double> rand(0, 1);
... |
9cc9ce8ba523153783bcb5d440c3ba8b092faa21 | 09a98d430a83510c76188c858d087b8ae5e1bcbf | cmexp/Play- | /Source/Profiler.cpp | C++ | cpp | 2,369 | permissive | #include "Profiler.h"
#include <chrono>
#include <cassert>
CProfiler::CProfiler()
{
}
CProfiler::~CProfiler()
{
}
CProfiler::ZoneHandle CProfiler::RegisterZone(const char* name)
{
#ifdef PROFILE
for(unsigned int i = 0; i < m_zones.size(); i++)
{
const auto& zone(m_zones[i]);
if(zone.nam... |
2634e4e5a55831d22ecf22dd14902d4404de148f | a104b119c331fa79aca01dc42517f81b68fdba1d | darkeclipz/opengl-game-engine | /src/game-engine/OpenGLWindow.cpp | C++ | cpp | 892 | no_license | #include "OpenGLWindow.h"
#include <iostream>
OpenGLWindow::OpenGLWindow(int width, int height, bool fullScreen)
{
this->width = width;
this->height = height;
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL... |
79869a8024d75b2f34b8716eb352846e65078306 | 031612cb66777656ab8412ee2abdf33887c34d47 | xtblock/chromium | /content/browser/blob_storage/blob_internals_url_loader.cc | C++ | cc | 2,166 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/blob_storage/blob_internals_url_loader.h"
#include "content/browser/blob_storage/blob_internals_url_loader.h"
#include "content... |
acb97f83214db254b1948070b30240228b107add | 6879c7abad0adf3848334cd5ea1d056db77078af | tommy85/test | /designpattern/Composite/main.cpp | C++ | cpp | 1,603 | no_license | #include "Composite.h"
#include <iostream>
using namespace std;
int main()
{
/*
不管是叶子Leaf还是Composite对象pRoot、pCom都实现了Operation接口,所以可以一致对待,直接调用Operation()
体现了“使得用户对单个对象和组合对象的使用具有一致性。”
*/
Composite* pRoot = new Composite();
//组合对象添加叶子节点
pRoot->Add(new Leaf());
Leaf* pLeaf1 = new Lea... |
7256ae29855fc16669da3bac50953e5f35e0cb47 | cf21021a7080afab3582bb9a1317fac25f7c98d3 | sublimationAC/DDE | /hhhaha/emmm/regressor.cpp | C++ | cpp | 2,858 | permissive | /*
The MIT License(MIT)
Copyright(c) 2015 Yang Cao
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, publish... |
627706127e579b0dde06a1c1743f6389f14bbddb | a3a6b0fed72e018880196f01aa9aac7a49eedd20 | pinguin999/marmalade2 | /source/Score.cpp | C++ | cpp | 264 | no_license | #include "Score.h"
void Score::add_score(int amount)
{
score += amount;
}
void Score::dec_score(int amount)
{
score -= amount;
}
int Score::reset_score()
{
score = 0;
return score;
}
int Score::get_score()
{
return score;
}
Score *Score::s_instance = 0; |
b0c77e293d327a8de011eba4ad0f33e30d5ca98e | bf922840764ef90f3b95e288099bd484096d94da | yoursunny/HadoopSim | /HEvent.cpp | C++ | cpp | 261 | no_license | #include "HEvent.h"
HEvent::HEvent(EventListener *listener, int type)
{
this->listener = listener;
this->type = (EvtType)type;
}
EventListener *HEvent::getListener()
{
return this->listener;
}
EvtType HEvent::getType()
{
return this->type;
}
|
f34f776334b32b0ea7f84ff7f15af86e7505adea | 447bc25a50e7fb5db5ba20b97a1cfc2439627406 | leesGb/UnrealTest | /Source/utils/CppAPIUtils.cpp | C++ | cpp | 1,941 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "CppAPIUtils.h"
#include "UObject/UObjectGlobals.h"
using namespace slua;
CppAPIUtils::CppAPIUtils()
{
}
CppAPIUtils::~CppAPIUtils()
{
}
LuaOwnedPtr<CppAPIUtils> CppAPIUtils::Create()
{
return new CppAPIUtils(... |
e3f647843ca246ff32a52564faa4fe3f3267a3a9 | 8dd1977e3d22fa263c38010ed89f8a024f71a038 | alexandraback/datacollection | /solutions_1483485_0/C++/Caoqinxiang/A.cpp | C++ | cpp | 1,584 | no_license | #include <vector>
#include <string>
#include <algorithm>
#include <list>
#include <set>
#include <queue>
#include <stack>
#include <sstream>
#include <numeric>
#include <functional>
#include <utility>
#include <bitset>
#include <iostream>
#include <cmath>
#include <map>
using namespace std;
char a[100... |
b0c93a23fac097df51512cb5dab0d2895725296c | f55c5f66a3fb9bb9f862846fb9404081d560712e | scottsideleau/MOOS-IvP-releases | /ivp/src/app_alogview/Populator_HelmPlots.cpp | C++ | cpp | 2,158 | no_license | /*****************************************************************/
/* NAME: Michael Benjamin, Henrik Schmidt, and John Leonard */
/* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */
/* FILE: Populator_HelmPlots.cpp */
/* DATE: July 15th, 2009 ... |
20dfda8e32794720bbd3f2ccc42cce9b9c7008c8 | 8720a6692f35e6b0f553cfd13a80b20d40dc637e | liyonghelpme/jumpCode | /Classes/crypto/CCCrypto.cpp | C++ | cpp | 719 | no_license |
#include "crypto/CCCrypto.h"
#include <string>
extern "C" {
#include "crypto/md5/md5.h"
#include <stdio.h>
#include <string.h>
}
NS_CC_EXT_BEGIN
void CCCrypto::MD5(void* input, int inputLength, unsigned char* output)
{
MD5_CTX ctx;
MD5_Init(&ctx);
MD5_Update(&ctx, input, inputLength);
MD5_Final(outp... |
7ee1c4d5ad5ba7b5126bde51ad74658ddc82b145 | a01c1bd9d98445edc215bd6a5374a0d2666e67be | LongfeiProjects/MT_testing | /rtt-exercises-1.6.1/hello-3-dataports/HelloWorld.cpp | C++ | cpp | 5,009 | no_license |
/**
* @file HelloWorld.cpp
* This file demonstrates the Orocos Data Ports primitive with
* a 'hello world' example.
*/
#include <rtt/os/main.h>
#include <rtt/Logger.hpp>
#include <rtt/TaskContext.hpp>
#include <rtt/PeriodicActivity.hpp>
/**
* Include this header in order to use data ports.
*/
#include <rtt/Po... |
0f2165cc9558859df829f31afc06bd857755062c | 58b74f393e656f12f7aed02edf9d67d5574386ee | bear-zd/sj-Structure-origin-code- | /topsort/TestTopSort.cpp | C++ | cpp | 1,199 | no_license | #include "TopSort.h" // 拓扑排序算法
int main(void)
{
try // 用try封装可能出现异常的代码
{
char vexs[] = {'0', '1', '2', '3', '4', '5'};
int m[6][6] = {
{0, 0, 1, 1, 0, 0},
{1, 0, 0, 0, 1, 0},
{0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0}
};
int n = 6;
AdjLi... |
7e8ee52d83bbf2c415bbe2d00db9f7c30e16b93b | 3c2a42db7a2a574c63f74cc6a21a64401418b102 | Keipi/Cpp-Part-I | /03.01_exercise_set_1/exercise_4/program.cc | C++ | cc | 270 | no_license | #include <iostream>
namespace {
char const regex[] = R"delim(^\s+Encryption key:(\w+)
^\s+Quality=(\d+)
^\s+E?SSID:"([[:print:]]+)"
^\s+ssid="([[:print:]]+)"
)delim";
} // Anonymous namespace
int main()
{
std::cout << regex;
}
|
8b7e289d09331f29c2fc9976977322063e6fb388 | 039dba2115d7b4049a4f28a86dd84e8bb86cae3f | TeamHackLG/android_hardware_qcom_display | /msm8974/libgralloc/gpu.cpp | C++ | cpp | 13,246 | permissive | /*
* Copyright (C) 2010 The Android Open Source Project
* Copyright (c) 2011-2013 The Linux Foundation. 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
*
* h... |
b04a14f3bedfb0bf933db2d84f17c7ed1d577316 | 9d7b77dbb136a19b55a8216a180d4b38ac533ab0 | jcd1994/MatlabTools | /Compiled/blaze-3.2/blazetest/src/mathtest/dvecsvecadd/V3aVCa.cpp | C++ | cpp | 3,722 | permissive | //=================================================================================================
/*!
// \file src/mathtest/dvecsvecadd/V3aVCa.cpp
// \brief Source file for the V3aVCa dense vector/sparse vector addition math test
//
// Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved
//
// This file ... |
2fe92113515747e887a9ad0795dac6199cfa1e43 | d855ab2a7d1ff9bd2e3e1a696762f1324a404870 | agicy/OI | /Luogu/P3532.cpp | C++ | cpp | 1,547 | no_license | #include<bits/stdc++.h>
using namespace std;
#define reg register
typedef long long ll;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
static char buf[1<<21],*p1=buf,*p2=buf;
inline int read(void){
reg char ch=getchar();
reg int res=0;
while(!isdigit(ch)) ch=getchar();
while(isd... |
5b23bc258b5d915a79e10c090a95fa1c1ee47f9a | 25474323accdf562b9b89145bbea6ce4b6903c17 | david-guerrero/MITK | /MITK/Modules/PlanarFigure/Testing/mitkPlanarArrowTest.cpp | C++ | cpp | 3,272 | no_license | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-15 11:12:36 +0100 (Mo, 15 Mrz 2010) $
Version: $Revision: 21745 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Info... |
6bb2e13397134831dc5d37aaeef149bb0ae552eb | 25a7ee190c5c44b6d722e38957d9e012f94e36ba | ocfbnj/learn-asio | /include/asio/detail/reactor_op_queue.hpp | C++ | hpp | 5,181 | no_license | //
// detail/reactor_op_queue.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2021 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)
//
#ifndef ASIO_... |
b8c21e4326193d87ffd87238c1a0837c98289880 | 0da6456949b491372206231a046758c259a90f0b | Jerrydepon/C_plus_plus_Practice | /Chapter 3/3-13/main.cpp | C++ | cpp | 354 | no_license | #include <iostream>
#include <cmath>
using namespace std;
#define PI 3.14159
int main()
{
double area, radius;
cout << "This program calculates the area of a circle.\n";
cout << "What is the radius of the circle? ";
cin >> radius;
area = pow(radius, 2) * PI;
cout << " The area is " << a... |
41a0bf5042552403ea6d911049432d50f88b03f2 | a52d2318ba79e18fac84dc81bfc674591166ef03 | kvkenyon/tensorflow | /tensorflow/compiler/mlir/xla/transforms/lhlo_fuse_linalg.cc | C++ | cc | 5,025 | permissive | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
b95fedbd9175b329f59176b988e96a32c127fa7d | e70a40d92ad1685e0fac9ba1a1a69eb397b30ce1 | pytorch/pytorch | /torch/csrc/autograd/python_legacy_variable.cpp | C++ | cpp | 4,932 | permissive | #include <torch/csrc/autograd/python_legacy_variable.h>
#include <ATen/ATen.h>
#include <torch/csrc/Exceptions.h>
#include <torch/csrc/autograd/python_function.h>
#include <torch/csrc/autograd/python_variable.h>
#include <torch/csrc/jit/frontend/tracer.h>
#include <torch/csrc/tensor/python_tensor.h>
using namespace ... |
642b2c03d6c629426028f0ccad63b74c36c7e128 | 1297bfa9fc53d77808afe188c00b754c5a4a0e47 | utheilei/ControlCenter | /titleswidget.cpp | C++ | cpp | 1,889 | no_license | #include "titleswidget.h"
#include "delegate.h"
#include <QHBoxLayout>
TitlesWidget::TitlesWidget(QWidget *parent)
: DListView(parent)
, m_model(new QStandardItemModel(this))
, m_itemDelegate(new StyledDelegate(this))
{
init();
initItems();
}
void TitlesWidget::init()
{
setSizePolicy(QSizePol... |
c65e7b95a191a0838b447d56f88086cfed378224 | 76a1cd93f84406c4316bcd0deb328cc4098bbe44 | torehc/ProjectEuler | /146.cc | C++ | cc | 2,679 | no_license | #include <iostream>
#include <stdio.h>
#define SIEVE_RANGE (150000000)
#define PRIME_COUNT (8444396)
bool sieve_visited[SIEVE_RANGE] = {};
long long primes[PRIME_COUNT] = {};
void Sieve()
{
sieve_visited[0] = sieve_visited[1] = true;
int curr_pos = 0;
for (long long i = 2; i < SIEVE_RANGE; i++)
{
... |
4fc1e0932c7b3f23330c4a2159dd9907665d5964 | ed9817e8f0976a5408c2a09e1dc5858a218e1f15 | hpaucar/computer-graphics-repo | /OpenGL-tutorial-org/tutorial18_billboards_and_particles/src/tutorial18_particles.cpp | C++ | cpp | 13,640 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#define GLEW_STATIC
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
GLFWwindow* window;
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/norm.hpp>
using namespace glm;
#include "shader.hp... |
de88509134fee31c41e332f34e454f46a2b939f7 | a49513dc627615080afe3a3ca401217ba2614e77 | xtblock/chromium | /components/translate/core/browser/mock_translate_infobar_delegate.cc | C++ | cc | 3,786 | 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 "components/translate/core/browser/mock_translate_infobar_delegate.h"
namespace translate {
namespace testing {
std::vector<MockLanguageModel:... |
09f534ff8988e7f4ca403062ee45e3ebc5410de7 | 79114c922530eabafcc86391bcd523561e92c8d2 | winiarz/OpenPL | /Simulation/Include/ControlInstructionsDefines.hpp | C++ | hpp | 1,539 | no_license | #pragma once
#define IF( condition ) \
InsPr::IVariable::recorder->startIf( std::make_shared<InsPr::SingleInstruction>( InsPr::Int( condition ).getName() ) ); \
for( int __CONTROL_TEMP_VARIABLE__ = 2; __CONTROL_TEMP_VARIABLE__ > 0; -- __CONTROL_TEMP_VARIABLE__ ) \
if ( __CONTROL_TEMP_VARIABLE__ == 1) \
... |
249de33e14f8efb92698a0538ac25971fd5f342b | 855d76b11905ddef89b4d6fdc59f9b6afce93306 | cms-nanoAOD/cmssw | /FWCore/Sources/src/RawInputSource.cc | C++ | cc | 4,267 | permissive | /*----------------------------------------------------------------------
----------------------------------------------------------------------*/
#include "FWCore/Sources/interface/RawInputSource.h"
#include "DataFormats/Provenance/interface/EventAuxiliary.h"
#include "DataFormats/Provenance/interface/LuminosityBlock... |
941a6dc46941418ae7160802f8f5cae758ae8323 | 0c1380a2c7cf7d4d5a0f91bbd1ccb5457bd8be90 | Kawser-nerd/CLCDSA | /Source Codes/CodeJamData/14/03/18.cpp | C++ | cpp | 2,058 | no_license | /* 2014.4.12 Yoshi-TS4 */
#include <stdio.h>
#include <map>
int poss[51][51][2501];
char map[51][51];
void prep()
{
for (int i = 2; i <= 50; i++)
{
for (int j = 2; j <= 50; j++)
{
for (int k = 0; k <= i * j; k++)
poss[i][j][k] = 0;
for (int k = 2; k <= i; k++)
for (int l = 2; l <... |
408882e3e285badeb64d6f2b1bb0654ced19eff8 | bf58146ddf3ec416fb0809f16827a276e253f41a | chemoontheshy/liveRTSP | /src/live555/splitnalu.cpp | C++ | cpp | 2,212 | no_license | /*
*
* Copyright (C) chemoontheshy
* File name: // splitnalu
* Author: chemoontheshy
* Version: v1.0
* Date: 2021.11.2
* Description: 主要用于把H264/H265分成一个个nalu包
*/
#include "splitnalu.h"
#include <fstream>
using namespace vsnc::vnal;
void vsnc::vnal::Parser::Init(std::string filename)
{
// 以二进制格式打开
std::ifstr... |
ae3f4a566b969f05f7afb6a52e01db0fa2fadaeb | ad92649e8ffa7e6369f4ed5206f9654dcb1cd8f6 | bvamc/AttendanceSystem | /main.cpp | C++ | cpp | 37,338 | no_license | /*****************************************************************************
* Face Recognition for Automated Attendance
*****************************************************************************/
const char *facerecAlgorithm = "FaceRecognizer.Fisherfaces";
const float UNKNOWN_PERSON_THRESHOLD = 0.55f;
const ch... |
6ef1b018cdece584e7336a23225daa21aaa7bc17 | 7af8e994e336fa65ec0b61a058b1018bb5ef1db9 | AndrewBeers/BRAINSTools | /BRAINSSurfaceTools/vtkITK/itkEncodedTransformFileReader.cxx | C++ | cxx | 9,115 | no_license | /*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkEncodedTransformFileReader.cxx,v $
Language: C++
Date: $Date: 2007-08-09 15:15:39 $
Version: $Revision: 1.24 $
Copyright (c) Insight Software C... |
6547a1cd8c722e1718c954f0f0ab98713bbe0632 | 5f1248f775e30f62cd563bd9be96c0389b855b51 | caiyanzhi/chromium | /content/browser/service_worker/service_worker_context_core.cc | C++ | cc | 40,805 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/service_worker/service_worker_context_core.h"
#include <limits>
#include <set>
#include <utility>
#include "base/barrier_closu... |
808efb7c969da3775bc9b6e8064830424af33c29 | 078215664bb0fb7735a550bb584b4af4ddcc9b48 | rockzhuang/tensorflow | /tensorflow/compiler/xla/service/conditional_to_select.cc | C++ | cc | 3,939 | permissive | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
b96ada1238d6f36c029262b51e9196937fe8a574 | 54b56c33adc39a25f3430badbfa1ce8f2df20f3d | fei0511/C--PrimerPLusCode | /C++PrimerPlus/chapter06/6-分支语句和逻辑运算符/6.02_ifelse.cpp | C++ | cpp | 960 | no_license | #include <iostream>
//功能:6.2 if else语句
//时间:2020年11月25日14:49:21
//
//int main()
//{
// using namespace std;
//
// char ch;
//
// cout << "Type, and I shall repeat.\n";
// cin.get(ch);
// while (ch != '.')
// {
// if (ch == '\n')
// {
// cout << ch;
// }
// else
// {
// cout << ++ch;
// }
// cin.get(ch);
/... |
29ab0134fab5f0ec6308e818b46535a235113543 | eeeecb1adc49f3ab6dc66dfbcf51a5d5b39c5aaf | tectronics/realxtend-naali-deps | /poco/Foundation/src/FileStream_POSIX.cpp | C++ | cpp | 4,046 | permissive | //
// FileStream_POSIX.cpp
//
// $Id: //poco/1.3/Foundation/src/FileStream_POSIX.cpp#1 $
//
// Library: Foundation
// Package: Streams
// Module: FileStream
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Permission is hereby granted, free of charge, to any person or... |
967fc008aba407a2bbccdaeb2f110e2980f8d05b | 6c5b868d0e1a828e2e5e14a2802f3315cd289c3a | afcarl/probabilistic-miner | /Miner.cpp | C++ | cpp | 3,684 | no_license | #include "Miner.h"
#include "Esu.h"
#include "Graph_DB_File_Reader.h"
#include <boost/thread/thread.hpp>
#include <boost/lexical_cast.hpp>
Miner :: Miner ()
:filename_(),
clock_ ()
{
}
void Miner :: parse_argument (int argc, char *argv[])
{
boost::unordered_map<std::string, std::string> token_map;
parser_.parse... |
81a7761ac7fa27210d39e73ce96080ebb375f2a4 | 1b1e8f5e1888901c312f7ddfc8fbce337453fea1 | ada-zqz/leetcode | /bs704_BinarySearch.cpp | C++ | cpp | 348 | no_license | class Solution {
public:
int search(vector<int>& nums, int target) {
int lo = 0, hi = nums.size() - 1;
while(lo <= hi) {
int mid = (lo + hi) / 2;
if(nums[mid] < target) lo = mid + 1;
else if(nums[mid] > target) hi = mid - 1;
else return mid;
}
... |
b571ba295fe6d97a5c574404d32d5100d5bd17d2 | c45c70c1098c43ac8440f8a21a2b02ef688a050e | ksw1220/BOJ-Problem-Solving | /17219.cpp | C++ | cpp | 402 | no_license | #include <stdio.h>
#include <iostream>
#include <map>
#include <string>
using namespace std;
map<string, string> info;
int main()
{
int N, M;
cin >> N >> M;
string address, password;
while (N--)
{
cin >> address >> password;
info[address] = password;
}
while (M--)
{
... |
f18c57c199ac79c8be084c79ca50476f2a849ac9 | a4da107b258f3efe5b34c576d1ea1ff26a4de5f1 | cenyk1230/jittor | /python/jittor/src/lock.cc | C++ | cc | 1,953 | permissive | // ***************************************************************
// Copyright (c) 2022 Jittor. All Rights Reserved.
// Maintainers:
// Wenyang Zhou <576825820@qq.com>
// Dun Liang <randonlang@gmail.com>
//
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part o... |
dcc1bf9edde9201e1e82b50d7ff66a24a839851c | 3d16ee79931b870c83a858ecae49ddd2d8e6a780 | DharmaPatil/kpgweigher | /raysting/RTestV2p5/GetData/GetData.cpp | C++ | cpp | 2,475 | no_license | // GetData.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "GetData.h"
#include "GetDataDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//////////////////////////////////////////////////////////////////////////... |
1ef1aae44c8aa81bc5d64ea05cef2e74c3fce6bc | 221cad1db4ffeaabd509f7d5504d21c5550ce170 | fbrightw/CPP | /module03/ex03/main.cpp | C++ | cpp | 785 | no_license | #include "ScavTrap.hpp"
#include "FragTrap.hpp"
#include "DiamondTrap.hpp"
#include "ClapTrap.hpp"
int main()
{
std::cout << std::endl;
std::cout << "-------------EX00-------------" << std::endl;
std::cout << std::endl;
ClapTrap First("Nick");
First.attack("somebody");
std::cout << std::endl;
std::cout << "---... |
331ad3aaa5b78f7fe5f3cdfac3ecabb0825878fa | 5a1db294bb82d854062f89715d618004aeff9afe | pie3636/3D-Kart | /3DCG_siala_jacob_meloux/include/texturing/TexturedPlaneRenderable.hpp | C++ | hpp | 1,127 | no_license | #ifndef TEXTURED_PLANE_RENDERABLE_HPP
#define TEXTURED_PLANE_RENDERABLE_HPP
#include "./../HierarchicalRenderable.hpp"
#include "./../lighting/Material.hpp"
#include <vector>
#include <glm/glm.hpp>
class TexturedPlaneRenderable : public HierarchicalRenderable
{
public :
~TexturedPlaneRenderable();
TexturedPla... |
1c2894a1fa116cac90097142208d9663440452e9 | 86fe09a8e237dc09105d0e82f821c12e5a570d44 | JustinMMiller/WorldArchitect | /src/MapGenSystem/MapGenSystem.cpp | C++ | cpp | 1,410 | permissive | #include "MapGenSystem.h"
using namespace WorldArchitect;
MapGenSystem * MapGenSystem::instance = NULL;
/**
* getMapGenerator
* This method returns an instance of a MapGenerator
* depending on the Method it is passed.
*/
MapGenerator * MapGenSystem::getMapGenerator(Method method)
{
MapGenerator *generator;
sw... |
2ef109e214649a05293e85d92dc98f410e066028 | d83dcab766280515e4dfc5c666e3a74251028ca4 | johnty/gvxyarp | /src/testApp.cpp | C++ | cpp | 20,797 | no_license | #include "testApp.h"
string testString;
//--------------------------------------------------------------
void testApp::setup(){
ofSetCircleResolution(50);
ofSetWindowTitle("openframeworks gvf visualiser");
ofSetWindowShape(1024, 768);
ofSetFrameRate(60); // if vertical sync is off, we can go a bi... |
38c5daa2b08f3354d1ff51d0d169eeb217f99c9a | 4c9c087652b35dae298cc6e509ac80e380420b3f | fmi-lab/up-2018-kn-group8 | /2018-10-09/2-degrees-conversion-1.cpp | C++ | cpp | 497 | no_license | #include <iostream>
using namespace std;
int main() {
double degrees;
char unit;
cout << "Enter temperature: ";
cin >> degrees >> unit;
if (unit == 'C' || unit == 'c') {
cout << degrees << "C\n";
} else if (unit == 'F' || unit == 'f') {
cout << (degrees - 32) / 1.8 << "C\n";
... |
7d13f0c8477faedf308d910951f447a03a5536cb | 9705885b8b5d46570edbf6b8e18b0659f69b4181 | gavinsdavies/dune-ssri | /scripts/FlatTree/scripts/deposits.cpp | C++ | cpp | 5,728 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include "TStyle.h"
#include "TFile.h"
#include "TTree.h"
#include "TH2D.h"
#include "TH1D.h"
#include "TCanvas.h"
#include "TPaveText.h"
#include "TGraph.h"
#include "TBranch.h"
#include "TLeaf.h"
#include "TBranchRef.h"
#include "TApplication.h"
void depos... |
e6ef579bd19029e454987f7904a1fc9c65dc2c38 | 559bd5699c0302f231d2e75731224383e8929587 | ChinoMars/HGLinkedList | /main.cpp | C++ | cpp | 5,742 | no_license | #include "heLinkedList.h"
#include <stdio.h>
using namespace std;
bool isListEmpty(heLinkedList&);
int lenofList(heLinkedList&);
void addListNode(heLinkedList&, heLinkedList&);
void insertListNode(heLinkedList&, heLinkedList&);
void deleteListNode(heLinkedList&, string&);
void emptyList(heLinkedList&);
heLinkedList*... |
aadfc3be265a73b022e773083cbc0a365b3a7f14 | ee376bbcb4f6f2ee70216d162692f3cf78db4f16 | shivangstreak/comp | /leetcode/sample.cpp | C++ | cpp | 226 | no_license | #include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define faster std::ios::sync_with_stdio(false);cin.tie(NULL);
const int N=5*1e5+6;
int main(){
printf("Hello World\n");
return 0;
} |
f01dd8a623e335b75015643a0a39e0247386a5d9 | 6110736304fee7ce47fd00de9488dea9e51f68f5 | xinerfeixiang/JPet | /src/LAppPal.cpp | C++ | cpp | 2,274 | permissive | /**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
#include "LAppPal.hpp"
#include <cstdio>
#include <stdarg.h>
#include <sys/stat.h>
... |
21fd60602795e37a8e0189735dd89743fd05a35f | e0f39241242a1f30a5211d92f1131bd9d9de6c27 | sjkelleyjr/codeforces | /475/A/A.cc | C++ | cc | 978 | no_license | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#define debug(args...) {dbg,args; cerr<<endl;}
#else
#define debug(args...) // Just strip off all debug tokens
#endif
struct debugger
{
template<typename T> debugger& operator , (const T& v)
{
cerr<<v<<" ";... |
9ecf7cb8cc3835a4831f432320597e9e98840b60 | ca69fd15e31564cf8383ce3562ced4d4cbe12d23 | kooyou/EBE | /EBE.cpp | C++ | cpp | 8,957 | no_license | // 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
// ("Fluent UI"),该示例仅作为参考资料提供,
// 用以补充《Microsoft 基础类参考》和
// MFC C++ 库软件随附的相关电子文档。
// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
// 若要了解有关 Fluent UI 许可计划的详细信息,请访问
// http://msdn.microsoft.com/officeui。
//
// 版权所有 (C) Microsoft Corporation
// 保留所有权利。
// EBE.cpp : 定义应用程序的类... |
a73591f45fd5b40d66bbe9f790175e95324b3a8d | 8926db2692826b3b8a8d469dd267e7b69d172f40 | krbrennan/cpp_practice | /make_change/make_change.cpp | C++ | cpp | 911 | no_license | #include <iostream>
using namespace std;
int main()
{
int cents = 0;
int half_dollars = 0;
int quarters = 0;
int dimes = 0;
int nickels = 0;
int pennies = 0;
int current_cents = 0;
cout << "What is the total amount of change? \n";
cin >> cents;
cout << cents << " cents? I'll make change for your ... |
e2ec5989fd4354d8bebac3171d3a1ee57adf1788 | b381868b4b0329541c70f8026175095aaf7fcf2a | bangoc/cpp-design-patterns | /state-room-booking/hosting.cc | C++ | cc | 245 | no_license | #include "hosting.h"
#include "guest.h"
#include "hosting_state.h"
Hosting::Hosting(int count_people, Guest* guest)
: count_people_{count_people}, guest_{guest} {
}
void Hosting::SetState(HostingState* state) {
state_ = state;
} |
6d248ee4b664d37987e7deda827fff3760c225da | 907ff63f2cb66a6317b5159f37e08f0b2beb74c9 | miaohongbiao/UE4Plugin | /Source/NoesisGui/Private/GeneratedClasses/NoesisISealable.cpp | C++ | cpp | 1,850 | no_license | ////////////////////////////////////////////////////////////////////////////////////////////////////
// Noesis Engine - http://www.noesisengine.com
// Copyright (c) 2009-2010 Noesis Technologies S.L. All Rights Reserved.
///////////////////////////////////////////////////////////////////////////////////////////////////... |
0e4223a72f1415b361681705e9b300310e4652a8 | 7a8eda157ccb97b0aa4459058bfa8375e9332f6d | cawka/packaging-ndn-cpp-dev | /src/encoding/cryptopp/asn_ext.cpp | C++ | cpp | 2,200 | no_license | /**
* Copyright (C) 2013 Regents of the University of California.
* @author: Jeff Thompson <jefft0@remap.ucla.edu>
* @author: Yingdi Yu <yingdi@cs.ucla.edu>
* @author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
* See COPYING for copyright and distribution information.
*/
#include <ndn-cpp-dev/ndn-cpp-con... |
8ec45061818918b059a0ef7f6ea50e33c3e427ff | 76614e55b35124fa73e094a36bbccdd7f17f63f0 | KarpenkoIgor/SP | /lab05/lab052/lab052.cpp | C++ | cpp | 7,294 | no_license | // lab052.cpp : Определяет точку входа для приложения.
//
#include "framework.h"
#include "lab052.h"
#define MAX_LOADSTRING 100
// Глобальные переменные:
HINSTANCE hInst; // текущий экземпляр
WCHAR szTitle[MAX_LOADSTRING] = L"Second"; // Текст строки заголовка
WCHAR szWi... |
e1c877bfee4a6bf8d1786fb6d7caa9870d2beec6 | 908f0d91a84ff0375fd31c9e78fee8625b69e185 | bdmendes/feup-cal | /TP1/ex4.cpp | C++ | cpp | 1,693 | no_license | // By: Gonçalo Leão
#include "exercises.h"
#include <algorithm>
bool changeMakingGreedy(unsigned int C[], unsigned int Stock[], unsigned int n, unsigned int T, unsigned int usedCoins[]) {
// C must be sorted!
unsigned moneyLeft = T;
for (unsigned i = n - 1; i >= 0 && i < n; --i){
if (Stoc... |
4774ff667bb3e7f9dc43e23523183e7e436a918f | 59d26d6b9ddb099ccd7c4d304f53d89a8457eefa | meego-tablet-ux/meego-app-browser | /content/common/notification_service.cc | C++ | cc | 5,430 | permissive | // Copyright (c) 2010 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/common/notification_service.h"
#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
#include "content/common/no... |
f32b419f9dde198c4f66e40f8fef9f3706fae2a2 | e7866328fae2aaa8fe48e21c78a5638b2a19a382 | wkcn/leetcode | /0101-0200/0144.binary-tree-preorder-traversal.cpp | C++ | cpp | 1,095 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
13e1436924e8edccfc2ca7f5876727b0b24df497 | 1ecd8f4811897cb60fba22f6e4e936bd2f6a8e11 | cusumdt/Asteroids-Proyect | /Asteroids/src/screen/Menu/menu.cpp | C++ | cpp | 8,097 | no_license | #include "screen\Menu\menu.h"
#include "raylib.h"
#include "screen\Gameplay\gameplay.h"
#include "Game\game.h"
namespace GameInit
{
bool music = true;
static bool settings = false;
static int fontSizeTitle = 0;
static int fontSize = 0;
static bool playButtonAnimationOn;
static bool helpButtonAnim... |
2a68fb40e46877f30150ee3f2c5bbf4388fc823e | 50ca00f0999b491a2f44c9d740b78f6223dd7c56 | annarole/berrydb | /src/free_page_manager.cc | C++ | cc | 1,476 | permissive | // Copyright 2017 The BerryDB 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 "./free_page_manager.h"
#include "berrydb/platform.h"
#include "./free_page_list.h"
#include "./page.h"
#include "./page_pool.h"
#include "./stor... |
95221c00499c1ad3999bf660deb056345eb72ddb | 2d89cd73d23c0f037708344d71d8509f2239c4d3 | meniossin/src | /third_party/blink/renderer/modules/webaudio/offline_audio_context.cc | C++ | cc | 18,268 | permissive | /*
* Copyright (C) 2012, 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condition... |
5139a9d01054d6f17384ac726d6521239580a720 | c2942de779058788163b3d5f9ecb6134f96e636b | Garlic-HM/garliccoin | /src/test/fuzz/load_external_block_file.cpp | C++ | cpp | 1,104 | permissive | // Copyright (c) 2020-2021 The Garliccoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h>
#include <flatfile.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#incl... |
cd1495f128c1e65c6268c283498fd6ebdc636eab | 563a63b0e50695bb51f31fc4be6f6cd16523a69f | NikosKarousis99/c-project | /main.cpp | C++ | cpp | 1,064 | no_license | #include "graphics.h"
#include "game.h"
#include "config.h"
// The custom callback function that the library calls
// to check for and set the current application state.
void update(float ms)
{
Game* game = reinterpret_cast<Game*>(graphics::getUserData());
if (graphics::getKeyState(graphics::SCANCODE... |
4c2a16f9cd7d7ba779d6612944dc96511f82bc59 | ee76048e42ce46808710f403b1905bae58825bd9 | kjosh9/QRayTracing | /core/point3d.hpp | C++ | hpp | 690 | no_license | #ifndef POINT3D_H
#define POINT3D_H
class point3D {
public:
point3D();
point3D(double x, double y, double z);
point3D(const point3D& rhs);
~point3D();
bool operator==(const point3D& rhs);
point3D& operator=(const point3D& rhs);
double x();
double y();
double z();
void set_x... |
d2cd36f339040b570bd21106b6b7ec968dd53717 | e3e8c28e5b9346e52e5403aa077c0b00ef3e1587 | ebuckis/cpp_pool | /d03/ex02/ClapTrap.cpp | C++ | cpp | 3,619 | no_license | /* ************************************************************************** */
/* LE - / */
/* / */
/* ClapTrap.cpp .:: .:/ . .:: ... |
a74505ebb48613f4f1cf74472f1930c6a2ae89c1 | e23f4f093b533e5192f0c8ba926beccb79c450e0 | CesarLiu/apollo | /modules/canbus_vehicle/ch/protocol/gear_command_114.cc | C++ | cc | 2,246 | permissive | /******************************************************************************
* Copyright 2019 The Apollo 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
... |
b53f9026e4e0dc706f9de03e9c062709391628bc | 0b7b143e5fc1aeb7776a21710beff268561a67e5 | xxzxcuzx-me/SDiZO1 | /Sources/Array.cpp | C++ | cpp | 4,131 | permissive | //
// Created by xxzxcuzx_me on 09.03.19.
//
#include "Array.h"
#include <iostream>
#include <random>
Array::Array() noexcept {
size = 0;
head = std::unique_ptr<int []>(new int [0]);
}
void Array::addFirst(int value) {
size++;
//Rozszerz tablicę
auto newHead = std::make_unique<int []>(size);
... |
e67d406fadce0e7844cb33ca382cd3bd5f3ece00 | 3ef2b3977c309acec5da3e333e628f64147a412d | FredyTP/TestSite | /bg2e-modified/src/manipulation/find_pick_id_visitor.cpp | C++ | cpp | 1,820 | no_license | /*
* bg2 engine license
* Copyright (c) 2016 Fernando Serrano <ferserc1@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.