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 |
|---|---|---|---|---|---|---|---|---|
5edf1dddad8bf6a774c2abb73cf766a2f3b39f07 | 32fb395b1520a9465a5b58f36c79caf2059794a3 | felipelalli/nano-node | /nano/node/transport/transport.hpp | C++ | hpp | 4,705 | permissive | #pragma once
#include <nano/lib/stats.hpp>
#include <nano/node/common.hpp>
#include <nano/node/socket.hpp>
#include <unordered_set>
namespace nano
{
namespace transport
{
class message;
nano::endpoint map_endpoint_to_v6 (nano::endpoint const &);
nano::endpoint map_tcp_to_endpoint (nano::tcp_endpoint const &);
na... |
7f914b2cce0d94e56e1d8fa8c9877100bb98ce7b | 690482d6b8920c22f8f2357b280889089785ca88 | amir-toly/chromium | /chromeos/components/print_management/print_management_ui.cc | C++ | cc | 6,294 | permissive | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/print_management/print_management_ui.h"
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "chromeos... |
6c4dbf7ab00b9c620a5a083f60ef23adf6c525f2 | d8a36a1f06596fbd1ad0053f11df445b3f9cc9d0 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/Z6.5+poonceonce+pooncerelease+poreleaseonce.c.cbmc.cpp | C++ | cpp | 36,944 | no_license | // 0:vars:3
// 3:atom_2_X1_0:1
// 4:thr0:1
// 5:thr1:1
// 6:thr2:1
#define ADDRSIZE 7
#define NPROC 4
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( char from, char to ) {
char ret = __g... |
c5b4d0171d99e9bbe886a47e6b3550e0bd151049 | d136635e811428456cd137b8b4a86dad5ad36d16 | aaasz/SHP | /llvm/examples/Kaleidoscope/Chapter4/toy.cpp | C++ | cpp | 17,201 | permissive | #include "llvm/DerivedTypes.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/PassManager.h"
#include "llvm/Analysis/Verifier.h"
#... |
538fe995dc871b4dabc2fa2beb4712ad5550a1d9 | afd57fcb7a18dfcbd0e65ce53902751902527c4d | proaholic/Win2K3 | /NT/net/sockets/winsock2/ws2_32/src/nscatent.cpp | C++ | cpp | 24,088 | no_license | /*++
Intel Corporation Proprietary Information
Copyright (c) 1995 Intel Corporation
This listing is supplied under the terms of a license agreement with
Intel Corporation and may not be used, copied, nor disclosed except in
accordance with the terms of that agreeement.
Module Name:
nscatit... |
06f44ca4ffbebbb3bb87dafb71a5e4a584bb6454 | 030b2e5cda060620fa2a1dcd7d13862e08641541 | ecmwf/atlas | /atlas_io/src/atlas_io/ReadRequest.cc | C++ | cc | 4,697 | permissive | /*
* (C) Copyright 2020 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergo... |
6fd3a67b061d17505a19e558e9217450e5710e0a | 4fd16541e3d6f04bec05630b348eacc76515cba4 | iraqigeek/iZ3D | /lib/boost/include/boost/mpl/vector/vector20.hpp | C++ | hpp | 1,278 | permissive |
#ifndef BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED
#define BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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)
//
// See http://www.bo... |
1955e4ba2f2c5a6a74a1e429334adbada5d9f2b0 | 1d4235c65c5dbae40b16f27cc61647b68776102b | RDLLab/tapir | /src/solver/BeliefTree.cpp | C++ | cpp | 3,088 | no_license | /** @file BeliefTree.cpp
*
* Contains the implementation of BeliefTree.
*/
#include "solver/BeliefTree.hpp"
#include <memory> // for unique_ptr
#include <vector> // for vector
#include <iostream>
#include "global.hpp" // for make_unique
#include "sol... |
b542c34ab619622cb8eb99ae872ea09d870092d3 | 3000dddf9e944b5643227c129731a3981e756f1c | zhangz5434/code | /2016/mo1U5053.cpp | C++ | cpp | 648 | no_license | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
const int MAXN=1005;
int a[MAXN];
int f[MAXN][MAXN];
int maxw[MAXN][MAXN];
int minw[MAXN][MAXN];
int n;
void init()//O(n^2)预处理区间最大最小
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
for(... |
3bf542c0d2735c670f8fb0eb3436e8db52198805 | dceada2e1037ebfae74325e74f70d500e6628654 | metta-systems/metta | /src/runtime/libc++/test/containers/unord/unord.multimap/unord.multimap.modifiers/insert_rvalue.pass.cpp | C++ | cpp | 2,215 | permissive | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
a6776613c40f631e43d4f907bd5a95085e93254d | 09ae3693113a67688540604acefd73c593744f5a | animesh/apps | /images/ncbi-blast++/2.4.0/include/ncbi-tools++/util/value_convert.hpp | C++ | hpp | 40,733 | no_license | #ifndef UTIL___VALUE_CONVERT__HPP
#define UTIL___VALUE_CONVERT__HPP
/* $Id: value_convert.hpp 499843 2016-04-28 16:12:36Z ivanov $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Info... |
e0577c55b9a08a9a4ec402729c90ed3b2a715f7d | 21424069b248df0bf35439f995c963a7ae37cd55 | hllj/Codeforces | /548B/main.cpp | C++ | cpp | 865 | no_license | #include <bits/stdc++.h>
using namespace std;
int n, m, q;
int a[510][510];
int g[510];
int main() {
scanf("%d %d %d", &n, &m, &q);
for (int i = 1; i <= n; i++) {
g[i] = 0;
for (int j = 1; j <= m; j++) scanf("%d", &a[i][j]);
int cnt = 0;
for (int j = 1; j <= m; j++) {
... |
04a69294a8559471b977c30ad602e4870794761e | 8a1f0f484a0cb2f379a1ae63bcdfb6c209ffb8a3 | rockleis/rocknative | /frameworks/cocos2d-x/cocos/editor-support/MeshBuffer.cpp | C++ | cpp | 4,602 | permissive | /****************************************************************************
Copyright (c) 2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
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 ... |
ba83a647c04f97bf6b9d7cf05e2e54419def75e8 | d79eb42388ae65424fa431e6984e3cd7f786d075 | noraabiakar/arbor | /test/unit/test_event_generators.cpp | C++ | cpp | 3,429 | permissive | #include "../gtest.h"
#include <arbor/event_generator.hpp>
#include <arbor/spike_event.hpp>
#include "util/rangeutil.hpp"
#include "common.hpp"
using namespace arb;
namespace{
pse_vector as_vector(event_seq s) {
return pse_vector(s.first, s.second);
}
}
TEST(event_generators, regular) {
// mak... |
5d504cf7b5914922848c1139d04d579f6e6ce9f6 | 600883a29e21aa1408945274f5c88c5e887a885e | lesongvi/brainflow | /third_party/oscpp/include/oscpp/error.hpp | C++ | hpp | 2,231 | permissive | // oscpp library
//
// Copyright (c) 2004-2013 Stefan Kersten <sk@k-hornz.de>
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying documentation covered by
// this license (the "Software") to use, reproduce, display, distribute,
// execut... |
faddcd1fa2e249c49f14bf5d703c168a45a5d897 | beac2bc5ca5791cd1ddf0785840e195eaab8339a | julien641/pong | /pong2/pong2/pong2.cpp | C++ | cpp | 20,820 | no_license | #include "stdafx.h"
#include <thread>
#include <windows.h>
#include <iostream>
#include <conio.h>
#include <iomanip>
#include <stdio.h>
#include <cstdlib>
#include <cstddef>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <fstream>
#include <cmath>
#define NOMINMAX
... |
eaead57caaa4f77a84781da92884959b50641701 | 04566b8a79c93c943114374edfbfb4f19da3bd96 | xingfeT/c-practice | /day-001-100/day-077/problem-2/main.cpp | C++ | cpp | 1,014 | no_license | /*
* Write a declaration to store the string "This is a test"
* into an array named stringtest. Include the declaration
* in a program to display the message using the following
* loop:
*
* for (i = 0; i <= 14; i++)
* printf("%c", stringtest[i]);
*
* Include a separate loop that only displays the character... |
631e0b0e7c2a5d3b9b7eb6311a94f1b577967dd8 | bf74173c84bc33f3ed38d71f37678dfc2ce51265 | ketkimnaik/Algorithms | /395_Longest_Substring_with_At_Least_K_Repeating_Characters.cpp | C++ | cpp | 721 | no_license | class Solution {
public:
int longestSubstring(string s, int k) {
if(k > s.size()) return 0;
if(k == 0) return s.size();
vector<int> count(26, 0);
for(auto i : s) {
count[i - 'a']++;
}
int i = 0;
... |
6f05ee216783599e51ce09760686f4558e993155 | 8d93dbf11f93553252e35342dde85b80dff8b357 | Tyrreus/gqrx-cpp-scanner | /GqrxManager.cpp | C++ | cpp | 6,958 | permissive | //
// Created by mwolosewicz on 23.07.2020.
//
#include "GqrxManager.h"
#include "ConnectorException.h"
#include "GqrxManagerException.h"
#include <sstream>
#include <string>
#include <map>
#include <vector>
using std::string;
using std::map;
using std::vector;
using std::stringstream;
static constexpr size_t kMaxC... |
e9f6dc53c62c2aa0f2e927635b55554cde1d50a3 | d7e1deb5086a48965807163755ab07864fc78d0c | pampersrocker/risky-epsilon | /Game/gep/src/gep/subsystems/sound/sound.cpp | C++ | cpp | 14,221 | permissive | #include "stdafx.h"
#include "gepimpl/subsystems/sound/sound.h"
#include "gepimpl/subsystems/sound/system.h"
#include "gep/globalManager.h"
#include <fmod_errors.h>
#include "gep/exception.h"
#include "gep/interfaces/logging.h"
DefineWeakRefStaticMembersExport(gep::ISoundParameter)
gep::FmodSoundLoader::Fmo... |
ae93ecc13996067b78a70e8410c5ee8cf656309b | 4720f3b4d43cf9e8dcc428b004460255dc6a57e4 | laztheripper/mule-view | /src/frameui/framewnd.cpp | C++ | cpp | 5,770 | no_license | #include <windows.h>
#include "framewnd.h"
WindowFrame::WindowFrame(Frame* parent)
: Frame(parent)
{
Frame* cur = getParent();
while (cur->getParent())
cur = cur->getParent();
RootWindow* frm = dynamic_cast<RootWindow*>(cur);
if (frm)
ownerWindow = frm->getHandle();
else
ownerWin... |
61c164f06c37551e3d289e9296c3386c4fd03064 | 82af9878b177c61ec120dbb7779a6bee50f6fadc | szkabaroli/Engine | /Platform/Android/AndroidMain.cpp | C++ | cpp | 1,460 | no_license | #include <memory>
#include <errno.h>
#include <vector>
#include <thread>
#include <chrono>
#include "AndroidApp.h"
#include "../Logger.h"
#include "../GameEngine.h"
#include "vulkan_wrapper.h"
void android_main(android_app* State)
{
AndroidApp* Application = new AndroidApp;
AAssetManager* mgr = State->activi... |
c89a2faa6a8191b5f386a82723da0895d64b6ea7 | db63cae7c20f060806e3db563ac525c495a3bc71 | Noodles94/Kattis | /tarifa.cpp | C++ | cpp | 901 | no_license | #include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
int megaBM, month, megaBL, megaBC = 0;//megaBM = the amount of megabytes he gets to use each month, month = the amount of months, megaBL = the amount of megabytes he has left afte... |
92bf0d5e2285c6fcc590e09ee7de97c9b3bef799 | 607c6564b0c75438d7c6735ec8a124b4a7c193b9 | Sid-323/bs-oostubs | /src/thread/organizer.cc | C++ | cc | 537 | no_license | #include "thread/organizer.h"
#include "thread/customer.h"
#include "thread/scheduler.h"
#include "meeting/waitingroom.h"
void
Organizer::block(Waitingroom& waitingroom)
{
Customer *c = active();
c->waiting_in(&waitingroom);
exit();
}
void
Organizer::wakeup(Customer& customer)
{
customer.waiting_in(0x0);
ready(... |
d02cd19dec58b9d1c7d85af3baa9d76ce7d6226a | fadb7d86d1775b739939f314f993abeade190f93 | riverdarda/XAPI2 | /languages/CPP/XAPI_CPP/XApiC.cpp | C++ | cpp | 5,577 | no_license | #include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include "../../../include/XApiC.h"
#include "../../../include/QueueHeader.h"
#include "../../../include/QueueEnum.h"
#if defined WINDOWS || WIN32
#include <libloaderapi.h>
#else
#include <dlfcn.h>
#include <errno.h>
#endif
void* X_LoadLib(const char* libPa... |
ec6b5e72bb6d7f315abd19251c0fd94a39c26535 | 6af810365112b0e33135684327a7b959e2e7f574 | struartsnow/fhb_code1 | /jzoj/jzoj2301_unfinsh/1.cpp | C++ | cpp | 1,732 | no_license | #include<bits/stdc++.h>
#define LL long long
#define N 204007
using namespace std;
int n,a[N],now,p,pos[N],id[N]; LL seg;
template <class T>
inline void read(T &x){
static char c;
for (c=getchar();!isdigit(c);c=getchar());
for (x=0;isdigit(c);c=getchar())x=x*10+c-48;
}
void write(int x){if (x<10) {putchar... |
3bcad76009edff164e415d2741c5e6e5afa19d17 | 0d14037377271d30454bec979d58ddeecc9e52b8 | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE563_Unused_Variable/CWE563_Unused_Variable__unused_init_variable_char_74b.cpp | C++ | cpp | 1,190 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE563_Unused_Variable__unused_init_variable_char_74b.cpp
Label Definition File: CWE563_Unused_Variable__unused_init_variable.label.xml
Template File: source-sinks-74b.tmpl.cpp
*/
/*
* @description
* CWE: 563 Unused Variable
* BadSource: Initialize data
* Sink... |
7f11e6952696bf83af79f811eb67f35c437dae9d | d836e4324421cec6465a2405c635aa151dd4b169 | Hilbert70/WiRocS | /NVSettingInterface.cpp | C++ | cpp | 16,755 | no_license | #include "NVSettingInterface.h"
extern String wifiSSID ;
extern String wifiPassword;
extern void OLED_4_RN_displays(int OLed_x,String L1,String L2,String L3,String L4);
extern void SetFont(uint8_t Disp,uint8_t Font);
//extern void OLED_5_line_display_p(String L1,String L2,String L3,String L4,String L5);
ext... |
d7fa72fd668c4576ec5f688ba0cdde06b0e4bb75 | 80e23f412932bbf6a091ce62fe0fc1e9b59e90e9 | ImnIrdst/ICPC-Practice-2015-TiZii | /UVa/Comptitive Programming/Ch-08 More Advanced Topics/03 Two Components - SSSP + DP/UVa 11405 - Can U Win - AC.cpp | C++ | cpp | 2,265 | no_license | #include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <functional>
#include <cmath>
#include <queue>
#include <map>
#define INF (int)1e9
#define MAX (10+2)
#define MAX2 (8+1)
using namespace std;
typedef pair<int,int> treasure, pii; treasure pa... |
12e3c88b00f16ddc95838e038804846d74b06a8a | 4c0ced25f35c5dacb43191c332354bf680e3aa5e | chiguozi/opengl | /OpenGLTest/OpenGLTest/CoordinateSystems_04/CoordinateSystems.cpp | C++ | cpp | 13,285 | no_license | #include "Tool.h"
#include "Shader.h"
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_ptr.hpp"
#include "../stb_image.h"
int main_06_01()
{
Tool::MyGlInitGLFW(3);
GLFWwindow* window = Tool::MyGlCreateWindow("CoordinateSystems", 800, 600);
Tool::MyGlInitLoader();
glViewport(0,0... |
c7996c40736a59043a77d56dab46f74746d99d2d | 063f018b1a40d8c53a445df4c9d28fabdeea2fc9 | evillique/ClickHouse | /src/Storages/MergeTree/MergeTreeThreadSelectProcessor.cpp | C++ | cpp | 6,153 | permissive | #include <Storages/MergeTree/IMergeTreeReader.h>
#include <Storages/MergeTree/MergeTreeReadPool.h>
#include <Storages/MergeTree/MergeTreeThreadSelectProcessor.h>
#include <Interpreters/Context.h>
namespace DB
{
namespace ErrorCodes
{
extern const int LOGICAL_ERROR;
}
MergeTreeThreadSelectProcessor::MergeTreeThr... |
10485a3edc382771d79eeb22ed043b884ac4ef3c | 779f3f9f97c7ea868ecdae33cad0ad70c16e79ef | dhanzhang/p4win | /gui/OptionsDlg/TempDirPage.cpp | C++ | cpp | 7,077 | permissive | //
// Copyright 1997 Nicholas J. Irias. All rights reserved.
//
//
// TempDirPage.cpp : implementation file
//
#include "stdafx.h"
#include "p4win.h"
#include "MainFrm.h"
#include "TempDirPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//... |
d084873d676e39341ad719bdc15816ebd6ed99e9 | dadddb15c7e85df1d9ed9e5881c622fd94768991 | pratul-maurya/PLA_Solutions | /sum_of_elements_in_array.cpp | C++ | cpp | 354 | no_license | #include <bits/stdc++.h>
using namespace std;
int arrSum(int arr[], int n)
{
if(n <= 0)
return 0;
return(arrSum(arr,n-1) + arr[n-1]);
}
int main()
{
int arr[100], n;
cin>>n;
for (int i = 0; i < n; i++)
{
cin>>arr[i];
}
cout<<"The sum of the lements of the array is "<<a... |
a17889b405664a9308118fd9a424c161d19df796 | 22940a5af3dd7f90997752c81319b676589f12db | gaokewoo/boss | /db_other/PricingSectionType.hh | C++ | hh | 357 | no_license | #ifndef __PRICINGSECTIONTYPE__
#define __PRICINGSECTIONTYPE__
#include "DBStruct.hh"
#include "SQLInterface.hh"
class PricingSectionType:public SQLInterface
{
public:
void insertData();
virtual void prepareSQL();
virtual void doParse(){};
public:
ST_PRICING_SECTION_TYPE pricing_section_type;
private:... |
2504ed82e19e3f9cc5ad6f93ad334f92da15087b | 205cd7a31955d4bbec0e4de92b44f169319396da | CedricGuillemet/bgfx | /3rdparty/spirv-tools/source/opt/local_access_chain_convert_pass.cpp | C++ | cpp | 15,409 | permissive | // Copyright (c) 2017 The Khronos Group Inc.
// Copyright (c) 2017 Valve Corporation
// Copyright (c) 2017 LunarG 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... |
c8a9654fea30909bc967d3c219583a659bb28e44 | 524f15e0ff8554ea4062f5bc63f0402673be9421 | Charlietzu/PDS-2 | /module1/vpl-ranking/main.cpp | C++ | cpp | 1,379 | no_license | #include "Estudante.hpp"
#include <iostream>
#include <iomanip>
using namespace std;
void sortEstudantes(Estudante *_estudantes){
Estudante auxRSG, auxMatricula;
for(int i=0; i<10; i++){
for(int j=i+1; j<10; j++){
if(_estudantes[i].calcularRSG()<_estudantes[j].calcularRSG()){ //Ordenação ... |
3b02f435b754c6612c90329b33a4204033176e92 | 968f879cd6477e25724c1589d9e78de4bfaa4f07 | achal1012/Dependency-Based-Remote-Code-Repository-CSE687 | /Dependency-Based-Remote-Code-Repository-CSE687/Sender/Sender.cpp | C++ | cpp | 5,863 | no_license | //////////////////////////////////////////////////////////////////////////
// Sender.cpp - Provides Sender functionalities for client and server //
// Ver 1.0 //
// Application: Project #4 Dependency-Based Remote Code Repository //
// Language: C++, Visual Studio 2015 //
// Platform: ... |
d19d644da757bcd8d045d667bc7108a225cc8393 | 12ca8356ed1b1783f39a28302305e5c6a4bc3142 | EnEff-BIM/EnEffBIM-Framework | /SimModel_Python_API/simmodel_swig/SimModel_Dll_lib/framework/SimAppPreferences.hxx | C++ | hxx | 15,122 | permissive | // Copyright (c) 2005-2014 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD, an XML Schema to
// C++ data binding compiler.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Fre... |
c37e89e1ab6baed608f52e22adb8e3c63e9ad190 | f9698ce32692c0886678270ab2335ca1e4f69036 | TU-Berlin-DIMA/analyzing-stream-modern-hardware | /other/streambox_saber/streambox_release_March_10_2018/streambox/core/EvaluationBundleContext.cpp | C++ | cpp | 3,751 | permissive | /*
* EvaluationBundleContext.cpp
*
* Created on: Sep 25, 2016
* Author: xzl
*
* Purdue University, 2016
*/
#include "EvaluationBundleContext.h"
#if 0
long EvaluationBundleContext::Executor::nwait_ = 0;
std::mutex EvaluationBundleContext::Executor::cv_mtx_;
std::condition_variable EvaluationBundleContex... |
74a6af8e271c703c7141d57e004086fd5c31f2da | 075e46330b3c5cc96748ae0b5d781d5d42469946 | ImtiazDipto01/MyUvaSolve | /MY UVA SLOVE/10340 - All in All (2).cpp | C++ | cpp | 762 | no_license | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <stack>
#include <queue>
#include <map>
#include <vector>
using namespace std;
int main()
{
int i,j,k,t_case,len,len2,count,temp,temp2;
char a[100000], s[100000];
... |
fd6cf41dd8e0056fcecdfc6410fafbaf9397308a | 76845c6ad365f15de8c6bec9bee281d7526cdc82 | xuenanmi/Data-Structure-and-Algorithm | /mp_lists/List.hpp | C++ | hpp | 10,216 | no_license | /**
* @file list.cpp
* Doubly Linked List (MP 3).
*/
#include <iostream>
using std::cout;
using std::endl;
template <class T>
List<T>::List() {
// @TODO: graded in MP3.1
//ListNode* head_ = NULL;
//ListNode* tail_ = NULL;
head_ = NULL;
tail_ = NULL;
length_ = 0;
}
/**
* Returns a ListIterat... |
b56b3cc7cd22ffee6fc93e26f52a281d5dd00924 | 0481ddad44475b6367d0490fd03805b0430a7984 | jcxioo/Cpp-Learning | /20180409/test.cpp | C++ | cpp | 379 | no_license | ///
/// @file test.cpp
/// @author jcx(yxjcxstack@gmail.com)
/// @date 2018-04-09 08:51:01
///
#include <iostream>
using std::cout;
using std::endl;
int main()
{
cout << "Enter two numbers:" << endl;
int v1=11, v2=22;
cout << "The sum of " << v1 << " and " << v2
<< " is " << v1+v2 << endl;
for(i... |
158e5b496f6217454eac4b133d2db713c11e57ea | 92efc9df75d62a013a76f497b81da5473c87a3fa | TVIndustries/PalMod | /palmod/Game/Game_Garou_A.cpp | C++ | cpp | 11,870 | no_license | #include "StdAfx.h"
#include "Game_Garou_A.h"
BOOL CGame_Garou_A::UpdatePalImg(int Node01, int Node02, int Node03, int Node04)
{
//Reset palette sources
ClearSrcPal();
if (Node01 == -1)
{
return FALSE;
}
sDescNode* NodeGet = GetMainTree()->GetDescNode(Node01, Node02, Node03, Node04);
... |
ab8fe93fd946a93ce1a65592b3ab00025564966e | c89e4d704c485594149b513b9de89c4f86182fb6 | pkoarmy/chromium | /chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc | C++ | cc | 12,518 | permissive | // Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h"
#include "base/bind.h"
#include "base/no_destructor.h"
#include "base/scoped_observation.h"
#... |
16ae47764302b0626a860f9d4c0cecf08af3f9d3 | 0eaa42f808fe4fcf4b6f02979700075e10056d69 | sunhwan/rdkit | /Code/GraphMol/Fingerprints/FingerprintUtil.cpp | C++ | cpp | 15,478 | permissive | //
// Copyright (C) 2018 Boran Adas, Google Summer of Code
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <GraphMol/RDKitBase.h... |
82112db644fd02c7950fc40b6209abcf08458a46 | d48d94e2faf1a920d4aaf6e71f5e9f490597e719 | mikeash/llvm-project | /llvm/lib/Target/Sparc/SparcTargetMachine.cpp | C++ | cpp | 7,955 | permissive | //===-- SparcTargetMachine.cpp - Define TargetMachine for Sparc -----------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
afc100f33f2ec887a8f08a1f11f4674005a5bd84 | 8d51a6f2af280ff7bfb13cbd029daa1038d44cc2 | fenghuohuo/grpc | /src/cpp/thread_manager/thread_manager.cc | C++ | cc | 8,813 | permissive | /*
*
* Copyright 2016 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
6f72c0d6cfc491b8e52b356782ddbf9984be7242 | 49676a8b884a1796c45eb452e990d82a826db6f6 | icyleaf/omim | /drape_head/testing_engine.cpp | C++ | cpp | 17,100 | permissive | #include "drape_head/testing_engine.hpp"
#include "coding/file_reader.hpp"
#include "platform/platform.hpp"
#include "drape/utils/vertex_decl.hpp"
#include "drape/glsl_types.hpp"
#include "drape/vertex_array_buffer.hpp"
#include "drape/shader_def.hpp"
#include "drape/overlay_tree.hpp"
#include "drape/stipple_pen_reso... |
40d9b5cb7f54a067a15d6fd8d0ea815613c1b920 | 6deda60b24c4dba4b0f98a313453d9d563e85291 | binbinmeng/LiteMORT | /src/EDA/SA_salp.hpp | C++ | hpp | 2,857 | permissive | #pragma once
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include "../util/samp_set.hpp"
#include "../util/GRander.hpp"
namespace Grusoft {
class FeatsOnFold;
class FRUIT;
struct BinSalp {
int x=0;
float cost;
vector<double> position;
static GRander rander_;
BinSalp(int dim,... |
87446ae7cdaf66e1f93922df31ad5c56b5768550 | 6f46ba832cb40b3cda019e8c7c154f9fd05b9f44 | rcory/drake | /solvers/test/cost_test.cc | C++ | cc | 7,968 | permissive | #include "drake/solvers/cost.h"
#include <iostream>
#include <limits>
#include <memory>
#include <stdexcept>
#include <gtest/gtest.h>
#include "drake/common/test_utilities/eigen_matrix_compare.h"
#include "drake/common/test_utilities/is_dynamic_castable.h"
#include "drake/math/autodiff.h"
#include "drake/math/autodi... |
3892a44d0330187fa60210f0e0a82fd78a8f2c6b | 0c7c4796e7dedb1bee75539c5f02f684657e8bb3 | rgeyer/SpaceNavigatorHIDCapture | /Win32/Common/CSystemTray.cpp | C++ | cpp | 1,010 | no_license | #include "StdAfx.h"
#include "CSystemTray.h"
CSystemTray::CSystemTray(HWND hWnd, UINT uCallbackMessage, string szTip, HICON icon) : _shown(false)
{
_enabled = ( GetVersion() & 0xff ) >= 4 ;
if (!_enabled)
return ;
// load up the NOTIFYICONDATA structure
_tnd.cbSize = sizeof(NOTIFYICONDATA) ;
_tnd.hWnd = hWnd ;... |
3874a348a48df9ac000406a4042679f14f18f3fa | 6f7476c05fdc2e00d8b0a8544282c568fff15bf2 | shoeisha-books/dokushu-cpp | /ch03/list_3.8/main.cpp | C++ | cpp | 429 | permissive | #include <iostream>
class A
{
int m_v;
public:
A(int);
int v() const;
};
A::A(int v) : m_v(v)
{
}
int A::v() const
{
return m_v;
}
int main()
{
A x = 42; // A::A(int)を呼び出している
if (x.v() == 42)
{
std::cout << "A.v()は42です" << std::endl;
}
else
... |
8a4155c424cf3846d441ec104fdeb8bf09f82def | 8811d10e133fd18e62931346bd7882e7e2b4dd30 | zzzmj/cccc-gplt | /src/L2_019/Main.cpp | C++ | cpp | 820 | no_license | #include<cstdio>
#include<set>
#include<map>
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
int n;
set<string> s;
cin >> n;
for (int i = 0; i < n; i++) {
string t;
cin >> t;
s.insert(t);
}
int m;
cin >> m;
double sum = 0;
map<string, ... |
9f9f6fd7fa31708066a221f1030614120d2921ab | 2564eeece8f52fbe43b4d7d968eca9a1807ed2e4 | nitishgarg2002/DSA_FINAL450 | /SearchingAndSorting/countTriplets.cpp | C++ | cpp | 861 | no_license | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
long long countTriplets(long long arr[], int n, long long sum)
{
// Your code goes here
sort(arr, arr+n);
int a,b;
long long count = 0;
for(int i = 0; i < n-2; i++) {
a = i+1;... |
8431916ff39d8f4421073766d8317d5bf797c9c2 | c99133641841277dba0ae7f3916b9d58936be275 | The-E/Starshatter-Experimental | /Parser/Term.cpp | C++ | cpp | 2,348 | no_license | /* Project STARS
John DiCamillo Software Consulting
Copyright © 1997-2000. All Rights Reserved.
SUBSYSTEM: Stars
FILE: Term.cpp
AUTHOR: John DiCamillo
OVERVIEW
========
Implementation of the Term class
*/
#include "MemDebug.h"
#include "Term.h"
void Print(const ch... |
7d59c40f1896779f608178bd741f5d3d1b2c2727 | ea42aec04ef0d3a2f5a7ee3fa0a2f5e53009d610 | ecopty/openvino | /inference-engine/tests/functional/shared_test_classes/src/single_layer/mvn.cpp | C++ | cpp | 1,888 | permissive | // Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "shared_test_classes/single_layer/mvn.hpp"
namespace LayerTestsDefinitions {
std::string MvnLayerTest::getTestCaseName(testing::TestParamInfo<mvnParams> obj) {
InferenceEngine::SizeVector inputShapes;
InferenceEngine::... |
3db7619befad8fd53fc8044aea8e469053efd6d1 | fe1757bf790c52e16c070fda0c162cb7748dafe4 | govg/podcuda | /magma-1.5.0/sparse-iter/testing/testing_sdot.cpp | C++ | cpp | 6,348 | no_license | /*
-- MAGMA (version 1.5.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date September 2014
@generated from testing_zdot.cpp normal z -> s, Tue Sep 2 12:38:36 2014
@author Hartwig Anzt
*/
// includes, system
#include <stdlib.... |
71f7b780e6ba2f9e574d708e18dcdc9f3045112f | e10ec93d9d8e852e3e7e7f4ba561d7bf598fdb42 | FireNeslo/Terrengting | /Planetarium/Model3DS.cpp | C++ | cpp | 1,939 | no_license | #include "Model3DS.h";
#include <AssImp\mesh.h>
#include <AssImp\postprocess.h>
#include <AssImp\Importer.hpp>
#include <AssImp\scene.h>
#include <vector>
Model3DS::Model3DS(const std::string &filepath) {
this->loadMeshDataEasy(filepath);
}
void Model3DS::loadMeshData(aiMesh *mesh)
{
int vertsize = mesh->mNumFaces;
... |
92af020a823eb730fb8594ad8ea690ebe2454905 | a3e8810e9e14243f48c1180ef72c323d3d453e76 | rzr/chromium-crosswalk | /chrome/browser/password_manager/password_store_mac_unittest.cc | C++ | cc | 61,439 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/password_manager/password_store_mac.h"
#include "base/basictypes.h"
#include "base/files/scoped_temp_dir.h"
#include "base/m... |
820f4ff1a9228f25a0d296b74a2626e1c80fee2d | 3f229ff5cdaa521d8b280d4b3829096eca6491b1 | bowhan/circos_converter | /src/Arc.cpp | C++ | cpp | 1,129 | no_license | #include "utils/color.hpp"
#include "format/Arc.hpp"
#include <algorithm>
std::vector<Arc> FormatReader<Arc>::Read(const char *filename) {
FILE *in = fopen(filename, "r");
if (!in) {
Error("cannot open input file");
}
std::vector<Arc> ret;
char buffer[1024];
char chr[64];
double per... |
b53f76f3a85403beb75cdecc80c8b54271153c9f | b14d5ece1be531385b3aa397686047472ff6d24b | Schafxx/2dPlattformer | /util.cpp | C++ | cpp | 4,257 | no_license | #include "util.h"
#include "SDL2/SDL.h"
#include "SDL2/SDL_opengl.h"
void util::strSplit(std::string src, std::string dst[], char cmp){
int dstCount = 0;
for(int i = 0; i < src.size(); i++){
if(src[i] == cmp){
dstCount++;
}else{
dst[dstCount] += src[i];
}
}
}
int util::strCount(std::string src, char c... |
644c067a64e728e2f0d05ecaea21f883e8c13af3 | b070b1a62c84416852e593a1f65ae49b3adb1f4b | bcsdleweev/mrpt | /apps/mrpt-performance/perf-random.cpp | C++ | cpp | 5,990 | permissive | /* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| ... |
c2696f910d1dec74eaf5b386bc9f57a43f138da5 | 4db4037b697aa081b5fad1a79ceccb4456447e29 | JesusAnaya/puyopuyo | /Piece.cpp | C++ | cpp | 1,648 | no_license | //
// Piece.cpp
// puyopuyo
//
// Created by Jesus Anaya Orozco on 3/23/13.
//
//
#include "Commons.h"
#include "Piece.h"
Piece::Piece(int start_x, int start_y, int color)
{
this->color = color;
pos_x = start_x;
pos_y = start_y;
offset_x = PIECE_WIDTH;
offset_y = PIECE_WIDTH;
... |
bd0bbdd2c60bb6f09a7e2af9f4f86cb7a4955ef9 | 765a2d71f6e50df619c32b0528d6928ed9fb3c6a | fastbird/fastbirdEngine | /FBUI/VisibleStatus.cpp | C++ | cpp | 4,653 | no_license | /*
-----------------------------------------------------------------------------
This source file is part of fastbird engine
For the latest info, see http://www.jungwan.net/
Copyright (c) 2013-2015 Jungwan Byun
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and a... |
bc0deb9a23415494d056eb98aae9d22a2dcbefeb | d5e3af497d96ef95f236b083a5af053576668e89 | AlisonFahl/GFXiiSimulator | /GFXiiFramework/camera.cpp | C++ | cpp | 2,909 | no_license | //Created for Graphics I and II
//Author: Minsi Chen
#include "camera.h"
using namespace glm;
Camera::Camera()
{
m_viewVector = vec3(0, 0, -1);
m_upVector = vec3(0, 1, 0);
m_rightVector = cross(m_viewVector, vec3(0, -1, 0));
m_position = vec3(0, 0, 0);
UpdateViewMatrix();
}
Camera::~Camera()
{
}
void Camera... |
e3e7a0210c609b948e107183110a94621fffa877 | cf38981ffd06b687ad7db99f72a1a4e891041808 | BackupTheBerlios/v-q-svn | /tags/3/dom_alias_add.cc | C++ | cc | 2,959 | permissive | /*
Copyright (c) 2002,2003 Pawel Niewiadomski
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the ... |
030e26ae0c1d1c5c7e45c32c91cb8b8d8399c62d | 1a1795a6012e6ccd5c4dcb2e52a2742ca58dd87b | amir5200fx/Tonb | /TnbMesh/TnbLib/Base/Geom/Cloud/Samples/EdgeSamples/Lev1/Geo3d_PatchCloud_EdgeSamplesLev1.cxx | C++ | cxx | 565 | no_license | #include <Geo3d_PatchCloud_EdgeSamplesLev1.hxx>
#include <Geo_Tools.hxx>
#include <Pnt2d.hxx>
std::vector<tnbLib::Pnt2d>
tnbLib::Geo3d_PatchCloud_EdgeSamplesLev1::CalcSamples(const Pnt2d & theP0, const Pnt2d & theP1) const
{
auto centre = Geo_Tools::CalcCentre(theP0, theP1);
auto p0 = Geo_Tools::CalcCentre(theP0, c... |
b00866dac138f7453c382c06f58f249d684fce22 | 9379ed37e65d14135236d6807d75bc5b1fb75258 | xinyuang/9_chapter_cpp_algorithm | /4.Binary Tree - Divide Conquer & Traverse/863. Binary Tree Path Sum IV.cpp | C++ | cpp | 1,037 | no_license | //863. Binary Tree Path Sum IV
//1. unordered_set store non_leaf
//2. dfs get path(leaf to root) sum
class Solution {
public:
/**
* @param nums: a list of integers
* @return: return an integer
*/
int pathSum(vector<int>& nums) {
// write your code here
sort(nums.begin(), nums.end());
unordered_set<int> ... |
7d609e3cb05a56b451547f088216f8d9defba898 | 39e7d1bd5e25f61e276c90f44679a9d95dbdcd7b | EwoutH/colorist | /ext/avif/ext/aom/test/resize_test.cc | C++ | cc | 20,082 | permissive | /*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at w... |
31770c2a20a613e2da952d8127d60ac2ca1ff2d1 | f28235e09bf5cc241f85433c5b2976b38f2c7d80 | NightFury37/eklavya-4.0 | /controls/eklavya4_roboteq/src/command_subscriber_roboteq_client.cpp | C++ | cpp | 1,128 | no_license | #include "ros/ros.h"
#include "std_msgs/Float64.h"
#include "eklavya4_roboteq/SetSpeed.h"
ros::NodeHandle *n;
ros::ServiceClient *client;
void commandStearingAngleCallback(const std_msgs::Float64::ConstPtr& msg) {
eklavya4_roboteq::SetSpeed srv;
int angle = int(msg->data);
ROS_INFO("Received angle : %d", angle)... |
d43c2780905dcc252bdf9d116e40ebee8c08434e | 707d62940cf16aa7ea1fec57a61a31c910603772 | JTAmaral/Agile4-Simple-Shooter | /Source/SimpleShooter/BTTask_Shoot.cpp | C++ | cpp | 716 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "BTTask_Shoot.h"
#include "AIController.h"
#include "ShooterCharacter.h"
UBTTask_Shoot::UBTTask_Shoot()
{
NodeName = TEXT("Shoot");
}
EBTNodeResult::Type UBTTask_Shoot::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* ... |
dba3fa033ea8a7b9e5922b7e313355da5b4a2d64 | 5c0a661ca043f91c986eb9bb13ecc53172b2b245 | EtienneGuillet/RType | /entities/Music/sources/MusicEntityApi.hpp | C++ | hpp | 458 | no_license | #ifndef _R_TYPE_MUSIC_ENTITY_API_HPP_
#define _R_TYPE_MUSIC_ENTITY_API_HPP_
#include <ecs/IEntityAPI/IEntityAPI.hpp>
#include <ecs/IEntityAPI/AUnspawnableEntityAPI.hpp>
class MusicEntityAPI : public ecs::AUnspawnableEntityAPI {
public:
const ecs::Version &getVersion() const override;
std::shared_ptr<ecs::IE... |
8ac6a1864f070fd5ba455731e7698999b85a9287 | 5137bb892e31c21e29d9aafeecca785546e6ff37 | hazdik/LicenseManager | /FBLeadBankPro/build-FBLeadBankPro-Desktop_Qt_5_8_0_MSVC2013_64bit-Release/release/moc_mockpageaction.cpp | C++ | cpp | 6,618 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'mockpageaction.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0)
**
** WARNING! All changes made in this file will be lost!
******************************************************... |
7b164094b16414f3c8610f6e27c23d759df6c426 | 8db170122a4c485233439df57320019c7e63bacc | IgorChavesMoura/Math-Physics | /Collisions/circle.cpp | C++ | cpp | 632 | no_license | #include "circle.h"
#define PI 3.141592653589793238463
Circle::Circle(Vector3 position, float radius, Color color){
this->position = position;
this->radius = radius;
this->color = color;
this->cs = new CircleCollisionShape(this->position,this->radius);
}
void Circle::draw(){
glBegin(GL_POLY... |
7bf19e81078e67d23455581af04cfebde2a61093 | 92210e19ca4c43213241aa6d8233ccb92769557a | Bartzi/CG2 | /Übung 1/src/cgmath/types.hpp | C++ | hpp | 2,822 | no_license | /*
Copyright (C) 2007-2008 by Jan Eric Kyprianidis <www.kyprianidis.com>
All rights reserved.
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... |
f1a3f35c2e4bd257bf08a6ee560a78c44c7b7ad2 | ac8ee9b80b1a17563118e2ae84fc7d8ff9a18f30 | vgvgvvv/VulkanLearning | /VulkanTutorial/06SwapChainCreation/swap_chain_creation.cpp | C++ | cpp | 17,697 | no_license | #define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <iostream>
#include <stdexcept>
#include <algorithm>
#include <vector>
#include <cstring>
#include <cstdlib>
#include <cstdint>
#include <optional>
#include <set>
const uint32_t WIDTH = 800;
const uint32_t HEIGHT = 600;
const std::vector<const char*> valid... |
b80578640a55d6443e8b1319af98a6693e0b1d3b | 65709801a29191a179c68ecf4f969e087b1a729c | rajeevranjancom/Leetcode_Cpp | /742. Closest Leaf in a Binary Tree.cpp | C++ | cpp | 1,405 | permissive | class Solution {
public:
int findClosestLeaf(TreeNode* root, int k) {
// Build Graph
unordered_map<int, TreeNode*>m;
unordered_map<int, vector<int>>g;
buildGraph(g, m, root);
if(g[k].size() == 1 && !m[k]->left && !m[k]->right) return k; // The nearest leaf node is the root no... |
51465a3243ea7134e7190396b2ccb5736e0ca246 | 975e0627f99ad09a694fa352076779a2b6e491c2 | MR782/SameGame | /プロジェクト/ゲーム/Animation.cpp | C++ | cpp | 1,413 | no_license | #include "Animation.h"
#include"Resource.h"
#include"./dxlib/DxLib.h"
#include"CoreScene.h"
void Animation::switch_anime()
{
//アニメーションの切り替え
current_anime++;
if (current_anime >= object->sheets) {//問題
//ループしないなら最後の画像で止める
if (object->loop == true) { current_anime = 0; }//ループ有り
else {
current_an... |
91587b342edf5bb92c9342c39fee621fcaef7078 | 6dbff95cfe87cd3f35b9dbd1c30858f43db835a7 | itoaa/SimpleCharger | /SimpleCharger/SmeOS/MidleWare/include/sFilter.hpp | C++ | hpp | 1,170 | no_license | /*
* sFilter.hpp
*
* Created on: 10 dec. 2018
* Author: ola
*/
#ifndef SMEOS_MIDLEWARE_INCLUDE_SFILTER_HPP_
#define SMEOS_MIDLEWARE_INCLUDE_SFILTER_HPP_
#include "stdio.h"
#define filterSamples 13 // filterSamples should be an odd number, no smaller than 3
class Filter {
private:
int... |
d98fc9a26311f053728170dbe903de919d5426f7 | 15c70cc40bc83c06b0a75f4afa39a7ffd10fcca3 | study-opengl/learnOpenGL | /openglLearning/utils/openGLTools/openGlHelper.hpp | C++ | hpp | 1,791 | no_license | //
// openGlHelper.hpp
// createWindow
//
// Created by Ashoka on 2019/4/3.
//
#ifndef openGlHelper_hpp
#define openGlHelper_hpp
#include <stdio.h>
#include <iostream>
#include "glfw3.h"
#include "asLog.h"
#include <unistd.h>
#include <math.h>
#include "stb_image.h"
#include "glad.h"
unsigned int textureGenarate(... |
5538fe108d537fff17747851319b8929008f0e53 | a5f21761d75d544ffa3234ae055b4f889ff03745 | apache/geode-native | /clicache/src/ReflectionBasedAutoSerializer.cpp | C++ | cpp | 22,874 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
c2f7389b94180aa20e4d46d4c286f2628eb53636 | e4134db5df3568cf3a8aecb2807e76556edd6064 | hmh676/pollution_viewer | /src/station/stationType.cpp | C++ | cpp | 1,317 | no_license |
#include <stdexcept>
#include "stationType.hpp"
StationType::StationType() : _type() {
}
StationType::StationType(const StationType &st) : _type(st._type) {
}
StationType::StationType(const std::string &type) {
if (type.compare("Urbain") == 0)
_type = URBAIN;
else if (type.compare("Périurbain") == ... |
8e3342e893d9129ca1e48d85721e47234c61b8db | 6b3995ff20c74cb7b6036c426eec8a1984613488 | gg12123/GameEngine | /Physics/GridObject.cpp | C++ | cpp | 4,463 | no_license | #include <math.h>
#include "GridObject.h"
#include "Shape.h"
GridObject::GridObject()
{
}
bool GridObject::NeedExpandingIn( const GridDirection dir ) const
{
return (Bound( dir ) > BoundingSquare( dir ).GetBound( dir ));
}
bool GridObject::NeedShrinkingIn( const GridDirection dir ) const
{
return (Bound( dir )... |
a238bb1ee62cf2b6e57b140484a890c1eb0228eb | c4ef7ef9c082bacce6970a681aa022b1bc7ce3be | HarshRaikwar/Leetcode-Submissions | /373.cpp | C++ | cpp | 772 | no_license | class Solution {
public:
struct cmp{
bool operator()(vector<int> a , vector<int> b){
return a[0]+a[1] > b[0]+b[1];
}
};
vector<vector<int>> kSmallestPairs(vector<int>& nums1, vector<int>& nums2, int k) {
priority_queue<vector<int>, vector<vector<int>> , cmp> pq;... |
3521fdc1ebdd7b71ecd1e9269a92a5419dbefe7d | 616fef2bd305b128b183a505e72c4e73786ceb5e | MrYeLiang/cocos-source | /platform/android/CCDevice-android.cpp | C++ | cpp | 4,054 | no_license | /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a ... |
ad5b58a3cde822b34c6380ff043ac0be0ed60d81 | 60c3bfd310f1289d69e52cb5a3ae7f95a42ab352 | wwwwodddd/Zukunft | /spoj/TREEII.cpp | C++ | cpp | 325 | no_license | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int t, n = 1010, f[1020];
int main()
{
f[1] = 1;
for (int i = 1; i <= n; i++)
{
for (int j = 1 + i; j <= n; j += i)
{
f[j] = (f[j] + f[i]) % mod;
}
}
while (scanf("%d", &n) != EOF)
{
printf("Case %d: %d\n", ++t, f[n]);
}
return... |
bd0e008d13f112fe781fb89712fcd23ffa1e2460 | 95c2ff894ce2aed7dc6cee163ef5a1b490dbce03 | SoftwareNetwork/specifications | /e4/4f/7f/f6/71c803b69c2223e39183596cf02b143e4e9495c3a802c49efe35066835ec5f459664f5c6be221615ff147a8a1e5ba7e3a86b68904c43839af419254c/sw.cpp | C++ | cpp | 1,036 | no_license | void build(Solution &s)
{
auto &libsodium = s.addTarget<LibraryTarget>("jedisct1.libsodium", "1.0.17");
libsodium += Git("https://github.com/jedisct1/libsodium", "{v}");
libsodium +=
"src/.*\\.[hc]"_rr,
"src/.*\\.in"_rr;
libsodium.Private +=
"src/libsodium/include/sod... |
f07f5d77ac5e470a9d06e27057666b5201011b8a | feca60d4f6c9b44bca71401a73bc7829858ee6b8 | Rioo-may/PUBG-SDK | /SDK/PUBG_WeapSKS_parameters.hpp | C++ | hpp | 478 | no_license | #pragma once
// PlayerUnknown's Battlegrounds (2.5.39.19) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace Classes
{
//---------------------------------------------------------------------------
//Parameters
//-----------------------------------------------------------------------... |
5041e9a67719361b637acf6a5584140c4284db4d | 09f14f731b5ace63ddc9403aa36cac66be7b075e | luongpd2000/Data-structures-and-algorithms | /Contest 11/B19.cpp | C++ | cpp | 810 | no_license | #include<bits/stdc++.h>
using namespace std;
int pre[1010];
struct node{
node *left,*right;
int data;
};
typedef node *tree;
node* createNode(int n){
node *p=new node;
p->left=NULL;
p->right=NULL;
p->data=n;
return p;
}
node* insertTree(int start, int end){
if(start>end) return NULL ;
... |
8d53924cbc55eb206c9d88f50c83af9548f270be | de5998786e6330b8223f7d55ba6ffa938f36fb44 | x95102003/software-testing | /homework1/commission_unittest.cc | C++ | cc | 1,873 | no_license | #include <limits.h>
//#include "gtest/gtest.h>"
#include <string.h>
#include <stdio.h>
void commission();
int calcCommission(unsigned int, unsigned int, unsigned int);
void commission(){
int locks;
unsigned int stocks;
unsigned barrels;
unsigned int totalLocks = 0;
unsigned int totalStocks = 0;
unsigned int to... |
cefedb3811454702b6a2caeddbafd8eb8b884cbb | 7fa504a6d827dc7ef7c9958403cfb4e56d606b1b | gbrlas/AVSP | /CodeJamCrawler/dataset/09_25623_9.cpp | C++ | cpp | 1,037 | no_license | #include <cstdio>
#include <algorithm>
#include <vector>
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
using namespace std;
char buffer[21], buffer2[21];
void solve() {
int l = strlen(buffer), n = atoi(buffer);
vector <int> nrs;
sort(buffer, buffer + l);
do {
nrs.push_back(atoi(buffer));
} while ( n... |
b48f98e9fe755be0352fcc97b9a3a6defd8b36b4 | 3077a0b61e3cb565d98697bc1318f2ceee269236 | nyameaama/NEO-Rocket-Flight-Computer | /src/Landing_Stage/utility/PID.cpp | C++ | cpp | 2,514 | permissive | #include"PID.h"
uint8_t tagCount, PR_count;
double PID_PR[64][5];
String *tags = (String*)malloc(12);
//Important for PID process identification
double kp = 0.5,ki = 0.2,kd = 0.1;
double error_previous = 0,error_integral = 0;
double error,processVar;
double derivative,proportional,integral;
double PROPORTIONAL_INTE... |
5b2cf85abc9d6ac38ec9111e50eb67657bb8a06d | 2d283a85dc111fb509a58ecba751591677fa6be0 | laprinia/egc-framework | /Source/Laboratoare/Laborator5/Laborator5.cpp | C++ | cpp | 7,517 | no_license | #include "Laborator5.h"
#include <vector>
#include <string>
#include <iostream>
#include <Core/Engine.h>
using namespace std;
Laborator5::Laborator5()
{
}
Laborator5::~Laborator5()
{
}
void Laborator5::Init()
{
renderCameraTarget = false;
fov = 60.0f;
left,top = 0;
bottom = window->props.resolution.y / 100;
... |
9888721c856c540630a300b22351e433b908ad8b | 71abbeaea50270986b5e653eebcdf062e3c7e116 | Melnikoo/MyGameEngine_OpenGl | /Sound.cpp | C++ | cpp | 208 | no_license | #include "Sound.h"
Sound::Sound()
{
SoundEngine = createIrrKlangDevice();
}
void Sound::playMusic()
{
music = SoundEngine->play3D("./audio/closeToJazz.mp3", vec3df(0.0, 0.0, 0.0), true, false, true);
}
|
e8a08318293bf3c3ff75732e860a0a38cdb0507e | 6fba40ff3718f50b06a1323f0e98661e20b5babb | Berxz/Scum-SDK | /SDK/STF12_InsertShellChamber_functions.cpp | C++ | cpp | 1,224 | no_license |
#include "../SDK.h"
// Name: SCUM, Version: 3.75.21350
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------
// Function STF12_InsertShe... |
79d2eb4bff49447a94f9a0d4a93d2979e9f1af5a | 61bd5a76523cb0e439a424c41a7a5de68bb0ddaa | ShaniHayik/wargame-a | /Paramedic.hpp | C++ | hpp | 286 | permissive | #pragma once
#include "Soldier.hpp"
using namespace std;
class Paramedic : public Soldier{
public:
Paramedic (int solider_number) :
Soldier(100, 0, solider_number,100){}
void playS (std::vector<std::vector<Soldier*>> &board, pair<int,int> location) override{}
};
|
6e471f41482ded32fb643a929b4b186528e05ad7 | 3a1b6f63807cbb1edc7b64378c1a576bd7338849 | syssitia/evmc | /examples/example_host.cpp | C++ | cpp | 5,866 | permissive | /* EVMC: Ethereum Client-VM Connector API.
* Copyright 2016-2019 The EVMC Authors.
* Licensed under the Apache License, Version 2.0.
*/
/// @file
/// Example implementation of an EVMC Host.
#include "example_host.h"
#include <evmc/evmc.hpp>
#include <algorithm>
#include <map>
#include <vector>
using namespace e... |
6f288527ddb38b437bdefb64da8547db13da87f7 | e36a76c5e53c1e4ef950a56ec1ab96a18c7a1ba8 | AnuyaWelling2801/LearningCpp | /c++11/ring.cpp | C++ | cpp | 600 | no_license | //
// ring.cpp
//
//
// Created by Anuya Welling on 12/18/18.
//
#include <iostream>
#include "ring.h"
using namespace std;
int main(){
ring<string> textring(3);
textring.add("one");
textring.add("teo");
textring.add("three");
textring.add("four");
for(ring<string>::ite... |
f41d79129195a747e46d97bab9fd425d59974045 | 2737f31f1266beb4e3167f68c62f242e1c5dc463 | KairovKostya/Game | /starwars/main.cpp | C++ | cpp | 656 | no_license | #include <iostream>
#include "output/drawer.h"
#include "controller/controller.cpp"
#include "Constants.cpp"
#define STDIN_FILENO 0
int main() {
ConsoleDrawer::GetInstance();
Keyboard kb;
for(int i = 0; i < Constants::max_time_of_game; ++i){
MainCharacter::amount_of_lives = 10;
Controller... |
24739d568a6dcbbb628dee4ed12378b96af52115 | 2755858d43e1c86d417753e79dc958e13339be47 | Rajesh35hsp/osiris | /osiris/OsirisLib2.01/OutputLevelManager.cpp | C++ | cpp | 3,258 | permissive | /*
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.