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 |
|---|---|---|---|---|---|---|---|---|
8f849124e5295b49995af93175127b3a7f7733b9 | 373fe881a009a71a7348e9c9aba8a8d1b0475496 | mylo2202/INT-1006-Introductory-to-Informatics | /sapxeptangdan.cpp | C++ | cpp | 598 | no_license | #include <iostream>
using namespace std;
void arraySort(int a[], int arraySize)
{
for(int i=0; i<arraySize; i++)
{
int minimum = i;
for(int j=i+1; j<arraySize; j++)
{
if(a[j] < a[minimum])
{
minimum = j;
}
}
int x = a[i... |
19e41692c1d7471bfadff7593168d6ed02eb20a3 | 431d93907a816663aed96ec3201ef6699f91cf34 | cristinazhou/PAT | /PAT乙级(Basic Level)/1077. 互评成绩计算 (20).cpp | C++ | cpp | 2,051 | no_license | 1077. 互评成绩计算 (20)
在浙大的计算机专业课中,经常有互评分组报告这个环节。一个组上台介绍自己的工作,其他组在台下为其表现评分。最后这个组的互评成绩是这样计算的:所有其他组的评分中,去掉一个最高分和一个最低分,剩下的分数取平均分记为 G1;老师给这个组的评分记为 G2。该组得分为 (G1+G2)/2,最后结果四舍五入后保留整数分。本题就要求你写个程序帮助老师计算每个组的互评成绩。
输入格式:
输入第一行给出两个正整数N(> 3)和M,分别是分组数和满分,均不超过100。随后N行,每行给出该组得到的N个分数(均保证为整型范围内的整数),其中第1个是老师给出的评分,后面 N-1 个是其他组给的评分。合法的输入应该是[0,... |
e68232d6b7105eb76e22be1c455fb771ba068020 | 84566b2e88418cf2dbf837b62bd1cd291dd5cffb | JakubSokolowski/tsp-distributed-worker | /src/solvers/bnb/LittleMatrix.cpp | C++ | cpp | 5,380 | no_license | #include "LittleMatrix.h"
LittleMatrix::LittleMatrix(uint rows_num, uint cols_num)
: data_m(Matrix(rows_num, std::vector<uint>(cols_num, INF)))
, rows_num_m(rows_num)
, columns_num_m(cols_num)
{ }
LittleMatrix::LittleMatrix(const Matrix &matrix)
: data_m(matrix)
, rows_num_m(static_cast<ui... |
c66b70e5f277db32bd991c7c6bebde72a6a4ad43 | 3218d2224187563a04e1bc1eabdb0834be32e45b | jpeloquin/FEBio | /FECore/FEPrescribedDOF.cpp | C++ | cpp | 4,078 | permissive | /*This file is part of the FEBio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio.txt for details.
Copyright (c) 2020 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any person obtaining ... |
fc84541df6d33852e97de1e8dc99b9fb5685d98c | 8234424ecb080520f1b2b63586e44cb149b679eb | dim4egster/btcu_coderev | /src/libzerocoin/Accumulator.cpp | C++ | cpp | 2,878 | permissive | /**
* @file Accumulator.cpp
*
* @brief Accumulator class for the Zerocoin library.
*
* @author Ian Miers, Christina Garman and Matthew Green
* @date June 2013
*
* @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green
* @license This project is released under the MIT l... |
70fe56ce362e79d8be121c8139ebe6ae140da2c2 | 967a26f6321a9eceb71287729f6665a9475628ab | scorum/scorum | /libraries/plugins/blockchain_history/include/scorum/blockchain_history/devcommittee_history_api.hpp | C++ | hpp | 1,923 | permissive | #pragma once
#include <fc/api.hpp>
#include <scorum/blockchain_history/schema/applied_operation.hpp>
#ifndef API_DEVCOMMITTEE_HISTORY
#define API_DEVCOMMITTEE_HISTORY "devcommittee_history_api"
#endif
namespace scorum {
namespace app {
struct api_context;
}
} // namespace scorum
namespace scorum {
namespace blockch... |
722cbd17fa960c1f50b1b68228061c6ed6404411 | b441cd5f188bd18aa8c629ae3e9a6754b5bfb2d6 | i5anoff/imagine | /src/imagine/envi/impl_arch/dispatch_win32.cpp | C++ | cpp | 1,873 | permissive | /*
Imagine v0.1
[envi]
Copyright (c) 2015-present, Hugo (hrkz) Frezat
*/
#include "imagine/envi/impl_arch/dispatch_impl.h"
#include "imagine/envi/impl_arch/widget_impl.h"
#include "imagine/envi/dispatch.h"
#if defined(IG_WIN64)
# define GCL_HCURSOR GCLP_HCURSOR
# define GWL_USERDATA GWLP_USERDATA
#endif
namespace... |
626309888b41207bbbd909b76ff4770d711375b2 | e500dc0f90798b65a4a20273a47de1fc9ed421da | JB-JAMES/NRs | /homework10/nonlinear_data_fitting.cpp | C++ | cpp | 4,703 | no_license | // 주어진 nonlinear model 에 data를 fitting한다.
// Levenberg-Marquardt Method를 사용하여 점진적으로 최적값에 도달하도록 구현한다.
#include <stdio.h>
#include <vector>
#include "../recipes_cpp/ludcmp.cpp"
#include "../recipes_cpp/lubksb.cpp"
using namespace std;
vector<DP> v[4];
void Input() {
DP a, b, c, d;
int i=0;
FILE *fp=fope... |
02adb5c71b611d2e07a9e4b4ff06b6d3ce6f6933 | 8f925184a837bd2e6d4fce9b7de81f894814457e | restouffer/earthenterprise | /earth_enterprise/src/fusion/autoingest/sysman/AssetVersionD.cpp | C++ | cpp | 41,511 | permissive | // Copyright 2017 Google 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 in... |
b2ec0ae541297de1a31dd7946527ba6ed7f769c9 | 8471f2773253ead26efcaa9e46b4f228bfb4db31 | yutianwu/MyCodes | /alg/quickSort/quickSort/quickSort.cpp | C++ | cpp | 1,586 | no_license | /*
快速排序结合了插入排序和归并排序的优点,在原地排序并且期望运行时间为O(nlgn),思想主要是分治法
主要思路:
1.从数列中挑出一个元素,称为 "基准"(pivot)
2.重新排序数列,所有元素比基准值小的摆放在基准前面,所有元素比基准值大的摆在基准的后面(相同的数可以到任一边)。在这个分区退出之后,该基准就处于数列的中间位置。这个称为分区(partition)操作。
3.递归地(recursive)把小于基准值元素的子数列和大于基准值元素的子数列排序。
伪代码:
QUICK-SORT(A, p, r)
if p<r
then q<-PARTITION(A, p, r)
QUICK-SORT(A, p, q-... |
a6a5400ddfa687fabf153c7ebafa8db0d1ab1e53 | d3b8b0377100e69c83cd254f07dbea0189e32c5a | bhoeferlin/or-tools | /ortools/constraint_solver/routing_search.cc | C++ | cc | 180,895 | permissive | // Copyright 2010-2021 Google LLC
// 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 in... |
539a480bcbdb8100b06ddfb38bbd0042e9e70da1 | 60c77f8bc9b34690ee947817f5eb4aaa0d3ca886 | dalehamel/bpftrace | /tests/probe.cpp | C++ | cpp | 1,887 | permissive | #include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "bpforc.h"
#include "bpftrace.h"
#include "clang_parser.h"
#include "codegen_llvm.h"
#include "driver.h"
#include "fake_map.h"
#include "mocks.h"
#include "semantic_analyser.h"
namespace bpftrace {
namespace test {
namespace probe {
using bpftrace::ast::Attac... |
edc383abc5bf9a446e70e1963a68677aed330a46 | 18b07f7b6e1b5a19834e23c51c497e774a799dda | wuhengzhi/chromium-crosswalk | /ash/wm/immersive_fullscreen_controller_unittest.cc | C++ | cc | 41,939 | 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 "ash/wm/immersive_fullscreen_controller.h"
#include "ash/display/display_manager.h"
#include "ash/display/mouse_cursor_event_filter.h"
#include ... |
845c8ea2ae2d8b9b851b8a0fc10bbe1fb972f3f5 | 50e8508afc92a8a48d8ba4591248e824a916778f | Orion545/OI-Record | /Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0624/road/road.cpp | C++ | cpp | 898 | no_license | #include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
typedef long long LL;
#define rep(a,b,c) for (int a=b;a<=c;a++)
#define per(a,b,c) for (int a=b;a>=c;a--)
const int N=100010;
int n,a[N],p[N],zuo[N],you[N],hav[N],ans,tot;
int cmp(int x,int y){
return a[x]>a[y];
}
int main(){
freopen("road.i... |
979250c39065b7bec76d3ac8fd4438e6fa426088 | e2190f872506917634832732c872ec41c4da760e | newbee-D/code | /algorithm/数据结构/栈/判断括号是否配对.cpp | C++ | cpp | 1,462 | no_license | #include<iostream>
#include<stack>
using namespace std;
class Solution
{
public:
bool isValidParentheses(string &s)
{
stack<char>st;
int n=s.size();
for(int i=0;i<n;i++)
{
if(s.at(i)=='(') //如果为(入栈
{
st.push('(');
}
... |
f1310e35f3d58028d07b576e0321e098120a3f2f | 21c3a26054cabbbe52bca0a0e9b0359305e048e2 | isaiasalves/CG-ATV3 | /examples/Labirinto-Dobra-Espacial/trackball.hpp | C++ | hpp | 758 | permissive | // capitulo 8 trackball.hpp
// OK
#ifndef TRACKBALL_HPP_
#define TRACKBALL_HPP_
#include "abcg.hpp"
class TrackBall {
public:
void mouseMove(const glm::ivec2& mousePosition);
void mousePress(const glm::ivec2& mousePosition);
void mouseRelease(const glm::ivec2& mousePosition);
void resizeViewport(int width, ... |
9c3f295a91e89357dacadac9e80c01ce8e5d1ea3 | 112bfe08bae523fd76ae9da3d4ed5f26ff673df2 | ayushman17/Competitve-coding | /Codechef/Contests/LRNDSA05/CHMOD.cpp | C++ | cpp | 1,014 | no_license | #include<bits/stdc++.h>
using namespace std;
#define int long long int
int freq[101][101]={0};
vector<int> prime;
int prefix_sum(){
bool primes[101];
memset(primes,true,sizeof(primes));
for(int i=2;i<=100;i++){
if(primes[i]){
prime.push_back(i);
for(int j=i*i;j<=100;j+=i){
primes[j]=false;
}
}
}... |
17a40438443386d2c3f2ab7abbe254b7b42f2262 | 603e09b4829b224f889d7bfd4c534815ee6db6f8 | Charlie-Conte/Advanced-Games | /Crazy Golf Simulator/Square.cpp | C++ | cpp | 5,654 | no_license | #include "Square.h"
Square::Square()
{
}
Square::Square(glm::vec3 pos, SpritesEnum squareType)
{
this_square_type = squareType;
glm::vec3 tl = pos + glm::vec3(-square_size / 2, square_size / 2, 0);
glm::vec3 tr = pos + glm::vec3(square_size / 2, square_size / 2, 0);
glm::vec3 br = pos + glm::vec3(square_size ... |
993eaf4a8c2f02ad0d3334ffbe9ca997f499ff7c | a53d4d206dbbeda09dc8b71bce6ab8e4f5962818 | Bachzart/PTA_Practice | /Basic_Level/B1062.cpp | C++ | cpp | 934 | no_license | #include <cstdio>
int gcd(int a, int b) {
return b == 0 ? a : gcd(b, a % b);
}
int lcm(int a, int b) {
int tmp = gcd(a, b);
return a * b / tmp;
}
int main() {
int n1, m1, n2, m2, k;
scanf("%d/%d %d/%d %d", &n1, &m1, &n2, &m2, &k);
int t1 = lcm(m1, m2);
int t2 = lcm(t1, k);
if(n1 > n2) {
int tm... |
42d08f1a4ac5c5ee384ecd71715edba586208dd2 | 1b3612a3862705fe2650b40c1f14359b38ef3045 | joe-barhouch/threaded-blob-detection | /blob.cpp | C++ | cpp | 3,829 | no_license | // Blobc.cpp c for counting
#include "blob.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
Blob::Blob(std::vector<cv::Point> contour) {
currentContour = contour;
currentBoundingRect = cv::boundingRect(currentContour);
cv::Point currentCenter;
... |
fc2794ab5cdee22ac8be741b95af89751401bc04 | b52fddb86558a448d8696fd19e327173adf80133 | Chirag482/cpp-Master-course | /42)Decimal to binary using bitwise .cpp | C++ | cpp | 260 | no_license | #include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int mul = 1;
long long ans = 0;
while(n>0){
int a = ((n&1)>0)?1:0;
ans += a*mul;
mul = mul*10;
n=n>>1;
}
cout<<ans;
return 0;
}
|
52d99228e620a2219065170a79b838e2cb9faf33 | 86c4003062dd4a09dcf537a2d08e45f7f682dcd0 | jiseongyoo/ros2_examples | /install/interfaces/include/interfaces/msg/msg_collection__traits.hpp | C++ | hpp | 985 | no_license | // generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from interfaces:msg/MsgCollection.idl
// generated code does not contain a copyright notice
#ifndef INTERFACES__MSG__MSG_COLLECTION__TRAITS_HPP_
#define INTERFACES__MSG__MSG_COLLECTION__TRAITS_HPP_
#include "interfaces/msg/msg_collection... |
93c2966b42071af80788ccbd89d942d5c37723ec | dc779bf97660c7f111303bd346f58e936de7141a | falcosecurity/falco | /userspace/falco/outputs_syslog.cpp | C++ | cpp | 877 | permissive | /*
Copyright (C) 2020 The Falco 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 agreed to in writing, so... |
23a565d07d11a8239b5407cd87dcbc4c2e140c05 | 3168a203bba93c1fa645622e43f82e049792594e | chiunyi23/OnlineJudgeCode | /data_structure/p_heap.cpp | C++ | cpp | 1,684 | no_license | // C++ program for implementation of Heap Sort
#include <iostream>
using namespace std;
// To heapify a subtree rooted with node i which is
// an index in arr[]. n is size of heap
void heapify(int arr[], int n, int i)
{
int largest = i; // Initialize largest as root
int l = 2*i + 1; // left = 2*i ... |
18458d67fa7fbde4b0e3e367c5880f3cdcc341a2 | b03b1a7ac74d6aa7077bb5ec87999903c49bf8b9 | ttyant/dvbe4sage | /dvbe4sage/encoder/extern.cpp | C++ | cpp | 4,140 | no_license | #include "stdafx.h"
#include "encoder.h"
#include "logger.h"
#include "configuration.h"
#include "extern.h"
#include "SatelliteInfo.h"
#include "GrowlHandler.h"
#include "EIT.h"
// This it the global encoder object
Encoder* g_pEncoder = NULL;
EITtimer* g_pEITtimer = NULL;
extern "C" ENCODER_API void ... |
a3fdb63d754e698850dc1e3ad86840e24aad9c9a | 33a7196186f6d64a4fa56f4d566d3ff10cf2e5b1 | KrzysztofNowacki/MorseCode | /main.cpp | C++ | cpp | 5,500 | no_license | #include <iostream>
#include <string>
void decode()
{
std::string message{}, morse{};
std::cout<<"Enter the morse message: ";
std::getline(std::cin,morse);
unsigned long start=0;
for(unsigned long i{};i<morse.size();i++)
{
if(morse[i]==' '||i==morse.size()-1)
{
if(i=... |
b4b3636b50e1c139a6bfbc018b5b2562f0ec182b | 324bd41ba4d40cf966d7f36fa406499ddcb530ac | tomppamo93/OpiSDL2 | /OptionsMenu.cpp | C++ | cpp | 9,315 | no_license | #include "OptionsMenu.h"
#define NothingPressed -1
OptionsMenu *OptionsMenu::Optionsmenu = NULL;
unsigned int OptionsMenu::m_kplmäärä = 5;
OptionsMenu::OptionsMenu()
{
string name[ButtonCount_options] = { "Start", "Back", "Plus", "Miinus", "Plus","Miinus"};
buttons[0].SetButton(name[0], 50, 50, 150, 50, SDLCore::... |
2c5c06ef68acfa7687e3bb000194ac901c99c948 | fa524108db5ea5b9824112f78444819954a5ecc5 | tzlaine/text | /perf/insert_erase_perf.cpp | C++ | cpp | 2,131 | permissive | // Copyright (C) 2020 T. Zachary Laine
//
// 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)
#include "string_objects.hpp"
#include <benchmark/benchmark.h>
#include <iostream>
void BM_string_erase_insert_front(b... |
f6e05ecead1060bd2a73ed9a3c0c561bb87cf8a3 | 369dde6ac69dcd1cdfbfa4269408145e69591b5f | lauer3912/chromium.src | /chrome/browser/diagnostics/diagnostics_controller_unittest.cc | C++ | cc | 6,869 | 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 "chrome/browser/diagnostics/diagnostics_controller.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/scoped_tem... |
2897ef07fcba56d436e9b7bcac8f2baf4e451ac8 | fbf4b3263c8d3b913dea8e7bcdc20327fcfef109 | Martin-Sl/ETCCode | /src/throttleMapInteraction.cpp | C++ | cpp | 1,349 | no_license | #include "throttleMapInteraction.h"
#include "throttlemap.h"
float engineRpm = 6000;
float maxRPM = 16000;
int selectedMapNumber = 0;
int APPSPoints = 20;
int RpmPoints = 12;
int mapIndexFromAppsPercentage(float percentage){
return (int)(percentage*APPSPoints);
}
int mapIndexFromRpm(float engineRpm){
return ... |
6d34479c9fea0c577a63776c87fe1f79ce9e98c1 | 3f2425507ccda239cf4da7adbf376a94c2e9dfe5 | Avishake007/cpp-programming | /Stock buy and sell.cpp | C++ | cpp | 1,426 | no_license | /*
The cost of stock on each day is given in an array A[] of size N. Find all the days on which you buy and sell
the stock so that in between those days your profit is maximum.
*/
//Solution
//O(n)<--Time complexity
#include <bits/stdc++.h>
using namespace std;
int main() {
//code
int t,n;
cin>>t;
while(t--)
{
... |
744f9b1bab2626566e26b8666ded60eaf151fd58 | f4a6c8f2cc97244d871cf7cc254f8a479d442954 | Joey-Liu/online-judge-old-version | /xdoj/KMP算法/KMP算法/源.cpp | C++ | cpp | 1,572 | no_license | //from july csdn
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <string.h>
using namespace std;
void GetNext(char* p, int next[])
{
int pLen = strlen(p);
next[0] = -1;
int k = -1;
int j = 0;
while (j < pLen - 1)
{
//p[k]表示前缀,p[j]表示后缀
if (k == -1 || p[j] == p[k])
{... |
5ca2e8dc04c8f3fc0f1451350442f0a297a30505 | ed26f27b4b715b8ca0463e125858d34fd8b4c06d | shiver/blaze-lib | /blazetest/src/mathtest/tsvecdvecmult/VCaV2b.cpp | C++ | cpp | 3,770 | permissive | //=================================================================================================
/*!
// \file src/mathtest/tsvecdvecmult/VCaV2b.cpp
// \brief Source file for the VCaV2b sparse vector/dense vector inner product math test
//
// Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
//
// This fil... |
287a35b3069d4496b166554a0e51c0158cd6a551 | 6ccd13582da0fbfb82f181a3c4bf4d79373981a7 | gbakkk5951/ACM | /徐州网赛/G/std.cpp | C++ | cpp | 2,060 | no_license | using namespace std;
int main() {}
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cctype>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <sstream>
#include <vector>
#include <cmath>
#include <complex>
#include <cass... |
555a960cc278d12463eef6879bc3b55284e609e7 | 143eac30bd38fc323b4711854ea4ecf3c7d048fc | doingli/udpprobe | /src/udpprobecli.cpp | C++ | cpp | 12,110 | no_license | #include <cstdio>
#include <ctime>
#include <cstdarg>
#include <cinttypes>
#include <cstdlib>
#include <string>
#include <iostream>
#include <algorithm>
#include <sys/time.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <map>
#include <boost/... |
977eb8200f54ddffcf3b8fc85a26fdcbf1f1a63a | c620f8132b2367a5b75bb266e14308a13c1032ef | hangyuguo/chromium | /chrome/browser/ui/web_applications/web_app_browser_controller.cc | C++ | cc | 14,892 | permissive | // Copyright 2015 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/web_applications/web_app_browser_controller.h"
#include "base/callback_helpers.h"
#include "base/strings/strcat.h"
#include "... |
c8c3c75ac699750cd282c083d78cf38aa35b004b | a15ed81f74d14234b3ae352e04a7b8dd3554a65f | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/net/homenet/beacon/server/cwanipconnectionservice.cpp | C++ | cpp | 1,543 | no_license | #include "pch.h"
#pragma hdrstop
#include "CWANIPConnectionService.h"
#include "ndispnp.h"
#include "ras.h"
#include "rasuip.h"
#include "util.h"
CWANIPConnectionService::CWANIPConnectionService()
{
}
HRESULT CWANIPConnectionService::get_LastConnectionError(BSTR *pLastConnectionError)
{
HRESULT hr = S_OK;
*... |
18c4c11dae7984c3bdeb0cde54277801a26a7ff5 | 5014ff6cb57385c8640da7e7024943899169a343 | dp-huang/SketchUpNET | /SketchUpNET/Curve.cpp | C++ | cpp | 3,701 | permissive | /*
SketchUpNET - a C++ Wrapper for the Trimble(R) SketchUp(R) C API
Copyright(C) 2015, Autor: Maximilian Thumfart
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including wi... |
df727341a5313934843f4faf87016cad5c2cdd1c | 89b07809677b68aa758ccfc5d9d19615a2964f3f | MySgeoffrey/EarthSDK | /SmartCity/kernelLib/src/VR_GeoGraphic/geoarc.cpp | C++ | cpp | 285 | no_license | //
//
// Generated by StarUML(tm) C++ Add-In
//
// @ Project : Untitled
// @ File Name : cgeoarc.cpp
// @ Date : 2018/7/28
// @ Author : sgeoffrey
// @platform:蚂蚁空间信息平台
//
#include "geographic/geoarc.h"
namespace Graphic
{
void CGeoArc::Operation1()
{
}
}
|
946f522190f04b45477f0c2516e508789a29f6ea | 8a8dbec430ea53e9facc8ae8a00fe9c7584b237d | pace-pdro/dasprog | /Untitled1.cpp | C++ | cpp | 1,496 | no_license | #include <stdio.h>
main()
{
float buku,pensil,kertas;
char nama [50];
char toko [50];
int jumlah;
int kembalian;
printf("\t \t ==>SELAMAT DATANG DI TOKO KAMI<==\n");
printf("KAMI MEMILIKI BEBERAPA PRODUK YAITU BUKU PENSIL DAN KERTAS\n");
printf("\t \t SILAHKAN... |
fe561cc1573f87d35c07de5a34ed527169bef10d | 19d7a3a67d162a1997e4e63f874a0822d900fe30 | laien529/chromium | /content/shell/browser/web_test/web_test_browser_context.cc | C++ | cc | 4,092 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/shell/browser/web_test/web_test_browser_context.h"
#include <utility>
#include "base/bind.h"
#include "base/command_line.h"
#include "... |
92befff7a0e7c0c5ec7a4d9318f1746573efddab | 98912f6918d28721513f27cb54da24582a23d004 | iuyoy/basicCSKnowledge | /leetcode/416. Partition Equal Subset Sum/PESS.cpp | C++ | cpp | 1,211 | no_license | /*
Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.
Note:
Each of the array element will not exceed 100.
The array size will not exceed 200.
Example 1:
Input: [1, 5, 11, 5]
Output: true
Explanatio... |
54e6e0944adeeb29fe10aecaa42a180daf3002ba | 2a3383d3a27cd4a4c3a095db6dabd15c3539f132 | zhenweiliuqing/Code | /Algorithm/4-DP/bag/01/879_profitableSchemes.cpp | C++ | cpp | 4,007 | no_license | #include <vector>
#include <numeric>
using namespace std;
// 6-10
class Solution {
public:
// 转移dp[i][j][k] = dp[i-1][j-group[i]][k-profit[i]]
int profitableSchemes(int n, int minProfit, vector<int>& group, vector<int>& profit) {
const int mod = 1e9+7;
int tasks = group.size();
vector<v... |
e0b86010880354e94924f465c055e1895590ef3f | 49dd76ec8a1eae803f5f9166014c7d46ff44656c | i-RIC/prepost-gui | /apps/rivmaker/window/verticalcrosssection/verticalcrosssectionwindowdisplaysettingdockwidget.cpp | C++ | cpp | 666 | permissive | #include "verticalcrosssectionwindowdisplaysettingdockwidget.h"
#include "verticalcrosssectionwindowdisplaysettingdockwidgetview.h"
VerticalCrossSectionWindowDisplaySettingDockWidget::VerticalCrossSectionWindowDisplaySettingDockWidget(QWidget* parent) :
QDockWidget(tr("Visibility Setting"), parent)
{
setFeatures(QDo... |
91d86479e6eec3f85b721a0bc8d63fc9399542bc | be857af5d18af0acad7305b4aa4c637cd597df2d | Quanteek/nt2 | /modules/complex/arithmetic/include/nt2/toolbox/arithmetic/functions/complex/generic/oneplus.hpp | C++ | hpp | 2,220 | permissive | //==============================================================================
// Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI
// ... |
edacd861dfa2aed0b9879bed08f236d3ffc5d7f1 | b4fa041ee533290194ea12d926708d8c0bced7a9 | mateifl/calgor | /tourist.cpp | C++ | cpp | 4,711 | no_license | /*
* tourist.cpp
*
* Created on: Dec 24, 2014
* Author: matei
*/
#include <iostream>
#include <climits>
#include <cstdio>
#include <cstring>
#include <vector>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <string>
using namespace std;
typedef struct coord {
int x;
int y;
} coord;
typed... |
7ae66b8cd9eccc514a97dc0acaf23ee045b2c823 | 73cab3715b0365de959c576ca212f7ddfde1ad2a | suniverse/Mara2 | /src/IntercellFluxSchemes.hpp | C++ | hpp | 1,352 | no_license | #ifndef IntercellFluxSchemes_hpp
#define IntercellFluxSchemes_hpp
#include "Mara.hpp"
#include "Reconstruction.hpp"
class ScalarUpwind : public IntercellFluxScheme
{
public:
ConservationLaw::State intercellFlux (const FaceData& faceData) const override;
int getStencilSize() const override;
};
class Met... |
b98d5d22a6dcfbf61d0a942c2e97d50e2ba0c714 | ca99d85531f87a9635b5415c52ffab0b3a1f7154 | NvRom/internProject | /First_Step_For_Task/copy.cpp | C++ | cpp | 16,273 | no_license | // First_Step_For_Task.cpp: 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <fbxsdk.h>
#include "Common.h"
#include <iostream>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include "assert.h"
//在edges中找到与vertex相连接的点的,若找不到则返回-1
int findNextConnectedVertex(set<pair<int, int>>&edges, i... |
691a1718a75c34cc8d119cfd5798d16f5e2caafd | 3a77df08061e266c34dfd41d56b1003fc1ed55b9 | frndxyz/auroracoin-new | /src/test/compress_tests.cpp | C++ | cpp | 1,941 | permissive | // Copyright (c) 2009-2019 The Bitcoin Core developers
// Copyright (c) 2014-2019 The DigiByte Core developers
// Copyright (c) 2015-2019 The Auroracoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <compre... |
445966d4463629c74fee23a0193498ed13e117f0 | 9b0b95c16e8a6d6f016bc56fd5f8f8355dea4470 | tcpku1984/Cmap | /variable.cpp | C++ | cpp | 339 | no_license | /**
*
* Authors:
* Tim Dwyer <tgdwyer@gmail.com>
*
* Copyright (C) 2005 Authors
*
* Released under GNU LGPL. Read the file 'COPYING' for more information.
*/
#include <variable.h>
namespace vpsc {
std::ostream& operator <<(std::ostream &os, const Variable &v) {
os << "(" << v.id << "=" << v.position() << ")... |
fd888a3a30d1bb60825dfa5f304c52676e7e2f3a | 87b5eda1259dd28f6b7d5975fba0f9247268226b | nlslatt/sst-macro | /sumi-mpi/mpi_api_vcollectives.cc | C++ | cc | 5,196 | permissive | #include <sumi-mpi/mpi_api.h>
#include <sumi-mpi/mpi_queue/mpi_queue.h>
#include <sstmac/software/process/backtrace.h>
using namespace sumi;
namespace sumi {
int
mpi_api::start_allgatherv(const void *sendbuf, void *recvbuf, int sendcount, const int *recvcounts, const int *displs, MPI_Datatype type, MPI_Comm comm)
{... |
529e52b1d8f14bd7c998e260d22acfcf20ea7c67 | 2b82ddea40b2ede2571ca54de20ea85e42f83681 | Alonewolf-123/PaydayCoin-Core | /src/bench/prevector.cpp | C++ | cpp | 3,421 | permissive | // Copyright (c) 2015-2018 The PaydayCoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <prevector.h>
#include <serialize.h>
#include <streams.h>
#include <type_traits>
#include <bench/bench.h>
// GC... |
674fee413f98f4c9c63db46f153451bd1847b183 | 66728a5afc3224afb6fc791c43408a29814554d8 | sha0510/pyisc | /src/_AnomalyDetector.cc | C++ | cc | 4,962 | no_license | /*
--------------------------------------------------------------------------
Copyright (C) 2014, 2015, 2016 SICS Swedish ICT AB
Main author: Tomas Olsson <tol@sics.se>
This code is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by t... |
d5bd7d29d0ca0deb3983699446efce2f41c3bf63 | c2ff828af3aa2c96129bdfd8ee4db4822d72d489 | lloves/hifi | /libraries/model/src/model/Material.cpp | C++ | cpp | 2,181 | permissive | //
// Material.cpp
// libraries/model/src/model
//
// Created by Sam Gateau on 12/10/2014.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "Material.h"
#include "Text... |
3948e9fc784fb938d62064d7146ed84d87ea8297 | 9a0442384da55058f3bfa6fae1e6f3a42160f9f7 | NetBSD/pkgsrc | /x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_media_filters_media__file__checker.cc | C++ | cc | 831 | no_license | $NetBSD: patch-src_3rdparty_chromium_media_filters_media__file__checker.cc,v 1.1 2023/06/08 20:38:06 markd Exp $
build with ffmpeg5 from archlinux
--- src/3rdparty/chromium/media/filters/media_file_checker.cc.orig 2022-03-30 09:48:18.000000000 +0000
+++ src/3rdparty/chromium/media/filters/media_file_checker.cc
@@ -68... |
f99c85b4c3c4994f69fb460854bd02bd607a0a3c | 6a256a72b93fd6f547a9ae840e06cca895ac48ec | b21quocbao/Competitive-Programming | /cf1101a.cpp | C++ | cpp | 1,483 | no_license | #include <bits/stdc++.h>
#define fn "test"
#define fn1 ""
using namespace std;
const int mn = 1 * (int)(1e5) + 10;
const int mod = 1 * (int)(1e9) + 7;
const int mm = 1 * (int)(1e3) + 10;
const int base = 1 * (int)(1e9);
const bool aNs = 0;
int tt, ntest = 1;
void docfile()
{
ios::sync_with_stdio(false);
ci... |
8c5b802c8f57402e6f8cde95863b6de61e5bf2ce | 5a976550a2a152feb63c9dc00b3a56707d1157c6 | katelo731/CoreGene_DB | /reformat/noderep.cpp | C++ | cpp | 760 | no_license | #include <bits/stdc++.h>
#include <fstream>
#include <string>
using namespace std;
long long int pt1,pt2;
string seq1,seq2;
int weight;
int f1=0,f2=0;
void find()
{
ifstream ID("finalresult_ID");
long long int IDnum;
string ptseq;
f1=0,f2=0;
while(ID >> IDnum >> ptseq){
if(f1==1 && f2==1) b... |
823cb070354cca76b62fd849e509550a3b5a5bec | 96fb954913fe235bfd4771ec6b83348bb552e4d6 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14644/function14644_schedule_15/function14644_schedule_15_wrapper.cpp | C++ | cpp | 923 | no_license | #include "Halide.h"
#include "function14644_schedule_15_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){
Halide::Buffer<int32_t> buf00(128);
Halide::Buffer<int32_t> buf0(8192, 64, ... |
23ecd731880bbd694854878c482a972290ee2ade | ae683bc735730ec87db0b3240d6f17b4e26c9519 | yeum/GameServerTermProject | /MapDataMerge/MapDataMerge/소스.cpp | C++ | cpp | 2,070 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int main()
{
char caveMap[901];
char caveMap2[901];
char caveMap3[901];
int count = 0;
ifstream fin;
fin.open("CaveMap.txt");
while (fin.get(caveMap[count]))
{
++count;
}
fin.close();
count = 0;
fin.open("CaveMap2.txt");
while (fin.get(caveM... |
63557b1d326a594e8cce747cda65b297c996f7a4 | e501b03945bc2b9c4db00073247197db4ee729d4 | acarcher/chromium | /chrome/browser/ui/webui/management_ui_handler_unittest.cc | C++ | cc | 13,700 | permissive | // Copyright 2019 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 <memory>
#include <set>
#include <string>
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/webui/management_ui_hand... |
0ef04258680beb7fd1e167f56bced898bdd4d48d | 12522e3bcbe2b2cb79966c3fef445279ebbad0db | zgf/ConfigurableParser | /Lib/Regex/ztl_regex_parser.cpp | C++ | cpp | 23,974 | no_license | #include "Include/stdafx.h"
#include "forward.h"
#include "ztl_regex_lex.h"
#include "ztl_regex_expression.h"
#include "ztl_regex_parser.h"
namespace ztl
{
RegexParser::FirstMapType RegexParser::first_map = RegexParser::InitFirstMap();
RegexParser::ActionType RegexParser::actions = RegexParser::InitActionMap();
Rege... |
b34e72ce15d1817147c2f93948fdea8c932517e1 | 4fca86ec5aea1d8eb91721f2e3c52a5880f80d99 | Dozed12/AEDAProject | /TheMenus.cpp | C++ | cpp | 14,608 | permissive | #include "TheMenus.h"
#include "Tools.h"
#include "Date.h"
unsigned short int InicialMenu()
{
unsigned short int TheOption;
cout << endl << TAB_BIG << TAB_BIG << TAB_BIG << TAB_BIG << "Main Menu:\n" << endl;
cout << endl;
cout << TAB << TAB_BIG << TAB_BIG << TAB_BIG << "1 - Student Managment\n" << end... |
455cecab13c8decea8bf954600c1f15e62bf6ef5 | a8edf8bb1883e91bbe74fefa70ced03d185d4bfd | c3358/WindowsServer2003DDKFiles | /WINDDK/3790.1830/src/print/oemdll/oemuni/enable.cpp | C++ | cpp | 5,592 | no_license | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved.
//
/... |
ce01ba063f92b6a44fd49d7e64b00b875ca19a79 | 3eccab48d089229922bd101bb88a5f8026a95098 | wanyuxing/CPP_learning | /Week7-AgeDisease/src/Week7-AgeDisease.cpp | C++ | cpp | 1,196 | no_license | //============================================================================
// Name : Week7-AgeDisease.cpp
// Author : Henry Wan
// Version :
// Copyright : Your copyright notice
// Description : Relationship between age and disease in C++, Ansi-style
//=============================================... |
e4ade667a79d783a4dcffbd418fc4e9efc31c1dc | 44cdc1e04cd39138e1c52fe7e3ccbeac4dee7ebf | MySun275312964/FxLib | /Server/Database/dbconnection.cpp | C++ | cpp | 8,982 | permissive | #include "dbconnection.h"
#include "strhelper.h"
#include <errmsg.h>
FxMySQLConnection::FxMySQLConnection(void)
{
m_myConnection = NULL;
m_bConnected = false;
memset((char*)&m_oAccount, 0, sizeof(SDBAccount));
}
FxMySQLConnection::~FxMySQLConnection(void)
{
if (m_myConnection != NULL)
{
my... |
204cea717b9cfd26258466e83d3244b5c8a92017 | 9ec267bce5ef3b444961641d40bf0e8df1c6d2ab | STEllAR-GROUP/octopus | /src/visit/visit_component.cpp | C++ | cpp | 1,466 | permissive | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2012 Bryce Adelstein-Lelbach
//
// 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)
//////////////////////////////////... |
00d8a43f64a068901747d5339685c71dcf909b74 | 0279c3c88af48a372e615908d90af80ae8ab9d1d | ZhenyingZhu/ClassicAlgorithms | /src/CPP/src/pratice/OneEditDistance.cpp | C++ | cpp | 1,791 | no_license | #include <iostream>
using namespace std;
// [Source]: https://leetcode.com/problems/one-edit-distance/
// http://www.1point3acres.com/bbs/thread-226078-1-1.html
class Solution {
public:
bool isOneEditDistance(string s, string t) {
if (s.length() + 1 == t.length())
return checkRemove(s, t);
... |
842a58cf75c4dcaa8d069cf15657a1a75de897d3 | 07b9129f943442e4be729a91f099f6111393fedd | RotartsiORG/StoneMason | /src/stms/audio.cpp | C++ | cpp | 7,966 | permissive | //
// Created by grant on 1/24/20.
//
#include "stms/audio.hpp"
#include "stb/stb_vorbis.c"
#include "stms/logging.hpp"
namespace stms {
ALenum handleAlError() {
ALenum error = alGetError();
if (error != AL_NO_ERROR) {
STMS_ERROR("[** OpenAL ERROR **]: {}", error);
}
... |
ea17900f0320c365961e91d014af23a91ccf9edf | b220869023aaedecbfe50c288eaef6fcfa1ec0ba | fadal2002/Weather-Smart-Device | /SSDCourseWork17068266/Admin.cpp | C++ | cpp | 654 | no_license | #include "Admin.h"
#include <iostream>
using namespace std;
Admin::Admin(string aId, string apass) : id(aId), password(apass) //setting a username and password for the new account
{
proofID = ""; // setting a proof of id to the account
}
Admin::Admin()
{
cout << "\nEnter UserID: " << endl;
cin >> id; //asking the... |
cbd2aadd206dee6f99bfe4c0e7f0f997beb65ca8 | bcde482d68be3fd3397240e3841ca8fdbf7e997f | Priyaagarrwal/hackerEarth | /Sorting And Searching/armstrong.cpp | C++ | cpp | 377 | no_license | #include<iostream>
#include<math.h>
using namespace std;
int main()
{
int n=0,rem=0,ans=0,num,copy;
cout<<"enter a no";
cin>>num;
copy=num;
while(copy!=0)
{
copy=copy/10;
n++;
}
copy=num;
while(copy!=0)
{
rem=copy%10;
ans=ans+pow(rem,n);
copy=copy/10;
}
if(ans==num)
{
cout<<"no. is armstrong";
}... |
7181b3d062676ab9c0818aeb1db05242aa0d43b8 | 047f7f8501f59f241463a6632a60ee8334aa0c22 | Thegaram/thuhw | /组合数学与算法设计/project 2/src/tests.cpp | C++ | cpp | 10,933 | no_license | #define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "genperm.hpp"
#include <string>
TEST_CASE("Lexicographic permutations", "[lexicographic]")
{
SECTION("cannot use with duplicate items")
{
REQUIRE_THROWS([](){
Lexicographic<int> g = {1, 2, 3, 1, 4};
}());
}
SECTION("... |
20a57bdc083e431c2efd741b363858a58c92e89b | 51b0673a9d6b3cf21548824c36df39b4d5293055 | adityavit/DistributedSystemRepo | /yfs_client.cc | C++ | cc | 15,736 | no_license | // yfs client. implements FS operations using extent and lock server
#include "yfs_client.h"
#include "extent_client.h"
#include "lock_client_cache.h"
#include "lock_release_cache_user.cc"
#include <sstream>
#include <iostream>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#includ... |
5c18a36784ce18651ee26d9e0125de386ba3bfa5 | 0028e7b8eba09487924a7062b6a9e7677d935438 | Yiluhuakai22/algorigthm-study | /DataStructure_C++/bucket_sort/test.cpp | C++ | cpp | 500 | permissive | #include <limits.h>
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include <cstdlib>
#include <iostream>
#include <string>
#include "solution.h"
using ::testing::_;
using ::testing::AtLeast;
using ::testing::Exactly;
using ::testing::Return;
using namespace testing;
using namespace std;
TEST(TEST, TEST)
{
S... |
5be4595e01ed776f580970b062038ff8e9249c9a | eeb2f71056da8108944fbdb34c048e0446ea4b29 | andrleew/os6 | /connection.cpp | C++ | cpp | 952 | no_license | #include "connection.h"
connection::connection(int type){
connect(type);
}
connection::connection(){
socket = NULL;
context = NULL;
}
void
connection::connect(int type){
this->type = type;
context = zmq_ctx_new();
socket = zmq_socket(context, type);
if (type == client)
zmq_connect... |
2eee65e3caa0395ca37d4f492037bf4bf55b3e61 | c7ec92be91370d2328c7df9e091329fb5332d624 | fersarr/interviews | /problems/BST/findClosest.cpp | C++ | cpp | 1,611 | permissive | #include <iostream>
#include <memory>
using namespace std;
template<class T>
struct node{
T value;
shared_ptr<node<T>> left,right;
node(T val){
value=val;
left=nullptr;
right=nullptr;
}
};
int index;
int n;
template<class T>
void BST_fromPreorder(int preorder[],shared_ptr<node<T>> curr,T maxAllowed){
... |
443c1d1b4df6bc99feb751b6335b2b36959c3265 | 572aaf07fb3e9aa4a543c765536e9244494a6095 | kk-katayama/com_pro | /BinSearch/lib/upper_bound.cpp | C++ | cpp | 1,256 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
//k以上である要素のうち最小のもののインデックスを求める
int n;
int a[110000];
int upper_bound(int k){
int left=-1,right=n;
while(right-left>1){
int mid=(right+left)/2;
if(a[mid]>=k) right=mid;
else left=mid;
}
... |
f12529bd43a673497394929f8e9997eb2f814c24 | ab234a55d97a60d65c07e6328cd27677420d1f7a | ADKaster/serenity | /Userland/Libraries/LibWeb/HTML/PageTransitionEvent.cpp | C++ | cpp | 1,306 | permissive | /*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/HTML/PageTransitionEvent.h>
namespace Web::HTML {
WebIDL::ExceptionOr<JS::NonnullGCPtr<PageTransitionEvent>> PageTransitionEvent::create(JS::Realm& r... |
f788414b2e1f991c159c21a5096dc9ec727b346e | ca805ea2a814b4143badf376335e3dbd6896d615 | jsanyam/Codes | /Book/bst_ceil.cpp | C++ | cpp | 1,417 | no_license | #include<cstdio>
#include<iostream>
using namespace std;
struct node
{
int data;
struct node *left, *right;
};
struct node *insert_node(struct node *root, int data)
{
if(root == NULL)
{
root = new struct node;
root->data = data;
root->left = root->right = NULL;
return r... |
6dd582d3f111be15312c9aa520f31340601b0e3d | 509f6d0decad5761d5dd9cfae944474d43842a4d | karthik-cyber/ATM-machine-UI | /main.cpp | C++ | cpp | 21,091 | no_license |
#include <iostream>
#include <iomanip>
#include <time.h>
#include <fstream>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
#include<process.h>
#include<dos.h>
using namespace std;
//==================================================================================================
... |
54dad591c3dbf72f18fb5a12adbed977283d1246 | ff734d17a20c5920869d87a3677f35e3392e7611 | marco-c/gecko-dev-comments-removed | /third_party/libwebrtc/modules/audio_coding/neteq/reorder_optimizer_unittest.cc | C++ | cc | 1,847 | permissive |
#include "modules/audio_coding/neteq/reorder_optimizer.h"
#include "test/gtest.h"
namespace webrtc {
namespace {
constexpr int kForgetFactor = 32745;
constexpr int kMsPerLossPercent = 20;
constexpr int kStartForgetWeight = 1;
}
TEST(ReorderOptimizerTest, OnlyIncreaseDelayForReorderedPackets) {
Reo... |
9bb654c014101a9275668aa35ed9fe9c8424f7ab | 33d52b12ba3c9909dd0f53ee2b92ad08126d1add | majabojarska/SDiZO2 | /src/GraphAlgorithmInterface.cpp | C++ | cpp | 2,001 | permissive | #include "GraphAlgorithmInterface.h"
GraphAlgorithmInterface::GraphAlgorithmInterface()
{
this->matrixGraph = new MatrixGraph();
this->listGraph = new ListGraph();
}
GraphAlgorithmInterface::~GraphAlgorithmInterface()
{
delete this->matrixGraph;
delete this->listGraph;
}
void GraphAlgorithmInterface::run()
{
... |
8fa378cc0ee822edc1c8bf4e66f1d71564c9f855 | d0f84be0a2e2480321d23fc1a1f9835a80d32610 | GabrielLins64/Endless-Online-Awaken | /game_engine/src/gfx_loader.cpp | C++ | cpp | 1,943 | permissive | // Endless Online Awaken
#include "gfx_loader.hpp"
#include <iostream>
bool GFXLoader::initialized_ = false;
std::map<unsigned int, std::unique_ptr<GFXLoader::Directory>> GFXLoader::directories;
std::string GFXLoader::path;
GFXLoader::GFXLoader()
{
if(!this->initialized_)
{
this->path = "";
... |
fbcf6bfe209762938ce217692a9e8304ead26015 | 5beb7305fd7f765a6567bb1da5beb95944435f92 | sandialabs/limeext | /LIME/example/supersimpleUG_JFNK/THINWALL_ModelEval0_w_Resid.cpp | C++ | cpp | 6,173 | no_license | // ********************************************************************************************
//
// THINWALL_ModelEval0_w_Resid.cpp
// This is an additional member function that inherits from the main LIME model evaluator
// for a stand-alone wrap of the super-simple thinwall code, and adds the functionality needed
... |
d7cfbe9280d8657b43da0e1b48f7b5a8d3818339 | afd4f2183d3b82ac64c735d11b51d13ae01dd009 | kyx-dev/kryptoniex-source | /src/test/uint256_tests.cpp | C++ | cpp | 10,359 | permissive | // Copyright (c) 2011-2015 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 "arith_uint256.h"
#include "uint256.h"
#include "version.h"
#include "test/test_kryptoniex.h"
#include <boost/test/u... |
5e1d8dd49aa656e8fa9318b0c83df666402d01ef | 9c8340ac8f81ad473202344c2e7bc76bb7ac9a49 | fengjixuchui/iOS-Reverse | /llvm/Source/llvm/lib/Target/ARC/ARCRegisterInfo.cpp | C++ | cpp | 8,351 | permissive | //===- ARCRegisterInfo.cpp - ARC Register Information -----------*- 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
//
//===---------------------------... |
b38efdf0f25188c9ad5ea1e4620aea843f22bdfd | 9b6ccc77caed78906f649afdccab15dbb3608aaf | GarvitV957/LeetCode | /partition-labels/partition-labels.cpp | C++ | cpp | 534 | no_license | class Solution {
public:
vector<int> partitionLabels(string s) {
vector<int> lastidx(26);
for(int i=0; i<s.length(); i++){
lastidx[s[i]-'a'] = i;
}
int start = 0, last = 0;
vector<int> ans;
for(int i=0; i<s.length(); i++){
las... |
d614ce603822de89a36923aa7245acc4c821eae3 | 35304c1bb129fcad654973ea4d6d8869d01ab532 | temerkhanov/compute-runtime | /opencl/test/unit_test/utilities/file_logger_tests.cpp | C++ | cpp | 38,881 | permissive | /*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/test/unit_test/utilities/file_logger_tests.h"
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
#include "shared/test/unit_test/utilities/base_object_utils.h"
#include "opencl/source/utilit... |
158b0ee69488b6a14c43a7896fb28a94b24eb488 | 1538bdc8fa50cf7247b96ef8ae08c0204b4332d3 | y0214ju/Kattis-solution | /different.cpp | C++ | cpp | 247 | no_license |
#include <iostream>
#include <string>
using namespace std;
int main()
{
string a,b;
string str;
while(cin >> a >> b) {
cout << abs(stol(a)-stol(b)) <<endl;
}
return 0;
}
|
f7320cd7d5d1a379cd350dce85e285592b2f2350 | 7f418e29e8fd100319d0ae0493d5c9948695f357 | TheMadDodger/Spartan-Engine | /SpartanFramework/RelativeConstraint.cpp | C++ | cpp | 957 | no_license | #include "stdafx.h"
#include "RelativeConstraint.h"
#include "UIObject.h"
#include "Canvas.h"
namespace SpartanEngine
{
namespace UI
{
RelativeConstraint::RelativeConstraint(float percentage, bool relativeToCanvas) : m_Percentage(percentage), m_RelativeToCanvas(relativeToCanvas) {}
RelativeConstraint::~RelativeC... |
b6e3dff0ce6f07a5c7ada95e4f64962c958b5758 | 923b907bcaea4e9d8d4410558916937711ea4725 | brbrown25/aaf-1 | /ref-impl/src/com-api/CAAFNetworkLocator.cpp | C++ | cpp | 4,435 | no_license | //=---------------------------------------------------------------------=
//
// This file was GENERATED for the AAF SDK
//
// $Id: CAAFNetworkLocator.cpp,v 1.10 2009/06/01 11:47:02 stuart_hc Exp $ $Name: $
//
// The contents of this file are subject to the AAF SDK Public Source
// License Agreement Version 2.0 (the "L... |
a6b63e4a1054c19c487b03420200ebb25a086eb0 | 0103f1506659f0b02a495a71cefcef022fd9e303 | VasuGoel/leetcode | /challenge/2021/march-leetcoding-challenge/pacific-atlantic-water-flow.cpp | C++ | cpp | 1,780 | no_license | // DFS
class Solution {
vector<pair<int,int>> dirs {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
public:
vector<vector<int>> pacificAtlantic(vector<vector<int>>& matrix) {
if(matrix.empty()) return {};
int m = matrix.size(), n = matrix[0].size();
vector<vector<bool>> pacific(m, vect... |
f6d2755d4a787d43e9bd229df914e88d03106840 | 1ba48446ec7741100d8b8d437f6e303070ea0cd7 | jawline/Scribble | /src/VM/InstructionSet.cpp | C++ | cpp | 2,006 | no_license | /*
* InstructionSet.cpp
*
* Created on: 10 Jun 2013
* Author: blake
*/
#include "InstructionSet.hpp"
#include <string.h>
namespace VM {
InstructionSet::InstructionSet(uint8_t* instructions, size_t numInstructions,
uint8_t* constants, size_t numConstants, unsigned int start) ... |
7fadd25ba216fb0ef24bc1fb5282afd011b9c8e1 | a0f669137dc100c365c84dde584f8919bc2096c5 | projectgalateia/spvis_s | /src/svm.cc | C++ | cc | 1,630 | permissive | #include "spvis.hpp"
#include <cstdio>
#include <cmath>
#include <vector>
#include <cfloat>
static class SVM : Classifier {
private:
const float dt = 0.1f;
TrainVector vector;
std::vector<float> alphas;
struct FPoint {
float x;
float y;
};
float B;
float screen_w;
float screen_h;
FPoint map(const Po... |
c5d4922f36d03f873cf3c1c43bf3c6ee28973759 | 55e2b1c5da247626331c895a14743fcd1fa071bb | kk-source/DSA-Practice-Repo | /My DSA Practice/Backtracking/combinationSum.cpp | C++ | cpp | 1,007 | no_license | #include <bits/stdc++.h>
using namespace std;
void fun(vector<vector<int>> &ans, int sum, vector<int> temp, int arr[], int n){
if (sum==0){
ans.push_back(temp);
return;
}
for (int i=0;i<n;i++){
if (sum>=arr[i]){
if (temp.empty()==false && temp.back()>arr[i])
c... |
2d6c43498ccebff6744e4fa190d951939354de42 | 4cd1600b77675ff7c416b8c28e4e7dc02fec4e12 | UserNT/JoinISD | /Kruglinskij/ex03a/ex03a/ex03aView.cpp | C++ | cpp | 3,064 | no_license |
// ex03aView.cpp : реализация класса Cex03aView
//
#include "stdafx.h"
// SHARED_HANDLERS можно определить в обработчиках фильтров просмотра реализации проекта ATL, эскизов
// и поиска; позволяет совместно использовать код документа в данным проекте.
#ifndef SHARED_HANDLERS
#include "ex03a.h"
#endif
#include "ex03aD... |
38910a2d5bdcd9f94bd50495f163915418894ad2 | 0626fc399705ed89f156cea01bfae65f3ea8ff5d | BGCX067/faint-graphics-editor-svn-to-git | /branches/editable-raster-objects/python/py-app.cpp | C++ | cpp | 4,326 | permissive | #include "app/getappcontext.hh"
#include "geo/grid.hh"
#include "python/pythoninclude.hh"
#include "python/py-app.hh"
#include "python/py-util.hh"
static PyObject* faintapp_set_transparency_indicator( faintAppObject*, PyObject* args ){
faint::Color color;
if ( !parse_rgb_color(args, color) ){
return... |
2339bb665c6af405581e2c94d5a7609128f8ed6b | 981e7f0771c482837d92950e09a8173bbf51e799 | vgrankin1/ogl_tank | /src/t34.cpp | C++ | cpp | 16,257 | permissive |
#if defined _MSC_VER
#include <windows.h>
#define _USE_MATH_DEFINES
#else
#define _STDCALL_SUPPORTED
#define _M_IX86
#endif
#include <GL/GL.h>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include "GL/glut.h"
#include "elements.h"
#include "t34.h"
std::string media_path = "../media/";
... |
9802c24142c843a331aa55305da7d8e4f303916e | 94a5fc86a254a22955ac0cd9b55d1c4645523293 | wuhongyi/TechnicalReserves | /include/algorithm/is_partitioned.cc | C++ | cc | 1,126 | no_license | // is_partitioned.cc ---
//
// Description:
// Author: Hongyi Wu(吴鸿毅)
// Email: wuhongyi@qq.com
// Created: 日 5月 24 16:26:34 2015 (+0800)
// Last-Updated: 日 5月 24 16:26:52 2015 (+0800)
// By: Hongyi Wu(吴鸿毅)
// Update #: 1
// URL: http://wuhongyi.cn
//C++11
// is_partitioned example
#include <iostrea... |
97c2e54c7fdc993f4130ee13ed460564aaa20032 | 6957d7fd1e631dd69eff161e6c95c159e66e093a | AlbertSid/fuchsia | /zircon/system/ulib/fs-pty/test/service-test.cc | C++ | cc | 6,431 | permissive | // Copyright 2019 The Fuchsia 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 <fuchsia/hardware/pty/llcpp/fidl.h>
#include <lib/async-loop/cpp/loop.h>
#include <lib/async-loop/default.h>
#include <lib/fit/function.h>
#includ... |
9dfd4f6899d1f7af04ac7e75a233864a37cac5db | 9f948d5b1fb26fa461bcc84b77d4d52c92eb5819 | qt/qtbase | /src/corelib/kernel/qvariant.cpp | C++ | cpp | 91,314 | no_license | // Copyright (C) 2022 The Qt Company Ltd.
// Copyright (C) 2021 Intel Corporation.
// Copyright (C) 2015 Olivier Goffart <ogoffart@woboq.com>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qvariant_p.h"
#include "qbitarray.h"
#include "qbytearray.h"
#inc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.