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 |
|---|---|---|---|---|---|---|---|---|
37164a850b1b94c8d709be764f54cb4e3f4bc6a4 | e3ae69370d203fdabff27ae8a06460bd812dc849 | malathidhandapani/Competitive-Coding | /CodeChef/Beginner/FLOW018.cpp | C++ | cpp | 639 | permissive | #include "bits/stdc++.h"
using namespace std;
# define MOD 1000000007
# define GETCHAR getchar_unlocked
typedef long long ll;
inline ll readllInt() {
ll n = 0;
char c;
while (1){
c=GETCHAR();
if(c=='\n'||c==' ') break;
n = n * 10 + c - '0';
}
return n;
}
inline int readInt()... |
f305de15faa18a2e6ffb5fbc9ecc7d37d7351a65 | d2aa299b7f225966f0a7c11a57fc9ecc301dcce2 | wholien/chromium | /chrome/browser/metrics/chrome_metrics_service_client.cc | C++ | cc | 37,139 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/metrics/chrome_metrics_service_client.h"
#include <stddef.h>
#include <set>
#include <utility>
#include <vector>
#include "bas... |
8db0f6cb6ff8837c146489ecfd9033979abe40ce | e4a1bbf771bf2fe781606e190bcd446b1f8f3b46 | ghostplant/SPTAG | /AnnService/inc/Core/Common/cuda/Distance.hxx | C++ | hxx | 11,691 | permissive | /*
* Copyright (c) 2019-2020, NVIDIA CORPORATION. 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 rights t... |
22fae509fd06c0d1ee35b7c747478ceaebda4673 | aace52588f2ea594c1a5f07d4157c9a4e32234b1 | Mokosha/ign-gazebo | /src/SdfGenerator_TEST.cc | C++ | cc | 33,926 | permissive | /*
* Copyright (C) 2020 Open Source Robotics Foundation
*
* 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 appl... |
88b225344b7bfc3e656d91bdd1decc00c8e90f52 | 903c535a283034e676aca177c42388aaf2a2e814 | apaffenholz/polymake_bimatrix_games | /apps/bimatrix_games/src/perl/wrap-nash_equilibria.cc | C++ | cc | 1,593 | no_license | /* Copyright (c) 1997-2010
Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Darmstadt, Germany)
http://www.polymake.de
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either v... |
4c34eb2bb4056b6c402ecac89f16e9ebcebcf384 | e493c37a0d2895ef482eb988800a0f37174c1ed2 | schonmann/icpc-project | /uri/uri1149.cpp | C++ | cpp | 327 | no_license | #include <iostream>
using namespace std;
int gaussianSum(int n) {
return n*(n+1)/2;
}
int main(void) {
int a, n; cin >> a;
while(n <= 0) cin >> n;
cout << -gaussianSum(max(0,a) > 0 ? 0 : max(0,a)) + gaussianSum(max(0,a+n) > 0 ? 0 : max(0,a+n)) + gaussianSum(a+n-1) - gaussianSum(a-1) << endl;
retu... |
296f012d48538df63b22a022b7b42a088aacecf1 | cf7195d14c16dda61d626268c58ad9e20757046a | light-0ff/OOP | /STL/Map/main.cpp | C++ | cpp | 2,484 | no_license | #include<iostream>
#include<string>
#include<vector>
#include<list>
#include<map>
//#define STL_MAP
#define DICTIONARY
void main()
{
setlocale(LC_ALL, "");
#ifdef STL_MAP
std::map<int, std::string> week =
{
std::pair<int, std::string>(0, "Sunday"),
std::pair<int, std::string>(1, "Monday"),
std::pair<int, std... |
1c404fc689a2f3d1376723f407cff6ab8c0a6d68 | ff7868b2aa9ed28524ed3bff2cd8b4abe1cd7292 | PeterZhouSZ/Cagelab2018 | /skinning/noCageSkinning.cpp | C++ | cpp | 307 | no_license | #include "noCageSkinning.h"
NoCageSkinning::NoCageSkinning()
{
}
NoCageSkinning::NoCageSkinning(Character * _character, Cage * _cage)
:CageSkinning(_character, _cage)
{
weights = new Weights(0,0);
}
void NoCageSkinning::deform()
{
}
Weights * NoCageSkinning::getWeights()
{
return weights;
}
|
eb7b3a998cd4392664eb83bf4dac1de6bcc8beaf | 0d421cb4b7108c338a967807ca40437853679454 | MohamedSadid/CodeForces | /B - Teams Forming.cpp | C++ | cpp | 769 | no_license | #include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <sstream>
//#include <vector>
//#include <math.h>
#define LOG(x) cout << (x) << endl;
#define ARR_LOG(x) for(auto c : x) {cout << c << " ";};
//#define ALL(x) (x).begin(), (x).end()
using namespace std;
in... |
6f92d1e0c2b261bf8d4358c9a10c6936e37b1578 | 15ed04a6e1543acafc6d3277433ad74198e337b0 | CSP17SCM37A/Cpp-Data-structures | /B+ Tree.cpp | C++ | cpp | 7,192 | no_license | #include<iostream>
using namespace std;
// A BTree node
class BTreeNode
{
int *keys; // An array of keys
int t; // Minimum degree (defines the range for number of keys)
BTreeNode **C; // An array of child pointers
int n; // Current number of keys
bool leaf; // Is true when node is leaf. ... |
c21fa7de7523f585aaa704b4167496590251eefa | a1d96468aa348a5c766b52a693532cd3c405576d | max-tadeusz/CppND-System-Monitor | /src/linux_parser.cpp | C++ | cpp | 7,324 | permissive | #include <dirent.h>
#include <unistd.h>
#include <string>
#include <vector>
#include "linux_parser.h"
using std::stof;
using std::string;
using std::to_string;
using std::vector;
string LinuxParser::OperatingSystem() {
string line;
string key;
string value;
std::ifstream filestream(kOSPath);
if (filestream... |
e63f072e694a41aa860ba408581875f21db29434 | 6858666e51ad7c1492d07aaf305038de8540879b | happyfire/gles2.0 | /src/eslib/scene/Scene.cpp | C++ | cpp | 1,540 | no_license | #include "eslib/scene/Scene.h"
#include "eslib/components/Camera.h"
#include "eslib/components/Transform.h"
NS_ESLIB_BEGIN
Scene::Scene()
{
m_root = new GameObject();
}
Scene::~Scene()
{
}
const GameObjectPtr& Scene::getRoot()
{
return m_root;
}
GameObjectPtr Scene::createCamera()
{
GameObjectPtr ... |
a1bad62d7dd794f7d136388402485ce8e830bee8 | 884aeaaf029603cbdf262ab2ea44df5f84e5b938 | portsip/resiprocate | /reTurn/RemotePeer.hxx | C++ | hxx | 2,436 | permissive | #ifndef REMOTEPEER_HXX
#define REMOTEPEER_HXX
#include "StunTuple.hxx"
namespace reTurn {
class RemotePeer
{
public:
explicit RemotePeer(const StunTuple& peerTuple, unsigned short channel, unsigned int timeoutSeconds);
unsigned short getChannel() const { return mChannel; }
void setChannel(unsigned short c... |
08b7cccc746457daf612fc6ac3f55cc4c63932bb | 5912b09f0f3d09a0edceccdaf9a41fab1b770f44 | aous72/OpenJPH | /src/core/coding/ojph_block_encoder_avx512.cpp | C++ | cpp | 43,322 | permissive | //***************************************************************************/
// This software is released under the 2-Clause BSD license, included
// below.
//
// Copyright (c) 2019, Aous Naman
// Copyright (c) 2019, Kakadu Software Pty Ltd, Australia
// Copyright (c) 2019, The University of New South Wales, Australi... |
da5050016d4b44d7cbeb61972b4dca6c4bc60879 | d1f779f05f68e7b3c119682c6dfcc6f0419c7912 | thetrueoneshots/CWSDK | /plasma/TextShape.cpp | C++ | cpp | 1,286 | no_license | #include "TextShape.h"
#include "TextShape.h"
#include "TextShape.h"
#include "TextShape.h"
#include "TextShape.h"
#include "TextShape.h"
#include "../cwsdk.h"
plasma::TextShape::~TextShape()
{
((void (*)(plasma::TextShape*))CWOffset(0x329730))(this);
}
void plasma::TextShape::Load(bool flag)
{
((void (*)(plasma::T... |
7ec22135b92a62e829759dcefab9c39d4d3f16b2 | e23c0079f2bb65bd24d6e4f7e2757ed8276dbd7e | Nom1vk/pcl | /Android/apps/android/BodyParts/jni/bodyparts/org_pointclouds_bodyparts_Cloud.cpp | C++ | cpp | 1,476 | permissive | #include "org_pointclouds_bodyparts_Cloud.h"
#include "jni_helper.hpp"
#include "cloud.h"
namespace
{
jmethodID meth_ctor;
}
JNIEXPORT void JNICALL
Java_org_pointclouds_bodyparts_Cloud_cacheIds
(JNIEnv * env, jclass clazz)
{
cachePtrID<Cloud> (env, clazz);
meth_ctor = env->GetMethodID (clazz, "<init>", "(J)V"... |
27055d7eb110deae56dc48fb7f92f3f3e6e3e175 | ea6705f70be21273cc9a85be2aea42822ae0add7 | chriscucco/Dune | /src/UnidadesMovibles/sardaukar.cpp | C++ | cpp | 1,567 | no_license | #include "sardaukar.h"
#include "../Armas/rifle_asalto.h"
#include "../Armas/lanza_misiles.h"
#define ID_SARDAUKAR 13 //para usarlo en el protocolo
//DATOS DE INICIALIZACION HARCODEADOS (VAN A VENIR DEL ARCHIVO CONFIG)
Sardaukar::Sardaukar(int id, int id_duenio, std::pair<int, int> centro,
Root &root) :
UnidadInfa... |
6ac78923df31cac638c620664d5d598168eb4848 | 3878ad3501dc7cccc1d1b7aa2492a1a62519ea8e | chinhhi102/GiaiThuat | /kattis/ThamLam/Equal Sums (Easy).cpp | C++ | cpp | 2,582 | no_license | #include <map>
#include <set>
#include <queue>
#include <cmath>
#include <vector>
#include <cstdio>
#include <bitset>
#include <cstring>
#include <cstdlib>
#include <complex>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <iomanip>
#include <list>
#include <ctype.h>
#include <stack>
#include <itera... |
c23e47e04b04a9d481cd281bb96acad6bb8872a0 | 0b57d60d0b724b7ad77d47e340aa210c8f51a5eb | khotilov/cmssw | /AnalysisExamples/SusyAnalysis/src/MatchObjects.cc | C++ | cc | 14,383 | no_license | #include "AnalysisExamples/SusyAnalysis/interface/MatchObjects.h"
using namespace std;
using std::vector;
using std::cout;
using std::endl;
// Constructor:
MatchObjects::MatchObjects(vector<MrParticle*>* pData,
vector<MrParticle*>* pMC):
RecoData(*pData), MCData(*pMC),
DEBUGLVL(0),
mo_e... |
83e77287600743d7c42fbe87b7619f6c082b9139 | 49f28d75007abf5c121ba3440e59c5a31e05170c | msxxxp/main | /LIB/far3/include/far3/~editor/common.hpp | C++ | hpp | 1,455 | no_license |
/**
© 2014 Andrew Grechkin
Source code: <http://code.google.com/p/andrew-grechkin>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option)... |
7069028e34e05aeaf6222f4a8609554f68486117 | 79b73a9d5a8424aba828ba05bafb9a57ac6f9b47 | cjsoft/inasdfz | /d0706/7.6/source/成都七中-tangyuhao/name.cpp | C++ | cpp | 594 | no_license | #include <cstdio>
#include <algorithm>
#include <iostream>
using namespace std;
int v[100009][2],cur[100009],n,m,l,r,x;
long long ans;
void solvebr(){
for (int i=1;i<=n;i++){
scanf("%d",&v[i][0]);
}
for (int i=1;i<=n;i++){
scanf("%d",&v[i][1]);
}
scanf("%d",&m);
while(m--){
scanf("%d%d%d",&... |
6d7c08520b577d5aa708602f63f4e162d5d08057 | 65af0d95c87408670e0a9d9d82bcce98386804f8 | iridium-browser/iridium-browser | /extensions/browser/api/networking_private/networking_private_chromeos_unittest.cc | C++ | cc | 48,393 | permissive | // Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <string>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/json_string_value_serializer.h"
#include "base/... |
ec693dd777fad6f96414e2be1fe071e20ac75f08 | c0a4736db07d29b7baf843dda6a5d88aeb4eb0d1 | marlonwc3/cp-codes | /URI/URI1253==Cifra de César.cpp | C++ | cpp | 1,368 | no_license | #include <bits/stdc++.h>
#define _ printf("\n");
#define sc1(a) scanf("%d", &a)
#define sc2(a,b) scanf("%d %d", &a, &b)
#define sc3(a,b,c) scanf("%d %d %d", &a, &b, &c)
#define sc4(a,b,c, d) scanf("%d %d %d %d", &a, &b, &c, &d)
#define iz(b) if(b==0) { break; }
#define pf(a) printf("%d ", a);
#define pfc(c,a) printf("%... |
b5a1dd9d55646e9c4b63d2bb3613012f39a305d2 | 68d63a609663ef650e7776a8df97d48f4dcc172a | KhalilBellakrid/lib-ledger-core | /core/test/lib/boost/boost/asio/experimental/impl/detached.hpp | C++ | hpp | 2,221 | permissive | //
// experimental/impl/detached.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
... |
17edd110a959a5106cfef7bdd9113a89a86a0695 | 31b4da0ef979e1977ee89558056d45c2625ab1c8 | zenoalbisser/chromium | /third_party/WebKit/Source/core/animation/animatable/AnimatableStrokeDasharrayList.cpp | C++ | cpp | 4,135 | permissive | /*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
0c14646d924592c2fcf132b26e7928fa1e2e45d4 | 35a8c4cca3e04d28dabee60af582d2203b567d37 | SahilDhingra172000/Cpp | /halfpyramidafter180rotation.cpp | C++ | cpp | 204 | no_license | #include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
if(j<=n-i)
{
cout<<" ";
}
else
{
cout<<"*";
}
}
cout<<endl;
}
}
|
091c0cfbb73324bab2fe58e30291ee4502ff8419 | 1c55895b139b829201eeaa2046c4fc4df95f41c2 | GAOHunter/tensorflow_c_api_sample | /src/main.cc | C++ | cc | 2,013 | no_license | #include "semantic.h"
#include "opencv2/opencv.hpp"
#include <time.h>
using namespace cv;
int main()
{
bool PROFILE = true;
// your pb file address, input tesnor name, and output tensor names (can be multiple) should be provided here
std::string pb_model_file = ".....pb";
std::string input_tensor_name ... |
296e72958af8a228331d63bf00633382042adfc1 | 2bd5f59c7fc9a368b69fab09c5e3a7d778b0ebe7 | guluchen/z3 | /src/solver/solver2tactic.cpp | C++ | cpp | 6,287 | permissive | /*++
Copyright (c) 2016 Microsoft Corporation
Module Name:
solver2tactic.cpp
Abstract:
Convert solver to a tactic.
Author:
Nikolaj Bjorner (nbjorner) 2016-10-17
Notes:
--*/
#include "solver/solver.h"
#include "tactic/tactic.h"
#include "tactic/generic_model_converter.h"
#include "solver/solver2t... |
b3a5f814927c0fb1a5a812c456fe12aeb7c79d74 | 61125ffd2cd0300d0ac591aa18d2e226836e2844 | EkaterinaStepanova/Bioinformatics | /2.2.Peptide_Encoding_Problem/2.2.Peptide_Encoding_Problem/2.2.Peptide_Encoding_Problem.cpp | C++ | cpp | 3,216 | no_license | #include <iostream>
#include <string>
#include <unordered_map>
std::unordered_map<std::string, char> RNACodonTable = { {"AAA", 'K'},
{"AAC", 'N'},
{"AAG", 'K'},
{"AAU", 'N'},
{"ACA", 'T'},
{"ACC", 'T'},
{"ACG", 'T'},
{"AC... |
5a8a0da416cb440c3d4abc975e3891156b0d3e98 | 9f830764465d7f6b51a41a753c8daa47d1c861cc | JumHorn/leetcode | /Cplus/SequentialDigits.cpp | C++ | cpp | 635 | permissive | #include <vector>
using namespace std;
class Solution
{
public:
vector<int> sequentialDigits(int low, int high)
{
int sequence[] = {0, 1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789};
int increase[] = {0, 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111};
int num = 0, tmp = low;
w... |
496873cd79df356823b48986a69cbf281a088ee0 | c833290802bc64b0d45872a829d21fadbea53862 | aman1228/LeetCode | /Algorithms/minimum-factorization.cpp | C++ | cpp | 2,221 | no_license | // 625. Minimum Factorization
// https://leetcode.com/problems/minimum-factorization/
/*
Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a.
If there is no answer or the answer is not fit in 32-bit signed integer, then return 0.
Example 1
Input:
48
Outpu... |
6bf01393bc9c0118da71ce436952c64a9edc120b | 922fc9e10561503bbaa79faaf7836feaf90b0fd9 | Connor-Grehlinger/HTTP-Caching-Proxy-Server | /src/ProxyRequestHandlerFactory.cpp | C++ | cpp | 416 | no_license | #include "ProxyRequestHandlerFactory.h"
#include "logging/aixlog.hpp"
namespace Poco {
namespace Net {
ProxyRequestHandlerFactory::ProxyRequestHandlerFactory()
{
}
ProxyRequestHandlerFactory::~ProxyRequestHandlerFactory()
{
}
ProxyRequestHandler* ProxyRequestHandlerFactory::createReq... |
8be9ee2705008220d49ee4528021a077dd2805b4 | 7fed67e5ab13982ef8566715ac8613577e32a422 | uvbs/wx2Server | /Common/Packets/GCSpecialObj_ActNow.cpp | C++ | cpp | 1,377 | no_license | // GC_SpecialObj_ActNow.cpp
//
/////////////////////////////////////////////////////
#include "stdafx.h"
#include "GCSpecialObj_ActNow.h"
using namespace Packets;
BOOL GCSpecialObj_ActNow::Read( SocketInputStream& iStream )
{
__ENTER_FUNCTION
iStream.Read( (CHAR*)(&m_nObjID), sizeof(m_nObjID));
iStr... |
d2084f503321b0f71fd05b42d25111b0ef1e3ad6 | 63193aee88649a07c08386b5f31e0fe918c35c3f | vibhoraggarwal/MSCL | /MSCL/source/mscl/MicroStrain/MIP/MipChannel.cpp | C++ | cpp | 2,400 | permissive | /*******************************************************************************
Copyright(c) 2015-2019 LORD Corporation. All rights reserved.
MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License.
*******************************************************************************/
#include "stdafx... |
012c663806185b081229e78090e4c013056eec72 | 165e5c2ddc43f89e58a1ef970db95d4051136496 | williammikasoT/EveryClass | /EveryClass/ExcelClass/ExcelClass.cpp | C++ | cpp | 4,755 | no_license | #include "stdafx.h"
#include "ExcelClass.h"
ExcelClass::ExcelClass()
{
}
ExcelClass::~ExcelClass()
{
/*CloseExcel();*/
}
BOOL ExcelClass::InitExcel(CString strFilePath)
{
if (!AfxOleInit())
return FALSE;
COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
if (!m_app.CreateDispatch(_T("Excel.Ap... |
fdd7961ffe5b835e88ffcee716021e31301500a0 | aa2ee36e006bfc9d5a4e68a8bbbf0c76cc0e86ea | ktj007/Raiderz_Public | /Develop/Server/GameServerOck/unittest/TestDBCacheDBTaskItemDecStackAmt.cpp | C++ | cpp | 4,840 | no_license | #include "stdafx.h"
#include "TestDBCacheFixture.h"
#include "GDBTaskItemDecStackAmt.h"
namespace test_dbcache_fixture
{
SUITE(TestDBCache_ItemDecStackAmt)
{
GDBT_ITEM_DEC_STACK_AMT_DATA CreateItemUpdateData(GEntityPlayer* pPlayer, GItem* pItem, const int16 nModStackAmt)
{
GDBT_ITEM_DEC_STACK_AMT_DATA data(pP... |
cf0e005c32bd1ef1c1cd4f102ff5b86acd5df5fe | 3995f65df9808d115497a8ef8be7b141a16bd4f3 | clones1201/Toys | /cpp_sample/DES_Encrypter/_int56.cpp | C++ | cpp | 3,738 | permissive |
/************* integer - 56 bits ************/
#include "_int56.h"
//
//_int56::_int56(_int56 ¶m)
//{
// _int28 *temp = new _int28[2];
// temp[0] = param.GetValue()[0];
// temp[1] = param.GetValue()[1];
// value[0] = temp[0];
// value[1] = temp[1];
// delete [] temp;
//}
_int56::_int56(const _... |
4c52fdaa0ade637f70e227f75dbc0950bd559725 | dc1943b2e1e3174523c97dfacd3b03d617965155 | Abakumov/MLIB | /EL2D/el2d.cpp | C++ | cpp | 39,257 | no_license | /*
--- Elastic 2D forward modelling code based on pseudo-Fourier method ---
Parameters:
- For standard modelling with standard source,
Source type:
stype 0: pressure source, 1: horizontal force, 2: vertical force, 3: shear
Wavelet type:
wtype 1: Gaussian 2: 1st derivative if Gaussian ,3: R... |
9717f98c9c5e1f9e2f76efcd291e3fbad8d3fb21 | 7f6ddeccf21d45a734a89cd5f0312edfd16a8d42 | tulingwangbo/cefMultiBrowser | /3rd/boost_1_66_0/boost/asio/windows/basic_stream_handle.hpp | C++ | hpp | 14,366 | permissive | //
// windows/basic_stream_handle.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/... |
10eed22b9ec5837148cb6e5adf2b7d466b675455 | c2a0b7266744c1cf2c310278a9748d5f4c759141 | smsm8087/cabinet | /3d/DXFrameWork/InputManager.cpp | C++ | cpp | 1,024 | no_license | #include "stdafx.h"
#include "InputManager.h"
InputManager::InputManager()
{
ZeroMemory(keyState, sizeof(keyState));
ZeroMemory(keyOldState, sizeof(keyOldState));
ZeroMemory(keyMap, sizeof(keyMap));
}
InputManager::~InputManager()
{
}
void InputManager::Update()
{
memcpy(keyOldState, keyState, sizeof(keyOldSta... |
3853ec93e9cb1a1f012732eceef303e2aa9e8cdd | 177678ab6a014ab78aad455bb98cef39631e945c | lyxell/logifix-demo | /dockspace.cpp | C++ | cpp | 3,045 | no_license | #include "dockspace.h"
#include "imgui-boilerplate/imgui/imgui.h"
void ui::dockspace::render() {
bool p_open = true;
static bool opt_fullscreen = true;
static bool opt_padding = false;
static ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_None;
// We are using the ImGuiWindowFlags_NoDock... |
5df74ed77a85c330a7b862adf24a2da1c6b9dfa9 | afa538ba4c0c789f9e585548042a18017876270c | Ozimoondias/Daedalus | /src/game.cpp | C++ | cpp | 4,756 | no_license | //
// Created by agar on 03/05/2020.
//
#include <game.hpp>
void k_forward_backward(const Map& map, Player& player,
const int& dir)
{
float mov_speed = player.speed_.x * dir;
if (map.check(player.position_.x + player.direction_.x * mov_speed,
player.position_.y))
player.p... |
7a43cdaea79264b5982f21d4206f94351ded0191 | b269eca5de84cce8fa707ce49d46a092ff7fb997 | karimaechihabi/lernaean-hydra | /hydra1/code/vertical/nodes.hpp | C++ | hpp | 1,298 | no_license | #ifndef NODE_HPP
#define NODE_HPP
#include "type_definition.hpp"
#include "utils/signs.hpp"
typedef struct candidatenode{
double t_ub;
double t_lb;
double t_d;
int t_li;
sums_type* sums;
signs_type* signs;
sums_type qsum_odd;
sums_type qsum_even;
struct candidatenode* next;
} candidateNode;
typ... |
fbfcafc4dbf6bfe53e41b9bc2b3c79c333fbe543 | 4f1f95b5cd194a7f159e6d1c7d58241d3cc6a1a7 | WenShihKen/uva | /AtCoder/Beginner Contest 162/A.cpp | C++ | cpp | 609 | no_license | /**
* @judge Atcoder
* @id A
* @name Lucky 7
* @contest Beginner Contest 162
*
* @tag ad-hoc
*/
#include <algorithm>
#include <map>
#include <iostream>
#include <string>
#include <set>
#include <queue>
#include <cmath>
#include <iterator>
#include <array>
typedef long long int ll;
using namespace std;
#def... |
3cb8a4575dbee8f4e00e21493fcfe886afe80185 | a98e31f8dfc2bf0d1f2a6132bba8fb59bc527b91 | PaulFSherwood/cplusplus | /clanlib/ClanLib-2.2.8/Sources/SWRender/swr_pixel_buffer_provider.cpp | C++ | cpp | 2,426 | no_license | /*
** ClanLib SDK
** Copyright (c) 1997-2011 The ClanLib Team
**
** 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 a... |
7566f526493274a041b29dfe52e9850aa3cb361e | 803849fbd82ff73b713c43da112b3934ebbab5a0 | JaatSoft/Wolle | /SettingsView.cpp | C++ | cpp | 3,679 | no_license | /*
* Copyrights (c):
* 2001 - 2008 , Werner Freytag.
* 2009, Haiku
* Distributed under the terms of the MIT License.
*
* Original Author:
* Werner Freytag <freytag@gmx.de>
*/
#include "SettingsView.h"
#include <Alert.h>
#include <Button.h>
#include <FilePanel.h>
#include <iostream>
#inclu... |
c8ce1dcdbdbb974da573fac5416186e3ce9af2e0 | 83b493ca9f0f70a8b7d8a5ffe2a531dd4a121c52 | DJ-CO/3DBulletHell | /SprinklerShotComponent.cpp | C++ | cpp | 3,139 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "SprinklerShotComponent.h"
#include "WaterBall.h"
// Sets default values for this component's properties
USprinklerShotComponent::USprinklerShotComponent()
{
// Set this component to be initialized when the game starts, and to b... |
1d71d44ecd35016a8a823f50d8eca1dde4571a39 | 5ca56f18026cf3f77b85b395ba2283cba34720c7 | KasperOmari/Problems | /SPOJ/MAIN8_C - Shake Shake Shaky.cpp | C++ | cpp | 913 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n, k, l, r, mid, res;
vector<int> arr;
bool can(int mid) {
int tmpK = k;
for(int i = n - 1; i >= 0; i--) {
tmpK -= (arr[i]/mid);
if(tmpK <= 0) return true;... |
d0bcc82138a057f3fc0d42674ed190d8a9bfb8ce | 4d568c0e01be798821fe9f9660d6dab0627b19e1 | late0001/tradingStrategyGM | /StkUI/AfxCore.cpp | C++ | cpp | 18,414 | no_license | // AfxCore.cpp : implementation of the AfxCore Functions
//
#include "stdafx.h"
#include "AfxCore.h"
#include <math.h>
#ifdef AFX_INIT_SEG
#pragma code_seg(AFX_INIT_SEG)
#endif
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
void DDX_DateTimeCtrl(CDataExchange* pDX, int nIDC, CSPTime& val... |
5884d948905a64188f4465aedfd35b17e20989f7 | 8ac8d717863c9f5615b8d245ee5db90c81069302 | gkara/BattleTank | /BattleTank/Source/BattleTank/Private/TankAimingComponent.cpp | C++ | cpp | 3,445 | no_license | // Copyright Test.
#include "TankAimingComponent.h"
#include "TankBarrel.h"
#include "TankTurret.h"
#include "Projectile.h"
#include "Engine/World.h"
#include "Kismet/GameplayStatics.h"
// Sets default values for this component's properties
UTankAimingComponent::UTankAimingComponent()
{
// Set this component to be ... |
a9343a88daeef0ea7b82bee65e13352fa2da37b4 | 0bc89589ef09a4fa513396ede10381aa692f65c4 | MagicBoUNSW/Kidnap_review | /CarND-Kidnapped-Vehicle-Project-master/src/particle_filter.cpp | C++ | cpp | 10,810 | permissive | /*
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: Tiffany Huang
*/
#include <random>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <math.h>
#include <iostream>
#include <sstream>
#include <string>
#include <iterator>
#include "particle_filter.h"
#define EPS 0.00001
usi... |
6e649c77dc20ea33564e7960471904dc61d5e221 | d2d26a60bd78fef7204b7883628840d573df7956 | baudoliver7/hotel-manager-plus | /Sources/MesTables/Entree.cpp | C++ | cpp | 5,978 | permissive | #include "Entree.h"
bool Entree::operator==(const Entree & e)const
{
return (cle().toString() == e.cle().toString());
}
Entree::Entree()
{
// m_record = record();
// m_fieldsName.clear();
// tableModifiee(false);
}
void Entree::constructeur()
{
//initialiserTable();
QSqlTableModel modelTable;
... |
64263dec62daccd84c8b9932b506a2827e48ebdb | 95324a05e3c6aa9f6403fd01bc79523cf17d3bc3 | chaudao-ucla/chern_qmd | /nonadiabaticqmdcode2/vec3.hpp | C++ | hpp | 2,407 | no_license | //
// vec3.cpp
// tibidy
//
// Created by Kipton Barros on 6/19/14.
//
//
#include <cmath>
#include <complex>
template<typename T>
class Vec3 {
public:
T x=0, y=0, z=0;
Vec3(void) { };
constexpr Vec3(T x, T y, T z): x(x), y(y), z(z) {}
constexpr Vec3<T> operator-(... |
b8a8a6dc34a8c1d283eda3070d84dd095ba46e90 | 73dbafc58ed9a94290d53831fd30b3f3680be4f9 | louteranas/SiaProjetAnimation | /viewer/moc_glshaderwindow.cpp | C++ | cpp | 6,887 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'glshaderwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.7)
**
** WARNING! All changes made in this file will be lost!
******************************************************... |
9d95dca24e56928cd4bcdf99058831281234cd90 | 985b442f6b38a7242ccc68c470c7d5bbbfd50583 | abhishekchandra2522k/CPPrograms | /GFG/key_pair_two_pointer_approach.cpp | C++ | cpp | 895 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
bool hasArrayTwoCandidates(int arr[], int n, int x)
{
sort(arr, arr + n);
int i = 0, j = n - 1;
while (i < j)
{
int sum = arr[i] + arr[j];
if (sum == x)
{
... |
6cf6fbba85a24f075435c54e823e2d6c9af57f8b | 1ef27ef8f1144a3361fa5c1ed0b53d8d88511f80 | LaLlorona/Algorithms | /BOJ/0To5000/2644.cpp | C++ | cpp | 1,685 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
const int INF = 987654321;
vector<pii> graph[101];
int num_people;
int num_relation;
void Dijistra(int start, vector<int>& final_dist) {
for (int i = 0; i < final_dist.size(); i++) {
final_dist[i] = INF;
}
priority_queue<pii, vector<pii... |
e84c9cff50cef62a78c78b0ee152d41357876f54 | 0e2b73df3615fa89f642e725998af13b8bbbf1c5 | zv-proger/ol_programms | /acmp/0843.cpp | C++ | cpp | 1,032 | no_license | /*
Автор кода: Вадим Зинов (zv.proger@yandex.ru)
Решение задачи 0843 с сайта acmp.ru
*/
#include<bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(), x.end()
const int inf = 1e9;
using ll = long long;
using pii = pair<int, int>;
template <class A> void print(const A ... |
56d0e9614c69c94543aee2daa6dae446bed5d295 | 276a145a9ae99b1ade6d87d460f8683d4e4eb748 | evgenyvinnik/jvsc-android-apps | /Musagi/original/stqn-musagi/part.cpp | C++ | cpp | 39,969 | permissive | #include "platform.h"
#include "part.h"
#include "AudioStream.h"
void Part::PlayButton(void *astream)
{
AudioStream *audiostream=(AudioStream*)astream;
if(!pplay) // about to start
{
prec=false;
pplay_start=audiostream->GetTick(0);
pplay_offset=pplay_start;
vlooped=false;
vloopcounter=0;
... |
25acc5fdb2df0bfafc7044c2b2dc71ee9b705ecc | d06a7e366d51d1556c592f55d486298e9729c6a1 | liaoweiquan/MyLeetCode | /120-triangle/triangle.cpp | C++ | cpp | 1,361 | permissive | // Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
//
// For example, given the following triangle
//
//
// [
// [2],
// [3,4],
// [6,5,7],
// [4,1,8,3]
// ]
//
//
// The minimum path sum from top to bottom is 11 (i.e., 2... |
edfda7fbe01ba2132f1689e43e555d420dc65563 | d58dce2bbd8e2c01dcaf717e5530bb5b9508db70 | Phoenixdu/BlackJack | /buttons.cpp | C++ | cpp | 772 | no_license | #include "buttons.h"
const int Buttons::BUTTONS_HEIGHT = 57;
const int Buttons::BUTTONS_WIDTH = 152;
Buttons::Buttons()
{
setSrc_h(BUTTONS_HEIGHT);
setSrc_w(BUTTONS_WIDTH);
}
Buttons::~Buttons()
{
}
//Checks if player cursor on button and left click is pressed
bool Buttons::isPressed()
{
return (isIntersecting()... |
060cb83c844863559ba74cd220114904a7d92d4f | e8007deb2cc68d9b8860e29f71e7f5ec4f5f2ecc | jianjieluo/DataStructure_Homeworks | /week7/experiement_with_list/include/ArrayList.hpp | C++ | hpp | 622 | no_license | #ifndef ARRAYLIST_HPP_
#define ARRAYLIST_HPP_
#include "enum.hpp"
const int MAX = 100;
template <typename List_entry>
class ArrayList {
private:
int m_size;
List_entry m_buffer[MAX];
public:
ArrayList() : m_size(0){};
~ArrayList(){};
bool isEmpty() const { return m_size == 0; }
bool isFull() const { r... |
fcab6ed0b3886698830d6101a2202e1d264ad4cb | 618a2516312c3ab696752ce1e6d2ef16f0c5b202 | chromium/chromium | /chrome/browser/ash/app_list/app_sync_ui_state_watcher.cc | C++ | cc | 1,088 | permissive | // Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/app_list/app_sync_ui_state_watcher.h"
#include "chrome/browser/ash/app_list/app_list_model_updater.h"
#include "chrome/browser/ash/app_list/app_sy... |
7e7c9e8b5bb397da4b8453786fe9b60562a3d8a1 | 2a426683321257f502ea9afe6762e8659d40812f | cutenc/edt-finalproject-nand | /source/common/Mesh.cpp | C++ | cpp | 237 | no_license | /*
* Mesh.cpp
*
* Created on: 21/ott/2012
* Author: socket
*/
#include "Mesh.hpp"
Mesh::Mesh(osg::Node* mesh) : meshPtr(mesh)
{ }
Mesh::~Mesh() {
}
osg::ref_ptr<osg::Node> Mesh::getMesh() const {
return meshPtr.get();
}
|
5ac1a3a5356558252c5497686a53123d295fbeae | 9c6d4a7b8e776e6b934ecc64da98e666afe624c2 | alanthinker/NewGG | /I_GGX64/1/1对1/1车对1马.cpp | C++ | cpp | 11,086 | no_license | #ifndef END_my_m_MT_R_1CHE_B_1MA
#define END_my_m_MT_R_1CHE_B_1MA
#include "..\\..\\chess.h"
#include "..\\..\\preGen.h"
#include "1车对1马.cpp"
#include "..\\..\\white.h"
#else
#include "..\\..\\black.h"
#endif
//const int MaNotShi = 128; //马不在仕的一边
//const int MyKingOpen = 96; //我的将开放了
//红方一个车,黑方一个马
v... |
417a62ca0e074355a4cf3718ec384bb31d36c8a6 | 5b26786b47b2bb4ff741a4382d42f4850c682b18 | arviinddr/Notebook | /Notebook-LTTS/C++/MicroProjects/RestoMang_Linux/test.cpp | C++ | cpp | 1,775 | no_license |
// billing Test
#include "bill.h"
#include "restaurant.h"
#include "customer_order.h"
#include "bill.cpp"
#include "restaurant.cpp"
#include "customer_order.cpp"
#include <gtest/gtest.h>
namespace {
class BillTest : public ::testing::Test {
protected:
void SetUp() {
res.addOrder(9642297555,"Jalsa","Banashan... |
5c0c4de8b1b72ccacb6099f1a77b7aa7eab8c169 | 9860723d38353e809c6d495125937e7d26cd158a | AmpoluNisa03/Data-Structures-and-Algorithms | /Array/11.Get Set Max Min Sum Avg.cpp | C++ | cpp | 1,525 | no_license | #include<stdio.h>
struct Array
{
int A[20];
int length;
int size;
};
void Display (struct Array arr)
{
int i;
printf("Enter elements ");
for (i=0;i<arr.length;i++)
printf("%d ",arr.A[i]);
}
int Get(struct Array arr, int index )
{
if (index>=0 && index<arr.length)
return arr.A[index];
else
... |
1e3d4275c2ba9a63fbd3b68eb29746eec3da0ad2 | f3a61bed82eaf0d05f457f0c7232e51a9114ac81 | ZarAndrey/STL | /stl/src/mutex.cpp | C++ | cpp | 7,757 | permissive | // Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// mutex functions
#include "primitives.h"
#include <internal_shared.h>
#include <stdio.h>
#include <stdlib.h>
#include <type_traits>
#include <xthreads.h>
#include <xtimec.h>
extern "C" _CRTIMP2_PURE void... |
f9a1c8916b11d2a6483691803114f8102f266a70 | 1172a3fcfc95fe46931a0be9e7c00b0b848bed55 | keyEpoch/cpu_render | /renderer/core/scene.cc | C++ | cc | 920 | no_license | #include "scene.h"
#include "maths.h"
#include "texture.h"
#include "darray.h"
scene_t *scene_create(vec3_t background, model_t *skybox, \
model_t **models, float ambient_intensity, \
float punctual_intensity, int shadow_width, int shadow_height) {
scene_t* scene = (scene_t*)malloc(sizeof(scene_t));
scen... |
8b7c380829354a9bc9d57fe11eedb01449197170 | b252f8da62501e0280a2c9358153c7dba245ebab | seem-sky/skia | /tools/picture_utils.cpp | C++ | cpp | 5,663 | permissive | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "picture_utils.h"
#include "SkBitmap.h"
#include "SkColorPriv.h"
#include "SkHalf.h"
#include "SkImageEncoder.h"
#include "SkOSFile.h"
#include "SkPM4fPriv.h"
#includ... |
7e44814061214c28fe2dab4c8c7e2b7d3272abc0 | 9ae8375bfb25637be15e653f6eb2d1f38566c05d | zhanghuanjian/VCTest | /CTest11-1MFC数据库/CTest11-1MFC数据库/CTest11-1MFC数据库.cpp | C++ | cpp | 4,644 | no_license |
// CTest11-1MFC数据库.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "afxwinappex.h"
#include "afxdialogex.h"
#include "CTest11-1MFC数据库.h"
#include "MainFrm.h"
#include "CTest11-1MFC数据库Set.h"
#include "CTest11-1MFC数据库Doc.h"
#include "CTest11-1MFC数据库View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CCTest111MF... |
14c00d25c9486e9270768651448d618580cdfe47 | 5693adbd8f93ccf8863741f1d18cdc02bf772854 | reven86/dreamfarmgdk | /Source/third_party/boost_1_58_0/boost/regex/icu.hpp | C++ | hpp | 40,079 | permissive | /*
*
* Copyright (c) 2004
* John Maddock
*
* Use, modification and distribution are 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)
*
*/
/*
* LOCATION: see http://www.boost.org for most recent... |
8aa2e1df6f150ae571a4ae0e7ce2137bb47d0304 | b3d2bd93c78dddc4a53e0d271553a6288dc105e5 | Pedro-Gomes-Dias/Introduction-to-Computer-Technology | /Exercise02-2.cpp | C++ | cpp | 282 | no_license | #include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int main(){
int n = 100;
while(n <= 100){
system("cls");
printf("Digite um numero: ");
scanf("%d", &n);
}
for(int x = 100;n >= x;x++){
if(x%2 == 0){
printf("\n%d", x);
}
}
getch();
return 0;
}
|
2efe48ff016dc7cdbf666d0cfe5d931e24cdb704 | 1555d9dcdba845f0915c4414c0b7a15f0e875920 | handicraftsman/positronbot | /positronbot/plugin_service.cpp | C++ | cpp | 1,077 | permissive | #include "plugin_service.hpp"
#include <algorithm>
namespace pb {
plugin_service::plugin_service(particledi::dm_ptr _dm, const std::vector<std::string>& _plugin_dirs)
: dm(_dm)
, plugin_dirs(_plugin_dirs)
{}
plugin_service::~plugin_service() {}
std::optional<plugin::ptr> plugin_service::get(std::string&... |
c054a4819d43a16f89e8cccd58846f300e80176c | 673f18da4a9743c8abaaf53ad38e755853540505 | iomeone/cage-examples | /sources/client/multipleWindows.cpp | C++ | cpp | 5,738 | no_license | #include <cage-core/logger.h>
#include <cage-core/concurrent.h>
#include <cage-core/color.h>
#include <cage-core/macros.h>
#include <cage-engine/window.h>
#include <cage-engine/opengl.h>
#include <cage-engine/highPerformanceGpuHint.h>
#include <atomic>
using namespace cage;
std::atomic<int> globalWindowIndex;
bool ... |
b809bf01221a1262d4f87719ac44b31fd37310e3 | 59c231e8775ed6eb1857b484f527d25032e1c4ec | Zoev89/baan | /baanShared/leesdata.cxx | C++ | cxx | 3,443 | no_license | // Baan: A railway model controlling program
// Copyright (C) 1998 - 2001 Eric Kathmann
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your opti... |
39c18dad7a30ecb60a79231d3d1939f06817ed09 | 87056bcc7aa750da8479233ebbf47b9e98de418b | matianchi/git-explore | /include/osmium/index/id_set.hpp | C++ | hpp | 14,251 | permissive | #ifndef OSMIUM_INDEX_ID_SET_HPP
#define OSMIUM_INDEX_ID_SET_HPP
/*
This file is part of Osmium (https://osmcode.org/libosmium).
Copyright 2013-2018 Jochen Topf <jochen@topf.org> and others (see README).
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any pe... |
3d283c04484e4955457eba538c429b50f41cf26c | 0fe9025580a95c0e2443a03c66eb4ae86ca080a6 | zhuyuecai/Group_Project_345 | /TowerDefenseConcordia/TowerDefenseConcordia/Scenes/EditMapScene.hpp | C++ | hpp | 1,322 | no_license | #pragma once
#include "../WindowManager.hpp"
#include "../Map.hpp"
#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Graphics/CircleShape.hpp>
#include <SFML/Graphics/Text.hpp>
#include "../MapMessages.hpp"
#include "IModeBehaviour.hpp"
#include <memory>
namespace TDC
{
class EditMapScene : public Scene
{... |
35fea3d8d1b67c1305d704ff685629645e0d97da | 08644ada4a4b9ff2d35d6976fbc59e95cd19b291 | pbb59/ScaffCC | /clang/test/SemaCXX/PR10447.cpp | C++ | cpp | 296 | permissive | // RUN: %clang_cc1 -verify %s
// PR12223
namespace test1 {
namespace N {
extern "C" void f(struct S*);
void g(S*);
}
namespace N {
void f(struct S *s) {
g(s);
}
}
}
// PR10447
namespace test2 {
extern "C" {
void f(struct Bar*) { }
test2::Bar *ptr;
}
}
|
77a58b76497d7a71b0ee74040b4f3ab30b7c3bce | 041a94bfb1153584e0277a6bf04798465846feef | metaflow/contests | /codeforces/1180/C.cc | C++ | cc | 2,748 | permissive | #if defined(LOCAL)
const double _max_double_error = 1e-9;
#include "testutils.h"
#define L(x...) (debug(x, #x))
#define I(x, ...) (x)
#define C(x...) CHECK(x)
#else
#define L(x, ...) (x)
#define I(x, ...) (x)
#define C(x, ...) ;
#endif
#include <math.h>
#include <algorithm>
#include <bitset>
#include <chrono>
#include ... |
60b3ba80fb89f1e8ef73b641df86c8e416f99970 | b76912622cd63520d0edcad54b684f54e7927bea | Tesla-M/frameworks_av | /media/libstagefright/CameraSource.cpp | C++ | cpp | 33,653 | permissive | /*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
81f5d2ee063bac42a20e54233b87f3d5bb0450e1 | 1684b21414403956f4526cdc967bad417a794a2d | datavetaren/epilog | /src/common/fast_hash.hpp | C++ | hpp | 1,895 | permissive | #pragma once
#include <string>
#ifndef _common_fast_hash_hpp
#define _common_fast_hash_hpp
namespace epilog { namespace common {
//
// 32-bit Murmur3 hashing. Not cryptographically secure, but convenient
// to use for internal data structures.
//
class fast_hash {
public:
inline fast_hash() { reset(); }
inl... |
13d75593ad8f6f508415a189c256ccdef4c1894d | 9a236035ea76cb3d9e10a54e4ed4787b21c50c2d | iieplatform/nynn_mm | /src/cli/src/cli_framework.cpp | C++ | cpp | 1,926 | no_license | #include<linuxcpp.hpp>
#include<nynn_common.hpp>
#include<nynn_zmqprot.hpp>
#include<nynn_mm_types.hpp>
#include<nynn_mm_config.hpp>
#include<nynn_mm_handler.hpp>
int main(int argc,char**argv)
{
string text_ip=argv[1];
string text_port=argv[2];
int loop=parse_int(argv[3],1<<10);
zmq::context_t ctx;
zmq::socket_... |
d5a881ae6b8fcb24eb6c992a971d33dcac235760 | 1a4c994d6f7e95a384a62f89e95eb2e89cf9c936 | Ashrestha-captechu/C-Group-Project | /project 1/createAdmin.cpp | C++ | cpp | 1,183 | no_license | //createAdmin.cpp
#include "Person.h"
#include "Admin.h"
#include <fstream>
#include <stddef.h>
int createAdminMenu()
{
int choice;
system("CLS"); //clear screen
cout<<"Create New Admins\n"
<<"*****************\n\n"
<<"1. Create a new admin\n"
<<"2. Exit\n"
<<"Enter your choice";
cin >>choice;
return cho... |
79bdaf784e5c7b2f8c6a3932014ddbd6c1a2616f | f96350fdb43588ed34e3ee79a14b0123a0a7667c | thanhquang2808/kiemtra | /kt.cpp | C++ | cpp | 435 | no_license | #include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include "iostream"
using namespace std;
//ThanhMaiNguyễn
int main()
{
int a[30], n=0, x;
while(n<=0 || n>=30);
{
cout<<"Nhap n: ";
cin>>n;
}
srand(time(NULL));
for(int i=0; i<n;i++)
{
a[i]=rand()%10;
cout<<a[i]<<" ";
}
cout<<"\nNhap gia tri muo... |
c06986c25d5d72ac8a950606f91db495482b6dcf | 29695940b7f82beb38e3cf8d08ba1e7d611c6edd | niharika987/dev | /candy distributtion.cpp | C++ | cpp | 2,559 | no_license | int candy(vector<int> &ratings)
{
int candiesCnt = 0, curCandy, pos;
vector<pair<int, int> > valueWithPos;
for (int i = 0; i < ratings.size(); i++) {
valueWithPos.push_back(make_pair(ratings[i], i));
}
sort(valueWithPos.begin(), valueWithPos.... |
a7bf66a781843ec3087396bd4a88058d70832131 | 987027c6acc27d1f317b27aa9573ab55a3371556 | yeti98/SPOJ-PTIT | /BCBIN.cpp | C++ | cpp | 565 | no_license | #include <bits/stdc++.h>
using namespace std;
int cha[10005];
int rank[10005];
void init(){
for(int i=1;i<=10005;i++) cha[i]=i;
}
int find(int x){
while(x!=cha[x]) x=cha[x];
return x;
}
int merge(int x, int y){
int chax = find(x);
int chay = find(y);
if(chax!=chay){
if(chax<chay){
cha[chay]=chax;
}else{
... |
763c3c0c859d8344ff8e700c310a26420ee2ccbb | 6a165fa529ba66c4d2ea1750a0fe11e13723a425 | cyber4ron/mmo-server | /entity_interface.cpp | C++ | cpp | 12,414 | no_license | #include "stdafx.h"
#include "entity_interface.h"
using namespace std;
entity_interface::entity_interface( boost::shared_ptr<entity_manager> em_ptr )
{
ent_mgr_ptr = em_ptr;
}
void entity_interface::register_entity( std::string entity_id, std::string script_name )
{
ent_mgr_ptr->register_entity(entity_id, script_... |
5d4166bfbf9b1955171edee27a2ed4b47dfe8b74 | 6221a78d01a34ea4a9671272d70c5eb221e52640 | sidner/FF7-Chess | /CGFexample/src/Connection.cpp | C++ | cpp | 2,486 | no_license | #include "Connection.h"
Connection::Connection (string serverAddress_, unsigned int port_)
{
connected = false;
cout << serverAddress_ << endl;
strcpy(serverAddress,serverAddress_.c_str ());
port = (char*) malloc (sizeof (unsigned int) * sizeof (char));
sprintf (port, "%u", port_)... |
6ac8242de9fdf8191f14d7af87c41cf3cda9817c | ab663e6d1d4ca128e28b7b91efb2ce30e77bfdc9 | maojr/interviews | /ccplusplus/libc++/use_vector.cpp | C++ | cpp | 893 | no_license | #include <vector>
#include <iostream>
class Empty
{
public:
Empty(int val)
{
this->val = val;
std::cout << "Empty():" << val << std::endl;
}
Empty(const Empty& e)
{
val = e.val;
std::cout << "Empty(const Empty&):" << val << std::endl;
}
~Empty()
{
... |
05796f47693b95d5739d54e32d546776a46a8927 | 34a93519cb29b843eaaee383d07743e1bfc90e30 | yjksw/Algorithms | /BaekJoon/Baek7562.cpp | C++ | cpp | 1,641 | no_license | //DFS BFS
//나이트의 이동
#include <cstdio>
#include <vector>
#include <queue>
using namespace std;
int main() {
int testcase = 0;
scanf("%d", &testcase);
int posX[] = {-1, -1, -2, -2, 1, 1, 2, 2};
int posY[] = {2, -2, 1, -1, 2, -2, 1, -1};
while(testcase > 0) {
int n = 0;
scanf("%d",... |
7a56986971a3819ac31c2196b26e7bf61657965b | 04bf4f606b8d0032a4318ac5b0286b1910d0504b | hwreverse/twitter-for-pc-g850 | /lib/Twitter/TwitterLib.cpp | C++ | cpp | 14,730 | no_license | #include <Arduino.h>
#include <WiFiClientSecure.h>
#include <base64.h>
#include "mbedtls/sha1.h"
#include <codecvt>
#include <string>
#include <cassert>
#include <locale>
#include "UrlEncode.cpp"
#include "TwitterLib.h"
#define SHA1_SIZE 20
#define Display_MaxData 15
String unicode_str[Display_MaxData];
const char... |
f87c1fd6bd4745f5748d8c4950bb3d9155233de4 | bd270e431af4a72732021b304164eee9a3173f38 | yair-k/Win2000SRC | /private/shell/shlwapi/nullstm.cpp | C++ | cpp | 4,510 | no_license | #include "priv.h"
#include "nullstm.h"
#ifndef UNIX
// A static empty stream implementation, for back compat & no memory hit
//
// Macros copied from cfdefs.h
//
#define STDMETHODX(fn) HRESULT STDMETHODCALLTYPE fn
#define STDMETHODX_(ret,fn) ret STDMETHODCALLTYPE fn
class CNullStream {
public:
IStream *vtabl... |
e03ae5a43e60268dbf17c9d6ed7a26983d05b556 | 10f9b80595c471c7d705fd0429996392f5ba1987 | Samsung/Castanets | /chrome/browser/android/webapk/webapk_web_manifest_checker.cc | C++ | cc | 1,140 | 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/android/webapk/webapk_web_manifest_checker.h"
#include "third_party/blink/public/common/manifest/manifest.h"
#include "url/gurl.... |
2e951cf8e42a912506f81b25f9a431fc9505608c | 955f13b0af252453ab2b39c33bb41261e56f8c4b | yurifariasg/yuris-adventure | /YurisAdventure/YurisAdventure/PlayerGUI.cpp | C++ | cpp | 3,543 | no_license | #include "PlayerGUI.h"
#include "Player.h"
PlayerGUI::PlayerGUI(void)
{
hpBar = NULL;
manaBar = NULL;
centerImage = NULL;
showAlternatePlayerBar = false;
isPlayerDead = false;
alpha = 0;
count = 0;
}
PlayerGUI::~PlayerGUI(void)
{
}
/*
Get all the information to put on RenderList...
*/... |
9a19d8dae83290a95f7b5ba7311fe56eaa9b3c99 | fbbabd5fb7ede31f22e32f4ff1570c4a0734192f | ccdxc/logSurvey | /data/crawl/tar/old_hunk_328.cpp | C++ | cpp | 385 | no_license | count = safe_read (f, start->buffer, bufsize);
if (count < 0)
{
char buf[UINTMAX_STRSIZE_BOUND];
int e = errno;
ERROR ((0, e,
_("Read error at byte %s, reading %lu bytes, in file %s"),
STRINGIFY_BIGINT (current_stat.st_size - sizeleft,
buf),
(unsigned long) bu... |
34228b7e39611b4cf12f1f9ddfb57b7995c7859b | 89e22e6ab3212a45f1e5088556cdba14a4fba32c | Suckzoo/tsp | /annealer.hh | C++ | hh | 667 | no_license | #ifndef __ANNEALER_HH__
#define __ANNEALER_HH__
#include <random>
using namespace std;
class Annealer {
private:
std::random_device rd;
std::mt19937_64 gen;
std::uniform_real_distribution<double> distribution;
double T;
public:
Annealer(double _T=1000.0) : T(_T) {
gen = std::mt19937_64(rd()... |
cc76bc0a9d6bed1e8fe77d6a93e331344e6835ff | 0df3e8d92c1689da76302fdd14647f864c6f6095 | spurnaye/kabuki_toolkit | /projects/kabuki/igeek/library/igeek_cell.cc | C++ | cc | 1,939 | permissive | /* Kabuki Toolkit @version 0.x
@link https://github.com/kabuki-starship/kabuki-toolkit.git
@file /projects/kabuki/igeek/library/igeek_cell.cc
@author Cale McCollough <cale.mccollough@gmail.com>
@license Copyright (C) 2014-19 Cale McCollough <cale@astartup.net>;
All right reserved (R). Licensed under the Apache L... |
889652618a03660d724751def396cba1a4230b92 | 04abdd4d9257af68afe7aa10ffa68c8a7ba6e36a | 1aman1/Cplusplus | /STL/vector.cpp | C++ | cpp | 2,065 | no_license | #include<vector>
#include<iostream>
#include<numeric>
using namespace std;
void print(vector<int> V, int type = 1) {
cout << "vector " << type << ":";
if ( !V.empty() )
for (auto i : V) cout << " " << i;
else
cout << " empty";
cout << endl;
}
int main() {
vector<int> vec(5);
// intialize
iota(vec.begin(),... |
73d87b005381e22e91e6cf5294575944dfb2ff9a | 77698301504dd812ebf3b7540e2d815cc3d8031b | jeremiahwitt/Dragons | /All Code/MapController.cpp | C++ | cpp | 803 | no_license | #include "MapController.h"
#include "filepathandfoldermanager.h"
MapController* MapController::_mapController = nullptr;
MapController::MapController()
{
_path = SingletonFilePathAndFolderManager::getInstance()->_path_to_mapController;
SingletonInputOutputManager::getInstance()->clearFile(_path);
_toggleMap = true... |
df034af34060ed041764b654a0424fee6aa2f22c | 53c8f1932b44efa9536efda5b1c58a91852a4625 | DionisiusMayr/NES | /src/Processor.cpp | C++ | cpp | 26,535 | permissive | #include "Registers.cpp"
#include "Memory.cpp"
#include "Opcodes.cpp"
#include "Instruction.cpp"
#include "utility.cpp"
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <fstream>
#define MEM_SIZE (1 << 16)
#define PROGRAM "./programs/test.6502"
#define _zero(byte) (byte == 0 ? 1 : 0);
#define _sign(by... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.