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 |
|---|---|---|---|---|---|---|---|---|
10684e2399915d3fcfa455546d85e467c77170df | 300eaf976125cf4f3b249b1af76169c9f0454ef1 | nagyist/datastax.cpp-driver | /tests/src/unit/tests/test_cql_type_parser.cpp | C++ | cpp | 8,104 | permissive | /*
Copyright (c) DataStax, 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 writing, so... |
d6c88f1b05ff47c370e563dd87f6718e80ac0f73 | b2718bb77fabb9e2b7281f919aa1f8cf484cb145 | jk14/mobilecash | /src/qt/sendcoinsentry.cpp | C++ | cpp | 4,612 | permissive | // Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "sendcoinsentry.h"
#include "ui_sendcoinsentry.h"
#include "guiutil.h"
#include "bitcoinunits.h"
#include "addressbo... |
09fa6f60fcf9c544427e3693b7bc98c8f689028f | f2dc71e05460a2dcb9e9c11d86b95a75e917e6f5 | ValentinaTarapow/SistemaReservas | /cListaPersonas.cpp | C++ | cpp | 1,877 | no_license | #include "cListaPersonas.h"
cListaPersonas::cListaPersonas(int P)
{
cant = 0;
this->tam = P;
this->ListaP = new cPersona *[tam];
for (int i = 0; i < tam; i++)
{
ListaP[i] = NULL;
}
}
cListaPersonas::~cListaPersonas()
{
if (ListaP != NULL)
{
for (int i = 0; i < cant; i++)
{... |
8fcf0badaca4744e023155de74ae842621475c31 | 106454e787ede212286cc8d0acdfcc280bac476d | dipitvasdev/DipsCode | /C++/inversion_count.cpp | C++ | cpp | 1,936 | no_license | #include<bits/stdc++.h>
using namespace std;
// Helper Function to calculate the number of inversions on merging
int merge(vector<int> &arr, int start, int end){
int count = 0 ;
int i = start ;
int mid = (start + end)/2 ;
int j = mid + 1 ;
vector<int> temp ;
// compare elements and count ... |
b79a05f28e11b94c100415c72de7c81124bfd9a2 | c665ac0e89f689fb4f339f9b370b1f4ccf1868aa | joway/fbthrift | /thrift/compiler/test/fixtures/enums/gen-cpp2/module_types.cpp | C++ | cpp | 5,549 | permissive | /**
* Autogenerated by Thrift for src/module.thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "thrift/compiler/test/fixtures/enums/gen-cpp2/module_types.h"
#include "thrift/compiler/test/fixtures/enums/gen-cpp2/module_types.tcc"
#include <thrift/lib/cpp2/gen/mo... |
6a77dc9bd3b2ce4e526838b654fd169a938acd83 | 44a8e3e5c6dc5f96357d9500a10c2d93d5cb7bc3 | dangerousplay/Netflix_lss | /src/menus/relatorio.cpp | C++ | cpp | 1,521 | no_license | //
// Created by dangerous on 26/10/18.
//
#include <imgui.h>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include "relatorio.h"
#include "../db/init.h"
#include "../utils/unixTime.h"
#include "../services/relatorio.h"
#include <fstream>
#include <ostream>
void RelatorioMenu::render() {
ImGui::Beg... |
97384089a9203968dbe8087892ddb1a6cde9adc0 | 433190abfa701211e52f534f8675e2161f8ab6ba | lineCode/render_skia2 | /skia/src/effects/imagefilters/SkPaintImageFilter.cpp | C++ | cpp | 3,307 | no_license | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/effects/SkPaintImageFilter.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkPaint.h"
#include "src/core/SkImageFilter_Base.h"
#include "src/c... |
a596e5a932f8da1c3927462fa72c98d8ba7617e7 | 7e462dc5a000830a12ce5697128d92c06f859782 | chadaustin/sphere | /sphere/source/common/convolve.hpp | C++ | hpp | 915 | no_license | #ifndef CONVOLVE_HPP
#define CONVOLVE_HPP
#include "rgb.hpp"
void
int_convolve_rgba(int x, int y, int w, int h, int width, int height,
RGBA* pixels, int mask_width, int mask_height,
int mask_xoffset, int mask_yoffset, const int* mask,
int divisor, int offset, int wr... |
c855e3a036de0e2f8391fdc7d1705080943168bb | e392cc1e54a107eadddac94d460e9d49d2931772 | VitalyKononenko/chromium | /services/network/cors/preflight_controller_unittest.cc | C++ | cc | 15,426 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/network/cors/preflight_controller.h"
#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/run_loop.h"
#include ... |
43f653c76550d6b49c1c9e8f30b00bd65d342512 | adea6c196280763bf0b13b70ba4ef9405b55148f | jong-jh/Object-Cpp | /2주차 과제/HW#1_정종현.cpp | C++ | cpp | 9,951 | no_license | /*******************************************************************************************************************************/
/* HW#1 : C++ 시작하기 */
/* 작성자 : 정종현 날짜 : 2021년 3월 12일 */
/* ... |
ffe8b8ad466bf16385ccd7e1a87d62e750f285f9 | e30eeea3dce69c7331a49fc939b1d014a58adfb4 | ValeroM/OS_Simulator | /OS.cpp | C++ | cpp | 13,565 | no_license | /*
Author: Marco Valero
Course: Operating Systems
May 11th, 2019
*/
#include <iostream>
#include <string>
#include <deque>
#include <map>
#include "PCB.h"
#include "HD.h"
#include "OS.h"
#include "ManageMem.h"
// cpu by dafault is one. Processes ID's start at 2
// The enumeration of the hard disks starts with 0.
O... |
62b3c5b77b5cd8a26ce86d99f183867afcfeb7c2 | a25dce15fd1e5090a70f6509fcf21972fe476123 | osphea/zircon-rpi | /src/media/audio/drivers/codecs/tas5782/tas5782.cc | C++ | cc | 10,198 | 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 "tas5782.h"
#include <lib/device-protocol/i2c.h>
#include <algorithm>
#include <memory>
#include <ddk/binding.h>
#include <ddk/platform-defs.h>... |
01b53ed58396b9552d839a972696f104220e7740 | 2a5c7a8e4ef1109d70a382faa17698aac73220f2 | RiverHamster/OI-Works | /testpack/wen/2018.1.4/src/方天岩/bst.cpp | C++ | cpp | 292 | no_license | #include<cstdio>
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
freopen("bst.in","r",stdin);
freopen("bst.out","w",stdout);
int t,n;
cin>>t;
while (t--)
{
cin>>n;
cout<<(n&(n-1))+1<<" "<<(n|(n-1))<<endl;
}
return 0;
} |
b7a4dcc30d373c4da11ceb5bc14c82248cda7f09 | 380ecbffb45f433d9ae72ab98c4d3fb1334be671 | georgewfraser/zetasql | /zetasql/testing/type_util.cc | C++ | cc | 5,181 | permissive | //
// Copyright 2019 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 ... |
9928e1f79964e844c1942ea964f976149d1c6129 | 3980980d053f3df75290ccd5d1cd58419b4fbc5b | unidevop/sjtu-project-pipe | / sjtu-project-pipe/thirdparties/VTK.Net/src/Imaging/vtkImageSobel3DDotNet.cxx | C++ | cxx | 2,969 | permissive |
// managed includes
#include "vtkDotNetConvert.h"
#include "vtkImageSobel3DDotNet.h"
// native includes
#include "strstream"
#include "vtkImageSobel3D.h"
#include "vtkObject.h"
using namespace System;
namespace vtk {
System::String^ vtkImageSobel3D::GetClassName()
{
const char* retVal = vtk::Co... |
18ec6a1b73816e73151e1f81cee41574bd02c20c | a5a1b7375b2153e641b6f88419c9e98791c1e051 | bingyue-chen/UVA | /solved_problems/UVA_11764.cpp | C++ | cpp | 425 | no_license | #include <iostream>
using namespace std;
int main(){
int t,n,x,y,l,h;
cin >> t;
for( int i = 1 ; i <= t ; i++ ){
cin >> n;
l = h = 0;
cin >> x;
n--;
while( n-- ){
cin >> y;
if( x > y ) l++;
else if( x < y ) h++;
x... |
df1263e2c127d36f827993f79ae328577840c886 | fe7adf80f37e7ea7e32f89604dfa03742360bcd9 | nqqw/ft_containers | /.history/Map_20210522204101.hpp | C++ | hpp | 10,303 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Map.hpp :+: :+: :+: ... |
7766f8817e1ccd66c88bc1b67fe4d06299fd2de4 | 8471535d28285f4a931afe2019c2743eb3fd8405 | MKozuch/fpCalc | /testof_calculator.cpp | C++ | cpp | 300 | no_license | #include "testof_calculator.h"
void TestOf_calculator::testOf_fib()
{
int fibos[] = {0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181};
for(int i=0; i<20; ++i){
QVERIFY(this->calc.fib(i) == fibos[i]);
}
}
QTEST_MAIN(TestOf_calculator)
//#include "testof_fib.moc"
|
7d291a5b2d7d7ea9e36c28fbbed1dceeae6918a4 | 082cc24818bb84e3740f4d2281e5e1dbe9dc0061 | paandahl/tripfinger-ios | /drape_frontend/my_position.cpp | C++ | cpp | 8,264 | permissive | #include "drape_frontend/my_position.hpp"
#include "drape_frontend/color_constants.hpp"
#include "drape/depth_constants.hpp"
#include "drape/glsl_func.hpp"
#include "drape/glsl_types.hpp"
#include "drape/overlay_handle.hpp"
#include "drape/render_bucket.hpp"
#include "drape/shader_def.hpp"
#include "indexer/map_style... |
67a0710c7772f6e8ec110dddb3d3fa5892ef39e3 | 589f6778d908c0b1826cddc211d1443e3fb032d0 | FelixKimmerle/MandelbrotCPU | /Mandelbrot.cpp | C++ | cpp | 4,548 | no_license | #include "Mandelbrot.hpp"
#include <cmath>
#include <iostream>
#include <complex>
struct uchar4
{
uchar4(char r, char g, char b, char a)
{
this->r = r;
this->g = g;
this->b = b;
this->a = a;
}
char r, g, b, a;
};
uchar4 convert_one_pixel_to_rgb(float h, float s, float ... |
3af08e7a3d0420156b03004d55bbcc81fabc9e7f | 06d561c517648fa0eb3c802d99b0871482ff167d | chuciii/ubuntuzuopin | /task2/FFDemo.cpp | C++ | cpp | 361 | no_license | #include <iostream>
using namespace std;
#define __STDC_CONSTANT_MACROS
extern "C" {
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/avutil.h"
//#include "libavutil/opt.h"
//#include "libswscale/swscale.h"
}
int main(int argc, char *argv[])
{
cout<<"FFmpeg Test!"<<en... |
265452d4de88415cb3db01fa82c58b6fd4d16080 | 6e8af4720bcde36a752b6f5109a9463028820705 | zmykevin/SPP2_Kevin | /background subtraction/yuening/detect_blob.cpp | C++ | cpp | 7,808 | no_license | #include <opencv2/opencv.hpp>
#include <vector>
#include <map>
#include <iostream>
using namespace std;
using namespace cv;
static void help()
{
cout << "\n This program demonstrates how to use BLOB to detect and filter region \n"
"Usage: \n"
" ./detect_blob <image1(../data/detect_blob.png as de... |
cab9963c19d4c826d606423959ad51e9c682b7a3 | 35648e61d0b913a676a453dbe22a15c2a7bcaf22 | DRG-Modding/Header-Dumps | /Current/UI_Cursor_Controller.hpp | C++ | hpp | 377 | no_license | #ifndef UE4SS_SDK_UI_Cursor_Controller_HPP
#define UE4SS_SDK_UI_Cursor_Controller_HPP
class UUI_Cursor_Controller_C : public UMouseCursorWidget
{
FPointerToUberGraphFrame UberGraphFrame;
class UWidgetAnimation* Hover;
class UImage* Controller;
void OnHover();
void OnUnhover();
void ExecuteUber... |
3d83e1efa2c2b1c382068528e16a9f5b5e15b544 | 877b2afc47458147ebc0c8342001f9c8f53f8573 | bitcoin/bitcoin | /src/leveldb/issues/issue200_test.cc | C++ | cc | 1,698 | permissive | // Copyright (c) 2013 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
// Test for issue 200: when iterator switches direction from backward
// to forward, the current key ca... |
6cea79ec89c589702d0eb782775350425f0cd218 | e7746996615d04bc214bdaa8d4245aa356aa15ac | h-sinha/CP-codes | /Codeforces/813C.cpp | C++ | cpp | 1,812 | no_license | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define DEBUG
#ifdef DEBUG
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
cerr << name << " : " ... |
7fc8b74e0e0481f50fe12ccd482c7c3180a6d4ce | 0183f9c47648539cbaeda280b404229f96192019 | BREAK350/myCProgram-old | /Мої/музика/Unit1.cpp | C++ | cpp | 1,881 | no_license |
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//-------------------------------------... |
fcab366f986729f62cb8a8ba8cf4c9ef1dcd614c | 1892d40bba98b96365f41dc00303397b8466d2de | codahq/SoT-SDK | /SDK/SoT_MovieScene_functions.cpp | C++ | cpp | 8,371 | no_license | // Sea of Thieves (2.0) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_MovieScene_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function MovieS... |
7b831d4cea9c586368740486450268351b7e0186 | 939e4758000acd7755a45196506375f4ea418d18 | n-wave/GH-MIDI-controller | /src/controller/ribbon/PitchBendRibbon.cpp | C++ | cpp | 2,087 | no_license | /*
* PitchBend.cpp
*
* Created on: Jul 5, 2017
* Author: mario
*/
#include "../../command/PitchBendCommand.h"
#include "PitchBendRibbon.h"
PitchBendRibbon::PitchBendRibbon() :
channel(0),
parameter(0),
updated(false),
dispatcher(NULL)
{
}
PitchBendRibbon::PitchBendRibbon(const int* data) :
channel(0)... |
e9bbae3b66cd288e774456dcb659134de28ebb27 | 7f409065f48e621acda51ec59a262290501799a7 | mono/linux-packaging-skiasharp | /externals/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp | C++ | cpp | 41,442 | permissive | /*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "effects/GrPorterDuffXferProcessor.h"
#include "GrBlend.h"
#include "GrCaps.h"
#include "GrPipeline.h"
#include "GrProcessor.h"
#include "GrProcOptInfo.h"
#include "... |
3966a8274a4fff9674a964bae85ebc7db9e8bba3 | e0b2e4c4cb3f985d7430c9e9dec5b794802006d8 | GIBIS-UNIFESP/BIAL | /tst/src/Brain-OPFClustering.cpp | C++ | cpp | 2,702 | no_license | /* Biomedical Image Analysis Library */
/* See README file in the root instalation directory for more information. */
/* Date: 2012/Sep/21 */
/* Content: Test file. */
/* Description: Test with Brain and OPFClustering classes. */
#include "BrainTissueSegmentation.hpp"
#include "FileImage.hpp"
#include "Image.hpp"
#in... |
314e19ca2b9e92eaa61aa4585ab533e21022e6d5 | bdb10dff6963429b8f4a72741df9a2e4a16fbb9b | qrsforever/yxstb | /middleware/src/app/Setting/SettingApi.cpp | C++ | cpp | 2,641 | no_license | #include "SettingApi.h"
#include "Assertions.h"
#include "ind_mem.h"
#include "ind_cfg.h"
#include "sys_basic_macro.h"
#include "mid/mid_mutex.h"
#include "config/pathConfig.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string>... |
6e37e1b71783fbc3fe33dc8ff470367c2aded810 | 6ef79a58f787fe7c54df06c59ed0aafddf5644b4 | huangshangbin/LanShanLibrary | /LanShanLibrary/LanShanLibrary/main.cpp | C++ | cpp | 454 | no_license | #include<lanShan/system/Console.hpp>
#include<lanShan/fileDeal/TextFile.hpp>
class A
{
private:
int m_a;
public:
A()
{
m_a = 0;
}
const int& getA() const { return m_a; }
void out()
{
Console::out("m_a = ", m_a);
}
};
int main()
{
A a;
int& copyA = a.getA();
Console::o... |
d86ef2da1f34d02ecd91633413b9bd366129fb36 | 5ab21c4e13225fcc666c6423a5decb7f5b58994e | vsapsai/swift | /lib/AST/ProtocolConformance.cpp | C++ | cpp | 61,419 | permissive | //===--- ProtocolConformance.cpp - AST Protocol Conformance ---------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
b59c25d4b957c725fe16418a01e4f273accf260c | 9b4dd6b2ab2d3bfbf30f6f5334d5e2f5175fd132 | Kaleb8812/chromium | /chrome/browser/safe_browsing/certificate_reporting_service.cc | C++ | cc | 13,723 | 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/safe_browsing/certificate_reporting_service.h"
#include "base/bind_helpers.h"
#include "base/metrics/histogram_functions.h"
#incl... |
171d37ae0f1ab97ace6060590d7632e9a313bb4a | 7a8d872a11ddde9bf8508a629be95eac668d662d | puhep/pxar | /gui/PixParTab.cc | C++ | cc | 33,653 | no_license | #include <iostream>
#include <cstdlib>
#include <bitset>
#include <TApplication.h>
#include <TGButton.h>
#include <TGToolTip.h>
#include <TRandom.h>
#include <TSystem.h>
#include <TCanvas.h>
#include <TGTab.h>
#include <TGLabel.h>
#include <TGButtonGroup.h>
#include <TGTableLayout.h>
#include <cstdlib>
#include "PixP... |
128ab47645da70aaa783b81bb953ed6513bc6a51 | 06f22400a4b105e7cad27aab500d2873d753db60 | ftufek/wig-compiler | /src/weeders/return_check.cc | C++ | cc | 2,039 | no_license | /*
* ReturnCheck.cc
*
* Created on: Oct 13, 2013
* Author: user
*/
#include <iostream>
#include "return_check.h"
#include "../error.h"
namespace visitors {
ReturnCheck::ReturnCheck() {}
ReturnCheck::~ReturnCheck() {}
bool ReturnCheck::is_valid(){
return is_valid_;
}
void ReturnCheck::visit(ast::Service... |
02a3df6171ec2de07f651d5a235cc7bec31fa65f | 38c6980e33b56e5ea128b32a5f33fade085f48ee | DGHeroin/Mirror-GLSL-Study | /Orge-Study/ogre_src_v1-8-0/OgreMain/src/OgreSimpleSpline.cpp | C++ | cpp | 7,966 | no_license | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2012 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any... |
ae6e6cdd25cf048df15314f53387197b2e92b4c4 | 1571e5234b585ce4251971bc8002363bf4b807f5 | BVlad917/Object-Oriented-Programming | /Lab Test Week 13/business/service.cpp | C++ | cpp | 1,183 | no_license | //
// Created by VladB on 24-May-21.
//
#include <set>
#include "service.h"
Service::Service(Repository &repo) : repo{repo} {}
std::vector<TimeInterval> Service::srv_get_all_times() {
return this->repo.repo_get_all_times();
}
std::vector<TimeInterval> Service::srv_filter_by_probability(int p) {
... |
5607962bc0c185c065fb96de3c42073011dce6df | ce7395476fb753f74c3ce6f7faa662d82339c2b5 | MatthewA4/SHADERed | /main.cpp | C++ | cpp | 8,202 | permissive | #ifdef _WIN32
#include <windows.h>
#endif
#include <SDL2/SDL.h>
#include <glslang/Public/ShaderLang.h>
#include "Objects/Settings.h"
#include "Objects/Logger.h"
#include "EditorEngine.h"
#include "Engine/GeometryFactory.h"
#include <thread>
#include <chrono>
#include <fstream>
#include <ghc/filesystem.hpp>
#include ... |
b5f3ec5b2ccdc793c7b3b8309ef618bf5fd87f45 | 9741346e720be1e6afec9510a2f103fcb4de4db1 | Auto-Mech/MESS | /src/libmess/graph_include.cc | C++ | cc | 3,590 | permissive | std::set<int> Graph::Expansion::_low_freq_set (double temperature, std::vector<double>& tanh_factor) const
{
const char funame [] = "Graph::Expansion::_low_freq_set: ";
std::set<int> res;
if(temperature > 0.) {
//
tanh_factor.resize(_red_freq.size());
for(int i = 0; i < _red_freq.size(); ++i)
... |
798d805a92f3d1176be9020a0d0573a265abb08f | e26a485ae13b6d4c2853b375d9716fac998ea4ba | Ceruleanacg/Crack-Interview | /Legacy/198. House Robber [LeetCode]/main.cpp | C++ | cpp | 966 | permissive | //
// main.cpp
// 198. House Robber [LeetCode]
//
// Created by Shuyu on 2018/4/9.
// Copyright © 2018年 Shuyu. All rights reserved.
//
#include <iostream>
#include <vector>
class Solution {
public:
int rob(std::vector<int>& nums) {
if (nums.size() == 0) {
return 0;
}
if (nu... |
29cc3f40b31e96e41ef8f95e16ed5287c3e27f57 | fa3a689a5257422ac964f819071f6ff229daac07 | shelkesays/rlp-encoding | /src/rlp/items/rlpstring.cpp | C++ | cpp | 2,993 | no_license | #include <rlpencoding/rlp/items/rlpstring.hpp>
#include <rlpencoding/utils/hex.hpp>
verified::rlp::RLPString::RLPString() {
// @todo Complete this code later
}
verified::rlp::RLPString::RLPString(const buffer_t input) {
_bytes = input;
}
buffer_t verified::rlp::RLPString::GetBytes() {
return _bytes;
}
... |
c05862ac4543e7ada04e65817c60fca27c9a1d74 | f339ead109a8cf0f2163ef0ebd110d504618eaff | trofi/re2c | /src/debug/dump_nfa.cc | C++ | cc | 2,576 | permissive | #ifdef RE2C_DEBUG
#include <stdint.h>
#include <stdio.h>
#include <memory>
#include <string>
#include <vector>
#include "src/debug/debug.h"
#include "src/nfa/nfa.h"
#include "src/regexp/tag.h"
#include "src/util/range.h"
namespace re2c {
uint32_t dist(const nfa_state_t* s0, const nfa_state_t* s) {
return static... |
72b147db5a8fb62468e379ec52667f0ae5154afd | 5c71865d9939944558faca5a769fa813a03c7124 | JocloudSDK/OFSample | /OFSample-Windows/depends/dwinternal/framework2015/duifw/widgets/duidateedit.cpp | C++ | cpp | 2,462 | no_license | #include "stable.h"
#include "duiwidget_p.h"
#include "duidateedit.h"
DUI_IMPLEMENT_DYNAMIC_WIDGET_CREATE_SELF(DuiDateEdit)
class DuiDateEditPrivate: public DuiWidgetPrivate
{
Q_DECLARE_PUBLIC(DuiDateEdit)
public:
DuiDateEditPrivate();
~DuiDateEditPrivate();
QDateEdit *m_dateEdit;
};
DuiDateEditPrivate::DuiDa... |
b812f41baef1afbc0577da3a88266ba18b3853e9 | 449637553bd4b8bc1284faf11a980b2a6d38a0fc | jesonjn/platform_system_core | /libbacktrace/BacktraceMap.cpp | C++ | cpp | 4,592 | permissive | /*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
fcc0b6e4a739059abebd2ccaf9b49bd1cb29b707 | ebd3dabb93514dd5a60b5030a1b5523f2b0c55a6 | Alejandro-17/practica4 | /Mapa/main.cpp | C++ | cpp | 17,222 | no_license |
//Bibliotecas
#include "mapa.h"
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <sstream>
#include <fstream>
using namespace std;
mapa primer_camino (mapa);
map<int, vector<string>> camino_corto (string, string, vector<enrutador>, vector<string>, int*, map<int, vector<string>>);
map<... |
29a4be7130c589d0d39eba073aef8ced4c648aaa | 5395ab75a8be3faa9e75977f74ec3b478465d151 | WiViClass/cef-3.2623 | /chromium/src/chrome/test/media_router/media_router_e2e_browsertest.cc | C++ | cc | 6,106 | 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/test/media_router/media_router_e2e_browsertest.h"
#include <vector>
#include "base/command_line.h"
#include "base/stl_util.h"
#include "... |
c1788694e1252025299d3177d89d6088391be3bc | 15af54cf266aae30151a649eb218ea5024a3caa2 | vijaynchakole/C-Programming | /encryption.cpp | C++ | cpp | 483 | no_license | #include<iostream>
using namespace std ;
class security
{
public:
int start ;
int end ;
int pstart ;
int *ptr ;
security(char *str)
{
start = end = pstart = 0 ;
ptr = str ;
}
void setValue();
void Encryt();
void decrypt() ;
};
void security :: Encryt()
{
start = ptr ;
while(*ptr!='\0')
{
*ptr = *ptr + &pt... |
f843266575f4cb0df6edec5c6f5b504e195f7e1a | 17a6b9ff5e5cb4c085db1e2fbcfe83aee42b88e2 | dannosliwcd/geopm | /service/test/RawMSRSignalTest.cpp | C++ | cpp | 2,365 | permissive | /*
* Copyright (c) 2015 - 2022, Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <memory>
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "geopm_hash.h"
#include "geopm_field.h"
#include "RawMSRSignal.hpp"
#include "geopm_test.hpp"
#include "MockMSRIO.hpp"
using geopm::RawMSRSign... |
5ce6e7a0826ce6bb44196fa9647ebe064c10aa8a | 172f2f02901569e3263d278dcdf99cb1d401f315 | rprouse/CDLite | /shared/Bmp.cpp | C++ | cpp | 6,891 | no_license | //====================================================================
// Bmp.cpp: implementation of the CBmp class.
//
// $Log: Bmp.cpp,v $
// Revision 1.7 2003/02/07 15:35:41 commando
// More correct C++
//
// Revision 1.6 2001/09/18 00:36:44 vertigo
// Converted the CBmpStrip to derive from a CRect
//
// Revisio... |
a2f560f80b2158e127ec9a0be005c8b99be10e22 | 63118855cca12dad3b9cc148a6107b531589ce84 | yannick-cn/book_caode | /算法竞赛宝典/第二部资源包/第十一章 动态规划/最长不下降子序列/机器人军团/src/标程/robot.cpp | C++ | cpp | 673 | no_license | //机器人军团-朴素算法
#include <iostream>
#include <cstdlib>
using namespace std;
int n,longest ;
int a[10001],dp[10001] ;
int main()
{
freopen("robot.in","r",stdin);
freopen("robot.out","w",stdout);
cin >> n ;
longest = 1 ;
for (int i=1 ; i<=n ; i++)//初始化
{
cin ... |
626f6b49ceb42b88b086379ab3ea2c9d174a9e76 | aebc903142bc7483e3bdc275dff40d78ff56a756 | kong9812/SoundEffector | /Sound_Player_V3/waveOut.cpp | C++ | cpp | 4,138 | no_license | //=============================================================================
//
// 音データの書き出し処理 [waveOut.h]
// Author : 蔡 友剛
//
//=============================================================================
#include "waveOut.h"
//=============================================================================
// プロトタイ... |
05047e2aa239fbb7d21b0c8c222081e7a8793537 | 24b76017a05bfa44c093ea7e26e08c50a91c3a19 | Deepakgarg2309/All_Program_helper | /C++/C++ Programs/LuckyNumber.cpp | C++ | cpp | 690 | permissive | // C++ program for Lucky Numbers
#include <bits/stdc++.h>
using namespace std;
#define bool int
/* Returns 1 if n is a lucky no.
otherwise returns 0*/
bool isLucky(int n)
{
static int counter = 2;
if(counter > n)
return 1;
if(n % counter == 0)
return 0;
/*calculate next position of input no.
Variable "nex... |
1ad1d864b8ce13f23a933cf95775ccab6b9a3074 | 3ae3f00a53e5a072fbb3354eb503071de89f6bee | ccdxc/logSurvey | /data/crawl/wget/old_hunk_3946.cpp | C++ | cpp | 554 | no_license | return dir;
}
/* This function is just a stub. It should actually accept some kind
of information what system it is running on -- e.g. FPL_UNIX,
FPL_DOS, FPL_NT, FPL_VMS, etc. and a "guess-me" value, like
FPL_GUESS. Then it would call the appropriate parsers to fill up
fileinfos.
Since we currently... |
2030cb991e90b96d142dd9b0f45c4979da45baf6 | 334a0e489dfa828ef660496899e7118cf8ae0630 | SolOasis/SolOasis-Codebase | /SolOasis/LightSensorModule.cpp | C++ | cpp | 2,344 | no_license | /*
* LightSensorModule.cpp
*
* Created on: Nov 9, 2017
* Author: Allen, Chris
*/
#include "LightSensorModule.h"
//**************************************************************************************
// ~Light Sensor Module Constructor~
//*******************************************************************... |
fdfad9e5a95981c0eb496e758bcf1f99dc433ca5 | a8d02deb4984631cd22c28a5037402d2f3f3457e | Tlepkali/firstStep | /firstStep/Source1.cpp | C++ | cpp | 2,083 | no_license | #include<iostream>
#include<stdlib.h>
#include<time.h>
#include<string>
using namespace std;
//void initArray(int** arr, const int n, const int m) {
// int x = 10, y = 20;
// for (int i = 0; i < n; ++i) {
// for (int j = 0; j < m; ++j) {
// arr[i][j] = x + rand() % (y - x + 1);
// co... |
fca9a707003938db704a13fefe1831292d91457d | 3c812049ad9ba3dd793349b4e03d930d030e7bbb | Alimagde/CompitativeProgramming | /UVA/UVA10264.cpp | C++ | cpp | 623 | no_license | /*
for every corner sum all it's neighbor corners , a corner with has exactly one bit different from every neighbor corner
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
while (~scanf("%d", &n)) {
vector<int> vec(1 << n), ans(1 << n, 0);
for (int i = 0; i < (1 << n); ++i) {
scanf("%d... |
0f4b627fcaa82611a5e842a301c8d2bffed543d3 | f122863f036e65f39df4f982014ffbc7120cb56c | bobshih/competitive_coding | /2014..135/2014.09..67/2014.09.13.10/lucky substring.cpp | C++ | cpp | 562 | no_license | #include <cstdio>
#include <cstring>
using namespace std;
int main()
{
char t[50];scanf("%s",t);
int temp[50];memset(temp,0,sizeof(temp));
bool flag = 0;
for(int i = 0;i < strlen(t);i++){
if(t[i] == '4' || t[i] == '7'){flag = 1;break;}
}
if(flag == 0)printf("-1\n");
else {
... |
f9478bfc4fbe9560507f293ae1b7060266ce199d | 982ea264314170034091dbd79457a3c4223fcdc1 | drlongle/leetcode | /algorithms/problem_1649/solution.cpp | C++ | cpp | 4,273 | no_license | /*
1649. Create Sorted Array through Instructions
Hard
Given an integer array instructions, you are asked to create a sorted array from the elements
in instructions. You start with an empty container nums. For each element from left to right
in instructions, insert it into nums. The cost of each insertion is the minim... |
ecf09269402b6d1872c343fa1d2f2937200d5a22 | 3d44ca7d81168167160c8e96bee00c823265b2c1 | Farmak09/Group-Movement | /Solution/Motor2D/Squad.cpp | C++ | cpp | 2,819 | no_license | #include "Squad.h"
#include "j1App.h"
#include "j1Pathfinding.h"
#include "j1Map.h"
Squad::Squad()
{
}
Squad::Squad(p2List<Entity*> &squaders)
{
for (p2List_item<Entity*>* iterator = squaders.start; iterator; iterator = iterator->next)
{
squadMembers.add(iterator->data);
}
if (squadMembers.start)
{
squadLe... |
ed5699347d21fd71a5cc5728be1a2637fe31840d | 2184021a87281100263e0ca1c0c168e8512df6c9 | xtblock/chromium | /cc/raster/zero_copy_raster_buffer_provider.cc | C++ | cc | 9,751 | 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 "cc/raster/zero_copy_raster_buffer_provider.h"
#include <stdint.h>
#include <algorithm>
#include <utility>
#include "base/trace_event/process_... |
0bceb3bf9edc4155e51cb7f0d3b3df310333c81a | 1976cb036b0cb6e4d281f49c645f109c246938fd | eastgerm/eastgerm-algo | /BOJ/Simulation/2448. 별찍기 11.cpp | C++ | cpp | 1,014 | no_license | //
// Created by kimdong on 2019-08-23.
//
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int N;
void input();
vector<string> star(int n);
string space(int n);
void canvas();
int main() {
ios::sync_with_stdio(false), cin.tie(NULL);
input();
canvas();
return 0;
}
vo... |
a970faf4366c8456834e4102f1b65ba453633cc5 | 3a34d282fafae6b3dc989127cbf5c86cab090471 | zbeckerman/attac | /TWMapper/TWMapper/Axis.cpp | C++ | cpp | 2,061 | permissive | // Line.cpp : implementation file
//
#include "stdafx.h"
#include "MouseSel.h"
#include "Axis.h"
#include "glut.h"
// CAxis
IMPLEMENT_SERIAL(CAxis, CShape, 2)
//Constructors
CAxis::CAxis()
{
}
CAxis::CAxis(double x, double y, double z, double height,double R,double G,double B)
{
m_xc=x;
m_yc=y;
m_zc=z;
m_heigh... |
b879c640c7133b19f2e6b70d3cec9da363725915 | f6de188518a7f2cfadbbacf9cd52d72fd10ea631 | dlin172/Plange | /source/plc/include/document/THIS_TYPE.hpp | C++ | hpp | 1,998 | permissive | // This file was generated using Parlex's cpp_generator
#ifndef INCLUDED_THIS_TYPE_HPP
#define INCLUDED_THIS_TYPE_HPP
#include <optional>
#include <variant>
#include <vector>
#include "erased.hpp"
#include "parlex/detail/abstract_syntax_tree.hpp"
#include "parlex/detail/builtins.hpp"
#include "parlex/detail/docume... |
8225ce2adb6a7e82d50924f12dc9754c1d5bf58a | 26c5ea1794b695bb52cffff2fdaa8b175e3bf36d | sllong/phicomm_dc1 | /src/main.cpp | C++ | cpp | 9,168 | no_license | #include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <CSE7766.h>
#include <CAT9554.h>
#include <Wire.h>
#define SDA_PIN 3
#define SCL_PIN 12
CSE7766 myCSE7766;
const int httpPort = 80;
String deviceName = "斐讯DC1插排";
String version = "1.1";
ESP8266W... |
f7ec98b9f49d90576820684703744238625dcb65 | d6eca9bec2f167f1025e9abb1c83fce99afd836a | evillique/ClickHouse | /src/Server/KeeperTCPHandler.cpp | C++ | cpp | 21,846 | permissive | #include <Server/KeeperTCPHandler.h>
#if USE_NURAFT
#include <Common/ZooKeeper/ZooKeeperIO.h>
#include <Core/Types.h>
#include <IO/WriteBufferFromPocoSocket.h>
#include <IO/ReadBufferFromPocoSocket.h>
#include <Poco/Net/NetException.h>
#include <Common/CurrentThread.h>
#include <Common/Stopwatch.h>
#include <Common/N... |
282e3f0dacbaabc9df97125cb32f76adf76defe7 | 7be586b36d2450524550c780f4ac74e6c9e1817f | Rajanpandey/Coding-Practice | /HackerRank/Data Structures/Linked List/Get Node Value.cpp | C++ | cpp | 309 | no_license | int getNode(SinglyLinkedListNode* head, int positionFromTail) {
SinglyLinkedListNode* temp = head;
SinglyLinkedListNode* result = head;
int count = 0;
while(temp) {
temp = temp->next;
if(count++ > positionFromTail) result = result->next;
}
return result->data;
}
|
98cce278011ee54f096a23b5c35d04e7871738b2 | eab3cef709bdff8b3230f6bdd48b7e6890e95038 | Ldar01/Analisis_de_Algoritmos | /Laboratorios/Laboratorio1/Tarea/Tarea_Labo1_ejercicio1.cpp | C++ | cpp | 1,349 | no_license | //Luisa Daniela Arevalo Rodas 00038617
#include <iostream>
#define SIZE 3
using namespace std;
void imprimirMatriz(int matrix[SIZE][SIZE]){
for (int i = 0; i < SIZE; i++){
for (int j = 0; j < SIZE; j++){
cout<< matrix[i][j]<<"\t";
}
cout<<'\n';
}
}
void sumarMatrice... |
d8c806739a299c20f5902e9b5f4cf294a88955e5 | 08fcffb267c47d24074fbfbeb08a86a7e41410bd | JoaoBaptMG/INF443-Project | /src/util/range.hpp | C++ | hpp | 3,588 | permissive | #pragma once
#include <iterator>
#include <type_traits>
namespace util
{
template <typename T>
class range_iterator final
{
static_assert(std::is_integral_v<T>, "range_iterator must be used with integral types");
T idx;
public:
using difference_type = std::make_signed_t<T>;
... |
54b341ccdd84ef0c0e2f07625e4b2ec5afadaae9 | 06057dc2586a5eacd17444525ca218f301d88551 | and3r817/planetoids | /source/planetoids/Cubemap.cpp | C++ | cpp | 2,629 | no_license | #include "Cubemap.hpp"
namespace planetoids
{
Cubemap::Cubemap(std::string fileName) : Resource()
{
OPENGL_CALL(glGenTextures(1, &m_Id));
OPENGL_CALL(glBindTexture(GL_TEXTURE_CUBE_MAP, m_Id));
GLFWimage _image;
std::string _fileName = fileName;
glfwReadImage((_fileNa... |
544d37740f0da9a1c51d01781264ce5a3b44d23c | 7259ed52a4382525cb5eb429fe1b172eb50d217a | Samsung/Castanets | /third_party/blink/renderer/modules/filesystem/dev_tools_host_file_system.cc | C++ | cc | 1,541 | 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 "third_party/blink/renderer/modules/filesystem/dev_tools_host_file_system.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include ... |
e3b02eb4c5134380e66206c96d32b90a28f63e8e | 775e8417480249d14f66024b937a0d7ac424c1e4 | jjzhang166/WinNT5_src_20201004 | /NT/shell/osshell/accessib/inc/mappedfile.cpp | C++ | cpp | 2,630 | no_license | //Copyright (c) 1997-2000 Microsoft Corporation
// Memory mapped file routines
#include <windows.h>
#include "w95trace.h"
#include "mappedfile.h"
BOOL CMemMappedFile::Open(
LPCTSTR szName, // name of the mapped file
unsigned long ulMemSize // size of the mapped file
)
{
// assump... |
e296c564963757f0f9f2b9eadc3a8e913202a9f8 | c0a0f991b49a5f665fc61aeff8b2d90379dfebbb | besherislambouley/Pictionary | /coci.cpp | C++ | cpp | 3,976 | no_license | /*
* we iterate over days from m to 1 adding edges between the i th node and its multiples 2*i , 3*i .. with value m-i+1
* we only add edges if those two nodes are in different components , then we only add n-1 edges forming a tree
* now the answer of nodes a,b is the maximum value on the path from a to b , use sp... |
0d382c13b86e2ed1c08e72cc07a4ed7290abb2af | 56aabb86efcf7d22d8fdf05ee02db2f11a92d28b | aherrero/MRCore_Kinect | /src/world/solidentity.cpp | C++ | cpp | 2,635 | no_license | /**********************************************************************
*
* This code is part of the MRcore project
* Author: Rodrigo Azofra Barrio &Miguel Hernando Gutierrez
*
*
* MRcore is licenced under the Common Creative License,
* Attribution-NonCommercial-ShareAlike 3.0
*
* You are free:
* - to Sha... |
16b4de5da2c254f9a7626b71373f043e1c96c578 | 75cfcbccdd202626323ddb2779368988aaa37729 | barnwal-anand/CPP | /C++_info/STL-Comparator.cpp | C++ | cpp | 1,687 | no_license | // vector comparator
// Sort elements by frequency. If two elements have same count, then put the elements that appears first
//input: arr[] = { 5, 2, 5, 6, -1, 9999999, 2, 8, 8, 8 }
//output: 8 8 8 5 5 2 2 6 -1 9999999
// Map m2 keeps track of indexes of elements in array
unordered_map<int, int> m2;
// Used for sor... |
93538c575643b55e89cd55b87dbefdac4dbc01b2 | 07db4734762e22f757e2399d605ad9aaca6f8198 | man4ish/Genome-Analysis-Pipeline | /SXAppendScore/SXAppendScoreINDEL_SingleSample_std.cpp | C++ | cpp | 6,414 | no_license | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
FILE *g_pfIn=NULL,**g_apfReadDen=NULL,**g_apfReptDen=NULL,*g_pfOut=NULL;
float g_fMean=0.00,g_fXCoverage=0.00,g_fYCoverage=0.00;
float fPEScore,fSNPReadScore,fStrandScore,fAvgQS,fRS,fReadDenScore,fSNPScore;
static void banner(char *argv[]... |
fe7403de89ff88b3c63000a3bfe7414c7ee9961b | c78d2bf2ac2cce6ff26ce1c3deaac2b15f804fe1 | vsdaniela/Daniela | /laboratorio 2/cod06.cpp | C++ | cpp | 574 | no_license | //switch statemant
#include <iostream>
using namespace std;
int main(){
const double cm_perinch = 2.54;
int length = 1 ;
char unit = 'a' ;
cout << "Por favor ingrese una longitud y su unidad ( c o i ) : \n" ;
cin >> length >> unit;
switch (unit) {
case 'i':
cout << length << " in ==" <... |
11f6ad1a36384fd38184e3174769aff1b7f01c09 | 1b7a819e206e21262e43a371d17acacebd854cd4 | south-potato/poseidonos | /test/unit-tests/journal_manager/replay/read_log_buffer_test.cpp | C++ | cpp | 5,266 | permissive | #include "src/journal_manager/replay/read_log_buffer.h"
#include <gtest/gtest.h>
#include "test/unit-tests/journal_manager/config/journal_configuration_mock.h"
#include "test/unit-tests/journal_manager/log/log_buffer_parser_mock.h"
#include "test/unit-tests/journal_manager/log_buffer/journal_log_buffer_mock.h"
#inclu... |
cacda0a3979d5528690db6af9dfe808ef529eaaf | 6b0978b16af79d266de181b12d0d0e473a4cc433 | Klebert-Engineering/zserio-template | /demo/src/host/Map.cpp | C++ | cpp | 4,431 | no_license |
/**
* Automatically generated by Zserio C++ extension version 1.2.0.
*/
#include <zserio/StringConvertUtil.h>
#include <zserio/CppRuntimeException.h>
#include <zserio/HashCodeUtil.h>
#include <zserio/BitPositionUtil.h>
#include <zserio/BitSizeOfCalculator.h>
#include <zserio/BitFieldUtil.h>
namespace host
{
temp... |
f857ef6e344facaa1b89c9c6e55aa65158a45f86 | 5d1d1bbcbfb333778b35dc95598fcc2463a4e4a4 | tetriscode/mapbox-gl-native | /platform/android/src/style/layers/layers.cpp | C++ | cpp | 4,084 | permissive | #include "layers.hpp"
#include <mbgl/style/layer.hpp>
#include <mbgl/style/layers/background_layer.hpp>
#include <mbgl/style/layers/circle_layer.hpp>
#include <mbgl/style/layers/fill_extrusion_layer.hpp>
#include <mbgl/style/layers/fill_layer.hpp>
#include <mbgl/style/layers/hillshade_layer.hpp>
#include <mbgl/style/l... |
bd5b58aafa05f744a752a01ebe358f4efb62c08f | 3ceb6e73dc0831a1ae3481d6a6abf9f35f1a0bb1 | JiyeonCoco/Algorithm_Baekjoon | /17140.cpp | C++ | cpp | 4,147 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// maxRow : 최대 행 길이
// maxColumn : 최대 열 길이
// A : 입력 된 이차원 배열
// transA : transpose된 A 배열
// cntMatrix : 숫자, 수의 등장 횟수가 담긴 2차원 vector
int maxRow, maxColumn = 0;
int A[101][101] = { 0 };
int transA[101][101] = { 0 };
vector<ve... |
892c239d838bfe5d67ea740820aa9865ddaffc04 | e00f7ccfda27a9fcdbbe26dcc97ecc5bf3f09aab | moondemon68/cp | /ITEBE/Kontes8/D.cpp | C++ | cpp | 1,075 | no_license | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define pii pair<int,int>
#define LL long long
using namespace std;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n,m;
cin >> n>> m;
... |
5cee70dd048f1db6f91e73b0b1f04ccc7dc325d1 | cac39fab5de28cf6208227cfb705352da31a3194 | Grbt49/cobalt | /starboard/nplb/drm_helpers.cc | C++ | cc | 2,982 | permissive | // Copyright 2018 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ap... |
30265599a111a2ec9eb483e91b879c7f204d4019 | e536b65ac35d4c4abc3b8e794d887220918f3af8 | Kalmalyzer/Lectures | /Att skriva robust kod 20110526/Exempel/Det är knäskott på dessa konstruktioner/Singletons som initialiserar system - 2.cpp | C++ | cpp | 761 | no_license |
//////////////////////////////////////////////////////////////////////////
// Better
class FileSystem
{
FileSystem(NetworkSystem& networkSystem);
...
};
class NetworkSystem
{
...
};
class Logger
{
public:
Logger(FileSystem& fileSystem);
private:
static Logger* s_instance;
};
///////////////////////////////... |
686bbb22a5a7edf202812991ed268084dc521dbe | 9754b3c4fcc0ff45312d2d616e1ef7dc6719361b | iluvatar593/spm | /FarmIntrinsic/kernel_mic_double.hpp | C++ | hpp | 5,724 | no_license | /*
* kernel_mic_double.hpp
*
* Created on: 07/nov/2014
* Author: alessandro
*
* Description: very core of the matrix multiplication.
* Registers can contain 8 double precision values.
*/
#ifndef KERNEL_MIC_DOUBLE_HPP_
#define KERNEL_MIC_DOUBLE_HPP_
#include <zmmintrin.h>// KNC
#define vZero(c) {(c) =... |
634273b083ff337138ea27572f42c31a04bb1fbb | 01eedec633be3299898bfab5fa3e6b9426b539a9 | webosce/chromium53 | /src/third_party/skia/gm/texdata.cpp | C++ | cpp | 3,870 | permissive | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// This test only works with the GPU backend.
#include "gm.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrDrawContext.h"
#include "SkColorPriv.h"
#include "effects... |
280f11282c7e527bb9c122daf6b060160c4b7476 | 1b494b6409a65e519fb1680e72a26aab0167376f | metux/chromium-suckless | /chrome/browser/chromeos/arc/arc_auth_service.cc | C++ | cc | 31,632 | 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/chromeos/arc/arc_auth_service.h"
#include <utility>
#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/wm_shell.... |
edbca4fa81b399399a472fe1ad91b2490b2a70ea | 58b74df6a0dba6ce473a8e0bae3a6e94037aaea2 | Lyoness/mull | /lib/MutationOperators/MathDivMutationOperator.cpp | C++ | cpp | 3,320 | permissive | #include "MutationOperators/MathDivMutationOperator.h"
#include "Context.h"
#include "Logger.h"
#include "MutationPoint.h"
#include <llvm/IR/InstIterator.h>
#include <llvm/IR/Instructions.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/DebugLoc.h>
#include <llvm/IR/DebugInfoMetadata.h>
#include <fstream>
#include <... |
61b6ecc77f4d3b7a0426a340158da0132b497275 | 95b0645c2fc1868f74b5a32c300e139c12c4ac47 | tachyon83/code-rhino | /DAY001~099/DAY06-BOJ2660-회장뽑기/eunji.cpp | C++ | cpp | 2,009 | no_license | #include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <vector>
#define SORT(a,b) {if(a>b){int t=a;a=b;b=t;}}
using namespace std;
int arr[51][51];
void FW(int N) {
//플로이드-와샬을 썼습니다(삼중포문)
//v는 거치는 vertex
//i는 시작점
//j는 도착점
//배열의 반만썼기때문에 저장, 조회시 작은 vertex를 시작ver... |
ecde4ee6d6d5c3f9f02bba7fe52298ddb32d30fb | 1c2f21f49ef5869786b61b8e95f1853d687a1806 | YEHTSAIYUAN/self_driving_car | /hw1_rostutorial/self_driving_cars_ros2/catkin_ws/build/turtlesim/rosidl_typesupport_c/turtlesim/srv/kill__type_support.cpp | C++ | cpp | 2,415 | no_license | // generated from rosidl_typesupport_c/resource/idl__type_support.cpp.em
// with input from turtlesim:srv/Kill.idl
// generated code does not contain a copyright notice
#include "cstddef"
#include "rosidl_generator_c/message_type_support_struct.h"
#include "turtlesim/msg/rosidl_typesupport_c__visibility_control.h"
#in... |
977898976cfc0c4f1395d6dd0ca27c810d22c284 | 2e0c768d495049612e2cf8ac4d36211aafb06aba | hyw-dev/rife-ncnn-vulkan | /src/main.cpp | C++ | cpp | 21,385 | permissive | // rife implemented with ncnn library
#include <stdio.h>
#include <algorithm>
#include <queue>
#include <vector>
#include <clocale>
#if _WIN32
// image decoder and encoder with wic
#include "wic_image.h"
#else // _WIN32
// image decoder and encoder with stb
#define STB_IMAGE_IMPLEMENTATION
#define STBI_NO_PSD
#define... |
b6538145d97b9b7ea42d6b0e14fe56cff925a215 | bde8fd30c42e492777bb0ae5f191aa4965a9d2f9 | waleed-prgit1999/OOP-in-C-Codes | /assinment Q1/main.cpp | C++ | cpp | 476 | no_license | #include <iostream>
using namespace std;
class Int
{
private:
int x;
public:
void initial_zero()
{
x=0;
}
void initial_some(int num)
{
x = num;
}
void display()
{
cout<<"Value of integer is "<<x<<endl;
}
void add (Int i1,Int i2)
... |
ccc6944a053062d14ebf43ff428466a561f12006 | 73cde7ab533738a9a8d1dbeec8a174b946c140a1 | mcregragui/Solveur-lin-aire | /Residumin.cpp | C++ | cpp | 1,049 | no_license | #include "Residumin.h"
#include <iostream>
#include <math.h>
#include <iostream>
#include <Eigen>
using Eigen::MatrixXd;
using namespace Eigen;
using namespace std;
//constructeur
Residumin::Residumin(MatrixXd A,VectorXd b) : A_(A),b_(b)
{
}
//Residu minimum
VectorXd Residumin::Solve()const
{
//init
... |
5bef1ae6c0e763e87c1a7ced5a742698b0e81542 | be7bd4ec1aa5467611e69dc6006ffe466d173ffe | AlextheGreat2018/Class-Practice | /Maynard_project_6.cc | C++ | cc | 22,300 | no_license | //---------------------------------------------------------------------------------------------------------
// FILE: Maynard_project_5.cc
// TITLE: Interest Calculator
// AUTHOR: Alex Maynard
// COURSE: CSCI 2000-A (C++)
// DATE: 11/7/17
//
// PURPOSE: This program is an updated version of the previous programming proj... |
fafd9a55121dbefd6ef79e5c6af22f4e28baa676 | 7fb67df73a55010f2457e891c1b1e3cac59b1a3d | cakoose/node-sodium | /src/crypto_hash_sha256.cc | C++ | cc | 2,484 | permissive | /**
* Node Native Module for Lib Sodium
*
* @Author Pedro Paixao
* @email paixaop at gmail dot com
* @License MIT
*/
#include "node_sodium.h"
/**
* int crypto_hash_sha256(
* unsigned char * hbuf,
* const unsigned char * msg,
* unsigned long long mlen)
*/
NAPI_METHOD(crypto_hash_sha256) {
Napi::... |
ce290448919c1371c0d7f36cac0d8d58fb34aa31 | 3bfe709fcd5d107b1058824582129df2012a5188 | Bitfall/AppWhirr-SamplesAndPrototypes | /Feature/JSonExample/JSonExample/main.cpp | C++ | cpp | 590 | permissive | #include <QtCore/QCoreApplication>
#include "Common/Json/json.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
DLog("Hello world");
QVariantMap map;
map["name"] = "Name";
map["age"] = 22;
DLog("Serialize map: ") << QtJson::Json::serialize(map);
// ---
QVariant... |
54c6fec6eb3f0592092dbf423c1013ab095221e8 | 8e1910d9cb326e705b8164a687b7d076ab9d6f51 | TeamEmpireCoin/EmpireCoin | /src/qt/transactiondescdialog.cpp | C++ | cpp | 692 | permissive | // Copyright (c) 2011-2013 The EmpireCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "transactiondescdialog.h"
#include "ui_transactiondescdialog.h"
#include "transactiontablemodel.h"
#include <QMo... |
171f5c508af136da92a64eaf8f8896815020fb4e | c1eba732fb8d749e489febe816841183786b88bc | lisa0314/chromium-src | /chrome/browser/chromeos/file_manager/file_manager_browsertest.cc | C++ | cc | 54,533 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include ... |
11cace242b0b763089ba333ca285150870ab3428 | 6b4a353641be17673ca1752ebc4a5eff77491a74 | czl389/leetcode | /461. Hamming Distance.cpp | C++ | cpp | 340 | no_license | class Solution {
public:
int hammingDistance(int x, int y) {
int z=x^y;
int nums=0;
int detect=1;//循环左移,与某数相与,可以检测该数每一位是否是1
while(detect) {
if(detect&z)
nums++;
detect=detect<<1;
}
return nums;
}
}; |
c52d35afce55c2c8162e3b14fb63ac3ab0369c6d | 662446a3f53e240f308121eb10d852ef51311696 | ShmuelLa/number_with_units | /NumberWithUnits.cpp | C++ | cpp | 11,832 | permissive | #include "NumberWithUnits.hpp"
using namespace::std;
namespace ariel {
/**
* @brief Construct a new Number With Units:: Number With Units object
*
* @param amount the amount of the created unit
* @param unit_type the unit type, must be from the current unit table
*/
NumberWithUni... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.