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 |
|---|---|---|---|---|---|---|---|---|
d108530ac45035924ffdc96554a0b2e72277a97d | 1952cdbcb2bf6be500d3cd6e46ba9135a5d1c696 | a5batra/LeetCode-Solutions-in-C-plus-plus | /mergeSortedArray.cpp | C++ | cpp | 1,833 | no_license | //
// Created by Ankit Batra on 10/1/20.
//
/* Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
* Note:
* The number of elements initialized in nums1 and nums2 are m and n respectively.
* You may assume that nums1 has enough space (size that is equal to m + n) to hold add... |
40d512595f3d854eb2584e5d2f8fc394d6e05f47 | 237d8f079e6106504c48c06b8797f176ee88db6c | potatoler/OI_Exercise | /K优先队列.cpp | C++ | cpp | 1,169 | no_license | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<queue>
#include<vector>
#define int long long
using namespace std;
priority_queue<int, vector<int>, less<int> > bigger;
priority_queue<int, vector<int>, greater<int> > smaller;
int n, k, p;
inline int R... |
55fd8ee039e9eaae9e63ca108ce169ad2f5f1993 | 8b09a0515e2763da4a5295245002e4500486ce96 | Nick-Pearson/SoftwareRenderer | /src/material/material.cpp | C++ | cpp | 4,522 | permissive | #include "material.h"
#include "../amath.h"
#include <random>
#include <algorithm>
#include <glm/gtx/transform.hpp>
glm::vec3 Material::CalculateBRDF(const glm::vec3& view, const glm::vec3& light, const glm::vec3& inNormal, const glm::vec3& tangent, const glm::vec3& bitangent, const Vertex& vertexData) const
{
con... |
0356a2b5d4273d1a5bcff65865af5fbe385d273e | 4465b9a5d7099d37d73a648eaaf0585b3d22c152 | miranda-ng/deprecated | /NotWorkingStuff/Deprecated/MRA/src/MraMRIMProxy.cpp | C++ | cpp | 7,658 | no_license | #include "stdafx.h"
#include "MraMRIMProxy.h"
#include "proto.h"
struct MRA_MRIMPROXY_DATA
{
LPSTR szEmail; // LPS to
DWORD dwIDRequest; // DWORD id_request
DWORD dwDataType; // DWORD data_type
LPSTR lpszUserData; // LPS user_data
size_t dwUserDataSize;
MRA_... |
45bff099643631671b84985845e1350cbce4ca79 | 47ea021b9d8b53ee349c01236ce21992ea9471dd | SymbianSource/oss.FCL.sf.mw.messagingmw | /messagingfw/msgtestfw/TestActions/Capabilities/src/CMtfTestActionSendEMsvGetRemainingChildren.cpp | C++ | cpp | 6,070 | no_license | // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/e... |
cdd68859686dd85e6478b3562278c2c74bc33a3f | f5bafb9ba522af78a23d8f59e2aa90fcb7932f09 | quantsegu/RxCpp | /Ix/CPP/src/cpplinq/linq.hpp | C++ | hpp | 15,368 | permissive | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
///
/// namespace cpplinq
/// -----------------
///
/// Defines a number of range-based composable operators for enumerating and modifying collections
///
/// The general design philoso... |
a8a20a96987d2d9acade7c5df52b963878bd7bf4 | 5e6162fbc311d2e42410966346d3786df546689d | EasyHard/vurd | /lib/CodeGen/TargetInstrInfo.cpp | C++ | cpp | 26,857 | permissive | //===-- TargetInstrInfo.cpp - Target Instruction Information --------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
7cef8726de4719544b2b42c0eeecb6a6b66a9393 | 662445234262af1e1851aad7ef58e29d20d88bab | mrandreastoth/zxtune | /src/core/plugins/players/dac/sqd_supp.cpp | C++ | cpp | 823 | no_license | /**
*
* @file
*
* @brief SQDigitalTracker support plugin
*
* @author vitamin.caig@gmail.com
*
**/
//local includes
#include "dac_plugin.h"
#include "core/plugins/player_plugins_registrator.h"
//library includes
#include <core/plugin_attrs.h>
#include <formats/chiptune/digital/sqdigitaltracker.h>
#include <module/pla... |
1ceab85de2522cc13d826c858943205c2bbfd589 | f6d5f55bb843071470dc4a491d4f3befe10cc4fe | paulkoba/Assignments_KNU_Y2 | /leetcode/count-of-smaller-numbers-after-self/Accepted/6-26-2021, 11:57:57 AM/Solution.cpp | C++ | cpp | 692 | no_license | // https://leetcode.com/problems/count-of-smaller-numbers-after-self
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
template <typename T, typename U>
using tree = __gnu_pbds::tree<T, U, std::less<>, __gnu_pbds::rb_tree_tag,
__gnu_pbds::tree_order_statistics_node_update>;
class Solu... |
1c3bdce58d65a051e777aaa226204e2cdf4b13f8 | 35c4da512bcc4c9f37dbfcade0079ecdce763397 | vicyan1611/vscode-cpp | /archive/Training Gitgud/1107C.cpp | C++ | cpp | 1,361 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
using namespace std;
long long k,n,res=0,a[200005],b[200005],f[200005];
string st;
/*void trau(long long i,long long cnt,long long sums)
{
if (cnt>k) return;
if (i>n)
{
res=max(res,sums);
return;
}
if (st[i... |
7f58efaf566782449794acea58022fb58476f0bc | d5b8a6428e35ffa0c216643668f9a2097930fb94 | citron0xa9/Pt2 | /Uebung5/code/sort.cpp | C++ | cpp | 2,119 | no_license | #include <iostream>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
#include <cassert>
// function template for printing contents of containers to std::cout
template<class T>
void printContainer(T& container)
{
std::cout << "{";
for (auto element : container)
std::cout << element << " ";
... |
72737d70b0ea85128d96bb2984c7c0e10b6668f7 | cf294472553eae3a836d900cca5f82910f534d78 | tigercosmos/labium | /components/drive/service/fake_drive_service_unittest.cc | C++ | cc | 80,281 | 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 "components/drive/service/fake_drive_service.h"
#include <stddef.h>
#include <stdint.h>
#include <string>
#include <vector>
#include "base... |
0d67d9542bc08e45db22a871356478bd94fe5eec | 106b5727f6daacd892681ab3239e56c1fbb10faf | oxidation99/3DQ | /Source/Visualizers/Spectrogram3D.cpp | C++ | cpp | 8,443 | no_license | //--------------------------------------------------------------------------------------------
// Name: Spectrogram3D.cpp
// Author: Jérémi Panneton
// Creation date: February 5th, 2019
//--------------------------------------------------------------------------------------------
#include "Spectrogram3D.h"
#inc... |
da86426f035b9ee98fa8b4f9de8c78b7e191e0d7 | 8bd536dec09411e90178c4c0ebe4c3a6046de937 | ccdxc/logSurvey | /data/crawl/squid/hunk_453.cpp | C++ | cpp | 1,444 | no_license | clientStreamNode * getTail() const;
clientStreamNode * getClientReplyContext() const;
ConnStateData *getConn() const;
- void connIsFinished();
- void removeFromConnectionList(ConnStateData * conn);
+ void finished(); ///< cleanup when the transaction has finished. may destroy 'this'
void de... |
0de9e16c97634b76b51c1d470ff24bebebf020de | 7897b05e76bb0511999c1008a6755f6efdc0dd96 | ahunter16/DX11Project | /Engine/Engine/timerclass.cpp | C++ | cpp | 1,044 | no_license | ///////////////////////////////////////////////////////////////////////////////
//Filename: timerclass.cpp
///////////////////////////////////////////////////////////////////////////////
#include "timerclass.h"
TimerClass::TimerClass()
{
}
TimerClass::TimerClass(const TimerClass& other)
{
}
TimerClass::~TimerClas... |
ee4fa931e60f00b24ade8f5d71ccf44d46f8dfde | 8aec29fac0f1de67d9dc08a91cbcea34ea943d49 | silenke/my-leetcode | /problems/剑指 Offer 40. 最小的k个数/1.cc | C++ | cc | 951 | no_license | #include "..\..\leetcode.h"
class Solution {
public:
vector<int> getLeastNumbers(vector<int>& arr, int k) {
vector<int> res;
partition(arr, k - 1, 0, arr.size() - 1, res);
return res;
}
private:
void partition(vector<int>& arr, int k, int l, int r, vector<int>& res) {
if ... |
139090b845fa599d606161169a7289622436bbba | 2a78b7a2534b02cf786d1c00903b83de039ce24d | breezy1812/MyCodes | /LeetCodeR3/448-Find All Numbers Disappeared in an Array/solution.cpp | C++ | cpp | 449 | no_license | class Solution {
public:
vector<int> findDisappearedNumbers(vector<int>& nums) {
vector<int> ans;
for(auto x: nums) {
int v = abs(x);
if(nums[v-1] > 0) {
nums[v-1] = -(nums[v-1]);
}
}
int n = nums.size();
for(int i = 0; i < ... |
a350066995ad5a50a3be2076845f28533749c62d | aebd075dbd6f41814d4ce880eb70532c17dcf4a1 | 15831944/barry_dev | /src/KernelConfMgr/SystemDnsmasqCli.cpp | C++ | cpp | 26,150 | no_license | ////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2005
// Packet Engineering, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification is not permitted unless authorized in writing by a duly
// appointed officer of ... |
550d50930382f7b0032c226f50153588f5dc3e70 | 5dfa10d1f8ee9133f084cb256e9bf60702956d17 | sxjscience/horovod | /horovod/common/common.cc | C++ | cc | 5,272 | permissive | // Copyright 2018 Uber Technologies, Inc. All Rights Reserved.
// Modifications copyright (C) 2019 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.a... |
5afb2a58a440e90cf550ff8171c46a75575e504c | 2c5fe14d76c55b8534403deb9cb68fc9c859e083 | ahamroun/Gerondif | /Gerond'IF/Gerond'IF/ClientSocket.cpp | C++ | cpp | 222 | no_license | // ClientSocket.cpp : fichier d'implémentation
//
#include "stdafx.h"
#include "ClientSocket.h"
// ClientSocket
ClientSocket::ClientSocket()
{
}
ClientSocket::~ClientSocket()
{
}
// Fonctions membres ClientSocket
|
451f7a47253b853a5be185cbb8ff013ee59f3e50 | 76ac1474c50586f9143d7ea9ee3e622bb1148563 | nlindmark/garage_controller | /src/main.cpp | C++ | cpp | 4,390 | no_license |
#include <Arduino.h>
#include "OTA.h"
#include "credentials.h"
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include "Garage.h"
#include <Ticker.h>
extern "C" {
#include "user_interface.h"
}
#define CODE_VERSION "V1.1"
// FORWARD DECLARATIONS
bool setup_wifi();
void tack();
void doorstateEventListener();
vo... |
a69bae28cf8297bd9bcd81bbcd0b7b75e7ddff39 | c0e57f151f9df813d5960e80aca64e4a779972e3 | imcooder/public | /XRTFFormat.cpp | C++ | cpp | 7,792 | no_license | /********************************************************************
Copyright (c) 2002-2003 汉王科技有限公司. 版权所有.
文件名称: XRTFFormat.cpp
文件内容: 制作简单RTF格式
版本历史: 1.0
作者: xuejuntao xuejuntao@hanwang.com.cn 2008/06/31
*********************************************************************/
#include "StdAfx.h"
#incl... |
957f2a319736c2a53204f66d6ee4d8b320161811 | 4b9f1a345c3198953d54eca97115e9d9825b9559 | ytongxue/FFmpegPlayer | /video/ffmpegdecoder.cpp | C++ | cpp | 22,485 | permissive | #include "ffmpegdecoder.h"
#include <limits.h>
#include <stdint.h>
#include "makeguard.h"
#include "interlockedadd.h"
#include <boost/chrono.hpp>
#include <utility>
#include <algorithm>
#include <boost/log/trivial.hpp>
#define USE_HWACCEL
// http://stackoverflow.com/questions/34602561
#ifdef USE_HWACCEL
#include ... |
a82324d80763fa6c7b3d88423a08c939575a2a96 | ae16b71894f995850128cf2ba3cb05b1079228f6 | YoonSung/MUDGAME_REFACTOR | /ZombieMudGame/ZombieMudGame/GameMap.cpp | C++ | cpp | 629 | no_license | #include "stdafx.h"
#include "GameMap.h"
CGameMap* g_GameMap = nullptr;
CGameMap::CGameMap(void)
{
memset(m_MapInfo, 0, sizeof(m_MapInfo));
//ZERO_MEMORY(m_MapInfo, sizeof(m_MapInfo);
}
CGameMap::~CGameMap(void)
{
ClearMap();
}
void CGameMap::ClearMap()
{
for ( int i = 0; i < MAP_SIZE; ++i )
{
for ( int j = ... |
c4e252bf05a92379c6f40e0fce1dbf5ca4f5c801 | 946cf101cafb67d3fc96bccf93b0ec48074e9878 | dpetek/algorithms | /TopCoder/MinimumLiars.cpp | C++ | cpp | 5,410 | no_license | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cctype>
#include <cmath>
#define pb push_back
#define fs first
#define sc second
#define forea... |
91c505c7c705eb3ca23ddfdc8aa060daed6a848b | 2dd627e23490514a7e3497f44f79cd011112b9ea | martin-galajda/neural-networks-mnist | /data/MNISTParser.cpp | C++ | cpp | 3,054 | no_license | //
// Created by Martin Galajda on 28/10/2018.
//
#include "MNISTParser.h"
#include <map>
void CSVRow::readNextRow(std::istream& str)
{
std::string line;
std::getline(str, line);
std::stringstream lineStream(line);
std::string cell;
rowCells.clear();
while(std::getline(line... |
96f8f118fe84d0fe91b285673f8031e71c520c7a | 20bc890e0f2728252185696cccebb62d652bf400 | yyzs/OnlineJudgeCode | /HDOJ/hdu/hdu/1231.cpp | C++ | cpp | 1,070 | no_license | #include "stdio.h"
#include "string.h"
#define MIN -10000000
int dp[10010];
int a[10010];
int ma(int a,int b)
{
return a>b?a:b;
}
int main()
{int end;
int k;
int i;
int max;
int ans;
int ok;
while(scanf("%d",&k)==1&&k)
{ok=0;
for(i=0;i<k;i++)
{scanf("%d",&a[i]);
if(a[i]>=0)
ok=... |
54635fe40bbbb0b14ca7a85de57db38dba63b538 | b07ef4112bad0875ae1c344aa8a6f21905082b11 | yhzhm/Practice | /OJ/OpenJudge/1.8 二维数组/1.8-04 错误探测 2.cpp | C++ | cpp | 725 | no_license | //
// Created by Hz Yang on 2017/5/6.
//用两个一维数组分别记录行和列的和
#include <iostream>
using namespace std;
int main() {
int n, x = 0, y = 0, countX = 0, countY = 0, a[105][105], h[105], v[105];
cin >> n;
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
cin >> a[i][j];
h... |
833f481e48a7450904148fd1f720b00ffd4a87a0 | cc42ff40f89a74a6fb0ae7ee8c524d21ce2431ea | keep-network/SPDZ-2 | /Processor/Input.cpp | C++ | cpp | 2,085 | permissive | // (C) 2016 University of Bristol. See License.txt
/*
* Input.cpp
*
*/
#include "Input.h"
#include "Processor.h"
template<class T>
Input<T>::Input(Processor& proc, MAC_Check<T>& mc) :
proc(proc), MC(mc), shares(proc.P.num_players()), values_input(0)
{
buffer.setup(&proc.private_input, -1, "private inp... |
eed6321af146c18828c97982d13ef6f675cfdf91 | 8dcb75d01341718f62ff232933f0e1d789b5e134 | talhaibnaziz/projects | /Contest Programming/Codes/Codechef/CHEFAPAR.cpp | C++ | cpp | 509 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int cases, t=0;
scanf("%d", &cases);
while(t++<cases)
{
int n, ans = 0;
bool due = 0;
scanf("%d", &n);
for(int i=0; i<n; i++)
{
bool fee;
cin>>fee;
if(!... |
dd73f249a8717683129c8fb5117f6ca199c145e1 | e767e0f07b6e5b3cd2077270180753fa55a6dabb | someoneAlready/Summer-Code | /Codeforces/CF#198#1/D.cpp | C++ | cpp | 1,228 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <stack>
using namespace std;
typedef vector<int> vi;
typedef... |
0abf85789bc25cc9347e6c45c7f8812dfce2231a | 5de194c5fd53c6a4e1b733030f195a99b827a0ee | Csineneo/Vivaldi | /chromium/chrome/browser/chromeos/arc/file_system_watcher/arc_file_system_watcher_service.cc | C++ | cc | 19,019 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/arc/file_system_watcher/arc_file_system_watcher_service.h"
#include <string.h>
#include <algorithm>
#include <map>
#in... |
d6761aad23b0ea22018cd37db3684c93b2dc8294 | 802180b7490a9fc6a24eefb30ee7d3b5ae910bbe | yang123vc/maiken | /cpp.cpp | C++ | cpp | 2,180 | permissive | /**
Copyright (c) 2013, Philip Deegan.
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 conditions and the follow... |
4559ec22496d7859304f13af55ed746a395224fa | 5ecbed5b2b48874a7c5bc0c97358f305696ebd5d | andesengineering/vsg | /src/vsg/commands/CopyAndReleaseBufferDataCommand.cpp | C++ | cpp | 1,810 | permissive | /* <editor-fold desc="MIT License">
Copyright(c) 2018 Robert Osfield
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod... |
7429def667b3281dee4e7f4c22d0bdaee5186942 | 33b349c2bf3b29f3a9d2113449101635137b2164 | PatrykPogoda/szkolenie | /Lec_6/main.cpp | C++ | cpp | 638 | no_license | #include <iostream>
#include "Ulamek.h"
using namespace std;
int main()
{
Ulamek ob_1(1,2), ob_2(1,3), ob_3(0,0);
ob_3 = ob_1+ob_2;
cout<<"licznik: "<<ob_3.licznik<<" i mianownik: "<<ob_3.mianownik<<endl;
/*
Ulamek ulamek_1(1,2), ulamek_2(1,3);
ob_2 = ob_1.dodawanie(ulamek_2);
cout<<"lic... |
c17ecfe9cc3234dd4c4f4f4ba1692dd2744deeca | 807880fd4fd7ac536f05f138cb087dfb4a61fff8 | dkhaldi/llvm | /clang/lib/CodeGen/CodeGenAction.cpp | C++ | cpp | 47,230 | permissive | //===--- CodeGenAction.cpp - LLVM Code Generation Frontend Action ---------===//
//
// 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
//
//===---------------------------... |
deb88bac63d3b29515488cf7dfd23eef0a3f066c | 6f1f4050fce200db1c3ec422190796a1fe76cdc7 | bongzilla/PiCoin | /src/irc.cpp | C++ | cpp | 10,518 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "irc.h"
#include "net.h"
#... |
29366ff3b73b6545e5fcd89b47f25a9ae20aacc1 | bc628ac1b4059551589579fbcd6ca4964ea986b5 | uvbs/wx2Server | /Server/Server/Scene/Scan/ScanOperator_Enemy.cpp | C++ | cpp | 1,518 | no_license |
#include "stdafx.h"
#include "ScanOperator_Enemy.h"
#include "Obj_Character.h"
#include "Obj_Monster.h"
#include "AI_Monster.h"
ScanOperator_Enemy::ScanOperator_Enemy( )
{
}
ScanOperator_Enemy::~ScanOperator_Enemy( )
{
}
BOOL ScanOperator_Enemy::Init( SCANOPERATOR_ENEMY_INIT* pInit )
{
__ENTER_FU... |
046b3a989fb5b99cff0e951e069683494de12867 | d8616b26e5d2ffc82f6b47cf7929d5525ba9f38f | SelyanKab/chromium | /services/tracing/perfetto/system_perfetto_unittest.cc | C++ | cc | 42,941 | 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 <cerrno>
#include <cstdlib>
#include <memory>
#include <string>
#include <thread>
#include <utility>
#include "base/bind.h"
#include "base/files... |
2fb0eeae40b82695e479134fe1e4a77f1679f91d | bacacf5952053dd1c61d544cfc22ac42ee520cdd | ototsuyume/poj-solution | /2551.cpp | C++ | cpp | 250 | no_license | #include<iostream>
using namespace std;
int main(){
int n;
while(cin>>n){
int ans=1,cur=1;
while(cur){
cur=cur*10+1;
ans++;
cur%=n;
}
cout<<ans<<endl;
}
return 0;
}
|
db47e79272f7b70975c99fe980e776e8f2ea0277 | fdd98e074ed61c75f3076c3104f896e57294bf0f | Dekoze/raiblocks | /rai/node/wallet.cpp | C++ | cpp | 45,874 | permissive | #include <rai/node/wallet.hpp>
#include <rai/lib/interface.h>
#include <rai/node/node.hpp>
#include <rai/node/xorshift.hpp>
#include <argon2.h>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <future>
#include <ed25519-donna/ed25519.h>
rai::uint256_union rai::walle... |
318a86d913ac1558fad3f4c8b6f60fe927ff7a5c | 058d152166b939247ce536d3bbe70a1c161aeaf3 | ric2b/Vivaldi-browser | /chromium/chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc | C++ | cc | 2,571 | permissive | // Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h"
#include "ash/components/arc/session/arc_bridge_service.h"
#include "ash/components/arc/session/arc_serv... |
a2954c717709aa8e722347ce379ee5bedbf5d48a | 85d1884066712740be47250a7e9df72f65b4b6c1 | MrinmoiHossain/Dev-Skill | /DCP-166-POSSystem.cpp | C++ | cpp | 552 | permissive | #include <bits/stdc++.h>
#define LL long long int
#define read() freopen("input.txt", "r", stdin)
#define write() freopen("output.txt", "w", stdout)
using namespace std;
int main(void)
{
int T;
cin >> T;
for(int i = 1; i <= T; i++){
int n;
cin >> n;
double p, total = 0.0;
... |
b61d4d9bd2c23f7ada3ac2ef5724c9a95ffa2133 | 4f8fb967f671e31a02241fd4b43874795dc7f08c | MateiBirjovanu25/Activity-management-app | /Activity manager/backup/domain.cpp | C++ | cpp | 571 | no_license | #include "domain.h"
string Activitate::getTitlu() const
{
return titlu;
}
string Activitate::getDescriere() const
{
return descriere;
}
string Activitate::getTip () const
{
return tip;
}
int Activitate::getDurata() const
{
return durata;
}
void Activitate::setTitlu(const string titlu2)
{
this->titlu = tit... |
31769a789402ae448019de3362af5fd2890ed119 | 42af974b6794a87b0a193cd6a5972eb8cac700ba | samirharry/Programacion-Competitiva | /Codeforces/584A.cpp | C++ | cpp | 416 | no_license | #include <bits/stdc++.h>
#define debug(x) cout << #x << " => " << x << endl;
#define debugArray(x, n) \
for (ll i = 0; i < n; i++) \
cout << #x << "[" << i << " => " << x[i] << endl;
using namespace std;
typedef long long ll;
int main()
{
int n, t;
cin>>n>>t;
if(n==1 && t == 10) cout<<-1<<e... |
28f50d6cf08f3709e22b4f9e9da4d94b46c28ba5 | 0cf792f84cee26ae2fcb9d08d8236249a49607bf | bazelhpc/oneDAL | /samples/daal/cpp/mpi/sources/covariance_csr_distributed_mpi.cpp | C++ | cpp | 4,779 | permissive | /* file: covariance_csr_distributed_mpi.cpp */
/*******************************************************************************
* Copyright 2017-2020 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 ... |
c45ba893287ca7a1ed7d43a21658326f1cf489c4 | 1e59f7628795115239742f9fa51aef64d4c8f3c6 | fwsGonzo/IncludeOS | /test/net/unit/http_mime_types_test.cpp | C++ | cpp | 526 | permissive |
#include <common.cxx>
#include <net/http/mime_types.hpp>
CASE("ext_to_mime_type() returns MIME type for specific extension")
{
EXPECT(http::ext_to_mime_type("html") == "text/html");
EXPECT(http::ext_to_mime_type("txt") == "text/plain");
EXPECT(http::ext_to_mime_type("bin") == "application/octet-stream");
}
CAS... |
3e19ce7b622f25ce2155d9c150354891dbfb7c30 | e287b3adf61a56d6e312abd4f83c7c54b99ce332 | xavierm02/PROG1-projet-3 | /src-OLD-OLD/vector.hpp | C++ | hpp | 2,009 | no_license | /**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be us... |
376405c66570ad6f2b49684aa4fcc315e2e48e7b | ee5667991d813772e5f5ea9ead4b17181b85a8be | PDi-Communication-Systems-Inc/lollipop_external_chromium_org | /third_party/webrtc/modules/audio_device/android/fine_audio_buffer.cc | C++ | cc | 3,448 | permissive | /*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
010dae3b31de3814ea39455f0cd375aaa211bb85 | 534605a0d3cc8de8d997505baaaec4e5bca3092b | rva5120/MaximizingXOR | /MaximizingXOR/main.cpp | C++ | cpp | 912 | no_license | //
// main.cpp
// MaximizingXOR
//
// Created by Raquel Alvarez on 12/31/14.
// Copyright (c) 2014 R. All rights reserved.
//
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <cstdio>
#include <limits>
#incl... |
de24c63da7acaced0098430cc7cd14d62ab16611 | 89d9240ba0faa9c8493a9706f0b74282fe3b752b | wanghui0720/webkit | /Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp | C++ | cpp | 14,020 | no_license | /*
* Copyright (C) 2017 Apple 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions ... |
db654004395c3364fed9a57abbd54555a984a1e2 | 646635a09ea82c109246e69fa8f6006209cfeaf1 | MansiSMore/Array | /In_First_But_not_in_Second.cpp | C++ | cpp | 2,428 | no_license | /*
Given two arrays A and B contains integers of size N and M, the task is to find numbers which are present in the first array, but not present in the second array.
Example 1:
Input: N = 6, M = 5
A[] = {1, 2, 3, 4, 5, 10}
B[] = {2, 3, 1, 0, 5}
Output: 4 10
Explanation: 4 and 10 are present in
first array, but not i... |
2e6c438e5333d9661b90a4b35425545d76797597 | e07ed7f967ba479d19fcee96058053dbd1b65ca8 | MENGJIANGTAO/GameServer-2 | /public/mongo_db/MongoDataMap.cpp | C++ | cpp | 3,117 | no_license | /*
* MongoDataMap.cpp
*
* Created on: 2013-07-19 14:13
* Author: lyz
*/
#include "MongoDataMap.h"
#include "MongoData.h"
#include "PoolMonitor.h"
#include <mongo/client/dbclient.h>
void MongoDataMap::reset(void)
{
for (DataMap::iterator iter = this->data_map_.begin(); iter != this->data_map_.end(); ++ite... |
43beb77788cf9b1e806b0e1beb6e1d72c0a826dc | 01553772d839c1b11081377a3d4d6062a74fb569 | CrazyIEEE/algorithm | /算法竞赛入门经典/第5章/安迪的第一个字典_UVa10815.cpp | C++ | cpp | 867 | no_license | #include "iostream"
#include "set"
#include "string"
#include "cctype"
#include "sstream"
int main()
{
std::set<std::string> dict{};
std::string temp = "";
while (std::cin >> temp && !std::cin.eof())
{
for (std::string::iterator it = temp.begin(); it != temp.end(); it++)
{
if... |
fd917736eebb9922c54bf3563f6c90b30058a375 | 74c07afd9fee03c342d184e6c6cb2361bcc74db3 | glcj/plc4x | /sandbox/plc4cpp/protocols/driver-bases/base/src/main/cpp/org/apache/plc4x/cpp/base/messages/PlcWriter.cpp | C++ | cpp | 998 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
2dbaa89d6f4bae0b6d52f4cff395d0395d2cd259 | fbab20e8966f560c473b83e4670c853cd8d690d5 | Agile2018/AipuAPI | /AipuAPI/ConfigurationIFace.cpp | C++ | cpp | 2,246 | no_license | #include "ConfigurationIFace.h"
ConfigurationIFace::ConfigurationIFace()
{
ObserverError();
}
ConfigurationIFace::~ConfigurationIFace()
{
}
void ConfigurationIFace::ObserverError() {
auto observerError = error->observableError.map([](Either* either) {
return either;
});
auto subscriptionError = observerError.... |
02b472c35024c191934da5758e071773059837ae | 48dd2713880b4a916f172ec26cc86808452f8e07 | wangyizhou33/opengl-tutorials | /tutorial12_extensions/tutorial12.cpp | C++ | cpp | 13,540 | no_license | // Include standard headers
#include <stdio.h>
#include <stdlib.h>
#include <vector>
// Include GLEW
#include <GL/glew.h>
// Include GLFW
#include <glfw3.h>
GLFWwindow* window;
// Include GLM
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
using namespace glm;
#include <common/shader... |
41884b87cac053b415154e4fb61d891b002ff119 | 51665bbe9312ffb3e4f69ae21bf99e3105fa9a69 | kwon212/Zoph_RNN | /src/Hidden_To_Hidden_Layer.hpp | C++ | hpp | 28,283 | no_license |
template<typename dType>
void Hidden_To_Hidden_Layer<dType>::init_Hidden_To_Hidden_Layer_GPU(int LSTM_size,int minibatch_size,
int longest_sent,bool debug_temp,dType learning_rate,bool clip_gradients,dType norm_clip,
struct neuralMT_model<precision> *model,int seed)
{
cudaSetDevice(hh_layer_info.device_number)... |
51f4b5e36c59e4225bed39d1c8f50f570cc2173e | 22fba2a33def102459f2bae354e2ed3a7200ea15 | Vineethkumaar/Coding | /1446. Consecutive Characters-LeetCode.cpp | C++ | cpp | 532 | no_license | class Solution {
public:
int maxPower(string s) {
int temp=1,res=0;
for(int i=0; i<s.size()-1 ; i++)
{
if(i<s.size()-1 && s[i]==s[i+1] )
temp++;
else
{
if(temp>=res)
r... |
1e6d4672df2282091651446e93ba4f01d0265e49 | ef93f991dabdf961a3dc5dd301e5d309c872ad76 | jvesely/mesa | /src/amd/compiler/tests/test_regalloc.cpp | C++ | cpp | 2,785 | no_license | /*
* Copyright © 2020 Valve Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, pub... |
2e85d9d9c217a2a88a72715d4e37f0aaaa78b18d | bc3e6f1d05aae68ac7bc3f06f10fa4a3d7bbdf2f | yanpf/OpendTect | /src/visBase/vishorizonsectiontileglue.cc | C++ | cc | 6,354 | no_license | #include "vishorizonsectiontileglue.h"
#include "vishorizonsectiontile.h"
#include "vishorizonsection.h"
#include "vishorizonsectiondef.h"
#include "vishortileresolutiondata.h"
#include "viscoord.h"
#include "visosg.h"
#include <osg/PrimitiveSet>
#include <osg/Geometry>
#include <osg/Geode>
using namespace visBase;
... |
bf09c711c90ce9e447b42231f2ebf0eaa4b33018 | 1757baac10d759fa0af47529a32a03d711efb636 | mba-mba/HacktoberFest2020-1 | /Hash table and hashing/hashing approach for finding two intigers of given sum.cpp | C++ | cpp | 1,501 | no_license |
//problems
//you're building a feature for choosing two movies whose total runtimes will equal the exact flight length.
//Write a function that takes an integer flightLength (in minutes) and a vector of integers movieLengths (in minutes) and returns a boolean indicating whether there are two numbers in movieLengths... |
23f6171ad66f274eeb40292bb9050afb64d67976 | 8ed2c2372859b5080a565e0b00e51978c6f00e8a | NoSilentWonder/Seasons | /Source/States/Winter.cpp | C++ | cpp | 13,983 | no_license | /*
Created Elinor Townsend 2011
*/
/*
Name Winter
Brief Definition of Winter Class inherited from State
*/
#include <vector>
#include "States/Winter.hpp"
#include "States/Spring.hpp"
#include "Scene/Scene.hpp"
#include "Shaders/TerrainShader.hpp"
#include "Shaders/SkyMapShader.hpp"
#include "ParticleSystem/... |
f91b41c7696c30c79e4b6c89605e7fb3b3a8050e | 317314a5238fb96646800b9cf11c2429f41d45cf | manulera/LeraRamirez2019 | /code/cytosim/src/tools/reader.cc | C++ | cc | 4,621 | no_license | // Cytosim was created by Francois Nedelec. Copyright 2007-2017 EMBL.
/*
This is mostly a test for the class defined in frame_reader.h
but it can be used to navigate from frame to frame in a object-file
*/
#include <cstring>
#include <cctype>
#include <cstdlib>
#include "glossary.h"
#include "messages.h"
#include "... |
78507222df787ee9caa15156911f1e2696e7a3ab | afc7d97b3df85c726c1036eca4c47b9d326df58f | sdslabs/Rubeus | /RubeusCore/Source/GraphicComponents/renderable_object.cpp | C++ | cpp | 799 | permissive | /**
* @file Source/renderable_object.cpp.
*
* @brief Implements the renderable object class
*/
#include <renderable_object.h>
namespace Rubeus
{
namespace GraphicComponents
{
RRenderableObject::RRenderableObject(RML::Vector3D * position, RML::Vector2D * size, RML::Vector4D * color)
:m_Position(position), ... |
a101a052b50a5b1b722f2bee84d3feab41f3b71d | 5b8644303436451a5803ad06ca722cced2e83bfc | xis19/leetcode | /35.cpp | C++ | cpp | 458 | no_license | #include <vector>
int searchInsert(std::vector<int>& nums, int target) {
const int LEN = nums.size();
if (LEN == 0) {
return 0;
}
int hi = LEN, lo = 0, mid = (lo + (hi - lo) / 2);
while(lo < hi) {
if (nums[mid] > target) {
hi = mid;
} else if (nums[mid] < target... |
63650364ced5023e3f1814de73df949959f2dde2 | 3ac5b87f8acd65f3d1e0e89e351585d9216471e9 | farzingkh/Firmware | /src/modules/uORB/uORBDevices.hpp | C++ | hpp | 11,019 | permissive | /****************************************************************************
*
* Copyright (c) 2012-2016 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Red... |
835e2f87e9d8d0823f20a597fa8e7518c587598b | aede9ca92b74dd9eafccde9f9f6ade9889a97e7a | thanhhung20078/Baitaptuan2 | /Baitap/Bai 3.cpp | C++ | cpp | 413 | no_license | #include<iostream>
#include<cmath>
using namespace std;
int main()
{
int x,y,z;
cout<<"Nhap x: "<<endl;
cin>>x;
cout<<"Nhap y: "<<endl;
cin>>y;
cout<<"Nhap z: "<<endl;
cin>>z;
if(x+y>z)
{
cout<<"3 so tren la do dai cac canh cua mot tam giac.";
}
else
{
... |
9282cc50c7e12edc1892a62d502652df908cf8f2 | 51d501a08b80e721ad644b0031e411f09601149f | bopopescu/QuicDep | /src/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc | C++ | cc | 13,451 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.h"
#include <vector>
#include "base/android/jni_string.h"
#include... |
a7eb8c11594788f7038d74ce6c6041dfb0dd98f0 | ec58284ae78da5bf96892ce3f2f4bbf6c67248be | JacobAYoung/cs5201 | /Homework3/main.cpp | C++ | cpp | 2,841 | no_license | ///Author: Jake Young
///Date: 2-29-2019
///PRE: None
/// POST: This main function will declare a MyVector class object and
/// LinearIndependent object that will do some vector math and check if the
/// matrix is linear independent or not
#include <iostream>
#include <fstream>
#include "MyVector.h"
#include "LinearIn... |
8a40e6a51324508cec07d1dba5c971ca3f713c09 | 369afbaf971b46b59d6087fda762fe95cf592e24 | IStep95/fer-seminar | /src/odometry/src/turtle.cpp | C++ | cpp | 8,028 | no_license | /*
* Copyright (c) 2009, Willow Garage, 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 l... |
8137fc6fc78d15c520db4b58209019c810757f4b | 82a56c3d2674837462f076037e5e1c204f12dccd | brettpac/SMACC2 | /smacc_sm_reference_library/sm_dance_bot/include/sm_dance_bot/states/f_pattern_states/sti_fpattern_forward_2.hpp | C++ | hpp | 1,352 | permissive | // Copyright 2021 RobosoftAI 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... |
1370f4d1c4d1b9ca9054d247ee7bfeb6216263a5 | fdf065d14621c62ff044a19590f236f57945cc6f | yuhongjiu8888/my_back-end_review | /codeing/algorithm/QuickSort.cpp | C++ | cpp | 1,159 | no_license | #include <iostream>
using namespace std;
/*快速排序*/
/**
*快速排序算法一种最常见的排序算法,其核心思想就是 分治 ,具体的:
(1) 选定一个基准数;
(2) 分区,将所有大于基准数的数据分为一区,将所有小于等于基准数的数据分为一区;
(3) 递归,对上述分区重复(1)(2),直到每个分区只有一个数。
* **/
void swap(int *p,int *q )
{
int temp;
temp = *p;
*p = *q;
*q = temp;
}
int postion(int arr[],int low,int high)
{
int i = l... |
b383bbd0ad1dd31ae67e2a96c0b78510bb688632 | f6f356f1d265d0e9fba8341de2c6bdad96a0ea61 | pranavkantgaur/MyDocs | /AnuVi_Poisson_recontruct/test_code/AnuviPoisson3DFilter.cxx | C++ | cxx | 9,085 | no_license | #include "AnuviPoisson3DFilter.h"
#include <map>
#include <CGAL/Cgal_Utility.h>
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkPolyData.h"
#include "vtkFloatArray.h"
#include "vtkCellArray.h"
#include "vtkUnstructur... |
91e0caeab5f94fbaac3a76c700fd6c389ce9f5a6 | 89562efa2df3c93bfd231048d459ee0545062e38 | WhiZTiM/coliru | /Archive2/31/32ba8617fc3a79/main.cpp | C++ | cpp | 1,077 | no_license | #define requires(...)
#define Domain(T) typename DomainT<T>::type
template <typename T1, typename T2>
struct pair {
pair(T1 f, T2 s) : first(f), second(s) {}
T1 first;
T2 second;
};
struct mult_t {
int operator()(int a, int b) { return a * b; }
};
#include <type_traits>
template <typename T, typename = void... |
c9d2249a20b91b26cbdd520f6ead18c497c491d9 | fabcdca964e0652f1945569fe14d5df4cf77b027 | stupidsing/CrimsonEditor | /registry.cpp | C++ | cpp | 3,579 | no_license | #include "stdafx.h"
#include "registry.h"
BOOL GetRegKeyValue(HKEY hRoot, LPCTSTR lpszRegPath, LPCTSTR lpszValName, TCHAR * lpData, DWORD dwSize)
{
DWORD dwType; HKEY hKey;
if( RegOpenKeyEx(hRoot, lpszRegPath, 0, KEY_QUERY_VALUE, & hKey) != ERROR_SUCCESS ) return FALSE;
if( RegQueryValueEx(hKey, lpszValNam... |
19c990b2c1aa2bbd7902733793c35f0b80603eb3 | 62f6fee37381d84b30f85a0375ed3abc0c08306e | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE191_Integer_Underflow/s03/CWE191_Integer_Underflow__short_min_multiply_81_goodB2G.cpp | C++ | cpp | 1,378 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__short_min_multiply_81_goodB2G.cpp
Label Definition File: CWE191_Integer_Underflow.label.xml
Template File: sources-sinks-81_goodB2G.tmpl.cpp
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: min Set data to the min value for... |
37e8c39eb15da2e8b441feb40eff2d1eba10cdf5 | 89678ced8b7ab50e0c8defc785f53a693cbaba0a | Cazaimi/geeksforgeeks | /AyushkaAlgo/DP/03_0to1Knapsack.cpp | C++ | cpp | 2,105 | no_license | /*0 - 1 Knapsack Problem
You are given weights and values of N items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Note that we have only one quantity of each item, In other words, given two integer arrays val[0..N-1] and wt[0..N-1] which represent values and weights assoc... |
b9a74cf1f4092e2f99627c54b7344eb245835ca5 | ec407d96b17b1c5e06723daadb36225794a2f29e | jhyunleehi/poseidonos | /test/unit-tests/journal_manager/log_buffer/journal_log_buffer_test.cpp | C++ | cpp | 761 | permissive | #include "src/journal_manager/log_buffer/journal_log_buffer.h"
#include <gtest/gtest.h>
namespace pos
{
TEST(JournalLogBuffer, JournalLogBuffer_)
{
}
TEST(JournalLogBuffer, Init_)
{
}
TEST(JournalLogBuffer, Dispose_)
{
}
TEST(JournalLogBuffer, ReadLogBuffer_)
{
}
TEST(JournalLogBuffer, AsyncIO_)
{
}
TEST(Journal... |
35515aa31526f71466851adc53aa931607bbfced | a2f53566b89cce961851a83173fced4a6a7eadb1 | a-ahmed/SCUM_SDK | /SDK/SCUM_MA1_Spitfire_01_classes.hpp | C++ | hpp | 627 | no_license | #pragma once
// SCUM (Dumped by Hinnie) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass MA1_Spitfire_01... |
e6b597ff2dc7aac78e22778e7165ca5e51b114fa | 3edfd7c4485087fb9c01afcf10d55361a51f5c5b | Jacob-Zackaria/Game-Engine | /MS3/src/GameObject/GameObjectManager.cpp | C++ | cpp | 5,347 | no_license | //----------------------------------------------------------------------------
// Copyright 2020, Ed Keenan, all rights reserved.
//----------------------------------------------------------------------------
#include "NullModel.h"
#include "GraphicsObject_Null.h"
#include "GraphicsObject_FlatTexture.h"
#includ... |
a375cd5dc68c60c9e806aac3ac8beaac0950141b | a47f234548074e89292d6f0755478835b4aba023 | WolfireGames/overgrowth | /Projects/bullet3-2.89/examples/ThirdPartyLibs/Gwen/Platforms/Null.cpp | C++ | cpp | 1,241 | permissive | /*
GWEN
Copyright (c) 2011 Facepunch Studios
See license in Gwen.h
*/
#include "Gwen/Macros.h"
#include "Gwen/Platform.h"
#ifndef _WIN32
#include <time.h>
static Gwen::UnicodeString gs_ClipboardEmulator;
void Gwen::Platform::SetCursor(unsigned char iCursor)
{
// No platform independent way to do this
}
Gwen::... |
c04acbbdf41c379ea791beb9e52797547c9f654f | c3010027b80dbd8f9b0aef941722d52467a17711 | wwwwodddd/Zukunft | /atcoder/abc214_c_.cpp | C++ | cpp | 596 | no_license | #include <bits/stdc++.h>
using namespace std;
int n;
int s[200020];
int t[200020];
set<pair<int, int> > a;
int main()
{
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> s[i];
}
for (int i = 0; i < n; i++)
{
cin >> t[i];
a.insert(make_pair(t[i], i));
}
while (a.size() > 0)
{
int i = a.begin()->second;
a... |
28a081016b6b35a746a47323c354034b22ce4d2b | 2da9c2d50b103c85fd627b683a3f34e2157caa6b | Prithvirajbilla/AlgorithmCoding | /codechef/feb17/MFREQ.cpp | C++ | cpp | 1,407 | no_license | #include <bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
int binary_search(vector<pair<int,pair<int,int> > > occ, int k) {
int a = 0,b = occ.size()-1;
while (a <= b){
int m = (a+b)/2;
if(k <= occ[m].first)
{
b = m-1;
}
else {
a = m+1;
}
}
return a - 1 < 0 ? -1 : a - 1;
}
int A[100... |
b89c7055c833dcfb402a6f2323fa7c134fa4c993 | 3b71badff5b358fc4d8e6d3bac199d318bb71e33 | aoyandong/algorithms | /algorithms/no_tags_yet/longest_repeating_character_replacement.cpp | C++ | cpp | 636 | no_license | class Solution {
public:
int characterReplacement(string s, int k) {
int n=s.length();
vector<int> count(26,0);
int max_len=0, begin=0, max_counts=0;
for (int end=0; end<n; end++){
count[s[end]-'A']++;
if (max_counts<count[s[end]-'A']) max_counts = co... |
47be7aed835e22d36c021d2eda6f9a65c56e1bcd | 787fb1e3a2822c21618b90a6991835ec9788dea9 | kanikel/Leetcode | /67. Add Binary/solution2.cpp | C++ | cpp | 408 | no_license | class Solution {
public:
string addBinary(string a, string b) {
string result = "";
int c = 0;
int i = a.length()-1;
int j = b.length()-1;
while (i >= 0 || j >= 0 || c == 1){
c += i>=0 ? a[i--]-'0' : 0;
c += j>=0 ? b[j--]-'0' : 0;
result = ... |
49b4b9bd1bdc25cd44304a7933c299dc7da10d19 | 5f5cb297500383e6dbdd2a25394e060419583232 | codeworm96/seastar | /tests/lowres_clock_test.cc | C++ | cc | 4,048 | permissive | /*
* This file is open source software, licensed to you under the terms
* of the Apache License, Version 2.0 (the "License"). See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. You may not use this file except in compliance with the License.
*
* You may ... |
3a7277e052f8fdd23afe96c4ddebec8cbd4979f3 | 8159633f514eace2ab44acb60133b7389faabd4f | Superjomn/Paddle | /paddle/fluid/inference/tests/api/analyzer_ernie_tester.cc | C++ | cc | 6,277 | permissive | // Copyright (c) 2019 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... |
c2f8d943f81af4b9759d49a1bc357dcac508f296 | e3e9f7fb37170cc0366a036fb1a270085e8aade9 | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/boost/function_types/detail/components_impl/master.hpp | C++ | hpp | 1,826 | permissive |
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
// no include guards, this file is intended for multiple in... |
13ef9c615eda12f4005505bc908f8c595243f872 | 5da08d4b53cf1e9d09a2a0e69f361fc4b87a03a4 | liang0/llvm-project | /libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp | C++ | cpp | 10,570 | permissive | //===----------------------------------------------------------------------===//
//
// 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
//
//===---------------------------... |
f3b82d4ab0f56ced1e80813bc489e2d57f2d9356 | f2410449da754aaac412e71b5fe44c87252332ca | lzr1900/keyhotee | /AddressBook/ContactView.cpp | C++ | cpp | 19,096 | no_license | #include "ContactView.hpp"
#include "ui_ContactView.h"
#include "AddressBookModel.hpp"
#include "public_key_address.hpp"
#include <KeyhoteeMainWindow.hpp>
#include <bts/application.hpp>
#include <bts/address.hpp>
#include <fc/thread/thread.hpp>
#include <fc/log/logger.hpp>
#include <QtWebKitWidgets/QWebFrame>
#inclu... |
5d57314c7ac80c06d2a6ff04686196832535ef37 | f60e44a14f675f6e9d2591bdbc7d3ae0cd47aa38 | shawnanastasio/botan | /src/tests/unit_tls.cpp | C++ | cpp | 39,166 | permissive | /*
* (C) 2014,2015,2018 Jack Lloyd
* 2016 Matthias Gierlings
* 2017 René Korthaus, Rohde & Schwarz Cybersecurity
* 2017 Harry Reimann, Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include "tests.h"
#include <vector>
#include <memory>
#if define... |
522d81eea34dc6237425dcfc98f20e72ad6fbe98 | 698b05e1490bfb3ace5f15a23d3defe91fb67bbd | KostaPapa/DataStructures-Algorithms | /EXERCISE/28) Lecture10Wrappers&Adapters.cpp | C++ | cpp | 385 | no_license | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
template<class Object>
class Stack{
public:
Stack();
const Object& top() const;
bool empty() const;
int size();
void pop();
void push(Object& x);
private:
vector<Object> theArray;
int topOfStack;
};
int main... |
bf1f8db3cdc631d6db6dab352a0114893f95f514 | 992cf467c70ec2fc15b46cde1dbe7b0d460b0d22 | marco-c/gecko-dev-wordified | /third_party/libwebrtc/pc/jitter_buffer_delay_unittest.cc | C++ | cc | 1,494 | permissive | /
*
*
Copyright
2019
The
WebRTC
project
authors
.
All
Rights
Reserved
.
*
*
Use
of
this
source
code
is
governed
by
a
BSD
-
style
license
*
that
can
be
found
in
the
LICENSE
file
in
the
root
of
the
source
*
tree
.
An
additional
intellectual
property
rights
grant
can
be
found
*
in
the
file
PATENTS
.
All
contributing
proje... |
2e27ecabfbdd0df09979e64b3fb44fd33aea25c5 | 9d199cd868770f10e604095a1430a64c6ece3808 | litao1009/SimpleRoom | /externals/OCCTLib/inc/Handle_TColGeom_HSequenceOfBoundedCurve.hxx | C++ | hxx | 822 | no_license | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _Handle_TColGeom_HSequenceOfBoundedCurve_He... |
adcd16979e25d8c5ed8faffcfb9a8e87807ce006 | 817f568d5cb8203600765829fb057a55c1b11686 | KeplerC/mplambda | /src/mpl/demo/lambda_common.cpp | C++ | cpp | 10,021 | no_license | #include <mpl/demo/app_options.hpp>
#include <mpl/demo/se3_rigid_body_scenario.hpp>
#include <mpl/demo/fetch_scenario.hpp>
#include <mpl/prrt.hpp>
#include <mpl/comm.hpp>
#include <mpl/pcforest.hpp>
#include <mpl/option.hpp>
#include <getopt.h>
#include <optional>
namespace mpl::demo {
template <class T, class U>... |
0725c469e700cc621be0312efe7abf969d4c9dd3 | 62e9c9393fe929d5c0ac89b0d65f66cee1adda7e | R2D2-2019/temperature_sensor | /code/headers/temperature_module.hpp | C++ | hpp | 999 | no_license | #pragma once
#include <base_module.hpp>
#include <mlx90615.hpp>
namespace r2d2::temperature_sensor {
class module_c : public base_module_c {
private:
mlx90615 &mlx;
public:
module_c(base_comm_c &comm, mlx90615 &mlx)
: base_module_c(comm), mlx(mlx) {
comm.listen_for... |
50ae7ad9b973d590f51306b56db306441c0cd346 | fae986d5d0cbda511d68c73291a11f624d348d86 | Cheese-5040/Comp-2011 | /lab/pa2(11111).cpp | C++ | cpp | 24,574 | no_license | // pa2.cpp
// COMP2011 (Fall 2020)
// Assignment 2: Subtring Pattern Matching
//
// Name: Chee Seng, OW YONG
// Student ID: 20659467
// Email: csowyong@connect.ust.hk
#include <iostream>
#include <limits>
#include <assert.h>
using namespace std;
// C string termination character
const char NULL_CHAR = '\0';
// The... |
6a5b6665d5a9af2605dca3b660680b221f3aafb4 | c18b2a7c55822ac7e3e0d4498a00ae0e671bf6a9 | sio-nice/compiler | /test-DFA.cpp | C++ | cpp | 587 | no_license | #include "catch.hpp"
#include "DFA.hpp"
TEST_CASE("Simple DFA Test", "[DFA]"){
DFA<3,2> _aa_{};
_aa_.setFinal(2);
_aa_.addTransition('b', 0, 0);
_aa_.addTransition('a', 0, 1);
_aa_.addTransition('b', 1, 0);
_aa_.addTransition('a', 1, 2);
_aa_.addTransition('b', 2, 2);
_aa_.addTransition('a', 2, 2);
REQUIRE( ... |
c7e7139526affaa5fcca4599c8ccf5661feaf127 | 284368b5daa589d40de793dcb7bb3822d56a15c3 | vector-of-bool/neo-unicode | /source/neo/unicode/encodings/wide.hpp | C++ | hpp | 1,235 | no_license | #ifndef NEO_UNICODE_ENCODINGS_WIDE_HPP_INCLUDED
#define NEO_UNICODE_ENCODINGS_WIDE_HPP_INCLUDED
#include "utf8.hpp"
#ifdef _WIN32
#include "utf16.hpp"
#else
#include "utf32.hpp"
#endif
namespace neo {
inline namespace encodings {
struct wide {
#ifdef _WIN32
using underlying = utf16;
#else
using underlying ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.