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 |
|---|---|---|---|---|---|---|---|---|
9868d2b6191b4dafb83a48504e5765bca1660599 | 52ceb3bc586b69089f91bfab1e75d1a5dff43bb5 | caomw/cuc_double | /lib/magma-2.2.0/testing/testing_dgesv_nopiv_batched.cpp | C++ | cpp | 8,380 | no_license | /*
-- MAGMA (version 2.2.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date November 2016
@generated from testing/testing_zgesv_nopiv_batched.cpp, normal z -> d, Sun Nov 20 20:20:38 2016
@author Mark Gates
*/
// includes, syst... |
11cfff89679d62157c58a16630cdb749bddddf45 | faccf16c8fc189f9093dd8192ba6fc0bc8285f93 | GJnghost/ACM-Template-by-forever97 | /Math/Primitive-Root.cpp | C++ | cpp | 1,256 | no_license | /*
求原根
*/
int q[10000];
int pow(ll a, int b, int P) {
ll t = 1;
for (; b; b >>= 1, a = (ll)a * a % P)
if (b & 1) t = t * a % P;
return t;
}
int getG(int n) {
int i, j, t = 0;
for (i = 2; (ll)i * i < n - 1; i++)
if ((n - 1) % i == 0) q[t++] = i, q[t++] = (n - 1) / i;
for (i = ... |
6d3a28c97885d2cccffd0bbc49ebc5380fc7cb57 | abaad7ade9215e7d51aa1b787bfeb2531e09230a | Nodmgatall/Uni_HH_Projekt2016_Particle_Simulation | /src/main/algorithms/AlgorithmStoermerVerletLennardJones.cpp | C++ | cpp | 14,455 | no_license | /*
* AlgorithmStoermerVerletLennardJones.cpp
*
* Created on: Feb 10, 2017
* Author: Oliver Heidmann <oliverheidmann@hotmail.de>
* Author: Benjamin Warnke <4bwarnke@informatik.uni-hamburg.de>
*/
#include "AlgorithmStoermerVerletLennardJones.hpp"
AlgorithmStoermerVerletLennardJones::AlgorithmStoermerVerl... |
551c653aa12bd882b1e2b630001459fb02384365 | c17dc1a759d0f6e61245ad28a1a9e4f3ddd5a15e | fish-ball/acm.zju.edu.cn | /11XX/zoj.1113.src.1.cpp | C++ | cpp | 291 | no_license | #include <iostream>
using namespace std;
int main() {
cout.precision(9);
cout << "n e\n- -----------\n";
long double ans = 1, fct = 1;
for(int i = 0; i < 10; ) {
if(i > 2) cout.setf(ios::fixed);
cout << i << " ";
cout << ans << endl;
ans += (fct /= ++i);
}
}
|
1f2534495fd75e0dfdabd69087db3af9adcf41f0 | cd793910f691c2d3148b60b428b5a375a2d87cb1 | parasyte/nintendulator | /mappers/tags/release-4-2/src/iNES/mapper024.cpp | C++ | cpp | 4,438 | no_license | /* Nintendulator Mapper DLLs
* Copyright (C) 2002-2010 QMT Productions
*
* $URL$
* $Id$
*/
#include "..\DLL\d_iNES.h"
#include "..\Hardware\Sound\s_VRC6.h"
#define IRQ_CYCLES 341
namespace
{
u8 IRQenabled, IRQcounter, IRQlatch;
s16 IRQcycles;
u8 PRG[2], CHR[8];
u8 Mirror;
u8 SwapAddr[4];
void... |
b8aa0a70ae0ad3caf8b258d4bdb0067ca71bcc94 | e9254ce926263a6c4f06e4c37d77d309cb3e6536 | fatmingwang/FM79979 | /Src/FM79979Engine/Core/GameplayUT/Physic/Bullet/BulletCollision/Gimpact/btGenericPoolAllocator.cpp | C++ | cpp | 6,783 | no_license | /*! \file btGenericPoolAllocator.cpp
\author Francisco Leon Najera. email projectileman@yahoo.com
General purpose allocator class
*/
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
This software is provided 'as-is', without any e... |
bbb709f296c36c094b232b2f6e32c332588ef622 | 9ddf14c9ebafd3c0bae82e6c8804e1db3c3f5827 | Zhang-Ke-97/SimpleCppProjects | /access/access.cpp | C++ | cpp | 2,455 | no_license | #include <iostream>
class A {
public:
void a1(){
std::cout << "a1" << std::endl;
}
virtual void vt(){
std::cout << "a" << std::endl;
}
private:
void a2(){
std::cout << "a2" << std::endl;
}
protected:
void a3(){
std::cout << "a3" << std::endl;
}
};
class B... |
f8d162db268d1f899e9f393adb17609faefdd1a8 | af9f3b6f94c74566e7ff7c3ac5dcca6c195764e2 | lukka/chromium | /chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc | C++ | cc | 123,650 | 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 "chrome/browser/ui/webui/settings/settings_localized_strings_provider.h"
#include <string>
#include "base/command_line.h"
#include "base/featur... |
8976389500c273c5f18f438085fff6a3d10263d3 | 161b716f157ada5268a81af465253dfdea26ce18 | rlcook0/xenia | /src/xenia/gpu/d3d11/d3d11_geometry_shader.cc | C++ | cc | 7,756 | no_license | /**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. ... |
4c7f8f3ce63ca87432b39f6c47388d91f30b9cb9 | 11f8e5fae0f6680f503fadcadeaec16e683da137 | ashanka234/interviewPrep | /Tree/checkHeightBalanced.cpp | C++ | cpp | 1,036 | no_license | #include<iostream>
#include<algorithm>
using namespace std;
struct Node{
int data;
Node *left;
Node *right;
};
Node *newNode(int d) {
Node *temp = new Node;
temp->data = d;
temp->left = temp->right = NULL;
return temp;
}
int height(Node *root) {
if(root==NULL)
return 0;
... |
ba4630e072f0b6024c4c97407395ffa140b3da77 | be060086208c5e1f90c7d76a2c6dddbde81fe288 | svn2github/angelscript | /tags/2.26.2/sdk/tests/test_feature/source/test_registertype.cpp | C++ | cpp | 55,278 | no_license | #include "utils.h"
namespace TestRegisterType
{
void DummyFunc(asIScriptGeneric *) {}
bool TestHandleType();
bool TestIrrTypes();
bool TestRefScoped();
bool TestHelper();
int g_widget;
int *CreateWidget()
{
return &g_widget;
}
bool Test()
{
bool fail = TestHelper();
fail = TestHandleType() || fail;
fail = T... |
4cd1571e425f0a561974ef1862d07dfc26c68528 | cb9032321774bec628d48227ff1162ec5bfbe0d5 | realyashnag/Competitive-Coding-Solutions | /Codechef/SNAPE.cpp | C++ | cpp | 265 | no_license | #include <iostream>
#include <math.h>
using namespace std;
int main()
{
double b,l;
int n;
cin >> n;
for (int a=0; a<n; a++)
{
cin >> b >> l;
cout << pow((l*l-b*b),0.5) << " " << pow((l*l+b*b),0.5) << endl;
}
}
|
a140596c95a42b2cf6b6711625dc2b6ee2f67343 | 21578cea3aa4edff5a5ef90576b2225ba424e9d1 | imdark/chromium | /components/gwp_asan/client/guarded_page_allocator_unittest.cc | C++ | cc | 8,590 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/gwp_asan/client/guarded_page_allocator.h"
#include <array>
#include <set>
#include "base/bits.h"
#include "base/process/process_met... |
3654c6332b7955b85b393c09210923380c506bda | 2b3eef1dad47191e4b5ec4bbea98d4c89ea685aa | tangjz/Three-Investigators | /2017-08-15/C-2.cpp | C++ | cpp | 1,197 | permissive | #include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mkp make_pair
#define fi first
#define se second
#define ll long long
#define M 998244353
#define all(a) a.begin(), a.end()
int T, n, m;
char mp[1010];
bool ban_h[1010][2], ban_c[1010][2];
int main(){
freopen("1003.in", "r", stdin);
freopen("... |
56bd9ebb6f413068747bf9aef40c1facd8cbc0db | 61010b24c25ab7fd6988154ff8e642fa65f9ec93 | the-badcoder/UVA-Solutions | /458.cpp | C++ | cpp | 260 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
char s[1000];
int len, i;
while(scanf("%s", &s)==1){
len = strlen(s);
for( i = 0; i < len; i++){
printf("%c", s[i] - 7 );
}
printf("\n");
}
return 0;
}
|
79522bb835420230ffeda06e8e0c2b94284f243c | 6d2c0a330ed3358d75f76c2a765a7835b90e7b87 | mlz8/Codeforces-mysolutions | /2A.cpp | C++ | cpp | 2,441 | no_license | // my first program in C++
#include <iostream>
#include <map>
#include <string>
using namespace std;
class Pair {
public:
Pair(int x, int y) : first(x), second(y) {}
Pair() : first(0), second(0) {}
Pair(int x) : first(x), second(0) {}
int first, second;
};
void toString(map<string, Pa... |
7ea8e237b91a946a81cab166490ee3cf52d2e1bf | 967dd5f1c0999a9e4241db2b1de62268f5f183c5 | SelyanKab/chromium | /ui/platform_window/x11/x11_window.cc | C++ | cc | 33,674 | 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 "ui/platform_window/x11/x11_window.h"
#include "base/strings/string_number_conversions.h"
#include "base/trace_event/trace_event.h"
#include "bu... |
50c1c0210b578634373e59b20ec09d91477c8887 | b5af1f314e9afaec56d24b1de6d14e2358bd2583 | bcrafton/Algorithms3 | /5/graphcoloring-src/hw5GraphColor.cpp | C++ | cpp | 6,414 | no_license | //============================================================================
// Name : ExhaustiveGraphColor.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================... |
1cc5db74539c436adfd48a87d785f8a9ddec8206 | 379f7f1a5a400558491f25e9265be0b2b9031d3c | angryfred/VC4C | /src/normalization/MemoryAccess.cpp | C++ | cpp | 45,299 | permissive | /*
* Author: doe300
*
* See the file "LICENSE" for the full license governing this code.
*/
#include "MemoryAccess.h"
#include "../InstructionWalker.h"
#include "../Module.h"
#include "../Profiler.h"
#include "../intermediate/IntermediateInstruction.h"
#include "../intermediate/operators.h"
#include "../periphery... |
f0a8187429f7ccb894b0da4503dda92c81cec79e | 02c50f574ddece0f5aad96d4b8e13c3d61d18663 | billuo/GLSLSpec | /src/Console.cpp | C++ | cpp | 15,368 | no_license | /**
* @File Console.cpp
* @author Zhen Luo 461652354@qq.com
*/
#include <Console.hpp>
#include <Window.hpp>
#include <Math/Math.hpp>
#include <OpenGL/Common.hpp>
#include <Sandbox.hpp>
#include <iostream>
#include <fstream>
#include <regex>
std::unique_ptr<Console> console;
Command::Command(std::string name, std:... |
285af017711470d75cec36a0ffa5b4cca6fc1187 | 32aeb08b60a143d06a65bef5518bb5f30615fc15 | phg1024/CSCE647 | /sourcecode/CUDARayTracer/CUDARayTracer/extras/aabbtree/aabbtree.cpp | C++ | cpp | 13,218 | no_license | #include "aabbtree.h"
#include <fstream>
#include <queue>
#include <list>
using std::queue;
using std::list;
using std::ofstream;
using std::endl;
namespace aabbtree {
bool AABB::intersectTest(const float3 &origin, const float3 &dir, const float3 &invDir)
{
float3 rdirinv = invDir;
rdirinv.x = (dir.x==0)?FLT_MAX... |
4b1f379d97b8498a77eaed25f299be36c5aa9227 | 142f684fe8b0f0294ea81e55d7c5e93ee1cfabfd | peytonthehuman/bitmapIO | /bmp_dataconv.cpp | C++ | cpp | 977 | no_license | #include "iobmp.h"
// Reverse Data Conversion ========================================================================
void bmpFile::convertPixel2Data_BW() {
for(int i = 0; i < pixelArray.size(); i++) {
int r = pixelArray[i].rgbRed;
int g = pixelArray[i].rgbGreen;
int b = pixelArray[i].rgbBlue;
double bw =... |
6e2723520cdc1cb253ffe43c84e3fb0c96df5e0e | f51db6b2f099150d2e7b4dca1747a17a20a93f7b | EnzoNodes/ENZO | /src/test/librust/transaction_builder_tests.cpp | C++ | cpp | 12,953 | permissive | // Copyright (c) 2016-2020 The ZCash developers
// Copyright (c) 2020 The PIVX developers
// Copyright (c) 2021 The ENZO developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php.
#include "test/librust/sapling_test_fixture.h"
... |
ea1d1d7a868ed24b0ecb1550d77a2d7a153e4d54 | ac026a3ab2fff8991e42085419675efa8e3f4084 | ProjSEED/gdal | /gdal/frmts/fits/fitsdataset.cpp | C++ | cpp | 58,177 | permissive | /******************************************************************************
*
* Project: FITS Driver
* Purpose: Implement FITS raster read/write support
* Author: Simon Perkins, s.perkins@lanl.gov
*
******************************************************************************
* Copyright (c) 2001, Simon... |
60d3fff8915092d0ef5657a5c1b1ea3edd43c225 | d100b85a807cbc6e3a47cb9dfcd3d516361db61d | eightys3v3n/particleSimulator | /structures.cpp | C++ | cpp | 477 | no_license | #include <SFML/Graphics.hpp>
#include "structures.hpp"
extern sf::Color particleColour;
extern long long globalRadius;
ParticleState::ParticleState()
{
direction.x = 0;
direction.y = 0;
direction.angle = 0;
position.x = 0;
position.y = 0;
velocity = 0;
acceleration = 0;
};
Particle::Particle()
{
sha... |
90dc476dab630a0232f56a8a89a3c525382326ac | f4c261bff3c3ee646ab0866259847bef68da0331 | edwinsolisf/Voxel | /Voxel/src/Renderer/Mesh.cpp | C++ | cpp | 795 | no_license | #include "Mesh.h"
std::shared_ptr<VertexArray> Mesh::_vao;
bool Mesh::_init = false;
Mesh::Mesh(const std::vector<Vertex>& vertices, const std::vector<Index>& indices, const std::vector<std::string>& textures)
://_vao(std::make_shared<VertexArray>(Vertex::GetLayout())),
_vbo(std::make_shared<VertexBuffer>(vertices... |
100d2697a3e454a3d89350656e663f5984908469 | 3eb222afb2e7d8736ca013a6bd86760150f6c723 | bluekyu/panda3d_imgui | /panda3d_imgui/panda3d_imgui.cpp | C++ | cpp | 15,621 | permissive | /**
* MIT License
*
* Copyright (c) 2018-2019 Younguk Kim (bluekyu)
*
* 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... |
b4f36a7a4d9180cd02d49aec00fa56964bd5cb3f | 36071f94918712e4c5662ae3afed1a7a485d492a | NCAR/aircraft_nc_utils | /deprecated/n2asc/Xerror.cc | C++ | cc | 1,773 | permissive | /*
-------------------------------------------------------------------------
OBJECT NAME: Xerror.c
FULL NAME: Show Error Box with Message
DESCRIPTION: CreateError should be called once where you initialize
your X stuff. To use just call ShowError(ErrMsg)
INPUT: String to Display.
OUTPUT: Error message in its o... |
9f6dc6076c1273199ae65c7e33d4c57a66f7beb9 | e8758f03640a69b4b1130992addbe3d2a3edd8f6 | guoqiangqi/petsc | /include/petsc/private/cupminterface.hpp | C++ | hpp | 13,757 | permissive | #ifndef PETSCCUPMINTERFACE_HPP
#define PETSCCUPMINTERFACE_HPP
#include <petsc/private/deviceimpl.h>
#include <petsc/private/traithelpers.hpp>
#if defined(__cplusplus)
#if !PetscDefined(HAVE_CXX_DIALECT_CXX11)
#error CUPMInterface requires c++11
#endif // PetscDefined(HAVE_CXX_DIALECT_CXX11)
namespace Petsc {
// enu... |
e853a72994129bbc8175b6aa6442f1301f86f06c | f26386ab17dedfe2c09555bfa3487cb28f6e4a39 | Ant0nin/SofaQtQuick | /applications-dev/plugins/SofaQtQuickGUI/Manipulator.cpp | C++ | cpp | 5,076 | no_license | /*
Copyright 2015, Anatoscope
This file is part of sofaqtquick.
sofaqtquick 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 3 of the License, or
(at your option) any later version.
sofaqtquick is... |
55a19e382b2a92d586e0602656f1ac9d3b712602 | 00ec63a758331443cf7f3b3f4dcdfc74ee6ff377 | imulan/procon | /codeforces/846A.cpp | C++ | cpp | 900 | no_license | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pa... |
4b3249ad2a4f0597f40af63384284d372a8878e0 | 5326c665bf093d0d2e9e3adf5b1725da8d409d64 | vslavik/poedit | /deps/boost/libs/proto/test/mem_ptr.cpp | C++ | cpp | 8,516 | permissive | ///////////////////////////////////////////////////////////////////////////////
// mem_ptr.hpp
//
// Copyright 2009 Eric Niebler. 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)
#include <boost/mpl/print.hpp>
#i... |
bfe39444ed21e0f9cb5f6d67ea46e735d7c83ae6 | 62ed1c40dde204cb68058a121e031e479c326ee5 | junlong-gao/recreations | /code_practise/leetcode/00375.cpp | C++ | cpp | 1,023 | no_license | #define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include <vector>
#include <deque>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
namespace{
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
st... |
3fe77d5db96a808a986805c219035fd8f7bba950 | f05e8646e4ab92e1ff8a6d07cdbf9d7d0f3bf513 | raelgc/EmulationStation | /es-core/src/MameNames.cpp | C++ | cpp | 3,559 | permissive | #include "MameNames.h"
#include "resources/ResourceManager.h"
#include "utils/FileSystemUtil.h"
#include "Log.h"
#include <pugixml.hpp>
#include <string.h>
MameNames* MameNames::sInstance = nullptr;
void MameNames::init()
{
if(!sInstance)
sInstance = new MameNames();
} // init
void MameNames::deinit()
{
if(sIn... |
03377a8b2b9ec919f49e36c0ec399c42c4c6862f | ab8cd7917b340bb2d369f1a2dc518e63e8617f00 | takahiro-kubota/AtCoder_CPP | /mylib/mint.cpp | C++ | cpp | 2,184 | no_license | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;
... |
471b3c10466ab23c0703e20e9372481394285aff | c7a8fca3ddeb87cbf34af4a684d64089665f4a1f | SkyWalker2099/- | /day4/day4code/blocks.cpp | C++ | cpp | 1,123 | no_license | #include<iostream>
using namespace std;
long long pow(int n,int m){
if(n == 1 || m == 0)
return 1;
if(m == 1)
return n;
long long result = 1;
long long x = n;
/*while(m--){
result*=n;
if(result>10007){
result%=10007;
}
}*/
int i = 2... |
62d9bc71a1a3aea21e403c7742617b836d5cd78e | bfaa3138d2e76137bfe01dd454b9a318d268a758 | maoxuli/dns | /dns/ResourceRecord.cpp | C++ | cpp | 3,173 | no_license | // ***************************************************************************
//
// Copyright (c) 2010, MAOXU LI. All rights reserved.
//
// This copy of software is provided to you under the terms of the GNU General
// Public License version 2 as published by the Free Software Foundation.
// Redistribution and use i... |
2137ca25eebe1a23244d3764954d8072b598ca7c | 0b1c2a2eb29c7b60a5856814cb79e8b4bfc0bdb5 | mauve/jni | /jni/src/value.cpp | C++ | cpp | 737 | no_license |
#include <jni/raw/value.hpp>
namespace jni {
namespace raw {
value to_value(bool v) {
value r;
r.z = static_cast<std::uint8_t>(v);
return r;
}
value to_value(std::int8_t v) {
value r;
r.b = v;
return r;
}
value to_value(std::uint16_t v) {
value r;
r.c = v;
return r;
}
value to_value(std::int16_t... |
cb8846f97d220957f738d0bc9804be6131fd3e10 | 0276e2e785019a8ec3b07c820f4f72a95edd9708 | metux/chromium-suckless | /chrome/browser/policy/network_prediction_policy_handler.cc | C++ | cc | 3,252 | 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/policy/network_prediction_policy_handler.h"
#include "base/values.h"
#include "chrome/browser/net/prediction_options.h"
#include... |
6a02eef071f7b181ad9f93ffb615d62083da978b | 09e3dbbeea7414a1c16ee5219913ff2aa66f6a80 | sauravg/pwsafe | /src/ui/Windows/OptionsMisc.cpp | C++ | cpp | 14,754 | permissive | /*
* Copyright (c) 2003-2022 Rony Shapiro <ronys@pwsafe.org>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
// OptionsMisc.cpp : i... |
21552277a9431ddede81e56e6aa6bd6eac460925 | a7d55cbdc9ab7c3d45b1bef5e2efe55d7ef7f872 | LouJo/pdraw | /libpdraw/src/pdraw_session_metadata.cpp | C++ | cpp | 2,638 | no_license | /**
* @file pdraw_session.cpp
* @brief Parrot Drones Awesome Video Viewer Library - session metadata
* @date 05/11/2016
* @author aurelien.barre@akaaba.net
*
* Copyright (c) 2016 Aurelien Barre <aurelien.barre@akaaba.net>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or wi... |
100d3fce60a3e58ec8021e3068ee5b6d0cab5598 | e310d9731c06fc2a5f8e254e08554bd810447b2b | njoy/ACEtk | /python/src/block/TabulatedAngularDistributionWithProbability.python.cpp | C++ | cpp | 3,162 | permissive | // system includes
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
// local includes
#include "ACEtk/block/TabulatedAngularDistributionWithProbability.hpp"
#include "views.hpp"
#include "definitions.hpp"
// namespace aliases
namespace python = pybind11;
namespace block {
void wrapTabulatedAngularDistributi... |
4151f9ba338ca472107e84d92f0dfab077c74615 | 1fdaa9e44035a055cf6326852471688bc291afac | KillerGoldFisch/Vulkan-Cookbook | /Library/Source Files/04 Resources and Memory/12 Copying data between buffers.cpp | C++ | cpp | 1,921 | permissive | // 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, publish, distribute, sublicense,
// and / or se... |
52846c26108d1a67f30083894208a10beeebb419 | 8d1de17d8e031e3d516e0239f8e37562b9baa9ea | thiz11/mediatek | /custom/vegetafhd/hal/lens/fm50af/lens_para_DW9714A.cpp | C++ | cpp | 12,122 | no_license | /********************************************************************************************
* LEGAL DISCLAIMER
*
* (Header of MediaTek Software/Firmware Release or Documentation)
*
* BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AN... |
99b370be02fc44670865f3d966354986cf7ae344 | fed3f5cbce3eb9efff9dce24e22ad7013afe04ae | Pritilender/Glittering-glamour | /src/headers/Triangle.hpp | C++ | hpp | 454 | no_license | #ifndef GLITTER_TRIANGLE_HPP
#define GLITTER_TRIANGLE_HPP
#include "includes.hpp"
#include "ShaderProgram.hpp"
#include "Drawable.hpp"
class Triangle : public Drawable {
public:
Triangle();
~Triangle();
void draw() override;
private:
float vertices[9] = {
-0.5f, -0.5f, 0.0f, // left
0... |
71dd0bf6a35aa4046c1241c10697f3789c36c99b | fbe634dec2b85b297b2463bbf9d3943f0788d3d1 | janfranco27/TheProyect | /ManagerM/debug/moc_ui_module_colaboradores.cpp | C++ | cpp | 3,343 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'ui_module_colaboradores.h'
**
** Created: Thu Jul 4 21:40:34 2013
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
************... |
004a9c7343b801c8857291c2463494e184dbdf1e | c3b826fe8db4842fce3edb28270708a215698d32 | WorldEditor50/Qt-Shared | /usb/UsbDevice.cpp | C++ | cpp | 12,589 | no_license | #include "UsbDevice.h"
UsbDevice::UsbDevice():
devHandle(nullptr),
usbContext(nullptr),
pThread(nullptr)
{
}
UsbDevice::~UsbDevice()
{
stopListening();
if (pThread != nullptr) {
delete pThread;
pThread = nullptr;
}
release();
}
static void detectDevice... |
1cbea3a5535558d99a005c23a64e9ce9ea41fb6a | 13f3609764206d90ed0f64aad5c1e5dfca175a30 | MinchaoZhu/CS6378-Advancend-Operating-System | /project1/src/core/client_manager.cpp | C++ | cpp | 548 | no_license | #include "mynet/client_manager.h"
#include "util/config_parser.h"
#include <malloc.h>
#include <thread>
ClientManager::ClientManager(){}
// server id
ClientManager::ClientManager(int id) {
int n = hostsConfig[id].neighbors.size();
clients = std::vector<Client>(n);
counters = (int*)malloc(sizeof(int) ... |
3079fdddf348a664c0158ef466cc0a2ca0fbae02 | 6d1a86a222daffac3956afd03cf7fe80a81e05e1 | leefige/OpenGL-homework | /hw6/hw6/obj.hpp | C++ | hpp | 1,931 | permissive | #ifndef CG_OBJ_H_
#define CG_OBJ_H_
#include <exception>
#include <iostream>
#include <sstream>
#include <vector>
#include <glad/glad.h>
namespace cg
{
template<typename T>
struct Vec3
{
T v[3];
Vec3() : v{0, 0, 0} {}
Vec3(T v1, T v2, T v3) : v{v1, v2, v3} {}
explicit Vec3(glm::vec3 vec) : v{vec.x, vec.y, vec.... |
c37ad7cf2f89757dc2812b469a8a35b9ad1b9330 | 040fdbfd4cda6336019d9723b77be4987a95d0c7 | SimKyuSung/Algorithm | /BeakJoon C++ Algorithm/1747.소수and팰린드롬.cpp | C++ | cpp | 568 | no_license | /// 1747.소수&팰린드롬
#include <iostream>
#include <vector>
#define endl '\n'
using namespace std;
const int MAX = 1003002;
bool p[MAX];
vector <int> x;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
for (int i = 2; i < MAX; i++) {
if (!p[i]) {
for (int j = i; j < MAX; j += i)
p[j] = 1;
int tmp1... |
011c8914dae6ba7776284e32465f80658d165666 | 5d37a1e1f1cfef7ba452098bdfe345ab7f78e200 | KeinPan/RB_Tree | /project/main.cpp | C++ | cpp | 2,474 | no_license | #include <iostream>
#include <fstream>
#include "rbtree.h"
#include "stdlib.h"
using namespace std;
//temp, every element is a POINTER to a treenode
vector<treeNode *> input;
int main(int argc, char * const argv[])
{
string command = "";
int temp1 = -1; // To record ID
int temp2 = -1; ... |
6fb26267fcebd15152ad7318c933a17b2f077782 | 3bc5f64edc5a95f8bda1784da18417bcc24f69d7 | oconnellamethyst/csci1113 | /C_C++/examples/Hubbard/Examples/Ex1009.cpp | C++ | cpp | 1,095 | no_license | // Programming with C++, Second Edition, by John R. Hubbard
// Copyright McGraw-Hill, 2000
// Example 10.9 on page 240
// A copy constructor
#include <iostream>
using namespace std;
class Ratio
{ public:
Ratio(int n=0, int d=1) : num(n), den(d) { reduce(); }
Ratio(const Ratio& r) : num(r.num), den(r.den) ... |
3eda8512487cbf7894df017f2b26f33312d2dda1 | a8e5e9ecdb78f4af0e549b0e0f34555bfbd969f8 | lja9702/JinAh-BOJ | /BaekjoonOnline/2346_bombBallon.cpp | C++ | cpp | 584 | no_license | #include <cstdio>
using namespace std;
int n, a, arr[1001], cur = 1, check[1001];
int main(){
scanf("%d", &n);
for(int i = 1;i <= n;i++)
scanf("%d", &arr[i]);
check[1] = 1;
printf("1 ");
int tar = arr[1];
for(int i = 1;i < n;i++){
int cnt = 0;
if(tar > 0){
while(cnt < tar){
cur++;
... |
c9beeeaf610cc0124d61d0bbd9f9cb368a28e7f1 | 909b374d1053a279bc2eb1ce4bcdf9d12ecdcc67 | stewkk/sa2 | /src/main.cpp | C++ | cpp | 315 | no_license |
#include "main.h"
wxIMPLEMENT_APP(App);
App::App() {
}
App::~App() {
}
bool App::OnInit() {
std::setlocale(LC_ALL, "ru_RU.UTF-8");
frame_main = new MyFrameMain(nullptr);
frame_main->Show();
frame_main->SetIcon(wxIcon(icon));
frame_main->wxlistbox_anime_list_update();
return true;
}
|
b2d762776a9ebb6b142f8ae61f2ebed4094007fc | 8cc8ca54dc066456e5d4d6afb8a72e22d6c31a43 | FrankCipriano/Size_of-en-Cpp | /size_of.cpp | C++ | cpp | 975 | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
int main(){
float arreglo[20];
cout<<"El numero de bytes en el Arreglo es: "<<sizeof(arreglo);
cout<<"\nChar :"<<sizeof(char);
cout<<"\nshort :"<<sizeof(short);
cout<<"\nint :"<<sizeof(int);
cout<<"\nlong ... |
b8ea3b5407efb9946df3379b79c45c539231f2c0 | 2faf269b20f48b55f17a9f861f5ee4e4463681ac | skyline75489/leetcode | /length-of-last-word.cpp | C++ | cpp | 494 | no_license | class Solution {
public:
int lengthOfLastWord(const char *s) {
long len = strlen(s);
int result = 0;
const char *ptr = s + len - 1;
// 从后往前扫描,遇到空格跳过
while (*ptr == ' ') {
ptr -- ;
}
// 碰到最后一个字符,继续往前扫,碰到空格或字符串开头结束
while (*ptr != ' ' && ptr !... |
fbaacfddd6656c755617d0948c387e7b3ac6e7e6 | 012741aa8cb23994b8a9c7363ef3096098a5b95f | anish-n/sonic-swss | /cfgmgr/macsecmgr.cpp | C++ | cpp | 20,447 | permissive | #include "macsecmgr.h"
#include <exec.h>
#include <shellcmd.h>
#include <swss/stringutility.h>
#include <swss/redisutility.h>
#include <boost/algorithm/string/predicate.hpp>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <string.h>
#include <error.h>
#include <string>
#i... |
943e826783b8e3b73cb0d16e8f5289f1ef457c18 | 7aa1510fda6a31baef5ef7ce713ce9eecf91433d | AlopexMM/simpleList | /src/main.cpp | C++ | cpp | 480 | no_license | #include "include/list.h"
#include "include/database.h"
int main (int argc, char *args[]) {
if (argc > 1)
{
Database data;
List simpleList;
simpleList.name = string(args[1]);
simpleList.mainList = data.read();
simpleList.find_userList();
simpleList.print... |
12cfb8ab11fcc257f4c035932dd46eaa883fbe40 | 1c1cd6fba19110114d343c73a3d20c8be752c621 | Projet-guillaume/Projet-tek | /cpp_rush3_2019/include/IMonitorModule.hpp | C++ | hpp | 227 | no_license | /*
** EPITECH PROJECT, 2020
** Kernel
** File description:
** Kernel
*/
#pragma once
#include <string>
#include <iostream>
#include <stdlib.h>
#include <time.h>
class IMonitorModule {
public:
virtual void update() = 0;
};
|
7541cdf2355f94bfce9352660ac575af9686ac1c | 55f0cd9574b1d790fd309e770b5b8eb59188e6da | monroid/openvino | /runtime/bindings/python/src/compatibility/pyngraph/ops/util/binary_elementwise_arithmetic.cpp | C++ | cpp | 586 | permissive | // Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "ngraph/op/util/binary_elementwise_arithmetic.hpp"
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "pyngraph/ops/util/binary_elementwise_arithmetic.hpp"
namespace py = pybind11;
void regclass_pyngraph_... |
2996b1196538be8640170b8469542ecf457e574b | d09f80d79f240061336df5d46f7e3e6bd4cb3a33 | MobilePayCoin/MobilePayCoin | /src/qt/optionsmodel.cpp | C++ | cpp | 15,058 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018-2019 The MCPCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/... |
6ce0bf93137fb0b4ec6ca25a5193e4e41294894f | 6174bd3394224ae10e67d3f4f5d427a28d44a1d6 | rela0426/delphi | /lib/Indicator.cpp | C++ | cpp | 1,023 | permissive | #include <fmt/format.h>
#include <sqlite3.h>
#include <string>
#include <vector>
#include <iostream>
#include "Indicator.hpp"
#include <range/v3/all.hpp>
using namespace std;
namespace rs = ranges;
void Indicator::set_default_unit() {
sqlite3* db;
int rc = sqlite3_open(getenv("DELPHI_DB"), &db);
if (rc) {
f... |
3f09b9430b93b1d070634755feb0b151677e6660 | 10d2b35906480ea06399a08e30373acc6697cef2 | ThomasHauth/HiggsAnalysis-KITHiggsToTauTau | /src/Producers/TauSpinnerProducer.cc | C++ | cc | 10,094 | no_license |
#include "HiggsAnalysis/KITHiggsToTauTau/interface/Producers/TauSpinnerProducer.h"
#include "Artus/KappaAnalysis/interface/KappaProduct.h"
void TauSpinnerProducer::InitGlobal(global_setting_type const& globalSettings)
{
// interface to TauSpinner
//Reading the settings from TauSpinnerSettings.json in following ord... |
c433c3a352d5c728397f1a8f464713a115074b38 | 886d39489422f0a5628f1705b2a205041353fa57 | MiheeJo/Macros | /SuImpByDirectory.cpp | C++ | cpp | 8,153 | no_license | #include <TSystem.h>
#include <TROOT.h>
#include <TDirectory.h>
#include <TTree.h>
#include <TKey.h>
#include <TH1.h>
#include <TH2.h>
#include <TFile.h>
#include <TCanvas.h>
#include <TLine.h>
#include <TPave.h>
#include <TPaveStats.h>
#include <TStyle.h>
#include <TText.h>
#include <iostream>
#include <algorithm>
us... |
554664fd423a5a8a216a5e859123e14e503e268c | 10f34a076377203f16fa5ed6d1c4da4c141ed718 | readex-eu/scorep_plugin_x86_energy | /src/x86_energy_plugin.cpp | C++ | cpp | 7,290 | permissive | /*
* Copyright (c) 2016, Technische Universität Dresden, Germany
* 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... |
f77ffbd7ab9e1895a9527f4fde0b9673f26fcbe6 | 69435365023137a88a00d429e3114d3b02fa0c33 | msk4862/DS-Algo | /Practice/DP/2_LCSProbs/1_longestSubstring.cpp | C++ | cpp | 859 | no_license | // https://www.geeksforgeeks.org/longest-common-substring-dp-29/
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define FASTIO \
ios_base::sync_with_stdio(false); \
cin.tie(nullptr); \
cout.tie(nullptr);
int longest_bu(string s1, string s2) {
int n1 = s1.size(), n2 = s2.size();
... |
b6c22884076adcfa0306b5ed3b33c5677b022e6d | 36a78aff8b5024e268f0d494e30f051e9e3b69b4 | zanariah8/Programming_Assignments | /Chapter 11/CH_11_drinkMachine.cpp | C++ | cpp | 1,630 | no_license | #include <iostream>
using namespace std;
struct Machine {
string drinkName;
double cost;
double numOfDrinks;
};
void display(Machine[]);
int main(int argc, char *argv[])
{
Machine drinks [] = { {"Cola", .75, 20}, {"Root Beer", .75, 20}, {"Lemon-Lime", .75, 20}, {"Grade Soda", .80, 20},
{"Cream Soda",... |
a263e37745e1aa53a3c8ac2fd1a9183263097926 | 32e3a3efa0c48084628fa5dc1130bf00762e2542 | YaronKoller/envoy | /source/server/listener_impl.cc | C++ | cc | 36,610 | permissive | #include "server/listener_impl.h"
#include "envoy/config/core/v3/base.pb.h"
#include "envoy/config/listener/v3/listener.pb.h"
#include "envoy/config/listener/v3/listener_components.pb.h"
#include "envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.h"
#include "envoy/network/exception.h"
#include "en... |
bef6e5d1288ce94955e0bdd3b4a39c21be9ea998 | 2456335f6fe0c7147987a054c0d00adb36cd69ee | thevojacek/pgfe | /lib/dmitigr/util/basics.hpp | C++ | hpp | 5,344 | permissive | // -*- C++ -*-
// Copyright (C) Dmitry Igrishin
// For conditions of distribution and use, see files LICENSE.txt or util.hpp
#ifndef DMITIGR_UTIL_BASICS_HPP
#define DMITIGR_UTIL_BASICS_HPP
#include <type_traits>
namespace dmitigr {
// -----------------------------------------------------------------------------
// ... |
266e1c06dfa470625886cc99ff9bff342d117fa8 | 02c9b3eb0feeea7eb81b22262fb90cf55f86a58a | FXBitLab-Etp/etp3 | /src/test/timedata_tests.cpp | C++ | cpp | 1,015 | permissive | // Copyright (c) 2011-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 "timedata.h"
#include "test/test_etp.h"
#include <boost/test/unit_test.hpp>
using namespace std;
BOOST_FIXTURE_... |
5b1644432c598f5bd2c2f44cd53df8434093ec13 | 88673f39cc26562240e14b111513fe60525ab2b3 | jtlap/nt2 | /modules/boost/simd/base/unit/bitwise/scalar/bitwise_notor.cpp | C++ | cpp | 4,677 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
98e75d6287357cf96a11a73528b7532f35eef182 | 5b78e904f1656028c0f5a38631ebeb2af283a298 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_10/SB+dmb.sy+rfi-addr-rfi.c.cbmc.cpp | C++ | cpp | 49,351 | no_license | // Global variabls:
// 0:vars:2
// 2:atom_0_X2_0:1
// 3:atom_1_X2_1:1
// 4:atom_1_X6_1:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
#define ADDRSIZE 5
#define LOCALADDRSIZE 2
#define NTHREAD 3
#define NCONTEXT 10
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#... |
13e59e14290b15b9315496162bf46ed235c853f4 | accd6492cb3dd50d914f929f817c0907569e3ae2 | waaberi/chromium | /components/ui_devtools/views/view_element_unittest.cc | C++ | cc | 10,662 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/ui_devtools/views/view_element.h"
#include "base/strings/utf_string_conversions.h"
#include "components/ui_devtools/Protocol.h"
#inc... |
a0438fd79247536e0303b1d10a99ac54edb7ce74 | 5bea76d1e297f49841c40fe2c4018427b3f4391e | bbmjja8123/chromium-1 | /chromium-courgette-redacted-29.0.1547.57/components/autofill/core/browser/webdata/autofill_table_unittest.cc | C++ | cc | 62,476 | 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 <vector>
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/guid.h"
#include "base/path_service.h"
#include "bas... |
945fd38b8a3c9dd1c8c0c42ea4508bdf98f4483d | 4c94f6b2dbb98db282a8b85e453cf48292e0419b | glr/ktRayTracer | /BRDF/BRDF.cpp | C++ | cpp | 482 | no_license | /*
* BRDF.cpp
* ktRayTracer
*/
#include "BRDF.h"
#pragma mark BRDF
BRDF::BRDF(void) {
}
BRDF::~BRDF(void) {
}
#pragma mark -
#pragma mark f
vec3f BRDF::f(const HitData& hd, const vec3f& wo, const vec3f& wi) const {
return vec3f(0, 0, 0);
}
vec3f BRDF::sample_f(const HitData& hd, const vec3f& wo, vec3... |
39c4af28c529912da193929f191929f43242528c | 1255a31ee8fe81461a27e5d97006d429b495ded2 | alexandraback/datacollection | /solutions_5634947029139456_0/C++/sky2000/A-problem1.cpp | C++ | cpp | 2,703 | no_license | #define DeBUG
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <string>
#include <set>
#include <sstream>
#include <map>
#include <bitset>
using namespace std ;
#define zero {0}
... |
36455b0f96f78d45e1ae1de80a18f2ef89a59995 | 414c001a9fd5a7cef45be45b32e4740c44bd6d7f | kimown/chromium | /third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc | C++ | cc | 104,047 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.h"
#include "base/containers/adapters.h"
#include "third_party/blink/renderer/... |
0c5e52aaeac49e71a0ee1a871a8562b4626cc449 | 176985aa294bf74a42f78b9e4a889aa920e5cfa4 | iridium-browser/iridium-browser | /ui/views/widget/desktop_aura/desktop_window_tree_host_win_unittest.cc | C++ | cc | 6,826 | permissive | // Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
#include <oleacc.h>
#include <windows.h>
#include <utility>
#include "base/command_line.h"
#include "u... |
1da608ff9c3d88b39105d4413a0b34fc80786cba | 1c95519c6e9e7f771c7769fd8e03b54c96b76440 | rzr/chromium-crosswalk | /chrome/installer/launcher_support/chrome_launcher_support.cc | C++ | cc | 5,666 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/installer/launcher_support/chrome_launcher_support.h"
#include <windows.h>
#include "base/files/file_path.h"
#include "base/files/f... |
1bb8ad43dac3c7252f809011801dd15584ced80f | 3f2f5aaeabbcdb0e33c28a5374e9cf5c961dcdcd | mladmon/CLRS | /09.2-selection/select.cpp | C++ | cpp | 3,213 | no_license | #include <iostream>
#include <string>
#include <exception>
#include <chrono>
#include <random>
#include <unordered_set>
#include <vector>
using namespace std;
template <class T>
void print(const vector<T> &v, const string &name) {
cout << name << "[ ";
for (const T &e : v) {
cout << e << " ";
}
cout << "]" << e... |
61c3496671db4fb3079ab6f51b73f00cac7c9ec3 | 8d02ce40639fa5755e1cac8740773b619ed991cd | htyvv/2021-BaekJun | /NM-2/NM2.cpp | C++ | cpp | 515 | no_license | #include <iostream>
#include <vector>
using namespace std;
int n, m;
bool is_used[10];
vector<int> temp;
int now = 0;
void back_tracking(int cnt) {
if (cnt == m) {
for (auto n : temp) {
cout << n << " ";
}
cout << "\n";
return;
}
for (int i = now + 1; i <= n; i++) {
if (!is_used[i]) {
is_use... |
559f61290468c64aefa4df8253edbb9abe4e0d1e | 5f70e71619ba9105bdbf72af6023df9a42777277 | Air000/armnn_s32v | /src/armnn/backends/ClWorkloads/ClResizeBilinearFloat32Workload.hpp | C++ | hpp | 542 | permissive | //
// Copyright © 2017 Arm Ltd. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#pragma once
#include "backends/ClWorkloadUtils.hpp"
namespace armnn
{
class ClResizeBilinearFloat32Workload : public Float32Workload<ResizeBilinearQueueDescriptor>
{
public:
ClResizeBil... |
da645e9d5262df71599126d3366cd577aab070d1 | eb44f16e35f4009c3ec2ab452a80dd45bdfa8210 | jludwig75/rc_receiver_ppm_signal_decoder | /PpmInputSignal.cpp | C++ | cpp | 753 | no_license | #include "PpmInputSignal.h"
#include <util/atomic.h>
PpmInputSignal::PpmInputSignal(byte signal_pin) : _signal_pin(signal_pin), _last_channel_rise_time(micros()), _channel_high_time(1500)
{
}
bool PpmInputSignal::begin()
{
pinMode(_signal_pin, INPUT);
return InterruptManager.attachInterrupt(_signal_pin, this... |
c31ad734f5f6dca1670aaebe98d346ecf08c12c9 | 1a0c23dce5ef9ce48f3d3e960452dcd96d38c5cf | staminazhu/IBAMR | /src/IB/IBInstrumentationSpecFactory.cpp | C++ | cpp | 3,428 | no_license | // Filename: IBInstrumentationSpecFactory.cpp
// Created on 11 Jun 2007 by Boyce Griffith
//
// Copyright (c) 2002-2017, Boyce Griffith
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// ... |
c808b74b95d54843edc966d38b0154265e9a4bc9 | 1ff5e1ec3c4aa63fb21494aee22a72ab5b8821c3 | xudong-sun/leetcode | /629_K_Inverse_Pairs_Array.cpp | C++ | cpp | 1,777 | no_license | /*
Given two integers n and k, find how many different arrays consist of numbers from 1 to n such that there are exactly k inverse pairs.
We define an inverse pair as following: For ith and jth element in the array, if i < j and a[i] > a[j] then it's an inverse pair; Otherwise, it's not.
Since the answer may be very ... |
14cb874d6be14ed0ced256dc4e369783fb32de84 | c515242003af976363c90a301f9c673dbdc94274 | m4scosta/contests-training | /URI/1541.cpp | C++ | cpp | 229 | no_license | #include <iostream>
#include <math.h>
using namespace std;
int main(){
int a, b, c, l;
double t;
while((cin >> a) && a){
cin >> b >> c;
t = (a * b * 100) / c;
cout << trunc(sqrt(t)) << endl;
}
} |
5f134ebfc02424168845fd9e73ba3387548629d7 | 6cc80ab0409082cdfb33803af7f5a1e4094c82eb | zytx/Raspi-Self-Balancing-Robot-cpp | /Motor.hpp | C++ | hpp | 977 | no_license | class Motor{
public:
Motor(const char&,const char&,const char&,const char&);
void stopMotor();
void setPWM();
int PWM;
private:
const char& motorP1,motorP2,encoderP1,encoderP2;
};
Motor::Motor(const char &motorP1,const char &motorP2,const char &encoderP1,const char &encoderP2):motorP1(motorP1),motorP2(m... |
2ae221e3837dd8e60bf1eb753399a5c6c748ad39 | 964416da8d418c047264db7bfb2495f7a6d505e6 | arnaudmathias/42 | /CPP/day03/ex03/NinjaTrap.hpp | C++ | hpp | 635 | no_license | #ifndef NINJA_TRAP_HPP
# define NINJA_TRAP_HPP
# include "ClapTrap.hpp"
# include "FragTrap.hpp"
# include "ScavTrap.hpp"
# include <iostream>
# include <string>
class NinjaTrap : public ClapTrap{
public:
NinjaTrap(void);
NinjaTrap(std::string name);
NinjaTrap(NinjaTrap const & src);
~NinjaTrap();
void ra... |
c804c9dc70a4a9a1372c063c3d2c20a0964d1a84 | 0397fe9a50bbf757e3915ec10cbb5ed25ea7595b | sehiotbe/alloy | /tests/UnitTests/TestFileMappedVector.cpp | C++ | cpp | 34,451 | permissive | /*
* Copyright (c) 2017-2018, The Alloy Developers.
* Portions Copyright (c) 2012-2017, The CryptoNote Developers, The Bytecoin Developers.
*
* This file is part of Alloy.
*
* This file is subject to the terms and conditions defined in the
* file 'LICENSE', which is part of this source code package.
*/
#includ... |
2b57fac31ca38b65699d52118e96422f7b41dfed | cf858a53bb3abe6bbb466a1e8f4651e1b650878c | KlasafGeijerstam/Kattis | /c++/spock.cpp | C++ | cpp | 2,344 | no_license | #include <vector>
#include <string>
#include <iostream>
struct Rnd {
char a, b, x;
};
inline int cac(Rnd r) {
int x = (r.a*r.x + r.b) % 127;
return x % 5;
}
Rnd upd(Rnd r) {
r.x = (r.a*r.x + r.b) % 127;
return r;
}
int get(char c) {
switch(c) {
case 'r':
return 0;
... |
a09313d6f8912ea7a3b33219fd0d3537e03341d2 | b975df59b342a05bbe54e90d2c0fa75ddecde725 | google/skia | /tools/graphite/ContextFactory.cpp | C++ | cpp | 3,059 | 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 "tools/graphite/ContextFactory.h"
#include "include/gpu/graphite/Context.h"
#ifdef SK_DAWN
#include "tools/graphite/dawn/GraphiteDawnTestContext.h"
#endif
#ifdef SK_... |
60c13431f65e228c306876cbff888e1b9b4b9e0b | d6051af9f75f33932adbba8de7b89ce5d6ee5daa | ailong/Cpp-Primer | /ch03/Ex3.4-1.cpp | C++ | cpp | 428 | no_license | /*
* @Author: anchen
* @Date: 2015-01-08 10:01:57
* @Last Modified by: anchen
* @Last Modified time: 2015-01-08 10:05:45
*/
#include <iostream>
using namespace std;
int main(){
string s1,s2;
cin>>s1>>s2;
if(s1 == s2)
cout<<s1<<"等于"<<s2<<endl;
else
{
if(s1 > s2)
co... |
e3ee00b5ef60c0fb8addd2e18f094db2a524b9a4 | c1fe56f0fbedecbe3aa7c119b571cb7cdd357425 | sitedata/envoy | /test/common/http/conn_manager_impl_test.cc | C++ | cc | 164,943 | permissive | #include "test/common/http/conn_manager_impl_test_base.h"
#include "test/test_common/logging.h"
#include "test/test_common/test_runtime.h"
using testing::_;
using testing::An;
using testing::AnyNumber;
using testing::AtLeast;
using testing::Eq;
using testing::InSequence;
using testing::Invoke;
using testing::InvokeWit... |
13ee7751a9c2e38362bac42755f596217161049d | 3975f05377577021f0ab2dea3f4167c1fcee216c | linyacool/WebServer | /old_version/old_version_0.3/main.cpp | C++ | cpp | 4,358 | permissive | #include "requestData.h"
#include "epoll.h"
#include "threadpool.h"
#include "util.h"
#include "config.h"
#include <sys/epoll.h>
#include <queue>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <iostream>
#include <ve... |
8fc8904550e6597027a8f656d1e0ac36edaf8a05 | 1f21e7abe76b2a32d6c18e5c26c4f25b65daef5b | missyliu/Paddle | /paddle/fluid/pybind/pybind.cc | C++ | cc | 21,637 | permissive | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... |
dc18c87186117d670ac16895816def2e783ed2e8 | c2a094aa3122a3030e17a063a6570369dfcb5d80 | PubFork/FS2Open_Trunk | /fs2_open-unstable/code/object/objectdock.cpp | C++ | cpp | 26,112 | no_license | /*
* Created by Ian "Goober5000" Warfield for the FreeSpace2 Source Code Project.
* You may not sell or otherwise commercially exploit the source or things you
* create based on the source.
*/
/*
* $Logfile: /Freespace2/code/Object/ObjectDock.cpp $
* $Revision: 2.11.2.4 $
* $Date: 2007-07-28 21:31:06 $
* $Aut... |
0348d7db7e673827b70f3ef82f707ca47c986906 | 12d9b891cdbc57ef097bf8ba5c3e8fb9611249d8 | naver/sling | /webkit/Source/WebKit2/WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp | C++ | cpp | 2,729 | no_license | /*
* Copyright (C) 2011 Samsung Electronics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the follo... |
9c4b64b8182ee056646ccea85765dd1ac1e7448e | 8ec0d36e918f3418a4cc7321c43cddcb411f02f6 | retzger/wax-blockchain | /libraries/chain/transaction_context.cpp | C++ | cpp | 34,821 | permissive | #include <eosio/chain/apply_context.hpp>
#include <eosio/chain/transaction_context.hpp>
#include <eosio/chain/authorization_manager.hpp>
#include <eosio/chain/exceptions.hpp>
#include <eosio/chain/resource_limits.hpp>
#include <eosio/chain/generated_transaction_object.hpp>
#include <eosio/chain/transaction_object.hpp>
... |
62ee031eb9f100822774be2a0dcbecc98dfed932 | ab464f07aa09e7a63d9a253da8e328eb781ece78 | YanivFais/thesis_msc_dist_alg | /cygwin/omnetpp-4.0/src/sim/parsim/creceivedexception.cc | C++ | cc | 1,160 | no_license | //=========================================================================
// CRECEIVEDEXCEPTION.CC - part of
//
// OMNeT++/OMNEST
// Discrete System Simulation in C++
//
// Author: Andras Varga, 2003
// Dept. of Electrical and Computer Systems Engineering,
// Monash Univ... |
fd3f1a07b9fa6751ae86d25e37f4ddb233c72c8a | 96924060e72a773352401273ddde4b382616d354 | iforce2d/OpenVSP | /src/gui_and_draw/StructScreen.cpp | C++ | cpp | 139,782 | permissive | //
// This file is released under the terms of the NASA Open Source Agreement (NOSA)
// version 1.3 as detailed in the LICENSE file which accompanies this software.
//
// StructScreen.cpp: implementation of the StructScreen class.
//
//////////////////////////////////////////////////////////////////////
#include "Str... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.