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 |
|---|---|---|---|---|---|---|---|---|
00ae36ee06c66cb2a2135fd8b061b2f1baafcf4e | 64aab05adc6cc2f98cf590128650ca2fb9556b52 | mahim007/Online-Judge | /light oj/1015.cpp | C++ | cpp | 352 | no_license | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ll T,t,i,x,sum,n;
cin>>T;
for(t=1;t<=T;t++)
{
cin>>n;
sum=0;
for(i=1;i<=n;i++)
{
cin>>x;
if(x>=0)
sum+=x;
}
printf("Case %lld: %lld\n... |
51027b6ae03193a8cf4ce459a23f54005a70ab6e | 2d4eb5b331e0c0a12ed0c8e470ecb5874b0daef4 | Crasader/numbers | /Classes/MainScene.hpp | C++ | hpp | 516 | no_license | //
// MainScene.hpp
// MyCppGame
//
// Created by msempire on 16/9/1.
//
//
#ifndef MainScene_hpp
#define MainScene_hpp
#include "cocos2d.h"
#include "BasicScene.hpp"
class MainScene: public BasicScene{
public:
MainScene(){}
CREATE_FUNC(MainScene);
virtual void onEnter() override;
prote... |
f459d66253fd312a62e6673e2af91804e41f9d49 | 5bcef822957d6a2e666d5d679936163b49bd2980 | ArtificialQI/Coursera_cpp | /yellow_belt/decompositions/phone_number/phone_number.cpp | C++ | cpp | 1,258 | no_license | #include "phone_number.h"
#include <iostream>
#include <exception>
#include <algorithm>
PhoneNumber::PhoneNumber(const std::string& international_number)
{
if (international_number[0] == '+') {
if (count(international_number.begin(), international_number.end(), '-') < 2)
throw std::invalid_argument("wrong_interna... |
345afbf54f410e21e300918f94f59b91583a3b2b | 97a7db96e384d7ba2c89f866dea7af1e02e54dc0 | LizaDobrogost/ComputerNetworks | /Lr1/Project1/Source.cpp | C++ | cpp | 1,164 | no_license | #include <WinSock2.h>//интерфейс разработки приложений
#include<iostream>
using namespace std;
int main()
{
WORD wVersionRequested;
WSADATA wsaData;
wVersionRequested = MAKEWORD(2, 2);
WSAStartup(wVersionRequested, &wsaData);
SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
struct sockaddr_in local;
lo... |
4c4cb5ef76f30a264abae79e1ec0b6ef223c92a3 | bf6ea0f31a977355233e1e3c82e4691e99e91eba | metux/chromium-suckless | /third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp | C++ | cpp | 4,553 | permissive | /*
* Copyright (c) 2008, 2009, 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 c... |
340ef0f4154886fc71725e98c35376ecd0b48a2f | 6ba591a9bc93454758f464533d0c5543c2592bd7 | Coriana/fo76utils | /src/zlib.hpp | C++ | hpp | 2,345 | permissive |
#ifndef ZLIB_HPP_INCLUDED
#define ZLIB_HPP_INCLUDED
#include "common.hpp"
class ZLibDecompressor
{
protected:
const unsigned char *inPtr;
const unsigned char *inBufEnd;
unsigned long long sr;
unsigned int srBitCnt;
unsigned int *tableBuf;
// huffTable[N] (0 <= N <= 255):
// fast decode table fo... |
d51f2c9f4d65dee3bfef86871c2f789fd5800a5b | 64b21dd2d04a77364536a3d42fd204a4c9eb0d26 | wrobel1989/tree_visualiser | /tests/tests.cpp | C++ | cpp | 10,383 | no_license | //here goes the main tests code.
#include <globaldefs.h>
// on ubuntu, make sure to do the "sudo apt-get install libgtest-dev" to have
// gtest with headers installed
#include <gtest/gtest.h>
#define GTEST_COUT std::cerr << "[ ] [ INFO ]"
//create empty tree with empty parent node and sanitize it
TEST(Sanit... |
a931f1740bb3cd85d31897f8a600c7cc255eced3 | a947ccd6a558ba79419ddbb0e0bb00f6004f031b | chengjunlu/compute-runtime | /opencl/test/unit_test/accelerators/media_image_arg_tests.cpp | C++ | cpp | 5,341 | permissive | /*
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/memory_manager/surface.h"
#include "opencl/source/helpers/surface_formats.h"
#include "opencl/source/kernel/ke... |
c7c60d9cb5e2dede39a6562f4da328e34ed0c158 | 456eed3f5082d7ee03e30f94cbfe332a741b1103 | netspective/data-service-ecg | /demo/src/ecg-echo.cpp | C++ | cpp | 360 | no_license | #include <boost/program_options.hpp>
#include <Functions.h>
#include <ecg.h>
string _domainid,_deviceid,_loginfo,_logdata,_logconfpath;
int main(int argc, char* argv[])
{
if (!parse_args_sub(argc, argv,_domainid,_deviceid,_loginfo,_logdata,_logconfpath))
return 1;
echoSubscribeECG(_domainid,_deviceid,_loginf... |
e6800b17dd71d816a220d74ff55741a417a5d391 | b02e9123bbe2dee8281a87f09f6ab3189200e183 | TLeonardUK/ZombieGrinder | /Source/Engine/Localise/LanguageFactory.cpp | C++ | cpp | 2,592 | no_license | // ===================================================================
// Copyright (C) 2013 Tim Leonard
// ===================================================================
#include "Engine/Localise/LanguageFactory.h"
#include "Engine/Resources/ResourceFactory.h"
#include "Engine/IO/PatchedBinaryStream.h"
#include... |
6622f47e264b15860a1726e8252f485eb1830d8b | 2f8136cfad8317e593a040a91540744a49fd89f4 | DengHaoyu/OI | /P3379.cpp | C++ | cpp | 1,862 | no_license | //
// Created by dhy on 18-8-15.
//
#include <cstdio>
using namespace std;
struct node{int t,next;}tree[2*500001];
int head[500001];
int F[500000][23];
int deepth[500001];
int tot = 0;
int log2[5000001];
inline int read(){
int c,n = 0,f = 1;
c = getchar();
while(c<'0'||c>'9')
{
if(c=='-')f = -1... |
e5973e6e032d4e2a90cacc2ceefbffe5c2d4e417 | eb84492e92b025fd6ae39cc55ff93ea7fdd84a98 | DrWangqin/myApps | /load image/src/testApp.cpp | C++ | cpp | 1,855 | no_license | #include "testApp.h"
bool mouseIsDown;
bool mouseIsOver;
int ballX;
int ballY;
//--------------------------------------------------------------
void testApp::setup(){
ofSetFrameRate(24);
ofSetWindowShape(580, 600);
ofBackground(255, 255, 255);
ofEnableSmoothing();
ofEnableAlphaBlending();
ofSetCircleRes... |
d3dcb75d235bfe2d57a9deb642fadedf78d88103 | 67579b65f2ea2beb50726f68bc16f20515ad8022 | cyangNYU/dr_sasa_n | /src/histogram.cpp | C++ | cpp | 2,142 | permissive | #include "stdafx.h"
#include "histogram.h"
uint64
HST_GetBin(float xmin,
float xmax,
float value,
uint64 bins,
vector<float> binrange){
if(bins == 0) return 0;
if(value >= binrange[bins-1]) return bins - 1;
if(value < xmin) return 0;
for (uint64 i = 0; i < bins; ++i)... |
539904e3236985d5b7d7698c742a797451489aa5 | dcc41c8320e2f6cce8ce54343150428801a2310f | fayaaz/tarpcoin | /src/qt/test/uritests.cpp | C++ | cpp | 2,968 | permissive | // Copyright (c) 2009-2018 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 <qt/test/uritests.h>
#include <qt/guiutil.h>
#include <qt/walletmodel.h>
#include <QUrl>
void URITests::uriTests(... |
9f878bc7bce7572635e24828014d7ef97f787810 | 26de022210e6f95af00cee3315c07fac92bdaf35 | Ryash13/CPI_CIPHERSCHOOLS | /deleteNodeInBST.cpp | C++ | cpp | 1,572 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
1ce93e039eb3231e3c65b49887eef37ac4c6a1c0 | e37b0762aa39aa7d338f23a19facd5ca78a3f991 | RobotLocomotion/fcl | /test/test_fcl_capsule_box_1.cpp | C++ | cpp | 5,214 | permissive | /*
* Software License Agreement (BSD License)
*
* Copyright (c) 2014-2016, CNRS-LAAS and AIST
* 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 cod... |
af925b38759cb22cd09faaac2d2349ef6fcbc885 | 6dedf40835eb8765430771cf404b6eaf799e0235 | aurantst/windows-XP-SP1 | /XPSP1/NT/termsrv/license/licmgr/kpprop.cpp | C++ | cpp | 2,455 | no_license | //Copyright (c) 1998 - 1999 Microsoft Corporation
/*++
Module Name:
KPProp.h
Abstract:
This Module contains the implementation of CKeyPackProperty class
(Property sheet for KeyPacks)
Author:
Arathi Kundapur (v-akunda) 11-Feb-1998
Revision History:
--*/
#include "stdafx.... |
3d6a3fbaced5113e229041faff33e668566286ca | 10088f88c4c4d4937b55ad99b4e24eb0a5945797 | PauloRolim/LP1-IMD-PetFera | /src/animal/AnfibioNativo.cpp | C++ | cpp | 546 | no_license | #include "utils.hpp"
#include "animal/AnfibioNativo.hpp"
AnfibioNativo::AnfibioNativo(): Anfibio() {}
void AnfibioNativo::solicitaDados(){
utils::printTitle("Adicionar Anfibio", 60);
this->solicitaDadosBase2();
this->solicitaDadosNativo();
}
void AnfibioNativo::ver(){
utils::printTitle("Anfibio", 60... |
cb9f3c19714e0b201b6be2cea893850dc94f51eb | 471c6099b713cd2123279dc0f4734b9b1efba2fd | gbrlas/AVSP | /CodeJamCrawler/dataset/11_20602_85.cpp | C++ | cpp | 2,031 | no_license | #include<stdio.h>
#include<memory.h>
#include<string.h>
#include<stdlib.h>
int t, n, r;
char dat[500];
char a[1024];
//int pos[32][32] = {0};
int pO = 0;
int pB = 0;
int mO = 0;
int mB = 0;
int chg = 0;
int la = 0;
int ans, tim;
int i, j, k, tc, sec;
int isO, wasO, btn, clr;
int main (int argc, const char * argv[]) ... |
d330038ae1de55133f94ad06ef87502cfb7fb2d8 | d6b705174efea41a1b02a6a54eca2535b97a3b33 | diskang/IntelliVoice | /libs/shared/AlgLib/source/integration.cpp | C++ | cpp | 133,198 | no_license | /*************************************************************************
Copyright (c) Sergey Bochkanov (ALGLIB project).
>>> SOURCE LICENSE >>>
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 (www.... |
48b75f83a2ffe08497621ef05b93fcba031e39d9 | 1065f69ac0c6de4a3bb4b0681d431867adb50821 | wonjongah/JAVA_Python_Cplusplus | /열혈C++/chapter02 C언어 기반의 C++2/RefPtr.cpp | C++ | cpp | 477 | no_license | #include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
int num = 12;
int *ptr = # // ptr 포인터 변수는 num의 주소값
int **dptr = &ptr; // ptr 포인터 변수를 가리키는 포인터
// **dptr(ptr의 주소값) -> *ptr(num의 주소값) -> num
int &ref = num;
int *(&pref) = ptr;
int **(&dpref) = dptr;
... |
69022d4b380d5f4430e629cde1066518778e3b46 | 85897c1f3a64f335f2cf7551ffa1af8bdc66a983 | mahfuzmohammad/ProblemSolving | /lightoj/1138 - Trailing Zeroes (III).cpp | C++ | cpp | 920 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <algorithm>
#define large 400000015
using namespace std;
int trailing0(int x){
int t0 = 0;
for(int i = 5; i <= x; i*=5){
t0 += floor(x / i);
}
return t0;
}
... |
c29d31dae07a061bc438b5644a0cd5b7820dbdd3 | 125e5e7d885bc402ba819da944a25742d4531b84 | arceciemat/GAMOS | /source/GamosCore/GamosData/Data/src/GmDataFinalMomX.cc | C++ | cc | 798 | no_license | #include "GmDataFinalMomX.hh"
#include "G4Step.hh"
#include "G4Track.hh"
//----------------------------------------------------------------
GmDataFinalMomX::GmDataFinalMomX()
{
bInitial = false;
theHMin = -1.;
theHMax = 1.;
theExcludedTypes.insert(DTSeco);
theExcludedTypes.insert(DTEvent);
}
//------------... |
3fce6dacacf3f504fdffb6441bf0806a70baaadf | 3ecf1f1e2c31bf47c839ec49d72e844f29acae2b | ashtonmv/sphinx_vdw | /sxaccelerate/src/math/benchmarks/sxblocksizes.cpp | C++ | cpp | 457 | permissive | // ---------------------------------------------------------------------------
//
// The general purpose cross platform C/C++ framework
//
// S x A c c e l e r a t e
//
// Home: https://www.sxlib.de
// License: Apache 2
// Authors: see src/AUTHOR... |
bf97308b8ac3c8f603b1c51e27525530aea9f53c | 156ed1c465b34b56a74c759e2bc2fa7c72c8de90 | Opaque-Studios/RakNet | /DependentExtensions/cat/src/math/BigRTL.cpp | C++ | cpp | 3,928 | permissive | /*
Copyright (c) 2009-2010 Christopher A. Taylor. 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 con... |
05521a183fc0e3d5cbb3fa22a4c845d132460bd2 | 6cbb5acb840a325a2608104dcaf5b9cead499975 | VitalyKononenko/chromium | /components/arc/session/arc_vm_client_adapter.cc | C++ | cc | 3,534 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/arc/session/arc_vm_client_adapter.h"
#include <string>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/l... |
519c1e38a8240b035af76350d7510d83513ecd9d | b20238395d813c8140db9b0896005ac26ed0c883 | deon86116/mbed12 | /12_6_use_servo_table/main.cpp | C++ | cpp | 1,019 | no_license | #include "mbed.h"
#define CENTER_BASE 1500
Serial pc(USBTX, USBRX);
DigitalIn encoder(D10);
PwmOut servo(D11);
Timer t;
Ticker encoder_ticker;
volatile int steps;
volatile int last;
void servo_control(int speed){
if (speed > 200) speed = 200;
else if (speed <-200) speed = -200;
servo... |
bfb2dfc259d7b02f211f16a823d2c82250b77f86 | 10600ce2dbd183be1be0766a51863d66bc28ad3e | mikke89/RmlUi | /Source/Lua/Elements/SelectOptionsProxy.cpp | C++ | cpp | 2,850 | permissive | /*
* This source file is part of RmlUi, the HTML/CSS Interface Middleware
*
* For the latest information, see http://github.com/mikke89/RmlUi
*
* Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
* Copyright (c) 2019-2023 The RmlUi Team, and contributors
*
* Permission is hereby granted, free of charg... |
9f9f4ead658fc7bb544b0897cb3c4f3f311fcaed | 10eaa73e9e2465b5c263a7aa252712d5244d742b | EEAIC/Baekjoon-Online-Judge | /14681/14681.cpp | C++ | cpp | 329 | no_license | #include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (x > 0) {
if (y > 0) {
cout << 1;
} else {
cout << 4;
}
} else {
if (y > 0) {
cout << 2;
} else {
cout << 3;
}
}
re... |
ca37b764b6edb53a7b30ba1743e07c53e0234f57 | df27ccf55676f93c80a55b5253ce7055d5180d8c | bigdoods/OpenInfraPlatform | /IfcRoad/src/OpenInfraPlatform/IfcRoad/entity/IfcDoorType.cpp | C++ | cpp | 5,667 | no_license | /*! \verbatim
* \copyright Copyright (c) 2015 Julian Amann. All rights reserved.
* \author Julian Amann <julian.amann@tum.de> (https://www.cms.bgu.tum.de/en/team/amann)
* \brief This file is part of the OpenInfraPlatform.
* \endverbatim
*/
#include <sstream>
#include <limits>
#include "OpenInfraPlatform/IfcRoad... |
3d7142bcfe87b25e7263881ba2b031fc37f4bed9 | bdc903f72f56d42b109e8e082686567a83466aa8 | Pratik-Jagadale/Library_System | /library_Interface.cpp | C++ | cpp | 9,306 | no_license | #include <iostream>
#include <cassert>
#include <string>
#include <stdexcept>
#include "Lib.h"
using namespace std;
static library* p_lib = nullptr;
typedef int ret_t;
struct temp_book{
std::string p_book_name;
std::string author_name;
std::string subject;
int book_id;
}temp_book_obj;... |
5bdf5ed0cdb2ca686dab109cb138ffe1d7cda385 | 236fc976931944aabea64faf58d27081c40871d0 | dio85/H1Z1-Server | /H1Z1 LoginServer/Stream.cpp | C++ | cpp | 7,406 | no_license | #include "Stream.h"
Stream::Stream()
{
_raw = 0;
_size = 0;
_pos = 0;
}
Stream::Stream(std::istream* str)
{
str->seekg(0, std::istream::end);
_size = (uint32)str->tellg();
str->seekg(0, std::istream::beg);
_raw = new byte[_size];
str->read((char*)_raw, _size);
_pos = 0;
}
Stream::Stream(uint16 size)
{
_s... |
1b68b532f9d600b61118745e2cbb146d9c77ae6c | 907b0b614481403e95908e0a8bc8752d301caebf | 774252326/sinyang | /v2/v2/OutputList.cpp | C++ | cpp | 13,743 | no_license |
#include "stdafx.h"
#include "OutputList.h"
#include "Resource.h"
#include "MainFrm.h"
//#include "func.h"
#include "v2Doc.h"
#include "v2View.h"
//#include "analyzerViewR.h"
#include <time.h>
/////////////////////////////////////////////////////////////////////////////
// COutputList1
COutputList::COutputList()
... |
30758c451730fb6b1afa7a39c28898c9a9621c41 | 3df02daf7a516703aee193b1095175218ad2b738 | venkyjntu-git/leg | /llvm/lib/Passes/PassBuilder.cpp | C++ | cpp | 85,724 | permissive | //===- Parsing, selection, and construction of pass pipelines -------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
421e098e6b296d376198f848669b49b1421b360d | d0cbff2265824321b28091699e938955fe45185d | maciejstanek/mocap_optitrack | /src/mocap_datapackets.cpp | C++ | cpp | 4,529 | no_license | #include "mocap_optitrack/mocap_datapackets.h"
#include <stdio.h>
#include <string>
#include <iostream>
#include <ros/console.h>
using namespace std;
RigidBody::RigidBody()
: NumberOfMarkers(0), marker(0)
{
}
RigidBody::~RigidBody()
{
delete[] marker;
}
const geometry_msgs::PoseStamped RigidBody::get_ros_pose(... |
b3b77068307f65c152de98c33d1abce6ec853b83 | 7c21b5a9d4b7550c93d783d62db4120d6fe54313 | simonggx/MNN | /tools/converter/source/optimizer/PostConverter.cpp | C++ | cpp | 19,278 | permissive | //
// PostConverter.cpp
// MNNConverter
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include <unordered_set>
#include <MNN/expr/Optimizer.hpp>
#include <set>
#include "../common/Global.hpp"
#include "PostConverter.hpp"
#include "PostTreatUtils.hpp"
#include "Program.h... |
d28ab56aea6f29dfbf4024ceeb5cea1c0bcca538 | 0172817f366e57dfe5105e4f2ce17975a0ab0db8 | ahyangyi/sgt-puzzles | /Kpgh-bridges.cpp | C++ | cpp | 1,444 | permissive | #include "Knotplasmagamehandler.h"
#include <typeinfo>
BridgesGameHandler::BridgesGameHandler(const GameHandlerFactories& factories): DefaultGameHandler(factories)
{
}
bool BridgesGameHandler::contains(const QPointF& point, const QList<std::shared_ptr<KnotRendererBatch::KnotBatchAction>>& batch, const QSizeF& size)
{... |
6e2cbdb05262226d1a9b073aa9bea77eb649acb2 | 5a13d41f24750decdffc64d7cdd10e23d25874ca | yuhwanwoo/cpp_review | /typeid01.cpp | C++ | cpp | 1,822 | no_license | #include <iostream>
#include <typeinfo>
using namespace std;
//Vehicle 클래스의 선언
class Vehicle{
protected:
int speed;
public:
void setSpeed(int s);
virtual void show()=0;
};
//Car 클래스의 선언
class Car :public Vehicle{
private:
int num;
double gas;
public:
Car... |
3ed7ecfc5a51ff99e31b3667c1c367de20ac316f | 0151ed404ea45ec2a90358b209beaf30568868be | rampaging-poet/dfhack | /library/LuaApi.cpp | C++ | cpp | 53,349 | permissive | /*
https://github.com/peterix/dfhack
Copyright (c) 2009-2012 Petr Mrázek (peterix@gmail.com)
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 softwa... |
772fba8b2ee994e7714523fee6809d69ff0841b1 | 333e20c5da1e79677d662d014a046e1b09172635 | cutepig123/TestCoroutine | /testcontext.cpp | C++ | cpp | 1,350 | no_license | /* testcontext.c : demo of win32 ucontex_t operations */
#include <stdio.h>
#include <stdlib.h>
#include <ucontext.h>
ucontext_t auc,buc,mainuc;
void a()
{
int i;
for (i=0; i<10; i++) {
printf("a");
swapcontext(&auc,&buc); /* switch to thread B */
}
printf("\nswitching to main\n");
swapcontext(&auc,... |
e5e612d28d145d18553b210820b293e1263976d5 | 2d76ace2697639350c49a4de363ac6182e2ecac6 | jdb19937/makemore | /wildmore.hh | C++ | hh | 603 | permissive | #ifndef __MAKEMORE_WILDMORE_HH__
#define __MAKEMORE_WILDMORE_HH__ 1
#include <vector>
#include <string>
#include <map>
#include "hashbag.hh"
#include "wildleth.hh"
#include "shibbomore.hh"
namespace makemore {
struct Wildmore {
uint8_t front3;
uint8_t _pad[7];
Wildleth backwild;
Wildmore() {
front3 = 0... |
ce24d4ad5a5ad6fa30e7eae9b80579acbe3dcf8b | 49fede7b449e9cefa60243da959851a296d44dbd | wbc91/code-practice | /usaco/section_2_3/longest_prefix/longest_prefix.cpp | C++ | cpp | 1,414 | no_license | /*
ID: 08300242
LANG: C++
TASK: prefix
*/
#include <cstdio>
#include <iostream>
#include <string>
#include <string.h>
std::string seq;
std::string patterns[210];
int newState[210];
int state[200010];
int main(void) {
FILE*fin,*fout;
fin = fopen("prefix.in", "r");
fout = fopen("prefix.out", "w");
memset(state, 0, si... |
96db9414e182a0e63405b0c5b28c78ef3608db13 | f243d3c37d8669d170d8097d0f4fd225eb24a813 | andrea-calabretta/cpp | /30_map.cpp | C++ | cpp | 923 | no_license | #include <iostream>
#include <map>
using namespace std;
class Studente
{
private:
string nome, cognome;
public:
//facciamo un costruttore di default perchè le mappe hanno bisogno di poter istanziare un elemento di default nel caso in cui cerchiamo di accedere ad una chiave che non esiste:
Studente()
{
nome... |
9fb3327d6efa02ec350639abfd5e2ecd9861ddc4 | a2a081dc72dd19019342fba535070553d64282a5 | GuptaManan100/Competitive | /Practice/931C.cpp | C++ | cpp | 1,359 | no_license | #include <bits/stdc++.h>
using namespace std;
int min(int a, int b)
{
if(a>b)
return b;
return a;
}
int mod(int a)
{
if(a>0)
return a;
return a*-1;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin>>n;
int k;
cin>>k;
int arr[5] = {0};
arr[2] = 1;
... |
ac3e6346a6171c2367ef249864cdbeef8dfbe57b | c112c95212ab3a87c586e84faf41ca47b7c277f6 | IgorKhramtsov/Arkanoid | /src/main.cpp | C++ | cpp | 548 | no_license | /*
Arkanoid
- platform moving left\right by keyboard
- ball bounces out of sides, platform and top
- bottom is endgame
- bricks generates randomly on game start
*/
/* Should be done:
- Review physic
- Add lerp
- Review movement
- Add mouse control
- Add BatchRendering
- Rework rendering (move mor... |
21c45acc69078cd3d159e0493fd795fda1c9deb8 | 373d53d116e073b1fd9e643e2fd8a22ed33a557c | vslavik/dart | /dart/constraint/BoxedLcpConstraintSolver.cpp | C++ | cpp | 10,325 | permissive | /*
* Copyright (c) 2011-2019, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
7890ce83adef007ba4567393ace1c3a0816cce63 | d9a2299830ef9b57103000d3227ce85fb0048ac6 | sprouts2/SAPP | /src/key.cpp | C++ | cpp | 14,173 | permissive | // Copyright (c) 2009-2017 The Bitcoin developers
// Copyright (c) 2017-2020 The PIVX developers
// Copyright (c) 2020-2021 The Sapphire Core Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "key.h"
#include ... |
66c064843ca2b9fb583fa366d6dd29e792f9a855 | 7f0e95aa545cc9aceac58a0f15ffc5036fd31f4c | tdmatsu/XXXX | /src/XXXXApplication.cpp | C++ | cpp | 1,949 | no_license | /*
========================================================================
Name : XXXXApplication.cpp
Author :
Copyright : Your copyright notice
Description :
========================================================================
*/
// [[[ begin generated region: do not modify [Generated System I... |
fb09eb03b65246b75ad6b1bf9a309e1f829b208b | ba79bf88eadbec2b876dd39ff97eff87bcaff9b2 | yssource/bpkg | /bpkg/rep-add.cxx | C++ | cxx | 2,028 | permissive | // file : bpkg/rep-add.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#include <bpkg/rep-add.hxx>
#include <bpkg/package.hxx>
#include <bpkg/package-odb.hxx>
#include <bpkg/database.hxx>
#include <bpkg/diagnostics.hxx>
#include <bpkg/ma... |
cf4cabbc6daa83de668c8da3121f7e9e3afd22e4 | 5f348ff9f940d03fb8574c0ceb14c9f7e0423489 | JonnyKong/LeetCode | /146_LRU_Cache.cpp | C++ | cpp | 2,057 | no_license | /**
* Maintain doubly-linked list in hashmap
* i.e. java.LinkedHashMap
*/
class Node {
public:
int key;
int value;
Node *front;
Node *back;
Node(int _key, int _value) : key(_key), value(_value) {}
Node(int _key, int _value, Node *_front, Node *_back)
: key(_key), value(_value), front(_front), bac... |
1519750b225da647255080535ed999c9b984f352 | 5dc7993064f33a6bce767fc304ae94c33c719e5d | thelunatic/rtems-tools | /tester/covoar/Target_m68k.cc | C++ | cc | 3,499 | no_license | /*! @file Target_m68k.cc
* @brief Target_m68k Implementation
*
* This file contains the implementation of the base class for
* functions supporting target unique functionallity.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <rld.h>
#include "Target_m68k.h"
#include... |
b5a106f68969b66c57d3b10233061be3cb1996dc | d129eb49c469ad0a8336f602a1db330db544b466 | pufe/bolacha | /cortador.cpp | C++ | cpp | 1,198 | no_license | #include <cstdio>
#include <utility>
#include <algorithm>
using namespace std;
typedef long long int huge;
const int maxn = 100100;
int vet[maxn];
int aux[maxn];
// [start, finish)
huge count_inversions(int start, int finish) {
if (finish<=start+1) {
return 0;
}
huge c=0;
int mid=(start+... |
72ec226bd9063734eb49388d486a3cbb4690f3e6 | 306d84c4e32ca8a26894308927222f7e1e78cf3f | vivekmahajan/coding-practice | /interview-street/graph/graph.cpp | C++ | cpp | 2,320 | no_license | #include <iostream>
#include <queue>
#include <vector>
#include <stack>
using namespace std;
class graph{
private:
//vector of vectors. Pair can be used to store the node as well as the weight
vector< vector< pair<int, float> > > g;
public:
graph(int); //one arguement is the n... |
7ffd7ec372d1802014637e4dbc1ffff0f8479a24 | 5982e78b3bae7cd0ff1dfa4aff23366052ab3304 | jeffatstepup/titanium_mobile_blackberry | /src/tibb/NativeWebViewObject.cpp | C++ | cpp | 10,973 | permissive | /*
* NativeWebViewObject.cpp
*
* Created on: Jan 25, 2013
* Author: penrique
*/
#include "NativeWebViewObject.h"
#include "TiEvent.h"
#include "TiEventContainerFactory.h"
#include <bb/cascades/ActivityIndicator>
#include <bb/cascades/DockLayout>
#include <bb/cascades/Container>
#include <bb/cascades/JavaScr... |
63868ba60ed7a00828588c3db68865a62e5394eb | ab91e7cc40bc5749e142ba48ac8ca570906a03c3 | taliesinb/floatworld | /src/world.cpp | C++ | cpp | 17,370 | no_license | #include "world.hpp"
#include "creat.hpp"
#include <fstream>
#include <assert.h>
#include <QPainter>
using namespace std;
RegisterClass(World, Object)
void write_grid_size(World* g, std::ostream& s)
{
s << "[" << g->rows << ", " << g->cols << "]";
}
void read_grid_size(World* g, std::istream& s)
{
int rows... |
fecee50dd876c007541e6c3fdee394f700521d7b | b75264ca59e126bbe44892991fff46bdf3f991ea | Musfiqshohan/Competitive-Programming | /topics wise codes/GEOMETRY/SPOJ - DOORSPEN.cpp | C++ | cpp | 3,967 | no_license | ///http://www.spoj.com/problems/DOORSPEN/en/
/// separate two convex hulls using one straight line
#include<bits/stdc++.h>
#define pb push_back
#define loop(i,n) for(int i=0;i<n;i++)
using namespace std;
int d,p;
struct Points
{
int x,y;
} p0;
vector<Points>pnts1,pnts2;
Points mp(int x,int y)
{
Points ret;
... |
1f08f247534a15854ea66c92d8ab18fe343762e0 | 644ff3c46095a9b48e7ee06d58073c04319b7e1a | lifting-bits/remill | /lib/Arch/X86/Semantics/NOP.cpp | C++ | cpp | 2,155 | permissive | /*
* Copyright (c) 2017 Trail of Bits, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
a7adcb7b1a985f3263c16e704f6ba779f254515c | 63101fb23614d4b6418c6dc32ab1e283f20ab5c1 | karunmatharu/Android-4.4-Pay-by-Data | /external/ceres-solver/internal/ceres/jet_quaternion_integration_test.cc | C++ | cc | 6,734 | permissive | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2010, 2011, 2012 Google Inc. All rights reserved.
// http://code.google.com/p/ceres-solver/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
... |
34b9d2075a112266e75b11c9ed005010e3acf6b4 | de9ba3feee51d63e2fd2e4e59c24d9bc08535804 | MaxCodeXTC/GenomeWorks | /common/base/tests/Test_UtilsThreadsafeContainers.cpp | C++ | cpp | 9,506 | permissive | /*
* Copyright 2019-2020 NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... |
7e25a04acf6e357a82a18a1a54ce09ba9601901c | 7f281099ca5830c270c449ee786e804c9a7c8910 | fidiniaina/AugmentedMirror | /OpenFrameworks/addons/augmentedMirror/src/amCamera.cpp | C++ | cpp | 697 | no_license | #include "amCamera.h"
amCamera::amCamera(){
cameraMatrix = cvMat(3, 3, CV_64F, M );
distCoeffs = cvMat(1, 5, CV_64F, D );
source = NULL;
}
void amCamera::init() {
if (!source) source = new amCameraSourceGrabber();
amCameraSourceGrabber* csg = dynamic_cast<amCameraSourceGrabber*>(source);
if ... |
be2a40bd2cac8cf2a78bcda866cb7e9d580535dc | fe2043150e48b3db46daadcfdd54a7b1a8720410 | ailyanlu/ACM-13 | /TopCoder/SRM 259 Div 1/250/sol.cpp | C++ | cpp | 1,126 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <stack>
#include <algorithm>
#include <map>
#include <set>
using namespace std;
class NumericalSequence{
public:
int makePalindrome(vector <int> v){
deque <int> q (v.begin(), v.end());
int res=0;
w... |
cfdde10303d0e842e9b08d954374d34a75c34cba | 3c53c6a04f6a5b8fe85cfba9d4fff4b82ffe1bcd | namangup/CP | /Codeforces/1343/A.cpp | C++ | cpp | 2,957 | no_license | /******Author : c0d3rpr0********/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<ll,ll> ii;
typedef vector<ll> vi;
typedef vector<ii> vii;
typedef vector<long long> vll;
typedef vector<char> vc;
typedef long double ld;
typedef set<ll>::iterator sit;
ty... |
817385ed6eeba6c8f89b0e921ae152681ec64884 | d61349663915d36a9ae4ba8f8d4a646552e90191 | orianapedroza/proyectoLM1 | /omega/build-omega-Desktop-Debug/moc_pres.cpp | C++ | cpp | 3,634 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'pres.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1)
**
** WARNING! All changes made in this file will be lost!
****************************************************************... |
b176a585a00918433638fa622616fddfd86dddc9 | 2998495a7b2439cd96b1499a714171303b9d11ff | Burnung/TestOpenGL | /include/GL_Frame.cpp | C++ | cpp | 3,673 | no_license | #include"GL_Frame.h"
#include<iostream>
#include<windows.h>
bool sWithDepth, sWithStencil;//是否使用深度和模板
static GLFWwindow* s_pWindow = nullptr;
static GL_CallBack *m_GLCallBack = nullptr;
int Width, Height;
void InitGLContex(int w, int h, bool WithDepth, bool WithStencil,const char* tittle){
sWithDepth = Wi... |
414995d93ddc6a4c63b0bb52b798cc697f2e4941 | 027c37715c80ebee2caa0173c5db5974fc5c2031 | ipa320/OpenCR | /arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk/port_handler_mac.cpp | C++ | cpp | 6,154 | permissive | /*******************************************************************************
* Copyright (c) 2016, ROBOTIS CO., LTD.
* 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 so... |
488c6bb056e8fde4527dc96cd4167572b5844a9c | cca029411dd2ec12096afd9dd6ac10d2390c0720 | zerohoon96/BOJ_algorithm | /Bronze/수 정렬하기 B1 (bubble sort).cpp | C++ | cpp | 326 | no_license | #include <stdio.h>
int main(void){
int i,j,n,tmp,arr[1000];
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&arr[i]);
for(i=0;i<n;i++){
for(j=1;j<n-i;j++){
if(arr[j-1]>arr[j]){
tmp=arr[j-1];
arr[j-1]=arr[j];
arr[j]=tmp;
}
}
}
for(i=0;i<n;i++)
printf("%d\n",arr[i]);
return 0... |
be17a796d24909f0cbfb455730e40c24629861a5 | 55152ac09141678dc555ebd56ffacb53879fb805 | MCLEANS/STM32F4_PWM_CONFIGURATION | /IMPLEMENTATION/src/main.cpp | C++ | cpp | 814 | no_license | /**
******************************************************************************
* @file main.c
* @author Ac6
* @version V1.0
* @date 01-December-2013
* @brief Default main function.
******************************************************************************
*/
#include "stm32f4xx.h"
#incl... |
189cec9e02317f7ae4fea3437275bd390a5aa114 | 86c028ae95b340d14ffd2f20749cb8066d8e41e9 | JoshuaRogers/snake2 | /main/gamemode.cpp | C++ | cpp | 756 | no_license | #include "gamemode.hpp"
#include "game.hpp"
#include "gamerenderer.hpp"
GameMode::GameMode(std::shared_ptr<Game> game, std::shared_ptr<GameRenderer> gameRenderer, int maxTicks) : _game(game),
_gameRenderer(gameR... |
131bb212109e8db7bbbeb88f3ff07f40d65c8ac7 | 08212c2db0eaceaa62ff7616b03e6f564bbe813d | karunmatharu/Android-4.4-Pay-by-Data | /frameworks/compile/libbcc/bcinfo/Wrap/file_wrapper_input.cpp | C++ | cpp | 1,669 | permissive | /*
* Copyright 2012, 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 applica... |
3848083d211052d30114bdf259c617ef091e0cc1 | 7a136463fd96b240626ac92c6b6e342323c24339 | snsinfu/micromd | /tests/system/detail/test_sum_forcefield.cc | C++ | cc | 1,363 | permissive | #include <memory>
#include <vector>
#include <md/basic_types.hpp>
#include <md/forcefield.hpp>
#include <md/system.hpp>
#include <md/system/detail/sum_forcefield.hpp>
#include <catch.hpp>
TEST_CASE("sum_forcefield::add - adds a forcefield to the sum")
{
class my_forcefield : public md::forcefield
{
pub... |
683ac2295fa359187a27f65176920f1ba5025f14 | c7ff48cbb20c4a8a18d7cb44fff9c3dffb897bf3 | liyvwen/CollegeProgram | /C++做足一百/qz80-排队系统/main.cpp | C++ | cpp | 3,505 | no_license | //3. 大整数的运算
//利用数组来表示无符号大整数, 完成大整数的输入、输出、加法和乘法运算。
//void InputLargeInteger(char *p, int n); // 输入大整数
//void OutputLargeInteger(const char *q, int n); // 输出大整数
//void AddLargeInteger(char *r, const char *p, const char *q, int n); // 大整数p和q相加, 结果保存到r
//void MulLargeInteger(char *r, const char *p, const char *q, int ... |
4bbcbf8bd472505d9e42a5c07fe5d838b1f63eaf | ab27f8c32949c5c768dbc6d42e1d3b0550ddb5c3 | cclienti/veriparse | /lib/src/AST/greatereq.cpp | C++ | cpp | 3,358 | no_license | #include <veriparse/AST/greatereq.hpp>
#include <veriparse/AST/node_cast.hpp>
#include <veriparse/logger/logger.hpp>
#include <iostream>
namespace Veriparse {
namespace AST {
GreaterEq::GreaterEq(const std::string &filename, uint32_t line):
Operator(filename, line) {
set_node_type(NodeType::GreaterEq);
set_node_ca... |
8999d41f9497a85d62411660d397cc9f1fdad0ae | a3c9ff76c95bd6f5d29425c66d62d1f800122062 | Oneinone/SteveBase | /SteveBase/include/source_engine/def/CollisionGroup.hpp | C++ | hpp | 1,657 | permissive | #pragma once
namespace SteveBase::SourceEngine::Define {
enum class CollisionGroup {
None = 0,
Debris, // Collides with nothing but world and static stuff
DebrisTrigger, // Same as debris, but hits triggers
InteractiveDebris, // Collides with everyt... |
ced8c987a7228f1bddd1974422843a5c90a8cde8 | c2909856675dfb0b5f203d7a2aa6d39d2df4d7b4 | irods/aws-sdk-cpp | /aws-cpp-sdk-directconnect/source/model/Lag.cpp | C++ | cpp | 9,493 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/directconnect/model/Lag.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace D... |
4fb32516cb05181727e0a09519faa889e68d7d90 | 27527f600e9971912005189b498b0e0511902ce1 | LeFroid/ungoogled-qtwebengine-chromium | /chromium/components/payments/core/journey_logger_unittest.cc | C++ | cc | 51,939 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/payments/core/journey_logger.h"
#include "base/metrics/metrics_hashes.h"
#include "base/test/metrics/histogram_tester.h"
#include "b... |
5bcdf67226d8b6fd58fe5ba09f9936d93d9d2279 | 61b435e9e1e5af116322adf4ebea9675a7103d80 | weimingtom/betasystem | /Source/Project/State/StateDebugTop.hpp | C++ | hpp | 469 | no_license | #ifndef STATE_DEBUG_TOP__
#define STATE_DEBUG_TOP__
#include <vector>
#include "System/StateBase.hpp"
#include "Project/Singleton/SingletonStateManager.hpp"
namespace Game
{
class StateDebugTop : public StateBase
{
public:
StateDebugTop();
~StateDebugTop(){}
public:
void Update();
... |
f2b684ff7db1b5b66bcbea07a11ebae46e0516ce | b3e3fd328821f93c126dbba5fc305e5fc2a1ae98 | Zahner-elektrik/Thales-Remote-Cpp | /ThalesRemoteCppLibrary/threadsafequeue.cpp | C++ | cpp | 3,208 | permissive | /******************************************************************
* ____ __ __ __ __ _ __
* /_ / ___ _/ / ___ ___ ___________ / /__ / /__/ /_____(_) /__
* / /_/ _ `/ _ \/ _ \/ -_) __/___/ -_) / -_) '_/ __/ __/ / '_/
* /___/\_,_/_//_/_//_/\__/_/ \__/_/\__/_/\_\\__... |
eb25f1295779abb6cb541190c66c8fbba207f3ce | ed9e786d9ab2047115dcb819fdfcae8ea1519b78 | sanyaade-mobiledev/titanium_mobile_blackberry | /src/tibb/NativeAlertDialogObject.cpp | C++ | cpp | 3,693 | permissive | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "NativeAlertDialogObject.h"
#include "NativeControlObject.h"
#include "... |
a9aab09c975d87d53edc0c2249fee1c866556d44 | 9dba9c0ce9a4a9e14cd50b83f658c259869c4a28 | salkaevruslan/hse-cpp-homework | /lab_10/src/main.cpp | C++ | cpp | 588 | no_license | #include "Scheme.hpp"
#include "Rectangle.hpp"
#include "Circle.hpp"
#include <stdio.h>
int main() {
Scheme scheme(10);
scheme.push_back_figure(new Rectangle(1, 5, 5, 10, 10));
scheme.push_back_figure(new Circle(2, 3, 3, 3, "very nice circle"));
scheme.print_all_figures();
Figure* found = sche... |
4b1dcbca265e367e0b496abba2a02159378a1d45 | a3d09e070089454d17aaa316f0dde94933e2c6d7 | ZhouC125/cocos2d | /Classes/LoginLayer.cpp | C++ | cpp | 7,906 | no_license |
#include "LoginLayer.h"
#include "constart.h"
#include "DengluScene.h"
#include "GameHall.h"
#include "audio/include/SimpleAudioEngine.h"
#include "cocostudio/CocoStudio.h"
#include "CommonAudio.h"
#include "ProgressLayer.h"
#pragma execution_character_set("utf-8")
USING_NS_CC;
using namespace std;
using namespace co... |
5d081fd46b43017b6d7ba600ef1143d2fa36d953 | 462ae7d40e3a0e7e1d4b36e4280ac9e5af132657 | devvsda/gargantua | /src/com/devsda/gargantua/linkelist/reverse_k_nodes.cpp | C++ | cpp | 2,197 | permissive | #include<stdio.h>
#include<stdlib.h>
/* Link list node */
struct node
{
int data;
struct node* next;
};
/* Function to print linked list */
void printList(struct node *node)
{
while(node != NULL)
{
printf("%d ", node->data);
node = node->next;
}
}
/* Rever... |
8975fbc79a2e166a9f9b1740682b6208bff455e9 | 1b2fa51190b1c6c588e678d0fd2e72af07c264ad | seem-sky/Modbus | /Utils/Error.cpp | C++ | cpp | 1,209 | no_license | /**********************************************************************
* Comm -- Connection framework
* (C) 2009 by Tomasz bla Fortuna <bla@thera.be>
*
* 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... |
217162bd4e5aeffd783753415db6ae328a3da7a9 | bc240e5e94c5fbe815e5e48c170b3da8d07a4b39 | thecsapprentice/SBSS_Public | /src/lib/SIMD_Optimized_Kernels/Kernels/Stress_Tensor_Differential/Stress_Tensor_Differential.cpp | C++ | cpp | 3,761 | no_license | //#####################################################################
// Copyright (c) 2011-2013 Nathan Mitchell, Eftychios Sifakis.
// This file is covered by the FreeBSD license. Please refer to the
// license.txt file for more information.
//#####################################################################... |
9f973ff7324c0fdb43148c4a71e470a262242836 | db1e8e8eb061d9ce3767c1edb655ff802bfd3ac4 | hefo/gr-phyauth | /lib/test_phyauth.cc | C++ | cc | 1,417 | no_license | /* -*- c++ -*- */
/*
* Copyright 2012 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio 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, or (at your option... |
ea750bf2338e5cd1cb8c02cb25495824bf836755 | a38fe45a02c0b5973a6a0c0ed0de51fa69219c5a | shauryauppal/Algo-DS-StudyMaterial | /Dynamic Programming/Edit Distance(I memoization).cpp | C++ | cpp | 567 | permissive | #include <bits/stdc++.h>
using namespace std;
int dp[100][100]={0};
int edit(string s,string t,int n,int m)
{
if(n==0)
return m;
if(m==0)
return n;
if(dp[n][m]!=0)
return dp[n][m];
else if(s[n-1]==t[m-1])
return ( dp[n][m]=edit(s,t,n-1,m-1) );
else
... |
24a4abf531cfff3d8c30884d5f4ba7646ec78456 | 1ca4506f990812e59bb529de204e31610c5d2ba4 | rustyeddy/redeyecpp | /src/image.cpp | C++ | cpp | 250 | permissive | #include <string>
#include <opencv2/opencv.hpp>
#include "image.hpp"
Image::Image(std::string fname)
{
_file_name = fname;
}
cv::Mat* Image::get_frame()
{
auto m = new cv::Mat( cv::imread( _file_name, cv::IMREAD_COLOR ) );
return m;
}
|
bf05f464d84cb7851bf2c22c1119142999b64564 | a1e37bae2002624e0ff5d58bb2cbbfb586d32c6d | shivmsit/Lumos | /Lumos/src/Physics/LumosPhysicsEngine/PhysicsObject3D.cpp | C++ | cpp | 3,928 | permissive | #include "lmpch.h"
#include "PhysicsObject3D.h"
#include "LumosPhysicsEngine.h"
#include "ECS/EntityManager.h"
namespace Lumos
{
PhysicsObject3D::PhysicsObject3D() : PhysicsObject()
, m_wsTransformInvalidated(true)
, m_RestVelocityThresholdSquared(0.001f)
, m_AverageSummedVelocity(0.0f)
, m_wsAabbInvalidate... |
006cbb1ed229b9d8ba641d52c01214d5816c6aea | 81b8faf5e646a868e40929600bd6c9d5fce6d6bf | takohack/cs106B-2020summer | /code/Lecture11Final/build-Lecture11-Desktop_Qt_5_13_2_MinGW_32_bit-Debug/debug/moc_gbutton.cpp | C++ | cpp | 4,451 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'gbutton.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.2)
**
** WARNING! All changes made in this file will be lost!
************************************************************... |
e9ac815458d65d67bdcd2e972a377d3cd9641e0e | 9027114b10d1781ed3997cc6f6ef63afa46868da | dolwijit13/2110327_Algorithm_Design | /mid_p3_tile.cpp | C++ | cpp | 705 | no_license | #include<bits/stdc++.h>
using namespace std;
int dp[15][10005];
int a[15];
int main()
{
int n,m;
int i,j,k;
scanf("%d %d",&n,&m);
int mi=INT_MAX;
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<=n;i++)
{
for(j=0;j<=m;j++) dp[i][j]=INT_MAX;
}
dp[0][0]=0;
... |
1f8b0be71e49740c0d823668f87a050e2cddba27 | 20b86a78b5de42cc6737275737996c6a2cd3069c | jrgm/node-generate-rsa-keypair | /binding.cc | C++ | cc | 1,563 | permissive | #include <node.h>
#include <nan.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
using namespace v8;
int bits = 2048;
unsigned long exponent = 65537;
NAN_METHOD(generate_rsa_keypair) {
NanScope();
RSA *rsa;
BIO *bio;
char *raw;
long rawLength;
Local<Object> buffer;
Local<Object> result = NanNew<... |
d4146cdede9f40fb863f1934bda1211125ba0bbf | eabdff41d30833e201cdb7c182b8e8d74572d0a0 | Tigrouzen/UnrealEngine-4 | /Engine/Source/Runtime/Engine/Private/Animation/AnimNode_ApplyAdditive.cpp | C++ | cpp | 1,407 | no_license | // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#include "EnginePrivate.h"
/////////////////////////////////////////////////////
// FAnimNode_ApplyAdditive
void FAnimNode_ApplyAdditive::Initialize(const FAnimationInitializeContext& Context)
{
Base.Initialize(Context);
Additive.Initialize(Context);
}
... |
66c94ba9e9d6c7cfca253ff69ba914a99c15d700 | 7cf8585f5a23f0553334121bfaf7ab38f6039fd2 | elkcloner058/derektut | /delete.cpp | C++ | cpp | 1,121 | no_license | #include<iostream>
using namespace std;
//after creatin branch four this line is added to check rebasing
//when your head is one the pillow and the day is almost done count Allah's name count them one by one.
//another line is added
long int c[1000][1000];
int max(long int a, long int b)
{
if(a>b)
return a;
else... |
9ae5b5b11e08e5bc83ac5313e420084b1db4091a | 910e196f9302eb91c862b29b03bfe4067d7a74e0 | Rakibul-CoU/Basic-Code | /Cumulative sum.cpp | C++ | cpp | 1,891 | no_license | #include<bits/stdc++.h>
///...................................*****.................................................///
/// Author : MD. Rakibul Islam ( mmdrakibul2912@gmail.com ) ///
/// Department of Computer Science ///
/// ... |
392389c6b82a35a7b495d66a5879563e7a1554af | da624d792e4604a6bac500e57fa75a374e44e924 | ericlytle/303Project1 | /Main.cpp | C++ | cpp | 1,504 | no_license | #include "UserInterface.h"
#include "AssignmentManager.h"
using namespace std;
void main()
{
while (true)
{
// Initialize objects and local variables
UserInterface ui;
AssignmentManager am;
Date dueDate;
Date assignedDate;
Date newDueDate;
Date newAssignedDate;
AssignmentStatuses status;
string des... |
edf08d3553cf37910a9123dab1b8b22333aad137 | e468ff66899a9fb2a3ed2e93a5e21f314a7456de | BenjaminNC/CS200 | /Labs/Lab10/A.cpp | C++ | cpp | 376 | no_license | //Benjamin Carpenter 3/2/17
#include <iostream>
#include <string>
using namespace std;
int main() {
string names[5];
names[0] = "Xia";
names[1] = "Shang";
names[2] = "Zhou";
names[3] = "Qin";
names[4] = "Han";
cout << names[0] << "\n" <<
names[1] << "\n" <<
names[2] << "\n" <<
names[3] << "\n... |
72010159ac2bcef42b7405101ab3274b6ff070e1 | 6ebb2e16a34a99fb3c5540fa30a2da8ce7daaf94 | casterminator/zcore-source | /src/qt/sendcoinsentry.cpp | C++ | cpp | 8,304 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The ZCore developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "sendcoinsentry.h"
#include "ui_sendcoinsentry.h"
#include "address... |
41f4e4075e76143828e17c802a6139961b903fac | 173e4c2433327d20593e323ccc6be8c21a560ccd | sapphireHL/leetcode | /149. Max Points on a Line/Max Points on a Line.cpp | C++ | cpp | 1,250 | no_license | /**
* Definition for a point.
* struct Point {
* int x;
* int y;
* Point() : x(0), y(0) {}
* Point(int a, int b) : x(a), y(b) {}
* };
*/
class Solution {
public:
int gcd(int a, int b){
if(b == 0) return a;
else return gcd(b, a%b);
}
string calculateAB(Point a, Point b... |
56e6273a923b16733be3ced5e54efcb8be553191 | 9b1ceac95632cef0e64b1804eb002953e1e8d5af | yoshi-ki/4S-algorithm | /0426/b.cc | C++ | cc | 8,177 | no_license | #include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <functional>
#include <cmath>
#include <cstring>
#include <numeric>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>
#include <complex>
#include <list>
#include <cassert>
#include <deque>
#i... |
b76df81f7e4667908d51a813d6c717f21ce86fc6 | 7f755f05bca9f41c00aafa582e427ab4847ce4ed | TencentCloud/tencentcloud-sdk-cpp | /ie/src/v20200304/model/SubTaskResultItem.cpp | C++ | cpp | 8,260 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
a27bb69812c98f305d4baadf19b1037457c8ba37 | de806a9c9697a853b8c6393f0c7297c470cd4eaa | JiaAnSu/tensorflow | /tensorflow/python/lib/io/file_io_wrapper.cc | C++ | cc | 9,050 | permissive | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.