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 |
|---|---|---|---|---|---|---|---|---|
b3675a2c2b715cc9271c3245a9413a2bdb8b916c | d3f2dd3d08b8352918661dceda5d5f5482a9b4b2 | cnsuhao/cmb | /Source/Applications/ModelBuilder/SimBuilder/pqSimBuilderUIManager.cxx | C++ | cxx | 11,655 | permissive | //=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
5dafbf02efdefa6fdf4e9798ce71ea558a6ff7f0 | 0da51522d956c3d424aa51a8e69baa4b5f2f89df | roshihie/AOJ | /DoublyLinkedList_1.cpp | C++ | cpp | 1,262 | no_license | #include <iostream>
#include <string>
#include <list>
using namespace std;
void fnLinkedListSet(list<int>& rltnNum)
{
list<int>::iterator itltn;
list<int>::iterator itltEND = rltnNum.end();
string sCmd;
int nMaxCmd, nNum;
cin >> nMaxCmd;
for (int i = 0; i < nMaxCmd; i++)
{
cin >> sC... |
b2fdef6e774e273235612d0299790f074b136122 | f9ca97f7b7802c6c2ff9597742488def427cd969 | dmellosanjay/runtime | /backends/gpu/cpp_tests/memory/block_allocator_test.cc | C++ | cc | 6,502 | permissive | // Copyright 2020 The TensorFlow Runtime 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 ... |
d88a13eac66cd9d5efbfc438202be8d3bdc50a95 | eb44b7eee29a7acde02ac61a190c869e42d2f5f3 | kzuyev/TIME | /src/script/script.cpp | C++ | cpp | 11,260 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017-2018 The PIVX developers
// Copyright (c) 2018 The time developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php... |
5ae603fcae300cbec62dd9cbfeb4dd958ef4c9eb | 09759c6470f2acff33727194084665de2a2091ea | richnakasato/lc | /19.remove-nth-node-from-end-of-list.0.cpp | C++ | cpp | 1,223 | no_license | /*
* [19] Remove Nth Node From End of List
*
* https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/
*
* algorithms
* Medium (33.66%)
* Total Accepted: 320.9K
* Total Submissions: 953.4K
* Testcase Example: '[1,2,3,4,5]\n2'
*
* Given a linked list, remove the n-th node from the end ... |
b44936da1ed1c9023da8b5df475891e044c1393b | cb8996212916a6d3b83787bd46e1e077befd1630 | 5l1v3r1/orderbook | /src/orderbook.cpp | C++ | cpp | 4,909 | no_license | #include "orderbook.h"
#include "engine.h"
#include "types.h"
#include <cstring>
namespace OB {
/* Report trade execution */
void executeTrade(const Field& symbol, const Field& buyTrader,
const Field& sellTrader, t_price tradePrice,
t_size tradeSize) {
t_execution exec;
i... |
ee040c7a187f3b291f8e3af61c4136388bd36338 | 46b9dfd336157eea2f67d172592e60fa3848a586 | Buanga-Corentin/ApprendreCpp | /mLego_Barre/barreronde.cpp | C++ | cpp | 1,231 | no_license | #include "barreronde.h"
#include <iostream>
BarreRonde::BarreRonde(string _reference, float _longueur, float _densite, string _nomAlliage, float _diametre):
Barre(_reference,_longueur,_densite,_nomAlliage),
diametre(_diametre)
{
cout << "constructeur de la classe BarreRonde" << endl;
}
void BarreRonde::A... |
6af50cd2dca03ac330646f03c1a44f4638fef413 | 11af3e359ba640f46921dae63b0d6b3d0d3cb79c | bierschi/robo_car | /software/remote_controlled/robocar/src/car/Car.cpp | C++ | cpp | 2,888 | permissive | //
// Created by christian on 02.11.18.
//
#include "car/Car.h"
/**
* Constructor for a Car instance
*
* USAGE:
* Car* car = new Car();
*
*/
Car::Car() {
steeringServo = new SteeringServo(15);
cameraServo = new CameraServo(14);
gearmotor = new GearMotor(26, 21);
ultrasonic = new U... |
b937c19dc677880aff9813b41cac74e382d4c4d2 | 3b8623d5ff3fd517e0155453e4612dcf4a00866d | zgx2012/lanbo-android-binder | /framework/libs/comm-core/SomeArgs.cpp | C++ | cpp | 3,005 | no_license | #include <stdlib.h>
#include <string.h>
#include "SomeArgs.h"
namespace android
{
SomeArgs::SomeArgs() : arg1(0), arg2(0), arg3(0), arg4(0), arg5(0), arg6(0),
argi1(0), argi2(0), argi3(0), argi4(0), argi5(0), argi6(0) {
}
SomeArgs::~SomeArgs() {
if (arg1 != NULL) {
free(arg1);
arg1 = NULL;
... |
68ee59814e45053f946155ad2783a862a436f6d7 | bd5c39624b7a81e239aa91812fc652dd245b22fb | srijan908/C-programs | /cvdrun.cpp | C++ | cpp | 510 | no_license | #include<bits/stdc++.h>
using namespace std;
#define fo(i,n) for(int32_t i=0;i<n;i++)
string calc(int n,int k,int x,int y){
int original = x;
while(true){
x = (x+k)%n;
if(x==y)
break;
else if(x==original)
return "NO";
}
return "YES";
}
int main(){
io... |
fefdaa068af74ba25a016a5591957b6619714b38 | 614391d9bdc8c206099c66cca3c65627b09f97ae | IamLJT/51nod | /MaxinSub.cpp | C++ | cpp | 824 | no_license | /*
题目:序列中最大的数
要求:有这样一个序列a:
a[0] = 0
a[1] = 1
a[2i] = a[i]
a[2i+1] = a[i] + a[i+1]
输入一个数N,求a[0] - a[n]中最大的数。
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
int main()
{
int T;
cin >> T;
vector<int> num(T,0);
for(int i=0; i<... |
efd9053e84b8e8f377309ae663764084c68a9461 | 0a251d39b66d35300b197318c9e5b8508cba10ab | goofanader/the-white-room | /the-white-room-master/the-white-room/gameStates/Running.cpp | C++ | cpp | 21,930 | no_license | /*
* File: Running.cpp
* Author: goofanader
*
* Created on January 29, 2013, 10:19 PM
*/
#include "Running.h"
#include "objects/AllObjects.h"
#include "objects/MeshLoader.h"
#include "GeometryCreator.h"
#include "events/ObjectCreation.h"
#define MAX_EVENTS 0
#define MOVE_SPEED 15.f
#define PI 3.14159f
#def... |
6b1b84f13d72a8d87e9da76bc080d588cde2df6d | 3fa839587f5a1f449f5c34ed9bed73dff8e9f8d6 | c-ber/cber | /vscode/wg/sdk/UP_Carepackage_Light_C.hpp | C++ | hpp | 885 | no_license | #pragma once
#include "UTslParticle.hpp"
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
namespace PUBGSDK {
struct alignas(1) UP_Carepackage_Light_C // Size: 0x470
: public UTslParticle // Size: 0x470
{
private:
typedef UP_Carepackage_Light_C t_struct;
typedef ExternalPtr<t_struct> t_structHelper;
... |
c92cb2083d7bb579b6ef6def026c97ce7112ca72 | 08f5d3d6fddbfbaca47570e7c67501ff99971ed6 | Csineneo/Vivaldi | /chromium/net/cert/internal/trust_store_nss.cc | C++ | cc | 4,325 | permissive | // Copyright 2016 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/cert/internal/trust_store_nss.h"
#include <cert.h>
#include <certdb.h>
#include "crypto/nss_util.h"
#include "net/cert/internal/cert_error... |
b37dc4f9c06b1783106604cddfcf800a17a4770d | a3aca43d80f7af60da5d459e9d9fead224900005 | whztt07/Wave-Particles-with-Interactive-Vortices | /WPWIV/WPWIV/Scene.cpp | C++ | cpp | 10,106 | no_license | #include "Scene.h"
Scene::Scene()
{
}
Scene::~Scene()
{
}
void Scene::AddFrame(Frame* pFrame)
{
pFrameVec.push_back(pFrame);
}
void Scene::AddCamera(Camera* pCamera)
{
pCameraVec.push_back(pCamera);
}
void Scene::AddMesh(Mesh* pMesh)
{
pMeshVec.push_back(pMesh);
}
void Scene::AddTexture(Texture* pTexture)
{
p... |
eeeb00ef4fae0c006dcee2fa581484e218e2b0ab | b3c6845d881fd9d7979e53dbb4e934df9744cef5 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-dynamodb/source/model/ImportSummary.cpp | C++ | cpp | 3,606 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dynamodb/model/ImportSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namesp... |
b6e55113b7038d57812411cafeee7da9e5e1f36f | 08222f78025b229ee3b4c12b0876d8f491e16ec7 | ylunalin/amrex | /Src/AmrCore/AMReX_ErrorList.cpp | C++ | cpp | 6,272 | permissive |
#include <iostream>
#include <AMReX_BLassert.H>
#include <AMReX_ErrorList.H>
#include <AMReX_SPACE.H>
namespace amrex {
ErrorRec::ErrorFunc::ErrorFunc ()
:
m_func(0),
m_func3D(0)
{}
ErrorRec::ErrorFunc::ErrorFunc (ErrorFuncDefault inFunc)
:
m_func(inFunc),
m_func3D(0)
{}
ErrorRec::ErrorFunc... |
585a4fd59352a8db97640782cccb2c1b791ad510 | 170ad3ae965c3173056a667d48f30854bb469188 | tjddn2615/CodePractice | /programmers.com/3930_직사각형.cpp | C++ | cpp | 788 | no_license | #include <iostream>
#include <vector>
#include <map>
using namespace std;
vector<int> solution(vector<vector<int> > vec) {
vector<int> ans;
map<int, int> m1, m2;
for(auto v : vec) {
if(m1.count(v[0]) < 0) {
m1.insert(make_pair(v[0], 1));
}else{
m1[v[0]... |
4b0d59e97974cb2d8548f68e357e42aaca87fb8b | cf1fa3eda6838d18eb93680700126b1a13760d15 | copernicus231/gatempi | /source/digits_hits/src/GateActorManagerMessenger.cc | C++ | cc | 2,552 | no_license | /*----------------------
GATE version name: gate_v6
Copyright (C): OpenGATE Collaboration
This software is distributed under the terms
of the GNU Lesser General Public Licence (LGPL)
See GATE/LICENSE.txt for further details
----------------------*/
#ifndef GATEACTORMANAGERMESSENGER_CC
#define GATEACTOR... |
50752dd7585b62868e4ed2cb9a7f9c895ab1f7ff | b502bf178b2fe8328de3683b35537550ef031103 | vildenst/In_Silico_Heart_Models | /VTK/Filters/Core/vtkUnstructuredGridQuadricDecimation.cxx | C++ | cxx | 46,946 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkUnstructuredGridQuadricDecimation.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.... |
36cd82f897ba2c5985e2a88184077dd3c0670012 | dd589dcc0e77127327f931f27a83654749314a6a | OxOOO1/RawRenderer | /RawRenderer/RawRenderer/src/Scene/SceneObject.cpp | C++ | cpp | 376 | no_license | #include "SceneObject.h"
#include "Scene/Scene.h"
#include "thirdParty/ImGUI/imgui.h"
void RLevelEditorObject::RenderUIGlobal()
{
if (bDrawInSeparateWindow)
{
if (ImGui::Begin(Name.c_str()))
{
RenderUI();
ImGui::End();
}
}
}
void RLevelEditorObject::Selectable(RLevelEditorObject*& pObject)
{
if (ImG... |
136c6af04da49848ee8e79200d1d9006081dfc3c | a3c934efcb091644af9c4c8ef5bb5bc4da9821d7 | kl07/WinUAE | /idecontrollers.cpp | C++ | cpp | 56,325 | no_license | /*
* UAE - The Un*x Amiga Emulator
*
* Other IDE controllers
*
* (c) 2015 Toni Wilen
*/
#include "sysconfig.h"
#include "sysdeps.h"
#include "options.h"
#include "memory.h"
#include "newcpu.h"
#include "uae.h"
#include "gui.h"
#include "filesys.h"
#include "threaddep/thread.h"
#include "debug.h"
#include "ide.h"
#in... |
6b199238a54ef48cbc23cd278251b21a52ac73c3 | 1632fbd66109f0cb73ccb3667800669551571b1f | dkargin/miniroscpp | /include/generated/geometry_msgs/Wrench.hxx | C++ | hxx | 5,847 | permissive | // Generated by gencxx from file geometry_msgs/Wrench.msg
// DO NOT EDIT!
#pragma once
#include <string>
#include <vector>
#include <map>
#include <array>
#include <miniros/types.h>
#include <miniros/serialization.h>
#include <miniros/traits/builtin_message_traits.h>
#include <miniros/message_operations.h>
#inclu... |
3e733ff14b46d2511488916b7905c31fd427abe0 | f9a437e31f4945ceb76c6674161e9eee820c3105 | MPHosting/Xrevolution | /src/rpcmasternode.cpp | C++ | cpp | 33,084 | permissive | // Copyright (c) 2014-2017 The Xrev Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.h"
#include "darksend.h"
#include "init.h"
#include "main.h"
#include "masternode-payments.h"
#in... |
472e70a948dce529551af9b1b2098913b945f594 | d8ec30eb4d6acbbc0047d4bb741b9254821ddb2f | RaghavSaboo159/Optimized-In-Memory-Key-Value-Storage | /kvStore.cpp | C++ | cpp | 13,169 | no_license | #include <iostream>
#include <stdlib.h>
#include <time.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
using namespace std;
#define rep(n) for(register int i=0;i<(n);i++)
#define jrep(n) for( register int j=0;j<(n);j++)
// globals
int fen[8503056+5],arr[8503056+5];
char decc[] ... |
2e74d9400a8e4b4deeec615c39e4d2ddcacc099a | 2763e462e89d049e5037dd0fa14ad2b6d98760e7 | erlangzhang/TeamTalk | /server/src/db_proxy_server/business/MessageContent.cpp | C++ | cpp | 17,522 | permissive | /*================================================================
* Copyright (C) 2014 All rights reserved.
*
* 文件名称:MessageContent.cpp
* 创 建 者:Zhang Yuanhao
* 邮 箱:bluefoxah@gmail.com
* 创建日期:2014年12月15日
* 描 述:
*
================================================================*/
#include "..... |
bccb10d983ec33f33469f47b5f74830e3f06efd5 | be33327a847a4f505e16785e31addc9d9ce15bc0 | bwalden/resiprocate | /apps/reConServer/SubscriptionForwarder.cxx | C++ | cxx | 9,483 | permissive | #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rutil/Log.hxx>
#include <rutil/Logger.hxx>
#include <resip/stack/SdpContents.hxx>
#include <resip/stack/SipMessage.hxx>
#include <resip/stack/Tuple.hxx>
#include <resip/stack/Uri.hxx>
#include "AppSubsystem.hxx"
#include "SubscriptionForwarder.hxx"
#define RE... |
3c1991e53960feb9c5e7f04eb087f89133add0ed | d4dff80f8b2bbb8ee93f99eb6e74ff70d2ac19a5 | ljmi2dle/tf-opt | /tf_opt/neural_net/neuron/clipped_relu_impl_type_test.cc | C++ | cc | 2,129 | permissive | // Copyright 2021 The tf.opt 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 agree... |
75699270995671cdbcca7f83fb5bb9c619256b8c | 857302c1b19423b511340fac457ad952a2bbfef0 | vothaosontlu/native | /library/Java/Lang/Boolean/BooleanTest.cpp | C++ | cpp | 6,979 | permissive | /**
* Copyright 2017 Food Tiny Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of condit... |
484f38c3eb591b7e2c488c519a4b41a77c841ca8 | 271387111dd61f2e6d925753745921bbd47095f8 | megawubs/M5Spot | /src/DisplayManager.cpp | C++ | cpp | 27,291 | permissive | #include "main.h"
#include "config.h"
#include "DisplayManager.h"
#include "LayoutItem.h"
#include "TrackDetails.h"
#include "SpotifyController.h"
#include "Icons.h"
#include "Timer.h"
DisplayManager BaseDisplayManager;
DisplayManager::DisplayManager()
: Canvas(&M5.EPD)
, TempJpegCanvas(&M5.EPD)
{... |
b96a53f0368301fc85b5444a7c3854525151d10c | fba4075c63a8e6ac6d936ae291c96e84ba08f486 | ccdxc/logSurvey | /data/crawl/squid/hunk_4787.cpp | C++ | cpp | 1,542 | no_license | extern void _etext;
fprintf(stderr, "----- Memory map ----\n");
xmalloc_scan_region(&_etext, (void *) sbrk(0) - (void *) &_etext, 0);
+
for (B = 0; B < DBG_ARRY_BKTS; B++) {
- for (I = 0; I < DBG_ARRY_SZ; I++) {
- if (malloc_ptrs[B][I] && malloc_refs[B][I] == 0) {
- /* Found a leak... */
- fpr... |
e651afc8c98e5c9e164676b51e631dfb63b13af1 | 82233256e6ed5d879d66fd5267e2963e4527ef9c | aleckmal90/chromium | /chrome/browser/ui/webui/settings/site_settings_handler.cc | C++ | cc | 65,542 | permissive | // Copyright 2016 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/settings/site_settings_handler.h"
#include <algorithm>
#include <set>
#include <utility>
#include <vector>
#include "b... |
610fedf309bfe6522efa61653ba7fdaca689ebee | 16226fed016bc7049e885808a6800614a0a90811 | Sina-Baharlou/Contract-Net-Protocol | /PolicyManager.cpp | C++ | cpp | 2,834 | no_license | /*
* PolicyManager.cpp
*
* Created on: May 31, 2015
* Author: Sina M. Baharlou (Sina.Baharlou@gmail.com)
*/
#include "PolicyManager.hpp"
PolicyManager::PolicyManager(cv::Mat& stateMap):stateMap(stateMap)
{
// -- Get state map dimension --
mapW=stateMap.cols;
mapH=stateMap.rows;
// -- Create Value-Map... |
3fac1c489060010892e02e714ba6490a517decad | 96613758d21faffb954dca0cf7769b2f080acc6b | palmerc/lab | /classes/ugrad/csci1120/lab8/fib-recurse.cpp | C++ | cpp | 256 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int fib(int n)
{
if ( n <= 1 )
{
return n;
} else {
return fib(n-1) + fib(n-2);
}
}
int main()
{
int x;
x = fib(45);
cout << x << endl;
return 0;
}
|
afb2c1a807e93ac2543f443a06d99762de61ab77 | 7c6801cbe982c62e0f6eae33dc6deb135ccf470e | mintakoh/Algorithm_Codeforces | /Xenia_and_Ringroad.cpp | C++ | cpp | 382 | no_license | #include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
long long past, result = 0;
for(int i = 0; i < m; i++) {
int temp;
cin >> temp;
if(i == 0) {
result += (temp - 1);
}
else {
if(past > temp) {
result += (n - past + temp);
} else {
result += (temp - pas... |
af7f0b5ecb0ced81fcf105af087141d6165af824 | 57800aa9d1cf2cde9acfe4fd431502d27a3163e3 | N7RX/MPM-Snow-DX | /MPM-Snow-DX/MPM/Scene.cpp | C++ | cpp | 4,894 | no_license | #include "pch.h"
#include "Scene.h"
Scene::Scene() {}
Scene::Scene(const Scene& scene) {}
Scene::~Scene() {}
Scene* Scene::GenerateScene(int index)
{
Scene* scene = new Scene();
switch (index)
{
case 0: {
// Snowball crash
Entity* snowball =
Entity::generateSnowball(Eigen::Vector3d(1.05, 0.53, 0.5), 0.04,... |
75932e3dffa39fe4f66eda0c701429ed4cf66016 | 94313b3654facfd731408f236827a661cc6ae21f | lamesrich/LouidorRichemond_CSC5_46091_Sum2015 | /LABS/Lab 7/main.cpp | C++ | cpp | 5,032 | no_license | /*
* File: main.cpp
* Author: Dr. Mark E. Lehr & Richemond Louidor
* Created on July 15, 2015, 9:14 PM
* Purpose: Given date output the day of the week
* Lab 7
*/
//System Libraries
#include <iostream>
#include <cstring>
using namespace std;
//User Libraries
//Global Constants
//Function Prototypes
bool i... |
db0c1750f5d729e11fce445f148b2bd4dc6b08c5 | 086ddd235f9850c3f18f6ea87270ac0743098d97 | bgin/lrose-core | /codebase/apps/ingest/src/SstNc2Mdv/NetcdfUtils.hh | C++ | hh | 7,066 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
7f2961dac41304aa5fade5bcf9563c1b5201ea88 | afc9cf33d224e817d1bae101a9565cc991f0d6fa | dyang23/compute-runtime | /opencl/test/unit_test/aub_tests/command_stream/aub_mi_atomic_tests.cpp | C++ | cpp | 7,390 | permissive | /*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/command_stream/command_stream_receiver_hw.h"
#include "shared/test/common/helpers/dispatch_flags_helper.h"
#include "shared/test/com... |
6028dd9715781e0797dfc4935de498151a3ffd21 | b19295c75085b58a60724a4687e5a304d7472cde | unicorny/GardenRush | /Classes/model/Player.cpp | C++ | cpp | 603 | no_license | #include "controller/RessourcenManager.h"
#include "model/Player.h"
#include "cocos2d.h"
Player::Player()
: mIsNewPlayer(false), mSettings(SETTINGS_NONE)
{
}
Player* Player::getInstance()
{
static Player theOneAndOnly;
return &theOneAndOnly;
}
bool Player::initNewPlayer()
{
mIsNewPlayer = true;
//mSavegame = n... |
88f0565f9fb3bd4f9cb0858632704f5f41af39fd | 76e8dc66127c67fdc62441788fe35ecf01060ca7 | warehouse-picking-automation-challenges/rutgers_arm | /prx_planning/prx/planning/task_planners/single_shot/single_shot_specification.cpp | C++ | cpp | 900 | no_license | /**
* @file single_shot_specification.cpp
*
* @copyright Software License Agreement (BSD License)
* Copyright (c) 2014, Rutgers the State University of New Jersey, New Brunswick
* All Rights Reserved.
* For a full description see the file named LICENSE.
*
* Authors: Justin Cardoza, Andrew Dobson, Andrew Kimmel,... |
8cb9c96daf5196751a91cd925e64a92649a8ffd3 | 683ce2d8d30de8bd51cb81a036ad31639fe2cea0 | ldalzotto/Common2 | /Common2/Memory/memory.hpp | C++ | hpp | 1,321 | no_license | #pragma once
inline char* heap_malloc(const size_t p_size)
{
return (char*)::malloc(p_size);
};
inline char* heap_realloc(char* p_memory, const size_t p_new_size)
{
return (char*)::realloc(p_memory, p_new_size);
};
inline void heap_free(char* p_memory)
{
::free(p_memory);
};
inline char* memory_cpy(char* p_dst... |
5268d26ea5f5dc32e17d88eeb057b0d9a0b0cd01 | f399af08cb36ae7590b6ad6b7c45ce326751078e | Heiduo/pythontest | /display.cpp | C++ | cpp | 276 | no_license | #include <string>
#include <stdio.h>
#include <stdlib.h>
#include "display.h"
#include <iostream>
namespace display {
void TestLib::display(){
cout<<"First display"<<endl;
}
void TestLib::display(int a){
cout<<"Second display"<<endl;
}
}
|
e4670355657bdd15de710b90b209aaa6f2ea4015 | 38b68a11b04135749a6308cccbf6f93bc2ac90e7 | HemantAHK/CMG | /CMGTools/Common/src/AnalysisHistograms.cc | C++ | cc | 10,803 | no_license | //
// Original Author: Artur Kalinowski
// Created: Tue Oct 24 15:08:51 CEST 2006
// $Id: AnalysisHistograms.cc,v 1.1 2010/11/11 14:09:09 wreece Exp $
//
//
// system include files
#include <memory>
#include <bitset>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <vector>
#include "CMGToo... |
3744a99e790acbc8a1e75c5dec93f3cbe68a3133 | 389b9b1bf96ae62bba7160381b747c29f0a7ebda | rgekhman/FarManager | /far/global.hpp | C++ | hpp | 4,167 | permissive | #ifndef GLOBAL_HPP_178AC66B_7DAB_4AD7_BBE7_D5D590BB9675
#define GLOBAL_HPP_178AC66B_7DAB_4AD7_BBE7_D5D590BB9675
#pragma once
/*
global.hpp
Описание глобальных переменных
Включать последним.
*/
/*
Copyright © 1996 Eugene Roshal
Copyright © 2000 Far Group
All rights reserved.
Redistribution and use in source and bina... |
ba519b726b0ef80f3191bf224d652452492ddcd6 | 2d9971a9611a5b841f8fe5e964496fcd8f33ba7d | variablemayank/competetive-programming-codes | /duak.cpp | C++ | cpp | 410 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
int m;
cin>>m;
string a= "1";
string b= "10";
string c = "100";
string d = "101";
string soln ;
for(int i=1;i<=m;i++)
{
if(i &1)
{
... |
d530fc2874c3291c0018b9a23ab02989cd3c10a1 | f90454aac5f16c313cbf3f2908d03d345c385eac | cran/BayesXsrc | /src/bayesxsrc/mcmc/mcmc_nonp.cpp | C++ | cpp | 37,930 | no_license | /* BayesX - Software for Bayesian Inference in
Structured Additive Regression Models.
Copyright (C) 2019 Christiane Belitz, Andreas Brezger,
Nadja Klein, Thomas Kneib, Stefan Lang, Nikolaus Umlauf
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
... |
1845027f3dd0727435c8e5a26b18f9718964fdc9 | 21d182e90539154405e2a2e15d7229b9d502ab21 | marprok/serenity | /Userland/Utilities/checksum.cpp | C++ | cpp | 2,607 | permissive | /*
* Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCore/ArgsParser.h>
#include <LibCore/File.h>
#include <LibCrypto/Hash/HashManager.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (pledge("stdio rpath", nullptr) < 0) {
... |
d3f1a404d4cc504b51d5399683c55dd4ce86ced9 | 232aa86111053fb4c43580487ca9202162a198c4 | twesd/editor | /IrrlichtCLR/Core/Parsers/scriptstdstring.cpp | C++ | cpp | 30,774 | permissive | #include "scriptstdstring.h"
#include <assert.h> // assert()
#include <sstream> // std::stringstream
#include <string.h> // strstr()
#include <stdio.h> // sprintf()
#include <stdlib.h> // strtod()
#include <locale.h> // setlocale()
#include <map> // std::map
#include <irrlicht.h> // irr
using namespace std;
B... |
90ee2f518e1b3e15c9dee165cca56e09da3e4cbc | b8a7d4d9038e0fe0ff129884f368597842d3a17a | HyunJin1111/Zelter-The-GungeonD | /Zelter-The-GungeonD/dialogue.cpp | C++ | cpp | 1,448 | no_license | #include "stdafx.h"
#include "dialogue.h"
HRESULT dialogue::init()
{
return S_OK;
}
void dialogue::release(int index)
{
_vSpeech.erase(_vSpeech.begin() + index);
}
void dialogue::update()
{
for (int i = 0; i < _vSpeech.size(); i++)
{
_vSpeech[i].speechCount++;
if (_vSpeech[i].speechCount >= _vSpeech[i].speec... |
3410bcfd462cff00af1bd674f3c1549e330d5f88 | 9e82424b7c391d7f98046e29dd2f5ec4815a12b1 | caozh502/Learning | /simple_motion/simple_motion.cpp | C++ | cpp | 4,975 | no_license | #include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#include <native/task.h>
#include <native/timer.h>
// Data Type
typedef struct
{
bool Request;
bool Response;
bool Done;
double Position;
double Velocity;
double Acceleration;
double Deceleration;
double... |
09295b8a62d3ee78815ab8c7d6c4e4b77be068f6 | e150d571f922bbf2aad4182a8737103f6bc7cd04 | leshikus/dataved | /innoros/im/src/native/jawtrenderer/JAWTRenderer_Windows.cpp | C++ | cpp | 4,064 | no_license | /*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
#include "jawt_md.h"
#include "JAWTRenderer.h"
#include "windows/d3d_context.h"
#include "windows/d3d_device.h"
#include "windows/d3d_surface.h"
struct D3D... |
e5ec1956278b344ace0fc28a2a9215f6e2e2d367 | db8da1e0e2132dcb9e7f8127eb1be752f46e9167 | toddsharpe/MetalOS | /src/kernel/Devices/AcpiDevice.cpp | C++ | cpp | 6,200 | no_license | #include <cstdint>
#include <windows/types.h>
#include "Devices/AcpiDevice.h"
extern "C"
{
#include <aclocal.h>
const AH_DEVICE_ID* AcpiAhMatchHardwareId(char* HardwareId);
}
#include "Assert.h"
#include <algorithm>
AcpiDevice::AcpiDevice(const ACPI_HANDLE object) :
Device(),
m_acpiObject(object),
m_resources()
{
... |
4401874dd37659d333e8825e26234a7794d72449 | 2f3dd9969e4a30026937c91594cd0c494050d785 | DQSSSSS/Algorithm-Competition-Code | /资料/牛客2018年多校题面、标程、数据、题解/标程/牛客第七场标程/charlotte-birthday-n5.cpp | C++ | cpp | 5,635 | no_license | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
typedef long long ll;
typedef pair... |
3ea0ba8ee6807a50e0cc45f1ef0c23bd9abcd1d3 | 2a26aef5a357820b98d2d385fceb1e02588572f8 | InDey/OpenGL-Rollercoaster | /Project2/rc_spline.cpp | C++ | cpp | 1,473 | no_license | /*** @file rc_spline.cpp
*
* @brief Implementation of the rc_Spline classes
*
* You should add some code here probably.
**/
#ifdef WIN32
/* get rid of ridiculous warnings */
#define _CRT_SECURE_NO_WARNINGS 1
#endif
#include "rc_spline.h"
/* load a spline segment from a file */
void rc_Spline::loadSegmentFrom(ch... |
265ce80a5260189c5cb6b21fce96b549ed967643 | 2ac81de31d488f013c967704071f9d6f0422e7ab | ItinerantEngineer/Segs | /Projects/CoX/Servers/GameServer/GameHandler.cpp | C++ | cpp | 18,509 | permissive | /*
* SEGS - Super Entity Game Server
* http://www.segs.io/
* Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
* This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
*/
/*!
* @addtogroup GameServer Projects/CoX/Servers/GameServer
* @{
*/
#include "GameHandler.h... |
f5bd871f9729d0698600fb8e633a7b1041b01891 | 80f12e4c3f12f3955a5ab038e2fe46f17e4fff0b | secof/contrail-controller | /src/bgp/routing-policy/routing_policy.cc | C++ | cc | 10,417 | permissive | /*
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
*/
#include "bgp/routing-policy/routing_policy.h"
#include <boost/assign/list_of.hpp>
#include <boost/foreach.hpp>
#include "base/task_annotations.h"
#include "bgp/bgp_config.h"
#include "bgp/bgp_factory.h"
#include "bgp/bgp_server.h"
#include "bg... |
28746a6628945d01750dfc2196f9e6fdb26c5f90 | a97c645b6702c8e4dc379bd13d0675819ac19640 | zhanyli46/Leetcode | /Easy/110_Balanced_Binary_Tree.cpp | C++ | cpp | 1,154 | no_license | using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
bool isBalanced(TreeNode* root) {
/* Naive recursion */
/* Time: O(n^2), space: O(1) */
/* Runtime: 18ms */
... |
d7bed81598fa0a6ed3df74dd6c5ac0b812530e37 | 07100c5ec1fe2b996b7213eaf8e9a7eb47c00d19 | Satzyakiz/CP | /LeetCode/June_2020_Challenge/12th_June/Insert_delete_getRandom_O(1).cpp | C++ | cpp | 1,244 | no_license | // Design a data structure that supports all following
// operations in average O(1) time.
//
// insert(val): Inserts an item val to the set if not already present.
// remove(val): Removes an item val from the set if present.
// getRandom: Returns a random element from current set of elements.
// Each element must have... |
62a1284c8bd30794cf2a943e047bf1e3e5b7b498 | 4d6d9aadd5015a4d0a73ca42f45d47a47ddcd895 | andreypostal/programming | /URI/1278.cpp | C++ | cpp | 1,445 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
int n;
bool primeiro = true;
while (scanf("%d", &n) && n)
{
if (!primeiro)
putchar('\n');
primeiro = false;
getchar();
string m[n + 1];
int maior = 0;
for (int i =... |
291a861f629cbc8b716152564190712acec3bf90 | 923b297f32436ebfaa026c2bca3f0d267f08d42f | jleidel/sst-elements | /src/sst/elements/CramSim/c_CmdScheduler.cpp | C++ | cpp | 5,277 | permissive | // Copyright 2009-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONTRIBUTORS.TXT in the top level directory... |
c5397477020fba9cef61262b6ab80917c1b2c1c3 | ae58f9904fb5cfa39cbff5fa38376b561f8761e9 | Utkarsh1999/data-structures-online-course-cpp | /CPP/Lecture-04 Codes/cin_cinget.cpp | C++ | cpp | 241 | no_license | #include<iostream>
using namespace std;
int main(){
char a,b;
//cin>>a>>b;
a = cin.get();
b = cin.get();
//cin ignores all whites spaces
// cin.get doesn't ignore any space
cout<<int(a)<<endl;
cout<<int(b)<<endl;
return 0;
} |
e4cbdcd1771d703ce41be87390af9f62b52ae802 | be09eae451488f7d43ad4f51e3dd065935083fc4 | ttzztztz/leetcodeAlgorithms | /链表/25. Reverse Nodes in k-Group.cpp | C++ | cpp | 1,553 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* reverseKGro... |
d712efe2d48e648e25424bd735a5b7f4e68750a2 | 9f04cf223e7b5ebdb1e8d9f664ea9bcfa7df9bfd | sk-git/config | /configure/rawData.cpp | C++ | cpp | 2,567 | no_license | /***************************************************************************
*
* Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
*
**************************************************************************/
/**
* @file rawData.cpp
* @author map(com@baidu.com)
* @date 2015/06/08 18:24:39
* @brief ... |
720ec2580e49759adb83448e4f4519c6f354f6fb | 7572c94d71cfa46da3e314a7eea4f3099828746a | Kangda/Upnp-AV-Demo | /src/mediarenderer/hmediarenderer_device_p.cpp | C++ | cpp | 12,985 | no_license | /*
* Copyright (C) 2011 Tuomo Penttinen, all rights reserved.
*
* Author: Tuomo Penttinen <tp@herqq.org>
*
* This file is part of Herqq UPnP Av (HUPnPAv) library.
*
* Herqq UPnP Av is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by... |
016ef0e95a922bf6d2070e708f13f7819fc702dd | d6a2111ec667dc4ff20140465903be2bdf73778a | marl0ncode/crush | /src/TitleState.cpp | C++ | cpp | 3,387 | permissive | /*********************************************************************
Matt Marchant 2014 - 2015
http://trederia.blogspot.com
Crush - Zlib license.
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 softw... |
d2b2841a9abe99e0ab3b81865dbefc306628ed2e | cce4a3b71ca87e201d3b7e5568f0e618aa976c62 | Kaivalya4/Standard-Template-Library | /Basics of Templates/template_function_overloading.cpp | C++ | cpp | 1,235 | no_license | #include<iostream>
using namespace std;
// non template function --
int max(int a , int b) // --- a
{
cout<<" max(int , int )is called" ;
return a>b ? a: b;
}
template <typename T > // --- b
T max(T a, T b)
{
cout<<"max(T ,T )is called";
return a>b ? a: b;
}
template<typename T> ... |
a8df5a66f42e8c41f0ac531e9d42fe8982ae9005 | 1ed56618edd752a689d2f73d8d518b76fd1b63d1 | Bots-United/yapb3 | /Core tool library/RandomNumberGenerator.cpp | C++ | cpp | 1,424 | no_license | //
// Copyright © 2003-2010, by YaPB Development Team. All rights reserved.
//
// 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 righ... |
8732958265f85e3a05fa4bfb9e42744321c5c479 | 7753e2dcfc79235bfe570a87c526233bb59b6022 | galeone/tensorflow | /tensorflow/compiler/xla/pjrt/distributed/distributed.cc | C++ | cc | 1,409 | permissive | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
ec1c063eb752ba8d19f28d3f02deb6c1875b222b | a65b5edea082430a1bd662aa9770aee5478f5515 | iflowingwater/Farrowing | /PigDetector.cpp | C++ | cpp | 14,886 | no_license | #include "PigDetector.h"
#include <cmath>
#include <io.h> //判定文件夹是否存在
#include <direct.h> //创建文件夹
#include <algorithm>
#include <fstream>
#include <stdio.h> //删除文件函数remove 需要此文件头
#include <cstdlib>
#include <climits>
using namespace std;
using namespace cv;
using namespace caffe::Frcnn;
//****************静态变... |
4ae4e6b5b0bdcb63b017b24c62d33f64333ca62b | 1c6507ba0a306be1e2d21f89f3a413d6f326a099 | kunhuicho/crawl-tools | /codecrawler/_code/hdu5435/16216952.cpp | C++ | cpp | 2,503 | no_license | /**
hdu5435 æ°ä½dpï¼å¤§æ°çå¤çï¼
é¢ç®å¤§æï¼ä¸ä¸ªæ°åçå¼ä¸ºå®å个ä½ä¸æ°å弿çç»æï¼ç»å®ä¸¤ä¸ªæ°ï¼é®äºè
éåºé´å
ææææ°åå¼å¾å为å¤å°ï¼
è§£é¢æè·¯ï¼æç¨çæ¯è®°å¿è¯æç´¢çåæ³ï¼å¥½åéå½èæ¶æ¯è¾å¤å§ï¼æ¯èµæ¶è¿äºï¼åæ¥ç»å¤æäºï¼æ... |
3d360715d648b544f71a7af51093cba76c8ec07f | 6c407470048e9914cb20ff57111ffe658665f485 | raydtang/struct | /struct.cpp | C++ | cpp | 1,034 | permissive | #include "Struct.h"
namespace Struct {
#ifdef ARDUINO
template <>
double unpack<double>(uint8_t* packed, bool littleEndian) {
union {
float f;
uint8_t b[4];
} fn;
if ( littleEndian ) {
int16_t expd = ((packed[7] & 127) << 4) + ((packed[6] & 240) >> 4);
int16_t expf = expd ? (expd - 1024) + 128 : 0... |
d3b9ef92f613047a20c01171ae228a4fd24b15a5 | 5fe7881d9c07f03857d47e5334dc8145bb62b4ae | Arwedda/SOFT351 | /Coursework 2/Boids/Boid.cpp | C++ | cpp | 10,699 | no_license | #include "DXUT.h"
#include "Boid.h"
std::mt19937 rng;
std::uniform_int_distribution<uint32_t> turn(1, 3);
std::uniform_int_distribution<uint32_t> acceleration(1, 3);
Boid::Boid()
:Thing3D() {
speed = 0.0;
maxForward = 10.0;
maxReverse = 0.0;
dragCoefficient = 0.5; //Playing with arbitrary numbers
mass = 300.0;... |
e5508d6845f3faa264b5990e5e420c57471926c6 | ef2fd731cdf0249eb4983f0b186d26408f6171cb | Dania-Abuhijleh/Try2 | /z3-z3-4.8.12/src/sat/smt/fpa_solver.cpp | C++ | cpp | 14,376 | no_license | /*++
Copyright (c) 2014 Microsoft Corporation
Module Name:
fpa_solver.cpp
Abstract:
Floating-Point Theory Plugin
Author:
Christoph (cwinter) 2014-04-23
Revision History:
--*/
#include "sat/smt/fpa_solver.h"
#include "ast/fpa/bv2fpa_converter.h"
namespace fpa {
solver::solver(euf::solver& ctx)... |
36409b37d6e9bba27fc22e9e999f936b4ea2c830 | 6d07eed6a31ff9361f4d8d971e61df39c8a401a4 | josephbisch/namecoin-core-1 | /src/rpcmisc.cpp | C++ | cpp | 16,487 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
#include "clientversion.h"
#include "init.h"
#include "main.h"
#in... |
b54a0de78fafcebc3e0c0e66a52786138259f760 | 62b0b73bfe715362ae39319fd3227d0615a4bf38 | AnomalousMedical/CMake-OldFork | /Source/cmUnsetCommand.cxx | C++ | cxx | 1,999 | permissive | /*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This... |
241f61e717448b318a92a5aebc35e0da63c960a1 | 8cdb73b33030666813d67700c91343bdf3b49894 | ssijonson/Rengen_Luch | /xray-svn-trunk/xr_3da/xrGame/PhysicsShellScript.cpp | C++ | cpp | 4,427 | no_license | #include "pch_script.h"
#include "physicsshell.h"
using namespace luabind;
Fmatrix global_transform(CPhysicsElement* E)
{
Fmatrix m;
E->GetGlobalTransformDynamic(&m);
return m;
}
#pragma optimize("s",on)
void CPhysicsShell::script_register(lua_State *L)
{
module(L)
[
class_<CPhysicsShell>("physics_shell")
... |
7699d7f777e67d0664a6ea98fc188f03c4218b56 | b45c87e7e77d253a6d19e8954668b8485d9d94f3 | sdk-team/aliyun-openapi-cpp-sdk | /mts/src/model/ReportFpShotJobResultRequest.cc | C++ | cc | 2,993 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
d1a1d4ed25dad5000143772a6aab8f7f19ff4667 | 8cf02ce4073baf37d5040bd4ec6d60b369ae62f4 | SCIInstitute/fluorender | /FluoRender/FluoRender/Cluster/kmeans.cpp | C++ | cpp | 3,670 | permissive | /*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2018 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to d... |
99db903d1ddc2878cc13172c607984749c0bcec2 | b6c3ec25f7feacd772d66c0c2a82c0b0b6b7d0c0 | maximegmd/aws-sdk-cpp | /aws-cpp-sdk-core-tests/utils/FileSystemUtilsTest.cpp | C++ | cpp | 1,504 | permissive | /*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in ... |
912d4f7ab9036ca0c75cdc67e547a5264f27ec47 | 6081eb1899e99e053d9e0d677452a12f740d6b02 | oninoni/OniEngine | /Engine/Engine/RecourceLoader.cpp | C++ | cpp | 12,066 | no_license | #include "stdafx.h"
#include "lodepng.h"
#include "Vertex.h"
#include "Mesh.h"
#include "Shader.h"
#include "ShaderHandler.h"
#include "RecourceLoader.h"
Mesh *RecourceLoader::loadOBJ(string fileName, ShaderHandler* shaderHandler) {
vector<vec3> positions;
vector<vec3> normals;
vector<vec2> uvs;
ve... |
53dc58bf1b15d4d486158772df6096a4eed6513e | 1ac7c7bbfeb14f29866c88d1a69f3da22a2d2b1d | Stephenhua/CPP | /interview_Code/Code/2020-5-18-1.cc | C++ | cc | 907 | no_license | #include<iostream>
#include<vector>
#include<map>
#include<string.h>
#include <algorithm>
using namespace std;
int res_x,res_y,countH;
void FindPathCore(vector<vector<int>>& hei ,int x, int y){
while( x>0 && x<hei[0].size()&& y>0&& y<hei.size()){
hei[x+1][y]
}
}
void FindPath( vector<vector<int>>& he... |
d180d851f8ca11f21ee094e8bc2d3e63081bc4ec | 1e2f5c6fa77b5564ed4dffb39ab9a7541e961bf6 | cnsuhao/apitrace | /retrace/d3d11state_images.cpp | C++ | cpp | 22,984 | permissive | /**************************************************************************
*
* Copyright 2014 VMware, Inc.
* Copyright 2011 Jose Fonseca
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"),... |
ac0bfea22fafe245ee147658d989cd136f276428 | e203a7f4390d745ff8ea747d37d4c9539f954bb9 | yichiehqq/Allegro5OOPTemplate | /TowerDefense/TowerDefense/PlayScene.cpp | C++ | cpp | 16,112 | no_license | #include <allegro5/allegro.h>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <functional>
#include <vector>
#include <queue>
#include <string>
#include <memory>
#include "AudioHelper.hpp"
#include "DirtyEffect.hpp"
#include "Enemy.hpp"
#include "GameEngine.hpp"
#include "Group.hpp"
#include "IObject... |
3ad0c0414ad53f7ee1f5602a35b7f4dfacaa1dd2 | ff15b73f756dbf24749cc968ae4a7dae2c75fbd4 | alibaba/MNN | /source/backend/cpu/CPUOneHot.hpp | C++ | hpp | 554 | permissive | //
// CPUOneHot.hpp
// MNN
//
// Created by MNN on 2019/11/29.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef CPUOneHot_hpp
#define CPUOneHot_hpp
#include "core/Execution.hpp"
namespace MNN {
class CPUOneHot : public Execution{
public:
CPUOneHot(Backend* b, int axis):Execution(b), mAxis(axis)... |
434bf01a25805a28d9dea638f0cfa60b14d809f5 | 40873263bcd36ae7d8cff60e50612bbdeaf8dabd | Alex-Stevens/GitExplorer | /GitExplorer/GitExplorer/CommandProvider.cpp | C++ | cpp | 3,972 | no_license | #include "CommandProvider.h"
#include "CommandEnumerator.h"
#include "Command.h"
#include "resource.h"
#include "Guid.h"
#include "GitExplorer.h"
#include "Utils.h"
#include <cpprest/http_client.h>
#include <cpprest/filestream.h>
using namespace utility; // Common utilities like string conversions
... |
1f2091c677743bbbbac651cc8ae02b5c4f332414 | d748c34782c4b7f89fa0ff8ddfa4c48dec9708fd | eddyekofo94/CppBasics | /Exercise1/include/int_stack.hpp | C++ | hpp | 224 | no_license | #pragma once
class int_stack
{
private:
int top;
int *array;
int n_element;
public:
int_stack();
int_stack(int);
~int_stack();
void push(int);
int full();
int empty();
int pop();
};
|
834c58b7dbf6f84c7b1bfa4f423e23fce37c2d76 | 9a245cb13933913180dff7a40639afd71057b82c | omarosamahu/CPP | /problem_solving/ch1_1.cpp | C++ | cpp | 461 | no_license | #include <iostream>
void nat_div(int *arr,int s){
for(int i=0;i<s;i++){
if(arr[i]%3 ==0 || arr[i]%5 ==0){
std::cout << "The element " << arr[i] << " is divisible by 3 or 5 \n";
}
}
}
int main(int argc, char const *argv[])
{
int n;
std::cout << "Please enter the range o... |
b0f713cf6b74152eda8b00345c7d905156dc059c | f30bb41e826154b9b30f00df0af884c1f4797677 | SAGGSOC/CodeChef-Programs | /lis.cpp | C++ | cpp | 567 | no_license | #include <stdio.h>
#include <stdlib.h>
int lis(int arr[], int n)
{
int *lis, i, j, max=0;
lis = (int *)malloc(sizeof(int)*n);
for(int i=0;i<n;i++)
lis[i]=1;
for(i=1;i<n;i++)
{
for(j=0;j<i;j++)
{
if(arr[j]<arr[i])
lis[i]=max(lis[i],lis[j]+1);
}
}
for(int i=0;i<n;i++)
{
if(max<... |
3ceeb07244e83baacd2d7e924a91ca2a9c21eeef | 4ce7c10b213cd6dc079cd131394299e43e72add5 | MCFR/cpp_pool | /cpp_d15_2018/ex06/ex06.hpp | C++ | hpp | 934 | no_license | /*
** EPITECH PROJECT, 2019
** ex06.hpp
** File description:
** @epitech.eu
*/
#ifndef EX06_HPP_
#define EX06_HPP_
#include <string>
#include <sstream>
template<typename T1, typename T2 = T1>
class Tuple {
public:
T1 a;
T2 b;
std::string toString() {
return s... |
08848076600dad95188fa2a7bb85ab7e94e8b444 | 99679bc9b137891a2bc20c07beba05b8b16d84e9 | shafik/llvm-project | /mlir/lib/Dialect/Tensor/Transforms/EmptyOpPatterns.cpp | C++ | cpp | 2,981 | permissive | //===- EmptyOpPatterns.cpp - Patterns related to tensor.empty folding ----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------... |
bfb20f37e94da22cb30cec7a617cad1674deb6ce | 313e37ed2cd7b4f169d6157a3d80a4dcbd036aae | thezbyg/gpick | /source/test/Result.cpp | C++ | cpp | 3,866 | permissive | /*
* Copyright (c) 2009-2020, Albertas Vyšniauskas
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of... |
9fc33cc8159868f530af9a6b90533566c6350893 | 4473d7e040f0a68de5aa95bc3ab1beb5a9d8492a | Procyon01/ThirdPerson | /Source/ThirdPersonCode/ThirdPersonCodeGameMode.cpp | C++ | cpp | 525 | no_license | // Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#include "ThirdPersonCodeGameMode.h"
#include "ThirdPersonCodeCharacter.h"
#include "UObject/ConstructorHelpers.h"
AThirdPersonCodeGameMode::AThirdPersonCodeGameMode()
{
// set default pawn class to our Blueprinted character
static ConstructorHel... |
f97b195a4863e0ece7a867a41e74b93f92be52f9 | 64135272efd054b4ccbf24b08477297544a8c7b3 | xiechun0318/viztest | /Viztest/Viztest.cpp | C++ | cpp | 1,055 | no_license | // Viztest.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include "opencv.hpp"
#include "opencv2/viz.hpp"
#include <iostream>
using namespace cv;
using namespace std;
/**
* @function main
*/
int main()
{
/// Create a window
viz::Viz3d myWindow("Viz Demo");
/// Start event loop
myWindow.spin();
... |
f23a982b2c550b98070e1796c7c75c01553a0646 | 6054de6671ec46d9a80ec8ad45a647cb765d71c8 | hbdlyao/HVDC | /bak/mcSolveMvc/Code/U3pApp/C3pVars.cpp | C++ | cpp | 636 | no_license | ///////////////////////////////////////////////////////////
// C3pVars.cpp
// Implementation of the Class C3pVars
// Created on: 18-5ÔÂ-2017 8:36:16
// Original author: open2
///////////////////////////////////////////////////////////
#include "C3pVars.h"
C3pDevGrid* C3pVars::pGrid = nullptr;
C3pVars::~C3p... |
2b5915001a3a0020210f64e42aa81a2154d451d9 | 8e318746e7d53fd92975af9b23fa5e21018b63a9 | bugbit/cipsaoscar | /cursovideojuegos/theflostiproject/3rdParty/boost/libs/range/test/const_ranges.cpp | C++ | cpp | 1,884 | no_license | // Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/li... |
5331a798523163690793324b0bcda6d42b11b37e | f3b64a580cf60d469c83d9484cfd94c599b82aee | bovee/rdkit | /Code/GraphMol/Wrap/rdmolfiles.cpp | C++ | cpp | 27,910 | permissive | // $Id$
//
// Copyright (C) 2003-2010 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include "rd... |
751a9cb181df6b458dbc709ecca905174e430b49 | 1f1cdeca9d6053bcb250bab9f39b9446d2c937e8 | adamaguilar/Project-Euler | /Problem2.cpp | C++ | cpp | 661 | no_license | /*
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
*/
#in... |
a36ca6493030852e7d3b73b4c76af84dac658123 | 2544210319026623693d4bdf3cbe8c3251322a24 | AglaianWoman/leechcraft | /src/plugins/eleeminator/colorschemesmanager.cpp | C++ | cpp | 3,749 | permissive | /**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2014 Georg Rudoy
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organization... |
985d7f63147191378daa7badecaf076036e9bab1 | 9c6cde75e015f878ee0d764c120b1577e2bbb61c | xlnx/first-vulkan-triangle | /src/main.cc | C++ | cc | 21,212 | no_license | #include <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <optional>
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <vulkan/vulkan.hpp>
using namespace std;
using namespace glm;
// using namespace vk;
constexpr auto MAX_FRAMES_IN_FLIGHT = 2;
vector<const ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.