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 |
|---|---|---|---|---|---|---|---|---|
2dfc396a703eb7d9d60715061515ba44eb55c0d0 | 143267af69e52594de30039e7889b0cb72923e9f | ttblue/sandbox444 | /surgicalGUI/src/SurgicalGUI.cpp | C++ | cpp | 3,168 | no_license | /** Author: Ankush Gupta
Date : 14th August 2012 */
#include "SurgicalGUI.h"
/** Default constructor. */
SurgicalGUI::SurgicalGUI(ImageCommunicator * img_comm,
ROSCommunicator * ros_comm,
QWidget *parent) : QMainWindow(parent),
_ros_comm(ros_comm),
_image_comm(img_comm),
create... |
383156afb62b0dcddb470d03aba3b202432b9626 | 14e94cc48da3b13634c79e8b908e103ee790b89e | voxie-viewer/voxie | /src/PluginVisSlice/MakeHandButton.hpp | C++ | hpp | 1,509 | permissive | /*
* Copyright (c) 2014-2022 The Voxie Authors
*
* 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, mer... |
052e68f82778b4d4821c9c2c2013ff9ff28727cb | 48d59bd243327e9aa230f8c47752b5de90b39785 | thoKling/InfectedPrisonClient | /HUD.cpp | C++ | cpp | 2,087 | no_license | #include "HUD.h"
#include "TextureManager.h"
sf::Sprite HUD::_spriteHeart;
sf::Sprite HUD::_spriteAmmo;
unsigned int HUD::_lives;
unsigned int HUD::_ammo;
unsigned int HUD::_currentWave = 1;
unsigned int HUD::_zombiesLeft = 0;
sf::Font HUD::_font;
sf::Text HUD::_txtWave;
sf::Text HUD::_txtZombiesLeft;
void HUD::init... |
a8052ecbcd48151ad14e1514a48a9a2831d77b01 | a5c0fceaa06c411e22340cda566245d3d318470b | danielsefton/Dangine | /Engine/Systems/src/SoundSystem.cpp | C++ | cpp | 1,578 | permissive | //------------------------------------------------------------------------------
// Created by Daniel Sefton
//------------------------------------------------------------------------------
#include "Platform/StableHeaders.h"
#include "Systems/SoundSystem.h"
#include "Util/Entity/SystemManager.h"
#include "Ut... |
22979703bb95ac10ba37b676aac3d6a8f4b64c9f | 9c946d2e83f4eeeaab63d784213d165c019b8e54 | JayBeavers/mozolm | /mozolm/grpc/server_helper.cc | C++ | cc | 2,050 | permissive | // Copyright 2021 MozoLM Authors.
//
// 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... |
f7103dfc6189b7896829f0a72bb18b79407cb4a0 | 3d82d92a3ce15dc1fddf1a1b35547f34edcd59a8 | hmkey/Game_4_Repo | /Heather_Key_Game_4/GameManager.cpp | C++ | cpp | 6,698 | no_license | #include "GameManager.h"
#include "RenderManager.h"
#include "ResourceManager.h"
#include "LogManager.h"
#include "InputManager.h"
#include "AudioManager.h"
#include <stdlib.h> //atoi, atof (actual include not needed?)
void GameManager::playAudio(uint32 audio_id, uint32 num_repeats)
{
//check to make sure the aud... |
4695604bf3bf1d9c1cdb905599b1419f16c0f743 | 8a897a9ab5269bd309ba73ebb3a1768d393559cf | Hydeon-git/PlatformerGame | /Game/Source/Checkpoint.cpp | C++ | cpp | 3,020 | permissive | #include "Defs.h"
#include "Log.h"
#include "App.h"
#include "Render.h"
#include "Scene.h"
#include "Player.h"
#include "Checkpoint.h"
Checkpoint::Checkpoint() : Entity(EntityType::CHECKPOINT)
{
name.Create("checkpoint");
//animations
unchecked.PushBack({ 0, 0, 32, 32 });
unchecked.speed = 0.2f;
unchecked.loop =... |
694747a081cc5b20561bf1b60713a97f955f17ae | b9be430e7b5d7514e785127ab49401e85a7b9c81 | Gamez0/INHA-assignment | /problemsolving/시험대비/3차시험/w4cake.cpp | C++ | cpp | 1,239 | no_license | #include <iostream>
#include <map>
using namespace std;
map<int, int> m_a, m_b;
void get_map(int *array, map<int, int>& m, int size) {
for (int i = 1; i < size; i++) {
for (int j = 0; j < size; j++) {
int sum = 0;
for (int k = 1; k <= i; k++) {
if (j + k - 1 >= size) {
sum += array[j +... |
3fba45595606eea32b29fb28a969ade353b35b9f | 4f42fdd0a1cf4e08e07eda8b429c0afb254f0a77 | shanmukh1608/Relational-Database | /src/utils.cpp | C++ | cpp | 367 | permissive | #include "global.h"
string trim(const string& str, const string& whitespace) {
const auto strBegin = str.find_first_not_of(whitespace);
if (strBegin == std::string::npos)
return ""; // no content
const auto strEnd = str.find_last_not_of(whitespace);
const auto strRange = strEnd - strBegin + 1... |
24bac2ae8d80ce8f4b1b892142043ded624720b8 | 6b66fc3f98d2eca8df6e500bc3edeecf1d9e4ddc | niuxu18/logTracker-old | /second/download/mutt/gumtree/mutt_repos_function_175.cpp | C++ | cpp | 931 | no_license | int safe_open (const char *path, int flags)
{
struct stat osb, nsb;
int fd;
if (flags & O_EXCL)
{
char safe_file[_POSIX_PATH_MAX];
char safe_dir[_POSIX_PATH_MAX];
if (mutt_mkwrapdir (path, safe_file, sizeof (safe_file),
safe_dir, sizeof (safe_dir)) == -1)
return -1;
if ((fd = op... |
3334f14adad87cc129743970a31978da08bbfd86 | fa9c649aee6142adb38a103f35cc807e222bf1dd | tempbottle/rocksdb-windows | /util/env_win.cc | C++ | cc | 44,196 | no_license | // Copyright (c) 2013, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
// Copyright (c) 2011 The... |
5313263294a42b59e4a8bf2c77722cd68e87e219 | d99b9805cd2cffbecaea23fd7c9a1c0411e57607 | yunuscevik/CSE241_Object_Oriented_Programming_2017 | /HW2-ConnectFour_CPP/code/main.cpp | C++ | cpp | 20,898 | no_license |
/*
* File: main.cpp
* Author: Yunus ÇEVİK
*
* Created on 27 Eylül 2017 Çarşamba, 17:45
*/
#include <iostream>
#include <string>
#include <limits>
#include <random> // C++11 ile gelen bir library
#include <fstream>
using namespace std;
const int SIZE = 20;
struct gameInformation{
char board[SIZE][SIZE];
... |
5fffc2ace74a4ff9d60b8cac65ca495a98f7722d | 925a8e8a9492c09c5c60395280b0f68730ecf087 | xtblock/chromium | /net/spdy/spdy_http_stream_unittest.cc | C++ | cc | 47,071 | 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 "net/spdy/spdy_http_stream.h"
#include <stdint.h>
#include <string>
#include "base/bind.h"
#include "base/run_loop.h"
#include "base/stl_u... |
5c3d15140fdb5dd8ba5a59788f5ddec3e8b7430b | e32257f19f04e9f6972e94715747ed3395dd38a2 | libamqp/libamqp | /src/LibAmqp/Transport/LowLevel/ListenerTest.cpp | C++ | cpp | 4,811 | permissive | /*
Copyright 2011-2012 StormMQ Limited
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 ... |
d3d6e2fcabfbac1e80de95b07ea1ff33cf32271b | b7652fb5f0152661997330ebf08114672f4df8fe | chavezcoin-project/altcoin-template | /src/qt/bitcoingui.cpp | C++ | cpp | 30,194 | permissive | // Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <QApplication>
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "optionsdialog.h"
#include "abou... |
adee68a3d2b3eceb4168aefb4a81921d8a0cf0a0 | 797ba108a523dd91fc484c6b833d6325ee65a7e1 | fcccode/RendererLib | /source/Renderer/GlRenderer/Src/Command/Commands/GlDrawIndexedIndirectCommand.cpp | C++ | cpp | 1,106 | permissive | /*
This file belongs to GlRenderer.
See LICENSE file in root folder.
*/
#include "GlDrawIndexedIndirectCommand.hpp"
#include "Buffer/GlBuffer.hpp"
namespace gl_renderer
{
DrawIndexedIndirectCommand::DrawIndexedIndirectCommand( renderer::BufferBase const & buffer
, uint32_t offset
, uint32_t drawCount
, uint32_... |
876e2e9198c6b4dbf5b2d56d2b59eddf0a2b4ccb | 7eb6cdadea5f80f7ad3bb58198b60fea0bcceb3a | eRose-DatabaseCleaning/Sources-non-evo | /engine/src/zz_algebra.cpp | C++ | cpp | 39,133 | no_license | /**
* @file zz_algebra.h
* @brief algebra classes and functions
* @author Jiho Choi(zho@korea.com)
* @version 2.0
* @date 12-jun-2002
* $Header: /engine/src/zz_algebra.cpp 7 04-09-01 2:59p Zho $
* $History: zz_algebra.cpp $
*
* ***************** Version 7 *****************
* User: Zho ... |
8c98db58aa814fa811bdf18f4194fcb90cbf7741 | 7954fc859cb11b4a991b5941293eeae260f77bad | f13end/NSABlocklist | /Documents/Vault 7/Marble Framework/devutils/marble/Marbler/MBL_CLASS_XOR4.cpp | C++ | cpp | 1,836 | permissive | #pragma once
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "MBL_CLASS_XOR4.h"
MBL_CLASS_XOR4::MBL_CLASS_XOR4(void)
{
srand(time(NULL));
cKey = (unsigned char)(rand() % 255 + 1); //+1 so we don't XOR with 0
wcKey = (wchar_t)(rand() % 65534 + 1); //+1 so we don't XOR with 0
... |
8a164fbc9c55104819fa922c5cd7708abc51c62e | fad5fdfbd4c0005553162055c284dcb3219fa619 | lazerhawk/ngraph | /src/ngraph/op/avg_pool.cpp | C++ | cpp | 12,997 | permissive | //*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// 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://w... |
6d21e442b7205d9cf4233eeaade7ff8ffd088cf1 | 64c62585b2c7998328c905c32eeed5c23d49a36e | niyaznigmatullin/nncontests | /utils/IdeaProject/archive/unsorted/2015.05/2015.05.03 - Yandex Algorithm 2015 Warm up Round/a.cpp | C++ | cpp | 734 | no_license | #include <bits/stdc++.h>
int a[1234][1234];
int main() {
int n, m, k;
scanf("%d%d%d", &n, &m, &k);
for (int i = 1; 2 * i <= k + 1; i++) {
for (int v = 0; v < n; v++) a[v][(v + i) % n] = a[(v + i) % n][v] = 1;
}
if (k & 1)
for (int i = 0; i + 1 < n; i += 2) a[i][i + 1] = ... |
373bdfbaecf020cb781ab97df0f81c8c02aef509 | a3b046f640afcadbb97bdd5cec8433913a05caed | clarisli/FCND-Controls | /cpp/src/QuadControl.cpp | C++ | cpp | 8,664 | no_license | #include "Common.h"
#include "QuadControl.h"
#include "Utility/SimpleConfig.h"
#include "Utility/StringUtils.h"
#include "Trajectory.h"
#include "BaseController.h"
#include "Math/Mat3x3F.h"
#ifdef __PX4_NUTTX
#include <systemlib/param/param.h>
#endif
void QuadControl::Init()
{
BaseController::Init();
// variab... |
cb0f5b1db1d49a81505a78f7ee15b813565e01b2 | badcf76003af44a0818d41bc666f3b2f1a391b09 | DDan1l232/SoT-SDK | /SDK/SoT_BP_VotableVoyageProposal_parameters.hpp | C++ | hpp | 2,305 | no_license | #pragma once
// Sea of Thieves (2.0.17) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_BP_VotableVoyageProposal_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------... |
4187a431082191e0324d6a364bf6d11d362c07d3 | f99453e183fa4a08d3d1832177dcd46d1b463622 | Fneger/ArkPro | /Launcher/UserInterface/MainWidget/AVWidget/AV2Widget/AV2Widget.cpp | C++ | cpp | 6,879 | no_license | #include "AV2Widget.h"
#include "AutoConnect.h"
#include "UserInterface/Common/MessageBox.h"
#include "UserInterface/Common/Utility.h"
#include "EventEngine.h"
#include "BusinessLogic/Common/BusinessLogicUtility.h"
#include "UserInterface/Common/BmpWidget.h"
#include <QPainter>
#include <QTimer>
#include <QDebug>
#incl... |
3b9a0675ecbb9cfa3b08be8b5fc21faa238be668 | ef24f0100909dc5427ed01ec9b0f4afa825409b5 | HomeschoolTech/Spring20 | /Chapter19/Programming/Drill/drill.cpp | C++ | cpp | 691 | no_license | #include "vector"
#include "string"
#include "iostream"
#include "typeinfo"
using namespace std;
template <typename T>
struct S{
S(T value);
void print();
T& get();
S operator=(const T& x);
private:
T val;
};
template<typename T>
S<T>::S(T value): val(value) {}
template <typename T>
S<T> S<T>::operator=(const T&... |
3c00cd63d7de3f5505d18e4cd05093496dd482b9 | 1a2526a03a6f39fb0864c881745c498dcc52becd | lineCode/wasmview.github.io | /Source Code/server/binaries/chromium/gen/third_party/blink/renderer/bindings/modules/v8/v8_gpu_rasterization_state_descriptor.cc | C++ | cc | 8,711 | no_license | // 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.
// This file has been auto-generated from the Jinja2 template
// third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl
// by the script code... |
1bd80910928593895f9623bf4f77b34b79d67f63 | afe94ea2e0c6ddbce0164b97d8b56520a883df03 | groggi/eth-algolab | /even-pairs/main.cpp | C++ | cpp | 560 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main(void)
{
int n;
cin >> n;
vector<int> elems(n);
for(int i = 0; i < n; i++) {
cin >> elems.at(i);
}
int even = 0;
for(int start = 0; start < n; start++) {
for(int end = start; end < n; end++) {
... |
6ca9985147569a4380976d041b01ad0e21ff3692 | ee10c3947758c8bc0769cbc27a056ed9e52926d6 | chadvoegele/kalah-ncurses | /src/storeContainer.cpp | C++ | cpp | 1,059 | permissive | #include "storeContainer.hpp"
storeContainer::storeContainer()
{
setSeedCount(0);
}
storeContainer::storeContainer(unsigned int initialSeedCount)
{
setSeedCount(initialSeedCount);
}
storeContainer::storeContainer(const storeContainer& storeContainerOther)
{
seedCount = storeContainerOther.getSeedCount();
nex... |
09ee37db3ac7d37799c4b80258785af6a98a0768 | a5f9b96400be60f36687c0b7aad92b2ecabfce25 | dmarcini/GA-TSP | /src/main.cpp | C++ | cpp | 1,399 | permissive | #include <vector>
#include <string>
#include <fstream>
#include <iostream>
#include <utility>
#include "menu.hpp"
#include "genetic_algorithm.hpp"
std::vector<std::vector<int>> load_data(const std::string &path)
{
std::ifstream ifs(path);
std::vector<std::vector<int>> matrix;
int size;
ifs >> size;... |
39e7ea5e8e7b162ef363df19312b495267f4aede | 61238ed67ac126b390ffb79e13714997addb0f6d | fwar34/DataStruct | /Sartaj2nd/exercise-solutions/codes/twothree.cpp | C++ | cpp | 4,471 | no_license |
#include <iostream.h>
#include "twothree.h"
void main(void)
{
// define a 2-3 tree with null element 0
TwoThree<int,int> y(0);
// first test insert and ascending output
y.Insert(21).Insert(29).Insert(30);
cout << "Elements in ascending order are" << endl;
y.Ascend();
cout << "Elem... |
aae4e3588c64ddaf8b4c9e6e2d8edfee40710087 | 7fede84af79184283b6ec590fa4f3268e7b0ab71 | phutruonnttn/CPP_Code_Giai_Thuat | /CLUSTER/CLUSTER.cpp | C++ | cpp | 1,368 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef pair <long, long> ii;
long long n,k,d[250][250],l=0,r=-1,ans,dd[250];
vector <ii> a[250];
vector <long> adv[250];
void dfs(long u)
{
dd[u]=1;
for (long i=0; i<adv[u].size(); i++)
if (dd[adv[u][i]]!=1)
dfs(adv[u][i]);
}
b... |
c52626a8369f07f32c2a454dcad34908f64448ed | f7d764abaab6992af09a9c328d2a2c37b5f95f85 | re7za/Clash-Of-Heroes | /possible implementation/possible implementation.cpp | C++ | cpp | 826 | no_license | // possible implementation.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 f... |
73caef2e9f64023dab962a82a5419d98d63f4920 | e8bb10c308a0d343febb3e5d3bbe50c902cc1b9f | leixd1994/-C- | /lianbiao.cpp | C++ | cpp | 681 | no_license | #include <stdio.h>
#include <malloc.h>
struct Student
{
int num;
char s;
struct Student *next;
} ;
void main()
{
struct Student *p,*head,*q;
p=(struct Student *)malloc(sizeof(struct Student));
p->num=15;
p->s='m';
head = p;
p=(struct Student *)malloc(sizeof(struct Student));
head->next=p;
... |
83043849d698d03f518db5abfe074c24f2abd8a6 | 8c0a5a65b4f1643b6154e8de89cbc3faf1819f44 | vrdabomb5717/SnapShot | /sql/getURLByCat.cpp | C++ | cpp | 1,658 | permissive | /*
* getURLByCat.cpp
* Return detailed info on URLs in the specified category.
* Note that comments are excluded from the data returned.
*
* Note that the first line is not an error code specifier (i.e. 1 or 0).
* I just return the data from the DB. However, if an error occurs in processing
* request, I warn you... |
80142fd6bf41deaf6776007489a7f212687e4b72 | 5769f34596773ec67ea7e8d151e0768e7bf374d8 | JackBro/TVision | /source/linuxx.cpp | C++ | cpp | 67,691 | permissive | /* $Id: //depot/ida/tvision/source/linuxx.cpp#11 $ */
/*
* system.cc
*
* Copyright (c) 1998 Sergio Sigala, Brescia, Italy.
* 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. Redistrib... |
fe22577c938ef619360f02b105f1089207ba8a17 | 7e6d69fa1ecb93bd0819540635daed7a10612a68 | thejinchao/AxTrace | /axtrace/AT4_ChildWnd_Value.cpp | C++ | cpp | 8,199 | no_license | /***************************************************
AXIA|Trace4
(C) Copyright thecodeway.com 2023
***************************************************/
#include "stdafx.h"
#include "AT4_ChildWnd_Value.h"
#include "AT4_Message.h"
#include "AT4_ChildInterface.h"
#include "AT4_System.h"
#include "AT4_MainWindow.h... |
324197e0987d0698a60f418fc4306f5f53015b85 | 940a04482792a45138570dd71343fa4bd5fa594e | github188/SClass | /src/IO/GPIOControl_AllwinnerH6.cpp | C++ | cpp | 13,803 | no_license | #include "Stdafx.h"
#include "MyMemory.h"
#include "IO/GPIOControl.h"
#include "IO/PhysicalMem.h"
#include "Sync/Interlocked.h"
#include "Sync/Thread.h"
#include "Text/MyString.h"
// Allwinner H6
#define GPIO_BASE_MAP (0x0300B000)
#define GPIOL_BASE_MAP (0x07022000)
typedef struct
{
IO::PhysicalMem *... |
391606dc2736bbfdb834387e2808edb044ee40a0 | b31262ad9045c0b8e15e2587b2a96f4868f30ff4 | kangyuuu/COOLServer | /code/server/epoller.cpp | C++ | cpp | 1,136 | no_license | #include "epoller.h"
Epoller::Epoller(int maxEvent):epollFd_(epoll_create(512)), events_(maxEvent){
assert(epollFd_ >= 0 && events_.size() > 0);
}
Epoller::~Epoller() {
close(epollFd_);
}
bool Epoller::AddFd(int fd, uint32_t events) {
if(fd < 0) return false;
epoll_event ev = {0};
ev.data.fd = fd... |
6ee027d237b98a2f8e2e56cf0d7c76363d5c2aba | 66b076a2b60ab7559cdb28847a3677e8a87d3aea | tudasc/CUAS-MPI | /test/cuascore/integration/exactSteadySolutionTest.cpp | C++ | cpp | 7,995 | permissive | /**
* File: exactSteadySolutionTest.cpp
* License: Part of the CUAS-MPI project. Licensed under BSD 3 clause license. See LICENSE.txt file at
* https://github.com/tudasc/CUAS-MPI/LICENSE.txt
*/
#include "exactSteadySolutionTest.h"
#include "CUASArgs.h"
#include "CUASSolver.h"
#include "timeparse.h" // CUAS::Time,... |
877733a5821a7f02f7ac3dbd6dabfed63bea49e9 | 810a0e93ac5d2159ef9fb6e64f9405c681c1cc21 | li5ch/tencentcloud-sdk-cpp | /tsf/src/v20180326/model/TsfPageConfig.cpp | C++ | cpp | 3,567 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
412061c72f54512639570aabe1ff9036b5b0ae8f | 7ad287d9be5dd24558c7b9cb92bc4147a6333e31 | hulucc/hadesmem | /examples/dump/bound_imports.cpp | C++ | cpp | 4,788 | permissive | // Copyright (C) 2010-2015 Joshua Boyce
// See the file COPYING for copying permission.
#include "imports.hpp"
#include <iostream>
#include <iterator>
#include <hadesmem/pelib/bound_import_desc.hpp>
#include <hadesmem/pelib/bound_import_desc_list.hpp>
#include <hadesmem/pelib/bound_import_fwd_ref.hpp>
#in... |
37b25fc56dd9ed4a72a0c8e8e0fe85db60529850 | ce61037f421a61b4d82445a20bc4f94e16f79c3e | JacobJaffe/graphics | /labs/lab03/solarSystem.cpp | C++ | cpp | 1,985 | no_license | #include <GL/glui.h>
#include "solarSystem.h"
solarSystem::solarSystem(){
}
solarSystem::~solarSystem(){
}
// Render this with push and pop operations
// or alternatively implement helper functions
// for each of the planets with parameters.
void solarSystem::render(){
// Some ideas for constants... |
e0244546c043d814e716d14c9d92a49b8dc4c755 | b6e88e441bb97d46b4661d03df13e1777d4f24be | redpanda321/Icefox | /ios5/mozilla-central/toolkit/crashreporter/google-breakpad/src/common/md5.cc | C++ | cc | 7,804 | permissive | /*
* written by Colin Plumb in 1993, no copyright is claimed.
* This code is in the public domain; do with it what you wish.
*
* Equivalent code is available from RSA Data Security, Inc.
* This code has been tested against that, and is equivalent,
* except that you don't need to include two pages of legalese
* w... |
dd4a70c32a871bc3a11c2a1aab3f5790040af50a | 39ed17d3c87506d14de7c5b082a9ef2a966910ba | TWiG-US420/ExileCrafting | /addons/crafting/ExileCrafting.hpp | C++ | hpp | 32,746 | no_license | class CookBBQSandwich: Exile_AbstractCraftingRecipe
{
name = "Cook BBQ Sandwich";
pictureItem = "Exile_Item_BBQSandwich_Cooked";
requiresFire = 1;
returnedItems[] =
{
{1, "Exile_Item_BBQSandwich_Cooked"}
};
tools[] =
{
"Exile_Item_CookingPot"
};
components[] =
{
{1, "Exile_Item_BBQSandwich"}
};
cat... |
f0fb4c15d1449386e03f835fd3fa2e1a8dcb6dd2 | b7defff05c880b16753e9cd3a9508670493cd37e | Danielgcosta/Projects | /Medusa2/Medusa2/sensor.cpp | C++ | cpp | 239 | no_license | #include "Sensor.h"
Sensor::Sensor(int port)
{
_port = port;
}
Sensor::~Sensor()
{
}
int Sensor::getPort()
{
return _port;
}
void Sensor::setPort(int port)
{
_port = port;
}
float Sensor::getValue()
{
evaluate();
return _value;
} |
12dd4857933ed82238283bd17d7ab378eb0e1d02 | 777dfa63d13480c359530f306452260e6432da72 | fytzzh/omniscidb | /QueryEngine/GpuMemUtils.cpp | C++ | cpp | 12,791 | permissive | /*
* Copyright 2017 MapD Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
83f1cb5c92f3a065a7daa39cc689f514efde5f27 | 83b31cf422bf79a1961c12ef6974dc3543936518 | loganwhite/S6 | /user_source/samples/objects/udp_counter_128B.hh | C++ | hh | 838 | no_license | #ifndef _UDP_COUNTER_128B_OB_HH_
#define _UDP_COUNTER_128B_OB_HH_
#include <rte_config.h>
#include <rte_ether.h>
#include <rte_ip.h>
#include "dist.hh"
#include "object_base.hh"
class UDPCounter128B : public SWObject {
private:
uint32_t svr_ip;
uint32_t cli_ip;
uint16_t svr_port;
uint16_t cli_port;
uint32... |
31be5bad918ebe77687c6855b36bbb1c8e98ba03 | 7a2c3cb2f2127266636029401c57ffc57d9d81a4 | bithacks-tech/myeosio | /libraries/utilities/include/myeosio/utilities/tempdir.hpp | C++ | hpp | 230 | permissive | /**
* @file
* @copyright defined in myeosio/LICENSE.txt
*/
#pragma once
#include <cstdlib>
#include <fc/filesystem.hpp>
namespace myeosio { namespace utilities {
fc::path temp_directory_path();
} } // myeosio::utilities
|
be97b2bce392e06aeb55ce46170a4cf947e1c341 | 73b8692d7c82b972c0fef5b09276fa3cadf8d2a5 | Kiritow/OJ-Problems-Source | /HDOJ/3401_autoAC.cpp | C++ | cpp | 2,163 | no_license | #include <cstdio>
#include <cstring>
const int MAXN = 2000 + 123;
int ap[MAXN], bp[MAXN], as[MAXN], bs[MAXN];
int f[MAXN][MAXN];
struct node
{
int num, val;
}q[MAXN];
inline int min(int x,int y)
{
return x<y?x:y;
}
inline int max(int x,int y)
{
return x>y?x:y;
}
int main()
{
int T;
... |
cde549ef022aacfc99a209ea512772c2cd654305 | b6c9826f83169c4c2532573f0a87dca0bf909c25 | mengzhenp/leetcode | /dynamic_programming/321. Create Maximum Number/dp+greedy.cpp | C++ | cpp | 3,648 | no_license | class Solution {
public:
vector<int> maxNumber(vector<int>& nums1, vector<int>& nums2, int k) {
int l1 = nums1.size();
int l2 = nums2.size();
vector<int> ans(k, INT_MIN);
vector<vector<int>> ans1;
vector<vector<int>> ans2;
if (k == l1 + l2) {
... |
52fba3cedac9bd881a1f95c185701b286a283e82 | 5c2b979d4ee9746587196b468df9b35b5c078319 | sivakannang/projects | /c++/coding_questions/c_cpp_code_review_questions/cppcode/cppreview2.cpp | C++ | cpp | 942 | no_license | #include <iostream>
#include <cstring>
using namespace std;
class A
{
public:
virtual void printA()
{
cout << endl << "Printing A";
}
};
class B
{
public:
virtual void printB()
{
cout << endl << "Printing B";
}
};
class C : public A, public B
{
public:
virtual void print... |
a1524ae37d91154d689bf584b6dc7afb33b98e31 | 0b0730fe4d73320a48540c79019fef5bcf92691b | Petty12/heguiqunsuanfai | /递归快速排序.cpp | C++ | cpp | 1,013 | no_license | #include <stdio.h>
#include <stdlib.h>
#define N 10
int partition(int arr[], int low, int high){
int key;
key = arr[low];
while(low<high){
while(low <high && arr[high]>= key )
high--;
if(low<high)
arr[low++] = arr[high];
while( low<high && arr[low]<... |
b4628ed5caf64a71c6fc6b878a89984f957b99ad | 997338207db42c2e2f85d0429d7cea80cabb16d0 | OlexiiZinik/simple-CPU-emulator | /Simple 8-bit CPU emulator/src/Bus.cpp | C++ | cpp | 985 | no_license | #include "Bus.h"
Bus::Bus()
{
}
Bus::Bus(Status *s)
{
this->RAM = Memory();
this->status = s;
}
void Bus::connect_cpu(Ox64cmCPU *c)
{
this->cpu = c;
}
void Bus::load_from_file(std::string file_name)
{
// Читаю бинарник сишным способом потому что с++ный способ не работает
FILE* f;
fopen_s(&f, file_name.c_s... |
8162419232cdeace75cf97a04d7e5ca8e561d22a | 05c2141d5b4a183834f008df84879c3cdb3fe66c | Thraix/Greet-Engine-Win | /Greet-core/src/utils/Noise.cpp | C++ | cpp | 3,018 | permissive | #include "noise.h"
#define _USE_MATH_DEFINES
#include <string>
#include <cmath>
#include <logging/Log.h>
namespace Greet {
float* Noise::GenNoise(uint width, uint height, uint octave, uint frequencyX, uint frequencyY, float persistance)
{
uint noiseWidth = (frequencyX << (octave-1)) + 3;
uint noiseHeight = (fr... |
f614477c32105d249a336df038f49377db96df35 | e3c40ec4906cb820a0459d626282bfd577ed344d | os12/pwsafe | /src/ui/Windows/PWPropertyPage.cpp | C++ | cpp | 2,774 | permissive | /*
* Copyright (c) 2003-2016 Rony Shapiro <ronys@pwsafe.org>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
#include "ThisMfcApp.... |
fa0f6c807237df62e0e7fa45ec4c16f778a36c77 | 40510a05c22061c1d953f9805e1e9397ddb9e717 | guj/WarpX | /Source/Particles/Resampling/Resampling.cpp | C++ | cpp | 1,155 | permissive | /* Copyright 2019-2020 Neil Zaim
*
* This file is part of WarpX.
*
* License: BSD-3-Clause-LBNL
*/
#include "Resampling.H"
#include "LevelingThinning.H"
#include "Utils/TextMsg.H"
#include <AMReX.H>
#include <AMReX_ParmParse.H>
Resampling::Resampling (const std::string species_name)
{
const amrex::ParmParse... |
159bbbb5d47a127822e97a84539da7122c988d26 | 9de6d3955b649503fa8c802cc689d3059e577f2e | kushagraagrawal/codeforces-codechef | /Music/git_project2/codeforces/469A.cpp | C++ | cpp | 401 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int flag=0,i,n,p,q,temp,a[101] = {0};
cin>>n;
cin>>p;
for (i=0;i<p;i++)
{
cin>>temp;
a[temp]++;
}
cin>>q;
for(i=0;i<q;i++)
{
cin>>temp;
a[temp]++;
}
for(i=1;i<=n;i++)
{
//cout<<a[i]<<" ";
if(a[i]==0)
{
cout<<"Oh, my keyboard!";
f... |
f473649b394acbe43a46a3b29a48afb497f429ab | c610d5374e79043f7c00c487adca9efd43a44b0a | huurai/2012TeResAI | /2012TeResAI/2012teresAI/draw.cpp | C++ | cpp | 4,005 | no_license | /*全オブジェクトを描画する関数です。*/
#include "Data.h"
void draw(int stage[WIDTH][HEIGHT],AI_T ai[AI_NUM],Tagger tagger){
int view=0;
if(CheckHitKey(KEY_INPUT_V))view=1;// 8/19 zero:Vキーを押していると描画モードが変わります。
static int stageGraph = LoadGraph("Stage_image\\kabe0.png"); //壁の画像読み込み
//数列stageにしたがってマップの描画
for(int i=0;i<WIDTH;... |
c364a0eab0e664fd870c3cd223a406b5e5ee9418 | ce0d69c7742d3893a28890a2e6822189e02c0d2c | wfscs3/chromium | /chrome/browser/safe_browsing/download_protection/deep_scanning_request.cc | C++ | cc | 11,771 | permissive | // Copyright 2020 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/safe_browsing/download_protection/deep_scanning_request.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/... |
a18d6688dde293794eb38a85b918d80ac1f45d62 | 2f42f226341b93130d40832a276de6e245397dd9 | wh61/ACM | /shanghai2014online/epp.cc | C++ | cc | 3,206 | no_license | #include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;
const int maxn = 66;
int n, m, K;
struct point {
int x, y;
point(int x_ = 0, int y_ = 0):x(x_), y(y_) {}
}p[maxn];
typedef long long LL;
LL dist(const point& p1, const point& p2) {
return (LL)abs(p1.x - p2.x) + (... |
2dee13e61314e6f1c684c3d516cebf94521cd758 | 1ed01368db60c6a46ea990e5cc75ffb69b2b3c16 | frbyles/ExcavatorSimulator | /PhysX 3.3.1/Snippets/SnippetSpatialIndex/SnippetSpatialIndex.cpp | C++ | cpp | 5,710 | no_license | // This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation... |
ea8d24d29d2d585fbadf9f00553399ff3ff0523c | 2df1efce929cb62708ed9875b5c6bfc1eb719228 | JieyangChen7/DVFS-MAGMA | /test/magma-1.4.1/testing/testing_dgetrf_mgpu.cpp | C++ | cpp | 9,923 | no_license | /*
-- MAGMA (version 1.4.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
December 2013
@generated d Tue Dec 17 13:18:57 2013
@author Mark Gates
*/
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#in... |
6c17261335832f34cd56c2a6ab068c6ef71fe9f5 | e6541ca466f4d2356095e22cd46d90bbb324c7d7 | lala74/Socket-cpp | /Socket/server.cpp | C++ | cpp | 1,292 | no_license | /* Copyright
* http://www.linuxhowtos.org/C_C++/socket.htm
*/
/* The port number is passed as an argument */
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>
#include <... |
c26de4155e09efddb87d42ef65f36b24a36992e1 | 394657f8e725abce49f6ca79e7babfd5469dd79c | HelioNetwork/Helio | /src/rpc/rawtransaction.cpp | C++ | cpp | 39,234 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2020 The PIVX developers
// Copyright (c) 2020 The Helio Coin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or ht... |
0adc5ee107359e090077fa8d76668c164e6dcb2f | f5e657ac1ab0804fe5287ca5fdda2ff1d808730d | CookiePLMonster/Silent-Hill-2-Enhancements | /Common/FileSystemHooks.cpp | C++ | cpp | 23,491 | permissive | /**
* Copyright (C) 2020 Elisha Riedlinger
*
* This software is provided 'as-is', without any express or implied warranty. In no event will the
* authors be held liable for any damages arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose, including co... |
5ff0a1e2d0fc9612ffce144abecbabe27cfe8885 | d28ffb8745dd51db8e5807623b42eee8dc6310a7 | KDE/kpeoplesink | /src/datasource/kpeoplesink.cpp | C++ | cpp | 3,812 | no_license | /*
* SPDX-FileCopyrightText: 2019 Rituka Patwal <ritukapatwal21@gmail.com>
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "kpeoplesink.h"
#include <QDebug>
#include <QTimer>
#include <sink/notification.h>
#include <sink/store.h>
#include "sinkcontact.h"
#include "sinkdatasource.h"
KPeopleSink::KP... |
93391c05cdcaf54a0da1d63bf8558f42eb316252 | 4e13ae3e3a7df2e80cc04e05c993daad289a4d8a | yufengzhe1/CCF- | /201604_2.cpp | C++ | cpp | 219 | permissive | #include <iostream>
using namespace std;
int main()
{
long long int n;
cin>>n;
int sum=0;
while(n)
{
sum=sum+(n%10);
n=n/10;
}
cout<<sum;
return 0;
}
|
a47700375e797ac6d3a67815bcc6c812cc397681 | 8af805cfd5fc47b23d192ddd3595d55075e1729b | scalphunters/DTIProcessToolkit | /Applications/dtiprocess.cxx | C++ | cxx | 13,047 | permissive | /*=========================================================================
Program: NeuroLib (DTI command line tools)
Language: C++
Date: $Date: 2009/01/21 21:11:49 $
Version: $Revision: 1.7 $
Author: Casey Goodlett (gcasey@sci.utah.edu)
Copyright (c) Casey Goodlett. All rights reserved.
... |
2c1decd38644feffa31496d7c6af4e04f4a81acb | a3553a4bf5c6c11c908100042c4072986393bceb | drclaws/Simple_ClientServer | /client/SessionUdp.cpp | C++ | cpp | 2,751 | permissive | #include "SessionUdp.hpp"
#include <sys/epoll.h>
#include <sys/socket.h>
#include <sys/timerfd.h>
#include <unistd.h>
#include <simple_lib/common.h>
namespace simpleApp
{
SessionUdp::SessionUdp() : SessionClient()
{
}
SessionUdp::~SessionUdp()
{
if (this->_socket != -1)
{
... |
706c8bf9c7e8c88290440a8766e453eecd88519d | b2bb371ca2e047cdf97d516c9002a411b810495e | camiel-m/conos | /src/deltacut.cpp | C++ | cpp | 20,998 | no_license | // [[Rcpp::plugins(cpp11)]]
// [[Rcpp::depends(RcppArmadillo)]]
#include <RcppArmadillo.h>
#include <iostream>
#include <vector>
#include <stack>
#include <queue>
//#define DEBUG 1
#undef DEBUG
using namespace std;
using namespace arma;
using namespace Rcpp;
// get a list of leafs for a given node non-recursively
//... |
f2bea5d1799db813d76098e308d215f495ca49d2 | fdc67d751968f76205dede2f868b2b237cc1a59d | lilmuggle/leetcode | /ValidPalindrome.cpp | C++ | cpp | 510 | no_license | class Solution {
public:
bool isPalindrome(string s) {
string t;
int i, j, len = s.size();
for(i = 0; i < len; i++) {
if('A'<=s[i]&&s[i]<='Z')
t += s[i] + 32;
else if(('a'<=s[i]&&s[i]<='z')||('0'<=s[i]&&s[i]<='9'))
t += s[i];
}
... |
93e664cac16f8bddef136c568458cf57768aaceb | 8ee45aa39a1f470ffab6579b55cd335d04cf4774 | make1122/tencentcloud-sdk-cpp | /cvm/src/v20170312/model/InstanceTypeConfig.cpp | C++ | cpp | 7,633 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
45344cb971a20a1a2d13f32a960e7ea8670ced66 | abe36e3f7a93c8a625cfd639bb7ccfb23d5252cd | spboom/CPP_EindOpdracht | /RogueDungeon/RogueDungeon/Factory/LocationFactory.cpp | C++ | cpp | 3,021 | no_license | #ifdef _WIN32
#endif
#ifdef __unix__
#endif
//
#include <tchar.h>
#include <strsafe.h>
#include <string>
#include "tinyxml2.h"
#include <iostream>
//
#include "LocationFactory.h"
#include "../Model/Location/Location.h"
#include "../Model/Location/Hallway.h"
#include "../Enum/Enum.h"
//
LocationFactory* LocationFact... |
00264a4ebb916894e51fb3d4d1a87ef0849b4359 | f0e02c8e4d149a6024f43b8724295b9ba7373387 | TurtleShip/ProgrammingContests | /Solutions/LiveArchive/2007/South_America/3657/3657_PowerGeneration.cpp | C++ | cpp | 1,166 | no_license | #include<iostream>
#include<vector>
#include<cmath>
#define INF 2000
using namespace std;
int N, C, A;
int x[10005];
int y[10005];
int p[10005];
vector<int> child[10005];
long double dist(int a, int b){
return sqrt(pow((long double)(x[a]-x[b]),2) + pow((long double)(y[a]-y[b]),2));
}
int dfs(in... |
b22828aa9e2b789ba6cc4613fba0ffe12241c24a | f4ee38a9e3f492b1b1a86d80ceccedb8fb491e32 | Kanma/Ogre | /OgreMain/OgreShadowCameraSetupLiSPSM.cpp | C++ | cpp | 13,512 | permissive | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2012 Torus Knot Software Ltd
Copyright (c) 2006 Matthias Fink, netAllied GmbH <matthias.fink@w... |
b028f24cbf5484895568dac9c76ff1cb44c65a3b | a7a024e3bc21d63e320f12d20e1c26f285456515 | alimb2/hazedumper | /csgo.hpp | C++ | hpp | 7,443 | no_license | #pragma once
#include <cstdint>
// 2019-06-20 12:05:16.607113 UTC
namespace hazedumper {
constexpr ::std::int64_t timestamp = 1561032316;
namespace netvars {
constexpr ::std::ptrdiff_t cs_gamerules_data = 0x0;
constexpr ::std::ptrdiff_t m_ArmorValue = 0xB340;
constexpr ::std::ptrdiff_t m_Collision = 0x31C;
constexpr ... |
86e6f83d3bce8becc6d8adb2eb140f762e7ae06c | 7f89f152e75f465d9266bd90b4949c664b64692f | tomice/FlappyGame | /Classes/HelloWorldScene.cpp | C++ | cpp | 7,490 | no_license | #include "HelloWorldScene.h"
#include "Constants.h"
#include "CFlappy.h"
#include "CCloud.h"
#include "CPipe.h"
#include "SimpleAudioEngine.h"
USING_NS_CC;
CCScene* HelloWorld::scene()
{
// 'scene' is an autorelease object
CCScene *scene = CCScene::create();
// 'layer' is an autorelease object
He... |
5a666b61a3f8c67cd20229de1ffa718fc05e7ddd | 62670562b07bc02ea040d880afd8b0fd86c741f3 | takayoshimiyazaki/rukino | /Game/GameLogo.cpp | C++ | cpp | 1,232 | no_license | //__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/
//! @file GameLogo.cpp
//!
//! @brief ロゴシーンのソースファイル
//!
//! @date 2017/4/5
//!
//! @authorYuhei M
//__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/
// ヘッダファイルの読み込み ====================================... |
c54e19afece534adfd2f42f950e5e27212cb3685 | 3bbf3604a14f6224868b0bfc54073b5be0a95ef5 | cudevconst/PADctdlgt | /xau nhi phan xen ke.cpp | C++ | cpp | 357 | no_license | #include <iostream>
using namespace std;
int main()
{
int n; cin>>n;
for (int i=0; i<n; i++)
if (i%2 == 0)
cout << 0 << " ";
else
cout << 1 << " ";
cout << endl;
for (int i=0; i<n; i++)
if (i%2 == 0)
cout << 1 << " ";
else
c... |
1c0fe7dc41ae6c8322b05546af93679db807f938 | 144e7c71cf3614fce17c7da50ad2231c4ad14de4 | jtfalco/GamePlay | /gameplay/src/lua/lua_ScriptController.cpp | C++ | cpp | 6,291 | permissive | #include "Base.h"
#include "ScriptController.h"
#include "lua_ScriptController.h"
#include "Base.h"
#include "FileSystem.h"
#include "ScriptController.h"
namespace gameplay
{
void luaRegister_ScriptController()
{
const luaL_Reg lua_members[] =
{
{"loadScript", lua_ScriptController_loadS... |
1bef27df92074e55a59c29279f4adf12f5da4a40 | 24ef0143694a557eca9656964e48be39a52953f8 | fHachenberg/GamePlay | /gameplay/src/MeshSkin.cpp | C++ | cpp | 6,599 | permissive | #include "Base.h"
#include "MeshSkin.h"
#include "Joint.h"
// The number of rows in each palette matrix.
#define PALETTE_ROWS 3
namespace gameplay
{
MeshSkin::MeshSkin()
: _rootJoint(NULL), _rootNode(NULL), _matrixPalette(NULL), _model(NULL)
{
}
MeshSkin::~MeshSkin()
{
clearJoints();
... |
1d125d94d721abcbaa2f147e96e7e01e6ed66dd8 | 0cbe01f2178cbf29f3408cd8dd16bbfa85ec4071 | asishcse60/Problem-Solving | /Tree/Path SUM II.cpp | C++ | cpp | 1,100 | no_license | /**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
vector< vector<int> > ret;
void calPath(TreeNode *root, int sum, int curSum, vector<int> tmp){
... |
43317c312bf5e875e59aa804dc8a0d0ae346d10d | 60adf0e3b4abe3d97747db45c054b1c9695d0ba2 | zgzhong/MyCppPrimer | /Chapter13/testMoveSemantics/HasPtr.cc | C++ | cc | 754 | no_license | #include "HasPtr.h"
#include <iostream>
using namespace std;
HasPtr::HasPtr(const HasPtr& other):
cnt(other.cnt), p(other.p), use(other.use){
++(*use);
}
HasPtr::~HasPtr(){
if(use){
--(*use);
if (0 == *use){
delete p;
delete use;
}
}
}
HasPtr::HasP... |
6e8d13109e1d7a02a7f7bfda785c969e92dbdd0c | 98ade4514cb99c952d621e51aaf8cc77a7177a63 | AsifWatson/codeforces | /C/1335C.cpp | C++ | cpp | 3,275 | no_license | /*****************************************************************|
| /\ _______ ________ _________ |
| / \ /------ \ |___ ___| | _______| |
| / /\ \ || || | | |
| / / \ \ ||______ || | |... |
40526d08a33487018308d51a82f9584cbc217712 | 50ef776bc0cdb2bbd470cd86d880859debd4c5aa | KurobaneYui/Huffman-Coding | /Huffman Coding/Huffman_Coding.cpp | C++ | cpp | 5,444 | permissive | #include<iostream>
#include<string>
#include<vector>
#include<queue>
#include"Huffman_Coding.h"
#include"random_seq.h"
using namespace std;
int main(void) {
//演示固定序列,在不同进制编码下的结果
cout << endl << "**********以下演示指定序列在不同进制的霍夫曼编码下的结果***********" << endl;
{
// 建立2进制编码树,代编码符号数量5
cout << endl << "**********5个待编码符号,2进... |
1caff0a64836242e0264796b17f88dd4c268ca81 | ebf6d617e3d794c5eedfbd0e54657457eaf1076c | shikouchen/FastDescriptor | /src/ResultVisual.cpp | C++ | cpp | 2,502 | no_license | //
// Created by czh on 5/6/19.
//
#include <iostream>
#include "SimpleView.h"
#include "pcl/io/ply_io.h"
#include <pcl/common/common.h>
SimpleView viewer("result");
void viewMatch(PointCloudT::Ptr s, PointCloudT::Ptr t);
int main(){
PointCloudT::Ptr source(new PointCloudT);
PointCloudT::Ptr target(new PointC... |
fb3b1bf2035dbb25be7ad6daa5265967089a82f6 | a03100793bbfce698407c160c792f576f18a1149 | zakaria160187/know-nothing-gmail | /lprof-snapshot-r63/instr/mutator.cpp | C++ | cpp | 3,991 | no_license | #include <iostream>
#include <string>
#include <boost/program_options.hpp>
#include <ElfFile.h>
#include "InstrMutator.h"
using namespace std;
namespace po = boost::program_options;
string input_fn, output_fn, ipout_fn, addrout_fn;
int getOpts(int ac, char** av) {
po::options_description opts("LProf Instrumen... |
058bf6cf288868bcd5335c87dec152e66a90f74a | a6ab756047244d063a9b0563c23a506bb8de74c2 | ShaoChenHeng/codeOfACM | /2019/11/21/1250_lgVer3.cpp | C++ | cpp | 1,429 | no_license | #include <bits/stdc++.h>
#define INF 0x3f3f3f3f
using namespace std;
struct edge
{
int from, to, cost;
} es[300110];
int cnt = 0;
int V, E, d[30110];
void shortest_path(int s)
{
for (int i = 0; i < V; i++ ) d[i] = INF;
d[s] = 0;
while ( true )
{
bool update = 0;
for ( int i = 0; ... |
12c64e0fede7cb3e0d3cfcc4eb3208037ea802dc | e42aaa60dc2b2659be61c922799c82f41d66846e | avatarbuss/dotnet-api-docs | /samples/snippets/cpp/VS_Snippets_CLR/Type_GetNestedClassesAbs/CPP/type_getnestedclassesabs.cpp | C++ | cpp | 1,817 | permissive |
// <Snippet1>
using namespace System;
using namespace System::Reflection;
// Create a class with two nested public classes and two nested protected classes.
public ref class MyTypeClass
{
public:
ref class Myclass1{};
public:
ref class Myclass2{};
protected:
ref class... |
3ab5ab32feba4429ec82f459369caa721d82fb9f | c2363f632ed2610fa0422a70bd8ffb3fc35066e9 | heroinetty/ACM | /C++/code/函数绑定器/函数绑定器——深入.cpp | C++ | cpp | 675 | no_license | #include <iostream>
#include <functional>
using namespace std;
using namespace std :: placeholders;
struct node
{
int operator() (int a, int b)
{
cout << "a = " << a << " b = " << b << endl;
return a + b;
}
};
int add(int a, int b, int c)
{
return a + b + c;
}
int... |
e2553c600d6bdf189211b35b9a3942807735ad92 | d536cbe8316cdd4767583a36b0870852315a3b7e | AntonioVillatoro/cpp | /EJERCICIOS/EJERCICIO45-Punto-de-Venta-TAREA 6/menu.cpp | C++ | cpp | 841 | permissive |
#include <iostream>
using namespace std;
extern void productos(int opcion);
extern void imprimirFactura ();
void menu()
{
int opcion = 0;
while (true)
{
system("cls");
cout << "****";
cout << "MENU";
cout << "****";
cout << endl;
cout << endl;
cou... |
411d086bffdbe036db5422d97af322d805edf67f | 842ad8af7d684f59029319b7bf46c741fdaaf071 | 504281906/ACM | /Argus.cpp | C++ | cpp | 484 | no_license | #include <stdio.h>
struct node
{
long long n,m;
}a[1010];
int main()
{
int f[1010];
char s[10];
int i,j,k;
scanf("%s",&s);
int t=1;
while (s[0]!='#')
{
scanf("%d%d",&a[t].n,&a[t].m);
f[t]=a[t].m;
t++;
scanf("%s",&s);
}
scanf("%d",&k);
for (i=1;i<=k;i++)
{
int min=0,pos;
for (j=1;j<t;j++)
i... |
47c7a65ec80b6915093e874cf5c9cc48a2b36f0a | 61cd50ec469d9336a9d29315f05e1584919db14a | civctp2/civctp2 | /ctp2_code/ui/aui_common/aui_hypertextbox.cpp | C++ | cpp | 10,486 | no_license | #include "c3.h"
#include "aui_hypertextbox.h"
#include "aui_ui.h"
#include "aui_window.h"
#include "aui_uniqueid.h"
#include "aui_ranger.h"
#include "aui_ldl.h"
#include "aui_static.h"
#include "ldl_data.hpp"
#include "ldl_file.hpp"
aui_HyperTextBox::aui_HyperTextBox(
AUI_ERRCODE *retval,
uint32 id,
const MBCHAR ... |
5359b6f837c9070ae9e7708fc87c25d9df2bd916 | 4397247ee44df08adf4879fe0705eb49a54d3ffb | Halksel/Competition | /AOJ/DPL/DPL_1-A.cpp | C++ | cpp | 1,943 | no_license | #include <bits/stdc++.h>
using namespace std ;
#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<end... |
54e203952c548afa5cd21fc823d246b5198d3254 | d11b005a08edcfb468c9840939e735b9ea2ff7ff | LeonidGavrilov/first-semester | /HomeWork/HomeWork/HomeWork.cpp | C++ | cpp | 6,466 | no_license | // HomeWork.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include "pch.h"
#include <iostream>
#include <cstdlib>
using namespace std;
int getSize(unsigned char* arr) {
int size = 0;
for (int i = 0; arr[i] != '\0'; i++) {
size++;
}
return size;
}
void showA... |
4fdc73b4eb195ac32fd38fc7ef8db27e89142ff6 | 71d27b7079072d6effdf79aa461055bfef28bce2 | SeriouslyHAO/NODE_POINT_SEGMENT_DETECT_PCL | /src/test.cpp | C++ | cpp | 459 | no_license | //@Project : DINK-Open Practical Autonomous Driving Framework.
//@Author : SeriousHAO
//@Time : 1/27/19 5:07 AM
#include <ros/ros.h>
#include "euclidean_cluster/cluster.h"
int main(int argc, char** argv)
{
ros::init(argc, argv, "test_euclidean_cluster");
std::cout << "test euclidean cluster" << std::endl;
eu... |
62676f3f30ab66335429ab218d8facc9e3670ad3 | b37ab2252db84ef482de1bd515c89261cac4bda2 | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE122_Heap_Based_Buffer_Overflow/s07/CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_memmove_43.cpp | C++ | cpp | 3,055 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__c_CWE193_char_memmove_43.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__c_CWE193.label.xml
Template File: sources-sink-43.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Allocate ... |
38bcf1206addfb162fd2b9adb9b6ea4d6af5b23f | 80a30e25cefafb3d72e04c895201ea9bb60a9ef9 | MeganVeitz/CSC_160_CPP | /Lab_2/ex23_1.cpp | C++ | cpp | 1,302 | no_license | // Section CSC160 - Computer Science I: C++
// File Name: ex23_1, P23_2
// Student: Megan Veitz
// Homework Number: Lab_2
// Description: Read and average 6 integers, print the result
// Last Changed: Changed the program to compute the average of 100 numbers.
// Diferences between this program and the one given in P2... |
0ce312d6c6e2dd8d936dea8e9fd510ca50c01796 | 822921959e177bea57ecac22fbeb53797bcf74a7 | sdwalker233/ICPC | /HDU/BestCoder/2015 BestCoder Cup Champion(2015.5.2)/10052.cpp | C++ | cpp | 922 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int n,m,a[210];
void fuck()
{
int i,j,p,sum=0,c[210];
bool b[210];
scanf("%d%d",&n,&m);
for(i=1;i<=m;i++){
scanf("%d",&a[i]);
}
if(m==1){
for(i=1;i<=n;i++) c[i]=i;
p=1;
for(i=n;i>1;i--){
if(p!=1) p--;
p=(p+a[1]... |
464f25ce69d13a3007ac81195c499eb600d414ca | f1335038580bf0662cb1fa4599540638d07b78e7 | markusroman/Ohjelmointi2 | /student/10/calculator/calculations.cpp | C++ | cpp | 675 | no_license | // Note that there is no need for "using namespace std",
// since no C++ standard libraries are used.
double addition(double left, double right) {
return left + right;
}
double subtraction(double left, double right) {
return left - right;
}
double multiplication(double left, double right) {
return left... |
707804b03e55f849e5ff617903e4d86254ae23f2 | 583b0f2829c31cb8cb748d327dce65911252e678 | shelltdf/ifcplusplus | /IfcPlusPlus/src/ifcpp/IFC4/lib/IfcCompressorTypeEnum.cpp | C++ | cpp | 5,514 | permissive | /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#include <sstream>
#include <limits>
#include <map>
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/IFC4/include/IfcComp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.