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 |
|---|---|---|---|---|---|---|---|---|
e94747a0b4b44cf87fb070bdf2c1b34905738759 | bb695955b7ce43e891318638855fa395fc07671f | Deepti725/myPrac | /linear_search.cpp | C++ | cpp | 528 | no_license | #include<iostream>
using namespace std;
int main()
{
int n,flag=0;
cout<<"Implementing binary search "<<endl;
cout<<"enter number of elements ";
cin>>n;
int arr[n];
for(int i=0;i<n;i++)
{
cout<<"enter element "<<i<<":";
cin>>arr[i];
}
int search;
cout<<"enter number to be searched : ";... |
1796970af382c992f47edda2a33e9d03f4b2b710 | ec6a245416060f476cf485a396d86b86ed96274c | RaviShankar27/InterviewQuestionSolutions | /MinSteps2ReachEndofArray.cc | C++ | cc | 1,443 | no_license | //find-the-minimum-number-of-moves-to-reach-end-of-the-array
#include <iostream>
#include <unordered_map>//it will have key vs index as pair
#include <vector>
using namespace std;
int minStepsToReachEnd(vector<int>& nums)
{
unordered_multimap<int, int> hash_keys;
int N = nums.size();
if (... |
714add1f9b883c31c2c0faa14b319f26ef4a1aff | 4b169d8aec02abd0b103e78be98b00b312c531b0 | Zaddx/PPV_Project | /FBX_DLL/FBX_Load.cpp | C++ | cpp | 208 | no_license | #include "stdafx.h"
#include "FBX_Load.h"
void FBX_Load::LoadFBXFile(char** lFilename)
{
fbx_func.BeginLoading(lFilename);
}
Skeleton* FBX_Load::getSkeleton()
{
return fbx_func.getSkeleton();
} |
caf1cbc0e1717b66cc98068cf89f12414b2bfabc | 6952b5c3b74135316a732b23e1d630b0e52e0e91 | dgellow/vcpkg | /toolsrc/src/vcpkg/build.cpp | C++ | cpp | 59,226 | permissive | #include <vcpkg/base/cache.h>
#include <vcpkg/base/checks.h>
#include <vcpkg/base/chrono.h>
#include <vcpkg/base/enums.h>
#include <vcpkg/base/hash.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/stringliteral.h>
#include <vcpkg/base/system.debug.h>
#include <vcpkg/base/system.print.h>
#include <vcpkg/base/sys... |
5ad49dee928a632f69ba8fadd9e118a08f3ad07d | 519add4a8c97908a216ba59fe70cc008aa7af0e6 | irjudson/azure-c-shared-utility | /adapters/lock_rtx_mbed.cpp | C++ | cpp | 2,571 | permissive | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include "azure_c_shared_utility/lock.h"
#include "azure_c_shared_utility/xlogging.h"
#include "rtos.h"
DEFINE_ENUM_STRINGS(LOCK_RESULT, LOCK_RESULT_VALUES);
/*Tests_... |
51c16d9898caba28c7e26c832353077306c03d4d | 5f460f5981022e83a05a7910e325fb4c2191b8ab | ciiMe/VideoChat | /MediaFoundationNet/Samples/Hack/dllmain.cpp | C++ | cpp | 5,953 | no_license | /****************************************************************************
While the underlying library is covered by LGPL or BSD, this sample is released
as public domain. It is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FIT... |
eac2f8eac44baea76bc2013e925fb768f8b79b74 | 4780a8d3a673f4dd38c62c1737f2d684de5c4afd | mbkorecki/computerGraphics | /openGL1/Code/mainview.cpp | C++ | cpp | 10,492 | no_license | #include "mainview.h"
#include "math.h"
#include <QDateTime>
#include <vector>
#include "vertex.h"
static GLuint vboCube;
static GLuint vaoCube;
static GLuint iboCube;
static GLuint vboPyramid;
static GLuint vaoPyramid;
static GLuint iboPyramid;
static GLuint vboModel;
static GLuint vaoModel;
//rotation
static QM... |
79015f8efe86a460ef876bb7b793124f9b27bae1 | c839cd0653a02233b679d5822c17f1068622374c | Han-Zheng-Yun/mozc | /src/win32/base/accessible_object.cc | C++ | cc | 11,461 | permissive | // Copyright 2010-2020, 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 condit... |
985bc3eaa6a4d47af5ca7c0b9e96d1e2e506555d | 6ab8e1b0a648a666ed356d9c69bd046af7b10433 | arpit23697/Data-Structure-and-Algorithm-Winter-2018 | /B-Tree/B_tree.cpp | C++ | cpp | 18,634 | no_license | //To include all the libraries of the c++
#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <cmath>
using namespace std;
#include "vector.cpp"
Vector <int> ans;
class nodeB
{
public :
int n;
nodeB *child;
int *key;
bool leaf;
nodeB ()
{
... |
fd162eb1c5b1e45cd7fbeb1de59df52ffeef7b85 | 450ee4753a07e8e3fb0e73006986793741269dd0 | truongcongthanh2000/TrainACM-ICPC-OLP | /2019 ICPC Universidad Nacional de Colombia Programming Contest/A.cpp | C++ | cpp | 2,266 | no_license | #pragma GCC diagnostic ignored "-Wunused-parameter"
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define INP "solve"
#define OUT "solve"
const long long INF_LL = 1e17;
const int INF = 1e9 + 100;
const int MOD = 1e9 + 7;
const int Base = 30;
const double EPS = 1e-9;
const int ... |
1fde16df8aab22a5d878032a2b24e4b415136f05 | b81a49604640b16cfef71c066fe9ff5f4108a897 | Kelly2336/Judge | /UVA/11369-2.cpp | C++ | cpp | 411 | no_license | #include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
int p[20005];
for(int i=0;i<n;i++)
scanf("%d",&p[i]);
sort(p,p+n);
int ans=0;
for(int i=n-3;i>=0;i-=3)
... |
cb92a83ce4e32ce88d7b2054ebbb8b078dce7985 | 822d0e42e9fdabe63e1f19836cdd880a661c1b2c | mildwinter/FYP18-19_AutomaticDocking | /src/docking_algorithm_revised_alvar.cpp | C++ | cpp | 17,239 | no_license | #include "ar_single.h"
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "std_msgs/Float32.h"
#include "std_msgs/Bool.h"
#include <sstream>
#include "ARMarker.h"
#include "geometry_msgs/Twist.h"
#include "tf/tfMessage.h"
#include "tf/transform_listener.h"
#include <m4api_battery/PowerReading.h>
#include <stdli... |
4c02d959696eb9bb65a2c371dab6a974d40dcc83 | 3795716adbf480f3d6482f87d23e9d6878dbd88a | shivang0131/Atcoder-dp-contest | /A.cpp | C++ | cpp | 1,607 | no_license | /* Problem statement -
https://atcoder.jp/contests/dp/tasks/dp_a
*/
#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define UB upper_bound
#define LB lower_bound
#define PB push_back
#define mp make_pair
#define F first
#define S second
#define be(a) (a).b... |
4fa87e048b8acb73ee555862ee2c2ca8f95d8024 | a7a1bfd8a969dbc64c1f19152555743da4530fa7 | lightbox-impl/LightBox | /src/lb/networking/libmOS/host/dfc/pattern_loader.cpp | C++ | cpp | 2,603 | no_license | #include "pattern_loader.h"
#include <cstring>
#include <fstream>
#include <vector>
int PatternLoader::load_pattern_file(const char* file,
unsigned char* &pattern_pool,
int *&pattern_length) {
std::ifstream inFile(file);
if (!inFile.goo... |
5ff8b3a285cb5d0327c777177871e7b9e4132b07 | 48513cd85afcfba25f7a0ee72ea9a6e1a2d9111c | WRCIECH/clang-pimpl | /refactor_tools/clang_reorder_fields/reorder_fields_action.hh | C++ | hh | 1,398 | permissive | //===-- tools/extra/clang-reorder-fields/ReorderFieldsAction.h -*- C++ -*-===//
//
// 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
//
//===----------------------------... |
a012014c597318d4dbe760c0f70d6d8d01affbcf | 0e15677b9802791eba3ca223dea46ba0b0dc107d | blackberry/Boost | /libs/config/test/has_slist_fail.cpp | C++ | cpp | 983 | permissive | // This file was automatically generated on Fri Dec 03 18:04:00 2004
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.... |
8470e787895ec744b3e8b9836d7db76b16882cbc | f4ecbe74d31288f4d31ffab5638b2f11a9e476b6 | mynkit/ofxGraphicEqualizer | /src/soundEffects/equalizer.hpp | C++ | hpp | 889 | no_license | //
// equalizer.hpp
// ofxGraphicEqualizer
//
// Created by keita miyano on 2021/01/30.
//
#pragma once
#include "soundEffects/peakingFilter.hpp"
class equalizer {
public:
bool equalizerOn;
int upperLeftX;
int upperLeftY;
int onoffX;
int onoffY;
int onoffRadius;... |
1a90c7c62e84b1563dd310e2848b2a0d4df00afe | 40527e481b05f8a1b091b046bdbce90fc1cc751c | neuroailab/whisker_model | /bullet_demos_extracted/examples/RoboticsLearning/b3RobotSimAPI.cpp | C++ | cpp | 33,723 | no_license | #include "b3RobotSimAPI.h"
//#include "../CommonInterfaces/CommonGraphicsAppInterface.h"
#include "Bullet3Common/b3Quaternion.h"
#include "Bullet3Common/b3AlignedObjectArray.h"
#include "../CommonInterfaces/CommonRenderInterface.h"
//#include "../CommonInterfaces/CommonExampleInterface.h"
#include "../CommonInterfaces... |
e49c725a7f185ccf280d1f0a43daed078aa7a9fb | 5daaf0637d57a86e8507054b46717dd55b592637 | raghumdani/typocoder | /Solutions/297.cpp | C++ | cpp | 484 | no_license | #include <stdio.h>
int main() {
int t,i=1;
scanf("%d",&t);
int a[t];
for(;i<=t;i++ )
{
int n,k,r=0;
scanf("%d %d",&n,&k);
int temp=n;
while(temp != 0 && temp!=1 )
{
temp/=2;
r++;
}
int j=3,fact=2;
for(;j<=k;j++)
... |
3928daa61d16779b20d5e2bdd01e8815636a5b1f | 73d15a9ffb0a3c5be7a6553ac44cd3d74844abe2 | SDxKeeper/dldt | /inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_nd.hpp | C++ | hpp | 1,167 | permissive | // Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <string>
#include <tuple>
#include <vector>
#include "shared_test_classes/base/layer_test_utils.hpp"
namespace LayerTestsDefinitions {
using Config = std::map<std::string, std::string>;
typedef std::tuple<
... |
d1c57a9fe7c1430c184c6953e9cefb93ff02f7ce | 289e7c7330c20957d54c3f6212d01de6166ecbbf | ekg/mutatrix | /Repeats.cpp | C++ | cpp | 1,893 | permissive | #include "Repeats.h"
map<string, int> repeatCounts(long int position, const string& sequence, int maxsize) {
map<string, int> counts;
for (int i = 1; i <= maxsize; ++i) {
// subseq here i bases
string seq = sequence.substr(position, i);
// go left.
int j = position - i;
... |
7ca643fc6c135436381ffcff2ad341acb2035ddd | 5b5f6f437d518a6888cf8864e81e977741645f3e | tmuttaqueen/MyCodes | /Online Judge Code/[Other] Online-Judge-Solutions-master_from github/Topcoder/Div I/250 - 2.cpp | C++ | cpp | 1,363 | no_license | #include <vector>
#include <string>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cs... |
bab7bb31f2e38c73b629d64d38a3dd3a9fd10adc | 914b612046afa00a5fd6a4b6729e15f29bfd2ddb | abelCoronado93/one | /src/vmm/XenDriver.cc | C++ | cc | 18,879 | permissive | /* -------------------------------------------------------------------------- */
/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may ... |
55d268b3988aab36e8c4fd047df8398c8d7de763 | 0ad12bfe5b536a8f87111ffabf9c0c4f42d969f7 | celguar/mangosbot-dev | /playerbot/Talentspec.cpp | C++ | cpp | 12,811 | no_license | #include "playerbot.h"
#include "Talentspec.h"
#include "ServerFacade.h"
using namespace std::placeholders;
//Checks a talent link on basic validity.
bool TalentSpec::CheckTalentLink(string link, ostringstream* out) {
string validChar = "-";
string validNums = "012345";
int nums = 0;
for (char& c : ... |
d759a13f6474ee38e9e062a3c8176ce0ece384f0 | b24b5984bc06a12b1c0c313719e6cda3ab43bb00 | yutatanaka/C_Programing | /C言語プログラミング/string応用操作.cpp | C++ | cpp | 392 | no_license |
#include <stdio.h>
#include <string>
int main()
{
std::string str1("にほんご");
std::string str2("fghij");
str1 += str2; // str1の末尾にstr2を連結
printf("%s\n", str1.c_str());
if (str1 == "abcdefghij") // 2つの文字列を比較
{
printf("一致\n");
}
else
{
printf("不一致\n");
}
printf("str1の文字数は%d", str1.length());
getchar()... |
d254f0ac1843ae8ce4e5c6a6341844ea6d92d83f | 0dd77c736d1d6d204c4fbd4536de35f859c91eec | AIBluefisher/EGSfM | /ext/openMVG/openMVG/sfm/pipelines/sequential/sequential_SfM.hpp | C++ | hpp | 4,312 | permissive | // This file is part of OpenMVG, an Open Multiple View Geometry C++ library.
// Copyright (c) 2015 Pierre MOULON.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#... |
dd294d88b6fcefddceaed1555fd53107c03d94ab | 6204c4a080cf9652a24b377249a1ac9bdc2b6f9f | zettel-kasten/burgerbot | /src/rpcmining.cpp | C++ | cpp | 20,668 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "db.h"
#include "init.h"
#include "bitcoinrpc.h"
#include "w... |
107f868f786d57b5f34cbf9b999968cdd2f16a0c | bdda27908bd28c0bf8b3e73723ff97fb1d2bf12d | retrodump/construct | /Plugins/Line/Expressions.cpp | C++ | cpp | 2,151 | no_license | // Include StdAfx
#include "StdAfx.h"
//////////////////////////////////////////////////////////////////////////////////
// Built-in expressions
//////////////////////////////////////////////////////////////////////////////////
// Return the Default Value. This is the value to be returned if your object name
// is u... |
d03caa632b1b1081cf7c9de3b33a8ceddfe8c8c4 | a501b4db5ea57e88b1595ff9e2ae4cb50fd6a3ee | fu01/TencentComicDownload | /src/Regular.cpp | C++ | cpp | 737 | no_license | #include "Regular.h"
const char *regString = nullptr;
const char *regBuf = nullptr;
RegEx::RegEx() {
int cflags = REG_EXTENDED;
regcomp(®, regString, cflags);
}
RegEx::~RegEx() {
regfree(®);
}
/*
开始查询文本
first 匹配文本串在目标串中的开始位置
tail 匹配文本串在目标串中的结束位置
*/
int RegEx::Run(int &first, int &tail) {... |
027b52745e4314b899f1b8fc1728affb26f444db | 3f030180e2d0b0f080f182d53512334306ce0735 | Pocsel/pocsel | /tests/shaders/BindAction.hpp | C++ | hpp | 259 | no_license | #ifndef __BINDACTION_HPP__
#define __BINDACTION_HPP__
namespace Tools { namespace Window { namespace BindAction {
enum BindAction
{
None,
ReloadShaders,
Quit,
ToggleCullface,
NbBindActions
};
}}}
#endif
|
4cde3e4d8c02a7b6566a07e23653fe489fa671a3 | e83311613701a7811cb56dc84334f35bfd7382e9 | blusno1/chromium-1 | /services/device/generic_sensor/relative_orientation_euler_angles_fusion_algorithm_using_accelerometer_unittest.cc | C++ | cc | 9,734 | 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 <cmath>
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "services/device/device_service_test_base.h"
#include "s... |
ec3af1f962083792cdbfad68f07cc6a423aa9dbb | ef8e98a9df8353c4c5bbd7f9f425397b545b2092 | therocode/blocks | /src/script/scriptengine.cpp | C++ | cpp | 2,013 | no_license | #include "scriptengine.hpp"
#include <assert.h>
#include "asaddons/scriptstdstring.hpp"
#include "asaddons/scriptarray.hpp"
#include "../application/applicationmessages.hpp"
ScriptEngine::ScriptEngine(fea::MessageBus& bus) :
mBus(bus),
mContextsInUse(0)
{
mContextsInUse = 0;
mEngine = asCreateScriptE... |
26ec66dafbf803508fd9c2c1df55218bb0d99d3f | 22407532991fe749a6ba1c1c831fad8a4834a01e | PaddlePaddle/Paddle | /paddle/phi/kernels/sparse/cpu/addmm_grad_kernel.cc | C++ | cc | 2,820 | permissive | /* Copyright (c) 2022 PaddlePaddle 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... |
a45836a24cc87255d1dd12fda57db83d788a4608 | 2484b898a18f2a34ff461ee53c47b7e355274367 | pouloghost/weexuikit | /RenderCore/render/platform/text/BidiContext.cpp | C++ | cpp | 4,390 | permissive | /*
* Copyright (C) 2000 Lars Knoll (knoll@kde.org)
* Copyright (C) 2003, 2004, 2006, 2007, 2009, 2010 Apple Inc.
* All right reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Founda... |
fbe45eec9ed58cafc21a889c83e26cefda2b9532 | 12bd55fcaa3ac641daa7705f16be03a8a45a87a4 | Sean10/Algorithm_code | /leetcode_archived/LeetCode_419.cpp | C++ | cpp | 940 | permissive | class Solution {
public:
int countBattleships(vector<vector<char>>& board) {
vector<vector<int>> flag(board.size());
for(int i = 0;i < board.size();i++)
flag[i].assign(board[i].size(), 0);
int cnt = 0;
for (int i = 0;i < board.size(); i++)
for (int j = 0;j < ... |
247cc774156ee478560f416471c7816284c17594 | d142cee4b0c2ea0e7cea0e04c57408163b1cc954 | exhorder/skia | /tests/SurfaceTest.cpp | C++ | cpp | 43,997 | permissive | /*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrBackendSurface.h"
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrGpu.h"
#include "GrGpuResourcePriv.h"
#include "GrRenderTargetContext.h"
#include "... |
60fe52cdce37bdc631100333a3c93bd7664568f5 | 9608f8cb782be71988b91a3b674e571fb98694b9 | tuto123/Embedded_Qt | /4418_home_security/4418_home_security/build-4418_home_security-arm_linux_5_10_0-Release/moc_homecontrol.cpp | C++ | cpp | 5,587 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'homecontrol.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.0)
**
** WARNING! All changes made in this file will be lost!
********************************************************... |
80759727dab063db212dd6b802e5834d6417fcac | 9ef76e8c507c5cbb444b7f754f7efccac87bed0c | mahinlma/Vitis_Libraries | /graph/L3/tests/jaccardSimilarityAPSparse/test_jaccardSimilarityAPSparse.cpp | C++ | cpp | 7,740 | permissive | /*
* Copyright 2020 Xilinx, 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 or agreed to... |
f001c75045b89d53f9f1638b2e411efea7263089 | ea826b2ea7873e56f1fb277ff3a021a645cc4056 | keithw/stm-data | /term-receive.cpp | C++ | cpp | 6,693 | no_license | #include <pty.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
#include <poll.h>
#include <string.h>
#include <locale.h>
#include <langinfo.h>
#include <wchar.h>
#include <assert.h>
#include <wctype.h>
#include <iostream>
#include <typeinfo>
#include <sys/stat.h>
#inc... |
1498aba7ef82b73a87e80e7f629ccfe400cdf8cc | 99107151e3b053fb2c0305f6d70887fee183fb6c | toggl-open-source/toggldesktop | /third_party/poco/Util/src/ServerApplication.cpp | C++ | cpp | 16,342 | permissive | //
// ServerApplication.cpp
//
// Library: Util
// Package: Application
// Module: ServerApplication
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Util/ServerApplication.h"
#include "Poco/Util/Option.h"
#inc... |
ce068e72bbe1091eab7e9dcc7f285f17479d35fd | 314c2793b3425a80573b85bdb70dd0ef8ecca0c3 | DerickThePoney/SFML-OPENGL-SUPERBIBLE | /Material.cpp | C++ | cpp | 11,444 | no_license | #include "stdafx.h"
#include "Material.h"
UI32 Material::s_uiMaxMaterialID = 0;
Material::Material()
: m_pkProgram(nullptr)
{
m_uiMaterialID = Material::s_uiMaxMaterialID++;
}
Material::Material(const Material & other)
: m_kFilename(other.m_kFilename), m_kMaterialData(other.m_kMaterialData), m_pkProgram(other.m_p... |
b9391e1bcb24c6fe6cd73fb197a90cdbaa2e6b13 | 1e046f38fe29782f7153068605bbd135ee0af355 | nukopy/libraries | /ComproLibrary/Union_Find_Tree_With_Potential.cpp | C++ | cpp | 1,034 | no_license | #include <bits/stdc++.h>
using namespace std;
//Union Find Tree With Potential
template<class T> class Union_Find_Tree_With_Potential {
public:
vector<int> parent;
vector<int> rank;
vector<T> dist;
Union_Find_Tree_With_Potential(int N = 1, T ini = 0) :parent(N), rank(N,0), dist(N, ini) {
for (int i = 0; i < N; ... |
1214e6c26022febf495563313ac3da09abe01bc6 | d75b088b0401fff7f3bb35210c058b9162cbe5e1 | BIbiLion/LSWuqiankun | /project_qt/source/source/psv_cuboiditem.cpp | C++ | cpp | 4,717 | no_license | #include <QBrush>
#include <QPen>
#include <math.h>
#include "psv_cuboiditem.h"
PSV_CuboidItem::PSV_CuboidItem(const QRectF &rect, const QColor &color, qreal obliqueAngle, qreal cosLength, QGraphicsItem *parent)
: QGraphicsItemGroup(parent)
, m_rect(rect)
, m_obliqueAngle(obliqueAngle)
, m_cosLength(co... |
84a119c8e53f228aca6d385c8429a0d29e152dc2 | f0d65ebf18958c6afd3e15a221e7725516473095 | kado3/LabExercise10 | /printLineByCoords.cpp | C++ | cpp | 594 | no_license | #include "stabbingLines.h"
#include <fstream>
#include <iostream>
using namespace std;
void printLineByCoords(LineId lid, Line linesArray[], const int MaxLnsSize, Point pointsArray[], const int MaxPntsSize){
for(int i=0; i<MaxPntsSize; i++){
for(int j=0; j<MaxLnsSize; j++){
if (linesArray[j].p1 =... |
352cb750a5c042749be16006dd8abde5ba5c2cef | efbfc6a12f54211c84c2ede226387a95b0f88eb2 | DadofDragons/gui_code | /QT_GUI/QT_GUI/multi_timer/dialog.cpp | C++ | cpp | 1,481 | no_license | #include "dialog.h"
#include "ui_dialog.h"
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
timer = new QTimer;
connect(ui->btnBegin, SIGNAL(clicked(bool)), this, SLOT(openThread()));
connect(ui->btnEnd, SIGNAL(clicked(bool)), this, SLOT(closeThread())... |
5ef89b001c71fad1232dc2344718c37119e99dc3 | ac7f75a5b7e95f8c07a8ab38ba4776d2512f4261 | Magic-System/Piscine | /arete.cpp | C++ | cpp | 1,322 | no_license | #include "arete.h"
#include <iostream>
#include <vector>
Arete::Arete(std::string id, Sommet* s1, Sommet* s2, std::vector<float> poids) : m_id{id}, m_sommet1{s1}, m_sommet2{s2}
{
for (auto elem : poids)
m_poids.push_back(elem);
}
void Arete::dessinerArete(Svgfile &svgout,int posy) const
{
... |
4b510f81eb9cb4f308ae8322648c32e71b7fc0d7 | d1682231cdf50ab32d9553f8f8bd6e14e620ee37 | Tzupy/ObEngine | /include/Core/Utils/ExecUtils.hpp | C++ | hpp | 1,113 | permissive | #pragma once
#include <string>
/**
* \brief Some Classes and Functions to manipulate Engine Execution
* @Bind
*/
namespace obe::Utils::Exec
{
/**
* \brief Parses the execution arguments
* @Bind
*/
class RunArgsParser
{
private:
char** start;
int size;
public:
... |
b3e7d1dae9a0ceda0e3245d5b37002e86c6a61af | 41541cac37c3455b0868fbd2949eb6afe1bf090e | xeddmc/darkcoin | /src/leveldb.cpp | C++ | cpp | 2,823 | permissive | // Copyright (c) 2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "leveldb.h"
#include "util.h"
#include <leveldb/env.h>
#include <leveldb/cache.h>
#include <leveldb/filter_policy.h>
#inc... |
80d273e8a35652977671ddb26469f6f12e8a198a | a1095189a537d67cfc34363a1b08549eef300b57 | moyasikko/skillcheck | /DX21_20190924_DirectXProject/DirectXProject/debug_font.cpp | C++ | cpp | 2,053 | no_license | #include <d3dx9.h>
#include "mydirect3d.h"
#include "common.h"
#include <stdio.h>
/*------------------------------------------------------------------------------
定数定義
------------------------------------------------------------------------------*/
#define DEBUG_PRINTF_BUFFER_MAX (256) // 文字列用バッファ量(少ないときは増やすこと)
... |
ee93d8ee092162ae72858cb6c31045eac1b83263 | 7da6eb4c179accf6a6bfb5896b642ae24a086b8b | Drone-Banks/ACM | /POJ/1141.cpp | C++ | cpp | 2,450 | no_license | /*************************************************************************
> File Name: test.cpp
> Author: Akira
> Mail: qaq.febr2.qaq@gmail.com
************************************************************************/
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include ... |
5c3ac65059393bbf4c8fc5196047c01b7412f811 | 21daf836e6f4813a80fdf95c9fd63cc8494325af | skyformat99/HexEditer | /HexEditer/ReplaceDialog.cpp | C++ | cpp | 1,672 | no_license | #include "StdAfx.h"
#include "ReplaceDialog.h"
#include "resource.h"
#include "HexEditer.h"
extern HexEditer hexEditer;
extern int ParseInputBytes(char *buf);
static void DoReplace(HWND dlg) {
char txt[100] = {0};
GetDlgItemText(dlg, IDC_RDLG_BYTES_EDIT, txt, sizeof txt);
int len = ParseInputBytes(txt... |
476f03cc4e856ffb96be82eaa6f4d9ae99c00844 | 2affe5ac5687f979a51f8d6d8eea314e82ed83ff | UniqueZHY/ZHY | /ol/ep34.cpp | C++ | cpp | 770 | no_license | /*************************************************************************
> File Name: ep34.cpp
> Author:
> Mail:
> Created Time: 2019年12月15日 星期日 20时10分54秒
************************************************************************/
#include <stdio.h>
#define max_n 2540160
int num[10];
void init(int *num) {
nu... |
0586b3eb0a551861e3b625ee3cba88b36cbd891e | 0f69936af3fdf91bf082bd5cf0c8825799a1ede1 | canhminhdo/canhminhdo.github.io | /_includes/codes/algo/lietke/generation.cpp | C++ | cpp | 817 | permissive | #include <iostream>
using namespace std;
void generation(int n);
void show(int* arr, int n);
void fill(int* arr, int start, int end, int val);
int main() {
generation(4);
}
void generation(int n) {
// cấu hình đầu tiên
int arr[n];
int i;
fill(arr, 0, n, 0);
do {
// hiển thị cấu hình
... |
6cc4d6780e1211c707bb6b5a4b3185ba5753fe29 | 1cccac66e2faab43c00596b8824674824f9bdc5f | notlixiang/AO | /timeline.cpp | C++ | cpp | 2,715 | no_license | #include "timeline.h"
TIMELINE::TIMELINE(const FlightList FlightsOfLine_init) {
FlightsOfLine = FlightsOfLine_init;
isValid();
}
bool TIMELINE::isValid() {
if (getDelayNum() == true && getDIType() == true && getSize() == true) {
validFlag = true;
} else {
validFlag = false;
cout << "TIMELINE inval... |
c2e024ed4e95fa239a4d660cd9b6ab1588d806c0 | 5d3b49b551147ffeed4a540d3472126f7823ab8a | ye-man/swift | /lib/SILOptimizer/FunctionSignatureTransforms/FunctionSignatureOpts.cpp | C++ | cpp | 33,256 | permissive | //===--- FunctionSignatureOpts.cpp - Optimizes function signatures --------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
e1652e26b969261811ef0f755732e01e57cf91d8 | 18c7a487bc60d6b32c2c011a5a0ec54eb8c2bd1b | 15831944/cbwindows | /GM/PalColor.cpp | C++ | cpp | 31,166 | permissive | // ColorPal.cpp : implementation file
//
// Copyright (c) 1994-2020 By Dale L. Larson, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, includin... |
3a5b9bf99017b1a39a934a6eee6e1b7e426cae5f | fddb15169686dc3a799d9105e9cdc52770110b48 | MarshalLeeeeee/SJTU_OnlineJudge | /3022/3022.cpp | C++ | cpp | 1,863 | no_license | #include <iostream>
#include <stdio.h>
#define LEN 20000
using namespace std;
int d1[LEN] = {0};
int d1_len = 0;
int d2[LEN] = {0};
int d2_len = 0;
int d3[LEN] = {0};
int d3_len = 0;
int d4[LEN] = {0};
int d4_len = 0;
int day;
void add(int *, int *, int *, int *, int &, int &, int &, int &);
void print(int *, int);
i... |
0b05331a6bc0dfc78fb3ffdc3b35efec857c37f4 | 0388356e8c4bce5e49db146cc9174ae63fb56cf0 | sauravchaudharysc/Programming | /Novice/Algorithm/Dynamic Programming/Longest Palindromic Substring/longestPalindromeSubstr.cpp | C++ | cpp | 1,212 | no_license | #include<bits/stdc++.h>
using namespace std;
void printSubstr( string str, int low, int high )
{
for( int i = low; i < high; i++ )
cout << str[i];
cout<<endl;
}
int longestPalindromeSubstr(string str)
{
int n=str.size();
bool dp[n][n];
memset(dp,0,sizeof(dp));
int maxLength=1;
... |
8adc171d81607b0c7fd1cc1828e4b0a4b65b9ea4 | 02cb7bad77db8bb987211b3a491deb982c5765b2 | tOverney/ComputerGraphics | /hw6p2_mirrorfloor/main.cpp | C++ | cpp | 1,819 | no_license | #include "icg_common.h"
#include "FrameBuffer.h"
#include "_floor/Floor.h"
#include "_cube/Cube.h"
int window_width = 1280;
int window_height = 720;
FrameBuffer fb(window_width, window_height);
Cube cube;
Floor shinyfloor;
void init() {
glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
glEnable(GL_DEPTH_TEST);
glEnab... |
1eaba19f09b145c8853d4615dcb3f426396c1125 | 67b84916e301003d833e57ebf1b24da8cfa2bf6c | openthread/ot-br-posix | /third_party/Simple-web-server/repo/server_https.hpp | C++ | hpp | 3,873 | permissive | #ifndef SIMPLE_WEB_SERVER_HTTPS_HPP
#define SIMPLE_WEB_SERVER_HTTPS_HPP
#include "server_http.hpp"
#ifdef ASIO_STANDALONE
#include <asio/ssl.hpp>
#else
#include <boost/asio/ssl.hpp>
#endif
#include <algorithm>
#include <openssl/ssl.h>
namespace SimpleWeb {
using HTTPS = asio::ssl::stream<asio::ip::tcp::socket>;
... |
8e9cc7667b8b2a0f27cb27a826d0a2b41579399f | 3872152ed2963842759724be9d582294b3612071 | ryan-swann/Circuits | /src/mc_sym/combinatorics.cpp | C++ | cpp | 2,736 | no_license | #include "combinatorics.h"
#include <algorithm>
namespace combinatorics {
uint64_t choose(uint64_t n, uint64_t k) {
assert(k <= n);
if (k == 0 || n <= 1)
return 1;
k = std::min(k, n - k);
//if ((n > 50) && std::abs((static_cast<int64_t>(n / 2) - static_cast<int64_t>(k)) < 10))
// re... |
6a537554576fcfef77cd26d5a25bf41f13ea046e | e626b060edbeeb5a71be3d02e320cef0677100d3 | tensorflow/tensorflow | /tensorflow/core/kernels/conv_grad_input_ops_double.cc | C++ | cc | 835 | permissive | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
36292a21b361fb81d586f6bfcd570981efe01084 | 76feda924aea047cef0ea3c549869f713a134bda | abhyudaypratap/pytorch | /torch/lib/THPP/Type.hpp | C++ | hpp | 1,757 | permissive | #pragma once
#include "THPPGeneral.h"
namespace thpp {
/*
* The following notation comes from:
* docs.python.org/3.5/library/struct.html#module-struct
* except from 'T', which stands for Tensor
*/
enum class Type : char {
CHAR = 'c',
UCHAR = 'B',
FLOAT = 'f',
DOUBLE = 'd',
HALF = 'a',
SHORT = 'h',
... |
8017c52aace6664bad1d77ab640337b3ac71ccf6 | db1befe2043d46d0c4a80673cfce23a6f30fa0e6 | odindsp/old_dspads | /bid_nonop/adview/adview_response.cpp | C++ | cpp | 2,504 | no_license | /*
* adview_response.cpp
*
* Created on: March 20, 2015
* Author: root
*/
#include <string>
#include <time.h>
#include <stdlib.h>
#include <strings.h>
#include <string.h>
#include <algorithm>
#include "../../common/setlog.h"
#include "../../common/json_util.h"
#include "adview_response.h"
#include "../../co... |
5ce79ea7ed8476946803c36c99058b9d48ea8ebd | 59ef875b1314f982ba55f6821e84a9cc4b835e01 | INTICOIN/INTICOIN_BETA | /src/miner.cpp | C++ | cpp | 20,771 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2013 The NovaCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "miner.h"... |
4bbc268afd8504129f8e8522b7d1632cf25069f8 | e8c228f36e1fbd9c6f0b79d8197ae5bdafcd1894 | DavidBittner/Brojam | /particle.cpp | C++ | cpp | 1,565 | no_license | #ifndef PARTICLE_CPP
#define PARTICLE_CPP
#include <chrono>
#include "glfw_funcs.cpp"
typedef std::chrono::high_resolution_clock Clock;
class Particle
{
public:
Particle( Coord sourcePos, float mag, float ang, float lifeSpan );
void Move();
void Draw();
float GetLife(){ return... |
b063e18f31cbc4ebb3f4e28c9cbec08fcb6e1601 | c216eb4e5f4d3d6d99157e6cbf3b94674cac9c70 | FHead/PhysicsHiggsProperties | /LightBosonStudies/16234_BetterHypothesisTesting/ReadFile.cpp | C++ | cpp | 3,160 | no_license | #include <iostream>
#include <vector>
using namespace std;
#include "AngleConversion.h"
#include "DataHelperFwd.h"
#include "ReadFile.h"
FileHandle::FileHandle(string FileName, char cut, bool reuse, bool IsEM)
{
File = TFile::Open(FileName.c_str());
Cut = cut;
ReUse = reuse;
Tree = (TTree *)File->Ge... |
2efe22d2d7a89e72fae5bfe906abf4ba5cc87fbb | 1d5af8f12316a1154bcd678ff12fc204819134f7 | plancherb1/drake | /multibody/inverse_kinematics/gaze_target_constraint.cc | C++ | cc | 3,859 | permissive | #include "drake/multibody/inverse_kinematics/gaze_target_constraint.h"
#include <limits>
#include "drake/math/autodiff_gradient.h"
#include "drake/multibody/inverse_kinematics/kinematic_constraint_utilities.h"
using drake::multibody::internal::NormalizeVector;
using drake::multibody::internal::RefFromPtrOrThrow;
usi... |
d1e6e7b90b19ccb55497c07986b7e3d403b425d3 | 44614b13cd92b0020b3445e6d36d2bee5d68232a | nathanel23/lgogdownloader | /src/downloader.cpp | C++ | cpp | 187,177 | permissive | /* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
#in... |
5c77485fc5e9b31fd2ee595223f0cde57fb76eee | fd52cc920c7695bf5a3a5b615f9f2760c790b261 | nmhung1210/chromium | /net/quic/quic_chromium_client_stream.cc | C++ | cc | 20,573 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/quic/quic_chromium_client_stream.h"
#include <utility>
#include "base/bind_helpers.h"
#include "base/callback_helpers.h"
#include "bas... |
0b79832fc60a7375f7ddb21472ba03fb3fcb7ec1 | 17948daeac0577a01968037c7cd3d2e4fefe1cc8 | toahabhuiyan/Recursion-Practices | /fibonacci.cpp | C++ | cpp | 296 | no_license | #include<bits/stdc++.h>
using namespace std;
int fibonacci(int n)
{
if(n<=1)
{
return n;
}
else return fibonacci(n-1)+fibonacci(n-2);
}
int main()
{
int i=1;
printf("The fibonacci series from 1 to 10 is :\n");
while(i<=10)
{
printf("%d\t",fibonacci(i));
i++;
}
printf("\n");
} |
e9aa50b97b9f1972572b4165313fa3a3b770521d | 37025f1a5edbb6fa4ec5dcbb76b62d301167f7bd | brunoeducsantos/3dScanningAndMotionCapture-sols | /Exercise_2/exercise_2/main.cpp | C++ | cpp | 1,627 | no_license | #include <iostream>
#include "Eigen.h"
#include "ImplicitSurface.h"
#include "Volume.h"
#include "MarchingCubes.h"
int main()
{
std::string filenameIn = "./data/normalized.pcb";
std::string filenameOut = "result.off";
// implicit surface
ImplicitSurface* surface;
// TODO: you have to switch between these surfac... |
7010860bcba0f7eeae53679acfba0d95fbd4808a | 71ae2eaff32a6f6f626a178308351e58ba948235 | Aizhan1202/Hello-World | /13.cpp | C++ | cpp | 316 | permissive | #include <iostream>
#include <cmath>
using namespace std;
int main(){
double a,b,c;
double h1,h2,h3,S,p;
cout<<"inter the sides of the triangle";
cin>>a>>b>>c;
p=(a+b+c)/2;
S=sqrt(p*((p-a)*(p-b)*(p-c)));
h1=2*S/a;
h2=2*S/b;
h3=2*S/c;
cout<<"h1= "<<h1<<endl<<"h2= "<<h2<<endl<<"h3= "<<h3;
return 0;
} |
f0d5fefc63f4e5dbc3bdcb7eccbc0ea25ed48ad2 | 286a7bcb4e59298096f567de33a390d43298748e | raobystorm/algorithms | /bitSet/bitSet.cpp | C++ | cpp | 1,238 | no_license | // bitSet.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "bitSet.h"
static const unsigned char bitMaskInit[] = { 128, 64, 32, 16, 8, 4, 2, 1 };
const unsigned char* bitSet::bitMask = bitMaskInit;
bitSet::bitSet(unsigned initSize){
bitSize = (initSize % 8) ? (initSize / ... |
93902deb528635094295c2cd6b578bd0e10655d0 | 158711c92f3b92fea30d42abb8bee355339bcee1 | useafter/PPTShell-1 | /PPTShell/PPTShell/DUI/MagicPen_Altha.cpp | C++ | cpp | 1,890 | no_license | #include "StdAfx.h"
#include "MagicPen_Altha.h"
#include "Common.h"
#include "MagicPen_View.h"
CMagicPen_Altha::CMagicPen_Altha(void)
{
m_hPenZoom = NULL;
m_pbmpTmp = NULL;
m_nCx = GetSystemMetrics(SM_CXSCREEN);
m_nCy = GetSystemMetrics(SM_CYSCREEN);
}
CMagicPen_Altha::~CMagicPen_Altha(void)
{
}
LPCTSTR CMag... |
b5cb228e32b5a55ddbe410efa1b5d5c915de1a5b | bf1b0590786d683c2e3b768626c1b7a0e6c053db | CyFI-Lab-Public/RetroScope | /external/chromium_org/net/test/spawned_test_server/local_test_server.cc | C++ | cc | 7,565 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/test/spawned_test_server/local_test_server.h"
#include "base/command_line.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#... |
98d85cc952321b92dc01ad697df3b546f6012a5f | 78d443fd5b75fc63d13f0329a4291349b539c961 | TurBoss/construct | /ircd/logger.cc | C++ | cc | 14,751 | permissive | // Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice... |
2e67350883f940749f3b1314f6b2e00e5b0b7a73 | e2f060debea982b7ad3299308dde96c8700e5342 | kushalsingh007/haiku | /src/preferences/network/NetworkSetupProfile.cpp | C++ | cpp | 1,895 | no_license | /*
* Copyright 2004-2015 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "NetworkSetupProfile.h"
#include <stdlib.h>
NetworkSetupProfile::NetworkSetupProfile()
:
fRoot(new BEntry()),
fPath(new BPath()),
fIsDefault(false),
fIsCurrent(false),
fName(NULL)
{
}
N... |
e7e0f8392bad73e20ebd82d65a9f70bb15b88b8d | 972989cf641c3c33691103d83a6e1f5272e3bef1 | alexandraback/datacollection | /solutions_2692487_1/C++/Hamition/a.cpp | C++ | cpp | 1,711 | no_license | #include <iostream>
#include <map>
#include <vector>
#include <cassert>
#include <string>
#include <set>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <queue>
#include <list>
#include <limits>
#include <stack>
#include <sstream>
#include <fstream>
#include <ctime>
#include <cstdlib> ... |
8160377515739252c9e79bae60a94d0a8247c557 | 8aca1da3e4b767ac1705eebddb30938a07a4b2bc | TimothyZhang023/vcdb | /src/storage/t_kv.cpp | C++ | cpp | 14,811 | permissive | /*
Copyright (c) 2012-2014 The SSDB 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 "codec/error.h"
#include <cfloat>
#include "ssdb_impl.h"
#include "t_kv.h"
int SSDBImpl::GetKvMetaVal(const std::string &meta_key, KvMetaVal &... |
e2bbca82a37479e355e1352c40d8ee46a9237ade | 84ee4a3b5139d770674c57d49fda64acbad41a92 | skuin/4-1ShaderProgramming | /glsl2019/GLSLBase/GLSLBase.cpp | C++ | cpp | 2,165 | no_license | /*
Copyright 2018 Lee Taek Hee (Korea Polytech University)
This program is free software: you can redistribute it and/or modify
it under the terms of the What The Hell License. Do it plz.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
*/
#include "stdafx.h"
#include <iostre... |
e1f6387c2cbdcc53dabdc2fd5de5d2204ec50232 | 34e706cd7c544ddf9c3862f8608cda37587ff730 | yashkapoor007/geeksforgeeks | /linkedList_10.cpp | C++ | cpp | 1,905 | no_license | #include<iostream>
#include "Node.cpp"
using namespace std;
Node* buildList()
{
Node* head=NULL;
Node* tail=NULL;
int data=0;
while(data!=-1)
{
cin>>data;
if(data!=-1)
{
Node* newnode=new Node(data);
if(head==NULL)
{head=newnode;
tail=newnode;
}
else if(head!=... |
9f932a52bb8d8c72f141ef5b71bf2b4fa66de184 | 05a3477bdcb86ddd772cee1fc60258c25808f563 | kapilkush75/INTEL-DAL1 | /cpp/oneapi/dal/algo/linear_kernel/backend/cpu/compute_kernel_test.cpp | C++ | cpp | 7,240 | permissive | /*******************************************************************************
* Copyright 2020-2021 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... |
78e045c746fcd923ce5a7488a0781d03cf59802b | bf9db89009552f791a7393d9236f259f19452efb | CaptainStealthy/java2XP | /Project2/JNIWrapper/javaXPWindow.cpp | C++ | cpp | 924 | no_license | #include "javaXPWindow.h"
JavaXPWindow::JavaXPWindow(int width, int height, int decoration, string windowTitle) : ImGUIWindow(width, height, decoration)
{
logger = make_unique<Logger>("Java XP Window");
setTitle(windowTitle.c_str());
setBuildCallback([&](ImGUIWindow & window) {
this->drawGui(window);
});
set... |
033ab751f065ac7695e642e536bc81ca6552ca02 | 739ab75de368b6a36ae4ed02e7b8dbf4e7faa724 | bitcoin/bitcoin | /src/test/script_p2sh_tests.cpp | C++ | cpp | 14,894 | permissive | // Copyright (c) 2012-2022 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 <consensus/tx_verify.h>
#include <key.h>
#include <policy/policy.h>
#include <policy/settings.h>
#include <script/sc... |
a57c0cad5df9656519acb06c727bcda696f41ed7 | c6efa6eb740f790799bcefbd8e976b8f585b74da | heyitsmine/cpp-primer-5th | /exercises/11/11-13.cc | C++ | cc | 492 | no_license | //
// Created by hs on 2019/9/7.
//
#include <iostream>
#include <utility>
#include <vector>
#include <string>
using std::cin; using std::cout; using std::endl;
using std::pair;
using std::vector;
using std::string;
int main()
{
vector<pair<string, int>> vec1, vec2, vec3;
string s;
int val;
while (ci... |
94cf3d1e0f764b6e8a193075ff3a4bcfd67e0e24 | 9f8022ed61f7b9855b9c946a33df0dbd2b54d70b | NVIDIA-Omniverse/PhysX | /physx/source/geomutils/src/hf/GuHeightFieldUtil.cpp | C++ | cpp | 8,423 | permissive | // 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 conditions and the following disclaimer.
// * Redistributions in binary... |
e2c9b682770ae14858dd60020387b13155bc3ec7 | 87138b516296d7651c7e9e768379b0a72f8a73aa | LiteNoteProject/LiteNote | /src/rpc/blockchain.cpp | C++ | cpp | 98,714 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// 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 <rpc/blockchain.h>
#include <amount.h>
#include <base58.h>
#include <chain.h... |
cc000ce91accb7a332b837a6e85c15cc4623aa16 | ae22dad4e60a5801341ba1c36d109180852d6fa5 | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/MPLSReverseDirectionTunnel/UNIX_MPLSReverseDirectionTunnel_TRU64.hxx | C++ | hxx | 1,837 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
a27794161ea705f8bf45358c68ef1c70d3a64a86 | 4652caa2a3f014049fd01a50a8e6bcbdf35259c3 | dani2442/OpenGL | /OpenGL_PRUE/Introduction/4_Translation.cpp | C++ | cpp | 4,688 | no_license | #include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <stdio.h>
#include <iostream>
#include <cmath>
// Window dimensions
const GLint WIDTH = 800, HEIGHT = 600;
GLuint VAO, VBO, shader, uniformModel;
bool direction = true... |
689518292f6c433f6ec4b2a3c6e88cc458267f6d | 6818430c5282ec8dd4aa7cfb12c9fd7ab8a06a38 | RDTCREW/SoT-SDK | /SDK/SoT_bsp_cma_bush_01_a_functions.cpp | C++ | cpp | 802 | no_license | // SeaOfThieves (1.6.4) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function bsp_cma_bush_01_a.bsp_... |
37817c79a2b93de3907eb6224ae4b60e0e653d37 | 367a110a1f7ccc9b41cafcfa3d5dad5211c8beaf | kiranRudraram/DSC | /circular_queue.cpp | C++ | cpp | 1,240 | no_license | /*CIRCULAR QUEUE*/
#include<iostream>
#include<stdlib.h>
#define max 5
int cq[max],ele,temp,front=-1,rear=-1,ch;
using namespace std;
class circularQ
{
public:
void enqueue();
void dequeue();
void display();
};
int main()
{
circularQ obj;
while(1)
{
cout<<"\n\tMAIN_MENU\n";
cout<<"\t\t1.INSERTION\n\t\t2.DELETION\n\t\t3... |
0d9fc8da4dda7da108dbc884194414ff01a8b4f7 | bb12e5446a6ebf326087570c21e113bec7648b57 | yezhangxiang/LeetCode | /src/RemoveLinkedListElements/RemoveLinkedListElements.cpp | C++ | cpp | 403 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* removeElements(ListNode* head, int val) {
if (head != NULL)
{
(head->val == val ? head : head-... |
8f9befe2e8bf14a9f9d74db34f088ecc85648944 | fa0d8af532152cc51edd82a370595d5b6a6976e0 | davidmc/w3metasite | /openMerchant/testHarness.cpp | C++ | cpp | 1,849 | no_license | #include <iostream>
using namespace std;
#include "ocPayflowPro.h"
int main( int argc, char ** argv )
{
int ret=0;
string test = "Test of ocAppend: ";
ocAppend( test, 433 );
ocAppend( test, " Float: " );
ocAppend( test, 6.344 );
cout << test << endl;
ocPayflowPro merchant( "/home/davidmc/development/o... |
8064342d8af7d1619382bb59eb4fcb2b2e27480e | 8f36e30c8709d0ea48c7e16cd6a7f8db9f60a33a | ndsol/subskia | /src/core/SkColorMatrixFilterRowMajor255.cpp | C++ | cpp | 12,659 | permissive | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkColorMatrixFilterRowMajor255.h"
#include "SkColorData.h"
#include "SkNx.h"
#include "SkPM4fPriv.h"
#include "SkRasterPipeline.h"
#include "SkReadBuffer.h"
#include... |
fdf42e6d1268fdfdf9a93ebd6764f6639200b8e6 | 4f0f1fa9ccce43801cf4098627d882776700bbbe | tbs1980/Cat2Map | /testHEALPixIO.cpp | C++ | cpp | 1,592 | permissive | #include <cassert>
#include <cmath>
#include <iostream>
#include <healpix_map.h>
#include <pointing.h>
#include <healpix_map_fitsio.h>
#include <datatypes.h>
int main()
{
// create a test map
typedef Healpix_Map<double> mapType;
mapType m0;
mapType m1;
mapType m2;
int nSide = 1024;
m0.S... |
22aab434e86b40d3b07fc3e90cc065354cf35759 | 63ce91c8f7714fb7a30631a24c8fe4776d09e31c | YujieChuck/QT_HPC_study | /Bin_x64/debug/moc_notifymanager.cpp | C++ | cpp | 2,699 | permissive | /****************************************************************************
** Meta object code from reading C++ file 'notifymanager.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
**
** WARNING! All changes made in this file will be lost!
*******************************************************... |
e43eba8c42a39152c174459eeeb842115aefd19f | 55138e57b9221a2063be25498c8571df1904140e | jkadamczyk/AGH_JIMP2 | /lab4/squareclass/SquareClass.cpp | C++ | cpp | 465 | no_license | //
// Created by Tay on 3/21/17.
//
#include "Point.h"
#include "SquareClass.h"
double Square::Circumference() {
return 4* sqrt((a.GetX() - b.GetX())*(a.GetX() - b.GetX() + (a.GetY() - b.GetY())*(a.GetY() - b.GetY())));
}
double Square::Area() {
return (sqrt((a.GetX() - b.GetX())*(a.GetX() - b.GetX() + (a.G... |
9477c7eb5420112f641a76705bfacd1b428efade | 049248006c844ff89b007c1682725813e891578c | KyleMcB/leetcode_solutions-old | /solutions/c++/146.cpp | C++ | cpp | 1,721 | permissive | //%32 speed
class LRUCache {
list<pair<int,int>> l;
unordered_map<int, decltype(l.begin())> m;
void insert(int key, int value) {
auto iter = l.insert(l.begin(), {key, value});
m.insert({key, iter});
size++;
}
void remove(int key) {
auto iter = m.at(key);
l.era... |
4e7d1023eea2a1d8c602af0c6d1a6553a995329c | 33698a6c6cb969a8d337cb709a649cb17da354a7 | Acasune/Atcoder | /arc074_b.cpp | C++ | cpp | 993 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double lb;
#define REP(i,j,n) for (int i=j;i<(n);i++)
#define RREP(i,n) for (int i = n; 0<i;i--)
#define print(out) cout<< out << "\n";
#define mod 1000000007
const int INF = 1e9;
typedef pair<ll,ll> P;
int main(){
ll N;cin>>N;
vecto... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.