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 |
|---|---|---|---|---|---|---|---|---|
b7f7828f8fcca7b0e46ba788173603eacc0ba291 | 1f62b9a88295b7c78a807f18aaf643bcc4b5f875 | ivanmb/taller-heuristicas | /codigo/goloso.cpp | C++ | cpp | 439 | no_license | #include "goloso.h"
// No borrar MinimoConjuntoDominante(g) de la lista de inicialización
MinimoConjuntoDominanteGoloso::MinimoConjuntoDominanteGoloso(const Grafo& g) : MinimoConjuntoDominante(g) {
// Agregar comportamiento si hace falta
}
vuint MinimoConjuntoDominanteGoloso::resolver() {
// Rellenar con la solu... |
34077ee525611ec3562438b73bf61ca44c64bfd5 | a2e06417a0ed2aa8c4bb959e1bc87739493b5c33 | zhangyiii/molecular_dynamics | /Mol_dyn/host/src/main.cpp | C++ | cpp | 10,297 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "CL/opencl.h"
#include <time.h>
#include "parameters.h"
#ifdef ALTERA
#include "AOCL_Utils.h"
using namespace aocl_utils;
#endif
#ifdef NVIDIA
#include "nvidia.h"
#endif
// OpenCL runtime configuration
cl_platform_id platform = NULL;
cl_devi... |
bdc62db51f1bd0501703ca13b883ac6d9b0adad5 | 497cb4058922bdf94e89a8c62634478370206d25 | NetBSD/pkgsrc | /www/seamonkey/patches/patch-mailnews_base_search_src_nsMsgSearchTerm.cpp | C++ | cpp | 626 | no_license | $NetBSD: patch-mailnews_base_search_src_nsMsgSearchTerm.cpp,v 1.4 2021/02/08 12:26:20 ryoon Exp $
--- comm/mailnews/base/search/src/nsMsgSearchTerm.cpp.orig 2020-02-17 23:36:19.000000000 +0000
+++ comm/mailnews/base/search/src/nsMsgSearchTerm.cpp
@@ -207,7 +207,7 @@ nsresult NS_MsgGetStringForAttribute(int
}
}... |
9b7d730e35fd019f261fbe3dbc92f3cb377956d9 | 45faee236f1229fed6522cd2f4643bed41f9b53d | KhoaNguyenAn/Algorithm | /HSGTP2009/TAMGIAC.cpp | C++ | cpp | 3,233 | no_license | #include <bits/stdc++.h>
using namespace std;
string s;
int n, a[505][505], b[505][505], x1, x2, res, height, width, type, c[505][505], d[505][505];
bool ok2;
int main(){
//IO ROUTINE
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
freopen("TAMGIAC.inp", "r", stdin);
freopen("TAMGIAC.out", "w",... |
8aaf07b153dae0cb619d9b47f2120518232d0632 | d94c9282d407fd21796aa36044f94ba87caac4ef | mxzf0213/dataGenDemo | /a.cpp | C++ | cpp | 2,295 | no_license | #include <bits/stdc++.h>
using namespace std;
const int maxn=1e5+10,mod=1e9+7;
typedef long long ll;
int n,m,k,t;
int tot;
int atk[maxn],d[maxn];
int root[maxn],ls[maxn*20],rs[maxn*20];
int cnt[maxn*20],point[maxn];
int treeCnt;
ll sum[maxn*20];
__int128 ret[maxn];
vector<int>e[maxn],bl[maxn];
void ins(int x,int &y,int... |
a6d4a25687ded6a175498eb518f967f32e38181d | 5823a15145a429bb90b748edd427e86e8f6d2b13 | kaiyilu/mop | /bundle_adjustment/synthetic.cpp | C++ | cpp | 13,419 | no_license | // Octubre 7 2013
// José David Tascón V.
// Eigen Libraries
#include <eigen3/Eigen/Dense>
// Std Libraries
#include <iostream>
#include <random>
#include <string>
#include <cmath>
// Local libraries
#include "Common.hpp"
#include "MultipleCamera.hpp"
#include "Optimizer.hpp"
#include "Plot.hpp"
// using namespace ... |
096dd45bf69f95f30256ece5144c02c1b903a569 | ecb5951f2984b38f57ee1d87c03d748832b126d7 | D3VON/OOP_with_Cpp | /warm_up/A-Sort-Tester.cpp | C++ | cpp | 31,651 | no_license | /*
* Run with
*
* -i iterations
*
* to do a stress test for the given number of iterations.
* Use
*
* -s seed
*
* to give a different seed. Use a seed of 0 to seed
* with the current time.
*/
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#includ... |
d5937864efd4ac72b644ae071365d87cb9efb3f9 | 4990300a8646705b5d6ce7175b4da7bc4a0b5a2a | MTaggart97/Enigma | /tests/test_plugboard_space.cpp | C++ | cpp | 266 | no_license | #include "PlugBoard.hpp"
#include "config.hpp"
using Enigma::PlugBoard;
int main() {
PLUGBOARD_CONFIG p_config = PLUGBOARD;
PlugBoard pb{&p_config};
char space = pb.get(' ');
char space1 = pb.get('5');
return (space != ' ' || space1 != ' ');
} |
0b776e63ba04d5bead49d958ed3838da071c026f | b68c77a40ad2678b4848c131d871253e9bfeadba | jack89730/CountFieldMgr | /球场管理系统/DlgModifyPrice.cpp | C++ | cpp | 1,319 | no_license | // DlgModifyPrice.cpp : 实现文件
//
#include "stdafx.h"
#include "DlgModifyPrice.h"
#include "MainDlg.h"
// CDlgModifyPrice 对话框
IMPLEMENT_DYNAMIC(CDlgModifyPrice, CDialog)
CDlgModifyPrice::CDlgModifyPrice(CWnd* pParent /*=NULL*/)
: CDialog(CDlgModifyPrice::IDD, pParent)
, m_strLevelName(_T(""))
, m_strLowPrice(_T("... |
ef126e1a85b1cdd8e7c9717cec658e2654ea2633 | cdcfc3a0682f9b6f5a908ace84525b1b8807cbf5 | guptavarun619/Data-Structure | /String/String.cpp | C++ | cpp | 2,160 | no_license | #include<iostream>
#include<string>
using namespace std;
int main()
{
//String initialization
string s0; // Here s0 is a string object
string s1("Hello"); // Intialized with some value
string s2 = "Hello World!"; // Another way to initialize string with a value
string s3(s2); // Initialize a stri... |
3721e89ec2e2ddf37c04dcf5d7addb2a17b63d6f | 0f5230a19fd02f471f4d53d5348cb639c22b731f | NCZkevin/v8 | /src/x64/disasm-x64.cc | C++ | cc | 80,072 | permissive | // Copyright 2011 the V8 project 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 <assert.h>
#include <stdarg.h>
#include <stdio.h>
#if V8_TARGET_ARCH_X64
#include "src/base/compiler-specific.h"
#include "src/base/lazy-inst... |
6ae646f92a25131312ffd7d0fe2e7bba75420e4f | 7456d6bed98081778bb43523a55553c6e938cbf4 | acm-uiuc/sigchi | /old_site/GMI 1.0/DirectMidi/CInputPort.cpp | C++ | cpp | 9,547 | permissive | /*
Module : CInputPort.cpp
Purpose: Defines the code implementation for the CInputport class
Created: CJP / 08-02-2002
History: CJP / 20-09-2002
1. Improved class destructors
2. Check member variables for NULL values before performing an operation
3. Restructured the class system
4. Better meth... |
2077322d4414d833745df79aa26d1d8887727cd3 | b4199e0bef19cf2011e6b7b82d3cec434349aa00 | ThoseBygones/ACM_Code | /AOJ/AOJ ITP2_10_B.cpp | C++ | cpp | 1,676 | no_license | /*
********************************************************************************
* Author: ThoseBygones
* Version: V1.0
* Date: 2020-09-30
* Subject: ACM-ICPC
* Language: C/C++14
* OJ: AOJ
* Algorithm:
********************************************************************************
* Algo-Descripti... |
df68d1a9ca439ec344f831af9e7b89e04c5879ce | 01a525a09edb499014f296cdca2f255910f1a104 | CMS-TMTT/cmssw | /RecoMuon/StandAloneTrackFinder/src/StandAloneMuonBackwardFilter.cc | C++ | cc | 595 | permissive | /** \class StandAloneMuonBackwardFilter
* The outward-inward fitter (starts from StandAloneMuonFilter outermost state).
*
* \author R. Bellan - INFN Torino <riccardo.bellan@cern.ch>
*/
//#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "RecoMuon/StandAloneTrackFinder/interface/StandAloneMuonBack... |
cfd871397b233596f8bd5c56bbfba53c9e8ed4a8 | 387e0113d69b07d8f26c7a60f66dcc1e2f9478d7 | takapt/kyopro | /temp.cpp | C++ | cpp | 3,168 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include... |
68c5b2f6bfb749267dd8a08ec23b04c58bb4596b | c42b8591e31984622c45526ad13a6e42a0444c71 | Circuit-killer/obd2-bt-stm32 | /qt/plot/graph.cpp | C++ | cpp | 1,892 | no_license | #include "graph.h"
#define PEN_WIDTH 2.5f
graph_t::graph_t(QWidget *parent) : QWidget(parent)
{
setLayout(&mainLayout);
view = new QChartView;
mainLayout.addWidget(view);
xAxis = new QValueAxis;
xAxis->setTitleText(tr("Time"));
xAxis->setTitleBrush(Qt::magenta);
xAxis->setLabelsColor(Qt::magenta);
yAxis = n... |
040073d1074faf6cf26d99e40d3f36d84ef3fb7c | 7c169fe13c1a50a7f37fc0657072b868af33d9fd | ECS-251-W2020/chromium | /chrome/browser/policy/printing_restrictions_policy_handler.cc | C++ | cc | 9,519 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/policy/printing_restrictions_policy_handler.h"
#include "chrome/common/pref_names.h"
#include "components/policy/core/browser/po... |
5d4adb56631c6741519f4364e9cee85590e6b4bc | e15c1f24993a91187cc829e2e1c992c216a4f005 | LiberatorUSA/GUCEF | /dependencies/libRocket/Source/Controls/InputTypeText.cpp | C++ | cpp | 3,971 | permissive | /*
* This source file is part of libRocket, the HTML/CSS Interface Middleware
*
* For the latest information, see http://www.librocket.com
*
* Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software a... |
4c8acc2738e32cd33f2a5cb90fa1c685fc96dbd0 | 4a483b1f46842cc625226a55b09d234cbc4e8b82 | GangBug/AgeofEmpiresII | /GangBug AoE/M_Metrics.cpp | C++ | cpp | 6,508 | no_license | #include "M_Metrics.h"
#include "M_Resources.h"
#include "App.h"
#include "M_MissionManager.h"
#include "p2Point.h"
#include "GUIImage.h"
#include "M_GUI.h"
#include <list>
#include "GUILabel.h"
#include "M_Window.h"
M_Metrics::M_Metrics(bool startEnabled) : Module(startEnabled)
{
name.assign("Metrics");
totalUnits ... |
d196b9b2f485699e7c4e7e2e6195b694673a5e80 | ead29122a07e073bd36cc0283dd5c6a4dcf6fbd9 | GJZhou/LeetCode | /LeetCode/TwoPointers.cpp | C++ | cpp | 1,089 | no_license | #include<vector>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) :val(x), next(nullptr) {}
};
class TwoPointers {
public:
static void TwoSum(vector<int>& nums, const int & sum) {
int i = 0, j = nums.size() - 1;
while (i < j) {
if (nums[i] + nums[j] == sum) {
i++;
j--... |
513648d4892788574394397e1378416c5612d9d5 | ec441f9c657f4b51c202ed2019e1b57303736221 | Alexandrecajamos/2017.2 | /AlgebraLinear/AlgebraLinear/Op_Mat.cpp | C++ | cpp | 41,754 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <ctime>
#include <time.h>
#include <math.h>
void preenche(int l, int c, float **mat)
{
for (int i = 0; i < l; i++) {
for (int j = 0; j < c; j++) {
printf("\n Digite a posicao [%d][%d] da matriz: ", i+1, j+1);
scanf(... |
62238dd0857e66e89f75b8a7ed4338a29c7a631e | 8cabaf5cf256a5634350549cb3f7e8ccdf606520 | ClientSelection/chromium | /ui/views/test/widget_test_aura.cc | C++ | cc | 5,321 | 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 "ui/views/test/widget_test.h"
#include "build/build_config.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/mus/window_tree_client.... |
c3b69a1e89a72b199ab0534e9da4749096b33d64 | dd7520329fc61a010de0a197b76fe3ed95319b52 | burakbayramli/books | /GPU-Gems-Book-Source-Code/GPU-Gems-1-CD-Content/Image_Processing/OpenEXR/OpenEXR-1.0.6/HalfTest/testLimits.cpp | C++ | cpp | 1,519 | permissive | #include <testLimits.h>
#include <halfLimits.h>
#include <iostream>
#include <assert.h>
using namespace std;
namespace {
float
mypow (int x, int y)
{
bool negative = false;
if (y < 0)
{
negative = true;
y = -y;
}
float z = 1;
while (y > 0)
{
z *= x;
y -= 1;
}
if (negative... |
b242a23f2ffd6dc48efd5193e8dc0bafd85d2db1 | 09c276eb2cbd9e2b9bb8e4971989933b7ca0a1d5 | Arjunbala/DSLab | /Postfix to tree.cpp | C++ | cpp | 4,922 | no_license | #include<iostream>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>
#include<iomanip>
#include<deque>
#include<sstream>
#include<math.h>
using namespace std;
struct node
{
char data;
node *left;
node *right;
};
node *stack[100];
node *root = NULL;
int to... |
bd1bc15f00d5d6f659e0ba16b2ada08a71dff737 | d840f533bc39f050311d0ca7acca3460d53c7d68 | kcudcigam/Problems | /source/2019.08.14/王宇阳/max.cpp | C++ | cpp | 361 | no_license | #include<bits/stdc++.h>
using namespace std;
int n,a,b;
int main(){
freopen("max.in","r",stdin);
freopen("max.out","w",stdout);
cin>>n>>a>>b;
if(n==3 &&a==3 &&b==2){
cout<<4<<endl;
return 0;
}
if(n==20 &&a==20 &&b==11){
cout<<224080548<<endl;
return 0;
}
if(n==100 &&a==200 &&b==50){
cout<<4830622... |
5819c4097219038e8c7954533d98ba075d530704 | 661c203627ce2dc0ddbf7a549ca45b21610f2942 | QPC-database/aws-sdk-cpp | /aws-cpp-sdk-storagegateway/source/model/DescribeStorediSCSIVolumesResult.cpp | C++ | cpp | 1,348 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/storagegateway/model/DescribeStorediSCSIVolumesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils... |
dbbe708c8916a5e3fe8294e320b9d88d80a6745b | d673bda2647cbb0c2629b6ea95ee35ed6c6dc383 | brock7/TianLong | /Server/Player/GamePlayer.cpp | C++ | cpp | 9,232 | no_license | #include "stdafx.h"
#include "GamePlayer.h"
#include "PacketFactoryManager.h"
#include "PlayerPool.h"
#include "Obj_Human.h"
#include "SceneManager.h"
#include "GUIDManager.h"
#include "TimeManager.h"
#include "Log.h"
#include "WGRetUserData.h"
#include "ServerManager.h"
#include "GWNotifyUser.h"
#include "GWTeamLea... |
27a31c871d1abae8b9e7bcdea0ff3555cc432cd5 | 3bf42b938be2c009e4868e65481cc2df0810da3d | stnava/ITK | /Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx | C++ | hxx | 15,145 | 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... |
dbc50f4d5cb5f997f0827b7e043bcb0e13900c85 | 6d56783a05c6a7e2e6739e3eea0bd5e7bc7578ae | roq-trading/roq-api | /include/roq/clock.hpp | C++ | hpp | 997 | permissive | /* Copyright (c) 2017-2023, Hans Erik Thrane */
#pragma once
#include <chrono>
#include <ctime>
#include "roq/exceptions.hpp"
namespace roq {
namespace detail {
template <clockid_t clock>
inline auto get_time_helper() {
struct timespec time;
auto res = ::clock_gettime(clock, &time);
if (res != 0) [[unlikely]... |
4a23127458f6018c56116a7a9464b6566a5f470f | 1debe9ed0688c679090d50f482c75a3e7433eb5b | StefanoPruna/c- | /secondTest/secondTest/secondTest.cpp | C++ | cpp | 832 | no_license | // secondTest.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
}
// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu
// Tips fo... |
c7e7530e71905fc2f6978e5bd867f41661f86fe2 | edf6c8980a6bc81add45fda863170c172663dc47 | ouchengguo/chromium.bb | /src/printing/print_settings.cc | C++ | cc | 7,745 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "printing/print_settings.h"
#include "base/atomic_sequence_num.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "printi... |
9adb4afdaf7e647164dff10d7ba6142ddeee7607 | b79c63fbeb4c46d32f6d22dedd1c12d0a099eefe | narutolai/leetcode | /202104/在数组中查找和小于target的所有组合.cpp | C++ | cpp | 766 | no_license |
//在数组中查找和小于target的所有组合
class Solution
{
public:
int purchasePlans(vector<int> &nums, int target)
{
//排序
sort(nums.begin(), nums.end());
int mod = 1e9 + 7;
int l = 0, r = nums.size() - 1;
int res = 0;
while (l <= r)
{
if (nums[l] + nums[r] > t... |
d29375970a769635bc601d741ad70dd57320b505 | 6b8c8b308c3c78d46e6b4146e4b11851adde2b3e | skdn159/BattlesProj | /BattleShip_pp/Player.cpp | C++ | cpp | 958 | no_license | #include "stdafx.h"
#include "Player.h"
Player::Player()
{
}
Player::~Player()
{
}
void Player::SetupShips()
{
Ship* ships[5] = { &m_Aircraft, &m_BattleShip, &m_Cruiser, &m_Destroyer[0], &m_Destroyer[1] };
Position placePos;
int direction;
int dx, dy;
for (int j = 0; j < _countof(ships);)
{
dx = dy = 0;
... |
1546fa78e19eb2b4315eb2ad78d58b99b4801036 | abe3231471c5f52a57cccd8ee5605a4ad5843d76 | smilebook/headfirstdp | /decoratorpattern/main.cpp | C++ | cpp | 1,202 | no_license | #include<iostream>
#include"beverage.h"
#include"decorator.h"
using namespace std;
int main()
{
Beverage *house_blend=new HouseBlend;
house_blend=new Milk(house_blend);
house_blend=new Milk(house_blend);
house_blend=new Mocha(house_blend);
house_blend=new Soy(house_blend);
house_blend=new Whip(house_blend);
... |
d0a1792eba6b104e3a619554df3cccf72a586176 | fa6cc1ef60a575c52f549d6a1b00f25e470eb213 | StefanMazilu/Game | /LGame/Scene.cpp | C++ | cpp | 995 | no_license | #include "Scene.h"
#include <iostream>
using std::cout;
Scene::Scene()
{
}
Scene::Scene(int maximumMonsterCount)
{
_maximumMonsterCount = maximumMonsterCount;
_monsters = new Monster[maximumMonsterCount];
Monster* monster = CreateMonster();
if (monster)
{
*monster = Monster(10, 10, 10, 10, 10, 10, 5, "Test... |
e7f05fa4fbccbd0b32eb0278e1e42ee0caaadd2a | 42eb9a2a878663bdc1f14eaba49e59e40bd9861e | hjgode/mde6 | /mde/DiesteinMDE/SaveMsg.cpp | C++ | cpp | 3,896 | permissive | // SaveMsg.cpp : implementation file
//
#include "stdafx.h"
/////////////////////////////////////////////////////////////////////////////
// CSaveMsg dialog
IMPLEMENT_DYNAMIC(CSaveMsg,CDialog)
CSaveMsg::CSaveMsg(CWnd* pParent /*=NULL*/)
: CDialog(CSaveMsg::IDD, pParent)
{
m_pSteinSaetze = NULL;
}
//----------------... |
f81199635ce8c2379ef470a88fb59a0ced709d6b | 045afc5de4c49986b3e370dc837998293749678e | toppa102/sfml-game-engine | /src/element.hpp | C++ | hpp | 582 | no_license | #pragma once
#include <SFML/Graphics.hpp>
#include <iostream>
class Scene;
class EventManager;
class Element : public sf::Drawable
{
protected:
sf::Texture* m_tex;
sf::Sprite m_spr;
Scene* m_hostScene;
public:
Element(Scene* hostScene, sf::Texture* tex, const sf::Vector2f& pos = sf::Vector2f(0.f, 0... |
db0cb97576a998a2856b85868ac1980ddc60967f | 47176c239533cfdb03c95041f2aaa434a9181d0d | dianpeng/chromium | /chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc | C++ | cc | 37,663 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
#include <stddef.h>
#include "base/bind.h"
#include "base/feature_list.h"
#inc... |
8fc761df5e1edce61a6a611d7445e69601b6d47e | ae4f39f2be6b3cd81f471a81fcd40937c27863db | Mana-Hanno/oF | /apps/myApps/visualizer/src/testApp.cpp | C++ | cpp | 20,526 | no_license | #include "testApp.h"
#include <sys/types.h>
#include <dirent.h>
bool isRand = false;
//--------------------------------------------------------------
void testApp::setup(){
int bufferSize = 256;
soundStream.setup(this, 0, 1, 44100, bufferSize, 4);
ofSetVerticalSync(true);
ofSetFrameRate(60);
l... |
b0b011b6435286126938c36aaeea659576753212 | fe09b5ea6c924ff8c5cf8bdd54cb2ba0bb4bd471 | GaMJun/Sorting-Comparison | /Sources/SelectionSort/selection.cpp | C++ | cpp | 654 | permissive | //
// Created by gamjun on 22/04/19.
//
#include "selection.h"
inline void swap_selection(int *xp, int *yp) {
int temp = *xp;
*xp = *yp;
*yp = temp;
}
void Selection::doSelection(int arr[], int n, long long int &swap_count, long long int &comparison_count) {
int i, j, min_idx, l;
swap_count = 0;
... |
5fee23fffef19bf760923313d5344c41060f8b7e | af0e6b26bac6c05979fbc0f812a1b2e54431baab | wmcorless/paccoin | /src/alert.cpp | C++ | cpp | 7,359 | permissive | //
// Alert system
//
#include <boost/foreach.hpp>
#include <map>
#include "alert.h"
#include "key.h"
#include "net.h"
#include "sync.h"
#include "ui_interface.h"
using namespace std;
map<uint256, CAlert> mapAlerts;
CCriticalSection cs_mapAlerts;
//static const char* pszMainKey = "043fa441fd4203d... |
8f6a38048b677e33c4692030961d4aa946f36762 | c1a872cd1a7651ae19f7b145dd33be507aa49b33 | Nexxel/TFG | /test_opencv/src/image_converter.cpp | C++ | cpp | 1,809 | no_license | /*
Sergio Gonzalez Muriel
Degree thesis: Reinforcement learning for object manipulation by a robotic arm
Test code for working with OpenCV
*/
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hp... |
003ed56c127f7a028bc741c64eaa008dd96cf117 | d71a97ddc7a5b4e200b9f9ca3c8df671997b492e | DuduAlmeida/EstruturaDeDados1 | /Aula 9/ex_1.cpp | C++ | cpp | 573 | no_license | /*
Faça uma função recursiva que permita inverter um número inteiro N. Ex: 123 – 321
*/
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
int inverte(int n)
{
if (n < 10) return(n); // caso trivial
else {
char aux[] = " ";
sprintf(aux, "%i",n);
... |
13288f7d96b2d17cd4d2b876c3619951a25b2b13 | 4d84caf8985211be70963b768b80961c3bd25fb3 | jackwasey/physiology | /src/RcppExports.cpp | C++ | cpp | 2,203 | no_license | // Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// pres_atm_kPa
NumericVector pres_atm_kPa(NumericVector altitude_m);
RcppExport SEXP _physiology_pres_atm_kPa(SEXP altitude_mSEXP) {
BEGIN_RCPP
... |
5f77cef4c9de922d6a0928c21c42589ae591712a | 1e6bcfb27b707754849260961d5d518b1eb95d5f | ohjiwooo/c-algorithm- | /kakao/2020-1.cpp | C++ | cpp | 1,449 | no_license | #include <string>
#include <vector>
using namespace std;
string solution(string p) {
string answer = "";
int n = p.length();
int check = 0;
int temp; //자른기점
string u;
string v;
if (p.empty() == 1) {
return p;
} //올바른 문자열 -종료
for (int i = 0; i < n; i++) {
if (p[i] == '(') { check++; }
else { check--; }
... |
dba58e32f645a9550b107735dc4386e9fca475d3 | a498bb1b436ff62e2fce546e0ecb17368897d117 | hw233/auengine | /Src/server/netmsg_new.cpp | C++ | cpp | 565 | no_license | #include "netmsg_new.h"
ModuleMsg::ModuleMsg()
{
msgLen = 0;
param = NULL;
isUsed = false;
playerID = -1;
}
ModuleMsg::~ModuleMsg()
{
if(param)
{
delete[] (char*)param;
param = NULL;
}
}
//void ModuleMsg::makeData(int len, void *data)
//{
// msgLen = len;
// param = new char[len];
/... |
36cd624fd3790b9cde79528034651cf3e5735569 | eae27bbde62c06bfe94ffb857c6f5173ca81eda8 | lilongbin/esd | /01.coding_algorithm/04.std_c++/stl/day01/05deduction.cpp | C++ | cpp | 908 | no_license | #include <iostream>
#include <typeinfo>
using namespace std;
template<typename T>
void foo(T const& x,T const& y){
cout << typeid (x).name() << ' ' << typeid(y).name() << endl;
}
template<typename R,typename T>
R bar(T const& t){
R r;
cout << typeid(t).name() << ' ' << typeid(r).name() << endl;
return r;
}
int main... |
47a9e5c9ccb63567e84a4a669fbcc718396c284d | 928e9f225e719394ff9bf1bb85d0850841e3f80f | ardimh7/Cocos2d-x-integration | /proj.ios_mac/Appodeal/AppodealInterface.cpp | C++ | cpp | 5,142 | no_license | //
// AppodealInterface.cpp
// AppodealCocosSample
//
// Created by ewgenius on 03/09/15.
//
//
#include "AppodealInterface.h"
#if(CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "AppodealIOSHelper.h"
#endif
#include <string>
using namespace std;
void AppodealInterface::initialize(const char* appKey)
{
#if(CC_... |
3e27779dac46e8f4c8c1048262e832f1f5a2c6d7 | 9ffcf81e60d3fb9c3ad47972b49158cf2f717969 | OmarAbdelrahman/solved-problems | /UVA/competitive_programming/chapter_3/Dynamic Programming/0-1 Knapsack (Subset Sums)/10130 - SuperSale.cpp | C++ | cpp | 1,677 | no_license | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <c... |
73a19031a312c8d6aaf9fe7423ad31a164cf2f24 | 6066fb61df9513e263f12bc8a7974f139654cf65 | mgou123/code_snipe | /hightlight/matlab_slam/platform/IO/GlobalMap/getLocalMapPoints.cpp | C++ | cpp | 687 | no_license | #include <opencvmex.hpp>
#include <iostream>
#include <string>
#include "Platform.hpp"
#include "GlobalMap.hpp"
#include <opencv2/opencv.hpp>
#include "SLAMHandeUtil.h"
void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
{
ygomi::GlobalMap* pGlobalMap = getGlobalMapPtr(prhs[0]);
l... |
7166851fda1925785ff114627cc493b7ea879c75 | aaf2a6f4eae63da97a1270708a12325e8aaeee1e | david-hls/design-pattern | /Behavioral Patterns/command/test/command.cpp | C++ | cpp | 962 | permissive | #include <iostream>
using namespace std;
#define SAFE_DELETE(p) if (p) { delete p; p = NULL; }
class Receiver
{
public:
void Action()
{
cout<<"Receiver->Action"<<endl;
}
};
class Command
{
public:
virtual void Execute() = 0;
};
class ConcreteCommand : public Command
{
public:
Conc... |
fdb244e5b249f1af375549b5a6f71aa32872afad | 39cee53482bed1cddedf050d73831b474b7d9906 | dwrobel/engine | /lib/ui/painting/fragment_shader.cc | C++ | cc | 1,698 | permissive | // Copyright 2013 The Flutter 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 <iostream>
#include "flutter/lib/ui/painting/fragment_shader.h"
#include "flutter/lib/ui/dart_wrapper.h"
#include "flutter/lib/ui/ui_dart_state.... |
25b51757bcb9b734a7c7f931fbf40f183efaceff | 249f66b83405c0adeedc0feaa25d4588b2f867e5 | kyoungchinseo/HCI-2015-02-source-repo | /tuio/multitouch-input/myTUIOBall/Ball.cpp | C++ | cpp | 1,771 | no_license | #include "ofMain.h"
#include "Ball.h"
#include <stdlib.h>
#include <math.h>
Ball::Ball(float x, float y)
{
m_Position.x = x * WINDOW_WIDTH;
m_Position.y = y * WINDOW_HEIGHT;
m_Radius = 50.0f;
m_Velocity.x = 0.0f;
m_Velocity.y = 0.0f;
m_colorList.push_back(ofColor(30,153,197));
m_color... |
1b25ac483cebeff6f6f0afcbd06eb6d10f98bbaa | c0dd07ff6a3295c61542c1cac6cc8b7e35c9b200 | Anmol-Sri/Competitive-Environment | /CodeChef January Long Challenge 2021/blkjk.cpp | C++ | cpp | 4,025 | no_license | #include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define MP make_pair
#define ar array
#define all(x) x.begin(), x.end()
#define mem(arr,x) memset(arr, x, sizeof arr)
#define db(arr) for(auto x : arr) cout << x << " "; cout << "\n";
#define db2d(arr) for(auto x : arr){ for(a... |
a29c9ef67b35873d693f34e00488fb413dbcac17 | c7e7dcc61bd8179e84e69a1ae4036d5c31c7ae8a | dipeshdulal/space_shooter | /sources/Application.cpp | C++ | cpp | 5,200 | no_license | /**************************************************
* Implementation of the main class
*
* @author Dipesh Dulal, Abhimanyu Pandey, Dexter Shrestha
* @version 1.0
* @since 2016-10-15
**************************************************/
#include "Application.h"
#include <cstdio>
#include <iostream>
#inc... |
74de6fdd6e3924368adf68ce08da18e530303645 | 554cfd7e2cc3e7846f8945efa2c49dd1cde3dc7f | dimaLytvyniuk/OOP | /Cursach/Cursach/shape_editor.cpp | C++ | cpp | 4,843 | no_license | #include "stdafx.h"
#include "shape_editor.h"
ShapeObjectEditor::ShapeObjectEditor(void)
{
}
ShapeObjectEditor:: ~ShapeObjectEditor()
{
}
/*
* створює новий об'єкт RombEditor
* brushColor - колір заливки
* peColor - колір контуру
*/
void ShapeObjectEditor:: StartRombEditor(COLORREF brushColor, COLORREF peColor... |
c21be8244cf834accb21ff5ea309430d45e90cb2 | 53b16547e05be47dc647ac6dc9b71e14d0c38143 | m2osw/libaddr | /tools/ipv4_routes.cpp | C++ | cpp | 4,797 | permissive | // Network Address -- get routes and print them, similar to system `route`
// Copyright (c) 2012-2023 Made to Order Software Corp. All Rights Reserved
//
// https://snapwebsites.org/project/libaddr
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated do... |
bceb339bbc0c224b91381d77a9370615d0f997d3 | 402ef68005f04f1a41bdb3b6f89462c0067280f2 | cha63506/chromium-29 | /chrome/test/mini_installer_test/chrome_mini_installer.cc | C++ | cc | 26,298 | 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 "chrome/test/mini_installer_test/chrome_mini_installer.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_ser... |
3f220fa2662d052076444e901e3fe18d3ad96264 | d1f7a88c076f3adce48ef1b59544514d565deb8a | NolanJos/vespa | /searchcore/src/vespa/searchcore/proton/server/ireplayconfig.cpp | C++ | cpp | 229 | permissive | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "ireplayconfig.h"
namespace proton {
IReplayConfig::~IReplayConfig()
{
}
} // namespace proton
|
f4d56d7706d115c1351572fede2ebb4f80559439 | 1e1275f214620fdb60ea020ef73d21392e8ae53a | BackupTheBerlios/japi-svn | /branches/japi-met-inline-error-window/Sources/MGlobals.cpp | C++ | cpp | 6,099 | permissive | // Copyright Maarten L. Hekkelman 2006-2008
// 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)
/* $Id: MGlobals.cpp 151 2007-05-21 15:59:05Z maarten $
Copyright Maarten L. Hekkelman
Created S... |
270cc9a45db6c6a345cde8810af9f0105ddbd129 | a8e3a2d3cb04da2a38bd72afd4c1a561bd76b6a0 | jakec0413lv/textRPG | /main.cpp | C++ | cpp | 8,241 | no_license | /* TODO:
-Don't allow skill casting if not enough mana available
-Cleric heal function
-Figure out how to display skills
*/
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <stdio.h>
#include <ctype.h>
#include "hero.h"
#include "monster.h"
#i... |
03b1211b4f7889067953f3ed6a654e38a2ab27df | 68b64f881ec94370e98248949e95e3811b5e5d20 | marcinbrodziak/05_TestingGrounds | /Source/S05_TestingGround/S05_TestingGroundProjectile.cpp | C++ | cpp | 1,815 | no_license | // Copyright Epic Games, Inc. All Rights Reserved.
#include "S05_TestingGroundProjectile.h"
#include "GameFramework/ProjectileMovementComponent.h"
#include "Components/SphereComponent.h"
AS05_TestingGroundProjectile::AS05_TestingGroundProjectile()
{
// Use a sphere as a simple collision representation
CollisionCom... |
871172564aab3f0adb15aa4f5776475f2edaffc8 | 3b352ac07090d85793cdc0eae7b51976af4f7221 | Alan-love/filament | /filament/src/Renderer.cpp | C++ | cpp | 42,503 | permissive | /*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
d9d1d7c9a364026558dbe2c85056bdbdbc3b72e7 | 209aaf589bcf623d4452d584e13dcdf2f70c1d93 | AuruTus/KWIC | /KWICexample.cpp | C++ | cpp | 2,667 | permissive |
#include <algorithm> //rotate algorithm
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#include "split.h"
using namespace std;
struct Rotation {
vector<string>::size_type first;
vector<string> words;
};
vector<string> read_lines() {
vector<string> lines;
string line;
while (getli... |
89ba4f69f6acadf769115fc246a10056937561db | 47167905b5e1e43c9e27f071aa1400a52e491e3b | StevenTCramer/WhiteStarUml | /staruml-cpp/src/grammar/jointcalendar.hpp | C++ | hpp | 3,307 | no_license |
/*
Copyright (C) 2003 RiskMap srl
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have rec... |
480f180e5b5bc64694bcfb6df8fc6b0dfe712c83 | 07dbbf98645ccf2a6c30b72001cfb72a2e55b66e | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE400_Resource_Exhaustion/s02/CWE400_Resource_Exhaustion__listen_socket_sleep_72b.cpp | C++ | cpp | 2,051 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE400_Resource_Exhaustion__listen_socket_sleep_72b.cpp
Label Definition File: CWE400_Resource_Exhaustion.label.xml
Template File: sources-sinks-72b.tmpl.cpp
*/
/*
* @description
* CWE: 400 Resource Exhaustion
* BadSource: listen_socket Read data using a listen s... |
1eadb87e72a76f7b7950e420e4a45d2e6a94f8a6 | b93dc5d6879e9b94ea99b3eaa204e6a27c6ed30f | RealCool1983/testVC | /DLL_UI_TEST/DLL_UI_TEST/DLL_UI_TEST.cpp | C++ | cpp | 3,816 | no_license | // DLL_UI_TEST.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "DLL_UI_TEST.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// The one and only application object
CWinApp theApp;
using namespace std;
void run(){
printf("HELOO\n");
system("pause");
//return 0;
}
void run... |
6b3bf00ca11a513637f1080c89a0a37ad086fd80 | 9be7a5dd340e0a450e3b11b91f33b314b5108087 | cosa65/2aalgo3 | /ej2/tests/peorCaso_files/peorCaso.cpp | C++ | cpp | 1,038 | no_license |
#include <iostream>
#include <time.h>
#include <stdlib.h>
#include <fstream>
#include <tuple>
#include <set>
using namespace std;
int main(int argc, char **argv){
string fileName(argv[1]); //Nombre del archivo de test generado
int N = atoi(argv[2]);
int L = atoi(argv[3]);
ofstream output(fileName.c_str());
i... |
438f3cd3718613af5833445d348c1300023b191c | 93d74898c23503c86bec111bdc70c5904f21e9dd | RumRaisins/LeetCode | /LeedCode/!!!哈希!!!/拉链法测试.cpp | C++ | cpp | 497 | no_license | #include "拉链法.h"
using haizei::LinkedHashTable;
using haizei::Node;
int main() {
string first,second;
Node<string> *p;
LinkedHashTable<string, string> hash;
while (cin >> first) {
if (first == "end") break;
cin >> second;
hash[first].insert(second);
}
cout << "开始寻找" << endl;
while (cin >> first) {
p = h... |
e2d6140f019172b3ca65fe94a22be6f5d653ee26 | 692d4ba6a4006da767f1a49819d2564f57fbd80a | linco95/Luddis | /Source/Luddis_Project/Luddis/GameStateLevel.cpp | C++ | cpp | 13,868 | no_license | #include "GameStateLevel.h"
#include "GameStatePaused.h"
#include "ViewUtility.h"
#include "EntityManager.h"
#include "GameManager.h"
#include "ResourceManager.h"
#include "PowerupDisplay.h"
#include "SoundEngine.h"
#include "Dialogue.h"
#include "Level.h"
#include "Silverfish.h"
#include "Spider.h"
#include "EventZone... |
164be649f71a52ccca35ac684019d04ce5a4005b | 0ce6865bad3cd25b530d112bad7e48b1bb19d62e | Apostrov/rt-template | /src/refraction.cpp | C++ | cpp | 3,003 | permissive | #include "refraction.h"
Refraction::Refraction(short width, short height) :Reflection(width, height)
{
raytracing_depth = 3;
}
Refraction::~Refraction()
{
}
Payload Refraction::Hit(const Ray& ray, const IntersectableData& data, const MaterialTriangle* triangle, const unsigned int max_raytrace_depth) const
{
if (tr... |
1dfa9c52b725e53d707e7f9230b4bb87695a64b7 | 8ee566e772c6468f2b7cb6509d9c592afd56ae66 | Denticle/docker-base | /php/php-sky/grpc/third_party/abseil-cpp/absl/strings/internal/str_format/bind_test.cc | C++ | cc | 5,252 | permissive | #include "absl/strings/internal/str_format/bind.h"
#include <string.h>
#include <limits>
#include "gtest/gtest.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace str_format_internal {
namespace {
class FormatBindTest : public ::testing::Test {
public:
bool Extract(const char *s, UnboundConversion *... |
3e312fa267da1a84fe9a15aa45bd38306a9bd144 | 28038d76612843304a11de89798e0eab30d73a15 | Horaddrim/ananas | /kernel/kern/handle.cpp | C++ | cpp | 7,220 | permissive | #include <ananas/types.h>
#include <ananas/error.h>
#include <ananas/handle.h>
#include <ananas/kdb.h>
#include <ananas/lib.h>
#include <ananas/lock.h>
#include <ananas/mm.h>
#include <ananas/process.h>
#include <ananas/schedule.h>
#include <ananas/trace.h>
#include <ananas/thread.h>
#include "options.h"
TRACE_SETUP;
... |
e8316b13d1bf2b6211efe8f5f406d669c1bf5ce6 | a4b067829eb20c488b40aae6870620d932b5331a | joeykrakowski/enjin-cpp-sdk | /test/unit/schemas/player/mutations/PlayerAdvancedSendAssetTest.cpp | C++ | cpp | 3,213 | permissive | /* Copyright 2021 Enjin Pte. Ltd.
*
* 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... |
9844af499a88cc2b65b563e06b2b81e13860dc5c | f8593ff5082c20d23fa3e8d326bfeb599b139757 | Samsung/Castanets | /components/autofill/core/browser/autofill_ie_toolbar_import_win_unittest.cc | C++ | cc | 7,532 | 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 "components/autofill/core/browser/autofill_ie_toolbar_import_win.h"
#include <stddef.h>
#include "base/stl_util.h"
#include "base/strings/strin... |
f496409e6d627423fcd5cc068da686f4eacb2d1b | 7408f1126e45051db7b70793893217e26ca2299b | z3t0/khd | /src/daemon.cpp | C++ | cpp | 2,767 | permissive | #include "daemon.h"
#include "parse.h"
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#define internal static
#define local_persist static
internal int KhdSockFD;
internal b... |
9d2827c26577717a507aa0d026eefe1f0b06a751 | bfe016775077065ba213953daab5964b5d1f2e50 | kmistri/pmgd | /test/mtalloctest.cc | C++ | cc | 12,077 | permissive | /**
* @file mtalloctest.cc
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017 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
* in the Software without ... |
e14f38e27da715e4d1fb427133b8c53d65effcb0 | b95235b21b3ee69fc999be242be016eed844996e | iamslash/learntocode | /leetcode/JumpGameII/20200416.a.cpp | C++ | cpp | 1,281 | no_license | /* Copyright (C) 2019 by iamslash */
#include <cstdio>
#include <vector>
#include <limits>
//:0 1 2 3 4 5
// 2 3 1 1 4
// i
// 0 1 1 2 2
// // 564ms 22.45%
// // O(N^2) O(N)
// class Solution {
// private:
// std::vector<int> m_N;
// public:
// int jump(std::vector<int>& N) {
// int n = N.size();
/... |
1654e5f3a6e0d4b985dc398bc851c28a311c5752 | 01cb5e4f963b3bb836672fcdbdfff3b164aea8e9 | SilverHL/Leetcode | /981.cc | C++ | cc | 1,279 | no_license | #include <vector>
#include <algorithm>
#include <vector>
#include <unordered_map>
#include <string>
#include <set>
using namespace std;
struct Node {
string value;
int timestamp;
Node(string v, int ts) : value(v), timestamp(ts) {}
};
struct cmp
{
bool operator()(const Node &n1, const Node &n2)
... |
a15a405572cd4d9ecb5013e6a3c6efc330c5be08 | 8b91e0d596c5b9a964f40172951bce44c207d092 | akurt5/AIEShit | /Complex Game Systems/Projects/Bahaviour tree/Bahaviour_tree.cpp | C++ | cpp | 11,170 | no_license | #include "Bahaviour_tree.h"
#include "Gizmos.h"
#include "Utilities.h"
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/ext.hpp>
#include "Button.h"
#include <algorithm>
#include <SOIL.h>
#include "Agent.h"
class WithinRange : public Behaviour
{
public:
WithinRange(float _Range) : Range2 (_Range*_Range... |
b65cb53de37fc5ffe269eb846318c3c74830b04c | 5643a087d88882556ab8f03f8b7b837ccec41f9c | markleent/Arduino-K3M-Controller | /libraries/T6963/T6963.cpp | C++ | cpp | 29,610 | permissive | /*-------------------------------------------------------------------------------------------------
r10- see Revision.txt
-----------------------------------------------------------------------------------------------*/
#include "Arduino.h"
#include "T6963.h"
#include <avr/pgmspace.h>
//#include "T6963_Commands.h" - R... |
8cd2cf32a21c10e5d9418906ab46a0bee3c05584 | f0da98cf9051624668e5677d11fbd40723931dc0 | jeremy-lunarg/Vulkan-ValidationLayers | /layers/render_pass_state.cpp | C++ | cpp | 18,683 | permissive | /* Copyright (c) 2015-2022 The Khronos Group Inc.
* Copyright (c) 2015-2022 Valve Corporation
* Copyright (c) 2015-2022 LunarG, Inc.
* Copyright (C) 2015-2022 Google Inc.
* Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "L... |
2285c2bf0bab1f31810bd31a2ec97ebb658da834 | 03da1d64a585194ca6360c51fba2fc495062f14b | caxapexac/IronsphereServer | /src/native/states/playing.cpp | C++ | cpp | 2,216 | no_license | #include "playing.hpp"
#include "choosing.hpp"
#include "holding.hpp"
#include "../online/session.hpp"
states::playing::playing (online::session& context) : session(context) { }
const std::string& states::playing::type () const {
return j_playing::type;
}
void states::playing::game_update (json& output) {
s... |
ed3506423cce019dff199b3d99a92e8b62c416d0 | 54991ae7bbf8ae7fd544f6f5e54b6ae78d0f3a5f | on1659/DiretX12 | /Source/MaterialColors.cpp | C++ | cpp | 354 | no_license | #include "stdafx.h"
#include "MaterialColors.h"
CMaterialColors::CMaterialColors() : Object()
{
m_d3dxcAmbient = XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f);
m_d3dxcDiffuse = XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f);
m_d3dxcSpecular = XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f);
m_d3dxcEmissive = XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f);
}
CMateria... |
b28d0c844fd2721d882422e945c5b06459a3a3d9 | b72ead5b2c28c66b4e2aea5dfd65c25c7df03c54 | jacekgawron98/SDIZO_GraphAlgorithms | /MatrixGraph.cpp | C++ | cpp | 10,473 | no_license | #include "MatrixGraph.h"
#include "helperFunctions.h"
#include <cstdlib>
MatrixGraph::MatrixGraph(int size) {
start = 0;
this->size = size;
matrix = new int*[size];
for (int i = 0; i < size; i++) {
matrix[i] = new int[size];
for (int j = 0; j < size; j++) {
matrix[i][j] = 0;
}
}
}
MatrixGraph MatrixGrap... |
bbe2ffa278509eb307280006acb147c2aeedddc5 | ef176fdc86f0dbd9520ccf1c16affaa19ecb1535 | liuqingtao/linuxnetprogram | /ipc/msg_recv.cpp | C++ | cpp | 1,174 | no_license | /*
* @Author: lqt
* @Date: 2018-04-23 21:18:28
* @Last Modified by: lqt
* @Last Modified time: 2018-04-23 21:18:28
*/
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <unistd.h>
#include<errno.h>
#include<cstdio>
#include<cstdlib>
#include<string>
#define ERR_EXIT(m)\
do\
{\
per... |
5e87c8dadde6b573d6178a76edd5361f051e38cd | 61bcdceae7023b7e216a187b0312acc415a90a9e | chakracoin/chakracoin-master | /src/bitcoinrpc.cpp | C++ | cpp | 46,296 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... |
d7a9fd56fef11fa5067966fdd1b04194dc3276cf | f75bb8cc0de018c21d9f94b99b267cabbcf34711 | regiomontan/canonical | /muparser/muParserBytecode.cpp | C++ | cpp | 21,109 | no_license | /*
__________
_____ __ __\______ \_____ _______ ______ ____ _______
/ \ | | \| ___/\__ \ \_ __ \/ ___/_/ __ \\_ __ \
| Y Y \| | /| | / __ \_| | \/\___ \ \ ___/ | | \/
|__|_| /|____/ |____| (____ /|__| /____ > \___ >|__|
\/ ... |
7039079bfa3fc5288677d200e51a287c20e3262b | 728bf2bce7c8ad69b1d0a3240dab60849b8707af | ThyPandaKing/Final-450 | /Dynamic Programming/08-friend pair problem.cpp | C++ | cpp | 424 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
const int mod = 1000000007;
int countFriendsPairings(int n) {
long a1 = 1, a2 = 1;
for (int i = 2; i <= n; i++) {
int temp = a2;
a2 = (a2 % mod + ((i - 1) % mod * a1 % mod) % mod) % mod;
... |
2c7a9614ef275b6f36035b49562729a046f9128f | d7e5e42a2334b139a89fc7a8645edf83888052f8 | Wiladams/ndt | /projects/loopy/loopy.cpp | C++ | cpp | 1,745 | permissive | /*
This demonstrates a minimal application, using only apphost.h
In this particular demo, we're just clearing the app window
and drawing a line, which is rotated each time through the loop.
onLoad() - this is called by the application runtime after
dynamic functions are loaded, and before the main loop runs
on... |
4de2f4afde429720643ec9d0da49d06292b77f14 | 0af377692cc90dc2bfe67d6e187e04e172648b34 | 543877815/algorithm | /leetcode周赛/5509. 避免重复字母的最小删除成本.cpp | C++ | cpp | 807 | no_license | // 滑动窗口
// 时间复杂度:O(n)
// 空间复杂度:O(1)
class Solution {
public:
int minCost(string s, vector<int> &cost) {
int n = s.size();
if (n == 0) return 0;
int left = 0, right = 0, sum = 0;
while (left < n && right < n) {
if (right < n && s[right] != s[right + 1]) {
r... |
dfab9667e8f1eaf1efffc9ce2f21c83b21be33a9 | 811430d4ef7761c04e32da5cc3a1c688cf7ebd9f | yoshi5534/schorsch-the-robot | /src/Control2012/libreoffice/com/sun/star/corba/TCKind.hpp | C++ | hpp | 1,055 | no_license | #ifndef INCLUDED_COM_SUN_STAR_CORBA_TCKIND_HPP
#define INCLUDED_COM_SUN_STAR_CORBA_TCKIND_HPP
#include "sal/config.h"
#include "com/sun/star/corba/TCKind.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "osl/mutex.hxx"
namespace com { namespace sun { namespace star { namespace corba {
... |
587c909be505a945047bd630ae48bbc133aa6393 | d6d713dd290ab252bd995d200c039b1b0965c13f | pavahora/rocSOLVER | /library/src/lapack/roclapack_syevd_heevd_strided_batched.cpp | C++ | cpp | 8,327 | permissive | /* ************************************************************************
* Copyright (c) 2021 Advanced Micro Devices, Inc.
* ************************************************************************ */
#include "roclapack_syevd_heevd.hpp"
template <typename T, typename S, typename W>
rocblas_status rocsolver_syev... |
59280ec946cb35a484c455cb29ec3ad6af597c3f | 50cdaf5eec2482b020fdf0d8794228a7d2997bdd | truthcoin/truthcoin-cpp | /src/test/accounting_tests.cpp | C++ | cpp | 4,320 | permissive | // Copyright (c) 2012-2014 The Bitcoin Core developers
// Copyright (c) 2015 The Truthcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet.h"
#include "walletdb.h"
#include <stdint.h>
#include ... |
c23394d6dfdc5da9572075967f09d8125cc13c5f | 367f4fb589d4095a2fa25f4e830e7042bca91f10 | KushRohra/GFG_Codes | /Basic/Binary Search.cpp | C++ | cpp | 272 | no_license | int bin_search(int A[], int left, int right, int k)
{
int mid;
while(left<=right)
{
mid=left+(right-left);
if(A[mid]==k)
return mid;
else if(A[mid]>k)
right=mid-1;
else left=mid+1;
}
return -1;
}
|
734286bef04c3f25111cf5b6c92fe8d29bfabfd6 | 5aa61b3f9764de24b43ef7a2b1016c0d290b95c3 | gerisa96/fireworks | /Particle.cpp | C++ | cpp | 820 | no_license | /*
* Particle.cpp
*
* Created on: 6 Nov 2018
* Author: geri
*/
#include "Particle.h"
#include <math.h>
#include <stdlib.h>
namespace geri {
Particle::Particle(): m_x(0),m_y(0) {
init();
}
Particle::~Particle() {
// TODO Auto-generated destructor stub
}
void Particle::init(){
m_x... |
3dbc15855f26f7586f2dfb7abd97359856e4c511 | 1a85fe2c890422670cf77d3426246ab325bface2 | Adrikikicp/BetterEdit | /tools/ContextMenu/ContextMenu.hpp | C++ | hpp | 19,382 | permissive | #pragma once
#include "../../BetterEdit.hpp"
#include "../CustomKeybinds/SuperMouseManager.hpp"
#include "../CustomKeybinds/SuperKeyboardManager.hpp"
#include "../CustomKeybinds/KeybindManager.hpp"
class ContextMenu;
class CustomizeCMLayer;
#define ANYLABEL_TYPE(_type_) \
protected: ... |
734468bd602256f12cd07f4be1f8800901e838b2 | 87c4917ac410134cef803687ed29c383e77092f1 | wolfxpack/wolf | /src/hdchain.cpp | C++ | cpp | 6,738 | permissive | // Copyright (c) 2014-2017 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
#include "base58.h"
#include "bip39.h"
#include "chainparams.h"
#include "hdchain.h"
#include "tinyformat.h"
#include "util.h"
#include "utilstrencodings.h"
bool CHDChain::SetNull()
{
LOCK(cs_ac... |
9033598b17713903cfbfdfb3e5e30b4b15fb5b60 | ced6ef30dc355810c16df21b00726df0f63f5de5 | kashev/rngs | /code/xorshift.cpp | C++ | cpp | 919 | permissive | /*
* rngs
* ECE 541 Project 2
* Kashev Dalmia - dalmia3
* David Huang - huang157
*/
#include "xorshift.h"
namespace rng
{
Xorshift::Xorshift() :
RandomNumberGenerator(),
x(0),
y(0),
z(0),
w(0)
{}
void Xorshift::seed(fuint seed_num) {
... |
ab1a4d695b243a56b950669237cd31d3a7804ad3 | 375b1393bbe367048ca9d117de00edb1b376cb92 | kartikey2807/cpp-codes | /cdf_520_div2_a.cpp | C++ | cpp | 2,365 | no_license | // みなさん私はカーティキー・シャルマです。LNMIITで勉強しています。私は2年目で、コロナパンデミックが発
// 生しています。世界は終わりそうだ。だから私はそれを最大限に生きたいと思っています。それはつまり、コー
// ドを最大限に意味しているのです。私の好きなアニメは「キメツノヤイバ」で、私の一番の男の子はゼニツで、
// 私の一番の女の子はネズコです。私の好きな呼吸スタイルは息吹です。私の最高の悪魔の血の芸術は、
// ククシボによって使用される月の息です。ムーザンは亡くなり、今ではタンジローがポップの新しい魔王です。
#include <bits/stdc++.h>
#include <set>
#include <m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.