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 |
|---|---|---|---|---|---|---|---|---|
270d8405ed5a5bfcca55f0ee7558ce38a109890d | f51f0e1da0b43ae3f3c771631b8483f0a1faedfa | pfultz2/boost-cmake-demo | /libs/config/include/boost/config/compiler/visualc.hpp | C++ | hpp | 10,228 | no_license | // (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Darin Adler 2001 - 2002.
// (C) Copyright Peter Dimov 2001.
// (C) Copyright Aleksey Gurtovoy 2002.
// (C) Copyright David Abrahams 2002 - 2003.
// (C) Copyright Beman Dawes 2002 - 2003.
// Use, modification and distribution are subject to the
// Boost... |
613eab3905586ce8d055c89389fd67068564ace8 | 3662186e70699aa31cdd331acdcfca84ec55afa8 | HITSZ-LeggedRobotics/ros_ethercat | /ros_ethercat_driver/include/ros_ethercat_driver/slave_info/goldentwitter.hpp | C++ | hpp | 5,298 | no_license | /*
* goldentwitter.hpp
* Descriotion:
*
* Created on: Jue, 5, 2019
* Author: Shunyao Wang
* Institute: Harbin Institute of Technology, Shenzhen
*/
#ifndef GOLDENTWITTER_HPP
#define GOLDENTWITTER_HPP
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <vector>
#define TWITTER_GEAR_RATIO... |
a0cc1452e74208daae6f7ee304e536858c9a06de | 94bc817dfbacb4b865f8858d9ec880bae9b142fd | fluxer/copperspice | /src/xmlpatterns/expr/qtreatas.cpp | C++ | cpp | 2,492 | no_license | /***********************************************************************
*
* Copyright (c) 2012-2015 Barbara Geller
* Copyright (c) 2012-2015 Ansel Sermersheim
* Copyright (c) 2012-2014 Digia Plc and/or its subsidiary(-ies).
* Copyright (c) 2008-2012 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.... |
8111410d3143c13ad2b464b1e80010a66d19bd87 | 4f406fe6b02ebb1e7891b8e76e6f8c77ee8f0322 | dtbenson43/enote | /electron-windows-interactive-notifications/lib/notifications_bindings.cc | C++ | cc | 1,950 | permissive | #include <node.h>
#include <v8.h>
#include <nan.h>
#include "InteractiveNotifications.h"
#include <malloc.h>
#include <windows.h>
#include <stdio.h>
typedef void (__stdcall *f_funci)();
using v8::Integer;
using v8::Local;
using v8::String;
NAN_METHOD(RegisterAppForNotificationSupport)
{
Nan::HandleScope scope;
i... |
b68257004cde1e3c453aade5275ce674a346ad34 | 48022b8c059085d9b030fa382f136802d64daddd | soerenkoenig/owl | /owl/math/mesh_io.hpp | C++ | hpp | 7,413 | permissive | //
// .___.
// {o,o}
// ./)_)
// owl --"-"---
//
// Copyright © 2017 Sören König. All rights reserved.
//
#pragma once
#include "owl/color/color.hpp"
#include "owl/math/mesh.hpp"
#include "owl/io/ply.hpp"
#include "owl/io/off.hpp"
#include "owl/utils/file_utils.hpp"
#include "owl/ut... |
f024a8ce27306d8653d2f0adb57befe3af508e4e | 904a89e5ba7f9a3b125ef63abe70c09fdbbd19e9 | psunkari/spicebird | /mailnews/import/outlook/src/MapiMessage.cpp | C++ | cpp | 21,729 | no_license | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
789302ba111a84cd0b0a36c317066836921acfee | f5578f68d49f097e06085dd5f26eb2ab6782715a | AprilAndFriends/hltypes | /lib/rapidxml/rapidxml.hpp | C++ | hpp | 125,603 | permissive | #ifndef RAPIDXML_HPP_INCLUDED
#define RAPIDXML_HPP_INCLUDED
// Copyright (C) 2006, 2009 Marcin Kalicinski
// Version 1.13
// Revision $DateTime: 2009/05/13 01:46:17 $
//! \file rapidxml.hpp This file contains rapidxml parser and DOM implementation
// If standard library is disabled, user must provide implemen... |
82cecd1210ee23cfc5f94af599858886776cf73a | 7e952af4df833a5d26cddebbf3baa5511b59fa9b | Firaasss/CS-3307 | /Lectures/Design Patterns Code/behavioural_patterns/observer/Subject.cpp | C++ | cpp | 557 | no_license | #include <algorithm>
#include "Subject.h"
using std::find;
using std::vector;
void Subject::attach(Observer* o)
{
if (find(_observers.begin(), _observers.end(), o) == _observers.end())
this->_observers.push_back(o);
}
void Subject::detach(Observer* o)
{
vector<Observer*>::iterator it;
it = find(_observers... |
e4c5aafb1006c703a19c72c4960b0d67ec9f79c4 | 42b9b4b6da23979a1972f737365c1922ca9e52b9 | VictorTo100/BaruchCplusplus | /Level_9/Visrrut Assignments/DD_project_9E/DD_project_9E/TestSingleCurve.cpp | C++ | cpp | 878 | no_license | // TestSingleCurve.cpp
//
// Displaying a single curve on one Excel sheet.
//
// Modification dates:
//
// 2007-3-3 DD Kick-offs
// 2007-7-23 DD Some schemes (e.g. IE added)
// 2007-7-27 DD derivative-free scheme
// 2009-6-14 DD clean up
// 2012-1-17 DD for QN
// 2017-3-14 DD Lite version
//
// (C) Datasim Education BV... |
c49f46e1c82a02da71f2d6832c0923c0451e81da | a5b3eb1b158294f1d02bade8131e837d1f8e541b | zotlann/cs466Hewitt | /PA2/metadata.cpp | C++ | cpp | 13,696 | no_license | //--------------------------------------------------------------------
// Jonathon Hewitt
// metadata.cpp
// Implementation of the Code and MetaData classes along with
// relevant functions
//--------------------------------------------------------------------
#include "metadata.h"
//Default Constructor for Code
//t... |
0f19db1068578262742fadb25df918ca6d62060d | 0355fdfd208d40713dbe5fb056454e8e0d6ae581 | misachi/duckdb | /src/common/types/chunk_collection.cpp | C++ | cpp | 20,668 | permissive | #include "duckdb/common/types/chunk_collection.hpp"
#include "duckdb/common/exception.hpp"
#include "duckdb/common/printer.hpp"
#include "duckdb/common/value_operations/value_operations.hpp"
#include "duckdb/common/operator/comparison_operators.hpp"
#include "duckdb/common/assert.hpp"
#include <algorithm>
#include <c... |
829fc59ac03b77fb5ba3fde98cfc7f9a63bc6a39 | 48b04d3ec798033eade76ff6641d66fbc9dfcfbc | Donmanu/SysProg | /Symboltable/src/Symboltable.cpp | C++ | cpp | 7,048 | no_license | /*
* Symboltable.cpp
*
* Created on: Sep 26, 2012
* Author: knad0001
*/
#include "../includes/Symboltable.h"
/* ------------------- SymTabEntry ---------------------- */
SymTabEntry::SymTabEntry(Key* key) {
this->key = key;
this->next = NULL;
}
SymTabEntry::~SymTabEntry() {
delete this->next; // trigg... |
d5d085ca6bfa06eaa7ff0dacff0578c2e5aedbcf | de546270e9ce3ff8190591ff975b9ae4b6ab78ca | Giho-Lee/nowcoder-homework | /括号序列.cpp | C++ | cpp | 789 | no_license | /*
题目:https://www.nowcoder.com/practice/37548e94a270412c8b9fb85643c8ccc2
*/
class Solution {
public:
/**
*
* @param s string字符串
* @return bool布尔型
*/
bool isValid(string s) {
// write code here
stack<char> stack_ch;
for (int i = 0; i < s.length(); i++) {
... |
d9a1855208a6167e5120508d10cc72ce5eccdfb4 | 4ee139ac4f94b0fe8db6b409fe107f60aacc30ee | pkoshevoy/aeyae | /yaeui/yaeTimelineModel.cpp | C++ | cpp | 24,338 | no_license | // -*- Mode: c++; tab-width: 8; c-basic-offset: 2; indent-tabs-mode: nil -*-
// NOTE: the first line of this file sets up source code indentation rules
// for Emacs; it is also a hint to anyone modifying this file.
// Created : Sun May 1 13:23:52 MDT 2011
// Copyright : Pavel Koshevoy
// License : MIT --... |
9b5adb924656cc890525a5bc24c8bf14d3eb42e7 | c52b458662bd0adbd2fcab6cb4a608c454bcc38f | stuartAllenZA/masterGFX | /src/Drop.cpp | C++ | cpp | 593 | no_license | #include <Drop.hpp>
Drop::Drop() {
std::cout << "Drop Default Constructed\n";
}
Drop::Drop(std::pair<int, int> xy) : _xy(xy) {
std::cout << "Drop at x: " << xy.first << " y: " << xy.second << " Constructed\n";
}
Drop::Drop(Drop const & src) {
std::cout << "Drop Copy-Constructed\n";
*this = src;
}
Drop::~Drop() ... |
00c4749271dfdc918a56ca08e1ad79dc6c4bce72 | 5a080194e504c5c669552e8a688df73e427f4b10 | kuroyis/surveyor | /saveselect.cpp | C++ | cpp | 3,636 | no_license | #include "saveselect.h"
#include "ui_saveselect.h"
#include"mypushbutton.h"
#include"player.h"
#include<QFile>
saveselect::saveselect(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::saveselect)
{
ui->setupUi(this);
this->setFixedSize(1000,600);
this->setWindowIcon(QPixmap(":/image/ma... |
23b743b84128cb08bccb46e843380d85071ba3bb | f3d27b1b89ff713c16f14aa44423a93fe409c1bc | hewr1993/SAE_Sampling | /base/src/eigen_triangle.cpp | C++ | cpp | 9,435 | permissive | #include "eigen_triangle.h"
#include <vector>
#include <cmath>
#include <sstream>
#include <stdio.h>
#include <string>
#include <iostream>
#include <complex>
#include <Eigen/Dense>
#include <Eigen/Sparse>
#include <cmath>
#include <algorithm>
#include "areig.h"
#include "lnmatrxc.h"
#include "lsmatrxa.h"
#include <set>... |
37b3aea830fb8423af9df31c140be071ecbf6b6f | a3425e77fdf2a3e4145802b7f35591c4757e1471 | manGoweb/BLEDataTransfer | /firmware/examples/FW/1.0/peripheral/BDTMD5.cpp | C++ | cpp | 8,547 | permissive | #include "BDTMD5.h"
BDTMD5::BDTMD5()
{
//nothing
return;
}
char* BDTMD5::make_digest(const unsigned char *digest, int len) /* {{{ */
{
char * md5str = (char*) malloc(sizeof(char)*(len*2+1));
static const char hexits[17] = "0123456789abcdef";
int i;
for (i = 0; i < len; i++) {
md5str[i... |
c921f16c0b9c2be73276e9b3c4f861e1dd0a1ba5 | b863fa027b13ca8db331f318ef498509f97099f9 | timchoh585/Inline-Engine | /Externals/include/Mathter/MatrixModules/Square.hpp | C++ | hpp | 2,659 | no_license | //==============================================================================
// This software is distributed under The Unlicense.
// For more information, please refer to <http://unlicense.org/>
//==============================================================================
#pragma once
#include "MatrixModule.h... |
a9d2731c5dea04a68c29f205004b2f1a7966e2c5 | 6dd706d41585695a727ee50488fe19da3e8f5058 | nkyllonen/CSCI5607 | /HW3/kyllo089_HW3_src/Scene.cpp | C++ | cpp | 1,591 | no_license | #include "Scene.h"
/*----------------------------*/
// CONSTRUCTORS AND DESTRUCTORS
/*----------------------------*/
Scene::Scene()
{
num_OBJS = 0;
minT = 0;
maxT = 5;
bg_COLOR = Pixel(0, 0, 0);
scene_LIGHTS.push_back(new Light(Pixel(0, 0, 0))); //first light is always AMBIENT
num_LIGHTS = 1;
}
Scene::~Scene(... |
42f6a5e9121b823bcc122277bea47f01f8ba7649 | 2b2ea6457a2b7cb292855d58eb9825d199fe3cce | DDinghoya/streamline | /source/Library/CGameSettings.cpp | C++ | cpp | 15,912 | no_license | /****************************************************************************
* Copyright (C) 2010
* by Dimok
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any
* damages arising from the use of this software.
*
* Permission is g... |
b6e4daa867c518f0b47f4cfbdda7a731347d381c | 6f7ab2ccd4a44aeb41dce503193fe677c9770a6b | Moqi/tinyUnityDS | /source/tinyUnity/Engine.cpp | C++ | cpp | 353 | no_license | /*
* Engine.cpp
*
* Created on: Sep 1, 2014
* Author: awiebe
*/
#include "Engine.h"
namespace tinyUnity {
Engine::Engine() {
// TODO Auto-generated constructor stub
}
void Engine::Start()
{
//ComputePhysics();
//DrawScene();
//Destroy();
}
Engine::~Engine() {
// TODO Auto-generated destructor stu... |
820ed699f07c3352d110358aaddeefca0643f3fd | 6b5e29db27f125d218bb012d1b1e58e75d2aa005 | palanglois/metro- | /Triangle.cpp | C++ | cpp | 4,407 | no_license | #include "Triangle.h"
using namespace std;
using namespace tinyply;
using namespace Eigen;
Triangle::Triangle() : a(Point(0., 0., 0.)), b(Point(0., 0., 0.)), c(Point(0., 0., 0.))
{
}
Triangle::Triangle(Point _a, Point _b, Point _c) : a(move(_a)), b(move(_b)), c(move(_c))
{
}
double Triangle::getArea() const
{
... |
a32058d2e776661ae997348e9c2b3191edb00241 | 7a51eee92c8c0864f595f2526ad2e9eee7f5a419 | CalebKang/TizenRT | /apps/examples/testcase/ta_tc/media/utc/utc_media_main.cpp | C++ | cpp | 2,658 | permissive | /****************************************************************************
*
* Copyright 2018 Samsung Electronics 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... |
c72634e4b10d5910b99a7fc4c27bf3dfd2b8b782 | 49b31af5c524becc4c7e56d984c765291347b587 | Shadow-Step/Big-Business | /EngineData.cpp | C++ | cpp | 1,324 | no_license | #include "EngineData.h"
Font EngineData::font;
Sprite Cursor::cursor;
Texture Cursor::texture;
Vector2f EngineData::winsize;
Vector2f EngineData::mousepos;
vector<string>EngineData::strings;
vector<MsgBox>EngineData::msgbox;
float EngineData::clicktime = 0;
float EngineData::clicktimeMax = 0.2;... |
ba6b20ceab7a22d6fd8b64c5ae07b42be714d9e8 | 4c76f981d96048c96ee4843640412263d2bb93bc | HekpoMaH/Olimpiads | /grupa C/olimpiada/oblasten/2011/raboti/Sofia/Sofia/E/IDI/kapri.cpp | C++ | cpp | 775 | no_license | #include<iostream>
using namespace std;
long long ura,i,j,brch,pom,nomer,poslcifri,polchisla[2],chislo,br;
int main(){
ura=0;
cin>>brch;
for(i=0;i<brch;i++)
{
poslcifri=1;
br=0;
nomer=0;
cin>>chislo;
if(chislo==1)
{
ura++;
}
else
{
for(j=1;j<=chislo;j=... |
c7f2f79b579f5f88cd84df62d8bb3e5f1bca2dc5 | eb4a6c1bd3590b4fa7bde723527a522fc9431424 | GPUOpen-LibrariesAndSDKs/RadeonProRenderBlenderAddon | /RPRBlenderHelper/RPRBlenderHelper/dllmain.cpp | C++ | cpp | 1,108 | permissive | /**********************************************************************
* Copyright 2020 Advanced Micro Devices, 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.o... |
d5c113cf97b5d42a7fe18ae2ee10dc570154bacf | 111bb4e48e476e00f18a367ae487560dc1c4f06a | CSUN-COMP587-F18/chromium | /components/password_manager/core/browser/votes_uploader.cc | C++ | cc | 22,789 | 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 "components/password_manager/core/browser/votes_uploader.h"
#include <ctype.h>
#include <map>
#include "base/metrics/histogram_macros.h"
#inclu... |
65d200729defd8a4814eba00e25939a3a6c289d3 | a1bcc70d69ee691f22a497182cd46f0a7925a9be | amoylel/fcppt | /include/fcppt/math/dim/object.hpp | C++ | hpp | 443 | permissive | // Copyright Carl Philipp Reh 2009 - 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef FCPPT_MATH_DIM_OBJECT_HPP_INCLUDED
#define FCPPT_MATH_DIM_OBJECT_HPP_INCLUDED
#include <f... |
ac9bd9e04e1c42b7bdb3e1f962b4575845c8abda | 3552d9a27a933f833052542cf1b2e5ddd9d7701c | zhaoziy/Algorithm | /TreeToSequence-Non-Recursive/TreeToSequence-Non-Recursive/TreeToSequence-Non-Recursive.cpp | C++ | cpp | 2,706 | no_license | // TreeToSequence-Non-Recursive.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include <vector>
#include <stack>
using namespace std;
struct TreeNode
{
int val;
struct TreeNode *left;
struct TreeNode *right;
/*TreeNode(int x) : val(x), left(NULL), right(NULL)
{
}*/
};
class TreeToSequence
{
p... |
4207308062e85ac39326d91745b2003888ebf686 | b0a1a017fe3f0af19a39d11e1418ef5e96d1d7c9 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/R+dmb.sy+dmb.ldla.c.cbmc_out.cpp | C++ | cpp | 26,553 | no_license | // Global variabls:
// 0:vars:2
// 2:atom_1_X2_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
#define ADDRSIZE 3
#define LOCALADDRSIZE 2
#define NTHREAD 3
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_r... |
978570c9e53aede0cd6939e40b6a7970974ab992 | e9b370706ce383a230a5955a620e33ac80489113 | RIFAT1819/Problem-Solving | /Toph/Dr. Tanzil's Island.cpp | C++ | cpp | 368 | no_license | /*Bismillahhir Rahmanir Rahim*/
/*Ahamed Imtiaz Rifat*/
/*Varendra University*/
#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int main(void)
{
int t;
double r;
cin >> t;
while (t--)
{
cin >> r;
cout << fixed << setprecision(6)... |
3e426de58882b524db9ff6a7ecd51dee1e93026e | 9aaa6146acece99d94eaf3646227171cc3d96d7f | blinker-iot/blinker-library | /src/modules/ArduinoJson/ArduinoJson/Polyfills/type_traits/is_base_of.hpp | C++ | hpp | 670 | permissive | // ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// MIT License
#pragma once
#include "../../Namespace.hpp"
namespace ARDUINOJSON_NAMESPACE {
// A meta-function that returns true if Derived inherits from TBase is an
// integral type.
template <typename TBase, typename TDerived>
cla... |
052bedcbc561a7d62b13e7e47a081d07aaf94cd6 | 30c47a45074b7253922d2430dcf8cbf1fc9b10aa | devymex/NotifyStartup | /NetChecker.cpp | C++ | cpp | 2,328 | no_license | #include "stdafx.h"
#include "NetChecker.h"
CComModule _NetModule;
class ATL_NO_VTABLE CEventSink
: public CComObjectRootEx<CComSingleThreadModel>
, public INetworkListManagerEvents
{
DECLARE_NO_REGISTRY()
BEGIN_COM_MAP(CEventSink)
COM_INTERFACE_ENTRY(INetworkListManagerEvents)
END_COM_MAP()
DECLARE_PROTECT_F... |
dda2125709f08cf5ca54e355dcca2e1f53b1f070 | 8495a85f54da6a40958da4daecf4ae8f08edf76e | LLNL/FGPU | /openmp/omp_use_device_ptr_example/saxpy_omp45_cuda_c.cc | C++ | cc | 616 | permissive | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "kernels.h"
void testsaxpy_omp45_c()
{
int N = 1<<21;
int a = 2.0f;
float *x, *y;
x = (float*)malloc(N*sizeof(float));
y = (float*)malloc(N*sizeof(float));
for (int i = 0; i < N; i++)
{
x[i] = 1.0f;
y[i] = 2.0f;
}
#pragma omp t... |
fe2a91da1fa9736fea6c907e720725bec3549d3f | 1ef29d98eee9471d9b560bc4748ab510019f21a2 | adolfo1994/Fibonneo | /TcpClient.cpp | C++ | cpp | 1,533 | no_license | //
// Created by adolfo on 29/04/16.
//
#include "TcpClient.h"
void TcpClient::connect_socket() {
this->sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
memset(&this->addr, 0, sizeof(struct sockaddr_in));
this->addr.sin_family = AF_INET;
this->addr.sin_port = htons(this->server_port);
inet_pton(A... |
dde34a8940856f2a85f4d99d6ba9f63ccade61b2 | 819d39362ca95794c6c4cdce63a0eeeff8db889a | davewang/A-Path | /A*Path/Box2DPathfinding.cpp | C++ | cpp | 11,837 | no_license | //
// Box2DPathfinding.cpp
// A*Path
//
// Created by Dave on 12-10-13.
//
//
#include "Box2DPathfinding.h"
CCLayer* Box2DPathfinding::runRecipe()
{
//Set game area size
gameAreaSize = ccp(1000/PTM_RATIO,600/PTM_RATIO); //Box2d units
//Superclass initialization and message
GameArea2D::runRecipe();
me... |
cf803457395ed367bfe760fcd41d21df027231d5 | cec4f94254d4e5f39467f00c8b6c68924990f3df | HonkeeChan/leetcode | /company/toutiao/main.cpp | C++ | cpp | 4,463 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <unordered_set>
#include <cstdio>
using namespace std;
void getword(const string& para, vector<string>& );
int main() {
int n, m;
cin >> n >> m;
vector<string> paragrah;
vector<string> query;
vector<unordered_set<string>> vset;
fo... |
bdcfe67f1cc578589c339eaa902de603d8ee94e0 | 8bed32e3f984fa2a9e56c4e6fd03bb23ca1c7e15 | 2bbb/bit_by_bit | /include/bbb/tmp/variadic/operation/insert.hpp | C++ | hpp | 2,994 | permissive | /* **** **** **** **** **** **** **** **** *
*
* _/ _/ _/
* _/_/_/ _/_/_/ _/_/_/
* _/ _/ _/ _/ _/ _/
* _/ _/ _/ _/ _/ _/
* _/_/_/ _/_/_/ _/_/_/
*
* bit by bit
* bbb/tmp/variadic/operation/insert.hpp
*
* author: ISHII 2bit
* mail: ... |
9df148c41f79c99067fa0869ed6ea347a5a61519 | 41c4605e52ea942f29c21afe50ab930fd25a5900 | borgsoftwaresystems/clock-timer | /libraries/pico_explorer/pico_explorer.cpp | C++ | cpp | 3,492 | permissive | #include <math.h>
#include <string.h>
#include "hardware/gpio.h"
#include "hardware/pwm.h"
#include "hardware/adc.h"
#include "pico_explorer.hpp"
const uint8_t MOTOR1N = 8;
const uint8_t MOTOR1P = 9;
const uint8_t MOTOR2N = 10;
const uint8_t MOTOR2P = 11;
namespace pimoroni {
PicoExplorer::PicoExplorer(uint16_t ... |
9aa1929868643d582ccc356de68e1a9bfa8957ad | 71173569efdf1463e5305dbde05fe32f9e3676ac | nehalgupta8501/LeetCode- | /FibonacciNumber.cpp | C++ | cpp | 263 | no_license | class Solution {
public:
int fib(int N) {
int f=0, a=0, b=1;
if(N==0) return 0;
if(N==1) return 1;
for(int i=0; i<N; i++)
{
f=a+b;
a=b;
b=f;
}
return a;
}
}; |
554932502a7d1a3630548633889ee18c0511a8e2 | c96a0031d088b88e39797e644fecf9bac973b04d | KevinMazelin/chromium | /components/printing/renderer/print_render_frame_helper.cc | C++ | cc | 108,800 | 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/printing/renderer/print_render_frame_helper.h"
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <memory>
#... |
4871eccce43fc42636fc3b7d2ac67d5d601e16c5 | 75668306b7afc409562ff8cae03d682d21e28cd8 | ryos36/zc706_axis_io | /src/pf_read.cpp | C++ | cpp | 2,241 | no_license | /*
(c) Copyright 2013 - 2016 Xilinx, Inc. All rights reserved.
This file contains confidential and proprietary information of Xilinx, Inc. and
is protected under U.S. and international copyright and other intellectual
property laws.
DISCLAIMER
This disclaimer is not a license and does not grant any rights t... |
860ffaae1227e9282bbf70551ae82d0f05a82ec6 | 69d8a388d453cc17ebb194a13d43cbc0378ed181 | rapidsai/cudf | /cpp/include/cudf/io/data_sink.hpp | C++ | hpp | 6,916 | permissive | /*
* Copyright (c) 2020-2023, NVIDIA 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
7e54392015e58a711df775a3f25a404da4d393ed | 6dbac1465b94ac5376f1463de4e670cb336bc261 | robynec9/CS-162 | /Assn1/Pattern.hpp | C++ | hpp | 578 | no_license | /***************************************************
* Program Filename: Pattern.hpp
* Author: Robyn Schroeder
* Date: 1/16/2016
* Description: Pattern header file
* Input:
* Output:
***************************************************/
#ifndef PATTERN_HPP
#define PATTERN_HPP
#include <string>
#include <iostream>
//#i... |
491cd9d1869f0955d9bfb542d1b688abaed9631c | 8f2e94b402fb1e38e6640b97006a57a4a58683ec | tsnorri/libbio | /tests/int_vector.cc | C++ | cc | 2,425 | permissive | /*
* Copyright (c) 2018 Tuukka Norri
* This code is licensed under MIT license (see LICENSE for details).
*/
#include <catch2/catch.hpp>
#include <libbio/int_vector.hh>
namespace gen = Catch::Generators;
namespace lb = libbio;
SCENARIO("int_vector can be initialized with the correct number of values", "[int_vect... |
93aa0f83f68d6fa72bfff22984cc7926419610e5 | 2a506cd61b1719af7172342b3b936449e7d3d380 | wsldwo/CPlusPlus | /NOI/NOI1161.cpp | C++ | cpp | 946 | no_license | #include <iostream>
using namespace std;
int N,M,M_[2505];
long long DP[2505];
long long sumM_(int end)
{
long long r = 0;
for(int i = 1;i <= end;i++)
r += M_[i];
return r;
}
/*
动态规划法
DP[i] = min(DP[j] + M + DP[i - j])
DP[i]:表示把i头奶牛送到对岸所花最少时间
终于摸到了一点门路,这是我独立做出来的一道动态规划题
*/
long long cal()
{
DP[1] = M + M_[1];
fo... |
bd23403e24b4898455e1aee56f7a553fc720c70b | 89c3e6905e3a2f4172b84e9194aaf7b20a50d917 | equalent/source-2007 | /src_main/game/client/portal/fx_portal.cpp | C++ | cpp | 3,756 | no_license | //========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: Fizzle effects for portal.
//
//=============================================================================//
#include "cbase.h"
#include "ClientEffectPrecacheSystem.h"
#include "fx.h"
#include "FX_Spark... |
b687522f46e1ad98a5d350fe9b72b3d1f210f14d | 695d2cd90ad57247d1b3017fe0432d832cc8dffb | dev2l0per/ft_containers | /main.cpp | C++ | cpp | 2,419 | no_license | #include <iostream>
#include <string>
#include <deque>
#if 0 //CREATE A REAL STL EXAMPLE
#include <map>
#include <stack>
#include <vector>
namespace ft = std;
#else
#include "map.hpp"
#include "stack.hpp"
#include "vector.hpp"
#endif
#include <stdlib.h>
#define MAX_RAM 4294967296
#define BUFFER_SIZE 4096
struc... |
65788f6c507fd60e022a8cd37c6764db721d9964 | 4816e9255205ca2d24a5041884707c87fc014676 | Sanadiel/TeamPortfolio | /Source/TeamPortfolio/MainUI/UI_PC.cpp | C++ | cpp | 9,138 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "UI_PC.h"
#include "ResultFadeOutBase.h"
#include "MainUIBase.h"
#include "InventoryWidgetBase.h"
#include "../Item/Inventory.h"
#include "InventoryWidgetBase.h"
#include "EquipmentBase.h"
#include "../Instance/TotalLog_GameInstan... |
1a1b1c4603f0968c88edf53b45e05d8322cdf603 | 7e78d8b1ae68952de1efd321cae87d4df9d2dfa2 | alexbutirskiy/cppkoans | /03_datatypes/signedintegers.cpp | C++ | cpp | 698 | no_license | #include <iostream>
signed int value {-104};
// 104 in binary in C++ is 110 1000
// To get -104, flip all the bits and add 1
// so, 0010111 + 1 = 01 1000
// represent the `-` bit, so 101 1000
//
// so, bitwise 2-to-right gives us 1110 0110, and we insert two 1s (and not two 0s) on the left side because we have a sig... |
c5d7c50e3b6ee54249f1c53efb85eb7aab83a606 | b0abf7cc58d43e9c4c5ec9728c1ff0326488c0a5 | mortany/xray15 | /xray/plugins/Max/Export/EditObjectExportMAX.cpp | C++ | cpp | 6,394 | no_license | //----------------------------------------------------
// file: CEditableObject.cpp
//----------------------------------------------------
#include "stdafx.h"
#pragma hdrstop
#include "..\..\..\editors\ECore\Editor\EditObject.h"
#include "..\..\..\editors\ECore\Editor\EditMesh.h"
#include "Bone.h"
#include "Exporter.... |
d08c751978f1feeb629b8cf5f3c489b7b4055142 | 1ca7ace33196d4bd790416cc08418385aa342c48 | TagsRocks/anki-3d-engine | /src/anki/renderer/ShadowMapping.cpp | C++ | cpp | 26,880 | permissive | // Copyright (C) 2009-2019, Panagiotis Christopoulos Charitos and contributors.
// All rights reserved.
// Code licensed under the BSD License.
// http://www.anki3d.org/LICENSE
#include <anki/renderer/ShadowMapping.h>
#include <anki/renderer/Renderer.h>
#include <anki/renderer/RenderQueue.h>
#include <anki/core/App.h>... |
2b5face192eb9863301f574eac20e868b1567b5f | a924feca301e23fe26406ae7a3683f805c6cfee2 | projectceladon/hardware-interfaces | /oemlock/1.0/vts/functional/VtsHalOemLockV1_0TargetTest.cpp | C++ | cpp | 6,090 | permissive | /*
* Copyright (C) 2017 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... |
00d3e43b78d042b54e157c149f16984a4769152c | 603fa1ea01392f8264769edc4566f47bd48352a8 | saranshbht/bsc-codes | /semester-2/discrete-structures/prac14.cpp | C++ | cpp | 661 | permissive | #include<iostream>
#include<cmath>
using namespace std;
int main(){
int d,x,sum=0;
cout<<"Enter degree of polynomial:";
cin>>d;
int d_copy=d;
int *coeff=new int[d+1];
cout<<"Enter the coefficients:"<<endl;
for (int i=0;i<(d+1);i++)
cin>>coeff[i];
cout<<endl<<"Polynomial:"<<endl;
cout<<"f(x)= ";
for... |
50388d951f3bd75c7ff9c15001830ab1f0ba5992 | 466726a79abe23042d2ed93fbd420d13c0b40e9a | jjzhang166/WinNT5_src_20201004 | /NT/base/fs/remotefs/dfs/tools/dfsutil/dfsutil.hxx | C++ | hxx | 4,051 | no_license | #ifndef __DFS_UTIL_H__
#define __DFS_UTIL_H__
#include "lm.h"
#include "lmdfs.h"
#include <netdfs.h>
#include <dfsprefix.h>
#include <DfsServerLibrary.hxx>
#include <dfsmisc.h>
#include "Struct.hxx"
#include "misc.hxx"
typedef enum _DFS_API_MODE {
MODE_INVALID = 0,
MODE_API,
MODE_DIRECT,
... |
6fff152ad11b645c031dd71b19d5cab1ca60227c | dee626699acddcfdb6abcac3be1a0e5436c6b4e4 | tea2code/fantasy-rts | /src-plugins/vanilla-command/main/impl/CommandConfigImpl.cpp | C++ | cpp | 620 | no_license | #include "CommandConfigImpl.h"
#include <main/CommandIds.h>
frts::CommandConfigImpl::CommandConfigImpl()
: BaseDataValue(CommandIds::commandConfig(), 1, CommandIds::commandConfig(), 1)
{}
frts::IdUnorderedSet frts::CommandConfigImpl::getNotUndoableCommands() const
{
return notUndoableCommands;
}
unsigned i... |
40f4be3919d6e529a5c237dbb9ec64e81c54a803 | de3dfb883529b242f9544dc5f56e60591421074f | wyhsjtu/Parking-lot | /carparking.cpp | C++ | cpp | 1,841 | no_license | #include "carparking.h"
void CarParking(Vec* _pos,Vec* _anc,int* carflag,int lot){
int flag=*carflag;
Vec pos=*_pos;
Vec anc=*_anc;
if(lot<=4&&flag==3){
if(abs(pos.getX()-(34*lot-63))<2&&anc.getX()>0){
flag=6;
Vec d(34*lot-63,pos.getY());
pos=d;
... |
0c3088b003aab9a3cccb76d23f033c48820d190d | cb0ab54c5c42d7fb5979f7d3924110865a3abc4c | tail95/CPP_FromScratch | /Chapter6/Chap6_ex04.cpp | C++ | cpp | 287 | no_license | #include <iostream>
using namespace std;
class MyVector {
int* mem;
int size;
public:
MyVector(int n, int val);
~MyVector() { delete[] mem; }
};
MyVector::MyVector(int n=100, int val=0) {
mem = new int[n];
size = n;
for (int i = 0; i < size; i++) mem[i] = val;
}
int main() {
} |
b43ae9c9a98b684cc6c775ccdc2a2d4dc61a3307 | d88705af7b5a1d650f38f3216923a0fc05117fc4 | iridium-browser/iridium-browser | /components/segmentation_platform/internal/scheduler/model_execution_scheduler_impl.cc | C++ | cc | 8,117 | permissive | // Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/segmentation_platform/internal/scheduler/model_execution_scheduler_impl.h"
#include "base/logging.h"
#include "base/time/clock.h"
#include "base/time/time... |
91f3d9c1eafea3d8af4f4549f0a766a456444b28 | 143c80499aa900e5c166ef902d172274a3ed554c | aemior/code_train | /HDU4545/main.cpp | C++ | cpp | 1,507 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("test.txt", "r", stdin);
int T,m;
char ta,tb;
string MING, XI;
cin >> T;
for(int i=0; i<T; i++){
cin >> XI >> MING >> m;
vector<vector<char>> tab;
for(int j=0; j<m; j++){
cin >> ta >> tb;
... |
eea5cb9a107e01b957a927f9ab79808bda4502a4 | 58ea9ece46f728dbecbc13198ff887710cde2f5e | horoyoisawa/v8 | /src/diagnostics/objects-debug.cc | C++ | cc | 65,040 | permissive | // Copyright 2012 the V8 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.
#include "src/objects/objects.h"
#include "src/codegen/assembler-inl.h"
#include "src/date/date.h"
#include "src/diagnostics/disasm.h"
#include "src/di... |
7c7752f4e5033efcf052caa6113093295abdd33e | fd9864599c483a93537971d4b9194940facee446 | swift-nav/ros_rover | /erle/ros2_ws/build/geometry_msgs/rosidl_typesupport_opensplice_cpp/geometry_msgs/msg/dds_opensplice/Pose_Dcps_impl.cpp | C++ | cpp | 27,359 | no_license | #include "Pose_Dcps_impl.h"
#include "gapi.h"
#include "gapi_loanRegistry.h"
#include "Pose_SplDcps.h"
#include "ccpp_DataReader_impl.h"
#include "ccpp_DataReaderView_impl.h"
extern c_bool
__geometry_msgs_msg_dds__Pose___copyIn(
c_base base,
struct geometry_msgs::msg::dds_::Pose_ *from,
struct _geometry_m... |
96396bca372101639bd7eb8c418ae8dc0231b064 | 3aa8ab2c1890728ff58c8cb01ac104391ac9cf3f | davidkm2/globalmetin | /source/client/source/eterPythonLib/PythonWindow.cpp | C++ | cpp | 64,192 | no_license | #include "StdAfx.h"
#include "../EterBase/CRC32.h"
#include "PythonWindow.h"
#include "PythonSlotWindow.h"
#include "PythonWindowManager.h"
#ifdef ENABLE_RENDER_TARGET
#include "..\UserInterface\StdAfx.h"
#include "..\UserInterface\InstanceBase.h"
#include "..\UserInterface\PythonApplication.h"
#include ".... |
e716de0e5db6307f433b9218bd222d18a6185514 | 55c4aee426689ab7b3a9dd42c05f435b5887b3a0 | ARM-software/ComputeLibrary | /src/cpu/kernels/softmax/generic/sve/fp32.cpp | C++ | cpp | 1,714 | permissive | /*
* Copyright (c) 2021-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* 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
* ri... |
622ced303fba4c924f21ed6f0a24d80648632faa | 8c254f4cf1232f531c17f72e10c9fa31772cf604 | tshark101A/DS-A-assignments | /Day2/Day2_4.cpp | C++ | cpp | 401 | no_license | #include<bits/stdc++.h>
using namespace std;
int goodPairs(int arr[],int n)
{
int i,j,PairCount=0;
for(i=0;i<n-1;i++)
{
for(j=i+1;j<n;j++)
{
if(arr[i]==arr[j])
{
PairCount+=1;
}
}
}
return PairCount;
}
int main()
{
int n,x;
cin>>n;
int arr[n];
int i;
for(i=0;... |
41163074b8bf3314a816d35c19c6f1ab9f33a9a7 | 107db5b779c2c8d6861a2cb0aa38bc47c2f7dd2e | leonardo-s-mattos/sandbox-cpp | /src/stl/Maps.cpp | C++ | cpp | 660 | no_license | #include <cmath>
#include <cstdio>
#include <map>
#include <iostream>
#include <algorithm>
#include <utility>
using namespace std;
int main() {
int queries = 0;
cin >> queries;
map<string,int> students;
for(int i=0;i<queries;i++){
int query, grade;
string student;
cin >> query;... |
cf9cfc9b47a74978aa337cf539817783113eaa33 | 6d9e5e053265c02927b915edea47201fd0e47ddc | MSurfer20/test2 | /cpp-restsdk/model/CodedError_allOf.cpp | C++ | cpp | 5,391 | no_license | /**
* Zulip REST API
* Powerful open source group chat
*
* The version of the OpenAPI document: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 5.2.0.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "CodedError_allOf.h"
namespace org {
namespace openapitool... |
5a0e792a6591c2c6383445d36137f60d17ff9bbc | 81583c8aad4dde53d3bab1958328889c14623ba3 | descrip/competitive-programming | /euler/10.cpp | C++ | cpp | 357 | no_license | #include <bits/stdc++.h>
using namespace std;
const int LIM = 2000000;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
bool p[LIM];
fill_n(p, LIM, true);
p[0] = p[1] = false;
long long ans = 0;
for (int i = 2; i < LIM; ++i)
if (p[i]){
for (int j = 2; i*j < LIM; ++j)
p[i*j] = false;
ans += i;
... |
59452bcc670cd74b47bdfa992d8b6f690120a41b | 61da8e7fdbd9ff145300ba422d1f023614a8b5df | Lolirofle/wxGraphStructure | /src/graph/Edge.hpp | C++ | hpp | 462 | no_license | #ifndef __LOLIROFLE_WXGRAPHSTRUCTURE_GRAPHEDGE_HPP_INCLUDED__
#define __LOLIROFLE_WXGRAPHSTRUCTURE_GRAPHEDGE_HPP_INCLUDED__
#include <string>
#include "../wx.hpp"
namespace GraphStructure{
class Node;
class Edge{
protected:
Node& to;
std::string label;
float weight;
unsigned int count;
public:
Edge(No... |
7044b3abb41b9e8025ec5dcb93c3a25136f8eb5a | fdf7f5b2f1131b92e6f5a1849a4da00c5fde870d | tu-27-6/code-C-PTIT | /order12.cpp | C++ | cpp | 506 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
ll order12(ll arr[], ll n) {
ll res=1;
while(true) {
bool check=true;
for (ll i=0; i<n; i++) {
if (arr[i]==res) {
check=false;
break;
}
}
if (check) {
break;
}
else {
res++;
}
}
return r... |
090c1028642e268fd31dba318fd83d8b30dcb650 | 36028eab69a18dbddd1845528c3d530609d120ce | Jim-tech/connectedhomeip | /src/platform/cc32xx/ConfigurationManagerImpl.cpp | C++ | cpp | 5,687 | permissive | /*
*
* Copyright (c) 2020 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... |
01df3f1d2932d20d686ba25f75edf58dac9c2bea | f486fbb20aa6b0c63d2f209a425ddca286c3b881 | K-Wu/libcxx.doc | /test/std/containers/unord/unord.multiset/empty.pass.cpp | C++ | cpp | 1,111 | 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
//
//===---------------------------... |
5fbb042698bf28ef58cd28ae483734fe5293400d | 90c7aefdbc9c5be048144961f92e211e958c1393 | ajmarin/coding | /uva/Volume CVI/10660.cpp | C++ | cpp | 910 | no_license | #include <cstdio>
#include <cstdlib>
#define FORI(i,s,n) for(int i = s; i < n; ++i)
#define FOR(i,n) FORI(i,0,n)
int ans[8], p[32][3], v[8][2];
int min_sum, n;
int dist(int x1, int y1, int x2, int y2){
return abs(x1 - x2) + abs(y1 - y2);
}
int min(int a, int b){ return a < b ? a : b; }
void bt(int x, int cnt){
if... |
f5c6a52e17fca017e805f33b6f5a0eaab9ec2371 | f4ad6bf860af97f5be69388f806b1ec2bfcd7b4f | morethanwords/rlottie-web | /rlottie_wrapper.cpp | C++ | cpp | 3,727 | no_license | #include <stdlib.h>
#include <string>
#include <map>
#include <stdio.h> // comment
#include "rlottie.h"
#include <emscripten.h>
typedef unsigned char uint8_t;
typedef struct {
rlottie::Animation* player;
uint8_t *buffer;
int width;
int height;
} LottieHandle;
extern "C" {
EMSCRIPTEN_KEEPALIV... |
8bd79422e0a9652f6dd464b27988c1897cb15393 | a96258ae7c345be6ed2f669cf7afa4ff2843483c | thinkincforeveryone/putty-nd6x | /library/third_party/modp_b64/modp_b64.cc | C++ | cc | 7,664 | no_license | /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
/* vi: set expandtab shiftwidth=4 tabstop=4: */
/**
* \file
* <PRE>
* MODP_B64 - High performance base64 encoder/decoder
* Version 1.3 -- 17-Mar-2006
* http://modp.com/release/base64
*
* Copyright © 2005, 2006 Nick Galbreath -- n... |
24780149d8be91bc31d834301eaa9841e997c5d4 | 03226815cce277ac5cbeab03d0f821ed3f16d754 | ric2b/Vivaldi-browser | /chromium/content/browser/media/capture/mouse_cursor_overlay_controller.cc | C++ | cc | 4,859 | permissive | // Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/media/capture/mouse_cursor_overlay_controller.h"
#include <cmath>
#include <utility>
#include "base/bind.h"
#include "base/callback_helpers.h"
#incl... |
3a63b5592776a92ca8704561380a6f51422e8e1b | c446aefcd4df7d3efd1f55a1d381409ed593bda4 | 2019Shun/atcoder_submission | /Other/tdpc/tdpc_number_6396668.cpp | C++ | cpp | 3,536 | no_license | #include <bits/stdc++.h>
#include <vector>
#include <numeric>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9+7))
#define REP(i, n) for(int i=0;i<int(n);++i)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define RREP(i, n) for(int i=int(n)-1;i... |
7bb6d1fd9d3d26f11cdc849fc1b25b5f2615fba5 | e738e7fe8d756350b92f5f67d50f2dd3e1477ae7 | Devincf/simple_json | /include/simple_json_old.hpp | C++ | hpp | 7,301 | no_license | /**
* @file simple_json.hpp
* @author Devin-Can Firat (devinc.firat@gmail.com)
* @brief
* @version 0.1
* @date 2019-06-14 05:04
*
* @copyright Copyright (c) 2019
*
*/
#ifndef SIMPLE_JSON_HPP
#define SIMPLE_JSON_HPP
#define DEBUG
#include <string>
#include <vector>
#include <map>
#include <utility>
#inclu... |
21960caf47f5697bf3559a6a28f1c7b8b6b0a9a5 | cb009fc17997c79ebd2690515dd3c600fbf85baf | ailyanlu/ACM-13 | /ITMO/2008/20080913/K/sol.cpp | C++ | cpp | 817 | no_license | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <cmath>
#include <bitset>
#include <functional>
#include <queue>
#include <stack>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
using namespace std;
string s... |
230f17950419ea82e918e2e89951b8b94618968a | da565c7af15d6d2c1b8673ea246007d208c44663 | jiukouyin/CppLikeCSharp | /System/include/Switch/System/Net/WebRequest.hpp | C++ | hpp | 9,525 | permissive | /// @file
/// @brief Contains Switch::System::Net::WebRequest class.
#pragma once
#include <Switch/Abstract.hpp>
#include <Switch/Types.hpp>
#include <Switch/System/Object.hpp>
#include <Switch/System/String.hpp>
#include <Switch/System/IO/Stream.hpp>
#include <Switch/System/Threading/AutoResetEvent.hpp>
#include <Swi... |
a157808711fb5bd05799c4af77be083ffad7fbb8 | df4f720c3146730db39acbc11378b60356bf660a | winter-txieyyue/chromium | /net/socket/ssl_client_socket_impl.cc | C++ | cc | 67,412 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/socket/ssl_client_socket_impl.h"
#include <errno.h>
#include <string.h>
#include <algorithm>
#include <map>
#include <utility>
#inclu... |
93ae2e322cdd2ad69de9fd7bf83c7566e1c64a4e | f00382331cc8fc4678fa1132547c6d37adf828c7 | gmuc4i/vrforces_c2sim_interfaces | /c2simVRF/xercesc/include/xercesc/dom/DOMDocument.hpp | C++ | hpp | 36,263 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
640aa13f6572f86c4f1f73ee8433dfd67e4237ca | 00889ecfb93e418c00ffc4b673beae01d84558ad | ricbit/Oldies | /2000-12-brmsxwin/mount_window.cpp | C++ | cpp | 7,753 | no_license | //---------------------------------------------------------------------------
#include <vcl.h>
#include <stdio.h>
#include <dir.h>
#include <dos.h>
#include <io.h>
#include <fcntl.h>
#pragma hdrstop
#include "msxboot.h"
#include "mount_window.h"
extern unsigned char *diskA;
//------------------------... |
7c0c5f4d5d0d08daa93c7a6b88ef7266b997b6fc | 3a81739246e573a3ae07e330be758632398c46f7 | yinhaokai/Approximate-logic-optimization-for-ISFPRM-function | /select.cpp | C++ | cpp | 598 | no_license | #include "header.h"
int select(struct individual *oldpop,int popsize,double sumfitness) /* 轮盘赌选择*/
{
// extern float randomperc();
double sum, pick;
int i;
//pick = randomperc();
// srand((unsigned)time(NULL));
pick=(double)rand()/RAND_MAX;
sum = 0;
if(sumfitness != 0)
{
fo... |
14045ecbde60bb4d2d8b6c70c12b293c39c92e56 | 46c67c3f6fc006e9e60501e2765431365f0f56c5 | KhozmoS/Competitive-Programming-Solutions | /COJ/KhozmoS-p3095-Accepted-s957739.cpp | C++ | cpp | 347 | no_license | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1111111;
int Fib[MAXN];
void generar()
{
Fib[1] = 1;
Fib[2] = 1;
for(int i = 3 ; i < MAXN ; i++)
Fib[i] = ((Fib[i - 1] % 10) + (Fib[i - 2] % 10)) % 10;
}
long long n;
int main()
{
generar();
while(cin>>n)
cout<<Fib[n % 1... |
4e0c42907ee88013f04d56a8f2a36ecf5357a7b9 | 46bdcd6c71281645c567d9e0e0b35d60873176d8 | HeffU/socketio-client-ue4 | /Source/SIOJson/Private/SIOJLibrary.cpp | C++ | cpp | 6,524 | permissive | // Modifications Copyright 2018-current Getnamo. All Rights Reserved
// Copyright 2016 Vladimir Alyamkin. All Rights Reserved.
#include "SIOJLibrary.h"
#include "ISIOJson.h"
#include "Runtime/Json/Public/Dom/JsonObject.h"
#include "Runtime/Json/Public/Dom/JsonValue.h"
#include "SIOJsonValue.h"
#include "SIOJsonObjec... |
34be95ea11eb55ae0cbcad548698dd86cba5f556 | 4cb4f8395d9260252e3836ddb728673f8ba342fa | lfeng99/Competitive-Programming | /IOI/batch-scheduling-n2.cpp | C++ | cpp | 1,661 | no_license | #include <bits/stdc++.h>
using namespace std;
int n, S;
vector<pair<int,pair<int,int>>> qs[10010];
int idx[10010], T[10010], sumT[10010], F[10010], sumF[10010];
int intersect(pair<int,int> l1, pair<int,int> l2){
double ret = (double)(l1.first - l2.first)/(double)(l2.second - l1.second);
return (int)(ret + 1.0 - 1e... |
ce46cd89c9931501995e91e579210a7053e42be7 | abf99e6a14787a348b63728a923c5852d5896352 | katerega/MSCL | /MSCL/source/mscl/MicroStrain/Wireless/Features/NodeFeatures_vlink200.cpp | C++ | cpp | 9,190 | permissive | /*******************************************************************************
Copyright(c) 2015-2020 Parker Hannifin Corp. All rights reserved.
MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License.
*******************************************************************************/
#include "st... |
77e6f751aaa2d2bc54fbe687e28568264872f9e5 | afca29bfa198aa62feef3a029dcaaaca69e8a929 | tak2004/RadonFramework | /include/RadonFramework/System/Process/MemoryInfo.hpp | C++ | hpp | 904 | permissive | #ifndef RF_SYSTEM_PROCESS_MEMORYINFO_HPP
#define RF_SYSTEM_PROCESS_MEMORYINFO_HPP
#if _MSC_VER > 1000
#pragma once
#endif
namespace RadonFramework::System::Process {
struct MemoryInfo
{
/// This process has read permission for the memory information.
RF_Type::Bool MemoryAccessRights;
/// Total memory usag... |
2edf9658f21aebffefe47a512b993b41d1bdf2f8 | 474cc670ee77a57a0ae2cbfbb1b296c87d841e2e | Idutvuker/cmoonshine | /includes/glm/detail/type_vec1.hpp | C++ | hpp | 11,253 | no_license | /// @ref core
/// @file glm/detail/type_vec1.hpp
#pragma once
#include "qualifier.hpp"
#if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
# include "_swizzle.hpp"
#elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
# include "_swizzle_func.hpp"
#endif
#include <cstddef>
namespace glm
{
template<typename T, qualifier Q>
s... |
3eade2c490f87e49c082406d27a5c51b25aaac70 | fd21926e190b119a384b25c6112ad9f12ecf8d32 | Edwinzero/glm | /test/mat3_test.cpp | C++ | cpp | 261 | permissive |
#include <rtest.h>
#include "glm.h"
SUITE(mat3_test)
{
TEST(init)
{
glm::mat3 m;
glm::mat3 r(1.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 1.0f);
CHECK_EQUAL(r, m);
}
}
|
dc02c8d88936a6fe8a43451e373f04dd4dee5061 | 5f1b31a7de1f81ec5d3856251d16ef89f1e8a333 | Sajid576/UVA-problems-Solutions | /GCD_LCM/11388.cpp | C++ | cpp | 1,306 | no_license | #include<bits/stdc++.h>
#define ll long long
#define vll vector<long long>
#define lne '\n'
#define spc ' '
#define fst first
#define sec second
#define inout ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define fileopen system("input.txt"); freopen("input.txt","r",stdin); FILE *f=freopen("output.txt","w"... |
da391f36e6580098b294dc2aa5051de97975c3a8 | 94e5e1e025f1327751b37677cdb68a059a51b10a | FrankLuo426/IGME209_P1 | /project1_part3/UnitTest1/UnitTest1.cpp | C++ | cpp | 2,763 | no_license | #include "pch.h"
#include "CppUnitTest.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
extern "C" __declspec(dllimport) char* GetTeam();
extern "C" __declspec(dllimport) bool SetStart(int xpos, int ypos);
extern "C" __declspec(dllimport) bool SetMaze(const int** tempData, int width, int height);
ext... |
64d94568d4a248b4465547bced23388ec518d0e8 | e0e6af7aa70798de8e9e4e4cbc4c6cf32404ebb3 | SINHASantos/zetasql | /zetasql/public/interval_value.cc | C++ | cc | 43,815 | 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 ... |
f2e7a99d8d20eb0927d1519a6a7e40dc72f939f0 | 3b83ae9582d6db644f78604d946f63a5389ae355 | sgodbold/cpp-networking | /test/io_service_manager_suite.cpp | C++ | cpp | 4,327 | no_license | #define BOOST_TEST_DYN_LINK
#include "io_service_manager.h"
#include "boost_config.h"
#include <boost/asio.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/thread/future.hpp>
using boost::future;
using boost::promise;
using net::Io_Service_Manager;
struct A_Running_Perpetual_Service
{
A_Running_Perpetu... |
225fbc8e9aa16ee5d26d622f4620d65213991656 | ce5fcf86d4ece37df8674999f5a32057117dbe1d | congyuandong/LeetCode | /C++/LOJ_Invert Binary Tree/LOJ_Invert Binary Tree/main.cpp | C++ | cpp | 575 | no_license | //
// main.cpp
// LOJ_Invert Binary Tree
//
// Created by yuandong.cyd on 2017/3/16.
// Copyright © 2017年 congyuandong. All rights reserved.
//
#include <iostream>
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {... |
eeeea8b9adf25605fdaacbc9e6e969dc0ccfd35a | de0c4029b7b98e3ee1dae2898f0c089818939d4f | ssashish21/Data-Structure-Algorithms | /level1/14.Linked List/02display_list.cpp | C++ | cpp | 1,199 | no_license | #include<iostream>
using namespace std;
class Node{
public:
int data;
Node* next;
Node(int val){
data = val;
next = nullptr;
}
};
class LinkedList{
public:
Node* head;
Node* tail;
int size;
LinkedList(){
head = nullptr;
tail = nullptr;
size = 0;
}
bool isEmpty(){
return head == nullptr;
}
... |
83b1f5ce581bf6d4e39a0e445204eb8c7cadf76a | f221ff6f180ce12c4ed94f313b7d53653be5837f | VitalyKononenko/chromium | /ui/views/corewm/tooltip_controller_unittest.cc | C++ | cc | 31,448 | permissive | // Copyright (c) 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 "ui/views/corewm/tooltip_controller.h"
#include "base/at_exit.h"
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#... |
a92ec83a0fe277891041ae39aa31b993540d8d5f | 4651781f60e4e906835c2b77a858a55edd61a70a | alta-lang/alta-core | /src/util.cpp | C++ | cpp | 8,107 | permissive | #include "../include/altacore/util.hpp"
#include <stdexcept>
#include <cctype>
bool AltaCore::Util::isInFunction(const AltaCore::DET::ScopeItem* item) {
auto maybeScope = item->parentScope;
while (!maybeScope.expired()) {
auto scope = maybeScope.lock();
if (!scope->parentFunction.expired()) {
retu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.