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 |
|---|---|---|---|---|---|---|---|---|
cee75d5a5bc00e77cc11921acdfa038db97a0e4f | 97be3bd94b5d748516bd57497a446e4e032334f8 | TGion-learn2code/cpp-KT_lc6 | /src/input.cpp | C++ | cpp | 607 | no_license | /*
* input.cpp
*
* Created on: Aug 26, 2020
* Author: tgion
*/
#include <iostream>
#include "input.hpp"
//============================================================================
// Aufgabe 1
//============================================================================
bool readNumbers(std::vector<do... |
44102bd2b1f2bd101182c282cbdfa8d5c240cbed | 1e984c6fdeee7d7db12078067b348e8559469702 | slsamliu/GamePlay | /gameplay-tests/src/MeshBatchTest.cpp | C++ | cpp | 4,280 | permissive | #include "MeshBatchTest.h"
#include "TestsGame.h"
#if defined(ADD_TEST)
ADD_TEST("Graphics", "Mesh Batch", MeshBatchTest, 3);
#endif
static Material* createMaterial()
{
Material* material = Material::create("res/shaders/colored-unlit.vert", "res/shaders/colored-unlit.frag", "VERTEX_COLOR");
GP_A... |
420909e8242ee89b0dbedf35c77bdb60888e6a19 | 237caa387bac55e4b44d5855a659a293b279da61 | prakashgowinji/canny | /SupportFunctions.cpp | C++ | cpp | 2,051 | permissive | #include <Arduino.h>
#include "SupportFunctions.h"
// constructor
SupportFunctions::SupportFunctions()
{
}
String SupportFunctions::getValue(String data, char separator, int index) {
int found = 0;
int strIndex[] = {
0, -1 };
int maxIndex = data.length()-1;
for(int i=0; i<=maxIndex && found<=index; i++){
... |
edfb373f0cd28ee7ee626647dd09957e32f4479a | 564cacfb3c5526d1e3953fc5fea47c80942dde4b | lalalaterraria/ACM_template | /template/数据结构/线段树/SeTree3_max.cpp | C++ | cpp | 1,500 | no_license | #include<iostream>
using namespace std;
struct SeTree_max{
#define ls rt<<1
#define rs rt<<1|1
#define mid (l+r)/2
int t[1000010<<2],laz[1000010<<2];
void php(int rt){t[rt]=max(t[ls],t[rs]);}
void phd(int rt){
t[ls]+=laz[rt];laz[ls]+=laz[rt];
t[rs]+=laz[rt];laz[rs]+=laz[rt];
... |
553744ed3edf9ce93d7d7b15354fd68726f28802 | 76a9c9c8027ab7cd7733905c14ee343293566516 | Iwannnn/VS-Code-C-and-Cpp | /LeetCode-CN/100.相同的树.cpp | C++ | cpp | 757 | no_license | #include <bits/stdc++.h>
using namespace std;
/*
* @lc app=leetcode.cn id=100 lang=cpp
*
* [100] 相同的树
*/
// @lc code=start
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode()
: val(0), left(nullptr), right(nullptr) {}
TreeNode(int x)
: val(x), left(nullptr),... |
aba4609e5ff8c80a88d9e5ce5dd7ed0968c0931f | 99e8eed0e392941060c6f838bc539b31d15934d4 | maxwell13/ICSI-500-Project-5 | /project2/prototo/src/ErrorGen.cpp | C++ | cpp | 1,985 | no_license | /*
* ErrorGen.cpp
*
* Created on: Feb 24, 2021
* Author: maxwell
*/
#include "ErrorGen.h"
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <iterator>
#include <math.h>
using namespace std;
//generates n errors
ErrorGen::ErrorGen(int n)
{
cout << "Generating " << n <... |
af30ae06c762b5373da989fd2f8f224509e99337 | a1fb6d28b3758f6aec61bddc8def561d967023b9 | kwong309/depthai-core | /src/pipeline/Pipeline.cpp | C++ | cpp | 14,405 | permissive | #include "depthai/pipeline/Pipeline.hpp"
#include "depthai/device/CalibrationHandler.hpp"
#include "depthai/utility/Initialization.hpp"
// std
#include <cassert>
#include <fstream>
// libraries
#include "spdlog/fmt/fmt.h"
namespace dai {
constexpr OpenVINO::Version PipelineImpl::DEFAULT_OPENVINO_VERSION;
constexpr... |
14a31191e55f5f86e17123038bf7f65595d3a1cd | ccfbc5b7048f1620e0ea6454583a6480a5a31e51 | mikestrange/ubserver | /ubserver/BaseHandler.cpp | C++ | cpp | 1,426 | permissive | //
// BaseHandler.c
// ubserver
//
// Created by MikeRiy on 16/12/28.
// Copyright © 2016年 MikeRiy. All rights reserved.
//
#include "BaseHandler.h"
//class
BaseHandler::BaseHandler()
:m_connect(NULL)
,m_close(NULL)
,m_heartbeat(NULL)
,m_start(NULL)
,m_stop(NULL)
,m_packet(NULL)
{
}
void BaseHandler::setLoo... |
f5ed7aa627195fd2e1af0a2fd2a4cfa0e879641a | 394700bf736fa29b19cf1de4221493fd5e2f5ad9 | organicmaps/organicmaps | /track_generator/track_generator_tool.cpp | C++ | cpp | 1,631 | permissive | #include "track_generator/utils.hpp"
#include "routing/vehicle_mask.hpp"
#include "base/assert.hpp"
#include "base/logging.hpp"
#include <string>
#include <gflags/gflags.h>
DEFINE_string(inputDir, "", "Path to kmls.");
DEFINE_string(outputDir, "", "Path to converted kmls.");
DEFINE_int32(vehicleType, 0, "Numeric... |
c793745de9e61eed7efe82d5a173701639e14f39 | 9bfeaae368dfd572e81cffe8d87d0ea1d05abbb9 | Mosk33/Sensore-Polveri-Fini-Arduino | /test/RTC esempio.cpp | C++ | cpp | 2,004 | no_license | // Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include "RTClib.h"
RTC_DS1307 rtc;
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
void setup () {
while (!Serial); // for Leonardo/Micro/Zero
Serial.begin(57600);
if (! rt... |
1c02e2f9d8bb68993d6bb5f43bf421a661c61329 | bd84cc73e9a9762d1c55b0ed909826a06d61c78d | nickhans/RandomForest | /renderer.cpp | C++ | cpp | 1,451 | no_license | #include "renderer.hpp"
Renderer::Renderer() : texture() {
std::uniform_real_distribution<float> x_dist(-28.0f, 28.0f);
std::uniform_real_distribution<float> z_dist(-28.0f, 28.0f);
std::uniform_real_distribution<float> h_dist(5.0f, 8.0f);
std::uniform_real_distribution<float> w_dist(0.5f, 1.0f);
std::uniform... |
4479b1f5998014759841952765ed21df672628bc | f2891c2ec63f1dc5cfd3d89b8a6a0400a1866d14 | patrickschneider23/hhvm | /hphp/runtime/vm/member-operations.cpp | C++ | cpp | 6,554 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2015 Facebook, Inc. (http://www.facebook.com) |
+---------... |
338a89badc32dce8dc749e5275d804932fa05a5f | 2351dd6f9eb2ad34a0a28e0a779aa3c74578ecec | Couragewang/BitProject | /http/test/test.cpp | C++ | cpp | 1,462 | no_license | #include <iostream>
#include <string>
#include <unordered_map>
#include <sstream>
int main()
{
std::unordered_map<std::string, std::string> m{
{
".html","text/html"
},
{
".css", "text/css"
}
};
std::cout << m[".css"] << std::endl;
// std::string s(... |
988764cdd8332026b65da32dc191b5b044f84ab6 | 09a024547cab8e291fb7cc9d0e92af349fb951e7 | wegar-2/cpp-notes | /15_move_semantics/00_copy_constructor_and_copy_assignment_operator/Point2D.cpp | C++ | cpp | 578 | no_license | #include <iostream>
#include "Point2D.hpp"
using namespace std;
Point2D::Point2D(double val) {
cout << "Class Point2D constructor called..." << endl;
X = val;
Y = val;
}
Point2D::~Point2D() {
cout << "Class Point2D destructor called... " << endl;
}
Point2D::Point2D(const Point2D& rhs) {
cout <<... |
2ae6b7c5dcd804854b6fc765613b4d411d4a1bb3 | aa7bc042ea3f904d4b449fea1e13078e8245aa31 | assemhossam99/Problem-Solving | /Codeforces Accepted Solutions/899A- Splitting in Teams.cpp | C++ | cpp | 854 | no_license | #include <bits/stdc++.h>
#define Assem99 ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define ld long double
#define endl '\n'
#define sz(a) (int)(a).size()
#define File freopen("string.in","r",stdin); freopen("string.out","w",stdout);
int dx[] = { 0, -1, 0, 1, -1, 1, -1, 1 };
int d... |
42151b4dd10e3e81a7690be7be9d6e04f032369a | ea71cdc237c95391e2dabbf37c4e0f3a892be9fb | mercankrcby/GTU-LessonsHW | /Reversi_OperatorOverloading/revCell.cpp | C++ | cpp | 27,732 | no_license | //Name-Surname:Mercan Karacabey
//No:131044014
//////////REVERSI GAME//////////
//Aims:
//Using vectors
//Reversi Game with two dimensional vector
//Game keeps only living Cell
//Using static,const ,inline keywords
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <cs... |
45dd23b06b046dec0a30a352673b34b6e858142c | 2b517d7e2d3f7a84eefd509d6d4086aa78892bf9 | fractal13/dsu-cs-3005-examples-2020-40 | /code/y20m10d07p02-heap-example/main.cpp | C++ | cpp | 534 | no_license | #include <iostream>
int *allocate_space(int count) {
int *p = 0;
p = new int[count];
return p;
}
void deallocate_space(int *p) {
delete [] p;
}
void assign_cubes(int *p, int count) {
int i;
for(i = 0; i < count; i++) {
p[i] = i*i*i;
}
}
void show_cubes(int *p, int count) {
int i;
for(i = 0; i ... |
19902c31b405829bd100d4e97322aab7a883cb64 | 5d9d26e143aac52c5b670f1646ee16c13aafaf8e | kei10in/w32 | /src/w32/wic/wic_fwd.hpp | C++ | hpp | 5,705 | permissive | #pragma once
#include "../com.hpp"
#include "wic_def.hpp"
#include "wic_guids.hpp"
namespace w32::wic {
namespace internal {
template <class T>
class palette_t;
template <class T>
class bitmap_source_t;
template <class T>
class format_converter_t;
template <class T>
class planar_format_converter_t;
template <cl... |
51ca18cb9994af41228b9baaf1990c1063d38247 | 4f688d32e7fc864fec7ced952b12c38a4340f317 | meetryy/vacuum-control | /debug.cpp | C++ | cpp | 291 | permissive | #include "debug.h"
#include "arduino.h"
Debug_class Debug;
void Debug_class::Init(void){
Serial.begin(9600);
Serial.println("start");
};
void Debug_class::Print(char* in){
Serial.print(in);
}
void Debug_class::Println(char* in){
Serial.print("\r\n");
Serial.print(in);
}
|
1874c2ef781c274b2f1bc393e8d89a7eec2f302a | 400c9d813a438d4eec7a13f2cc2068f9e5edcb3e | hasboeuf/hb | /network/lib/com/HbSocketHandler.cpp | C++ | cpp | 6,923 | permissive | // Qt
#include <QtCore/QMutexLocker>
#include <QtCore/QTimer>
#include <QtNetwork/QTcpSocket>
// Hb
#include <HbGlobal.h>
#include <HbLogService.h>
// Local
#include <com/HbAbstractServer.h>
#include <com/HbAbstractSocket.h>
#include <com/HbSocketHandler.h>
#include <config/com/HbNetworkConfig.h>
#include <contract/HbN... |
7fcf804e669f3650bfa18bd39eacd4c705bc0077 | 982c7c1200f348692be561aed329934b009ba697 | vaporyorg/miplib | /miplib/expr.cpp | C++ | cpp | 14,502 | permissive |
#include "expr.hpp"
#include "solver.hpp"
#include <fmt/ostream.h>
namespace miplib {
namespace detail {
VarPair ordered(VarPair const& vp)
{
VarPair r(vp);
if (!vp.first.is_lex_less(vp.second))
{
Var t = r.first;
r.first = r.second;
r.second = t;
}
return r;
}
VarPair ordered_by_name(VarPair... |
17e896bfd4b88426dcdd43be6c3f09e2afa9dfd0 | 56f0a1ab67cfff7540973a7e50aab3a4c61e36da | muyl1/acer_cloud_wifi_copy | /sw_x/gvm_core/vplex/platform_winRT/include/vplex__http2.hpp | C++ | hpp | 8,035 | no_license | #ifndef __VPLEX__HTTP2_HPP__
#define __VPLEX__HTTP2_HPP__
#include <vplu_types.h>
#include <vpl_time.h>
#include "vplex_http2_cb.hpp"
#include "vplex_file.h"
#include "vplex_util.hpp"
#include "vplu_mutex_autolock.hpp"
#include <string>
#include <ppltasks.h>
#include <wrl.h>
#include <wrl\client.h>
#include <wrl\im... |
287c6fb9c81f6a4a2f914abbb9324eaff78979a2 | 9f69d9e5bc628734d8c5f68972b35acd74cfc476 | DieuAnh/Codeforces | /A/520APangram.cpp | C++ | cpp | 598 | no_license | #include <iostream>
using namespace std;
int main(){
string alphabet = "azertyuiopqsdfghjklmwxcvbn";
int n, exit = 0;
string s;
std::cin >> n >> s;
for (int i = 0; i < alphabet.size(); i++){
int c = 0;
for (int j = 0; j < n; j++){
if (s[j] != alphabet[i] && s[j] != char... |
7768e1d945c7296957dc56d3488c5e28e4d920ba | 8d1c4cbf01f228250e12449b462daae7842bc955 | BackupTheBerlios/codelite-svn | /trunk/CodeLite/language.cpp | C++ | cpp | 17,493 | no_license | #include "precompiled_header.h"
#include "language.h"
#include "variable.h"
#include "function.h"
#include "ctags_manager.h"
#include "y.tab.h"
#include <wx/stopwatch.h>
#include <wx/ffile.h>
#ifdef __VISUALC__
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#endif
//=====================================... |
ca741d3c27501c1c44105c65a8cff2b8a1576f20 | f92e294b71a8c53d13e8c979836832f4fe857063 | animalmatsuzawa/leveldb | /db/c.cc | C++ | cc | 18,125 | permissive | // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "leveldb/c.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include "leveldb/c... |
903f7c2f31ddc15166d8366e27f25d728074a2ba | c571531eb9009c137b0d1dc64a032a4fb6af369f | ProjectStortSpel/MasterServer | /Source/Network/ServerNetwork.cpp | C++ | cpp | 20,201 | no_license | #include "ServerNetwork.h"
#include <sstream>
#include <algorithm>
#include "NetTypeMessageID.h"
#ifdef WIN32
#else
#include <sys/socket.h>
#endif
using namespace Network;
ServerNetwork::ServerNetwork()
: BaseNetwork()
{
m_running = new bool(false);
m_maxConnections = new unsigned int(64);
m_listenSocket = 0;
... |
d5305ac43b3740134ace41b6d76f8e171daef5a2 | 9888bf5239b05a214ef3577cd2103a601b7f2504 | alexandraback/datacollection | /solutions_5670465267826688_0/C++/juanplopes2/C.cpp | C++ | cpp | 2,108 | no_license | #include <iostream>
#include <string>
#include <cmath>
#include <sstream>
#define I 2
#define J 3
#define K 4
using namespace std;
int op(int v, char c) {
int sign = v>=0?1:-1;
v = abs(v);
if (v==1) return sign*(
c=='i'? I:
c=='j'? J:
c=='k'? K:((cerr << "ERROR" << endl), 0));
... |
aeb25cbe8d52d90ad20846f4d18b5dbf687ceb2a | ededb20ca8df669488f95c0f0825f93463890ad6 | SunYufei/C | /C语言课件/单链表/通用数据结构链表实现/链表_通用数据结构_带头结点_整形/linklist.cpp | C++ | cpp | 1,540 | no_license | #include<stdio.h>
#include<stdlib.h>
#include"linklist.h"
void init_list(plinklist pl)
{
pl->head=(pnode)malloc(sizeof(node));//这个地方有差距
if(!pl->head){
printf("cannot allocate such memory!");
exit(EXIT_FAILURE);
}
pl->head->next=NULL;
}
void insert_list_head(plinklist pl,nodeitem *pn)
{
pnode p=create_node(pn);
... |
85141cb3b72a65779f45e45c5034de9f6941b4c0 | fcf7ef16f4c95917ae3a5efcc1f624703667312d | Harrm/kagome | /core/runtime/wasm_provider.hpp | C++ | hpp | 660 | permissive | /**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef KAGOME_CORE_RUNTIME_WASM_PROVIDER_HPP
#define KAGOME_CORE_RUNTIME_WASM_PROVIDER_HPP
#include "common/buffer.hpp"
#include "primitives/block_id.hpp"
#include "storage/trie/types.hpp"
namespace kagome::runtime ... |
4eebcebee5c9aace36d5d30f7937be6c96788cc2 | 7b95fb2a99d0406e14d67a75397d6e1fab0c6749 | kpu/moses-interp | /contrib/other-builds/cmake/boost.example/main.cpp | C++ | cpp | 394 | no_license |
#include <iostream>
#include <boost/locale.hpp>
#include <ctime>
using namespace std;
int main(int argc, char* argv[])
{
using namespace boost::locale;
using namespace std;
generator gen;
locale loc=gen("");
cout.imbue(loc);
cout << "Hello, World" << endl;
cout << "This is how we show curr... |
00cb099700a91e4a53d24194b40765b4f8656a5a | ac05e59bbf81ceb9eab2db3d6eb8f272adef880c | BensonQiu/ParaCuckooHash | /code/cuckoo_hash_map.cpp | C++ | cpp | 3,491 | no_license | #include <iostream>
#include <string>
#include <stdlib.h>
#include "common/hash.h"
#include "common/errors.h"
template <typename T>
CuckooHashMap<T>::CuckooHashMap(int num_buckets) {
m_table = new HashEntry*[num_buckets * SLOTS_PER_BUCKET]();
m_num_buckets = num_buckets;
};
template <typename T>
CuckooHashM... |
3d51190a090f944fd094646a6625f4405fdfcf32 | 7ea67a9ef85c619aac6217b6d2cb5d91b9c4772c | chunchou/ACM | /动态规划/单调队列、斜率DP/BZOJ 1911 [Apio2010]特别行动队.cpp | C++ | cpp | 2,226 | no_license | /*
題目:
維護DP
sum[i]表示sigma(a[j]),0<j<=i
dp[i] = max{ dp[j]+a*(sum[i]-sum[j])^2 + b*(sum[i]-sum[j]) + c }
分析:
單調隊列優化DP
我們可以假設有兩個決策點k>j,並且k比j更優
有
dp[k]+a*(sum[i]-sum[k])^2 + b*(sum[i]-sum[k]) + c >
dp[j]+a*(sum[i]-sum[j])^2 + b*(sum[i]-sum[j]) + c
可以化簡為
dp[k]+a*sum[k]*sum[k]-b*sum... |
0ce926646f8099c3c7350473c8c83f56acc5e692 | 034c7b68bfe76f1720b21c963c901bc54c98503e | c-ber/cber | /vscode/wg/sdk/UEnvQueryDebugHelpers.hpp | C++ | hpp | 807 | no_license | #pragma once
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
namespace PUBGSDK {
struct alignas(1) UEnvQueryDebugHelpers // Size: 0x30
: public UObject // Size: 0x30
{
private:
typedef UEnvQueryDebugHelpers t_struct;
typedef ExternalPtr<t_struct> t_structHelper;
public:
static ExternalPtr<struct U... |
b3f8e6c31359c966b635da67ea0a40546473df2e | 12ea3f653e6db5b7c8ef4fd1f5885dda1503eaef | litao1009/SimpleRoom | /externals/OCCTLib/inc/Graphic3d_Structure.hxx | C++ | hxx | 27,513 | no_license | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _Graphic3d_Structure_HeaderFile
#define _Gr... |
94c86f0ea241b4d7c02b04ff3b3eb5f352808f76 | 261c8330a7f505c9e4d7324a74b2d813a718b8ef | massbrowser/android | /cc/test/layer_tree_pixel_resource_test.cc | C++ | cc | 7,474 | 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 "cc/test/layer_tree_pixel_resource_test.h"
#include "base/memory/ptr_util.h"
#include "cc/layers/layer.h"
#include "cc/output/compositor_frame_s... |
2fbebfd8e23a112b70f0e284769f6eb4596f16de | ef2284149448ad0bb810fee5df228ae0db28aaa2 | aleakos/ENSF614_lab5 | /part_b_c/rectangle.cpp | C++ | cpp | 619 | no_license | #include <iostream>
#include <iomanip>
#include "rectangle.h"
void Rectangle::display()
{
std::cout << std::fixed;
std::cout << std::setprecision(2);
std::cout << "Rectangle Name: " << getName() << std::endl;
std::cout << "X-coordinate: " << getOrigin().getXCoord() << std::endl;
std::cout << "Y-co... |
97d033fb3be33ea2b4690fe9574649e2689d20b2 | 5edfcaa5d273b630980842f8af3b4af8aa1a828d | EECSProject3/project3 | /caesar.cpp | C++ | cpp | 1,099 | no_license | /**
* caesar.cpp
* Project UID e98fd45ccce9d7195e89e6171a5451f2
*
* <#Names#>
* <#Uniqnames#>
*
* EECS 183: Project 3
* Winter 2020
*
* <#description#>
*/
#include "caesar.h"
#include <iostream>
char shiftAlphaCharacter(char c, int n) {
if (n >= 0) {
if (c >= 'a' && c <= 'z') {
c = (c + n -... |
8a632a90e8b50331a3592282212db24f39f147b0 | 6a2e060fdb6b03aef05ed59820bf16d30e2fe9de | fangliang11/dice | /src/opencv/DICe_Feature.cpp | C++ | cpp | 7,235 | permissive | // @HEADER
// ************************************************************************
//
// Digital Image Correlation Engine (DICe)
// Copyright 2015 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. ... |
18d2f0e8e866e8b01dbd830e36af6cc6d9e78f3e | 6c4691ec5d606bf9459922072716ac87615495dd | SakarGG/Jacobs-University-Workspace | /Programming in C & C++/Assignment 11/a11_p4/Creature.cpp | C++ | cpp | 1,694 | no_license | /*
CH-230-A
a11 p11.4[cpp]
Sakar Gopal Gurubacharya
s.gurubacharya@jacobs-university.de
*/
#include "Creature.h"
#include <iostream>
#include <cmath>
using namespace std;
//Setting distance to 10.
Creature::Creature(): distance(10){
cout << "Constructor for Creature" << endl;
}
//Printing the running meters.
... |
49f999d589bc7f512cdc8eafab3bdb1356323890 | cb2dc39964b8ba14561c5033d4024ea473687dad | KuangyiZhu/vespa | /searchlib/src/vespa/searchlib/util/dirtraverse.cpp | C++ | cpp | 6,840 | permissive | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Copyright (C) 2002-2003 Fast Search & Transfer ASA
// Copyright (C) 2003 Overture Services Norway AS
#include "dirtraverse.h"
#include <vespa/fastos/file.h>
#include <cassert>
namespace search {
... |
0308194873f33c42787c10d04865c642a8ee7add | aa7870584fae9250e85775432820620d198223c2 | mlpack/mlpack | /src/mlpack/methods/ann/layer/linear_no_bias_impl.hpp | C++ | hpp | 4,300 | permissive | /**
* @file methods/ann/layer/linear_no_bias_impl.hpp
* @author Marcus Edel
*
* Implementation of the LinearNoBias class also known as fully-connected layer
* or affine transformation without the bias term.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause B... |
176725fc3c3f89f3cef148f11e4a1b2d7657e0c7 | 52b0b91d2f7efcc302c84aac5c46e8824f9f323c | kaifabian/mlc | /src/LatencyTestMemoryLayouters/Strided.hxx | C++ | hxx | 458 | no_license | #pragma once
#include "../LatencyTestMemoryLayouter.hxx"
class LatencyTestStridedMemoryLayouter : public LatencyTestMemoryLayouter {
public:
static LatencyTestMemoryLayouter *create() { new LatencyTestStridedMemoryLayouter(); };
static LatencyTestMemoryLayouter::Registrar<LatencyTestStridedMemoryLayouter> registrar... |
1ac3e519ab3689f8621badb2c475e57cce2169c3 | 3cc5fa718deb6e0ac504fef9db4b196dbe60cf70 | olekszubert/hazel-series | /Hazel/src/Hazel/ImGui/ImGuiLayer.cpp | C++ | cpp | 2,151 | permissive | #include "hzpch.h"
#include "ImGuiLayer.h"
#include "imgui.h"
#include "Platform/OpenGL/ImGuiOpenGLRenderer.h"
#include "Hazel/Application.h"
#include "GLFW/glfw3.h" //temporary
namespace Hazel {
ImGuiLayer::ImGuiLayer()
: Layer("ImGuiLayer")
{
}
ImGuiLayer::~ImGuiLayer()
{
}
void ImGuiLayer::OnAttach()
{... |
4d01b73bd77eff92399f4b7438ca9be49409d801 | 34582f18898859fc1243428c975f3fe3e70d6342 | neivv/teippi | /src/warn.cpp | C++ | cpp | 757 | permissive | #include "warn.h"
#include "offsets.h"
#include "log.h"
#include "text.h"
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
void Warning(const char *format, ...)
{
char buf[512];
va_list varg;
va_start(varg, format);
vsnprintf(buf, sizeof buf, format, varg);
va_end(varg);
debug_log-... |
c6c6ee07c0c205eb80628cbbd8745a7a0d3766b0 | 6107c57f98b75a284d5f8f1172af90313c11606f | jayden11/BMLL | /ML/NaiveBayes.cpp | C++ | cpp | 1,557 | no_license | #include "NaiveBayes.h"
NaiveBayes::NaiveBayes()
{
}
NaiveBayes::~NaiveBayes()
{
}
int NaiveBayes::predict(vector<int>& x)
{
vector<double> P_label(label_num, lamuda);
vector<double> cnt_label(label_num, 0.0);
for (int i = 0; i < sample_num; ++i) {
P_label[label[i]]++;
cnt_label[label[... |
7f3552d0a968b8e71222f0bd10df14c6c49ccf6c | f751fcfed8476b3a69821e8283b31099101695a2 | isabella232/vogl | /src/OGLSamples_GTruc/samples/gl-430-image-store.cpp | C++ | cpp | 6,189 | permissive | //**********************************
// OpenGL Samples Pack
// ogl-samples.g-truc.net
//**********************************
// OpenGL Image Store
// 21/11/2011 - 21/11/2011
//**********************************
// Christophe Riccio
// ogl-samples@g-truc.net
//**********************************
// G-Truc Creation
// www.... |
9fe3b7133348b5ca571010c9050b829956f314f5 | d784b2b1a668d76fa384635050fc836f6c924cbd | herohunfer/HyperDex | /datatypes/string.cc | C++ | cc | 3,685 | permissive | // Copyright (c) 2012, Cornell University
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list ... |
9757d86224038605d443f28cf66074902e9ee252 | 79897a5bc52b7d29cac743bd36059b324972b681 | FranciscoThiesen/OldProblems | /Codeforces/summerSchool/test.cpp | C++ | cpp | 453 | no_license | #include <vector>
#include <algorithm>
#include <cstdio>
#include <utility>
#include <numeric>
#include <iostream>
#include <iterator>
#include <map>
using namespace std;
#define pb push_back
int main()
{
map<int, vector<pair<int, int> > > n;
for(int i = 0; i < 10; ++i)
{
for(int j = 0; j < 10; ++j)
n[i].pb(ma... |
54ba2d6fe2485ccfd9017dbf928d4879ef25d555 | 007fdbbe7488d2de5cc1b1d3510856f7adcd9d4a | vectorstorm/vectorstorm-testbeds | /Games/VectorPhysics/VP_Game.cpp | C++ | cpp | 4,173 | no_license | /*
* VP_Game.cpp
* VectorStorm
*
* Created by Trevor Powell on 17/02/08.
* Copyright 2008 Trevor Powell. All rights reserved.
*
*/
#include "VP_Game.h"
#include "VP_Drawable.h"
#include <VS_VectorStorm.h>
REGISTER_GAME("VectorPhysics", vpGame);
vpGame::vpGame()
{
}
vpGame::~vpGame()
{
}
void
vpGame::I... |
03c260998a1a4d1fd324084fb4f87a47b7221566 | d1a7b0b2d0d9299fdd91f24c4def66af7a4acce5 | dnkai/kiiik | /prj/WrUiClient/GeneratedFiles/Debug/moc_WrUiClient.cpp | C++ | cpp | 13,397 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'WrUiClient.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1)
**
** WARNING! All changes made in this file will be lost!
**********************************************************... |
782b78bb5b592699c7a4b91926d9c61afc4f6f65 | 9dfaa55b01be10e0f7e0f1278835d0388eff9d27 | blueyeq/codeforces | /round#134div2/D.cpp | C++ | cpp | 1,691 | no_license | #include <stdio.h>
#include <cstring>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
using namespace std;
typedef long long LL;
const int MAXN = 5000000;
int n;
int op[MAXN];
bool dfs(int k, int a, int b){
if(k == 1){
return a == 1 && b == 1;
}
if(k <= 0... |
7d584278cf60ec5588a41ae7acf9a097e2eac9be | 6cb4f897732f448cce388fc6c8fba2efcfbc8cd0 | mansoorcheema/bark | /bark/commons/tests/distribution_tests.cc | C++ | cc | 4,737 | permissive | // Copyright (c) 2019 fortiss GmbH, Julian Bernhard, Klemens Esterle, Patrick
// Hart, Tobias Kessler
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include <fstream>
#include <iostream>
#include <boost/make_shared.hpp>
#include <boost/shared... |
84b384eae80621050239c1a1d9b8d81ce7fbd7e3 | a44a086aa792daf97c78edb2b85fe9f0dc9c9c31 | babysmash/confuse_test_my | /confuse_test/cpp/template/CppTemplate.cpp | C++ | cpp | 793 | no_license | //
// CppTemplate.cpp
// confuse_test
//
// Created by yjs on 2020/12/21.
// Copyright © 2020 coding520. All rights reserved.
//
// __SAVE__、__M_A_C_R_O__
#import "CppTemplate.hpp"
template <class T1, class T2> void CFPoint<T1, T2>::display() const {
cout << "x=" << m_x << ", y=" << m_y << endl;
}
template <... |
9ee5edf633d5034a455752aeb77cf8c1d53a1bb7 | 8918770e6d4d2d66b94a617c5289af1cd1974aaf | HieronyM/Competitive-Programming-Code | /UVa OJ/2. Data Structures and Libraries/FerryLoadingIII_Rev.cpp | C++ | cpp | 1,569 | no_license | #include <cstdio>
#include <cstdlib>
#include <vector>
#include <string>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
using namespace std;
#define REP(a,n) for((a) = 0; (a) < n; a++)
#define pb push_back
#define vi vector <int>
inline string GetString(void){
char x[1000005];
scanf("%s",x); ... |
659a82f7a80abd255cbbb9dcd3f0a44a8425b891 | de2d9c57d31ccee03ad9881bf717eaa0acc93aaa | Kelan0/SVOEngine | /src/core/scene/Scene.cpp | C++ | cpp | 19,837 | permissive | #include "Scene.h"
#include "core/renderer/ScreenRenderer.h"
#include "core/renderer/ShaderProgram.h"
#include "core/renderer/LayeredDepthBuffer.h"
#include "core/renderer/Lights.h"
#include "core/renderer/VoxelGenerator.h"
#include "core/renderer/MaterialManager.h"
#include "core/renderer/ShadowMapRenderer.h"
... |
1a632832d6acab2b287fbcbea032f219b17b0238 | ab654b3f9b0f6032f26bf87338a90320b929fe88 | turenar/bdm | /src/bdm/device/mcp3004.cxx | C++ | cxx | 723 | permissive | #include "bdm/device/mcp3004.hxx"
#include <cassert>
#include "bdm/device/spi/spidev.hxx"
namespace bdm::device {
mcp3004::mcp3004(bdm::device::spi::spidev& dev) : _dev(dev) {
}
std::uint16_t mcp3004::read(std::uint8_t channel) {
assert(channel < 4);
const std::uint8_t tx[/*packet_size*/] = {0x01, compose_chan... |
abfcc69cf81b1397058064ae84481860072ab3bf | 50460a8f895d5996a5c2ab201979d17ee17d21eb | TheXPerienceProject/android_external_skia | /gm/composecolorfilter.cpp | C++ | cpp | 3,656 | permissive | /*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorFilter.h"
#include "include/core/SkImage.h"
#include "incl... |
8f5485844269899686272144953f2a152162e551 | 34b1203b3bea767a41700a3d8917aff84aa6c45d | zaliu/hipBLAS | /clients/gtest/syrk_gtest.cpp | C++ | cpp | 11,165 | permissive | /* ************************************************************************
* Copyright 2016-2020 Advanced Micro Devices, Inc.
*
* ************************************************************************ */
#include "testing_syrk.hpp"
#include "testing_syrk_batched.hpp"
#include "testing_syrk_strided_batched.hpp"
#... |
a330fea47586a46e25740b989cce323211e403a5 | e062e69e548bbfa4a25023e9c16f8bc863becc79 | ipa320/ipa_coverage_planning | /ipa_building_navigation/ros/src/room_sequence_planning_action_client.cpp | C++ | cpp | 5,708 | permissive | #include <ros/ros.h>
#include <ros/package.h>
#include <string>
#include <vector>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <cv_bridge/cv_bridge.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <ipa_building_msgs/MapSegme... |
263baa053cee88f6c2c49ee856bc93802179943a | 40df72b4f3c0dd314144bf2a45cee86f9a032b2e | dorisli2017/CG | /CG3/cg_exercise_03/cglib/lib/glm/glm/gtx/extended_min_max.hpp | C++ | hpp | 3,631 | permissive | /// @ref gtx_extended_min_max
/// @file glm/gtx/extended_min_max.hpp
///
/// @see core (dependence)
/// @see gtx_half_float (dependence)
///
/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max
/// @ingroup gtx
///
/// Min and max functions for 3 to 4 parameters.
///
/// <glm/gtx/extented_min_max.hpp>... |
390ace94b45f9f2741d9d48cca62fcd6c154f2c3 | cf08e470dafd2ecf16903f935e9ec7c6bc510b88 | OlehNovosad/tic-tac-toe | /default.cpp | C++ | cpp | 1,274 | no_license | //
// Created by olehn on 09.09.20.
//
#include "default.h"
#include "iostream"
using std::cin;
int game_mode()
{
int choice;
printf("Select game mode\n");
printf("1. Human vs Human\n");
printf("2. Human vs AI #1\n");
printf("3. Human vs AI #2\n");
printf("0. Exit\n");
printf("Select: ");... |
365a6c3d34b64448a1daf28f22e48db8ca33a5df | 07f7396fc8c330076742b952929b3bc1587b3fd7 | sidewinder040/ToDo | /TodoVector.cpp | C++ | cpp | 311 | no_license | #include "TodoVector.h"
vector<ToDo> TodoVector::Tasks;
TodoVector::TodoVector() {}
TodoVector::~TodoVector() {}
void TodoVector::AddItem(ToDo item) {
TodoVector::Tasks.push_back(item);
}
void TodoVector::ListItems() {
for ( ToDo x : TodoVector::Tasks ) {
x.DisplayTodo();
}
}
|
8bab6e8f5a825124430fa111b4892fde3e66c292 | 7e56c555bb88013ffca7260661a2690a9058ced5 | asad-shuvo/ACM | /Online Judge/codforces/Educational Codeforces Round 61 (Rated for Div. 2)/B. Discounts.cpp | C++ | cpp | 2,773 | no_license | #include <bits/stdc++.h>
using namespace std;
int fx4[] = {1 , -1 , 0 , 0};
int fy4[] = {0 , 0 , 1 , -1};
int Kfx[]= {-2,-2,2,2,1,1,-1,-1}; ///knight move x - exis
int Kfy[]= {1,-1,1,-1,2,-2,2,-2}; ///knight move y- exis
int fx8[]= {1,1,1,0,0,-1,-1,-1};
int fy8[]= {0,1,-1,1,-1,0,1,-1};
#define ll long long int
#define ... |
794d4d8c49bc313ef3e63822a747e18d2b5bb2a5 | f605c73facd484fe67e0939136e055955677d44e | blockspacer/doremi | /Doremi/Core/Include/Network/NetMessages.hpp | C++ | hpp | 6,303 | permissive | #pragma once
#include <cstdint>
#include <Windows.h>
namespace Doremi
{
namespace Core
{
/**
MessageID used for identifying type of message from Client
*/
enum class SendMessageIDToServerFromClient : uint8_t
{
// Connecting
CONNECTION_REQUEST,... |
5543b6ea884c3633a962ebbfaf9f6d37b04a8796 | 1e523b1df2ac428e2a60f988ced2cf74254352f5 | Farious/ags | /Engine/ac/dialog.cpp | C++ | cpp | 43,217 | permissive | //=============================================================================
//
// Adventure Game Studio (AGS)
//
// Copyright (C) 1999-2011 Chris Jones and 2011-20xx others
// The full list of copyright holders can be found in the Copyright.txt
// file, which is part of this source code distribution.
//
// ... |
a8f5d24cdae3626851a6acee5431c89b1d2eed6e | f23a242c4bedc5db7cd12fa721554279fdaccf08 | smeenai/llvm-project | /clang/test/CodeGenCXX/dllimport-rtti.cpp | C++ | cpp | 1,269 | permissive | // RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=MSVC
// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU
struct __declspec(... |
eb055950dde6f9fe335eaae1d6de9c37d5ae41f6 | a1e59a753edd12c44c6b76a3831458956e1f084e | altusnets/fboss | /fboss/agent/hw/sai/fake/FakeSaiRoute.cpp | C++ | cpp | 3,237 | permissive | /*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... |
0112262511bc88d1d0e790ea5b76b6bee7b306ea | 9e48796b8698d7a5a61badaaba4faef3145ddde0 | shuchongqj/ABx | /abdata/abdata/DBItemList.cpp | C++ | cpp | 1,839 | permissive | /**
* Copyright 2017-2020 Stefan Ascher
*
* 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, merge, pub... |
df3cd96ef9af9b681515c4ea13aa6bde2edb8d28 | 3859febf18aecf0ac214956b0c8676a7a02f29e0 | fireyyouth/C-minus-compiler | /test_tokenize.cc | C++ | cc | 1,214 | no_license | #include "tokenize.h"
#include <map>
#include <cassert>
#include <vector>
using namespace std;
int main() {
map<string, vector<node_t>> testCase = {
{
"def x; x=3+2;",
{DEF, ID, SEMICOLON, ID, EQUAL, NUM, ADD_OP, NUM, SEMICOLON},
},
{
"1+2==a1",
... |
05bfabdaf11b223f5c373dcfd131177fe0b82f92 | 5b53a62180d11fd2d871e33efa75519fa2d6aa5e | CU-0xff/juliet-cpp | /000/109/520/CWE617_Reachable_Assertion__fgets_81a.cpp | C++ | cpp | 2,552 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE617_Reachable_Assertion__fgets_81a.cpp
Label Definition File: CWE617_Reachable_Assertion.label.xml
Template File: sources-sink-81a.tmpl.cpp
*/
/*
* @description
* CWE: 617 Reachable Assertion
* BadSource: fgets Read data from the console using fgets()
* GoodSource: N... |
e6c4dba963860e21ba571b3e2583835cc37a7ba4 | 38aa332f9acebf620d0d38eae03f9b91a397df74 | shahrozimtiaz/shahrozimtiaz.github.io | /lab03/ListItr.cpp | C++ | cpp | 1,056 | no_license | //Name:Shahroz Imtiaz
//Email ID:si6rf
//File Name:ListItr.cpp
//Date:9/9/2018
#include "ListItr.h"
ListItr::ListItr(){ //Constructor
this->current = NULL;
}
ListItr::ListItr(ListNode* theNode){ // One parameter constructor
this->current = theNode;
}
bool ListItr::isPastEnd() const{ //Returns true if past end p... |
8f51e7cd491792132d54b065cb2a18cb4d98708c | 27803726c24abdd3eb596ad14289c3858bbae700 | hosson/Phys3D | /Phys3D/hoLib/Debug.cpp | C++ | cpp | 7,353 | no_license | #include "Debug.h"
#include <conio.h>
#include <tchar.h>
#include "Common.h"
#include "hoLib.h"
#include <stdlib.h>
#include "CGI_Upload.h"
#include "../Version.h"
#include <shlwapi.h>
#pragma comment(lib, "shlwapi.lib")
#include "..\App.h"
#include "../Config.h"
namespace ho {
Debug *Debug::pObj;
//コンストラクタ
Debug:... |
f28328ddba39dbd3bd6a74f90177ecfad00eba90 | 78e89e2b5e439bafbaf8cd10ac1fe524260dd53f | SangaviPandian/vowel1 | /numiseven.cpp | C++ | cpp | 240 | no_license | #include <iostream>
using namespace std;
int main()
{
int n,m,pro;
cout<<"enter the number1:";
cin>>n;
cout<<"\nenter the number2:";
cin>>m;
pro=n*m;
if(pro%2==0)
{
cout<<"\n even";
}
else
{
cout<<"\n odd";
}
return 0;
}
|
a9df02a1266bb3af5770e6326902d1c1183b0864 | 672ae17d48928f395d170b1933dad04c2a7cb4cf | evelio521/Books | /cplusplus/More Exceptional C++/ITEM34.cpp | C++ | cpp | 2,956 | no_license | ITEM34:预处理宏
//我们使用宏的理由
//1.守护头文件
//为了防止头文件多次包含,这是一种技巧
#ifndef MYPROG_X_H
#define MYPROG_X_H
// ... the rest of the header file x.h goes here...
#endif
//2.使用预处理特性
//在诊断代码中,插入行号或编译时间这类信息通常很有用。要做到这一点,
//一个简单的方法是使用预定义标准宏,如__FILE__, __LINE__, __DATE__, 和__TIME__.
//基于相同原因,以及其他原因,使用stringi... |
9a3aa04ab25b3dd732086f337c24eb113203c19e | 90cb236f88d1dac7601a89e63e076559a6c247cf | okoreniak/Polygon_QT_MVC | /src/polygoncontroller.cpp | C++ | cpp | 2,845 | permissive | #include "polygoncontroller.h"
#include "polygonmodel.h"
#include "polygonview.h"
//--------------------------------------------
//
//--------------------------------------------
PolygonController::PolygonController(PolygonModel* model):
_model(model)
{
Q_CHECK_PTR(model);
}
//---------------------------------... |
170d0aec4f94f9ac7191d9eca4d5c123f6cc8baa | a613661fc5d569c0d350a59d630287c3c5bcd63d | plasorak/larsim | /larsim/LArG4/NeutronHPphysics.cc | C++ | cc | 4,353 | no_license | //////////////////////////////////////////////////////////////////////////////
/// \file NeutronHPphysics.cc
/// \brief High precision neutron physics constructor for Geant4
/// \details Adapted from the Geant4 example Hadr04
//////////////////////////////////////////////////////////////////////////////
#include "Neut... |
4292cb43db1ed5df2065b54604e223e07245b348 | e1feeac209fc1851dc2f4e440efa33e0e81667ed | TrellixVulnTeam/Chromium_7C66 | /content/browser/renderer_host/render_widget_host_view_android.cc | C++ | cc | 71,460 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/render_widget_host_view_android.h"
#include <android/bitmap.h>
#include <utility>
#include "base/... |
58341aaa9927ebaad30451210f13aae781aa4efe | 0a45974c6ed4fd67f0caee7338ce1f99b8159349 | ninoles/snake-3d | /Codes/Base/SceneObjects.cpp | C++ | cpp | 1,409 | no_license | /*
* SceneObjects.cpp
*
* Created on: 10/12/2009
* Author: Henrique Jonas
*/
#include "../../Headers/Base/SceneObjects.h"
base::SceneObjects::SceneObjects(irr::scene::ISceneManager *__sceneManager, NewtonWorld *_nWorld,
void *__sceneObject, int __id) : BasicObject(__sceneObject, __id){
_sceneManager = ... |
ef5b879a74b1e3078595e40a8e88d57555dd6bfc | 3019ff87109f2bf947da34a90951d1dccca01f96 | zhangpengyf/leetcode | /11.cc | C++ | cc | 679 | no_license | #include <map>
#include <unordered_map>
#include <vector>
#include <list>
#include <stack>
#include <iostream>
using namespace std;
class Solution {
public:
int maxArea(vector<int>& height) {
int max = 0;
int len = height.size();
if (len <= 1) return 0;
int i = 0;
int j = l... |
836b071afeffe759df0aa71fba8df99fd8b04433 | ddff6cd311ddca9a72c5a41e513116347e24d313 | lbguilherme/duvidovc-app | /java/include/android.net.UrlQuerySanitizer.hpp | C++ | hpp | 3,680 | no_license | #pragma once
#include "../src/java-core.hpp"
#include <jni.h>
#include <cstdint>
#include <memory>
#include <vector>
#include "java.lang.Object.hpp"
namespace android { namespace net { class UrlQuerySanitizer_ValueSanitizer; } }
namespace java { namespace lang { class String; } }
namespace java { namespace util { cl... |
b96679543c14aba4dd6dcf1ea697d6c902ec11ed | 9ef19bb7921a1959648f7ceaf6444af33391e235 | DavieV/judge | /kattis/kattis_course/union_find.cpp | C++ | cpp | 1,367 | no_license | #include <iostream>
#include <vector>
struct union_find {
std::vector<int> parent;
union_find(int n) : parent(n) {
for (int i = 0; i < n; ++i)
parent[i] = -1;
}
// Takes in the index of an item, and returns the root index of the
// set that that item belongs to
int find(in... |
2f6ddead25808b03963bf03d1e848f1971aa0739 | 051dffa7ebb3f5cb4de1de4068ed3e42071d22d7 | Tushaar28/CodeForces | /408A.cpp | C++ | cpp | 376 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, ans = INT_MAX;
cin >> n;
int arr[n] = {0};
for(int i = 0;i < n;i++)
cin >> arr[i];
for(auto i : arr){
int time = i * 15;
while(i--){
int x;
cin >> x;
time += x * 5;
}... |
1df8eecc53536c562b989d1c3f44f7aa37cd3d71 | 2218677dfcf3ba87190b9b29b2c9043a919cd5e5 | chen0040/cpp-steering-behaviors | /EventHandler/EventHandler_DemoSeek.cpp | C++ | cpp | 531 | permissive | #include "EventHandler_DemoSeek.h"
#include "../GameWorld/GameWorld.h"
#include "../GLStates/GLState_Seek.h"
EventHandler_DemoSeek::EventHandler_DemoSeek(GLUIObj* pSubject)
: GLActionListener(pSubject)
, m_pWorld(NULL)
{
}
EventHandler_DemoSeek::~EventHandler_DemoSeek()
{
}
void EventHandler_DemoSeek::SetWorld(Gam... |
c25d857b03f7905eccb766b6de53948ba2c7f0e7 | 834c3c7a9bf8ce2b194cf8cb4693bc91ee4b717d | dmitrylavrikov/dava.framework | /Tools/ResourceEditor/Classes/Commands2/LandscapeSetTexturesCommands.cpp | C++ | cpp | 2,784 | no_license | /*==================================================================================
Copyright (c) 2008, binaryzebra
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... |
3223188ab494bf327edc3a4816660da57d22c8a7 | 3e21938622e15a21a9e39b60922e7ae1c8538cdf | mojo-codec/TrackingMario | /main.cpp | C++ | cpp | 588 | no_license | /*
* Tracking Mario
* Copyright(c) 2019 mojo, all rights reserved
*/
#include <iostream>
#include "Tracking.h"
using namespace std;
void Help()
{
cout<<"usage:: TrackingMario graph_dir video_file"<<endl;
}
int main(int argc, char **argv)
{
cout << "Hello, Tracking Mario!" << endl;
if(argc!=3)
... |
e805dc9f508e4bc8a852a3d213f70faae0c72ef6 | c162ab02096e280abfbb32a75b7d891cb3a2659b | vunvulear/IoTHomeProject | /nodejs-grovepi-azureiot/node_modules/i2c-bus/src/win/writeReadPartial.cc | C++ | cc | 4,786 | permissive | #include "i2c.h"
#include "..\util.h"
static bool DoWriteReadPartial(I2cDevice^ device, Array<BYTE>^ writeBuf, Array<BYTE>^ readBuf, int* bytesRead) {
I2cTransferResult result = device->WriteReadPartial(writeBuf, readBuf);
switch (result.Status) {
case I2cTransferStatus::FullTransfer:
*bytesRead = resul... |
cae38a81b21b7a864f1358faab8912a984a99223 | e89fc068a9abfce8215a2afca9a4d3e35963ee76 | qianjianxin/chromium | /chrome/browser/sync/sync_error_notifier_ash.cc | C++ | cc | 5,060 | 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 "chrome/browser/sync/sync_error_notifier_ash.h"
#include "ash/public/cpp/vector_icons/vector_icons.h"
#include "base/strings/utf_string_conversi... |
592390f01a3b818f9224ad5504a05354a68ef509 | 8a54843e85d7fd99574d3b31d73ce9241e4be377 | Drolegc/C-Json | /classes/sources/Game.cpp | C++ | cpp | 243 | no_license | #include "../headers/Game.h"
Game::Game(std::string name){
this->game_name = name;
}
std::string Game::getName(){
return this->game_name;
}
void Game::setName(std::string new_name){
this->game_name = new_name;
}
Game::~Game(){} |
a789fb2d66be58dc948ca70ed2a331b2ba06c437 | 513dda01b2de423b022bab5f85ec0c5031a999e3 | Crasader/cal | /Classes/model/ImageBody.cpp | C++ | cpp | 763 | no_license | #include "ImageBody.h"
ImageBody::ImageBody() : Entity() {
m_sprite = nullptr;
}
ImageBody::~ImageBody() {
}
int ImageBody::getType() {
return ENTITY_TYPE_IMAGE_BODY;
}
ImageBody* ImageBody::create(std::string filename, b2Body* body) {
ImageBody* imageBody = nullptr;
imageBody = new (std::nothrow) ImageBody... |
f4b14cff561777df630de85369fde8dffdc459df | d95a90f4e0821d98917382c3e5c5200bb6dc480e | richlum/salmonVsTurtles | /salmon.hpp | C++ | hpp | 2,435 | no_license | #ifndef SALMON_H
#define SALMON_H
#include "bubble.hpp"
#include <vector>
class Turtle; // Forward declaration
class Salmon {
public:
double rotation_;
//TODO: put this back into private after debugging
private:
// Location of the centre of the salmon.
double x_, y_;
// immediately prev value of loca... |
c740800cba5931d962a34f3376bdb2998cb23d24 | 8e2cbe5b3f7f16f25a87e9618e4e0895ef5fcdb0 | ousttrue/ImGuizmo | /src/ImGuizmoManipulator.cpp | C++ | cpp | 50,900 | permissive | #include "ImGuizmoTripod.h"
namespace ImGuizmo {
static const DirectX::XMFLOAT3 directionUnary[3] = {
{1.f, 0.f, 0.f},
{0.f, 1.f, 0.f},
{0.f, 0.f, 1.f},
};
const float screenRotateSize = 0.06f;
static const int halfCircleSegmentCount = 64;
// Matches MT_MOVE_AB order
static const OPERATION... |
d42761960437a34c6302ede82162509bb4068aa3 | 7ca8775f04edc09bc93030066fd831a6d886d9cb | nicolaslopez99/Ordenamiento | /main1.cpp | C++ | cpp | 1,335 | no_license | #include <iostream>
#include <stdio.h>
#include <windows.h>
using namespace std;
void intercambio(int a[],int min,int i){
int aux;
aux=a[i];
a[i]=a[min];
a[min]=aux;
}
void seleccion (int a[], int N){
int i,j,min;
for (i=0;i<N-1; i++){
min = i;
for (j=i+1;j<N; j++)
if(a[j]<a[min]) min =... |
6b3810e98b3483a245cbb701a291b59997a364b6 | d158d160383bd8393396d945b74bd8181a13266b | AndreeeCZ/Carla | /source/modules/daz-plugins/distrho-3bandsplitter.cpp | C++ | cpp | 2,034 | no_license | /*
* Carla Native Plugins
* Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later ver... |
ffc35d70dafe8304a5218a8a2da0142b507f44b3 | 2fd345b9af3f3f7178d2747629418b49e4740911 | martinsg88/CS302 | /CS302Assignment4T-5/4TAssignment/recognize/stack.cpp | C++ | cpp | 3,704 | no_license | #include "stack.h"
#include <iostream>
using namespace std;
/***********************************************************************
Constructor
***********************************************************************/
stack::stack()
{
top='\0';//set top to null
}
/***************************... |
520867531ffc9400097d5c2b273be21818b539be | 762ab9123b8fa2f13a06e6659ddf2cba148e4328 | lwriemen/masl | /utils/Environment_OOA/custom/Environment_JNI.cc | C++ | cc | 1,797 | permissive | #include "Environment_OOA/__Environment_services.hh"
#include "Environment_OOA/__Environment_types.hh"
#include "__Environment_JNI.hh"
/*
* Class: Environment
* Method: setenv
* Signature: (Ljava/lang/String;Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_xtuml_masl_util_Environment_setenv(JNIEnv * ... |
478ea40c0d5ebcdd6405513bf049150c28f46911 | f2e21b9a43905624a3e20a1d80708692e0bf91a9 | minhcongnguyen1508/Code-Java-C--UET | /DevC++/Code power/Can bang day so.cpp | C++ | cpp | 454 | no_license | //
# include <iostream>
# include <algorithm>
# include <string>
# include <vector>
using namespace std;
int main(){
vector <int> a;
int n, x;
cin>> n;
for(int i = 0; i < n; i++){
cin>> x;
a.push_back(x);
}
sort(a.begin(), a.end());
int max = 0, begin = 0, end = 0;
for(int i = 0; i < n; i++){
if(a[i]... |
d0141dc0bad0492e119de735b1d789424b4cf3d4 | ec7d8419d579d78415df64c232db6c7df9f879ae | Dimbelio/Programming-Principles-and-Practice-Using-C-by-Bjarne-Stroustrup- | /Visual Studio 2010/Projects/bjarneStroustrupC++PartIII/bjarneStroustrupC++PartIII/Chapter20Exercise18.cpp | C++ | cpp | 2,075 | permissive | /*
TITLE Range-checked iterator Chapter20Exercise18.cpp
"Bjarne Stroustrup "C++ Programming: Principles and Practice.""
COMMENT
Objective: Define a range-checked iterator for Vector.
Input: -
Output: -
Author: Chris B. Kirov
Date: 22. 02. 2017
*/
#include <iostream>
#include "Chapter20Exer... |
6cfa2f717a5efd01a4a10b3fa94d3fef6b11ec49 | 3877656be9c1dcd5a79f977a25889ec70c015f64 | Hudda/competitive_programming | /OLOLO.cpp | C++ | cpp | 496 | no_license | #include <iostream>
using namespace std;
int main(void) {
#ifndef ONLINE_JUDGE
// for getting input from input.txt
freopen("input.txt", "r", stdin);
// for writing output to output.txt
freopen("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL... |
2c469baa4ad0cb1e25ea31fb0485f929ea6e0e8a | 12b982dd721521eeffa74d71507798c50766934d | uwekamper/microflo-luftdaten | /components/ReadDHT22.hpp | C++ | hpp | 1,433 | no_license | /* microflo_component yaml
name: ReadDHT22
description: Read pressure and humidity from DHT22 sensor
icon: "thermometer-3"
inports:
in:
type: all
description: "Trigger a reading"
outports:
temperature:
type: float
description: ""
humidity:
type: float
description: ""
microflo_component */
... |
a817244a06f2df574aa97e97ce7fa10b861a7ef1 | 7b992c62e2252453b97d62a056d3305544bc91a8 | GDUTxxZ/v8 | /src/ic/ic.cc | C++ | cc | 100,027 | permissive | // Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/ic/ic.h"
#include "src/accessors.h"
#include "src/api-arguments-inl.h"
#include "src/api.h"
#include "src/arguments.h"
#include "src/base... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.