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 |
|---|---|---|---|---|---|---|---|---|
df1cce97df344c8b6af251e0329b26a96ccbfd84 | fd47468d14c6e27af8fab642b8c263ae44e38f2e | TrellixVulnTeam/Chromium_7C66 | /extensions/common/permissions/permission_message_test_util.cc | C++ | cc | 12,826 | 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 "extensions/common/permissions/permission_message_test_util.h"
#include <stddef.h>
#include <algorithm>
#include <iterator>
#includ... |
4aa4ac7547faeeddec7f78722643a8a8af16ccf9 | 1249453c3d6ee83ffd77bf6e1a14a9ae5ecc5f19 | studio666/kovri | /src/core/util/HTTP.cpp | C++ | cpp | 8,074 | permissive | /**
* Copyright (c) 2015-2016, The Kovri I2P Router Project
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, ... |
e862647a9ac4b8419fbe6b7bd2eb07bae5cec6ce | a37c4f605cd161c06150e11310a3d1d1f249b7dc | danrugeles/retrieval-algorithms | /include/indri/WeightedSumNode.hpp | C++ | hpp | 2,067 | permissive | /*==========================================================================
* Copyright (c) 2004 University of Massachusetts. All Rights Reserved.
*
* Use of the Lemur Toolkit for Language Modeling and Information Retrieval
* is subject to the terms of the software license set forth in the LICENSE
* file include... |
0f24a905d226f20a2f712e24399433d708790bf0 | a994585b98563a587218265607e7f7c0c699f444 | rikuTanide/atcoder_endeavor | /arc106/arc106_c.cpp | C++ | cpp | 1,586 | no_license | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//namespace mp = boost::multiprecision;
//#include "atcoder/all"
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> P;
... |
1b4fff28c924c3e2bd919d056c9ff827abd1614a | 2ad47f13fb1ceb08776df0b05f8bb3630557600e | openvinotoolkit/openvino | /src/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_transformation.cpp | C++ | cpp | 2,710 | permissive | // Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "low_precision_transformations/mat_mul_transformation.hpp"
#include <memory>
#include <tuple>
#include <vector>
#include <string>
#include <queue>
#include <ie_core.hpp>
#include "ngraph/op/op.hpp"
#include <transformatio... |
38825f73903d6c5152e4b2ab823b4ef8f50c5fa3 | a9ef0c58ee02c8d9b1fc90b3bb7694808755e6c8 | cc861010/v8 | /src/heap/setup-heap-internal.cc | C++ | cc | 39,417 | permissive | // Copyright 2017 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/setup-isolate.h"
#include "src/accessors.h"
#include "src/compilation-cache.h"
#include "src/contexts.h"
#include "src/heap-symbols.h"
#i... |
89006af91725e0ceb42cf3c50030d70617c99ae7 | 2e714aa7412f7b976e62d053f4b51fcd08970dc4 | lauer3912/chromium.src | /sandbox/linux/tests/unit_tests.cc | C++ | cc | 9,246 | 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 <fcntl.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
#include <sys/resource.h>
#include <sys/time.h>
#include <unistd.h>
#incl... |
2544798de6e8190fac8827ea3340ca47fa02fb8e | dfcf8e67c006360fd09ba86d631d605f9104fbd9 | ben-millar/ProgrammingProjectTwo-PacMan | /Programming Assignment 2/main.cpp | C++ | cpp | 932 | no_license | /// <summary>
/// Author: Ben Millar – C00236772
/// Date: 01/03/2019
/// Estimated time to complete: 12 hours
/// Session 1 Start: 18:45 End: 19:45
/// Session 2 Start: 18:00 End: 19:30
/// Session 3 Start: 09:30 End: 11:00
/// Session 4 Start: 14:30 End: 15:30
/// Session 5 Start: 16:45 End: 17:10 TOTAL TIME: 5:25
/... |
d473c54f74e6caf34dc332f1659577d28e9e8e53 | 00a68641d7e5df7d9d4bcb71b1b958f5ec5db1b7 | smart-m3/sib-tcp | /hip-dex/protocol/HipEchoResUsig.cpp | C++ | cpp | 1,864 | no_license | /**
* Host Identity Protocol (HIP) Diet Exchange (DEX) C++ Library (HDX++)
*
* HDX++ is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any late... |
6f4b2243b7b05c1c2bc42c2bc3db86e9663522b2 | 7d3323fe6e47c40360bc4ad5de594ce711587b02 | chromium/chromium | /components/qr_code_generator/qr_code_generator_unittest.cc | C++ | cc | 11,069 | 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 "components/qr_code_generator/qr_code_generator.h"
#include "base/logging.h"
#include "base/rand_util.h"
#include "base/test/scoped_feature_list.h"
#include "componen... |
a05e244711b0ee6ca0295cb579ac288aee21a7f5 | f87fde83f4f6db4ae33541e8f460552063ac07f0 | ckti/slate | /src/obfuscation-relay.cpp | C++ | cpp | 3,577 | permissive | // Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The SLATE developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "obfuscation-relay.h"
CObfuSc... |
b2ef0235f469d58139197163459413e3fe5692b5 | b44117c800a9149452601917d931ea348f44f958 | nanyatti/ModelViewer | /ModelViewer/Source/Tool/Error.cpp | C++ | cpp | 480 | no_license | #include <Windows.h>
#include <stdio.h>
#include "Error.h"
/*!
* @brief エラーのメッセージボックス表示
* @param message エラーメッセージ
* @param func_name 呼び出し元の関数名
* @param line 呼び出し元の行数
*/
void Error::Show(const char * message, const char * func_name, int line) {
char output[1024];
sprintf_s(output, "%s\n%s(%d)", message, func_name, ... |
c8ae4bae8d1882ed682d4c2bc57c0d7be519b8ab | 65e5b839caecc7e9b9dbf019e315ef76cb655fd2 | pointhi/llvm | /lib/MC/MCObjectStreamer.cpp | C++ | cpp | 22,227 | permissive | //===- lib/MC/MCObjectStreamer.cpp - Object File MCStreamer Interface -----===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
99f4245c064af89d9c8d8d09e3720c5140809b49 | 40ed2c7ff3559b4893aeb538009953d102a47b88 | Randy-Bruce/Apprendre_Cpp | /06_MaquetteEquillibrage/equilibreuse.cpp | C++ | cpp | 234 | no_license | #include "equilibreuse.h"
#include <iostream>
using namespace std;
Equilibreuse::Equilibreuse()
{
leMoteur = new Moteur(laCarte);
}
Equilibreuse::~Equilibreuse()
{
cout << "Destructeur de la classe Equilibreuse" << endl;
}
|
bed442d8773b491c2fed4b0caaa7fe45bbf0d391 | 2c81ee5196603ab2ccc5d2d2439848ce82183054 | tockendon/ENB241 | /Portfolio-2/datetime/src/date.cpp | C++ | cpp | 6,239 | no_license | /* date.cpp
* ENB241 Portfolio 2
*
* Date class implementation
*
* Original: 28/02/2013 - C. Fookes
* Modified: 22/04/2014 - D. Chen
*
* DO NOT MODIFY
*/
#include <iostream>
using std::cerr;
using std::endl;
#include <iomanip>
using std::setw;
using std::setfill;
#include <sstream> ... |
0981778d6b103c50c1419d4343d9ca201b212dc9 | 0080c06eae7f0fb8b516a608f08e26ed65c9de8e | tevoran/project-puffel-fish | /src/engine/renderer/software_rasterizer/rasterize_triangle.cpp | C++ | cpp | 5,193 | permissive | #include <te.hpp>
void t3v::software_rasterizer::rasterize_triangle(
t3v::vertex& vertex1,
t3v::vertex& vertex2,
t3v::vertex& vertex3,
render_thread_data *data)
{
//converting vertices from clip space to screen space
//triangle is artificially stretched to avoid empty spaces between adjacent triangles
glm::i32v... |
5c8ef144e33543fb10a149774e1ad9396c8396ca | a9fb914fdcb01c0880da56ff7fedd9caefc9c195 | rafalcieslak/libsga | /examples/sampler/main.cpp | C++ | cpp | 1,441 | permissive | #include <cmath>
#include <sga.hpp>
#include "../common/common.hpp"
int main(){
sga::init();
sga::Window window(800, 600, "Example window");
auto fragShader = sga::FragmentShader::createFromSource(R"(
void main()
{
vec2 coords = sgaWindowCoords;
coords.xy -= 0.5;
coords *= (-cos(sga... |
ce7d7c951011c42a524aef208542e1e7317c73c3 | c3ddaf20756515bf81fb8756ef780e56974bfb11 | winter-txieyyue/chromium | /components/sync/driver/glue/sync_engine_backend.cc | C++ | cc | 29,571 | 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 "components/sync/driver/glue/sync_engine_backend.h"
#include <utility>
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/... |
14d7c16d598d3b02efdf85b9f89be133f3a34e34 | cd2af92233f947a40af056bda9173980a90b8ea3 | liman324/TDA7442 | /TDA7442.cpp | C++ | cpp | 3,708 | no_license | #include <Arduino.h>
#include <Wire.h>
#include "TDA7442.h"
TDA7442::TDA7442(){
Wire.begin();
}
void TDA7442::setInput_att(int in_att){
in_att = 0b01000000 + abs(in_att);
writeWire(TDA7442_INPUT_ATT, in_att);
}
void TDA7442::setSurr_sel(int surr, int out, int effect){
switch(surr){
ca... |
847c9ce800cb92972456de355d4af161e5a3d339 | 56fb7a60dee4169e563f1ea30c7be55805602682 | TWINNFAMOUS-HTC-DEVELOPERS/android_device_htc_ocl | /power-libperfmgr/Power.cpp | C++ | cpp | 19,354 | no_license | /*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
4709b9de4d89e3d711fa97ad856fc019b367c83d | b89970bdc73bc08cfe99c0a41a145616401fc1cd | gotoplace/PS | /Category/Backtracking/14_BOJ_10974_v1.cpp | C++ | cpp | 835 | no_license | /*
https://www.acmicpc.net/problem/10974 : 모든 순열
2020KB 20ms
기본 순열 문제
1부터 N까지의 수로 이루어진 수열 출력
N!개 만큼 출력해야 정답 처리됨
N개 중 R개 선택인데, N = R 조건
nPn = N! 이 성립됨.
https://blog.naver.com/honeyeah/110155527947
*/
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define MAXN (8)
int N;
int used[MAXN +2], sol[MAXN +2... |
4993aad20d0c4ad4ae21fe34d12ba90c75c65ea8 | 68fe8b1f6c3ba6d549bce146fd37c83e2081efde | swpd/leetcode | /048_rotate_image.cc | C++ | cc | 874 | no_license | class Solution {
public:
void rotate(vector<vector<int> > &matrix) {
int n = matrix.size();
int len = n / 2;
if (n % 2 != 0) {
for (int i = 0; i < len; ++i) {
int tmp = matrix[len][i];
matrix[len][i] = matrix[n - 1 - i][len];
matrix... |
5d151b4a2507ab9f054887a50d646efb751e1a25 | ae09cfe326cd6888d3350ef7f263a75ea56afe4f | Cryoris/timer_cpp | /header-version/test/check.cpp | C++ | cpp | 512 | no_license | # include <iostream>
# include "timer.h"
int main() {
std::vector<double> v;
const unsigned runs = 100, N = 2e5;
Timer t;
t.start();
for (unsigned j = 0; j < runs; ++j) {
for (unsigned i = 0; i < N; ++i) {
if (i % 79 == 0){
v.push_back(i);
}
}
t.lap();
}
std::cout << "Min:... |
b3b0f0b4bf9a5bb4e47b25ed226a9482b9aa3a3e | 4b8bed9ee1452ddf1baa512d893af536fadabc45 | amenoyoya/old-project | /c/Haxe/OpenFL/01.HelloWorld/Export/windows/cpp/obj/src/openfl/text/Font.cpp | C++ | cpp | 9,205 | permissive | #include <hxcpp.h>
#ifndef INCLUDED_Type
#include <Type.h>
#endif
#ifndef INCLUDED_haxe_io_Bytes
#include <haxe/io/Bytes.h>
#endif
#ifndef INCLUDED_lime_text_Font
#include <lime/text/Font.h>
#endif
#ifndef INCLUDED_lime_utils_ByteArray
#include <lime/utils/ByteArray.h>
#endif
#ifndef INCLUDED_lime_utils_... |
01507d6980428c66fa0836dada665af8be2e164f | 2252b3114a62bc8005550e1ffa697f509b552753 | diptadas/acm-resources | /uva-solutions/10327.cpp | C++ | cpp | 414 | no_license | #include <stdio.h>
int main()
{
int n,m,i,j,temp,a[1000];
while(scanf("%d",&n)!= EOF)
{
m=0;
for(i=0; i<n; i++)
{
scanf("%d",&a[i]);
}
for(i=0; i<n-1; i++)
{
for(j=i+1; j<n; j++)
{
if(a[i]>a[j]) m++;
... |
b900d6998879c57dd0e1b7832ad68c54f3fd7a99 | 9c0e73133b9d7c830cc053345a8e15cbd71daf9c | nico/hack | /aus/draw_line_test.cc | C++ | cc | 3,751 | no_license | #include "draw_line.h"
#include "framebuffer.h"
#include <string>
struct TestSurface {
TestSurface(size_t w, size_t h, const char* name) : fb{w, h}, name(name) {}
TestSurface& draw_line(int x1, int y1, int x2, int y2);
void should_be(std::string raw_expected);
private:
static constexpr Pixel kFill = rgb(255... |
0c3416fb42e97a95d419ee75d7f80c733cce5118 | 495350dc7612ad069a3b6378fbccca999810b273 | verilog-to-routing/vtr-verilog-to-routing | /vpr/src/base/read_route.cpp | C++ | cpp | 31,785 | permissive | /**
* @file
* @brief Read in the .route file generated by VPR.
*
* This is done in order to perform timing analysis only using the
* --analysis option. This file set up the routing tree. It also checks that
* routing resource nodes and placement is consistent with the
* .net, .place, or the routing resource grap... |
76e1fb0e6f3231fb4ea4f21810bdcb7784158436 | 1cfda8a242bbb73579a47002b5e2773558d87ff6 | phamvancuong9x/Bai-tap-ham | /UCLL,BCNN.cpp | C++ | cpp | 811 | no_license | //Tinh UCLL BCNN 2 so nguyen a,b
#include<iostream>
using namespace std;
int ucln(int a, int b)
{
int UCLN=0;
for (int i = a; i >= 1; i--) {
for (int j = b; j >= 1; j--) {
if (a % i == 0) {
if (b % j == 0) {
if (i == j) {
UCLN = i;
}
}
if (UCLN != 0) { break; }
... |
fb8663d9e0ae5c716cb7d95dca9ca874f2ce1c27 | 8daed2e8c78ad2b95b984cc1cf9c4436b46473bf | Tom1975/SugarConvDsk | /CPCCoreEmu/FormatTypeSCP.cpp | C++ | cpp | 16,446 | permissive | #include "stdafx.h"
#include "FormatTypeSCP.h"
#include <stdlib.h>
#include <algorithm>
#ifdef _WIN32
#if _MSC_VER < 1900
extern int lround(double d);
#endif
#endif
static int AddShortToBuffer(unsigned char* buff, int index, unsigned short value)
{
buff[index++] = ((value >> 8) & 0xFF);
buff[index++] = (value ... |
fdef0a2ebef6f5e8fdac8660fd380329b6701a08 | 96d02d1edf43e880003eb58c95977c805942026b | lolog/Algorithm | /C++/Queue/Queue.cpp | C++ | cpp | 855 | no_license | #include "Queue.h"
#include "SequentQueue.cpp"
#include "SinglyLinkQueue.cpp"
#include "DoublyLinkQueue.cpp"
queue::Queue::Queue()
{
p_sequent_queue = new SequentQueue<int>();
p_singly_link_queue = new SinglyLinkQueue<int>();
p_doubly_link_queue = new DoublyLinkQueue<int>();
}
queue::Queue::~Queue()
{
delete ... |
a34a92c6193ef177b7f5fdf40fedd5451ecd7ffa | 445a5660ff87a06205a747638158aa256f6e9c56 | rowhit/devsim | /src/MathEval/MiscMathFunc.hh | C++ | hh | 801 | permissive | /***
DEVSIM
Copyright 2013 Devsim LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... |
672c1167e77af1a2b084ca6e99cb01ae1a15a7ad | c0e6c97df0a3e56538eb21da36728677dcc8b5fa | johngalton/PULSE | /Software/Pulse_II/nextion.cpp | C++ | cpp | 8,463 | no_license | /***************************************
*
* Filename nextion.cpp
* Author A Cowan
* Start date 27/10/2018
* Project PULSE
* Description Class representing the connected
* Nextion display
*
**********************************************************/
#include "Arduino.h"... |
1ab4785a63d0ba6410426cb3d12ee35e0bc329b0 | 6c426a2e74059100476883ec4650cac6a425c65d | aline117/cmake_tutorial | /src/main_depend_test.cpp | C++ | cpp | 206 | no_license |
#include <stdio.h>
#include <string.h>
int output2 (const char* str){
if(str && strlen(str)){
printf("depend output2:'%s'",str);
}else{
printf("depend output2 str is null");
}
return 0;
} |
fbbc284261a57bd92e5b744b2d1cd882682b387d | f17806c2c6d1fdeeb87cb019111ea41dbd7c7c94 | flpsw/fast_sample | /AquaParamFeature.cpp | C++ | cpp | 526 | no_license | /*
* File: AquaParamFeature.cpp
* Author: fpereira
*
* Created on December 4, 2014, 5:18 PM
*/
#include "AquaParamFeature.h"
#include "AquaParam.h"
AquaParamFeature::AquaParamFeature(std::string a, bool v, std::string h) {
this->key = a;
this->valuable = v;
this->required = (h.substr(0, 1)=="*")?... |
e998a7831360619ca0ad8578404dc2a41db64817 | 13f3423d5e1fe3f933582a3026cadb1765a8c06a | ROSDevoloper/DelftX_ROS1x_hrwros | /hrwros_gazebo/src/plugins/ProximityRayPlugin.cc | C++ | cc | 5,992 | no_license | /*
* Copyright (C) 2012-2016 Open Source Robotics Foundation
*
* 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... |
2973d1dede797a05d95b8569ac4840c8fbae7390 | 96e55dc764c37ef25b728a17b0d642780c7c0a4e | EnEff-BIM/EnEffBIM-Framework | /SimModel_Python_API/simmodel_swig/SimModel_Dll_lib/framework/SimFlowCompoundEqmt_UnitaryZoneEqmt_UnitVentialtor.hxx | C++ | hxx | 33,044 | permissive | // Copyright (c) 2005-2014 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD, an XML Schema to
// C++ data binding compiler.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Fre... |
0df295d85a15a358e03b80f2800584f6b122a24b | 8068dc94b318301087b6eea399331f5ce882882c | VictorPetersson3/Spelprojekt3_Shmup | /Source/Game/TestButton.cpp | C++ | cpp | 2,185 | no_license | #include "stdafx.h"
#include "TestButton.h"
#include "tga2d/sprite/sprite.h"
#include "InputManager.h"
#include <iostream>
#include "AudioManagerAccesor.h"
#include "AudioManager.h"
Studio::TestButton::TestButton()
{
}
Studio::TestButton::TestButton(const char* aPath, const VECTOR2F aPosition, const VECTOR2F aSize, ... |
ff1b376b6065f1cb71dbe1e7b64c9bfb66f55686 | 989360a99f2d9bcc4b77c5e611e0e9781ce4aed6 | testitesti22/palemoon27 | /dom/ipc/PreallocatedProcessManager.cpp | C++ | cpp | 11,904 | no_license | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0... |
43ac1db69cd6dc213e77a4a00c171d52a54ddbb3 | 0c4d6110af1e083a756351025ad394b8eece8612 | XLPE/Ginkgo | /sql_parser/ast_node/ast_expr_node.cpp | C++ | cpp | 46,572 | no_license | /*
* Copyright [2012-2015] DaSE@ECNU
*
* 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, Ve... |
38b4276c87f49dcdee3c0dd2c010231c43415ccb | 32f046581a3bf032b56b6ab885774a998468cb7d | AnabaenaQing/Source-Code_ShaderX_GPU-Pro_GPU-Zen | /GPU Zen1/04_Screen Space/03_Practical Gather-based Bokeh Depth of Field/samples/dof/src/main.cpp | C++ | cpp | 17,302 | permissive | #include <main.h>
#include <namespaces.h>
struct MeshConstantBuffer
{
Matrix worldTransform;
Matrix viewProjTransform;
};
bool fullScreen = false;
int screenWidth = 1280;
int screenHeight = 720;
float dofFocalPlaneDistance = 40.0f;
float dofFocusTransitionDistance = 20.0f;
float dofStrength = 1.0f;
Application... |
8b12afa6c81d02c378a6275dd47c2b54eccd4b5d | e20e6058276dac1bfe9e3cdaddf11c31bcaa18df | henriquelsmti/avro | /lang/c++/impl/DataFile.cc | C++ | cc | 17,066 | 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... |
a94cf88c567aa91da9c47d199070f46abd406e0e | 30e73f387793fa536e7d2e882cd087dd24b5e1c3 | modcrypto/brofist | /src/test/versionbits_tests.cpp | C++ | cpp | 15,211 | permissive | // Copyright (c) 2014-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
#include "random.h"
#include "versionbits.h"
#include "test/test_brofist.h"
#include "chainparams.h"
#incl... |
059fa80103e42e3052130be79f7ae63d51a45f61 | a9994b66c625901553414862bb8a7a71b7ccf01f | yrnkrn/zapcc | /tools/clang/test/SemaTemplate/instantiate-member-pointers.cpp | C++ | cpp | 1,811 | permissive | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
struct Y {
int x;
};
template<typename T>
struct X1 {
int f(T* ptr, int T::*pm) { // expected-error{{member pointer}}
return ptr->*pm;
}
};
template struct X1<Y>;
template struct X1<int>; // expected-note{{instantiation}}
template<typena... |
1d34dcca094af1ee049721a0cfaa6c64bb8b8700 | e8085b480c056805d62ed5323e0db0504df173f2 | fsprado/DRAMPower | /src/CommandAnalysis.cc | C++ | cc | 37,374 | permissive | /*
* Copyright (c) 2012-2014, TU Delft
* Copyright (c) 2012-2014, TU Eindhoven
* Copyright (c) 2012-2014, TU Kaiserslautern
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redis... |
70b4afd3afd344458b52a405091420186fcecb3d | f6a1da98c1958caec05c9ef7da243262bf254183 | UMI64/SelfBlanceCar | /Hard/I2C/I2C.cpp | C++ | cpp | 6,525 | no_license | #include "I2C.h"
void I2CPORT::Init ()
{
if(GPIOx==GPIOA) RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
else if(GPIOx==GPIOB) RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
else if(GPIOx==GPIOC) RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
else if(GPIOx==GPIOD) RCC_APB2PeriphClockCmd(RCC_A... |
90684bf668ab2f3984c3d5786b682088dae2334f | 502fb964e0e0143618e967a3b5de64651a2677c3 | timluther/CitySectorFPS | /GraphicsLib/src/CVector4f.cpp | C++ | cpp | 1,187 | no_license | /********************************************//**
* \copyright (c) 2014
* \file CVector4f.cpp
* \Author Tim Lewis (tim@totga-games.com)
* \see Project: Anthracite
* \date 11-09-2014
* \brief CVector4f
* CVector4f is a four dimensional vector class
***********************************************/
#... |
32ae1348689a099d8034b6cffeaed5983a2dcd78 | bb5cadf19b6032ea75657201d46eef2222372c8c | aman955/Competitive-Coding | /After Dec 2017/spoj/NGM.cpp | C++ | cpp | 273 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long n;
while(scanf("%d",&n)!=EOF)
{
if(n%10==0)
printf("2\n");
else
printf("1\n%d\n",n%10);
}
}
|
5099fcdad5276c2a62dcec581e960ced42bb5ec8 | 7b0f65503fb7a7f04fb6802382d8cb0800c0bbc6 | retrofirmware/gh_retrogame_emulator | /uae4all/src/lib7z/lzma.cpp | C++ | cpp | 2,332 | no_license | /* Lzma86Enc.c -- LZMA + x86 (BCJ) Filter Encoder
2008-08-05
Igor Pavlov
Public domain */
#include <string.h>
#include "lzma.h"
#include "Alloc.h"
#include "LzmaEnc.h"
#include "LzmaDec.h"
#define SZE_OUT_OVERFLOW SZE_DATA_ERROR
#define LZMA_SIZE_OFFSET LZMA_PROPS_SIZE
#define LZMA_HEADER_SIZE (LZMA_SI... |
e4db841454f01c5ad0daff379fb19f5c1ac72266 | d7c6650e326ebc111aaed4bc1e84245d015368bc | Azq2/franklin_u600_mode_switch_usb_driver | /src/main.cpp | C++ | cpp | 3,324 | no_license | #include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#define DEV_VID 0x1FAC
#define DEV_PID 0x0150
#define DEV_MSG "\x55\x53\x42\x43\x12\x34\x56\x78\x24\x00\x00\x00\x80\x01\x08\xdf\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
extern "C" {
#ifdef __WIN32
#include <windows.h>
... |
bce9cbb79c99621aefca18c97143f2413b49316c | 8919860695c6f8d49613050dcc5c0fc474c62b01 | mashavorob/lfds | /perftest/numbers.hpp | C++ | hpp | 5,180 | permissive | /*
* numbers.hpp
*
* Created on: Mar 26, 2015
* Author: masha
*/
#ifndef PERFTEST_NUMBERS_HPP_
#define PERFTEST_NUMBERS_HPP_
#include <xtomic/aux/inttypes.hpp>
#include <xtomic/aux/xfunctional.hpp>
#include <xtomic/aux/cppbasics.hpp>
#include <cstdlib>
#include <ctime>
#include <set>
#include <vector>
na... |
4bd69b29fa3ff735e5bf4285659e7285be296fb6 | 114f21497977ba10e87a25608d5425f3df6b687c | Ashray11/InterviewBit | /Two Pointers/Counting Triangles.cpp | C++ | cpp | 498 | no_license | int Solution::nTriang(vector<int> &A) {
if(A.size()<3){
return 0;
}
long mod = 1000000007;
sort(A.begin(),A.end());
long count = 0;
for(long i=A.size()-1;i>=2;i--){
long start = 0;
long end = i-1;
while(start<end){
if(A[start]+A[end] > A[i]){
... |
c53d6e9fff8a597072e8a136ef97d0d434b34bb2 | b1f2ffc16cb71e3ad69ad5e64f2db5b167522a0a | csterryliu/CrackingTheCodingInterview5 | /ch3/simplestack.hpp | C++ | hpp | 524 | no_license | //
// simplestack.hpp
// CtCI5
//
// Created by Terry on 2016/6/20.
// Copyright © 2016年 Terry. All rights reserved.
//
#ifndef simplestack_hpp
#define simplestack_hpp
#include <stdio.h>
#define MAX_STACK_LEN 30
class SimpleStack {
public:
SimpleStack();
~SimpleStack();
void Push(int indata);
vo... |
f89f4e6cb9d502b9c18b34f186c5f98c53af83be | fc6adee3b1a29d82ff94790377c33424d20e1185 | homidian/OpenVX-kernels-hdl-outputs | /Sobel_benchmark_tile_71_output/systemc/Sobel_phase_strm_8.cpp | C++ | cpp | 172,068 | no_license | #include "Sobel_phase_strm.h"
#include "AESL_pkg.h"
using namespace std;
namespace ap_rtl {
void Sobel_phase_strm::thread_tmp405_fu_49469_p2() {
tmp405_fu_49469_p2 = (!z_V_20_8_v_cast_cast_cast_fu_49447_p3.read().is_01() || !z_V_20_7_v_cast_cast_fu_49440_p3.read().is_01())? sc_lv<6>(): (sc_biguint<6>(z_V_20_8_v_... |
2f5bb5c9fb5bb737348b28da412052cd2ee06638 | 35d3b26a7ba081523a2e202634a0accafea9c2b2 | dop4398/IGME.540 | /Game.cpp | C++ | cpp | 13,669 | permissive | #include "Game.h"
#include "Vertex.h"
#include <fstream>
#include "WICTextureLoader.h"
// Needed for a helper function to read compiled shader files from the hard drive
#pragma comment(lib, "d3dcompiler.lib")
#include <d3dcompiler.h>
// For the DirectX Math library
using namespace DirectX;
// -----------------------... |
e4e81167acde698d19cde4e2751874c9f6f7e1c3 | 8f44cc7cb1a7703786c927abef4bde5a1a22821c | dimon-280894/simple-coin-test | /src/rpc/protocol.cpp | C++ | cpp | 3,909 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Simplecointest Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpc/protocol.h... |
a989ce9447ae679cd930e8c24c4442d1c5893a61 | bae7c66c4e2585f7ea12422c9b103ab7750b433b | zH4x/SoT-SDK-2.2.0.1 | /SDK/LostShipmentsClueVariants_functions.cpp | C++ | cpp | 8,250 | no_license | // Name: SoT, Version: 2.2.0b
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//-----------------------------------------------------... |
a14f48c3670e5533c0b71dad0d8f8c6b011f09ca | 649eb092a55650130e53ad124bb5047a5ab21f1d | noscripter/cefode-chromium | /chrome/browser/autofill/autofill_xml_parser_unittest.cc | C++ | cc | 15,568 | permissive | // Copyright (c) 2011 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 <string>
#include <vector>
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/... |
0a90e5588448bcec47f6cc781972ebec7fada180 | e827c7fd12f8c2ba61e27432366ca17876432e5d | mobius-software-ltd/iotbroker.cloud-arduino-client | /StandardCplusplus/map.cpp | C++ | cpp | 837 | no_license | /* Copyright (C) 2004 Garrett A. Kajmowicz
This file is part of the uClibc++ Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option... |
54b56cb4d0d0fb640ecb38022dc91993250279b5 | 8840159e36e5e84c4bb66e3ff3f7cc150f550382 | mabouseif/KOBOTS_Amigo | /clipping_tests/test_clipping.cpp | C++ | cpp | 1,310 | no_license | #include "clipper.hpp"
#include "clipper_console_demo.cpp"
using namespace ClipperLib;
int main()
{
Path subj;
Paths whatever;
Paths solution;
subj <<
// IntPoint(348,257) << IntPoint(364,148) << IntPoint(362,148) <<
// IntPoint(326,241) << IntPoint(295,219) << IntPoint(258,88) <<
// IntPoi... |
acaa86d8d54b17d4b08ca7c775643220ff8019c4 | 7e8828171c63bf555532ff48e46fac5fb8c84732 | jloveric/smartphysics | /test/testNearestNeighbor.cc | C++ | cc | 1,284 | permissive | #define BOOST_TEST_MODULE testNearestNeighbor
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <memory>
#include "definitions.h"
#include "model.h"
#include "learn.h"
#include "apply.h"
BOOST_AUTO_TEST_CASE(TestNearestNeighbor) {
auto model = std::make_shared<NearestNeighborModel>();
auto learn... |
a414f3f6af4d771d4a31f817d9c87309aad6a48d | 9b990b4967e2c053b3e4ae802ff0680e3d14f132 | imulan/procon | /yukicoder/343.cpp | C++ | cpp | 998 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(i=0;i<n;++i)
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr)
#define mp make_pair
#define pb push_back
#define fi first
#define sc second
int ab(int p){
return (p>0)?p:-p;
}
int main(int argc, c... |
337365d9e901910cc2668ddcc598c163c52e8152 | 95f2e756e833a9c5bf9e406da2edbabea12eb893 | Tarrasch/BabuschkaEngine | /mirror.cpp | C++ | cpp | 393 | no_license | #include "engine.h"
square_t unturn(square_t square,int side){
if(side)
return unturn((7-rank(square))|(file(square)<<4),side-1);
return square;
}
square_t turnback(square_t square,int side){
return unturn(square,(4-side)%4);
}
bool squareaheadof(square_t square,square_t square0, int side){
if(rank(unturn(sq... |
b4fb8946f2d8ff82ef9c174c9038c60b56fa52c6 | 6f82ec34b28b9a4cb4c9e605714bb049d346857f | flyhero99/Lanqiao | /基础练习/报时助手.cpp | C++ | cpp | 1,211 | no_license | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
string a[100] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten",
"eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen",... |
d03e4a48d2e1a3cbbcd08fa6ee81785e7fc0ca44 | 2f98a1251399c2b5974a18370c0cfa8796ba20b9 | travissplunkett/Final-Project | /source/main.cpp | C++ | cpp | 13,039 | no_license | #include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "expense.h"
#include "income.h"
using namespace std;
//Allows user to create expenses
void setExpenses(vector<Expense*> & _expenses);
//Allows user to create incomes
//Parameters: vector<Income*> & _incomes
//Returns void
void setInco... |
cb2e8715545d47ee440edfdd8e7b7221162fea62 | d053b3256fcca14d93bee7acc67dce0179e003aa | SnSKinzu/ChakraCore | /lib/wabt/src/binary-reader-interp.cc | C++ | cc | 59,202 | permissive | /*
* Copyright 2016 WebAssembly Community Group participants
*
* 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... |
c18be49cef2ff748de4201a740441ea3ff208f20 | c7019d21bb9739aac81b188e59fba673f30f383b | moguchev/KKM | /src/Исходники/settingprogwindow.cpp | C++ | cpp | 1,422 | no_license | #include "settingprogwindow.h"
#include "ui_settingprogwindow.h"
SettingProgWindow::SettingProgWindow(QWidget *parent) :
QWidget(parent),
ui(new Ui::SettingProgWindow) {
ui->setupUi(this);
init();
connect(ui->pushButton_ok, SIGNAL(clicked()), this, SLOT(sendSetting()));
}
SettingProgWindow::~Set... |
27010442b0fd8c2cfc92d845188f7cd3e6274c16 | f5afdaa06b38286427c26c4878cb79eda25c0a11 | Grant1219/advent_of_code_2019 | /8/part1.cpp | C++ | cpp | 1,302 | no_license | #include <string>
#include <fstream>
#include <iostream>
#include <vector>
int count_layer_digits(char digit, const std::string& layer) {
int count = 0;
for (char c : layer) {
if (c == digit) {
count++;
}
}
return count;
}
int main(int argc, char** argv) {
if (argc < 2... |
7958bc649d79b4ed1787e141267e64cc08f952e7 | b680f1c811f3f9451dd72febe37cf00601f488dc | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14712/function14712_schedule_10/function14712_schedule_10.cpp | C++ | cpp | 1,032 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14712_schedule_10");
constant c0("c0", 128), c1("c1", 64), c2("c2", 64), c3("c3", 64);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i3("i3", 0, c3), i01("i01"), i02("i02"), i03("i0... |
7ccc6492b9b9fa642027763395711a5de622305b | 9017ed157d818bc385f8188a3721eb1be4a57906 | H-K-ai/Qt-4.7.4 | /orderDishes/loginwindow.cpp | C++ | cpp | 1,762 | no_license | #include "loginwindow.h"
#include "ui_loginwindow.h"
loginWindow::loginWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::loginWindow)
{
ui->setupUi(this);
}
loginWindow::~loginWindow()
{
delete ui;
}
void loginWindow::on_cancelBut_clicked()
{
close();
}
void loginWindow::on_loginBut_clic... |
fa637b229cf0ff8f2817af656bc131da902f6550 | 8a5e1557d543efcd9136c06f6f48eafa28b59906 | jpcima/xsimd | /include/xsimd/types/xsimd_sse_float.hpp | C++ | hpp | 19,864 | permissive | /***************************************************************************
* Copyright (c) 2016, Johan Mabille and Sylvain Corlay *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* ... |
d617bf48ddb0eda3f8c69e9d7ea703e41197d5cd | c1baf4981ad32f0ca5f9706a5fd3dee953ee47b5 | cukier/qt | /Sensor/cwf/cstlcompilerimport.cpp | C++ | cpp | 1,434 | no_license | /*
Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler
Distributed under MIT license, or public domain if desired and
recognized in your jurisdiction.
See file LICENSE for detail.
*/
#include "cstlcompilerimport.h"
#include "configuration.h"
#include "filemanager.h"
#include "constants.h"
CWF_BEGIN_NAME... |
8d7d46c0062e2ceb13efdb51fcc05d069ef0f7a2 | 8a6b32dca279f00fd29c0d9b465ae846673dbf95 | viko3019/AlgorithmAndDS | /data strurcture/binary tree/binary search tree.cpp | C++ | cpp | 3,594 | no_license | # include<iostream>
# include<stdlib.h>
# include<cstdio>
using namespace std;
struct node
{
struct node *lchild;
struct node *rchild;
int data;
};
struct node *search(struct node *p, int x);
struct node *ins(struct node *p, int x);
//struct node *del(struct node *p ,int x);
struct node *min(struct node *p);
struct ... |
bc027bc6a5d445ebde98205d464e19c761e945bc | 87578be0790146c4cee1ec66a8a9a642df0c4c2e | francolerch/OpenGLEngine | /OpenGLEngine/src/Renderer/Buffer.cpp | C++ | cpp | 595 | no_license | #include "pch.h"
#include "Buffer.h"
#include "glad/glad.h"
namespace OGLE {
Buffer::Buffer(const void* data, unsigned int size, GLenum type)
:m_Data(data), m_Size(size), m_Type(type)
{
glGenBuffers(1, &m_RendererId);
glBindBuffer(m_Type, m_RendererId);
glBufferData(m_Type, size... |
18455e74ab424149a8dacf80be426403a96cea9b | 341dfe573b78ef9667b7468cbd1a7f3a29850c0e | CharlesE-233/aliyun-openapi-cpp-sdk | /ros/src/model/CreateChangeSetRequest.cc | C++ | cc | 894 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
1d9c27e9bfc902cda8ec028d5693ea8687f6e8c4 | 76b6e417ab0cfc350b6b6a714ff9161c5e7ab88f | Patreos98/node | /deps/v8/src/objects/bigint.cc | C++ | cc | 107,759 | permissive | // Copyright 2017 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.
// Parts of the implementation below:
// Copyright (c) 2014 the Dart project authors. Please see the AUTHORS file [1]
// for details. All rights reser... |
f249a89d8e0bb83d020efd172c8a76fec7acc6b3 | d2e340d43b0f675832ef27481717db2b2419567c | iomeone/run-on-coal | /roc_server_module_lua/Lua/ArgReader.cpp | C++ | cpp | 7,665 | permissive | #include "stdafx.h"
#include "ArgReader.h"
#include "Lua/LuaArgument.h"
#include "Lua/LuaFunction.h"
#include "Module/LuaModule.h"
#include "Lua/LuaVM.h"
#include "Utils/LuaUtils.h"
ArgReader::ArgReader(lua_State *f_vm)
{
m_vm = f_vm;
m_currentArgument = 1;
m_argumentsCount = lua_gettop(m_vm);
m_retu... |
100bfe33feabbce458cd1006b3f57bef9f4322c8 | 309f0281df6997aadeeddf419290d71b911150fb | didrlgus/algorithm-practice | /inflearn/s55.cpp | C++ | cpp | 487 | no_license | // 기차운행
#include<bits/stdc++.h>
using namespace std;
int n;
vector<int> v;
stack<int> stk;
string ret;
int main() {
scanf("%d",&n);
for(int i=0;i<n;i++) {
int val;scanf("%d",&val);
v.push_back(val);
}
int i=0,j=1;
while(true) {
if(i==n) break;
stk.push(v[i]);
ret+="P";
while(!stk.empty()) {
if(stk.t... |
1408955971b5b229c1d909df5a6c5a96d47a9777 | b66a7a14f52251b6bba5f435c9b3f4ccd1bb1c62 | Kelly2336/Judge | /UVA/00541.cpp | C++ | cpp | 913 | no_license | #include<stdio.h>
using namespace std;
int main()
{
int n;
while(1)
{
scanf("%d",&n);
if(!n)break;
int a[105][105];
int x[105]={0};
int y[105]={0};
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
scanf("%d",&a[i]... |
4d87e9c485939bb95705e919d795a081c86e6fb4 | 620f8bd551bb2ff28fcca947ab9b18a4cc820463 | ashishgopalhattimare/LeetCode | /Medium/print-words-vertically.cpp | C++ | cpp | 1,166 | no_license | // https://leetcode.com/problems/print-words-vertically/
// Medium
class Solution {
private String regex = "\\s+$";
public List<String> printVertically(String s) {
String[] arr = s.split("[ ]");
int row, index = -1, col = arr.length;
row = Integer... |
5cd070a349249ade8b16c503d7bc473c9f0a7b4b | 77e9d17c5eb4a12bed5980e46d475ff3469a81b9 | Quant2017/Design3D | /Intermediate/Build/Win64/Design3D/Inc/BlueprintGraph/K2Node_GetArrayItem.gen.cpp | C++ | cpp | 5,257 | no_license | // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
==============================================================... |
bad940250a0d4e4e2c8ff969b907dfc66995e6f7 | ad990a0ad76a5e54602e5ab094efe6b550c32d26 | timblechmann/nt2 | /modules/core/linalg/include/nt2/toolbox/linalg/details/lapack/gglse.hpp | C++ | hpp | 11,785 | permissive | /*******************************************************************************
* Copyright 2003-2012 LASMEA UMR 6602 CNRS/U.B.P
* Copyright 2011-2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
*
* Distributed under the Boost Software License, Version 1.0.
* See accompanying f... |
ff699ec5b8aa29e42688a5287251786a09d026c0 | 34560e6a23046b5e8f38185971dcf61705f4d4b8 | bwithbroe/gazebo | /sdcBackLidarSensor.hh | C++ | hh | 598 | no_license | #ifndef _sdcBackLidarSensor_hh
#define _sdcBackLidarSensor_hh
#include <boost/bind.hpp>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/sensors/sensors.hh>
#include <gazebo/common/common.hh>
#include <stdio.h>
#include <vector>
#include "sdcSensorData.hh"
namespace gazebo
{
class ... |
baa948b9c51b65f8a0a0eb02d0ddf0002efc47ae | f94f3926445d3cc75b9c7e22b032e4b2c666bd6f | ebi184/caffee2 | /tools/autograd/templates/python_torch_functions.cpp | C++ | cpp | 12,106 | permissive | // ${generated_comment}
// Python bindings for torch.* functions implemented through ATen.
//
// The functions are bound as static methods on a class
// torch._C._VariableFunctions which is also aliased as Variable._torch
// and also copied into 'torch' module.
#include <Python.h>
#include "python_torch_functions_di... |
194832d8f7e700cabd6a11689514daef0599c18e | 8f0e929064f53f8cce6c83f02a216aa152bbf7d9 | gkishard-workingboy/Algorithm-challenger | /动态规划/P1564.cc | C++ | cc | 1,074 | permissive | //
// Created by OFShare on 2019-09-16
//
#include <bits/stdc++.h>
const int maxn = 3e3 + 5;
int n, m;
int A[maxn];
// dp[i]: 前i个同学最少需要的机房数
int dp[maxn];
// 判断j + 1 ~ i 是否可以放进一个机房里,条件是题目所说的
// 要么全是膜拜的一位神牛,或者膜拜人数差不超过m
bool is_ok(int i, int j) {
int cnt1 = 0, cnt2 = 0;
bool is_consecutive = true;
for(int k... |
90beee6012b31154a88f7d3121772ecc326590c3 | 9160b9265454bd73c7d10eee4e224793d6b2ca58 | ArthurHeitmann/Pixelizer | /ColorAnalysis.cpp | C++ | cpp | 3,226 | no_license | #include "pch.h"
#include "ColorAnalysis.h"
#include <vector>
#include "IntensityDistribution.h"
#include <iostream>
#include <map>
#include "PixTools.h"
ColorAnalysis::ColorAnalysis(const char* imgPath, bool autoExecute, int downscalingResolution)
{
downscaleResolution = downscalingResolution;
img = CImg<unsigned c... |
b9f8f9ad1610fa11625aafae373da34d9a332a6e | cd1a0524529fadb25b9d37ccb71c47eb6191049d | kimbakcho/QCserver | /bnr_base_locgic.cpp | C++ | cpp | 7,132 | no_license | #include "bnr_base_locgic.h"
#include "mslotitem.h"
Bnr_base_locgic::Bnr_base_locgic(QObject *parentmslot,QObject *parent) :
QObject(parent)
{
this->parentmslot = parentmslot;
initflag=false;
}
bool Bnr_base_locgic::init(){
mslotitem *parent_item = (mslotitem *)parentmslot; //부모 위젯
datamap = new QM... |
1a6454069c7c2557b7b7eff190c218a1e155c0f4 | bff4e24283cca45203bdfff328e995b00e9aac57 | mhayter/Cpp | /10986_sending_email/create_10181_tests.cpp | C++ | cpp | 526 | no_license | #include <iostream>
#include <algorithm>
#include <cstdlib>
using namespace std;
int NUM_CASES;
int main(int argc, char*argv[]) {
if (argc !=2)
NUM_CASES = 100;
else NUM_CASES = atoi(argv[1]);
cout << NUM_CASES << endl << endl;
int grid[16]={0};
for(int i=0;i<16;i++) {
grid[i]=i;
}
for(int caseNum=1... |
314c070af85410e585c7b0ed0dfc0c7c14bb7703 | 18c0f62dbc3a89756df5ec25bc62e2d6d0fca84c | fivol/acos | /asm-arm_codegen_compileexpr-1/tests.cpp | C++ | cpp | 467 | no_license | //
// Created by boris on 31.10.2020.
//
#include "tests.h"
// Hear must be tests, but now they are not
std::vector<StackOperand> get_test_stack() {
return {
StackOperand(CONSTANT, 3),
StackOperand(CONSTANT, 4),
StackOperand(CONSTANT, 2),
StackOperand(MATH_OPERATOR,... |
b0699c329801716d9991990e7c4e8bd1bf76ee8a | 4d1b95e108c4e145480f9cf1794e613d1360bd0c | pchenik/notes_Cpp | /interim_table.cpp | C++ | cpp | 10,060 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
const long double eps = 1e-9;
struct Vertex {
Vertex() {}
Vertex(const valarray<ld> &arr, ld val) : ans(arr), maxi(val) {}
Vertex(const vector<pair<int, int> > &v, size_t len) : add_constr(v), ans(len) {}
exp... |
42e7b3bdc497206dc1ab6bfab49db9f7262a6466 | f476d44685c47c56f8807b9a3a9c4bfe19d1c710 | nicokla/Supaero_Matlab | /StageToronto/Gepshtein and Keller/patchMatch/generalizedPatchMatch_HellingerSquared.cpp | C++ | cpp | 13,156 | no_license | // -----------------
// Inputs :
// imageToComplete=[1 2 3;4 5 6]; = image1
// imageUsed=ones(4); = image2
// nbEtapes=5;
// k=2;
// good1
// good2
// -----------------
// Outputs :
// x_mat (Mx*My*k)
// y_mat (Mx*My*k)
// d_mat (Mx*My*k)
// returns distanceHellinger ^ 2
////////////////////////////
// [x,y,d]=pm(... |
0e660db3df56af96726e2dda596f502b321a8da4 | 87a037a33afdf098e6c3062ba0aac89fd3e0a3a8 | iankona/teardrop | /tools/Editor/PropertyGrid/PropertyGrid.cpp | C++ | cpp | 3,542 | permissive | /******************************************************************************
Copyright (c) 2015 Teardrop Games
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 wit... |
428386f2c833fba5a31b65ae9a6d93a421700349 | 19bb530ebe5ede84136f3e06c9f6e5824f7c164e | Ryanel/Akiros | /src/kernel/x86/textmode.cpp | C++ | cpp | 1,958 | no_license | #include <x86/textmode.hpp>
#include <stdint.h>
#include <string.h>
#include <x86/ports.hpp>
using namespace x86;
TextMode x86::textModeBase;
void TextMode::PutChar(char c, char attribute, int x, int y) {
int location = ((y * width) + x) * 2;
buffer[location] = c;
buffer[location + 1] = attribute;
}
vo... |
6a2d5fca49c126afe74419d7791cc5b7af877518 | 89c582dec160abe0d7f5bfce80d0b65311ff8f3f | Teaching-projects/SZE-ProgCpp-2018-E-recept | /recept/optiondialog.cpp | C++ | cpp | 1,751 | no_license | #include "optiondialog.h"
#include "ui_optiondialog.h"
OptionDialog::OptionDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::OptionDialog)
{
ui->setupUi(this);
Database *db = new Database();
items = db->getDrugs();
for(int i = 0; i < items.size(); i++){
ui->drugsList->addItem(items... |
fd8d01d1b95871ccd76b827b75366a98e03c4e91 | 90a9613175ef860dd43d25fc8132444d591a88bd | blackberry/Boost | /boost/interprocess/sync/detail/condition_algorithm_8a.hpp | C++ | hpp | 13,176 | permissive | //////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/i... |
6c2edb0decac788e5fb1d7c0934425f98cd0d828 | f35501c8733c047125edfcc51c03e91d542814de | Duke-Ocean-XPrize/Duke-xprize-24v-Hybrid | /Updated codes/my_Generator_control_Adafruit/myfunc.cpp | C++ | cpp | 4,832 | no_license | //Author: Yao and people before
//Email: yy123@duke.edu
//low-level function for generating pulses using adafruit shield
#include "myfunc.h"
#include "myGloab.h"
//extern Adafruit_PWMServoDriver pwm
//extern int percent;
//extern double pulseLength;
//extern char serialString[100];
//extern int MODE;
int percent = 0;... |
14febcf3573bfbd1214b7b5c9c175908bd79848b | 6b7ff134e8a8b1f93cdbfd2ba16247339aed20c7 | berber1016/chromium | /ui/gfx/mojom/gpu_extra_info_mojom_traits.cc | C++ | cc | 1,627 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/mojom/gpu_extra_info_mojom_traits.h"
#include "build/build_config.h"
#include "ui/gfx/mojom/buffer_types_mojom_traits.h"
namespace mojo... |
30e3d46d46235cc12e8c00a2fa27db4d642ef54e | 4dae0a973488b47f4d047e075c5ef10329ca293f | ozw4/Kratos | /applications/SolidMechanicsApplication/custom_elements/shell_elements/shell_thick_element_3D4N.hpp | C++ | hpp | 13,649 | permissive | //
// Project Name: KratosSolidMechanicsApplication $
// Created by: $Author: Massimo Petracca $
// Last modified by: $Co-Author: $
// Date: $Date: September 2013 $
// Revision: $Revision: 0.0 $
//
//
#if !defin... |
c028f90f602bf2789e1e81b0c288221ad043444b | 157bac2c5da746c618e5144d8443fbdb6b746c8e | Thomaw/Project-Euler | /200-300/241.cpp | C++ | cpp | 6,561 | permissive | #include <stdio.h>
/*
ans cand: 2
ans cand: 24
ans cand: 4680
ans cand: 26208
ans cand: 17428320
ans cand: 4320
ans cand: 8910720
ans cand: 91963648
ans cand: 197064960
ans cand: 20427264
ans cand: 88898072401645056
ans cand: 8583644160
ans cand: 57629644800
ans cand: 206166804480
ans cand: 1711600450... |
f662292ec24e5b9332672671893eedfec082f13f | 56cfd0e83ff0e73a5fd21fa3209a57023b4c2db0 | Nyckel/Gangsta-Hacker-Simulator | /extlibs/build/TGUI/src/Widgets/Label.cpp | C++ | cpp | 15,426 | no_license | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TGUI - Texus' Graphical User Interface
// Copyright (C) 2012-2017 Bruno Van de Velde (vdv_b@tgui.eu)
//
// This software is provided 'as-is', without any express or implied warranty.
/... |
a9f101a810ce245c2dfc4c8cc2d4aeeedd646904 | 3e780f6b116887a8f9ca08ac25cfbc5bd2e4e4d1 | allisonkundrik/examples | /io/get/main.cpp | C++ | cpp | 570 | no_license | /*
* File: main.cpp
* Author: peter
*
* Created on February 5, 2014, 9:42 PM
*/
#include <iostream>
/*
*
*/
int main(int argc, char** argv) {
char buf[10];
char c;
while ( std::cin)
{
std::cin.get( buf, 10); // newline is terminator
/* get() always leaves terminator in the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.