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 |
|---|---|---|---|---|---|---|---|---|
999dff9bba8f821349ecca258eaf1da24695c2bf | 6f9e92f22feb403177de19623118fe76b624422c | Lucas1188/cesium-native | /CesiumGeometry/test/TestPlane.cpp | C++ | cpp | 1,661 | permissive | #include "CesiumGeometry/Plane.h"
#include "CesiumGeospatial/Ellipsoid.h"
#include <catch2/catch.hpp>
#include <glm/geometric.hpp>
using namespace CesiumGeometry;
TEST_CASE("Plane constructor throws if a normal is not normalized") {
CHECK_THROWS(Plane(glm::dvec3(1.0, 2.0, 3.0), 0.0));
CHECK_THROWS(Plane(glm::dvec... |
b7a8d71101261025f109725454099139212da483 | 2134c3364b7b7f4e7b8467335711cc51f5016052 | boralt/EmbeddedAI | /src/InteractionGraph.cpp | C++ | cpp | 3,962 | permissive | /*
* Copyright (C) 2017 Boris Altshul.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
#include "factor.h"
#include "json/json.h"
using namespace bayeslib;
Interactio... |
0b178dc0a171db431a7fcd8bc7d0e23cbd663c8a | 323bdaeed8334faa4b709de37bd7077d11ce42bc | aajjbb/contest-files | /URI/CountingOnes.cpp | C++ | cpp | 1,638 | permissive | #include <bits/stdc++.h>
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; }
template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; ... |
50538286ab81a7ee12e496068afbf347e88f9c43 | 5748083111b286a230cd5e43fc826864e51c3880 | liaoclarke/LeetCode | /Longest_Substring_Without_Repeating_Characters/solution.cpp | C++ | cpp | 1,648 | permissive | class Solution {
public:
/*
* Time complexity: O(n^3)
* Space complexity: O(min(n, m)), n is the size of string s, m is the size of the charset/alphabet */
int lengthOfLongestSubstring(string s) {
int n = s.size();
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i +... |
7985359dac7a5023ef75886e4e63cdc15fc45456 | c0a3fee1a1616528d1f990a1fcdc18d52df63f20 | ssh352/dolphin | /api/stock_ctp/trader.cpp | C++ | cpp | 6,329 | permissive | #include <cstring>
#include <cstdio>
#include <sstream>
#include "trader.h"
int Trader::m_sOrderRef = 0;
int Trader::m_sRequestID = 0;
void Trader::init()
{
m_pTradeApi->RegisterSpi(this);
m_pTradeApi->RegisterFront(const_cast<char*>(this->front_address.c_str()));
// 使客户端开始与后台服务建立连接
m_pTradeApi->Init();
}
void T... |
6190eee43faa8fd2ddf1c51a60168850d8838002 | 8a57e5b537f60c4deb09750036b21d9a8d4a4dd9 | pavelsuk/Keypad5BtnLib | /lib/Keypad5Btn.cpp | C++ | cpp | 1,052 | permissive | #include "Keypad5Btn.h"
// constructor; takes arguments specifying whether to enable internal pull-up
// and the default state of the pin that the button is connected to
Keypad5Btn::Keypad5Btn(unsigned char pin, unsigned char pullUp, unsigned char defaultState)
{
_pin = pin;
_pullUp = pullUp;
_defaultState = def... |
94d798024b37ef4cbbfdb1f562eceaeef051d628 | cb01fce5b4bbef7215dcca39b4de40be5978f6fd | Tnguy8/runtime | /src/coreclr/src/vm/diagnosticserver.cpp | C++ | cpp | 7,918 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "common.h"
#include "diagnosticserver.h"
#include "ipcstreamfactory.h"
#include "eventpipeprotocolhelper.h"... |
d474d3733208a13c488a48ff1a06d43f7a940a70 | a7bfdc1fb2710331bd65d0238239d3ce7b16847f | OpenFAM/OpenFAM | /examples/api/api_fam_max.cpp | C++ | cpp | 4,907 | permissive | /*
* api_fam_max.cpp
* Copyright (c) 2020 Hewlett Packard Enterprise Development, LP. All rights
* reserved. Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above cop... |
0c6396437c0e9e9ea4d652de2accc3434b9638eb | 23d9d8534ca715cfaf1f101e0c97141702c11fad | oturan-boga/Windows2000 | /private/inet/mshtml/src/site/base/doclyout.cxx | C++ | cxx | 9,555 | no_license | //+---------------------------------------------------------------------------
//
// Microsoft Forms
// Copyright (C) Microsoft Corporation, 1994-1995
//
// File: layout.cxx
//
// Contents: Layout management
//
//------------------------------------------------------------------------
#include "... |
7b6911cba160f9fedce2c59ce22e9abfbf12cc07 | ac199e92b08498f92ba30ba0ed2f557b98aeafae | ForNeVeR/leechcraft | /src/plugins/azoth/plugins/abbrev/shortcutsmanager.cpp | C++ | cpp | 3,638 | permissive | /**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2006-2014 Georg Rudoy
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organiz... |
9384885ba11d0e4bff75fb536e7acda59d71db3d | 706fb336b5631a42f25520987b8210c39435f4b4 | Laura-lc/leechcraft | /src/plugins/rosenthal/rosenthal.cpp | C++ | cpp | 3,683 | permissive | /**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2006-2014 Georg Rudoy
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organiz... |
99165698badd8645da03b3d0660ee0c438799e6c | ab3b90122f68bc6a38757c73c78f0d373f416241 | hongyunnchen/ariel | /ariel/profiler/writers.hxx | C++ | hxx | 702 | permissive | //===-----------------------------------------------------------*- C++ -*-===//
// (C) Copyright 2010 Bryce Lelbach
//
// Use, modification and distribution of this software is subject to the Boost
// Software License, Version 1.0.
//
// Relative to repository root: /credit/BOOST_LICENSE_1_0.rst
// Online: http://www.b... |
1948047c96525e55deb40ff5fb5fa4c803e8c0e2 | 937b5e69028fe0041ef7b1d1e035e64205d9a972 | rollfatcat/ProblemSet | /NPSC(國中組)/2010-初賽/CHg071.cc | C++ | cc | 655 | no_license | #include<iostream>
#include<cmath>
using namespace std;
int Len=7000;
bool N[7000]={};
int SUM[7000]={};
void SetArr(){
for(int i=0;i<Len;i++){
N[i]=1;
SUM[i]=0;
}
}
void Prime(){
N[0]=N[1]=0;
for(int i=2;i<pow(Len,0.5);i++){
if(N[i]!=0){
for(int j=2;j*i<Len;j++){
N[j*i]=0;
}
... |
8c285284dcbb4943eb18a8a3d55762dca887d6ea | 8c951a3f9efd77718beea0d48a3a41709b48e1bb | HenriqueEduardo1/Competitive-Programing | /BFS/Lápis de Cor(OBI 2015)/LC.cpp | C++ | cpp | 1,858 | no_license | #include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
#define i64 long long
#define sz(x) (int)(x).size()
#define fs first
#define sc second
#define eb emplace_back
#define UNVISITED 0
#define VISITED 1
#define INF 0x3f3f3f3f
#define vi vector<int>
#define vl vector<i64>
#define vvi ... |
966ace2b6b16c775e0eb3eb72d18c87e021c0e79 | df7c76ca592d16bed9b10eefc212a2f16c7b497a | meniossin/src | /cc/resources/layer_tree_resource_provider.cc | C++ | cc | 10,904 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/resources/layer_tree_resource_provider.h"
#include "base/bits.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build... |
b5e020f2d559f39eb26d781c37f85fcb1ede99f7 | a51b53a6cbdf086dc4fa663df872dfacf3f5ea23 | changfuwu/curve | /curvefs/src/client/fuse_volume_client.cpp | C++ | cpp | 11,432 | permissive | /*
* Copyright (c) 2021 NetEase 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... |
9396cdd88d6c605b145f4d36061b09f5630b3c5d | 7e50c1580f0231269a8b14e5ad686ddd4bb55f0e | GameDevery/DiligentCore | /Graphics/GraphicsEngineOpenGL/src/PipelineStateGLImpl.cpp | C++ | cpp | 11,709 | permissive | /*
* Copyright 2019-2020 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* 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/LICENS... |
1be490771e65f42aa706c4eeccc695df10e04c8d | 5176e63c72609c693e22a337f954ecc10ff3d470 | Sacheta/Using-Set-Class-to-implement-Red-Black-Tree | /REd-Black using SET.cpp | C++ | cpp | 1,611 | no_license | //simple execution of Red Black self balancing tree using set class
#include<iostream>
#include<set>
using namespace std;
int main(){
set<int>arr;
cout<<"Make selection: "<<endl;
cout<<"1. Insert a node"<<endl;
cout<<"2. Display the tree"<<endl;
cout<<"3. Check if node exists"<<endl... |
dfe657964f007427cf59e87d43708874cd2802da | 1df1c10921b6f2a89fa111b230da015ac4d3e03a | JonJazd/CS161 | /Teammain.cpp | C++ | cpp | 786 | no_license | #include <iostream>
#include <string>
#include "Player.hpp"
#include "Team.hpp"
using namespace std;
int main(){
Player one("K",12,3,4);
Player two("T",15,4,5);
Player three("R",7,1,1);
Player four("L",5,2,1);
Player five("G",3,0,0);
Team SA(one,two,three,four,five);
string a =... |
624f9310922e9a5abe4aa659b44e6fcb63efc385 | 076940fb7a2e81e5c352f14f9e62b361414c00b8 | MaimonLab/FicTrac | /library/ImgSource.cpp | C++ | cpp | 259 | no_license | /*
* ImgSource.cpp
*
* Created on: May 25, 2013
* Author: rjdmoore@uqconnect.edu.au
*/
#include "ImgSource.h"
ImgSource::ImgSource()
: _open(false), _bayerType(BAYER_NONE), _width(-1), _height(-1), _timestamp(-1)
{}
ImgSource::~ImgSource() {}
|
9a725cd204f9ee201861e2a240ee2b8ce80956d6 | 487175002f33dea8e4b2a0c6751ee7fe6f518134 | Dian-li/nethandle | /nethandle/src/tcp_helper.cpp | C++ | cpp | 5,108 | no_license | #include "tcp_helper.h"
#include <arpa/inet.h>
#include <iostream>
#include <string>
#include <net/ethernet.h>
#include <netinet/ether.h>
#include <pcap.h>
#include <string.h>
#include <netinet/if_ether.h>
#include <malloc.h>
#include "ether_helper.h"
#include "ip_helper.h"
#include <libxml/parser.h>
#include <libxml/t... |
240659853cb9ffa8a2a640750488a8d6ba787ab6 | ba08ce1bf109f6f4e15573333ed44c3918ff1988 | pombredanne/legion | /examples/full_ghost/ghost.cc | C++ | cc | 26,691 | permissive | /* Copyright 2016 Stanford University
*
* 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 agree... |
e6ea2479a249f6b5b0e1a2251f0b12070ab74757 | 9f3e2bf3ea9fce535bdfcbd889d01f0949b19cbb | ydcrow/refFoxuc | /系统模块/客户端组件/图像控件/DFontEx.cpp | C++ | cpp | 7,331 | no_license | #include "StdAfx.h"
#include ".\dfontex.h"
#include "D2DEngine.h"
CDFontEx::CDFontEx(void)
{
m_pWnd = NULL;
m_pD2DFont = NULL;
m_nWidth = 0;
}
CDFontEx::~CDFontEx(void)
{
//DeleteFont();
}
//创建字体
void CDFontEx::CreateFont( CWnd* pWnd, LPCTSTR strInfo, int nWidth, int nWeight )
{
if ( CD2DEngine::GetD2DEngine()... |
5c0a95c98e77c46750b59c017652c22a19e8a6f7 | 4ffe71e2713e66ce9a15f989d0aa7bff4b50538e | xiaoyiqingz/DocumentView | /DVMTest/MainFrm.cpp | C++ | cpp | 10,742 | no_license | // This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface
// (the "Fluent UI") and is provided only as referential material to supplement the
// Microsoft Foundation Classes Reference and related electronic documentation
// included with the MFC C++ library software.
// License ... |
ce9c5087818fa10d08eea8ace43e9cebd04fe639 | 8cd83d3f052206d8a71c3a16dab6c6c6dc8f0ad8 | daleiyang/AOAPCII | /AOAPC II Beginning Algorithm Contests/ch5/UVA.212.cpp | C++ | cpp | 3,409 | no_license | #include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
int opnum, bednum, otime, opToBed, opreset, bedreset, pnum;
struct patient{
int id, stime, rtime, roomId, sstart, send, bedId, bstart, bend;
char name[10];
patient(int id = 0, int stime = 0, int rtime = 0):id(id), stime(stime... |
08c000a7551829dbc57357f99f12d8ceaa4f7d93 | fbbb3fd7c7a5bb37850443cdabbddbdabacd1771 | fujunwei/chromium-crosswalk | /chrome/browser/chromeos/memory/low_memory_observer.cc | C++ | cc | 6,783 | 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 "chrome/browser/chromeos/memory/low_memory_observer.h"
#include <fcntl.h>
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#inclu... |
a527d7badd9a3487b1de9d2a5102a5d7f8d10cbb | 64004be2c03ad2a3bda9072224c9e53aff7ddf2d | damononliu/Elastos.OS | /Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/service/voice/AlwaysOnHotwordDetector.cpp | C++ | cpp | 22,526 | permissive | //=========================================================================
// Copyright (C) 2012 The Elastos 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
//
// ... |
dd401a7985b80a28c6c529f6d3b440eb65aee8da | a0992b39db6c03eab44fac621a5bcdaeedb2f305 | zpleefly/libscapi | /lib/libOTe/libOTe_TestsVS/OT_TestsVS.cpp | C++ | cpp | 2,384 | permissive | #include "stdafx.h"
#ifdef _MSC_VER
#include "CppUnitTest.h"
#include "OT_Tests.h"
#include "NcoOT_Tests.h"
#include "Common.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace tests_libOTe
{
TEST_CLASS(OT_Tests)
{
public:
TEST_METHOD(Transpose_TestVS)
... |
d31ed67102f24f1f31cd5b5677215ebb53a1b380 | 9f486eeceaccdb7175e1552782d97132e3a94567 | DilankaWeeras/CSCE_221 | /PA-2/221-A2-20a-code/DLList-class/DLList-main.cpp | C++ | cpp | 2,068 | no_license | // test of the DLList class
#include <iostream>
#include <cstdlib>
#include "DLList.h"
using namespace std;
int main ()
{
// Construct a linked list with header & trailer
cout << "Create a new list" << endl;
DLList dll;
cout << "list: " << dll << endl << endl;
cout << "Insert 10 nodes at back with value... |
bb89e500817beaa1f79b7ba8f7a596eb013befea | 5869ef74583dee4cb7ec22e899ff61ae68ba9959 | huahsing/median | /median_partialheap.cpp | C++ | cpp | 4,333 | no_license | #include "median_list.h"
#include <cassert>
MedianList::MedianList(int maxN)
{
capacity = maxN / 2 + 2; // 1 extra element (index 0 in array not used)
heap = new unsigned long int [capacity];
k = 0;
inputCnt = 0;
lastDiscardedSmallestValue = 0;
}
// helper function to compute current m... |
0d91801a216bec235e24c4eb8634905e0722987d | 79a4d330f623dce63ad5e96a004fb9271ae07ee5 | h19mili/sfml-stuff | /DND.text.cpp | C++ | cpp | 534 | no_license | #include <SFML/Graphics.hpp>
int main()
{
sf::Font font;
if (!font.loadFromFile("Black Clover Font.ttf"))
sf::Text text;
// select the font
text.setFont(font); // font is a sf::Font
// set the string to display
text.setString("Hello world");
// set the character size
text.setCharacterSize(24); // in pixels, not poi... |
851a86fd4ead5f810b407f7acad204cb9883e3ce | 16f6376ef367a1c184476a5dac05c2339e4fe8f9 | GeStanley/assignment3 | /testdriveRev1.cpp | C++ | cpp | 7,735 | no_license | #include <iostream>
#include <iomanip>
#include <string>
#include <cassert>
using namespace std;
#include "Fraction.h"
int main()
{
cout << "Test Fraction and Fractional Computation" << '\n';
cout << "----------------------------------------\n\n";
cout << "testing default ctor with Fraction f0;" ... |
2497ac31e9accd48970f32578f10246966da24e5 | 200c80ad1ab996bd9455a8dfae4529509836a3e8 | sekiya9311/Programming-Contest | /Atcoder/ARC079/D.cpp | C++ | cpp | 2,233 | no_license | #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <ma... |
67b058b28bab0c139b8fe31ac0cc264fbad50c5b | 654ea522ab0da19c177edd2a6813ee51bb78dcda | maxiang/TopCORemake | /GroupServer/src/Player.cpp | C++ | cpp | 19,280 | no_license | /* Generated by Together */
#include "excp.h"
#include "DataSocket.h"
#include "GroupServerApp.h"
#include "Player.h"
#include "Team.h"
#include "GameCommon.h"
_DBC_USING
Player::Player(uLong size)
:PreAllocStru(size),m_gate(0),m_gtAddr(0),m_refuse_sess(false),m_refuse_tome(false)
{
m_mtxCha.Create(false);
}
Playe... |
e5d104619cadafac880405751246fe67615ee00e | 81f778f65bef9f43e2132be5c6c96fecb137e1f7 | lqryo/leetcode | /c++/151-200/172_Factorial_Trailing_Zeroes.cpp | C++ | cpp | 655 | no_license | #include <functional>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <utility>
#include <stack>
using namespace std;
class Solution {
public:
// 参数:https://leetcode-cn.com/pro... |
3b4059f4dc15cf59c89ca8243242f8eae39eb18e | 509d757f090d25503a6863c563a73ab37c9daa15 | pierrebestwork/owl | /EXAMPLES/Apps/console/Test1.cpp | C++ | cpp | 2,108 | no_license | //----------------------------------------------------------------------------
//Test1
// Project Test1
//My Copmany
//Copyright 1998. All right reserved.
//
// SUBSYSTEM: Test1 Application
// FILE: Test1.cpp
// AUTHOR: Author
//
// OVERVIEW
// ~~~~~~~~
//
// Source file for impleme... |
48a3f4563f016ffdadb1d4913e9f2519569b3889 | 9108ed12d32853725d5f37dbaf84d065961504ee | emberger/4Pi-Ecalsim | /B4/B4c/src/B4PrimaryGeneratorAction.cc | C++ | cc | 7,397 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
72ab29621a4198e1356aa8ebf96aa40ffe7c72f1 | f449b3ddd922cc989ec1003be5605203138928b1 | liyunfei1994/MyProject | /Learning_C++/destructor_inherit.cpp | C++ | cpp | 1,198 | no_license | /*
2020年4月24日13:15:28
基类和派生类的析构函数
和构造函数类似,析构函数也不能被继承。
与构造函数不同的是,在派生类的析构函数中不用显式地调用基类的析构函数,
因为每个类只有一个析构函数,编译器知道如何选择,无需程序员干涉。
另外析构函数的执行顺序和构造函数的执行顺序也刚好相反:
创建派生类对象时,构造函数的执行顺序和继承顺序相同,
即先执行基类构造函数,再执行派生类构造函数。
而销毁派生类对象时,析构函数的执行顺序和继承顺序相反,
即先执行派生类析构函数,再执行基类析构函数。
*/
#include <iostream>
using namespace std;
class A{
... |
1dda11748b398c79137563630ec9f3e3ff42640e | 6d937f2ccc1607cf62c12eb2e396b7bdd75f81e1 | GyuJin-Cho/UE4_Study_game | /LevelTransitionVolume.cpp | C++ | cpp | 1,393 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "LevelTransitionVolume.h"
#include "Components/BoxComponent.h"
#include "Components/BillboardComponent.h"
#include "Main.h"
// Sets default values
ALevelTransitionVolume::ALevelTransitionVolume()
{
// Set this actor to call Tick... |
fd4e0eed2a25e7d8ac6611e7eacee2339dd6c0c9 | f096dc035044fe94d71990d200bef36df6ef755b | nabuter/G8BasicStructure | /ProjectG8/ProjectG8/F16HUD/AltTape.hxx | C++ | hxx | 1,559 | no_license | // ------------------------------------------------------------------
//
// item : AltTape.hxx
// made by : Clark Borst / Herman Damveld
// date : Tue Dec 14 21:24:00 2004
// category : header file
// description : Altitude tape class
// changes ... |
85628cb0cd0b35d7e94f4fa593d37b942dc67822 | a9524ac0af798cbe6ba7699aadadc403374a3c5c | jixhua/QQmlQuickBook | /sstd_utility/windows_boost/boost/math/tools/detail/polynomial_horner1_15.hpp | C++ | hpp | 4,572 | no_license | // (C) Copyright John Maddock 2007.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// This file is machine generated, do not edit by hand
// Polynomial evaluation using ... |
480b66a45c0a38a0c3b1c11bb73aa9fc22ae0620 | cb8813634d7f1a513be1f8a97be50d93b50167c8 | orakle/hiphop-php | /hphp/util/zend/zend_html.cpp | C++ | cpp | 28,206 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
12a85504cd3cbab7edc672f21fcf33bb5b2692c4 | 9261fea772c215fda2a075b143ebc6c2295273aa | denis-gubar/TopCoder | /II-206-3/Untypeset.cpp | C++ | cpp | 5,284 | no_license | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
// BEGIN CUT HERE
#include <Windows.h>
#pragma comment( lib, "Winmm" )
// END CUT HERE
typedef vector<st... |
f8a73db384b0addcd69435277a2ac28243c6e6ad | 923be4cb36eb576426ac295ab40585cd3c8b4c76 | vgerber/projectdraw | /src/Core/core.cpp | C++ | cpp | 19,827 | no_license | #include "core.h"
void initCore() {
Configurator::load();
Log::load(Configurator::get(Configurator::ProjectLogDir));
GLenum err = glewInit();
if (GLEW_OK != err) {
Log::write(LogType::Error, "Init failed - " + std::string((char*)glewGetErrorString(err)), "Init");
}
/*
//depth
glEnable(GL_DE... |
2689619dba2b1f082673ba447dc303bd6f811a43 | 7b567d448bb850bd537d5a027d2c03707695273c | HaikuArchives/BeMailDaemon | /config/ConfigWindow.cpp | C++ | cpp | 26,186 | no_license | /* ConfigWindow - main eMail config window
**
** Copyright 2001-2003 Dr. Zoidberg Enterprises. All rights reserved.
*/
#include "ConfigWindow.h"
#include "CenterContainer.h"
#include "Account.h"
#include <Application.h>
#include <ListView.h>
#include <ScrollView.h>
#include <StringView.h>
#include <Button.h>
#includ... |
f00998af2a23d647c000ff5646be38cd1cb3828e | 9445d79ad735eca160eed3f080f6af0e90999856 | brc-dd/dsa-coursera-assignments | /algorithmic_toolbox/programming_challenges/max_pairwise_product.cpp | C++ | cpp | 374 | permissive | #include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
using namespace std;
#define int long long
#define all(v) v.begin(), v.end()
#define iit istream_iterator<int>(cin)
int solve(vector<int> v, int n) {
sort(all(v));
return max(v[0] * v[1], v[n - 2] * v[n - 1]);
}
signed main() {
int ... |
bec5f2ed7a33ea1d3fdcec442595f32b2a1960e8 | 04531373b6c3f59852bc3a08488ee70a100c33b7 | Shubham28/TopCoder | /testprograms/BoxUnion.cpp | C++ | cpp | 4,172 | no_license | #include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <set>
#include <numeric>
#define FOR(A,B,C) for(int A=B;A<C;A++)
#define EFOR(A,B,C) for(int A=B;A<=C;A++)
#define RFOR(A,B,C) for(int A=B;A>=C;A--)
#define PB(A,B)... |
f70643d09738a2ed8c5ac309c4db7c117ffd675b | 53bbd1410225d26b958451e0683a32ca22ecafb9 | monopatis/cc-franz | /USBController/USB_Shield/Stream.cpp | C++ | cpp | 7,315 | no_license | /*
Stream.cpp - adds parsing methods to Stream class
Copyright (c) 2008 David A. Mellis. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the Li... |
0db73baf834dabcddbc48050b7f3af9f85bd41f4 | b215f97ccb2ce1bb594293a752de095b0080be48 | operativeF/Kvasir | /Lib/Chip/Unknown/STMicro/STM32F401x/FLASH.hpp | C++ | hpp | 6,072 | permissive | #pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//FLASH
namespace FlashAcr{ ///<Flash access control register
using Addr = Register::Address<0x40023c00,0xffffe0f8,0x00000000,std::uint32_t>;
///Latency
constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Reg... |
409b7ec76387135fbae79ed1de03c6e95757a582 | 25881333989de2f8b99c3b8bc76761015cfd36a6 | fsps60312/old-C-code | /C++ code/Uva Online Judge/Q1412-auxiliary.cpp | C++ | cpp | 207 | no_license | #include<cstdio>
int dfs(int dep,int sum)
{
if(sum>8)return 0;
if(dep==8)return 1;
int ans=0;
for(int i=0;i<=8;i++)
{
ans+=dfs(dep+1,sum+i);
}
return ans;
}
int main()
{
printf("%d\n",dfs(0,0));
}
|
1cbbaa0c8a76cba019a3749e2f57b91afbcfa181 | 03d2107a092e1efacb08f67136f96674cb0cf47e | skqoaudgh/Algorithm_studying | /Baekjoon/4485_Zelda.cpp | C++ | cpp | 1,420 | no_license | #include <cstdio>
#include <vector>
#include <queue>
#include <functional>
#include <utility>
#include <algorithm>
using namespace std;
const int MAX_V = 15625;
const int INF = 2000;
typedef pair<int, int> P;
int dx[] = {-1,1,0,0};
int dy[] = {0,0,-1,1};
int main()
{
int arr[126][126];
int idx = 1;
while(1)
{
i... |
1ef94ea03c38dd8f046a929642987591e4121d91 | 5e3df53552a5afe31ddb82396c0f4d7a9a3fad30 | musou1500/atcoder_answers | /abc042/c.cpp | C++ | cpp | 669 | no_license | #include <bits/stdc++.h>
#include <vector>
using namespace std;
int main(int argc, const char *argv[]) {
int n, k;
cin >> n >> k;
vector<int> vd(k);
for (int i = 0; i < k; ++i) {
cin >> vd[i];
}
sort(vd.begin(), vd.end());
auto check = [&](int m) {
string s = to_string(m);
bool ok = true;
... |
5aaf3a99e668b5dcc78d8e7df45dbfaebf7ea516 | 87cf18652ba90cfb7e7a523882020842f1eb5e47 | NTUwanderer/PECaveros | /contest/opencup/XV/CEurope/d.cpp | C++ | cpp | 462 | no_license | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define N 2020202
int n , c[ N ];
LL ans;
LL C2( LL x ){
return x * (x - 1);
}
int main(){
scanf( "%d" , &n );
for( int i = 0 , x ; i < n ; i ++ ){
scanf( "%d" , &x );
c[ x ] ++;
}
for( int i = 1 ; i < N ; i... |
f83a681eca75c230494abdb1a0304bdfd7ee5aa7 | 955af5e045821f94deb953acdf21d5201bf59b74 | GuardianRG/erebus | /src/view/gtk/gtk_gui_manager.cc | C++ | cc | 8,561 | permissive | #include <gtk_gui_manager.h>
#include <gtkmm/messagedialog.h>
#include <gtkmm/enums.h>
#include <gtkmm/window.h>
#include <string>
#include <memory>
#include <chrono>
#include <stdexcept>
#include <i_main_window_presenter.h>
#include <i_gui_object.h>
#include <i_view.h>
#include <i_view_window.h>
#include <main_win... |
88e7ddcdccaa86a607dec657994e3ead6893f2dd | 43a5d282b24c0d841044499676ae6096dd055974 | isoundy000/chromium | /mojo/public/c/system/thunks.cc | C++ | cc | 9,718 | 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 "mojo/public/c/system/thunks.h"
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
extern "C" {
static MojoSystemThunks g_thunks = {0... |
5b93246a91fb1fc4665be7f7ee10acb103f40650 | fec0fa831cb541efc48187ba875bef935f95c3a9 | yash-vm/SPOJ-solutions | /addition.cpp | C++ | cpp | 688 | no_license | #include <iostream>
#include <string>
using namespace std;
string add(string c0, string c1, string ans , int flag)
{
int c0l=c0.size();
int c1l=c1.size();
int i,adder,carry=0;
if(c0l>=c1l)
{
if(flag)
{
for(i=c0l-1;i>=c0l-c1l;--i)
{
char ch0=c0.at(i);
char ch1=c1.at(i-c0l+c1l);
adder=carry+(in... |
57669a1343aac9bf8d816d5541c1c12de45e6f8b | 820ae16b464920b12c5fb3896c01b33dddae8b32 | iCtz/cmd_sim | /oscilloscope/signaldata.cpp | C++ | cpp | 2,862 | no_license | #include "signaldata.h"
#include <qvector.h>
#include <qmutex.h>
#include <qreadwritelock.h>
class SignalData::PrivateData
{
public:
PrivateData():
boundingRect( 1.0, 1.0, -2.0, -2.0 ) // invalid
{
//初始 size = 1000 item
values.reserve( 1000 );
}
inline void append( const QPoint... |
ff2269ce05e13a989c70d086fa78d386e2562b8c | 47a36ddc5612a4e4001541e99d4c0016d8981cdd | mcanthony/gaffer | /src/GafferImage/Reformat.cpp | C++ | cpp | 14,320 | permissive | //////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2013-2015, Image Engine Design Inc. All rights reserved.
// Copyright (c) 2013, Luke Goddard. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted pr... |
094be78c85c1c461943b49d76ecab83227c552e3 | b8c8c4b363e6235309fde2661391443578df790f | albertllopart/SMW-Reborn | /Project/Motor2D/GuiElement.cpp | C++ | cpp | 449 | permissive | #include "GuiElement.h"
#include "j1App.h"
#include "j1Gui.h"
#include "j1Render.h"
GuiElement::GuiElement() {};
GuiElement::~GuiElement() {};
void GuiElement::Start() {};
void GuiElement::Update(float dt)
{
};
void GuiElement::Draw() {};
void GuiElement::OnClick() {};
void GuiElement::PositionUpdate()
{
iPoin... |
e9e51c682b0ae7b9eecf2a4259a5f382fd3b3f43 | 6f985229297f7ee4be265ad9b35754216c600bf6 | dawicorti-xpriment/v8 | /src/mips/regexp-macro-assembler-mips.cc | C++ | cc | 47,450 | 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/v8.h"
#if V8_TARGET_ARCH_MIPS
#include "src/code-stubs.h"
#include "src/log.h"
#include "src/macro-assembler.h"
#include "src/regexp-mac... |
e0ef0aa055b09ca2b817590a7eee658381a71c6b | 4e3237363bd394fbf120a05968aef2835befe581 | AeonLucid/SDK-DarwinProject | /SDK/DW_Overlay_structs.hpp | C++ | hpp | 1,115 | no_license | #pragma once
// Darwin Project (open_beta_2) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "DW_Basic.hpp"
#include "DW_CoreUObject_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Script Structs
//--------------------------------------------... |
468b10f6b9cde25a53ee9186f5a97511a520a1a7 | cd1700afd79ffbe78eb870313c92a2a299c82c8e | merlinblack/tlua | /src/EditString.cpp | C++ | cpp | 2,291 | permissive | /* -------------------------------------------------------------------------------
*
* The original of this file has been previously released to the public domain by
* Nigel Atkinson.
*
* See the wiki on www.ogre3d.org
*
* -------------------------------------------------------------------------------
*/
#inc... |
ba3eb2182294b248d3bd39bc47c8e9c8dc350745 | cf76b91c83f6bbab833bcf047c12fa7e5b1085c2 | twesterhout/walking-lanczos | /src/main.cpp | C++ | cpp | 8,310 | permissive | // Copyright Tom Westerhout (c) 2018
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of... |
1a9a61bb8ff15d8a53e7d28b45ec80e3c8bec3e8 | 6cd03c2c5d9f34d755856209e46b3bf6d50ae496 | khalid0007/C0-PEtEtiVE_C00Ding | /Hashing(String).cpp | C++ | cpp | 556 | no_license | struct Hashs
{
vector<int> hashs;
vector<int> pows;
int P;
int MOD;
Hashs() {}
Hashs(string &s, int P, int MOD) : P(P), MOD(MOD)
{
int n = s.size();
pows.resize(n+1, 0);
hashs.resize(n+1, 0);
pows[0] = 1;
for(int i=n-1;i>=0;i--)
{
hashs[i]=(1LL * hashs[i+1] * P + s[i] - 'a' +... |
038130f2dc16e102f72b5cdd99e24a99f8fd362f | b54404e66c4f76c54973470593d22bf30ae38045 | dlut414/Buy4Sell | /Market.cpp | C++ | cpp | 3,118 | no_license | ///cpp file for Market: handle market information
///author: HU FANGYUAN
///2017.11~
#include "Market.hpp"
#include "Agent.hpp"
using namespace std;
using boost::uuids::uuid;
using boost::uuids::random_generator;
Market::Market(){}
Market::~Market(){}
bool Market::doTransaction(){
try{
bool b = true, a = true;
fo... |
4789d4dfe64405fe8bedc19b4a072076d680ddde | c2936f5372a5ae210b6ffafcc11b161b0d725ad3 | hyyh619/irrlicht-1.8.3 | /source/Irrlicht/CTRGouraudWire.cpp | C++ | cpp | 11,884 | permissive | // Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#include "CTRTextureGouraud.h"
#ifdef _IRR_COMPILE_WITH_SOFTWARE_
namespace irr
{
namespace video
{
class CTRGouraud... |
d4f55daff8d101f570c88997f9f8d065eaa6520c | 003d83ed69d521e76249b3c98206dbe847c9a843 | sraihan73/Lucene- | /core/src/java/org/apache/lucene/document/DoublePoint.cpp | C++ | cpp | 6,763 | no_license | using namespace std;
#include "DoublePoint.h"
namespace org::apache::lucene::document
{
using PointValues = org::apache::lucene::index::PointValues;
using PointInSetQuery = org::apache::lucene::search::PointInSetQuery;
using PointRangeQuery = org::apache::lucene::search::PointRangeQuery;
using Query = org::apache::lu... |
a9fde40d253b437aa8cc50d920fc294ca6866bf5 | f02b82d7db0b90bdea0f736a25298b4868560bae | joyfish/cocos2d | /CrazyFarm/Classes/CircleBy.cpp | C++ | cpp | 2,600 | no_license | #include "CircleBy.h"
CircleBy* CircleBy::create(Point curPos, float duration, float degrees, float speed, bool clockwise){
CircleBy* pCircleBy = new CircleBy();
pCircleBy->initWithDuration(curPos, duration, degrees, speed, clockwise);
pCircleBy->autorelease();
return pCircleBy;
}
bool CircleBy::initWithDuration(... |
1ce143e364298ea407a760813eec1119cb38f03b | 5e1cd918cc028bbf2b3a7306ec5fcf275f7fbcb5 | Di0n/Kassakoppeling | /supermarket.cpp | C++ | cpp | 5,410 | no_license | #include "supermarket.h"
//#include "utility.h"
#include "logger.h"
#include "utils.h"
#include <stdlib.h>
#include <algorithm>
#include <iostream>
using std::string;
using std::cout;
using std::endl;
bool Supermarket::check_for_discounts(const string& receipt)
{
if (!(receipt.find(k35) != string::npos || receipt.... |
dd767a44e17e17af65d7e4838ca864e50d123b4c | 538bb8779f9658bda28340fd2fa73e20c3cd1999 | elgamar/cobalt-clone | /src/cobalt/browser/memory_settings/calculations.cc | C++ | cc | 6,584 | permissive | /*
* Copyright 2017 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... |
43d68ec28b6a81294a662deaf09475e3bc740975 | 74be35ada7db9fc5868f4e6c40b54b6e0774bbb6 | BryanValeriano/marathon | /codeforces/soCoda13/e.cpp | C++ | cpp | 1,299 | no_license | #include <bits/stdc++.h>
using namespace std;
#define fr(i,n) _back
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define fi first
#define se second
#define endl '\n'
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<ii> vii;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
c... |
7e10c5cf91a49d033a31ad79906ea18d5cc288db | ec525265044d4e4c21c6f0ebe53599c8630f8bec | RadonX-ROM/art | /runtime/gc/heap.cc | C++ | cc | 144,221 | permissive | /*
* Copyright (C) 2011 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... |
8e6f1044689eba1d52bd1ccc0746c4090d8d22a3 | 2d5f8b743161c28a645e49989200dfbf328e7235 | enotnadoske/drunos | /src/RestMultipart.hh | C++ | hh | 4,508 | permissive | /*
* Copyright 2016 Applied Research Center for Computer Networks
*
* 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 b... |
0052ca137768a24c40a668e982af8f717744415e | 063518d717af8d42473b0146e4f67bb84a05f26d | sadrulhc/chromium | /chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc | C++ | cc | 7,091 | 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 "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.h"
#include <memory>
#include <vector>
#include "base/bind.h"
#incl... |
485c8ff19a42ab03db652c150120b41a3e972428 | d03f39df15ae8a8b0de7d7f23340dcbf1fe9f701 | hussamabdellatif/Algorithms | /count_complete_b_tree.cpp | C++ | cpp | 888 | no_license |
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
static const auto io_sync_off = []() {
std::ios::sync_with_stdio(false);
... |
96aa427d842d2dd8cbab204c57bdf53563476fb7 | 257dabf592daeae42528534c2a9982652bcd8f49 | Mohammad-Yasser/harwest | /codeforces/158/A.cpp | C++ | cpp | 639 | no_license | #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <set>
#include <utility>
#include <map>
#include <string>
#include <cstring>
#include <cstdlib>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int main() {
int n, k... |
c50b1060eadc332b01f631c0b5262a563d6fa679 | 9c18d9b873e168b57f750d36cffc6b328e5ce31a | lcls-psana/psana_python | /pyext/Step.cpp | C++ | cpp | 2,862 | no_license | //--------------------------------------------------------------------------
// File and Version Information:
// $Id$
//
// Description:
// Class Step...
//
// Author List:
// Andrei Salnikov
//
//------------------------------------------------------------------------
//-----------------------
// This Class's ... |
0f5d54a36e1976776b12f8f40a0d6baa6efcacfa | 79bfa2d9d544f491086e81fc5b774683220a675a | TRYang/acm | /sgu/sgu_327.cpp | C++ | cpp | 2,950 | no_license | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <string>
#include <iostream>
#define maxn 15
using namespace std;
string a[maxn],b[maxn];
int f[1<<maxn][maxn<<1];
short g[1<<maxn][maxn<<1];
int lcp[maxn<<1][maxn<<1];
int tag[maxn];
int n;
int tmask;
string ans_str;
void init(int x,int y){
int l1... |
87a0cb0fba365c50b755a49c8457191418de2aba | b95cbe5f238e9e8f4517e9bcbbc8ee9221afdaea | B-BARTHMAN/Checkers-AI | /CheckersPlayer/CheckersPlayer/MainScene.cpp | C++ | cpp | 2,251 | no_license | #include "MainScene.h"
#include "MCSearch.h"
#include "NeuralNetInf.h"
#include "Singleton.h"
#include "TitleScene.h"
NeuralNetInf network;
float evaluate(const Position& pos) {
return network.forward(pos.toVector(pos.toMove));
}
MainScene::MainScene(Game* game)
:Scene(game)
{
//Load the network
... |
14a3b75557dff2c271996f703581785ab744619c | 2b049ec06f5414bb5215267ea8bd97c60cecc48e | dampers/algorithm | /19847.cpp | C++ | cpp | 892 | no_license | #include <bits/stdc++.h>
using namespace std;
#define swap(a, b) (a) ^= (b) ^= (a) ^= (b)
#define endl '\n'
#define int long long
using pii = pair<int, int>;
const double EPS = 1e-9;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
int32_t main()
{
cin.sync_with_stdio(NULL);
cin.tie(NULL);
... |
5d069e1472eb63030a71b09343779a0f9ac7a870 | 2db99d78e9868f6f780f8fc0b889b7a9fe5f13de | abel1502/mipt_2s | /ded32/SSE/CatPicture/picture.cpp | C++ | cpp | 5,570 | permissive | #include <cassert>
#include <chrono>
#include "picture.h"
using namespace sse;
PictureDisplay::PictureDisplay() :
PictureDisplay(L"./table.bmp", L"./cat.bmp") {}
PictureDisplay::PictureDisplay(const wchar_t *tableFileName, const wchar_t *catFileName) :
gdiToken{NULL},
tableBitmap{nullptr},
table{}... |
62fb8a8a066c6d58ca2e4340ae0669b2c909d919 | 76d008be93cee638df5a887dcb626a6643f768b6 | LEW21/soa | /service/zookeeper_configuration_service.cc | C++ | cc | 7,220 | permissive | /** zookeeper_configuration_service.cc
Jeremy Barnes, 26 September 2012
Copyright (c) 2012 Datacratic Inc. All rights reserved.
Configuration service using Zookeeper.
*/
#include "zookeeper_configuration_service.h"
#include "soa/service/zookeeper.h"
#include "jml/utils/exc_assert.h"
#include <boost/algor... |
f0c3ecd16c8cd46b91afcafb6c8c22272e81bfb9 | 0d82cf3d7413ec13f1151cb591c10172781efa22 | jaschadub/bitcoin | /src/crypto/chacha_poly_aead.cpp | C++ | cpp | 5,840 | permissive | // Copyright (c) 2019-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <crypto/chacha_poly_aead.h>
#include <crypto/... |
feb5ad7021ffb3575bb61d197f250f8fae82281f | f1ae9e8fd84b677f5d31274fa9249551e7bb4145 | jianglin2045/mega_GIT | /Qt/lib2/OscilloscopeBox/src/oscilloscopedata.hpp | C++ | hpp | 1,455 | no_license | //--------------------------------------------------------------------------------
#ifndef CURVE_DATA_HPP
#define CURVE_DATA_HPP
//--------------------------------------------------------------------------------
#include "qwt_series_data.h"
#include <QPointF>
//----------------------------------------------------------... |
56c2ab45bf1bdb7047ede74425ba561794f1ecb1 | 1933bfc57f34ff24df53abf6c921558fc2830538 | xinyu391/ncnn | /src/layer/convolution.cpp | C++ | cpp | 34,258 | permissive | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
426bf1f9353cf6d66d5bdc417a1b1ec404f57209 | b712f4fcf2c60e5f8cbe434bcdafe5698764977a | wdking04/Class-Roster | /networkStudent.cpp | C++ | cpp | 952 | no_license | #include <iostream>
#include "networkStudent.h"
NetworkStudent::NetworkStudent(std::string studentID, std::string firstName, std::string lastName, std::string emailAddress, int age, int* numDays, Degree degreeProgram)
: Student(studentID, firstName, lastName, emailAddress, age, numDays)
{
this->degreeP... |
87b62f5891bc53114821c1d77de1f7a92587019b | 56f8b296d31bc60604c8561a1f6d50d561791d46 | L0GI0/CPP | /Laboratories/Self-Made/Lab3.1/Samochod.cpp | C++ | cpp | 1,231 | no_license | #include "Samochod.h"
std::string Samochod::defaultColor = "Black";
void Samochod::DefaultColor(std::string color){
defaultColor = color;
}
std::ostream & operator <<(std::ostream &o, const Samochod & tP){
// [INFO] Mercedes A
// [INFO] Stan licznika 0 [km]
// [INFO] Kolor Czerwony
o << "[INFO] " << tP._model << ... |
73791faa742aec25db8092eb044be84c9a28dbf5 | 0c6c190d83304bd472ee0bf9dd5f6e2528ead757 | Thairam/OBI | /OBI/OBI 2012/Tira-teima.cpp | C++ | cpp | 250 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int x, y;
cin >> x >> y ;
if(x >= 0 && x <= 432 && y >= 0 && y <= 468) cout << "dentro" << endl;
else cout << "fora" << endl;
return 0;
} |
6fe956641cb533e0a182c30ee601d47631c8e302 | 4f40c408198d6980f7903a5bf212b5188e4db408 | fengcy-liu/simplyGame | /Code/gameHardWorld/src/role.cpp | C++ | cpp | 1,816 | no_license | #include "role.h"
/* 异常状态 */
char_t faultStatusString[ROLE_MAX_NUM_TYPE_OF_FAULT_STATUS][HALF_MAX_BYTES_OF_CHAR] =
{
L"正常",
L"石化",
L"麻痹",
L"中毒",
L"割裂",
L"失明"
};
/* 增益状态 */
char_t gainStatusString[ROLE_MAX_NUM_TYPE_OF_GAIN_STATUS][HALF_MAX_BYTES_OF_CHAR] =
{
L"",//正常
L"攻击up",
L"防御up... |
078676b09289794b3b2c73bb952ac614c3d7ec01 | cc7df608086781cf05d12e643ca20fa39e974d2a | svn2github/OpenMPT | /tags/1.22.07.00/unarchiver/unzip.cpp | C++ | cpp | 6,857 | permissive | /*
* unzip.cpp
* ---------
* Purpose: Implementation file for extracting modules from .zip archives, making use of MiniZip (from the zlib contrib package)
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#... |
3ab4114b858e430f6b9282953051cc961eb912c8 | 078b8e3e5fa5f035c33fe6657c37b18c827ac1d7 | chiaqi/TrustyOs-1 | /system/keymaster/openssl_err.cpp | C++ | cpp | 7,104 | 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... |
5b3295a820130a49416b9384b566700f7115847a | 5dc535f3c578681a5740712482db0907170e29a9 | chadez/chibios_cpp | /hacks.cpp | C++ | cpp | 236 | no_license |
/*
* The default pulls in 70K of garbage
*/
namespace __gnu_cxx {
void __verbose_terminate_handler() {
for(;;);
}
}
/*
* The default pulls in about 12K of garbage
*/
extern "C" void __cxa_pure_virtual() {
for(;;);
}
|
81f2b47e1d6e81a4b9d3e4b69b9ab03bc3c69d93 | 044c2f62c2bb058afc111ad18a728220e92b581b | lichenk/AlgorithmContest | /codeforces/356/A/A.cc | C++ | cc | 1,423 | no_license | #include <bits/stdc++.h>
#include <assert.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define PB push_back
#define MP make_pair
#define MOD 1000000007LL
#define endl "\n"
#define fst first
#define snd second
const ll UNDEF = -1;
const ll INF=1e18;
template<typename T> inline bool chkmax(T &aa,... |
7fd047d466b2d43d37f9b4ba98abc6b6396a01b1 | 2c1651f3b1b78e206abc9f874e57b3daecbe0c51 | IDAS-Labratory/Web-of-Things-Firmware | /firmware-back/src/publisher.cpp | C++ | cpp | 2,589 | no_license | #include <AsyncMqttClient.h>
#include "publisher.h"
#include "dashboard.h"
#include "configManager.h"
void onMqttConnect(bool sessionPresent) {
dash.data.brokerStatus = true;
Serial.println("Connected to MQTT broker successfully.");
Serial.print("Session present: ");
Serial.println(sessionPresent);
}
vo... |
9416768f555db602cf9c0e76e7698049b2ee94c9 | 93edae408c4d88afa9495582deb8f1d1795d05e4 | ScottHutchinson/Mastering-Cpp-Programming. | /Chapter-2/operations.cpp | C++ | cpp | 390 | no_license | #include <functional>
#include <iostream>
#include <unordered_map>
int main() {
int arr[]{1, 2, 3, 4};
std::unordered_map<char, std::function<int(int,int)> > operations;
operations['+'] = [](int a, int b) { return a + b; };
operations['-'] = [](int a, int b) { return a - b; };
for (auto& op: operat... |
a9dd9183d896a5304b4a15039b12bef653e6b8a3 | 8876a316adfae52ca6a99302860ea978a4827bad | Curlyfriez/Assignment-3-master | /Source/Common/Game/Player.cpp | C++ | cpp | 2,423 | no_license | //
// Player.cpp
// GAM-1532 OSX Game
//
// Created by Bradley Flood on 2013-03-07.
// Copyright (c) 2013 Algonquin College. All rights reserved.
//
#include "Player.h"
#include "Level.h"
#include "Tiles/Tile.h"
#include "../OpenGL/OpenGL.h"
#include "../Constants/Constants.h"
#include <stdlib.h>
#include <algorit... |
bc1cde9dafa296595fc05f4fe5b72d3a25f0b288 | a4293a0b23ab3d2ac6cbd7884f674bb67cb4b81a | Manu404/GameOfLife-3DS | /source/Universe.cpp | C++ | cpp | 5,788 | permissive | #include "Universe.h"
#include "Cell.h"
#include <string.h>
#include <stdlib.h>
#include "Globals.h"
#include <stdio.h>
#include <pattern_bgr.h>
Universe::Universe(Vector2* size)
{
this->universSize = size;
memset(cells, 0, (size->X * size->Y * sizeof(Cell*)));
GenerateCells();
PopulateNei... |
079a8b29d4843c4172afe84051aa91e2e2098abe | 9c5db634edff24ad9835087cb84ca0d132bfe067 | flizhou/data_structure_and_algorithm | /min_heap/kth_smallest_number.cpp | C++ | cpp | 2,531 | no_license | #include <iostream>
#include <vector>
using namespace std;
class MinHeap{
public:
MinHeap(int[], int);
void PercolateDown();
int Pop();
bool IsMaxHeap();
void Print();
private:
void PercolateDownHepler(int);
void ReBalance(int);
int* minHeap;
int size;
bool maxHeap;
void swap(int, int);
};
... |
4e9a7dd8e6ab24bab7d933dd0677fb5974e3adb1 | 42565130c49a13004941ef304429d22b688b9598 | CiscoDevNet/ydk-cpp | /cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_mpls_oam_oper.hpp | C++ | hpp | 133,615 | permissive | #ifndef _CISCO_IOS_XR_MPLS_OAM_OPER_
#define _CISCO_IOS_XR_MPLS_OAM_OPER_
#include <memory>
#include <vector>
#include <string>
#include <ydk/types.hpp>
#include <ydk/errors.hpp>
namespace cisco_ios_xr {
namespace Cisco_IOS_XR_mpls_oam_oper {
class MplsOam : public ydk::Entity
{
public:
MplsOam();
... |
c449dc1b949563cd8e71481cbba40e94826d3f03 | 0e234f2f96094dd084fd69221be678cba26c8438 | AungKyawZaww9/cprogramminglesson | /Deeper look C++/object as function argument.cpp | C++ | cpp | 828 | no_license | #include<iostream>
using namespace std;
class Distance
{
private:
int feet;
float inches;
public:
Distance() : feet(0), inches(0.0)
{ }
Distance(int ft, float in) : feet(ft), inches(in)
{ }
void getdist()
{
cout<<"\nEnter feet";
cin>>feet;
cout<<"\nEnter inches";
cin>>inches;
}
void sh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.