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 |
|---|---|---|---|---|---|---|---|---|
f766b8c5c87da64defcbfe80c95c4b8041fd9c25 | a4969f7803ced2373f7cc4038fdbfc2d72fa62f2 | rhodium-tech/rhypton | /src/test/cachemap_tests.cpp | C++ | cpp | 3,557 | permissive | // Copyright (c) 2014-2018 The Dash Core developers
#include "cachemap.h"
#include "test/test_rhypton.h"
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(cachemap_tests, BasicTestingSetup)
bool Compare(const CacheMap<int,int>& cmap1, const CacheMap<int,int>& cmap2)
{
if(cmap1.GetMaxSize() != cmap2.... |
98078c10d964e0994ebedbe4455118fce7960bfa | d1db0652b87d81792b72c1f5f55c4b7752596444 | tamwaiban/boba | /gpu_objects.cpp | C++ | cpp | 3,352 | no_license | #include "gpu_objects.hpp"
#include "graphics.hpp"
#include "deferred_context.hpp"
using namespace boba;
using namespace bristol;
//------------------------------------------------------------------------------
bool GpuObjects::CreateDynamic(
u32 ibSize, DXGI_FORMAT ibFormat,
u32 vbSize, u32 vbElemSize)
{
retur... |
3b9e0a16c4d0c04f27259e4b3abf6986c83b1ac7 | 07b978ae3ac77c6e99c5d943ae97ef913d2edef7 | lazovskiy/mercury | /mercury_exception.cpp | C++ | cpp | 1,259 | no_license | #include "mercury_exception.hpp"
mercuryException::mercuryException(const char *function, std::string err)
{
error_message = std::string(function) + "(): " + err;
}
mercuryException::mercuryException(const char *function, uint8_t *request, uint8_t request_len, uint8_t *response, uint8_t response_len, std::string er... |
b9097469cd52dd0d9ad32417aeb2e189751b954c | 8afe0db635bb5c9c4b384f2ca92edaa56c12cdf4 | tao558/kwiver | /arrows/super3d/util.cxx | C++ | cxx | 6,207 | permissive | /*ckwg +29
* Copyright 2012-2018 by Kitware, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this li... |
3bbf8d1b6a673703a00ad33f0096d85e81f139cc | 9e082975d1088eb6dbb5041fce25759b717ad30e | SaschaMester/delicium | /components/html_viewer/document_resource_waiter.cc | C++ | cc | 2,618 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/html_viewer/document_resource_waiter.h"
#include "components/html_viewer/frame_tree_manager.h"
#include "components/html_viewer/glob... |
ff033fe5c5f560691ce7651aaa03b6db2c50e5bf | f8d6f9ee3f1fac916f01191e6f44bc2daac41b62 | chenvictor/acm | /input/py.cpp | C++ | cpp | 1,605 | no_license | struct input {
string s;
input(const string& v): s(v) {}
input() {
getline(cin, s);
while(cin.peek() == nl) cin.ignore();
}
struct tokens {
vector<input> t;
template <class T>
vector<T> map() { return vector<T>(all(t)); }
void check_size(int s) {
if (s != sz(t)) {
cerr <<... |
fe2484044b56a4f2b2630650bfd5cf39e8ba9b7f | 00a473729745e750cd16e30a59be6d745632c3b8 | dkargin/TiGa | /Autopilot2D/moverCharacter.cpp | C++ | cpp | 3,842 | no_license | #include "stdafx.h"
#include "device.h"
#include "mover.h"
#include "moverCharacter.h"
///////////////////////////////////////////////////////////////////////
// Definition
///////////////////////////////////////////////////////////////////////
MoverCharacterDef::MoverCharacterDef(DeviceManager &parent)
:MoverDef(pa... |
a3279cc1c269b5cc64caa22ede407e072ba94b6d | 0e16d5a73b6195ad99f838d4d332a8a6f202384f | gunjan-g/HackerRank-Cpp | /C++ Solutions/For Loop.cpp | C++ | cpp | 2,068 | no_license | /*
Program Link:
https://www.hackerrank.com/challenges/c-tutorial-for-loop/problem
A for loop is a programming language statement which allows code to be repeatedly executed.
The syntax is
for ( <expression_1> ; <expression_2> ; <expression_3> )
<statement>
expression_1 is used for intializing variables which a... |
9b5553854d91fc33015c612ccde379866396abc1 | e67ad0b58397527ad08df593cc28ffc8cf098ca9 | alikhan2002/PP1 | /quiz3/c.cpp | C++ | cpp | 628 | no_license | #include <iostream>
using namespace std;
char a[15][15];
bool used[15][15];
void dfs(int x,int y,int n){
used[x][y]=true;
if (x+1 < n && a[x+1][y]=='.' && !used[x+1][y]) dfs(x+1,y,n);
if (x-1 >= 0 && a[x-1][y]=='.' && !used[x-1][y]) dfs(x-1,y,n);
if (y+1 < n && a[x][y+1]=='.' && !used[x][y+1]) dfs(x,y+1,n);
if (y-... |
93977daac53a360cdd96bfa564fed27e29b103c8 | 5ad121c57c806c0cfa01f74329e2eb5da653e3bb | dgwnb/noiseScanAna | /src/plotThresholdLBLQ1.cc | C++ | cc | 5,918 | no_license | #include "CommonHead.h"
#include "CommonFunc.h"
using namespace std;
int MarkerStyleWheel(int idx){
switch(idx){
case 0: return 20;
case 1: return 21;
case 2: return 25;
case 3: return 22;
case 4: return 26;
case 5: return 23;
case 6: return 32;
default: return idx+1;
}
}
int mai... |
da4f8eed9245f81472804af66be547690a968a56 | 039a10d700e029ac57833701982a65756f6733ba | schizzz8/srrg | /srrg_core/src/srrg_txt_io/pose_message.cpp | C++ | cpp | 1,903 | no_license | #include "pose_message.h"
#include <stdio.h>
#include "message_factory.h"
namespace srrg_core
{
CPoseMessage::CPoseMessage( const std::string& p_strTopic, const std::string& p_strFrameID, const int& p_uSeq, const double& p_dTimestamp ): BaseSensorMessage( p_strTopic, p_strFrameID, p_uSeq, p_dTimestamp )
{
//ds ... |
72ab140274c12802cec8265cb0e2a5ad5df5c205 | a2331534c8d4da9966ead31476665d959744755d | HumHumMonster/Homework | /链表转置.cpp | C++ | cpp | 2,659 | no_license | #include <iostream>
using namespace std ;
template <typename ElemType>
struct Node
{
ElemType data ;
Node* next = NULL ;
Node(){}
Node(ElemType d)
{
data = d ;
}
void release()
{
if (next)
{
next->release() ;
delete next ;
}
}... |
eccc24baafb72b6f7e8f3a93a5fe4341198eecce | 7c61569603cca6818aa31ecad73542530aa08aec | LauZyHou/Algorithm-To-Practice | /AcWing/LeetCode究极班/198.cpp | C++ | cpp | 306 | permissive | class Solution {
public:
int rob(vector<int>& nums) {
int n = nums.size();
vector<int> f(n + 1), g(n + 1);
for (int i = 1; i <= n; i ++ ) {
f[i] = g[i - 1] + nums[i - 1];
g[i] = max(g[i - 1], f[i - 1]);
}
return max(f[n], g[n]);
}
};
|
30248f07036736dbd575b2fcff32e32b2ac3ab96 | efc6d5deee555d6ad22220b6d2d287aae5df3fe7 | uve/tensorflow | /tensorflow/lite/experimental/micro/examples/micro_speech/nxp_k66f/audio_provider.cc | C++ | cc | 15,282 | permissive | /* Copyright 2019 The TensorFlow 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 applicable law or... |
05d9cef7d9ebfed6916f05699aa98fa3f880467c | 49380ba3287027300c616553a41a283427a517ce | RodinDmitry/MIPT_Compiler_2018 | /MIPT_Compiler/Analyzer/Symbol.cpp | C++ | cpp | 510 | no_license | #include "Symbol.h"
std::map<std::string, std::unique_ptr<CSymbol> > CSymbol::allStrings;
CSymbol::CSymbol(const std::string & _name) : name(_name)
{
auto symb = allStrings.find(name);
if (symb == allStrings.end()) {
allStrings.emplace(name, this);
}
}
const std::string & CSymbol::String() const
{
return name;... |
58932dbf82abba176cddd1ad3d92a2029bec50fc | ea587ff4011fccb796eb1a0d8e3e517859dfa29c | clvn/buze | /src/armstrong/src/plugins/modplug/plugins.cpp | C++ | cpp | 1,659 | no_license | #include <zzub/plugin.h>
#include "plugins.h"
#include "modplug.h"
// A plugin collection registers plugin infos and provides
// serialization services for plugin info, to allow
// loading of plugins from song data.
struct modplug_plugincollection : zzub::plugincollection {
modplug_plugin_info _info;
// Called by ... |
af858cff460a1c268e0136baaddd0cba3e22ad0d | 9bac03c9bb8c100c59270b32fc29330e61e3bcdf | manleviet/VGI | /VGI/GraphImage/line.cpp | C++ | cpp | 1,104 | no_license | //
//
// image.cpp
//
// Implementation de la classe image.cpp
//
// LE Viet Man
// 14/05/10
//
//
#include "GraphImage/line.h"
//
// Construction
//
Line::Line(Image *startItem, Image *endItem)
{
this->startItem = startItem;
this->endItem = endItem;
// la taille de ligne par defaut
this->size = 1;
... |
eaf3acb075d5dc26ff124b005e31d3a9412285e3 | 1cf83df4a54228b87ae22cf47d54e217989d265f | silambarasan909/chromium | /chrome/browser/extensions/extension_csp_bypass_browsertest.cc | C++ | cc | 8,816 | permissive | // Copyright (c) 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/strings/pattern.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome... |
8b6509601d4d04e60e158e66f655b3170457a73a | 5e6257312547eb24ff8b68a8f2f06f1113d07fec | Johnnybelka/LB55 | /cll.cpp | C++ | cpp | 2,623 | no_license | #include <iostream>
#include "Complex.h"
#include "Vector.h"
#include <math.h>
using namespace std;
Complex::Complex()
{
re = 0;
im = 0;
}
Complex::Complex(const Complex &obj)
{
re = obj.re;
im = obj.im;
}
void Complex::output()
{
cout << "Число: (" << re << " + (" << im << ")i)" << endl;
... |
7b4288905abb60a6d3f6a0127650227c8b6234bc | ad26a5838b951156abf81507eb71b09faa0b8f75 | dotelpenguin/wwiv | /sdk/fido/fido_packets_test.cpp | C++ | cpp | 3,600 | permissive | /**************************************************************************/
/* */
/* WWIV Version 5.x */
/* Copyright (C)2021-2022, WWIV Software Services */
/* Licens... |
07f03b6db57cd21c2845cd054beb6ad9403681b6 | 444871e14d6d09ce9e6e0c19444cba33623d5f49 | mounika-v/Rigging-sketches-for-2D-character-animation | /makeobj.cpp | C++ | cpp | 803 | no_license | #include <iostream>
#include <stdio.h>
#include <fstream>
using namespace std;
int main()
{
FILE *nodef,*elef;
nodef = fopen("triangle/contour.2.node","r");
elef = fopen("triangle/contour.2.ele","r");
ofstream outdata;
outdata.open("sem/mesh1.obj");
int n=0,iter = 1;
float x,y,z;
fscanf(nodef,"%d %f %f %... |
6919452798ea6287df4a6e3d6b200064dacbc6c4 | 630cee19f01553f4919f7304431fc896c6e5055d | metabeast/app | /gpu/render_state.hpp | C++ | hpp | 2,090 | no_license | #pragma once
#include "buffer.hpp"
#include "texture.hpp"
#include "pipeline.hpp"
#include "options.hpp"
#include "../detail/declarator_list.hpp"
namespace app::gpu {
struct index_buffer { buffer* buffer {}; };
//--------------------------------------------------------------------------
struct vertex_bu... |
b112a603f7fe97d3afe752e25d5151bf00c9298f | 1a1aa09e89013c7d5c15035dc36c87291bbcbd52 | hd16861686/licode | /erizo/src/erizo/NiceConnection.cpp | C++ | cpp | 19,323 | permissive | /*
* NiceConnection.cpp
*/
#include <nice/nice.h>
#include <cstdio>
#include <string>
#include <cstring>
#include <vector>
#include "NiceConnection.h"
#include "SdpInfo.h"
#include "lib/Clock.h"
#include "lib/ClockUtils.h"
using std::memcpy;
// If true (and configured properly below) erizo will generate relay can... |
b2efcfd9bdecf4b708f6a213cb2c626b112f2283 | 65cd6965995e0cbb3cf683ffcf1180b7fc597839 | codewithrohan/DataStructuresAndAlgo | /Hackerrank/Linked Lists/Inserting a Node Into a Sorted Doubly Linked List.cpp | C++ | cpp | 1,138 | no_license | //https://www.hackerrank.com/challenges/insert-a-node-into-a-sorted-doubly-linked-list/problem
// Complete the sortedInsert function below.
/*
* For your reference:
*
* DoublyLinkedListNode {
* int data;
* DoublyLinkedListNode* next;
* DoublyLinkedListNode* prev;
* };
*
*/
DoublyLinkedListNod... |
5a799df80925618c403cb0f2e5634936cfa60381 | 798aa5501feea77020c0e73c62fb869cead4282e | Aulene/Competitive-Programming-Solutions | /Codeforces/831D.cpp | C++ | cpp | 1,171 | no_license | #include<iostream>
#include<fstream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<climits>
#include<algorithm>
#include<vector>
#include<map>
#include<queue>
#include<stack>
#include<set>
#include<list>
using namespace std;
#define int long long int
#define mod 1000000007
#define inf 100000000000007
#d... |
337adf95a78418f4869108cdf187d96f11a57672 | 8254da67032e079d2d31553c140ab07feefc1ad5 | PorcaM/2016-inha-ps | /w6_starwars.cpp | C++ | cpp | 1,308 | no_license | /*
Problem: starwars - w6_starwars
Submitted: 21:43
Language: C++
Time used: 10.04 second
Memory used: 262144 bytes
*/
#include <iostream>
#include <algorithm>
using namespace std;
struct Edge {
int d, a, b;
};
int T, N;
int x[100], y[100];
int g[100], n[100];
Edge e[10000];
inline bool edge_sort(Edge e1, Edge e2... |
22bab1e05242024af6699729adc7d6e123279981 | ca14a77957709fe755f7a859a149cd82f2a82eff | wanggp3/CodeIn2014 | /UVA/11020.cpp | C++ | cpp | 1,174 | no_license | #include<iostream>
#include<cstring>
#include<set>
#include<map>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<algorithm>
#include<stdio.h>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;++i)
#define fab(i,a,b) for(int i=a;i<=b;++i)
#define fba(i,b,a) for(int i=b;i>=a;--i)... |
f852edbedd47d9d9b99790075ddfbfb4206c56eb | bc8d8a8eaaed09c70b640a154033916a4d4ebe8c | jonahisadev/serenity | /Userland/Applications/PixelPaint/ToolPropertiesWidget.cpp | C++ | cpp | 1,263 | permissive | /*
* Copyright (c) 2020, Ben Jilks <benjyjilks@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "ToolPropertiesWidget.h"
#include "Tools/Tool.h"
#include <LibGUI/BoxLayout.h>
#include <LibGUI/GroupBox.h>
REGISTER_WIDGET(PixelPaint, ToolPropertiesWidget);
namespace PixelPaint {
ToolPropertiesWidg... |
9b6a4b5daa63cf1cd0b57f3b99da790c6764ec89 | ec85533708688054eb1e1fce9d763550aef16ded | microsoft/MixedRealityToolkit | /Sharing/Src/Source/Common/Private/BoolElementImpl.cpp | C++ | cpp | 2,272 | permissive | //////////////////////////////////////////////////////////////////////////
// BoolElementImpl.cpp
//
// Copyright (C) 2016 Microsoft Corp. All Rights Reserved
//////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "BoolElementImpl.h"
#include "ModifyOperation.h"
XTOOL... |
de0dce5542002cd3267f25e7743d0ae877ea552d | 19aef5fecf9cc7e25c64f437a7639df714cdf46b | showmic96/Online-Judge-Solution | /CodeForces/1082C/17752504_AC_78ms_5656kB.cpp | C++ | cpp | 1,312 | no_license | // In the name of Allah the Most Merciful.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX = 1e5+9;
vector<int>v[MAX] , sum[MAX];
bool cmp(int A , int B)
{
return A>B;
}
bool cp(pair<int , int>A , pair<int , int> B)
{
return A.first>B.first;
}
int main(void)
{
int n , m... |
8b0158da3e98fc7e4ea179563e587faebf2555ed | f6b4df34f832d9e881d860d76461c6ad0a17cd15 | allserversmustdie/teamstudy | /Server/UserManager.cpp | C++ | cpp | 724 | permissive | #include "Precompiled.h"
#include "UserManager.h"
#include "User.h"
#include "Session.h"
UserManager::UserManager()
{
}
UserManager::~UserManager()
{
for (auto itr = userManager.begin(); itr != userManager.end(); ++itr)
{
delete itr->second;
}
}
User* UserManager::CreateUser(Session* s)
{
User* user = new Use... |
88775bab6af3b87c89cb69ea71dd61132cc25f43 | 60b5bd81dbe201ad039cd59a3dd5c6f762761754 | uael/42piscine | /cpp/d05/ex02/main.cpp | C++ | cpp | 2,178 | no_license |
#include "Bureaucrat.hpp"
#include "Form.hpp"
#include "PresidentialPardonForm.hpp"
#include "RobotomyRequestForm.hpp"
#include "ShrubberyCreationForm.hpp"
int main() {
try { zob::Bureaucrat b("Zob", 151); }
catch (zob::Bureaucrat::GradeTooLowException &e) {
std::cout << e.what() << std::endl;
}
try { zob::Bur... |
585217fd3174da4316931058cbf538cdf653c91a | e0d5677c16d7cf0a7e1c321f7998bc7655be08cf | devhg/some_answer_for_OJ | /18上期末考试部分/最终之战.cpp | C++ | cpp | 4,847 | permissive | #include <bits/stdc++.h>
using namespace std;
struct node
{
int xue;
int gong;
int fang;
int su;
};
int main()
{
char s[13], s1[14];
node wo[5], di[10];
int sum = 0;
for (int i = 1; i <= 4; i++)
{
cin >> s >> wo[i].xue >> wo[i].gong >> wo[i].fang >> wo[i].su >... |
37075fc33748da862fdace6b4497250b60a55a15 | 0953255fd5f9110a8493bc3d8b76879e710d0d33 | yangguang-ecnu/smisdk | /Common/dcmtk/dcmtk-3.5.4/dcmimgle/apps/dcmdspfn.cxx | C++ | cxx | 16,746 | permissive | /*
*
* Copyright (C) 1996-2005, OFFIS
*
* This software and supporting documentation were developed by
*
* Kuratorium OFFIS e.V.
* Healthcare Information and Communication Systems
* Escherweg 2
* D-26121 Oldenburg, Germany
*
* THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRA... |
e389523816b607170f9d4f5b617d09e4ad4ec80d | b20b948f2951bc1b7bc5ad605dfef058436cd85c | ros2/common_interfaces | /sensor_msgs/include/sensor_msgs/image_encodings.hpp | C++ | hpp | 7,842 | permissive | // Copyright (c) 2009, Willow Garage, Inc.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the fol... |
faeb91ece02f5e75ce621bcb1b01b3b211b849d6 | d67b0304b41aa226f34927a03cf6f233b5d47caf | zdavison/circlejerk | /libcxx-3.8.0.src/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp | C++ | cpp | 3,898 | permissive | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
5e4a04438aa29d9c981b5e9cc862b3a538d3437f | 943015a95a0a6565217c07f9cdc9d51ceecf62fa | tcagame/Attraction2016.5 | /Solution/Controller/Log.cpp | C++ | cpp | 676 | no_license | #include "Log.h"
#include "Application.h"
#include <stdarg.h>
LogPtr Log::getTask( ) {
ApplicationPtr fw = Application::getInstance( );
return std::dynamic_pointer_cast< Log >( fw->getTask( Log::getTag( ) ) );
}
Log::Log( ) {
}
Log::~Log( ) {
}
void Log::update( ) {
// なにもしない
}
std::string Log::get( int i ) {
... |
e8d1016b4b4796b1b41977142bbca769cb7d9f62 | a21916b6444030d744d590a3b7ad9c501bb30245 | stefan50/MyCalendar | /String.hpp | C++ | hpp | 1,185 | no_license | #ifndef STRING_HPP
#define STRING_HPP
#include <cstring>
#include <iostream>
#include <cstdlib>
#include "Vector.hpp"
class String {
private:
char* string;
void copy(const String& other) {
string = new char[strlen(other.string) + 1];
strcpy(string, other.string);
}
void erase() {
... |
4858931b19d26e1ae3b5a1184807a34abdfe6174 | 21c5b08506369f8fbec11c74cd04b48ec8f01c5d | apache/openoffice | /main/drawinglayer/source/processor2d/helperwrongspellrenderer.cxx | C++ | cxx | 4,011 | permissive | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
969f4f22c52383ea68e423c2baca26c75ec6940f | 461995c1e07cdc3d89c5625b104739a4e04a58cb | tufei/Halide-elements | /src/open_rect/open_rect_generator.cc | C++ | cc | 1,099 | permissive | #include <cstdint>
#include "Halide.h"
#include "Element.h"
using namespace Halide;
using Halide::Element::schedule;
template<typename T>
class OpenRect : public Halide::Generator<OpenRect<T>> {
public:
ImageParam src{type_of<T>(), 2, "src"};
GeneratorParam<int32_t> width{"width", 1024};
GeneratorParam<... |
e1d7e96eb8bc6b543f35bf28168a54fa1953c6d3 | 760275317ad72044c72c778e7c3ef4a38d36cd67 | vinbo/bitbots_motion | /bitbots_quintic_walk/src/walk_ik.cpp | C++ | cpp | 3,396 | permissive | #include "bitbots_quintic_walk/walk_ik.h"
namespace bitbots_quintic_walk {
WalkIK::WalkIK() : ik_timeout_(0.01) {}
void WalkIK::init(moveit::core::RobotModelPtr kinematic_model) {
legs_joints_group_ = kinematic_model->getJointModelGroup("Legs");
left_leg_joints_group_ = kinematic_model->getJointModelGroup("LeftL... |
d83bbdf28676ad2dc131f0ce58e98337f5a7bb3f | 089bc22435052250d74d01a902b9b4f62516dd5b | soraia-ferreira/robocup-at-work | /mas_common_robotics/mcr_perception/mcr_blob_tracking/ros/src/blob_tracking_node.cpp | C++ | cpp | 7,796 | no_license | #include <mcr_blob_tracking/blob_tracking_node.h>
BlobTrackingNode::BlobTrackingNode(ros::NodeHandle &nh) :
node_handler_(nh),
image_transporter_(nh),
run_state_(INIT),
start_blob_tracking_(false),
image_sub_status_(false),
blobs_sub_status_(false),
first_pass_(true),
blob_tracked_index... |
46dc53d9a77ee9d4d4cfcd4fec75946b2ecc6711 | 7a283881f99b7dc828a31b153c1ab5cef2c60393 | whycoding126/chromium | /components/zucchini/main_utils.cc | C++ | cc | 8,379 | 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 "components/zucchini/main_utils.h"
#include <stddef.h>
#include <memory>
#include <ostream>
#include <string>
#include <vector>
#include "base... |
849dd2f736c0c8fd269a7f528f4c4a202bdb9754 | db3a5983ec8f7d28684f719077d7ae679b499562 | ruofeidu/CS110 | /ProjectLibrary/Reader.cpp | C++ | cpp | 2,214 | no_license | /***************************************************
文件: Reader.cpp
引用:Reader.h
姓名: 杜若飞
学号: 5090109228
工程: 星海碧空图书馆管理系统
班级: F0903028
用途:读者操作实现
构想:Date Month User
***************************************************/
#pragma once
#include <iostream>
#include <string>
#include "Reader.h"
using namespace std... |
821f2e557a36b3179895f3b075d19111c0d8ec8d | d0731a24f9a490e4f2826f4cb0bb207bbb46aec5 | Pratyush219/DSA-Practice-Problems | /DpDir/EggDroppingProblem.cpp | C++ | cpp | 449 | no_license | #include <iostream>
#include <vector>
using namespace std;
#define vvi vector<vector<int>>
int min_attempts(int f, int e){
if(e == 1 || f <= 1) return f;
int ans = INT_MAX;
for(int k{1}; k <= f; k++){
int temp = 1 + max(
min_attempts(k-1, e-1),
min_attempts(f-k, e)
... |
2ad7f4f584c8802aa99f22fcb1cd0295948e3115 | d955dcdb7e6cea2bce1db8f8597d113097ed3ed6 | BlackJackDev/BlackJack | /src/qt/optionsdialog.cpp | C++ | cpp | 8,242 | permissive | #include "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h"
#include "optionsmodel.h"
#include <QDir>
#include <QIntValidator>
#include <QLocale>
#include <QMessageBox>
#include <QRegExp>
#include <QRegExpValidator>
OptionsDialog::OptionsDi... |
f11089109b463e5f5153d5620592623842b7740c | 20c82bd5450a500a89fcc9160706f5caa6c818ad | vipul43/IP | /YACC-Training-Contest/1/A.cpp | C++ | cpp | 3,509 | permissive | #include<bits/stdc++.h>
using namespace std;
//making life easy!
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
#define F... |
04511334b0e614765c87384e31c514aa3a2ee29e | 2a1dffb3780cca837ccc4a1226aaeb9efce14b65 | KoseMasu/ccbench-1 | /common/result.cc | C++ | cc | 16,127 | permissive |
#include <cmath>
#include <iomanip>
#include <iostream>
#include "../include/debug.hh"
#include "../include/result.hh"
using std::cout;
using std::endl;
using std::fixed;
using std::setprecision;
using namespace std;
extern void displayRusageRUMaxrss();
void Result::displayAbortCounts() {
cout << "abort_counts_:... |
dbadfda5d0d99fd9342e4a35b7bb17de7146412b | a62c8cd77a1ee1bf07aa6bf8521fe3499557b25c | voei/megamol | /core/src/utility/plugins/Plugin200Instance.cpp | C++ | cpp | 3,053 | permissive | /*
* Plugin200Instance.cpp
* Copyright (C) 2015 by MegaMol Team
* All rights reserved. Alle Rechte vorbehalten.
*/
#include "stdafx.h"
#include "mmcore/utility/plugins/Plugin200Instance.h"
#include <cassert>
using namespace megamol::core;
using namespace megamol::core::utility::plugins;
/*
* Plugin200Instance:... |
aac6c39840e7bd5703f4a30af02e1124efa792d9 | 7ad04bd28e18c0b59a89dc0c83d483a977858c0f | JorisSAN/SimpleEngineWithOpenGL | /OpenGL/MeshComponent.cpp | C++ | cpp | 901 | no_license | #include "MeshComponent.h"
#include "Actor.h"
#include "Game.h"
#include "Mesh.h"
MeshComponent::MeshComponent(Actor* owner) : Component(owner), mesh(nullptr), textureIndex(0)
{
owner->getGame().getRenderer().addMesh(this);
}
MeshComponent::~MeshComponent()
{
owner.getGame().getRenderer().removeMesh(this);
}
void ... |
42e487cd1e6912c18b8b1b532d519ae88a9dd3b8 | 2a7eb46690d22297f2965e5c8c7d333573807292 | owais1412/Competitive-Programming | /PTMSSNG.cpp | C++ | cpp | 994 | no_license | // CC https://www.codechef.com/JULY20B/problems/PTMSSNG
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int32_t main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin) ;
freopen("output.txt", "w", stdout) ;
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL) ; cout.tie(NULL) ... |
0d7cc2498a7fe93bedfc785f9f0c9ae090cfd6bd | 7ae4501bf99f6645030ed1e89cacdd1243a583b9 | charlesrwest/societyOfMachines | /tests/libprotobuf/compilationWithCMake/listPeople/listPeople.cpp | C++ | cpp | 1,481 | no_license | #include<iostream>
#include<fstream>
#include<string>
#include "addressbook.pb.h"
using namespace std;
//Iterates through all people in the AddressBook and prints info about them
void ListPeople(const AddressBook& address_book)
{
for(int i=0; i < address_book.person_size(); i++)
{
const Person& person = address_book.... |
7f817f931e57e64edac89960cd0b3d7f53f6f459 | e21d073af74ce1a4f00934fcbb5f9dcbb8e36b9c | albertghtoun/transmem | /tests/libstdc++_validation/map/observer.cc | C++ | cc | 1,313 | no_license | #include <iostream>
#include <map>
#include "tests.h"
#include "verify.h"
/// The map we will use for our tests
std::map<int, int>* observer_map = NULL;
void observer_tests(int id)
{
global_barrier->arrive(id);
if (id == 0)
printf("Testing get_allocator(1), key_comp(1), value_comp(1)\n");
// test... |
91cdc125e17e4d13b76e166e32608ace06d7c12d | 5f3870ce4fdd317ac5c9f139a3003273261ae87d | HiromuOhtsuka/procon | /AOJ/Vol01/0116/RectangularSearching.cpp | C++ | cpp | 1,516 | no_license | #include <cstdio>
#include <stack>
#include <map>
#include <algorithm>
#define MAX_H 500
#define MAX_W 500
using namespace std;
typedef pair< int, int > P;
int W, H;
char table[MAX_H][MAX_W];
int dp[MAX_H][MAX_W + 1];
int rectangular_search(){
for(int j = 0; j < W; j++){
if(table[0][j] != '*'){
dp[0][j] ... |
2eea8b5258c899f689138a6d74f3fccf3652241a | 0abd9bb906e9ac988234b5d208d18def888747f1 | DigitalInBlue/Celero | /src/Exceptions.cpp | C++ | cpp | 7,398 | permissive | ///
/// \author Peter Azmanov
///
/// \copyright Copyright 2016-2023 John Farrier
///
/// 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
//... |
428f91e836011b3827814eab109eb9fb26b292b7 | cb30a978c39dfc8af4a590eb5a79c2dba0d72ff7 | tuket/irrlicht_demos | /python/bones.cpp | C++ | cpp | 2,893 | no_license | #include <iostream>
#include <irrlicht/irrlicht.h>
using namespace std;
using namespace irr;
int main()
{
IrrlichtDevice* device =
createDevice
(
video::EDT_OPENGL,
core::dimension2d<u32>(800, 600),
16,
false, // fullscreen
false, // stencyl buffer
false, // vsync
0 // IEventReceiver*
);
scene... |
5469c5ae114db422be25c4828e0f87a94b5726c9 | 237b4145550e6e220b1bc6ef8089f15ba6024162 | dummas2008/chromium | /src/content/test/test_navigation_url_loader_delegate.cc | C++ | cc | 2,397 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/test/test_navigation_url_loader_delegate.h"
#include "base/run_loop.h"
#include "content/public/browser/stream_handle.h"
#include "cont... |
50214974eaa0fb2a13b8bfc2590412c2d07d22a2 | af9e8ac8c034c61bd40c9917e3901476f41c5cad | NilesT27/Class_MyString | /MyString.cpp | C++ | cpp | 4,050 | no_license | #include <iostream>
using namespace std;
class MyString
{
public:
MyString() // Конструктор без параметров
{
str = nullptr;
length = 0;
}
MyString(const char *str) // Конструктор с параметрами
{
length = strlen(str);
this->str = new char[length + 1];
for (int i = 0; i < length; i++)... |
4f1ad0cfd0645aeb28d2155bcfc6bd5df75230ff | 89b6d2172d056ab7ff2258b33204ba3a850f2bfd | greenberet99/EmulationStation | /es-app/src/Gamelist.cpp | C++ | cpp | 10,061 | permissive | #include "Gamelist.h"
#include "utils/FileSystemUtil.h"
#include "utils/StringUtil.h"
#include "FileData.h"
#include "FileFilterIndex.h"
#include "Log.h"
#include "Settings.h"
#include "SystemData.h"
#include <pugixml/src/pugixml.hpp>
#ifdef WIN32
#include <Windows.h>
#endif
FileData* findOrCreateFile(SystemData* sy... |
9194fd57963f95cbb12df5f7d6bfc7204c31a0d1 | f67f740f8ee081aa9a1cf57a476d4b6978ca8ec8 | Bocity/ACM | /vjudge/little_kawayi/Gym/101667I/13647726_WA_1404ms_11108kB.cpp | C++ | cpp | 671 | no_license | #include <bits/stdc++.h>
using namespace std;
int f[1000005];
int dp[1000005];
int main(){
int n;
cin >> n;
for(int i = 1; i <= n;++i){
cin >> f[i];
}
dp[n] = 1;
for(int i = n-1; i>=1; --i){
if (f[i + dp[i + 1]] == f[i]){
dp[i] = dp[i + 1];
}else{
... |
0b6a2acad689eb2fd7b9360cea9481463b7ddc75 | ef0e73ba4e8e6cf9f9aabc75e5d9372df2dea676 | green-fox-academy/Joco456 | /week-04/Day-4/Fibonacci/Fibonacci_tests/Fibonacci_tests.cpp | C++ | cpp | 319 | no_license | //
// Created by Admin on 25/04/2019.
//
#include "Fibonacci.h"
#include <gtest/gtest.h>
TEST(FibonacciTest, testWithValidNumber){
Fibonacci ob1;
int result = ob1.fib(10);
ASSERT_EQ(result,55);
}
TEST(FibonacciTest, testWithNegativeNumber){
Fibonacci ob1;
ASSERT_ANY_THROW(ob1.fib(-1));
}
|
f888f768adcb37f104ae999ee4e345fa7d986754 | 612230024575c6cdaa51133a8ad1416d6da4c463 | devs-place/CIS22C.TeamProject | /src/TrackingMail.hpp | C++ | hpp | 951 | no_license | // Specification file for the Date class
// Written By: Keshav Gurushankar
// IDE: Visual Studio Code
#ifndef TRACKING_MAIL_H
#define TRACKING_MAIL_H
#include <iostream>
#include "Mail.hpp"
using std::ostream;
using std::string;
class TrackingMail
{
private:
Mail m;
public:
TrackingMail(Mail mail){this->m = mail... |
1f5bf47cd49d1aa786bd2458eb23e80dd4fb1ef2 | 458eb85fe5d7ad83cad2810c15e960035bbec2ac | djbhsys/UE4 | /samples/Projects/Shooter - Test/Source/Shooter/Test/IsolatedComponent0618.cpp | C++ | cpp | 1,046 | no_license |
#include "IsolatedComponent0618.h"
UIsolatedComponent0618::UIsolatedComponent0618()
{
PrimaryComponentTick.bCanEverTick = true;
MovementRadius = 0.0f;
}
void UIsolatedComponent0618::BeginPlay()
{
Super::BeginPlay();
AActor* Parent = GetOwner();
if (Parent)
{
Parent->SetActor... |
fcf5ff6c38afefb854ce9309ec27c57046fb1b94 | 02f84ba425659aca47f05d9b42c858a9984b6b3b | scd42636/DT_WS1718_02_StarCar | /pi/GUI/lidar/windowsTest.cpp | C++ | cpp | 1,796 | no_license | // StarCarUrg.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
//
#include "stdafx.h"
#include <stdlib.h>
#include <math.h>
#include "urg_sensor.h"
#include "urg_utils.h"
int main()
{
urg_t urg;
int ret;
long *length_data;
int length_data_size;
// \~english "COM1" is, in this case, the device ... |
74d96482f47675ea3a2f17fdebedf956390587dd | 6fe0c11911d1897d0bc2fc6907a4724d5d9159ee | elliottslaughter/llvm | /lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp | C++ | cpp | 8,912 | permissive | //===-- MipsASMBackend.cpp - Mips Asm Backend ----------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
eea97f0b1bacfb9bc07462d560ba5cb76d6319f5 | 98d8eaae925277cc8dcce35b05f8bff574e0a20f | fredpower44/p4c | /backends/common/removeComplexExpressions.cpp | C++ | cpp | 9,520 | permissive | /*
Copyright 2013-present Barefoot Networks, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... |
88c43ba6e68d97b11dcc316599dde03602f619fe | b397c62adb846cecf6526d5e41c497666c01f07a | jsj2008/karakuri | /Installer/old/File Template/Contents/Karakuri Game/World class.pbfiletemplate/WorldClass.cpp | C++ | cpp | 806 | permissive | /*!
@file «FILENAME»
@author «FULLUSERNAME»
@date «DATE»
*/
/*
TODO 1: Put this one line at the top of GameMain.cpp.
#include "«FILEBASENAMEASIDENTIFIER».h"
TODO 2: Insert this one line at the end of GameMain::setupWorlds() function in GameMain.cpp.
addWorld("«FILEBASENAMEASIDENTIFIER... |
dfafa2c4d0d778945abe23314e43311f83210d45 | eda577a68d6b2d191c59f1070f50cb27bf491ffa | nickbartz/Hive_Attack | /Hive_Attack/Render_Manager.cpp | C++ | cpp | 16,906 | no_license | #include<Render_Manager.h>
#include<fstream>
#include<sstream>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <stdio.h>
#include <stdlib.h>
#include<texture.hpp>
#include<Global_Render_Variables.h>
#include<Gameplay_Manager.h>
#include<Service_Locator.h>
using namespace std;
using namespace glm;
Render_Manag... |
78ef63bfa89b490a135f24c65f27d5ffa04b5012 | 54a298789bbb1ddda9bd3ef4ede7459cbaca9133 | kyx0r/FA_Patcher | /boost_lib/boost/units/is_dimensionless.hpp | C++ | hpp | 1,097 | permissive | // Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt... |
ed38546de5a40b533a9c20048d433b5fda63f449 | eec2c2ad0a0c9b6dd8905ccc4a76c6b12711ca2f | iridium-browser/iridium-browser | /third_party/blink/renderer/platform/graphics/paint/geometry_mapper.cc | C++ | cc | 27,392 | permissive | // Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/platform/graphics/paint/geometry_mapper.h"
#include "base/containers/adapters.h"
#include "third_party/blink/renderer/platform/geometry/la... |
ed12af0dc68b0805ef034649a3e3709131391b19 | 6093f7bec22991f6b3f3775fce6a58a575865724 | kame-git/PPPUCPP | /chap5/trythis/temp.cpp | C++ | cpp | 618 | no_license | #include "../../std_lib_facilities.h"
int main()
{
vector<double> temps;
double temp = 0;
double sum = 0;
double high_temp = 0;
double low_temp = 0;
while (cin >> temp)
temps.push_back(temp);
for (int i = 0; i < temps.size(); ++i)
{
if (temps[i] > high_temp)
... |
6cd43fb2b65d1e37ce648c080c1127609b8f5ce7 | 11694c4ceae023a0fd51ab02f0c50cdd25732e20 | zzmp/hifi | /libraries/entities/src/EntityTree.cpp | C++ | cpp | 76,072 | permissive | //
// EntityTree.cpp
// libraries/entities/src
//
// Created by Brad Hefta-Gaub on 12/4/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <PerfStat.h>
#include <QDa... |
7e72f8ef7a14e6560b03b658174f3d8a1af0eda8 | 72fd67fc76b889bb8f5daa01299c8c1ecfd22acf | maeager/spikesim | /main4.cpp | C++ | cpp | 3,475 | no_license | #include <cstdlib>
#include <iostream>
#include <fstream>
#include <time.h>
#include "TypeDefs.h"
#include "SimulationEnvironment.h"
#include "OutputManager.h"
#include "ParallelNetManager.h"
#include "ParNetwork.h"
#include <mpi.h>
#include "NoThreading.h"
#include "Engine.h"
void
force_end_spikesim()
{
ParS... |
1a4bdcdcf92c3a27cb8795157e4b91a51e87e38a | f1f9cf734519d1f8698c130c8dc238b8efce4e55 | AniruddhaSadhukhan/C-Plus-Plus-Programs | /File Handling/binary.cpp | C++ | cpp | 559 | no_license | #include<iostream>
#include<fstream>
using namespace std;
/*Write a C++ program to open a file in binary mode. Write and read the data.*/
// by Aniruddha
int main()
{
string name;
int age;
ofstream out("text.txt",ios::out | ios::binary);
cout<<"\nName:";
cin>>name;
cout<<"Age:";
cin>>age;
out<<name<<"\t";
... |
8d39b01a0f49628ac167da89d45f1fc0c969b811 | 80f07904662f551990d3df55e025124795be6e42 | TongqiZhu/tvm | /src/relay/ir/base.cc | C++ | cc | 2,977 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
3b55dec767a8b5b2c127ec6a2bebd80ac7672f2c | 891650b47cc53e4bea68bdec6e839f2b1e09b4fd | guynnn/ex2-CPP | /chess.cpp | C++ | cpp | 1,303 | no_license | #include "Board.h"
/**
*
* @return 0 iff the execution was successful.
*/
int main()
{
Board board;
std::string whitePlayer, blackPlayer;
std::cout << "Enter white player name:\n";
std::cin >> whitePlayer;
std::cout << "Enter black player name:\n";
std::cin >> blackPlayer;
bool currentCo... |
c2a68b8db944bbeeffee615a3fdcce0eb55e29b8 | f6ea788be43d805535a05fe7100449f5262ce3ad | cms-sw/cmssw | /L1TriggerConfig/DTTrackFinder/src/DTPtaLutTester.cc | C++ | cc | 518 | permissive | //-------------------------------------------------
//
// Class: DTPtaLutTester
//
// L1 DT Track Finder Pt Assignment Lut Tester
//
//
//
// Author :
// J. Troconiz UAM Madrid
//
//--------------------------------------------------
#include "L1TriggerConfig/DTTrackFinder/interface/DTPtaLutTester.... |
091052fa1338ac49cb88158dc8d88e228996b952 | 73d108c0adf79d62c6b86f2902aad9a0f6935642 | shlusiak/Skinamp | /SkinampC/language.cpp | C++ | cpp | 4,359 | no_license | #include "windows.h"
#include "language.h"
#define CACHED 1
int ExtractPrefix(PCHAR s)
{
CHAR *f=strchr(s,'='),*error;
if (f==NULL)return -1;
int ret=strtol(s,&error,10);
if (error==s)return -1;else return ret;
}
BOOLEAN ExtractSuffix(PCHAR s,PCHAR result)
{
CHAR *f=strchr(s,'=');
if (f==NU... |
a1feb595dc663506c9bc10c88996a4df819efa41 | da3dc8022a1dc9bd513a954ac089f7e93813f6ba | J-A-Cgyt/3SRC_XJ | /Project1/Main_Prog_2.cpp | C++ | cpp | 3,153 | no_license | #include "Func_Proj_2nd.h"
string Load_Path_2nd_1 = "G:\\Pictures\\Test For Programming\\DSC_7114.jpg"; //拼接原图1
string Load_Path_2nd_2 = "G:\\Pictures\\Test For Programming\\DSC_7115.jpg"; //拼接原图2
string Load_Path_2nd_3 = "G:\\Pictures\\Test For Programming\\001.jpg"; //分水岭分割
string Load_Path_2nd_4 = "G:\\Pictures\\Te... |
3fc587c1be525b5f1c651fc605760f8d01ca6778 | a96d0d368fda62539974f86260ead860b0ad61a7 | nv-chromium/chromium-crosswalk | /chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc | C++ | cc | 37,932 | 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 "base/cancelable_callback.h"
#include "base/command_line.h"
#include "base/location.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loo... |
47a584d2528840e76fe42efcbe253ac1ea934a2e | f4e22472bd8c2b85d521e29c7274cac050ea3c4f | sanjusss/leetcode-cpp | /0/0/80/81_20210407.cpp | C++ | cpp | 1,340 | no_license | #include "leetcode.h"
class Solution {
public:
bool search(vector<int>& nums, int target) {
int leftMin = nums[0];
if (leftMin == target) {
return true;
}
int left = 0;
int right = nums.size() - 1;
while (left < right && leftMin == nums[right]) {
... |
c1137c5ac467b9555247ffa667a6511d4575ac7c | cab2494eddc643099b427f1c11300a39dffbfef4 | koson/Mine | /C++/dat220_2020_05_can_node/source/STM32H7B3I-DK-MergeTest/TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp | C++ | cpp | 3,541 | no_license | /**
******************************************************************************
* File Name : TouchGFXGeneratedHAL.cpp
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
* All rights reserved... |
3b8c280302dc81bb1e8fccc6619315829da932ef | 6bbb6d87d7e49a7a18fb5a62627ce5f9546c47b0 | jianglu/dukv8 | /src/string.cpp | C++ | cpp | 4,773 | permissive | //
// Created by Jiang Lu on 6/2/15.
//
#include <cassert>
#include "dukv8/string.h"
#include "dukv8/local.h"
#include "dukv8/isolate.h"
#include "dukv8/duk_stack_scope.h"
namespace v8 {
RTTI_IMPLEMENT(v8::String, v8::Primitive);
String *String::Init(DukContextRef duk_ctx, const char *data, int length) {
Primit... |
85e20409865b0e62a286835c003238a88364cf0b | 16de1276f6dacf4df87cb95cc9937b39f676aae8 | nelolee/chromium | /chrome/browser/chromeos/power/ml/user_activity_logger_delegate_ukm_unittest.cc | C++ | cc | 18,917 | 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 "chrome/browser/chromeos/power/ml/user_activity_logger_delegate_ukm.h"
#include <memory>
#include <vector>
#include "chrome/browser/chromeos/po... |
03c6ce226d994a8ff0a2c33d80c81b804dd0a091 | a3a9afe5ab15c4f380f50b544ebe1949466f7dd0 | TiberiumCC/Tiberium | /src/qt/rpcconsole.cpp | C++ | cpp | 36,000 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcconsole.h"
#include... |
6aaf642740e8242b13f0eb93a345663324682cf9 | af9abacdafe5ea69d3fbba9431ff07cc5aaf6dfb | Nidhishastry/Bus-project | /bus_1/main.cpp | C++ | cpp | 5,322 | no_license | //
// main.cpp
// Bus reservation system.
//
// Created by Kruthika Ramesha and Kumar Divya Rajat on 14/04/15.
//
//
#include<iostream>
using namespace std;
int r=0,p=0,k=20;
float allsell=0;
class bus{
char arriva[9],deprt[9],from[9],to[9],pname[99];
int bu... |
991dba436a8852a104d95b18c58210005411400a | 711167305c80a0de63282f72745031e1f01048ca | marcelkunze/rhonno | /RhoNNO/TFD.cxx | C++ | cxx | 254 | permissive | // TFD
//
// Implementation of the Fisher discriminant (no hidden Layer)
// Part of the Neural Network Objects package (NNO)
//
// Author List:
// Johannes Steffens, Bochum University
// M.Kunze, Bochum University, 1995
#include "TFD.h"
ClassImp(TFD)
|
6e36e4048d8541a52d362c084995d10178fc6527 | ffc69d514749f3249b17dd6d944f0672d1faba58 | phalpern/Thermostat | /TempSensor.cpp | C++ | cpp | 4,673 | permissive | /* TempSensor.cpp -*-C++-*- */
#include "TempSensor.h"
#include <application.h> // Arduino interface constants and functions
// Choose between DHT22 and DHT11 temperature & humidity sensor
#define DHT22 22 // DHT22 is the higher-accuracy sensor (16-bit measurements)
#define DHT11 11 // DH... |
b7e347de8430e781819099d7b9a9cd3cdbfcbd21 | d6afd2acf3e53d9ff5cdcb2ec7325ad43765a05c | bastovd/ray-tracer | /StarterCode/StarterCode/Furniture.cpp | C++ | cpp | 9,205 | no_license | #include "Node.h"
#include "Furniture.h"
#include <cmath>
#include <iostream>
Furniture::Furniture() {
furnType = "";
float col[3] = {0,0,0};
float pos[3] = {0,0,0};
float sca[3] = {0,0,0};
for (int i = 0; i < 3; i++) {
furnCol.push_back(col[i]);
furnPos.push_back(pos[i]);
furnSca.push_back(sca[i]);
}
fu... |
83900ca9645210662bcedbd0401cbc0309ae2db9 | bee34570bdfb3a657e6baacfd1f782eadac63c71 | adityanjr/code-DS-ALGO | /CodeForces/Complete/500-599/530A-QuadraticEquation.cpp | C++ | cpp | 341 | permissive | #include <cstdio>
#include <cmath>
int main(){
int a, b, c; scanf("%d %d %d\n", &a, &b, &c);
double first = (-b - sqrt(b * b - 4 * a * c)) / 2 / a;
double second = (-b + sqrt(b * b - 4 * a * c)) / 2 / a;
if(b * b == 4 * a * c){printf("%.5lf\n", first);}
else{printf("%.5lf %.5lf\n", first, second... |
21d3c2f13d1fe7be05b55386e11b40088be70ffb | 7105b5def048c76205bfe5d316343c067372881c | AleksandrRozenman/Comp467Project | /borders.cpp | C++ | cpp | 2,292 | no_license | // Contrast stretching #1 - proportional scaling
// by Steven Wirsz
#include <iostream>
#include <stdio.h>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace std;
using namespace cv;
int main( int argc, char** argv )
{
// Read image given by user
Mat image = imread( argv[... |
b9e094e4cb60d0da00a638065248cd662149b2e2 | 8bab596901c91100ab0bbd821b67e0eb60cd1191 | ContentSquare/ClickHouse | /src/Storages/StorageS3.cpp | C++ | cpp | 60,226 | permissive | #include "config.h"
#include <Common/ProfileEvents.h>
#include "Parsers/ASTCreateQuery.h"
#if USE_AWS_S3
#include <Common/isValidUTF8.h>
#include <Functions/FunctionsConversion.h>
#include <IO/S3Common.h>
#include <IO/S3/Requests.h>
#include <IO/ParallelReadBuffer.h>
#include <IO/SharedThreadPools.h>
#include <Int... |
7bca92af8018d9551fab44d68da6842460d09997 | 6c5bc88589690d1a63f23db2731757bf4ff0382b | ned14/ISO_POSIX_standards_stuff | /pthreads Notifer Object/pthread_permit_speedtest.cpp | C++ | cpp | 4,036 | no_license | /* test_permit.c
Tests the proposed C1X permit object
(C) 2011-2012 Niall Douglas http://www.nedproductions.biz/
On a 2.67Ghz Intel Core 2 Quad:
Simple permit1:
Uncontended grant time: 48 cycles
Uncontended revoke time: 0 cycles
Uncontended wait time: 142 cycles
1 contended grant time: 725 cycles (359 without revo... |
a5eab93912efdcd46ad5204156c5e903b75d2f2a | 14e25bf354231c894e4da16c657bd6089c228edf | Team5553-RoboLyon/2021_DrivetrainTests | /src/main/cpp/lib/Utils.cpp | C++ | cpp | 654 | no_license | #include "lib/Utils.h"
#include "iostream"
void KineticToVoltage::SetMotorCoefficients(uint motorID, uint isBackward, double kv, double ka, double vintersept)
{
k_lut[motorID][isBackward][0] = kv;
k_lut[motorID][isBackward][1] = ka;
k_lut[motorID][isBackward][2] = vintersept;
}
double KineticToV... |
bb0f7a944cbd6b8ce5142c8c521584e1bdeb607e | fa2802bb23c404e5a5cf85eb1e179df72b7da300 | inzaghibest/CThreadPool | /test.cpp | C++ | cpp | 2,875 | no_license |
#include "C_Thread.h"
#include "C_ThreadPool.h"
#include "C_Mutex.h"
#include "CLog.h"
// 互斥锁测试
HANDLE g_hMutex = CreateMutex(NULL, false, NULL);
class CMyTask:public CTask
{
private:
static long m_nTaskCount;
public:
static long get_taskCount(){return m_nTaskCount;}
public:
CMyTask(int nPriority = 0):CTask(nPri... |
58365bd63ff39e22785be8c678bf2cfe26829731 | eb0f76f1ddda2dc064f8c60564a1baafed052ca0 | jsams001/cs010 | /Week09/vectorfind.cpp | C++ | cpp | 710 | no_license | #include <iostream>
#include <vector>
using namespace std;
int findVector(const vector<string>& list, string find) {
int i = 0;
for (i = 0; i < list.size(); ++i) {
if (find == list.at(i))
return i;
}
return -1;
}
int main() {
vector<string> list(6);
... |
91943238dffb835f846a6631885bbcffb6693612 | bbe243281fce2b7503767b2553d2900b598b7e81 | apple-open-source/macos | /WebKit/Source/ThirdParty/ANGLE/src/tests/gl_tests/ClearTest.cpp | C++ | cpp | 127,797 | permissive | //
// Copyright 2015 The ANGLE 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 "test_utils/ANGLETest.h"
#include "test_utils/gl_raii.h"
#include "util/random_utils.h"
#include "util/shader_utils.h"
#include "util... |
248955005fc6f29819ac8fc00ecdbb93e2623ca6 | f5528a7330813bacc8ae110ad5787d9560efba8c | cfontas/engine | /impeller/entity/contents/radial_gradient_contents.cc | C++ | cc | 3,654 | permissive | // Copyright 2013 The Flutter 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 "radial_gradient_contents.h"
#include "flutter/fml/logging.h"
#include "impeller/entity/contents/clip_contents.h"
#include "impeller/entity/conte... |
893cdfa4c42e3121d089582c25a41a33e6f668d6 | dca4ec533dedf8d3896498c12d8bfe0a4cbbe035 | ric2b/Vivaldi-browser | /chromium/ash/capture_mode/capture_mode_session.cc | C++ | cc | 111,129 | permissive | // Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/capture_mode/capture_mode_session.h"
#include <tuple>
#include "ash/accessibility/accessibility_controller_impl.h"
#include "ash/accessibility/magnifier/magnifi... |
8316f579159142be8486dfddfa266b739ffce8b8 | d9105409649c7d999c18c7105abaf81d14d71a24 | skinnari/cmssw | /CondTools/Geometry/plugins/DTRecoIdealDBLoader.cc | C++ | cc | 2,137 | permissive | #include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.