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 |
|---|---|---|---|---|---|---|---|---|
13b1b6273d8e1c9451c1ef12a29f81e02c57055b | d296afb828d62ada5d74472207b39d15f6f8ac57 | sn0wbroken/Conntttttt | /Cont/Shootingood/UI.cpp | C++ | cpp | 3,320 | no_license | #include"UI.h"
#include"Scene_Manager.h"
std::unique_ptr<Scene_Manager>& scene_manager = Scene_Manager::Get_Instance();
// コンストラクタ
UI::UI() {
std::unique_ptr<Player_Manager>& player_manager = Player_Manager::Get_Instance();
player_weapon = player_manager->player_weapon;
UI_background_graph = LoadGraph("Picture/U... |
6f3a11a81cf78494284f271c4c4cbc4e3c073e91 | 8079d6f3816c11dfde41fb484f1c5b116bf61767 | YunWisdom/chromium | /chrome/browser/web_applications/web_app_unittest.cc | C++ | cc | 10,525 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/components/web_app_constants.h"
#include "chrome/browser/w... |
d3799c8a3560eeaf3ef82328b1e1a19262f2f779 | ec9635a47c5633a3b98917cb9d9fce32c95a660a | ddeka0/CP | /2018-2019/code.cpp | C++ | cpp | 1,430 | no_license | // http://codeforces.com/problemset/problem/425/A
#include <bits/stdc++.h>
using namespace std;
int dp[210][3][11][11];
bool visited[210][3][11][11];
int n, a[210], k;
int recurse(int indx,int state,int n_skip,int n_taken) {
if(indx == n) {
if((n_taken == n_skip) && state)
return 0;
return -1e9;
}
if(visited[... |
1d535d3387978596aa9cb69a88f6e8e4a34b5a7c | d7883de2ebccefdddd2270af5b43f801d229c26b | xunilrj/sandbox | /books/3D Math Primer for Graphics and Game Development/include/autocheck/tuple.hpp | C++ | hpp | 919 | permissive | #ifndef AUTOCHECK_TUPLE_HPP
#define AUTOCHECK_TUPLE_HPP
#include "ostream.hpp"
namespace autocheck {
namespace detail {
template <typename... Ts>
void print(std::ostream& out, const std::tuple<Ts...>& tup,
const std::integral_constant<size_t, 0>&)
{
out << std::get<0>(tup);
}
tem... |
94f167c91f59da3bb22c8b5e798f65190a03b01d | d59b85a6d1899c46f28e63a248efac0b796e783b | quyetdd/tower-skycity-one | /Classes/scene/PreScene.cpp | C++ | cpp | 294 | no_license | #include "scene/PreScene.h"
#include "UI/PrePanel.h"
USING_NS_CC;
using namespace cocostudio;
using namespace ui;
bool PreScene::init()
{
bool bRet = false;
do{
setName("preScene");
_prePanel = PrePanel::create("pre");
addChild(_prePanel);
bRet = true;
} while (0);
return bRet;
} |
2f0418677ae0bd582f1ef952c0c1a46b3f7a6e0b | 85adb9fa4cf3237cbe4b06e3a8aac6366af7c035 | csergiu/Labs | /An1/Sem2/OOP/WorkspaceOOP/expenseQt/expenseQt/addexpense.cpp | C++ | cpp | 1,279 | no_license | #include "addexpense.h"
#include "ui_addexpense.h"
#include "domain/Exceptions.h"
addExpense::addExpense(QWidget *parent) :
QDialog(parent),
ui(new Ui::addExpense)
{
ui->setupUi(this);
this->parentWindow = parent;
}
addExpense::~addExpense()
{
delete ui;
}
void addExpense::addCtrl(Controller* con... |
969c442b59a17fb57fe32c9e5bcddf57c57d1a16 | 8d955c839a1fa826b62171a3b1ee480b2b1bf194 | dropcontrol/ofxPhilipsHueApi | /example/src/ofApp.cpp | C++ | cpp | 4,031 | no_license | #include "ofApp.h"
int current_hue;
int current_saturation;
int current_brightness;
bool current_lightOn;
//--------------------------------------------------------------
void ofApp::setup(){
ofSetVerticalSync(true);
gui.setup(); // most of the time you don't need a name
gui.add(colorSlider.setup("co... |
9ed603ce1016ba94e9d8d256670d68b3e560e963 | c70002a9676e986a12e5f73191f9c56d755f189e | BSteffaniak/CFoxyLib | /CFoxyLib/src/Component.cpp | C++ | cpp | 10,605 | no_license | #include "CFL.h"
#include <iostream>
using std::cout;
bool Component::initialized;
int Component::defaultHorizontalAlignment;
int Component::defaultVerticalAlignment;
vector<Component*> Component::components;
/**
* Construct a Component with the specified parent Panel.
*
* @param parent The parent Panel of t... |
4c9fef7a730589645a71f84121b7bb6f52fea248 | 7c859af65ba0b76b5023b86d96eb60baf16b1f98 | btk15049/home | /pro/yukicoder/no563/no563.cpp | C++ | cpp | 3,031 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
#define CIN_ONLY if(1)
struct cww{cww(){
CIN_ONLY{
ios::sync_with_stdio(false);cin.tie(0);
}
}}star;
#ifdef BTK
#define DEBUG if(1)
#else
#define DEBUG if(0)
#endif
#define fin "\n"
#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#defi... |
c98015c8f6f3bc617d37635f7d95cae8d0b89353 | 77e4420794fe8e7253a90d4e0cf8e9a97aafed61 | lan-tools/armnn | /src/backends/neon/workloads/NeonConstantWorkload.cpp | C++ | cpp | 4,428 | permissive | //
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "NeonConstantWorkload.hpp"
#include <arm_compute/core/Types.h>
#include <BFloat16.hpp>
#include <Half.hpp>
#include <aclCommon/ArmComputeTensorUtils.hpp>
#include <armnn/utility/PolymorphicDowncast.hpp>
#include <neon/Neo... |
47e74da77f2881a942ecceac64d7170b44b9da37 | 029d7cad49c58d0ab321b490d0d2569be5ee1789 | adityasinghhh/coding | /contests/qnd12/cyco2.cpp | C++ | cpp | 2,237 | no_license | #include<algorithm>
#include<assert.h>
#include<bitset>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<deque>
#include<iostream>
#include<map>
#include<memory.h>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<string>
#include<utility>
#include<v... |
acd0760836c56a89450cfc753ed7f8e1d52d4ac5 | c4bdfcfb070ee39b1ed4510b52da262017c73a4d | jon-bell/jazzer | /agent/src/main/native/com/code_intelligence/jazzer/replay/com_code_intelligence_jazzer_replay_Replayer.cpp | C++ | cpp | 1,546 | permissive | // Copyright 2021 Code Intelligence GmbH
//
// 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 a... |
f5f865c1700acebc571711d6e8098ab075bbfa6d | f76589120d03816853e8344f48bd54d9aa167277 | heqiao1017/Data-Structure-Implementation-and-Analysis | /Implementing Priority Queues and Maps (and their iterators) with Binary Trees/bst_map.hpp | C++ | hpp | 23,156 | no_license | // Submitter: lizhenl(Lizhen, Lin)
// Partner : qiaoh3(Qiao, He)
// We certify that we worked cooperatively on this programming
// assignment, according to the rules for pair programming
#ifndef BST_MAP_HPP_
#define BST_MAP_HPP_
#include <string>
#include <iostream>
#include <sstream>
#include <initialize... |
517eb3bfda0903d13da3f33bc8ba0a0eadb0636f | 8365b8e068eb9f1a1a3bd9b228191c4e5562dfc8 | Pavlograd/OOP-NanoTekSpice | /src/main.cpp | C++ | cpp | 1,414 | no_license | /*
** EPITECH PROJECT, 2020
** main
** File description:
** main
*/
#include "IComponent.hpp"
#include "Parsing.hpp"
#include "Command.hpp"
#include "C4001.hpp"
int main(int argc, char **argv)
{
nts::Component component;
std::string command = "";
parsingFile(argc, argv, &component);
/*component.addCo... |
4eaf8c58bd23ff83417ca79e246530f86d3fe61b | d5572e1138be9907038e687ab2e93d0ffd2dbf42 | taylorgordon20/demos | /registry.cpp | C++ | cpp | 4,690 | no_license | #include <cstdint>
#include <iostream>
#include <memory>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <typeindex>
#include <typeinfo>
#include <unordered_map>
#include <vector>
#include "any.hpp"
class Registry;
class Scope;
template <typename ValueType>
class RegistryKey {
public:
typed... |
397bf023c312a4fe704611f6c65a1e570397fe6d | 7f05406aa24955e5698b97d85b368aa49def69cb | Talos4757/allwpilib | /eclipse-plugins/edu.wpi.first.wpilib.plugins.cpp/resources/templates/examples/PacGoat/src/Commands/DriveForward.cpp | C++ | cpp | 1,378 | no_license | #include "DriveForward.h"
#include "Robot.h"
void DriveForward::init(double dist, double maxSpeed) {
Requires(Robot::drivetrain);
distance = dist;
driveForwardSpeed = maxSpeed;
error = 0;
}
DriveForward::DriveForward() {
init(10, 0.5);
}
DriveForward::DriveForward(double dist) {
init(dist, 0.5);
}
DriveForwa... |
e93a20d0912f5be5012ce4212d4d6708257e15c6 | 73a0e8be5994c3cfaa3a96a8f343233133caa054 | Yaser-wyx/ACM | /LG/P1586.cpp | C++ | cpp | 1,087 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
/**
* Created with IntelliJ Clion.
* @author wanyu
* @Date: 2018-04-24
* @Time: 11:48
* To change this template use File | Settings | File Templates.
*
*/
#define mset(t, x) memset(t,x,sizeof(t))
#define loop(a, b, c) for(int a=b;a... |
2057483c67405957ae404e2884a0f434d22bf53f | 16d253671a5f1e882f18bd306cb46a48bc788953 | Van-NguyenPham/TTUD | /broadcast.cc | C++ | cc | 1,451 | no_license | #include <bits/stdc++.h>
#define MAX_N 16
#define MAX_M 21
#define MAX 1000
using namespace std;
int n, m, s, L;
int b[MAX_M], e[MAX_N], X[MAX_N];
vector<int> A[MAX_N], C[MAX_N], l[MAX_N];
int ans = 0;
int r[MAX];//rank
int p[MAX];//parent
long long rs = 0;
void link(int x, int y)
{
if(r[x] > r[y])
{
p[y] = x;
}
... |
de5bdbe6b905cedb3f4fa26e424a83a85ca1d1bf | 1f01fb3b8b2d827061d51542ca0f55510dac0bda | Shadowmaple/Leetcode | /target_offer2/07.cpp | C++ | cpp | 960 | no_license | # include <iostream>
# include <vector>
using namespace std;
// Definition for a binary tree node.
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
TreeNode* buildTree(vector<int>& preorder, vector<int>& in... |
e5a4387485ad0d4f87cb4399748e6769165569a9 | 1b114de7279116e3812882a1f07b903edcad1563 | SAN-CHAIN/sand | /src/ripple/ledger/impl/ApplyViewImpl.cpp | C++ | cpp | 1,559 | permissive | //------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is h... |
8d3c531b42706d10ed357c7596ea71775ed583a9 | 0a10c9ee6515a0e45345202dc1e397f6aaa6a8df | alejandrobalderas/udacity_memory_management | /src/graphnode.cpp | C++ | cpp | 984 | no_license | #include "graphedge.h"
#include "graphnode.h"
#include <memory>
GraphNode::GraphNode(int id)
{
_id = id;
}
GraphNode::~GraphNode()
{
// TASK 0
// Fix memory bug by removing the code that tries to free the chatbot memory.
}
void GraphNode::AddToken(std::string token)
{
_answers.push_back(token);
}
vo... |
eaaf0d7db014049819725d1e6157fbf4e76813b6 | 786360d54ad7e3dd2ba22099b9b9e4d4fbfe1b9d | evelive3/kanan-new | /Kanan/Kanan.cpp | C++ | cpp | 11,825 | permissive | #include <imgui.h>
#include <imgui_freetype.h>
#include <imgui_impl_dx9.h>
#include <imgui_impl_win32.h>
#include <Config.hpp>
#include <String.hpp>
#include <Utility.hpp>
#include "FontData.hpp"
#include "Log.hpp"
#include "Kanan.hpp"
using namespace std;
IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND... |
f47e299c5b0d56ddf77450a711756357ee503a8c | c8ffdf54e8d190bcd759c73f5dff809996a220f7 | NCAR/eldora_instrument | /src/utilities/RPCServer.cpp | C++ | cpp | 1,338 | no_license | #include "RPCServer.h"
#include <iostream>
///////////////////////////////////////////////////////////////////
RPCServer::RPCServer(int port, int verbosity):
_port(port) {
XmlRpc::setVerbosity(verbosity);
// Create the server socket on the specified port
bindAndListen(_port);
// Enable introspe... |
894332dec515f79f5cb3bfecb511d9c72ba2077b | 6b240279b9f6a961e13e50cda9a40e547ae093e7 | Jengle88/OlProgTemplates | /struct/DSU.cpp | C++ | cpp | 2,034 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <vector>
#include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <set>
#include <string>
#include <fstream>
#include <iomanip>
#include <ctime>
#include <cmath>
#include <cstdio>
#include <utility>
#include <climits>
#include <function... |
1c300d1403994da6aec9291c0ac0753abef903e8 | ec5bc26a45b7ae4a2d41e1de0bccab72a1a10f79 | AkhilYamala/NCR-INTERN | /DataStructures/selfAdjustingLL.cpp | C++ | cpp | 1,854 | no_license | #include <iostream>
using namespace std;
class Node {
int data;
Node *next;
public:
Node(int d) {
data = d;
this->next = NULL;
}
Node* getNext() {
return this->next;
}
void setNext(Node *n) {
this->next = n;
}
int getData() {
return this->... |
ac7d8364c670cc4f8cac0247596c501f293e8b32 | d93b6ee47c61a8c2f2ce21cd4fce11ee3176e35c | jiangxiaolhm/ACM | /UVa/UVa10161.cpp | C++ | cpp | 514 | no_license | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int num;
int order;
int p;
int q;
while (cin >> num) {
if (num == 0)
break;
num--;
order = (int)pow(num,0.5);
p = num - order * order + 1;
q = (order + 1) * (order + 1) - num;
if (order % 2)
if (p < q)
cout << p << " " <<... |
8ead22fcb63baca095cf667ca9da691648203b6f | 49d76eea5f764c10eebaf1a6af6e46e89ddca9be | s1042992/- | /symmetry.cpp | C++ | cpp | 597 | no_license | #include<iostream>
using namespace std;
int main()
{
string a;
cin>>a;
int len=a.size();
bool flag=true;
if(len%2==1)
{
for(int i=0; i<=len/2; i++)
{
if(a[len/2-i]!=a[len/2+i])
{
flag=false;
break;
}
}
... |
1ab0af778aa09f5f19de2cd3ab0107073744d1ab | 43f964969e64c168d88ee62edbb37bb090ff3aa8 | Sean-Lan/leetcode | /algorithms/killProcess/killProcess.cpp | C++ | cpp | 2,016 | no_license | /**
*
* Sean
* 2017-08-01
*
* https://leetcode.com/problems/kill-process/description/
*
* Given n processes, each process has a unique PID (process id) and its PPID (parent process id).
*
* Each process only has one parent process, but may have one or more children processes. This is just like a tree structure... |
2b0d11ca2394cbbed98d9bed0b1c410caf4dc76a | 67630de64dee11d2554c931d8867b051d98de213 | wild-radio/Modem | /src/WRCP/WRCPTransmitter.cpp | C++ | cpp | 629 | no_license | #include <iostream>
#include <strings.h>
#include <cstring>
#include <wiringPi.h>
#include "WRCPTransmitter.hpp"
#include "../MiniModem/MinimodemResolver.hpp"
void WRCPTransmitter::run() {
unsigned char data[BUFFER_SIZE_TRANSMITTER];
MiniModem *modem = MinimodemResolver::resolve();
while (true) {
if (!this->outco... |
90b32654ea88b7c9f32080634140ca385d315dda | f33e04374e00b54876465dce33126f0491919c35 | heyanlong/nebula | /src/storage/admin/CreateCheckpointProcessor.cpp | C++ | cpp | 743 | permissive | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "storage/admin/CreateCheckpointProcessor.h"
namespace nebula {
namespace storage {
void CreateCheckpointProcessor::process(const cpp2::CreateCPRequest& req) {
CHECK_NOTNULL(env_);
auto... |
5c27338d52d6ff512599ba614b94d00dd8c95f7c | cefc64dc6741f7042813c1c47dad0652e91e8e76 | zlccccc/ACM-Templates-by-zlc1114 | /数据结构/KD树/做的题/bzoj4066.cpp | C++ | cpp | 3,897 | no_license | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <cmath>
#include <ctime>
#include <utility>
#include <cassert>
using namespace std;
#define REP(I,N) for (I=0;I<N;I++)
#define rREP(I... |
d4152528dbd84aa4365c04dfa1009c5bd9c2a8be | 64d86960691a860d14e0b38fd49833e3a91c72b7 | fonwin/libfon9 | /f9twf/ExgTmpTradingR1.hpp | C++ | hpp | 4,036 | permissive | // \file f9twf/ExgTmpTradingR1.hpp
//
// TMP封包: 一般下單R01/R31; 一般下單回報R02/R32; 短格式回報R22;
//
// \author fonwinz@gmail.com
#ifndef __f9twf_ExgTmpTradingR1_hpp__
#define __f9twf_ExgTmpTradingR1_hpp__
#include "f9twf/ExgTmpTypes.hpp"
namespace f9twf {
struct TmpR1BfSym {
TmpExecType ExecType_;
TmpFcmId CmId_... |
6af61177e6487cda50a48b781f929443a892908e | 03e673dfdde49ffd7f3b423655947e34a354a6a9 | Benjamin-Vandersmissen/CloneDetector | /src/main/Node.cpp | C++ | cpp | 2,339 | no_license | //
// Created by benji on 05/11/2019.
//
#include "Node.h"
#include <utility>
Node::Node(const component_ptr &component) {
m_component = component;
}
const std::string &Node::getName() const {
return m_component->uniqueName();
}
component_ptr Node::component() const {
return m_component;
}
const std::s... |
56d17ad08cc9ed8925e5a4f85004d6813e897958 | 8d4c6a75383eb7b948a1ec6ed480d0d6e98679af | xiaohongchen1991/clang-xform | /include/cxxlog.hpp | C++ | hpp | 6,018 | permissive | /*
MIT License
Copyright (c) 2019 Xiaohong Chen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merg... |
9357253f1a4f3aa4846f5a133b1fbebbca77d884 | 6c243633dc8b6237461648f5351050a8c0591b23 | lineCode/Inline-Engine | /Executables/NodeEditor/Node.cpp | C++ | cpp | 12,174 | no_license | #include "Node.hpp"
#include <GraphicsEngine_LL/Scene.hpp>
#include <BaseLibrary/Range.hpp>
#include <regex>
namespace inl::tool {
static std::string TidyName(std::string arg) {
using namespace std::regex_constants;
static std::regex filterClass{ R"(\s*class\s*)", ECMAScript | optimize };
static std::regex filte... |
79f131538f0655a9bd08ae2bf9f1a545f1c3e4b6 | 9500b0b756f4cce6a53dc23fe03b369f8abfca46 | AlirezaChegini/redex | /opt/peephole/Peephole.cpp | C++ | cpp | 71,752 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "Peephole.h"
#include <algorithm>
#include <cmath>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#... |
7f918f433dae9ca7de5ec2d1bf2611507fc18980 | 8d657698980362b8fb8a125425b56e738dea0c5d | karthikbeepi/Project-ADT | /code/src/mainGiven.cpp | C++ | cpp | 1,876 | no_license | #include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
if(argc!=4){
cout<<"Usage: ../seg input_image initialization_file output_mask"<<endl;
return -1;
}
// Load the input image
// the image should be a 3 channel image by defaul... |
3c990a0bbc67b9f9918415194a1877199360cc6c | 7c6b76f54bce6972eaf3e36fe7d6e0a359f6234e | gkishard-workingboy/Algorithm-challenger | /动态规划/POJ-3186.cc | C++ | cc | 989 | permissive | /*
* Author : OFShare
* E-mail : OFShare@outlook.com
* Created Time : 2020-02-06 13:52:29 PM
* File Name : POJ-3186.cc
*/
//#include <bits/stdc++.h>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <map>
void debug() {
#ifdef Acui
freopen... |
f92adbda3aa3f66cb04b5d7460ff53d81dc0b474 | 913d517c98f6b2de6a6b1174dc4dcea5b3648bda | anion0278/moveit | /moveit_core/robot_model/src/floating_joint_model.cpp | C++ | cpp | 13,262 | permissive | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2013, Ioan A. Sucan
* Copyright (c) 2008-2013, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are pe... |
bbaad9099e34e275a45038df72f8254d0d2ae166 | 3daf757f4ccb081105af18e2c5d53232b8e60756 | ca2/app | /acme/os/solaris/solaris_simple_ui.cpp | C++ | cpp | 21,756 | no_license | #include "framework.h"
#include <X11/Xatom.h>
/* MWM decorations values */
#define MWM_DECOR_NONE 0
#define MWM_DECOR_ALL (1L << 0)
#define MWM_DECOR_BORDER (1L << 1)
#define MWM_DECOR_RESIZEH (1L << 2)
#define MWM_DECOR_TITLE (1L << 3)
#define MWM_DECOR_MENU (1L << 4)... |
7f74a48d6975e295ea0bde3bae5cdc6fc2a3721a | 5f16e72f1a0effbd5cb50a97a1cf1419c504415b | goodsemong/systemc-compiler | /tests/cthread/test_while_other_types.cpp | C++ | cpp | 6,296 | permissive | /******************************************************************************
* Copyright (c) 2020, Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
*
*****************************************************************************/
//
// Created by ripopov on 3/13/... |
ce79e305ffbee85c4bdd04ddb5d9bbafbf0d6a63 | cae635d82a93e77af257e6e7aea255d333ee9713 | SREERAGI18/chromium | /content/browser/net/http_cookie_browsertest.cc | C++ | cc | 37,816 | permissive | // Copyright 2021 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 "base/strings/strcat.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
... |
cd52620af8bac626e6caebd8a620014683fb3ce1 | a69d3152adab20516a23e41ec1ee1ad70ad93711 | contygm/cs161 | /week4/fallDistance.cpp | C++ | cpp | 645 | no_license | /*******************************************************************************
** Author: Genevieve Conty
** Date: 10/17/2018
** Description: Determine the distance an object falls due to gravity in a
** given time period. Return distance in meters.
*********************... |
7a642214ab3e677b8eb88228ddd546e405f0d7b8 | b4778f1a20604a0659143f458c2e24f07931b9e7 | sailfish009/ngraph | /test/serialize.cpp | C++ | cpp | 11,050 | permissive | //*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
db600070a5505f3e3030a02f279f6d820058372a | d766b07f04a9be7ad132367e3d445817ffbb7302 | vcappello/WinGui | /WinGui/controller/edit_controller.cpp | C++ | cpp | 1,927 | no_license | #include "edit_controller.h"
#include <factory/font_factory.h>
namespace gui
{
namespace controller
{
EditController::EditController(HWND hWnd, int command_id) :
AbstractWindowedController( hWnd ),
command_id( command_id ),
change_event( new Event<>() )
{
}
EditController::~EditController()
{
}
std::shared_ptr... |
f42af04dea3778fcabc5be818d4a58dc6caff46a | ff6257ebc38f1ba375154430fa990bfebd327dd8 | sheng09/Qinv | /src/ranStack.cxx | C++ | cxx | 1,184 | no_license | #include "ranStack.hh"
#include <iostream>
#include <cmath>
ranStack::ranStack(const std::string& filename, int tmark, float t1, float t2,long seed, int nroot, int nstack)
: tracef1d(filename, tmark, t1, t2)
{
setSeed(seed);
setNRoot(nroot);
setNStack(nstack);
}
float ranStack::findSacMax() {
float max= 0.0;
std... |
df7afae49459d293c9f3f0f5e6f82125ba44a88e | 712efdfc2f525d447f75c26e1bb76db0b06f43d6 | yuqj1991/benchmark_deeplab_v3 | /MNN/source/core/Command.hpp | C++ | hpp | 528 | permissive | //
// Command.hpp
// MNN
//
// Created by MNN on b'2020/07/28'.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef Command_hpp
#define Command_hpp
#include <MNN/Tensor.hpp>
#include <memory>
namespace MNN {
struct Op;
struct Command {
const Op* op;
std::vector<Tensor*> inputs;
std::vector<T... |
17e7528c6d5e5ddd44b63b4fe16ee1936fcb242d | 9237eb165ea86b26f81efb7fbf60da305bed4eea | play4uman/SDA---Homeworks | /Shooting stars/Zadacha 5.cpp | C++ | cpp | 1,704 | no_license | // Zadacha 5.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <ctime>
#include <Windows.h>
using namespace std;
int* randNumArray(int n) {
int* arr = new int[n];
srand(time(0));
for (int i = 0; i < n; i++) {
int t... |
8ccb377c7090ba7e8539fa32b6bdae15be0984bb | 6429bb0cfc4d2e854a764d384192df944b99a5af | bmeck/hermes | /lib/VM/JSLib/DateUtil.cpp | C++ | cpp | 29,875 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
#include "hermes/VM/JSLib/DateUtil.h"
#include "hermes/Platform/Unicode/PlatformUnicode.h"
#include "hermes/Support/Compiler.h"
#in... |
9089c4e6d95775e2bf0cf99d27908bc21ee4c95d | 62834b57a3390b2d8cbf40d0b7534c47771213f2 | alt-vlad1q/HistogramOccurrencesWords | /core/facrory-task/factory-task-base.hpp | C++ | hpp | 777 | no_license | #pragma once
#include <string>
#include <functional>
namespace core { namespace factory {
//! \brief The FactoryTaskBase class - Интерфейс генерации задач (для WorkerPool)
//! с последующей отправкой на слияние (в Accumulator)
class FactoryTaskBase {
public:
using task_type = std::function<void()>;
using res... |
c4fc03f364cdcffaf3c0de874502a2ee975c6dd6 | 91550a045a72451133f268c0baa49a12159f5ea4 | prasadtelkikar/C-How-To-Program-by-Deitel | /Exercise/AIRRESERVATION_6.21.CPP | C++ | cpp | 2,557 | no_license | /*Airlines reservation system*/
#include<stdio.h>
#include<conio.h>
#define SIZE 20
void AssignSeatsInSmokingZone(int seats[], int seatNumber);
void AssignSeatsInNonSmokingZone(int seats[], int seatNumber);
void main(){
int choice, seatNumber;
char ch;
int seats[SIZE] = {0};
clrscr();
while(1){
printf("\nPleas... |
ca2af185ada126e742dec27fa52b057c96dc6634 | 6bff25d88794b804518737b2486c3556a65b394e | anuragrawat015/Generic-Implementation-of-Segment-Trees-in-Cpp | /testing/segment_tree_tests.cpp | C++ | cpp | 8,779 | no_license | #include <vector>
#include <iostream>
#include "../segment_tree/segment_tree.h"
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
using namespace st;
template <typename T>
void print_time(std::vector<T> &vect, SegmentTree<T> &seg, long int l, long int r);
template <typename T, typename ptr_t>
T accumula... |
192e0f61db1f85a2f1c2d9d5e43dc668b151854b | f96271ce30482d0ccbc7a0add0d1d69cc9c55489 | Boy-314/CS472 | /programming assignments/programming2/Knapsack-ID.cc | C++ | cc | 4,945 | no_license | #include <algorithm>
#include <bits/stdc++.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
/*
Iterative Deepening for Solving Knapsack Problem
NOTE: Lines 95 - 98, and lines 119 - 122 are my print out statements. Unco... |
d74f6aeaee79d4f6fddba7d4454b1127775ea554 | b4635cacbba5bb9f522c971c24969ac15b1c1c05 | prestocore/browser | /modules/opdata/src/OpDataFragmentIterator.cpp | C++ | cpp | 1,648 | no_license | /* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#include "core/pch.h"
#include "modules/opdata/OpDataFragmentIterator... |
7398e7e257349113b349c9c3b607b753c7606974 | 876fc9b7aff199c6c0ce09bb1091f367a43b8663 | YingChengJun/PAT-Code | /1138 Postorder Traversal.cpp | C++ | cpp | 1,196 | no_license | #include <cstdio>
#include <vector>
using namespace std;
int n;
vector<int> pre, in;
struct TreeNode {
int val;
TreeNode* left = NULL;
TreeNode* right = NULL;
TreeNode(int v): val(v) {};
};
void makeTree(TreeNode* &root, int preL, int preR, int inL, int inR) {
if (preL > preR)
... |
07591a161fc10c6f648496e9aeb37932c0a567c3 | a88c0d826f9518765e28f788851baae12a20b404 | SREERAGI18/chromium | /extensions/shell/browser/shell_extension_web_contents_observer.cc | C++ | cc | 913 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/shell/browser/shell_extension_web_contents_observer.h"
namespace extensions {
ShellExtensionWebContentsObserver::ShellExtensionWebC... |
9374009f8bed3080248ba7c4986274a1c710098f | ed9c14ae81263f527a0a395d8a4ae0bf879e3ec8 | adwpc/webrtc | /rtc_base/memory_stream.cc | C++ | cc | 3,740 | permissive | /*
* Copyright 2018 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... |
85405caf1a3aa913de4d5024ffba60951e556031 | 096f1f0f97ec3366d144eda892a0865f611750b0 | chkob/forked-blaze | /blazetest/src/mathtest/dmatdmatschur/S3x3bS3x3a.cpp | C++ | cpp | 3,800 | permissive | //=================================================================================================
/*!
// \file src/mathtest/dmatdmatschur/S3x3bS3x3a.cpp
// \brief Source file for the S3x3bS3x3a dense matrix/dense matrix Schur product math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
... |
86ef97c91289dd82ce37bc6af986247acffb84e6 | c68f0e3eb32c329341a898ea92fee1f4843431d6 | Wakkaso/wake_course | /Organization/吳凱強/homework/CO_Lab/Lab4/Lab4/source_code/C++/direct_mapped_cache.cpp | C++ | cpp | 2,354 | no_license | #include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
struct cache_content
{
bool v;
unsigned int tag;
// unsigned int data[16];
};
const int K = 1024;
double log2(double n)
{
// log(n) / log(2) is log2.
return log(n) / log(double(2));
}
void simulate(int cache_s... |
73553adfafaf38cc3d2b8be89c6c2f5b802d8afd | 3730c0eae30e273ccfb96f979a470d2aa6ce0de7 | Vali5681/Learn_Vector | /main.cpp | C++ | cpp | 906 | no_license | #include <iostream>
#include <fstream>
#include <vector>
int main() {
std::ifstream file;
file.open("numbers.txt");
if(file.is_open()) {
std::vector<std::string> numbers_vector;
std::vector<std::string>::iterator numbers_vectorIterator;
std::string line;
while(!file.eof()) {... |
4bc9a978683b7ca8e53a6b542ebe8fc61238a243 | 2714f4a536dd0a93427b25de92d380507aaf7ba8 | michaeldrolet1/TP2 | /TP2/Client.cpp | C++ | cpp | 1,853 | no_license | /********************************************
* Titre: Travail pratique #2 - Client.cpp
* Date: 25 janvier 2018
* Auteur: Mohammed Esseddik BENYAHIA & Timothée CHAUVIN
*******************************************/
#include "Client.h"
Client::Client(const string& nom, const string& prenom, int identifiant, const strin... |
9f108d1f0f0f513b91171c47ec6719ed4e4a4405 | a892541e39c9eb5ea040595c0f836c009d72666c | Pratistha98/Comsc-110 | /Pr10b-Water-Maharjan-Pratistha.cpp | C++ | cpp | 6,120 | no_license | /*
School : Diablo Valley College
Term : 2017 Fall
Course : ComSc-110-3120,
Introduction to Programming (with C++)
Chapter: 10
Program: Pr10b-Water-Maharjan-Pratistha.cpp
Author : Maharjan, Pratistha
Date : Oct. 26, 2017
Purpose: Learn about writing data to an output file
instead of to the conso... |
33e119fd089a0c4198c1b3a3f81919fdda06eed3 | caead95fe411334e1b3fa4a047d1f7451828f264 | felipesdias/Extractor-URI-Online-Judge | /URI-EN/GRAPH/1195 - Binary Search Tree.cpp | C++ | cpp | 1,782 | no_license | // Author: Felipe Souza Dias <felipe.s.dias@outlook.com>
// Name: Binary Search Tree
// Level: 4
// Category: GRAPH
// URL: https://www.urionlinejudge.com.br/judge/en/problems/view/1195
#include <stdio.h>
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <q... |
9693a477209ca5b3478e65c90e9039c36bef73c6 | 585416dcdeaa670fd70c866d0b5a3f4af5d086b8 | imkiva/KiVM | /src/kivm/native/java_security_AccessController.cpp | C++ | cpp | 1,673 | permissive | //
// Created by kiva on 2018/4/30.
//
#include <kivm/kivm.h>
#include <kivm/native/classNames.h>
#include <kivm/bytecode/execution.h>
#include <kivm/bytecode/javaCall.h>
using namespace kivm;
JAVA_NATIVE jobject Java_java_security_AccessController_doPrivileged(JNIEnv *env,
... |
eabce4f38493b8c259f75276ac3f8d7ea786593a | 1f6c740074c944f384c158ae6d65d767fb4aafb2 | ezrec/AROS-mirror | /contrib/vpdf/poppler_printer.cpp | C++ | cpp | 19,252 | no_license |
#include "Object.h"
#if defined(__MORPHOS__)
#include <proto/charsets.h>
#endif
#define AROS_ALMOST_COMPATIBLE
#define _NO_PPCINLINE
#include <proto/keymap.h>
#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/graphics.h>
#include <proto/iffparse.h>
#include <dos/stdio.h>
#if defined(__AROS__)
#include <a... |
397412a87566ce9695f412ce04fb545af7a49554 | 279783548dd64a283b13f8bcae9034eac29d65cf | glennneiger/AllyInvestZorroPlugin | /AllyInvest/AllyInvest.cpp | C++ | cpp | 74,206 | permissive | // AllyInvest.cpp : Defines the exported functions for the DLL application.
//
// AllyInvest plugin for Zorro Automated Trading System
// Written by Andrew Dolder
//
// Ally Invest (formerly Tradeking, which has been acquired by Ally Financial, Inc.)
//
#include "stdafx.h"
// all dependencies are MIT/BSD-licensed or... |
a7421751d7d379965b9f4844370f17a1586a3699 | d29ab83d5cca41f81b0b88bc1abf44fa8c65f4ce | fabsahe/omegaUp | /ancho_arbol.cpp | C++ | cpp | 2,495 | no_license | #include <stdio.h>
#include <stdlib.h>
#define T 1001
typedef struct NodoArbol {
int valor;
int fil, col;
struct NodoArbol *izq, *der;
}A;
void insertar(A **r, int terna[], int *act, int *band ){
if(*r ==NULL){
*r = (A *) calloc(1, sizeof(A));
(*r) -> valor = terna[*act];
*ba... |
ae4887720093b43767ec3dbac287d72c3e86b85c | e2d634c54bade9d67164f0a3a27ae3fb6527570a | baoluojian123/mapbox-gl-native | /src/mbgl/text/placement.hpp | C++ | hpp | 5,829 | permissive | #pragma once
#include <string>
#include <unordered_map>
#include <mbgl/util/chrono.hpp>
#include <mbgl/text/collision_index.hpp>
#include <mbgl/layout/symbol_projection.hpp>
#include <mbgl/style/transition_options.hpp>
#include <unordered_set>
namespace mbgl {
class SymbolBucket;
class SymbolInstance;
enum class Pla... |
7f637e60ee8f89596c57c07516ebe97f4dc62283 | 7ddb63a2f7b45a8a41ad1c52b3d8db0b0bf9c33e | Kracav4ik/chit-pis | /Screen.cpp | C++ | cpp | 11,302 | no_license | #include "Screen.h"
#include "Popup.h"
#include "utils.h"
#include <memory>
#include <cwchar>
namespace {
enum {HOR, VERT};
enum {LT, RT, LB, RB};
enum {LHOR, RHOR, TVERT, BVERT};
struct LineStyles {
std::wstring lines;
std::wstring corners;
std::wstring joinToFat;
std::wstring joinToSlim;
};
const ... |
0634b554f0e9a3143b7dbd1a21e831dafeb59c38 | 800e5d27ac7a9b042ac6c2359d46a2e8cda4716a | imnhk/problem-solving | /programmers.co.kr/Level 2/42888_오픈채팅방.cpp | C++ | cpp | 745 | no_license | #include <string>
#include <vector>
#include <unordered_map>
#include <sstream>
using namespace std;
vector<string> solution(vector<string> record) {
vector<string> answer;
unordered_map<string, string> username;
string cmd, id, name;
for (string s : record) {
stringstream ss(s);
ss >> cmd;
ss >> id;
if ... |
46b662f94440f782c7bddab65ad394c05c8af15b | 9b8e4cf66a9de369135faffb65808435dc9d10fe | TencentCloud/tencentcloud-sdk-cpp | /bmlb/src/v20180625/model/ModifyL7BackendPortRequest.cpp | C++ | cpp | 6,316 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
e76dcd3aa70f16b752d25b0de96cadbc2a70a7ba | cb14d275c32f0c69b1d444d06d53931b7ec51523 | RoseLeBlood/aSTLino | /src/intrusive_list.hpp | C++ | hpp | 8,158 | permissive | /*
* The MIT License
*
* Copyright 2016 annas.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, m... |
307a20606ca21913c20bbb1642ec73702a3c1bde | 6cc51930925202403c948e5bd3e09a1dd01b3a17 | mcdrakteravision/ArkdeMultiplayer-UE4 | /Source/ArkdeCM/Private/ACM_LobbyGameMode.cpp | C++ | cpp | 844 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "ACM_LobbyGameMode.h"
//===============================================================================================================
AACM_LobbyGameMode::AACM_LobbyGameMode()
{
MaxAmountOfPlayersToTravel = 2;
CurrentPlayersOn... |
5bf2fdd3b7122ec0a437483f6d440ece385ea5b5 | e58da4e6773688c9553da214622294cdcde2cd91 | DiligentGraphics/DiligentSamples | /Android/HelloAR/src/main/cpp/hello_ar_application.cc | C++ | cc | 17,523 | permissive | /*
* Copyright 2017 Google Inc. 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 applic... |
820a2e34eae2f760b6dd17fd0995cab5f02e8538 | e4c85cd6a25370b804d660933ec28cbe9e8a2f92 | courses-at-nju-by-hfwei/learning-c | /oj/sum-A.cpp | C++ | cpp | 811 | permissive | // The First OJ Test (2017-09-30)
// Created by hengxin on 17-9-30.
/**
* Problem: Sum of Numbers
*
* Input: 10 numbers
* Output: sum of all positives, sum of all negatives, and sum of total numbers
*/
#include <iostream>
#include <iomanip> // std::setprecision
using namespace std;
const int NUM = 10;
const i... |
2cc64b2fd95e89ad364ad1ea9222afe07b64e5fa | 8a2ca8cbb98e0e98384ddd4077fa7b807403a1dc | gbrlas/AVSP | /CodeJamCrawler/dataset/09_11502_56.cpp | C++ | cpp | 535 | no_license | #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main ()
{
freopen ("B-small.in", "r", stdin);
freopen ("B-small.out", "w", stdout);
int t;
string st;
cin>>t;
for (int k = 1; k <= t; k++){
cin>>st;
st = "0" + st;
while (next_permutation (st.begin(), st.end(... |
63eedbc269a141d058b59a668d4619aba562a91c | 7496fdced86919be600391a393ac0b2816358457 | It4innovations/espreso | /src/input/parsers/openfoam/openfoam.cpp | C++ | cpp | 27,106 | no_license |
#include "openfoam.h"
#include "parser/points.h"
#include "parser/faces.h"
#include "parser/boundary.h"
#include "parser/zones.h"
#include "parser/sets.h"
#include "input/meshbuilder.h"
#include "basis/containers/tarray.h"
#include "wrappers/mpi/communication.h"
#include "basis/utilities/parser.h"
#include "basis/ut... |
9ffe19e0a0cc149f35dd9457bfa4667170a1ac1f | 5ec5c186b5b9a4813119a2474822b5e454a07607 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-redshift/source/model/DescribeAccountAttributesResult.cpp | C++ | cpp | 1,996 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/redshift/model/DescribeAccountAttributesResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#incl... |
d9c943a1336d4bec219eb720599f5026d24afd27 | f018d580a09c3033b1cef1cbc81c708e7bd37495 | c-ber/cber | /vscode/wg/sdk/UReverbEffect.hpp | C++ | hpp | 5,415 | no_license | #pragma once
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
namespace PUBGSDK {
struct alignas(1) UReverbEffect // Size: 0x60
: public UObject // Size: 0x30
{
private:
typedef UReverbEffect t_struct;
typedef ExternalPtr<t_struct> t_structHelper;
public:
static ExternalPtr<struct UClass> StaticCla... |
5799a4672358dfe25b860983180f9d6276ce9686 | eb69842a68ba703ac581d4c9fd6c81f2b568f8a7 | zzwwqq/DataStructure | /HuffmanCompressCPro/HuffmanCompressCPro/Huffman.cpp | C++ | cpp | 1,109 | no_license | #include "Huffman.h"
#include<iostream>
using namespace std;
int HuffmanTree(HuffmanTree &pHT,int *w,int n){
return 0;
}
//查找树节点数组中权值最小的结点
int Select(HuffmanTree pHT,int nSize) {
int minValue=0x7FFFFFFF;//最小值
int min=0;//元素序号
int i;
//找到最小权值的元素序号
for(i=1;i<nSize;i++){
if(pHT[i].parent==0&&pHT[i].weig... |
f030e938fe56152b2398c911d1a57cd13061ad05 | ae5ea4a2b4c8972ae34f68c3a8dffaef393d186e | gagandeepahuja09/Binary-Search | /InterviewBit/SortedInsertPosition.cpp | C++ | cpp | 347 | no_license | int Solution::searchInsert(vector<int> &A, int B) {
int l = 0, h = A.size();
while(l <= h) {
int m = l + (h - l) / 2;
if(A[m] == B || ((m == 0 || A[m - 1] < B) && (m == A.size() || A[m] > B)))
return m;
else if(A[m] < B)
l = m + 1;
else
h = m ... |
5dad5d5340b55adab02156810d9c3df38bc3ad10 | 98495cb4ea37653569020ca2a09135249bc5920c | showaykerker/Linkit7697_DoorMonitor | /HSP/HSP_Buzzer.hpp | C++ | hpp | 3,648 | no_license | #ifndef HSP_BUZZER_HPP
#define HSP_BUZZER_HPP
#include<Arduino.h>
#include"HSP_defines.h"
#include"Buzzer_Pitches.h"
float tempo_d(float spd, float div, float len){
// 60 4 = 1000
float ori = 1000.;
ori /= ((spd/60.) * (div/4.));
int ans = int(ori*len - 10);
if (ans<0) ans = 0;
return ans;
}
class HSP_Buzzer{
... |
34d6f675155e62fa9935b84b831ddcc8e686c027 | 1c6045db8e8d1e7d69085b3c1500ab44a3d2f0f0 | VeblenYe/LeetCode | /LeetCode/707. 设计链表.cpp | C++ | cpp | 2,267 | no_license |
struct LinkNode {
int val;
LinkNode *prev;
LinkNode *next;
LinkNode(int x) : val(x), prev(nullptr), next(nullptr) {}
};
class MyLinkedList {
private:
LinkNode *node;
public:
LinkNode *begin() { return node->next; }
LinkNode *end() { return node; }
void insert(LinkNode *position, int val) {
auto tmp = new... |
ce9a1060f588e5db3b1f74ef7219585f78545a5e | b4f3e9f0676ff60a9be0d758c8e1f1b4482f303c | bhupkas/Spoj | /spoj/VPL2_AA.cpp | C++ | cpp | 419 | no_license | /* bhupkas */
#include "iostream"
#include "stdio.h"
#include "math.h"
using namespace std;
#define FOR(i,a,b) for(i=a;i<b;i++)
int main()
{
int i,j,tc,T,p0,p1,t0,p;
double t,te1,te2;
cin>>T;
FOR(tc,1,T+1)
{
cin>>p0>>p1>>t0>>p;
te1=log((double)(p)/(double)(p0));
te2=log((double)(p1)/(double)... |
4c666264fcf08e480690411d18f060ad1fbae19f | 4bbb77bd855f6b8114cdb3215c40e4e4c8f7a0b4 | OurPrograming/Exercises | /Exercises/Statistics.cpp | C++ | cpp | 1,826 | no_license | #include "Statistics.h"
Statistics::Statistics(string exe, string ans)
{
this->exePath = exe;
this->ansPath = ans;
}
Statistics::~Statistics()
{
}
void Statistics::countResult()
{
//打开文件
exercises.open(exePath, std::ios::in);
answers.open(ansPath, std::ios::in);
grade.open("Grade.txt", std::ios::out);
if (!e... |
603c8c81b0e0141420eccb1e095f4eaba283fa5a | f70174aea39cdd2eca71176bc1be1b1699fb509e | rogerwang/WebKit_trimmed | /Source/WebKit/wx/WebView.cpp | C++ | cpp | 32,440 | permissive | /*
* Copyright (C) 2007 Kevin Ollivier All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditi... |
7eeee299c4ed86e1002b1c2867268749a86fb820 | 1058b379ce28b6cdc3f4074937b4b1b726841bc6 | KernelPanic-OpenSource/Win2K3_NT_drivers | /wdm/audio/sysaudio/gn.cpp | C++ | cpp | 11,293 | no_license | //---------------------------------------------------------------------------
//
// Module: gn.cpp
//
// Description:
//
//
//@@BEGIN_MSINTERNAL
// Development Team:
// Mike McLaughlin
//
// History: Date Author Comment
//
// To Do: Date Author Comment
//
//@@END_MSINTERNAL
//
// THIS CO... |
2910c017a98dc0564005120294215fdb4167dff9 | a4e5cfb68a63030c6e37d601f95470e88ab66809 | Sabuja2002/Data-Structures | /Binary Tree/sukritishah15_inorderTraversal.cpp | C++ | cpp | 1,001 | no_license | #include <iostream>
using namespace std;
/*
Binary Tree looks like:
1
/ \
2 3
/ \ / \
4 5 6 7
*/
struct node{
int data;
struct node* left;
struct node* right;
};
node* newnode(int data){
struct node* temp = new node();
te... |
f61892e839a7d837e43789900b66a75835d63521 | 5f42ca617cd3e7e0504bdeedcd53af990bff905b | mcarlen/libbiarc | /tools/pkf2stl.cpp | C++ | cpp | 1,859 | permissive | /*!
\file pkf2stl.cpp
\ingroup ToolsGroup
\brief Read data from a PKF file, produce a tubular mesh for each
curve in the file and write that to an STL file.
*/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#include <TubeBundle.h>
#include <algo_helpers.h>
int main(int argc, char **argv) {
if(argc < 6 || argc > 7) {
... |
2c2d8b3bb0140d040b13dd64b519043e43d3622d | b5365df0aaf6dddbd46c413f57c58e7ba41009ea | sarathkumarsivan/kv_engine | /engines/ep/src/item_pager.cc | C++ | cc | 11,377 | permissive | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2015 Couchbase, 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
*
* h... |
e46c594b0f10809dd544e047dd5cfe003dc563fb | ececfb0bececa1c39a2c401d725800250791d2ce | Oran-G/flow-control-10.3 | /q6.cpp | C++ | cpp | 472 | no_license | int n = 0;
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
if (analogRead(A0) < 100 || analogRead(A0) > 950)
{
digitalWrite(13, HIGH);
}
else
{
if (n <= 512) {
digitalWrite(13, LOW);
}
else if (n <= 1024)
... |
52c7f3479d4c9270fc8585dd84e740ed902fc029 | 78771bd15cb88206879f5e75617efb478d393e6d | NCAR/lrose-core | /codebase/libs/Fmq/src/DsFmq/DsFmq.cc | C++ | cc | 27,097 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
388c24cbbad56d66db5e3403d62679f82a9b30df | ab77c45aa192ce0edbba8cc7ca81ebb4a0017c7a | pedapudi/lib-hb | /client.cc | C++ | cc | 813 | no_license | #include "client.hh"
#include <iostream>
HBClient::HBClient() { }
HBClient::HBClient(string hip, int hport) {
sock = Socket(AF_INET, hip, hport);
hostip = hip;
HBClient();
}
/* Accessor methods */
string HBClient::cname() const {
return sock.getsrcname();
}
string HBClient::client() const {
ret... |
fc0cd66c82e20101b8457d3608d2f51fcfb3fbe3 | 5a2b331f13f14b63e29077d53c63d955b0a4cddd | liujiahe971024/Cpp-Project | /AutoComplete/BloomFilter.hpp | C++ | hpp | 1,109 | no_license | #ifndef BLOOM_FILTER_HPP
#define BLOOM_FILTER_HPP
#include <string>
using namespace std;
/**
* The class for bloom filter that provides memory efficient check
* of whether an item has been inserted before. Small amount of
* false positives is possible but there will be no false negatives.
*/
class BloomFilter {... |
2fb4400b231385275589889c71565dc9169fee61 | bdcb973d5db44d057ad02de70adde5bb0eeb8f51 | misc-git-forks/HFSM2 | /test/test_internal_payloads.cpp | C++ | cpp | 23,921 | permissive | #define HFSM2_ENABLE_TRANSITION_HISTORY
#include "tools.hpp"
namespace test_internal_payloads {
////////////////////////////////////////////////////////////////////////////////
using Config = hfsm2::Config::ContextT<float>::PayloadT<int>;
using M = hfsm2::MachineT<Config>;
using Action = bool;
//-----------------... |
9bb900342281f6bb8e7d1fb19ba1cff808eedf94 | d472126ea2ceab6b59d1d183e4389a55c59e21cf | divyanshu013/algorithm-journey | /Trees/binary-tree-preorder-inorder-successor.cpp | C++ | cpp | 1,439 | permissive | /*******************************************************************************
Binary tree preorder inorder successor
======================================
--------------------------------------------------------------------------------
Problem
=======
Finding the preoder and inorder successor in a binary stack r... |
e2fd7cffb9f37b81608e798ae6845a02ba83cbd4 | 45b4c40c3ede70498c2f2789eccf0e98e65575c2 | HONGJICAI/LeetCode | /cpp/884.UncommonWordsfromTwoSentences.cpp | C++ | cpp | 383 | no_license | class Solution { // 0ms
public:
vector<string> uncommonFromSentences(string A, string B) {
unordered_map<string, int> count;
istringstream iss(A + " " + B);
while (iss >> A)
count[A]++;
vector<string> res;
for (auto &w: count)
if (w.second == 1)
... |
171c39d220d604b784d261f2b0500bc00d4007c8 | d7e0f64a879fef410d420c137dc85f9bee05c36f | localghost/imgconv | /src/ui/exportaction.cpp | C++ | cpp | 1,172 | no_license | #include "exportaction.h"
#include "ui_exportaction.h"
#include <QFileDialog>
#include <QStandardPaths>
#include <base/assert.h>
#include <im/exportaction.h>
#include <im/image.h>
ExportAction::ExportAction(QWidget* const parent)
: QDialog(parent),
ui_(new Ui::ExportAction)
{
ui_->setupUi(this);
// TODO For... |
40f1526bc40e796339c9b6becd5f22d1f0151da0 | bb45973579e877cbe2c8e2f8b29b81be82dbcbee | nouiz/DeepLearningBenchmarks | /eblearn/convnet256.cc | C++ | cc | 2,146 | no_license | #include "libeblearn.h"
#include <time.h>
#include <sys/time.h>
using namespace std;
using namespace ebl; // all eblearn objects are under the ebl namespace
static double time_time() // a time function like time.time()
{
struct timeval tv;
gettimeofday(&tv, 0);
return (double) tv.tv_sec + (double) tv.tv_u... |
bfbd7bd7118b632cac516855c216041119f05380 | fd36774391084a21a8b9dcccd1e3f67f19b1b42a | sdk-team/aliyun-openapi-cpp-sdk | /drds/src/model/DescribeInstDbLogInfoResult.cc | C++ | cc | 2,058 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.