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 |
|---|---|---|---|---|---|---|---|---|
cfdae1585520ef921adfcc91095986fa8a6faf56 | b92241e7a415a5d7f0faa12d6945820006f59a62 | ishitacs/LeetCode | /binary-tree-inorder-traversal/binary-tree-inorder-traversal.cpp | C++ | cpp | 722 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
d893ef37e7ae34098f65197a8fd6c099ccb1028f | 7d7a488cb4f148e422612c4e49f899ddd36619bb | gufranyes/ToonTanks | /Source/ToonTanks/Pawns/PawnTank.cpp | C++ | cpp | 2,338 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "PawnTank.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"
// Sets default values
APawnTank::APawnTank()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve perfo... |
d506f7fa2a33c4d2c7bc703ef257b041d5e8b660 | c5109e7dbc2adff55e77ea409949dca21c24bc36 | Lucas3H/Maratona | /Contests/612div1/b.cpp | C++ | cpp | 1,862 | no_license | #include<bits/stdc++.h>
using namespace std;
#define fr(i, n) for(int i = 0; i < n; i++)
#define frr(i, n) for(int i = 1; i <= n; i++)
#define frm(i, n) for(int i = n-1; i >= 0; i--)
#define pb push_back
#define f first
#define s second
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<double, double> p... |
7d5e234cec271f5883d28bac5b22a90d98e7a6c6 | 2578e3a081a40e9e88adda8dc301ea6fdcdd5c75 | yumoh/catboost_iter | /util/memory/blob.cpp | C++ | cpp | 11,316 | permissive | #include "blob.h"
#include "addstorage.h"
#include <util/system/yassert.h>
#include <util/system/filemap.h>
#include <util/system/mlock.h>
#include <util/stream/output.h>
#include <util/stream/buffer.h>
#include <util/generic/ptr.h>
#include <util/generic/string.h>
#include <util/generic/buffer.h>
#include <util/gener... |
ea4d723029f1606145cd8243aa9a22d1828a31b2 | e12b54d7c6f990c7104ee8a9fa8295f01cdb6a64 | ttune/dayz_0-45-124252 | /El/Debugging/mapFile.hpp | C++ | hpp | 3,390 | no_license | #ifdef _MSC_VER
#pragma once
#endif
#ifndef _MAPFILE_HPP
#define _MAPFILE_HPP
#include <Es/Strings/bString.hpp>
#include <Es/Containers/array.hpp>
#ifdef MAPINFO_EXTENDED
#define MapInfo MapIntoExt
#define MapFile MapFileExt
#endif
struct MapInfo
{
BString<512> name;
int section;
int physAddress; // symbol valu... |
dc63c2b57bd6205ce4b7c96e8e1106be891b8258 | dc026ee4011f73e2d9003cc7e149056b6d94ec19 | sangyx/algorithm | /leetcode/Array/Sum of Even Numbers After Queries.cpp | C++ | cpp | 820 | no_license | class Solution {
public:
vector<int> sumEvenAfterQueries(vector<int>& A, vector<vector<int>>& queries) {
vector<int> ret;
int sum = 0;
for(int a: A)
if(a % 2 == 0)
sum += a;
for(int i = 0; i < queries.size(); ++i)
{
if(A[queries[i][1]]... |
bf4f4ddbada723080517653e5562ff30406e3604 | 94f1296c5f429888c29a8004c110412f645e8801 | santospdaniel/techreach-c-assignment-pub | /src/DateLogger.cpp | C++ | cpp | 1,279 | no_license | #include <c-assignment/DateLogger.hpp>
#include <ctime>
#include <iostream>
namespace cassign
{
const char* DateLogger::m_dateTimeFormat = "[%D-%T]";
const char* DateLogger::m_timeFormat = "[%T]";
DateLogger::DateLogger(std::ostream* outStream, std::istream* inStream)
: Logger::Logger(outStream, inStream)
{}
... |
85620ff7154f1025fdd12ad9f74ac83c9a926e77 | 96279d9ac9e6dc180916479cb4caeb4a39e0aed2 | ProyectoLegus/Legus | /Instruccion/InstruccionAsignacion.cpp | C++ | cpp | 7,487 | no_license | #include "Instruccion/InstruccionAsignacion.h"
#include "ExpresionArreglo.h"
InstruccionAsignacion::InstruccionAsignacion(Expresion *variable, Expresion *expresion, Instruccion *siguiente,
int idDeExpresion, int numeroDeLinea)
:Instruccion(siguiente, ASIGNACION, idDeExp... |
8d023204e2fd87ba0cff1e3ce8752f2fa31a27d2 | 259e23eee66eb938126289636002bf3a90e64bf3 | MarcelGehrig/eeros-framework | /examples/ros/RosTest1.cpp | C++ | cpp | 3,627 | permissive | #include <eeros/core/Executor.hpp>
#include <eeros/control/Constant.hpp>
#include <eeros/control/TimeDomain.hpp>
#include <eeros/safety/SafetySystem.hpp>
#include <eeros/logger/Logger.hpp>
#include <eeros/logger/StreamLogWriter.hpp>
#include <eeros/control/ros/RosPublisherDoubleArray.hpp>
#include <eeros/control/ros/Ro... |
6805289ad1519ae37a57eb18a1d69c0ed7131891 | ec2370b377d5742528718b3458ef1788a9fdf382 | jin5866/chromium | /android_webview/browser/aw_proxying_url_loader_factory.cc | C++ | cc | 24,431 | 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 "android_webview/browser/aw_proxying_url_loader_factory.h"
#include <utility>
#include "android_webview/browser/android_protocol_handler.h"
#in... |
9a521290c8e206c50e35f5e510f86ff53153da4d | 86cdc43dd5c8daec8609a117849f77578cc569e0 | aybassiouny/BodyScanner | /Modules/Inactive/scan-aligner/icp_align.cpp | C++ | cpp | 3,870 | no_license | #include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/registration/icp.h>
#include <string>
using std::string;
int iterative_closest_point( string input , string target)
{
size_t j = 0;
int count_valid = 0;
pcl::PointCloud<pcl::PointXYZRGB>::Ptr temp1 (new pcl::PointCloud<p... |
cdf598f5ca81d5028d94daa5a5155864e73ec7f7 | ec1d1a25c5b083cb4a29f9218514c8a3fc9f9d53 | joaocgreis/socrob-ros-pkg | /raposang_ros/raposang_kinect/raposang_icp/src/ICPBlock.cpp | C++ | cpp | 1,569 | no_license | /*
* ICPBlock.cpp
*
*
* Created by Pedro Vieira on 10/24/11.
*
* This file implements the ICP algorithm
* - point 2 point
* - point 2 plane
* - plane 2 plane
*/
#include <iostream>
#include "ICPBlock.h"
////ICP class
//public methods
bool ICP::align(Eigen::Matrix4d Tini, Pair init_f){
... |
a1620a3d1ec0ac01dcf499da9bb0bcf818951b77 | a2a9001412d78903a70ca04d138292179973f5b0 | blizmax/UtopianEngine | /source/utopian/vulkan/EffectManager.cpp | C++ | cpp | 2,645 | no_license | #include <sys/stat.h>
#include "vulkan/EffectManager.h"
#include "vulkan/Effect.h"
#include "core/Log.h"
#include "imgui/imgui.h"
namespace Utopian::Vk
{
EffectManager::EffectManager()
{
}
EffectManager::~EffectManager()
{
}
EffectManager& gEffectManager()
{
return EffectManager::Instance();
}
void E... |
9ead3d2ee2e929988a69cceaa2744a34348682ed | af8653d0d5066568a22a0aa06cbc7e8c397f797d | xuzhaofangxzf/nginx | /misc/ngx_c_crc32.cpp | C++ | cpp | 2,598 | no_license |
//和 crc32校验算法 有关的代码
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ngx_c_crc32.hpp"
//类静态变量初始化
CCRC32 *CCRC32::m_instance = NULL;
//构造函数
CCRC32::CCRC32()
{
Init_CRC32_Table();
}
//释放函数
CCRC32::~CCRC32()
{
}
//初始化crc32表辅助函数
//unsigned long CCRC32::Reflect(unsigned long ... |
9d76b43540fd8dc91c44572b468a5e7686c1af2e | 335ff9542060e0fc1ddabe0ee037bca121998819 | FRCTeam2659/frc2017cpp | /Robot 2017 alpha 4.0/Robot 2017 alpha 4.0/src/Commands/DistGoal.cpp | C++ | cpp | 1,636 | no_license | /*
* DistGoal.cpp
*
* Created on: Mar 24, 2017
* Author: Mark
*/
// RobotBuilder Version: 2.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you expo... |
c822be9341531d9153e00d4b7655395bc74abcf3 | 6c6ff2f2d3c2adc0060a8a6bb8e7cde2a305f9c0 | chaowang15/rgbdrecon | /DepthSensingCUDA/Source/KinectSensor.cpp | C++ | cpp | 22,246 | no_license |
#include "stdafx.h"
#include "KinectSensor.h"
#include <fstream>
KinectSensor::KinectSensor()
{
// get resolution as DWORDS, but store as LONGs to avoid casts later
DWORD width = 0;
DWORD height = 0;
NuiImageResolutionToSize(cDepthResolution, width, height);
unsigned int depthWidth = static_cast<u... |
b1a471621941edf8266f197c806b08e466d53a1f | 13bb37cff53de5cdde52655c5ce1c3d57b16caa6 | ailuoxz/BadPrincess-Game | /Src/AI/Actions/TimerAction.cpp | C++ | cpp | 1,517 | no_license | /**
@file TimerAction.cpp
Action that set if certain ability of some type of unit is enabled or disabled
@see TimerAction
@author Ivan Leon
@date May 2015
*/
#include "TimerAction.h"
#include "GUI/Server.h"
#include "GUI/StatisticsController.h"
namespace AI {
IActionStatus CTimerAction::onStart(){
_lastTimeWri... |
932e58a962a3e344139c1f50552c6414f91a773a | 508fb0df46a3b856822d58329925470c46c08b80 | vectorstorm/vectorstorm-testbeds | /Games/SpaceMazeExpress/SMX_PlayerShip.cpp | C++ | cpp | 7,277 | no_license | /*
* SMX_PlayerShip.cpp
* VectorStorm
*
* Created by Trevor Powell on 25/03/07.
* Copyright 2007 Trevor Powell. All rights reserved.
*
*/
#include "SMX_PlayerShip.h"
#include "SMX_Game.h"
#include "SMX_Rope.h"
smxPlayerShip::smxPlayerShip( vsPhysicsEmitter *thrustEmitter ):
vsPhysicsSprite( vsDisplayList:... |
531c3b5e747111e79b8e36b679a9d4fe50ffc7a5 | 4321468b68610a1802d25f4d90fb4ba07e4fb42a | umamina11/minesweeper | /print table.cpp | C++ | cpp | 238 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
cin.ignore(numeric_limits<streamsize>::max(), '\n');
for(int i=1;i<=10;i++)
cout<< n <<" x "<< i <<" = "<<n*i<<"\n";
return 0;
}
|
d69f22b8a0dd877e8b0a1234ea930fe684c95ff4 | 40e742c7f37740b1e4b2a7f484913bb3cca3a6a5 | YangJiH/BookProject | /Source/BookProject/ABGameMode.cpp | C++ | cpp | 469 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "ABGameMode.h"
#include "ABPawn.h"
#include "ABPlayerController.h"
AABGameMode::AABGameMode()
{
DefaultPawnClass = AABPawn::StaticClass();
PlayerControllerClass = AABPlayerController::StaticClass();
}
void AABGameMode::PostLog... |
01459ee9f3045897e3aaab0db9d3cab995578ed4 | bf6c9865d57c64448fb0485e3fd5cb3dd9d0665f | AlessandroLauria/TutoratoProgrammazione1_M_Z | /Esercizi/Codice esercizi miei/esercizio_8_2.cpp | C++ | cpp | 823 | no_license | #include <iostream>
using namespace std;
#define n 3
void print(int*** A){
for(int i = 0; i<n; i++){
for(int j=0; j<n; j++){
for(int s=0; s<n; s++){
cout<<A[i][j][s]<< " ";
}
cout<<endl;
}
cout<< endl;
}
cout<<endl;
}
bool esercizio_8(int*** A){
for(int i=0; i<n; i++){
int sum=0;
for(i... |
87fd653c5784853868ef610bf314df83d7bddec4 | b0ad467e2d5606f360a9f899d9ba3d55e3f97ad0 | Global19-atlassian-net/envoy-gloo | /source/common/matcher/solo_matcher.cc | C++ | cc | 5,908 | permissive | #include "common/matcher/solo_matcher.h"
#include "common/common/logger.h"
#include "common/common/regex.h"
#include "common/config/version_converter.h"
#include "common/router/config_impl.h"
#include "absl/strings/match.h"
using ::envoy::config::route::v3::RouteMatch;
using Envoy::Router::ConfigUtility;
namespace ... |
c588f6640fcddd6149ebfdaaabe7ba61adf5a574 | ccc43d18bbd5a8137c24d445a00b0bcbfcde5dc7 | George55555/BTCtalkcoin | /src/qt/guiutil.cpp | C++ | cpp | 13,326 | permissive | #include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For Qt::escape
#include ... |
f57a385db0b81e5ccf7d0f67be3d6e88713aa43a | 683c8737bbe5903a00b6e797ddc08025f0081e4f | xidianlina/cppplus | /chapter_08_inline.cpp | C++ | cpp | 345 | no_license | #include <iostream>
inline double square(double x) { return x*x; }
int main()
{
using namespace std;
double a, b;
double c = 13.0;
a = square(5.0);
b = square(4.5 + 7.5);
cout << "a = " << a << ", b = " << b << "\n";
cout << "c = " << c;
cout << ", c squared = " << square(c++) << "\n";
cout << "Now c = " <<... |
87b4e17b8970acd430ede7edcbdfb034478a3f3d | c868a2aa4545b604f882864520cf55aee688a172 | YunGilDong/linux_occilib | /ClsDB.cpp | C++ | cpp | 4,293 | no_license | #include "ClsOcci.h"
using namespace std;
OCCIDB_DESC db_desc = {"TRAMTEST", "TRAMTEST", "TRdb"};
int main(void)
{
ClsOcci MDB("MDB", &db_desc);
cout << endl;
cout << "OCCI CLSDB test..." << endl;
try
{
MDB.Connect();
char blobaa[10];
MDB.SetStatemen... |
6216dda60805e8aeeeb3000c9d2f07e719492cf0 | 7166e170b6483bb044054c30d71736a08e3db6b9 | cowtony/ACM | /ZOJ/ACM answer/2501.cpp | C++ | cpp | 869 | no_license | #include <iostream>
using namespace std;
int main()
{
int a[50000];
int sum[50000];
int i, j;
int cas;
int n;
int pos;
scanf("%d", &cas);
while(cas--)
{
int max = 0;
scanf("%d", &n);
scanf("%d", &a[0]);
for(i=1; i<n; i++)
{
scanf("%d", &a[i]);
a[i] += a[i-1];
}
scanf("%d", &pos);
int max... |
d69ba3443f76773291484458c34c3cf867798901 | e78e5fad841f34f21897f9cf7baa8cbe306f80b2 | teslahu/neonbenchmark | /instrin/test_gemv.cpp | C++ | cpp | 7,443 | no_license | #include <arm_neon.h>
#include <iostream>
#include <vector>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <chrono>
#include <cassert>
#include <cmath>
void gemv_neon(float *a, float *b, float *c, int m, int k){
for(int i=0; i<m; i+=16){
float *at = a + i;
float *bt = b;
float ... |
7af407050c1c938a0908828cb8abce9b44af3122 | 4e600264d34c7757a25807a8fb4e47da70b69fc9 | whywhyzhang/ACM-ICPC-Code | /2016Net/Dalian/1001_2.cpp | C++ | cpp | 2,348 | no_license | // ━━━━━━神兽出没━━━━━━
// ┏┓ ┏┓
// ┏┛┻━━━━━━━┛┻┓
// ┃ ┃
// ┃ ━ ┃
// ████━████ ┃
// ┃ ┃
// ┃ ┻ ┃
// ┃ ┃
// ┗━┓ ┏━┛
// ┃ ┃
// ┃ ┃
// ┃ ┗━━━┓
// ┃ ┣┓
// ┃ ┏┛
// ... |
a384feadf0927ba154d497d2d0aa5a65ab94f634 | 9b1b78c2edfc89f1d3f4f88bfaffe09705e3bd39 | jain02/Hackerrank | /Beautiful days at movies - Copy.cpp | C++ | cpp | 574 | no_license | #include<stdio.h>
#include<math.h>
int main()
{
int i,j,sum,temp,a,b,c[100000],e[100000],count=0,l;
float d,k;
printf("Enter the Starting day number: ");
scanf("%d",&i);
printf("Enter the Ending day number: ");
scanf("%d",&j);
printf("Enter the Divisor: ");
scanf("%f",&k);
b=(j-i) + 1;
for(a=0;a<b;a++)
{
c... |
6b6e75d3b733f1044139a851c491179e4e8a46ed | 7c03927ea5086b88f5d0b3adc84bccba2e8db648 | j1249845202/chromium | /content/browser/background_sync/background_sync_manager.cc | C++ | cc | 90,261 | 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 "content/browser/background_sync/background_sync_manager.h"
#include <algorithm>
#include <utility>
#include "base/barrier_closure.h"
#include ... |
912141f2d77bdbd6ce6549e24d890e54742d9933 | 6ced96027b844314fa0fbb39387e924e61c8866a | kyarameru1102/metaru | /metarurururururu/Game/NowGame/Title.cpp | C++ | cpp | 2,082 | no_license | #include "stdafx.h"
#include "Title.h"
#include "Fade.h"
#include "AfterTitle.h"
#include "Ground.h"
#include "Sky.h"
#include "TitleCamera.h"
Title::Title()
{
m_se.Init(L"Assets/sound/gunfire.wav");
}
Title::~Title()
{
DeleteGO(m_ground);
DeleteGO(m_sky);
DeleteGO(m_titleCamera);
DeleteGO(m_skinModelRender);
}... |
aad1a80e54266048875519c956616a1614711498 | 8621f79bd50a7ddab095bb9956bcdf6879cc6c7f | mfkiwl/GEVCU7 | /src/devices/esp32/ESP32Driver.cpp | C++ | cpp | 1,366 | permissive | #include "ESP32Driver.h"
#include "gevcu_port.h"
ESP32Driver::ESP32Driver() : Device()
{
commonName = "ESP32 Wifi/BT Module";
shortName = "ESP32";
}
void ESP32Driver::earlyInit()
{
//prefsHandler = new PrefHandler(ESP32);
}
void ESP32Driver::setup()
{
tickHandler.detach(this);
Logger::info("add ... |
4c75793d955a4d4b3d87562021228e19f8bd2581 | d28537a57784033c7aeb55058cb10fd94f60d634 | facebookresearch/faiss | /faiss/impl/residual_quantizer_encode_steps.cpp | C++ | cpp | 32,259 | permissive | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <faiss/impl/residual_quantizer_encode_steps.h>
#include <faiss/impl/AuxIndexStructures.h>
#include <faiss/impl/FaissAsse... |
08d20e30211bb8989fd47c2fd4e227f2de7734d3 | 70b3e562cd7cdd69fe194222627f4be50da4c848 | maqsoftware/Pehla-School | /pehlaschool/Classes/Managers/BookManager.cpp | C++ | cpp | 1,192 | permissive | //
// BookManager.cpp
// PehlaSchool
//
// Created by Gunho Lee on 11/3/16.
//
//
#include "BookManager.hpp"
static BookManager* _instance;
BookManager* BookManager::getInstance()
{
if (!_instance) {
_instance = new BookManager();
}
return _instance;
}
void BookManager::addBookInfo... |
3e8a03295fae13920624c5431ea0a61cb67ba4f5 | a117b741c26b2633dee4e5f0996415f28c33817d | fcccode/Jx | /Sources/Engine/Src/KBinTree.cpp | C++ | cpp | 9,564 | no_license | #include "KBinTree.h"
KBinTree::KBinTree()
{
m_pTreeRoot = NULL;
}
//---------------------------------------------------------------------------
// 函数: BTSearch
// 功能:
// 参数: TBinTreeNode * pParentTBinTreeNode
// 参数: TBinTreeNode * pTBinTreeNode
// 参数: DWORD nKey
// 参数: BOOL * pResult
// 返回: TBinTreeNode *
//----... |
c7f03d097a94cf524aec8d05cbc2bfd479dabe34 | 902eaa3fd4bcffa7563ebd94599a035b7a732d14 | freebsd/freebsd-ports | /devel/electron25/files/patch-content_renderer_renderer__blink__platform__impl.cc | C++ | cc | 2,021 | permissive | --- content/renderer/renderer_blink_platform_impl.cc.orig 2023-06-07 04:52:05 UTC
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -114,7 +114,7 @@
#if BUILDFLAG(IS_MAC)
#include "content/child/child_process_sandbox_support_impl_mac.h"
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#elif BUILDFLAG(IS_... |
dc5347d0bdd6d501d75da8097fdbe2344dc0b5a4 | 286f3873cf46509ed2b54c577e0e6921b183d397 | PavPS/Careercup | /JamesChen36.cpp | C++ | cpp | 1,134 | no_license | #include "stdafx.h"
/*
You given an array:
3, 2, 1, 6, 5, 4, 9, 8, 7
you have to find a 3 tuple which has property a < b < c, also a is before b, b is before c in array.
Answer can have multiple tuples, you have to find any one.
In this array, answer will be 3, 6, 9
*/
#include <iostream>
#include <alg... |
d9a4a723e504798910ef7e6c57b8467c3c37a880 | e42b44802bf8a60b9581f031cc29ae69f70d3022 | DadSchoorse/pal | /src/core/vamMgr.cpp | C++ | cpp | 6,889 | permissive | /*
***********************************************************************************************************************
*
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... |
d41dda843b77850b1280363f8fa089e47a44f7ea | 50bb24958fbe64173c3028da1b3e954d08f40998 | ericogr/idf-simple-spi | /SPI.cpp | C++ | cpp | 2,912 | permissive | #include "SPI.h"
const char* SPI::LOG_TAG = "SPI";
const uint8_t SPI::SPI_DEF_PORTS[3][3] = {
{0, 0, 0},
{14, 13, 12},
{18, 23, 19}
};
esp_err_t SPI::init(uint8_t csPin) {
return init((gpio_num_t)csPin);
}
esp_err_t SPI::init(gpio_num_t csPin) {
spi_bus_config_t bus_config;
bus_config.sclk_io_nu... |
9b15ea4504f7133063926c060d0b4c165db3a539 | 75583ff61f5363b6ff2c2c9b749229a27ed2bd49 | cnsuhao/fcppt | /libs/core/include/fcppt/detail/strong_typedef/comparison_operator.hpp | C++ | hpp | 656 | permissive | // Copyright Carl Philipp Reh 2009 - 2016.
// 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)
#ifndef FCPPT_DETAIL_STRONG_TYPEDEF_COMPARISON_OPERATOR_HPP_INCLUDED
#define FCPPT_DETAIL_STRONG_T... |
e6b99b401c3d007b4a787a94a958d2326b7c396e | b4686c9816667e0ba50ecfd13f934bedb63bbcda | marianaccq/ED | /Lista 2/Q6/Q6 - Ary.cpp | C++ | cpp | 850 | no_license | #include <vector>
#include <iostream>
#include <math.h>
using namespace std;
int main(){
int n, soma =0;
cout<<"Digite o valor: "<<endl;
cin>>n;
int a[n][n], v[n], r[n];
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cout<<"Digite o valor "<<i+1<<" X "<<j+... |
97b5315e3f4c528719268f141b45ac09b2488765 | b27030c691bcbf7eecfa5679676e2942841e8b1e | parambedi1453/ADI | /recursion/bubbleRecursive.cpp | C++ | cpp | 736 | no_license | #include<iostream>
using namespace std;
// void bsort(int *a,int n)
// {
// if(n==1)
// return;
// //sort 1 element and call for remaining n-1 elements
// for(int j=0;j<=n-2;j++)
// {
// if(a[j]>a[j+1])
// swap(a[j],a[j+1]);
// }
// bsort(a,n-1);
// }
void bsort2(int a... |
05965aa7d8696b04fe4b7f1d23ae31da6b0d4ed5 | c9079fca3cf4bd364e7be92e62d2906050ddfd6c | HANXU2018/HBU2019programingtext | /PAT (Basic Level) Practice (中文)/pat 乙级 1052. 卖个萌 (20).cpp | C++ | cpp | 1,160 | no_license | #include <iostream>
#include<cstring>
using namespace std;
int get (string hand,string a[]){//用于把初始三个字符串转换成不含[]的三个string数组
int k=0;
for(int i=0;i<hand.size();i++){
if(hand[i]!='['&&hand[i]!=' '&&hand[i]!=']')
a[k]+=hand[i];
if(a[k]=='/'){
a[l]+='/';
}
... |
3a3f45c793e71e5fd16afd9c3ff37efb6e44fba0 | 0f00d91e1fc3bb8f279f4f6b21450b74660c5843 | qaisjp/inf-cg | /cw2/core/Camera.cpp | C++ | cpp | 1,107 | permissive | /*
* Camera.cpp
*
*/
#include <iostream>
#include "Camera.h"
#include "cameras/Pinhole.h"
#include "cameras/ThinLens.h"
#include "geometry.h"
namespace rt {
Camera::~Camera() {};
// From https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/lookat-function
Matrix44f Camera::... |
1fe51e1096aa3e3bd0e0546c91070abbd64387cc | 75a12551f2b4d228f10e5c354aa1e8ece5baf247 | Mritunjoy71/CPP-Coding | /feet.cpp | C++ | cpp | 363 | no_license | #include<iostream>
using namespace std;
int main()
{
int a,b,d ,min;
cout<<"enter two numbers: ";
cin>>a>>b;
min=a>b?a:b;
for(d=2;d<min;d++)
if(((a%d)==0)&&((b%d)==0)) break;
if(d==min){
cout<<"no common denominators\n";
return 0;
}
cout<<"the lowest common deno... |
0671ddd96f0c0d21c3228f197a160d80acfa33bb | 935bf2663857e4b69fcac8f8faef296c8ec6ef17 | jwillemsen/CoSMIC | /PIM/OCML/common/xerces_helpers.cpp | C++ | cpp | 1,129 | no_license | #include "xerces_helpers.hpp"
#include <iostream>
#include <xercesc/framework/MemBufInputSource.hpp>
#include <xercesc/framework/Wrapper4InputSource.hpp>
using namespace xercesc;
bool XercesSystem::initialized_ = false;
DOMImplementation* XercesSystem::impl_ = 0;
DOMImplementationLS* XercesSystem::impl_ls_ = 0;
vo... |
c0b7231997e2832d005cdb4f95438506fea46049 | acded20fa5bac11ac14eb15fac36d13993470bf8 | ASSTAROID/hhvm | /hphp/runtime/base/empty-array.cpp | C++ | cpp | 12,817 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
f80fe1514edfb0eabb803f9fe620621d1062a357 | cd4f2befb398fa219bbf4813db8d8f19ebc01af7 | msmania/curve | /curvecore/src/bitmap.cpp | C++ | cpp | 10,071 | permissive | #include <windows.h>
#include <iostream>
#include <assert.h>
#include "blob.h"
#include "bitmap.h"
void Log(LPCWSTR format, ...);
SafeDC SafeDC::Get(HWND hwnd) {
return SafeDC(hwnd, GetDC(hwnd));
}
SafeDC SafeDC::CreateMemDC(HWND hwnd) {
auto realDC = SafeDC::Get(hwnd);
return SafeDC(nullptr, CreateCompatibleD... |
006271e77eaf978a6d979310d586cf78752c2a22 | 86f2eda126e44cf79793de376d4faa41309b9816 | jun384668960/mfc_ffmpeg_sdl2_p2p | /mfc_client/ConnGssP2p.cpp | C++ | cpp | 10,118 | no_license | #include "stdafx.h"
#include "ConnGssP2p.h"
#include "Log.h"
void ConnGssP2p::on_create_complete(p2p_transport *transport, int status, void *user_data)
{
LOGI_print("transport:%p status:%d", transport, status);
ConnGssP2p* gssP2p = (ConnGssP2p*)user_data;
if (status == 0)
{
gssP2p->IsConnected() = true;
gssP2p... |
102a162b9591e24d04f699aa3768f05a12da64fd | a5c3eafd9793126d3a0494a67788d1a9d94f9d85 | cmx-Y/LLVM_for_cpu0 | /llvm/lib/Target/Cpu0/Cpu0RegisterInfo.cpp | C++ | cpp | 5,340 | permissive | //===-- Cpu0RegisterInfo.cpp - CPU0 Register Information -== --------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
ed68f0d0be2473312d36922c3cb1c2077e828621 | d0345bf4290ed1af4281ee8b516aedf1b9fd270b | Kaloell/GW2-ArcDPS-Mechanics-Log | /src/MechanicFilter.cpp | C++ | cpp | 2,070 | permissive | #include "MechanicFilter.h"
MechanicFilter::MechanicFilter()
{
}
MechanicFilter::~MechanicFilter()
{
}
static auto getMechanicNamesForComboBox = [](void* current_mechanics,int current_item, const char** item_text)
{
auto& vector = *static_cast<std::vector<Mechanic>*>(current_mechanics);
*item_text = vector.at(... |
43a9635aaa81d0d133b56cecf292a8364aa313f5 | d06a83027fff3852b715f21f20b0cadbe4a17830 | nyrl/trik-vidtranscode-resample | /libimage/include/libimage/image_pixel_rgb.hpp | C++ | hpp | 7,746 | no_license | #ifndef TRIK_LIBIMAGE_IMAGE_PIXEL_RGB_HPP_
#define TRIK_LIBIMAGE_IMAGE_PIXEL_RGB_HPP_
#ifndef __cplusplus
#error C++-only header
#endif
#include <stdio.h>
#include <cmath>
#include <iostream>
#include <libimage/stdcpp.hpp>
/* **** **** **** **** **** */ namespace trik /* **** **** **** **** **** */ {
/* **** ****... |
40234e225f6c3665ba4d6b6467f4079b040d4f72 | def320ffb613d24bfb5d9d71ff149e8ca63a519b | ORO-mlm/ORO-Core | /src/logging.cpp | C++ | cpp | 7,715 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The Bitcoin developers
// Copyright (c) 2015-2020 The PIVX developers
// Copyright (c) 2021- The ORO developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php... |
85401507f5f0c82144359ddc0335f5dc4854f748 | ef877fa444cfdda4a6f588caa8ebc07a70f204f5 | xuewenhaoby/topo48 | /src/route.cpp | C++ | cpp | 1,721 | no_license | #include "topo.h"
#include "cmd.h"
#include "route.h"
#include "node.h"
int FindMin(
unsigned int distance[],
bool mark[]
)
{
int n=0;
unsigned int min=MAX_ARC_WEIGHT;
for(int k=0;k<SAT_NUM;k++)
{
if(!mark[k] && distance[k]<min)
{
min = distance[k];
n = ... |
0db96a0e5a965dd07b61ea5ed953000b2232589c | 655a1dd68176a17575eda3489ce4816e8e8f0420 | NCAR/lrose-core | /codebase/apps/titan/src/TitanStormIdent/StormIdent.hh | C++ | hh | 3,168 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
bf05c82606deef4046051538ea65e21d343fa199 | a1b5708a87eb127aab657dbdc381308e7c84f535 | jdebrabant/seer | /third_party/cSPADE/sequence.cc | C++ | cc | 42,309 | no_license | #include <errno.h>
#include <iostream.h>
#include <fstream.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <fcntl.h>
#include <sys/stat.h>
//#include <sys/mode.h>
#include <unistd.h>
#include <sys/time.h>
#include <time.h>
#include <sys/types.h>
#include <strings.h>
#include <sys/mman.h>
//#include... |
7d279afba3aa254298805b8c593af34968f7244e | cc30b8d7ad47040f940821c9907dedf8564ed22d | ric2b/Vivaldi-browser | /chromium/services/device/geolocation/public_ip_address_geolocation_provider.cc | C++ | cc | 2,028 | permissive | // Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/device/geolocation/public_ip_address_geolocation_provider.h"
#include "base/bind.h"
#include "services/device/geolocation/public_ip_address_geolocator.h"
#i... |
78e717b0b9d4ed830d19842bdc9f207e1a80b690 | 533d0e14b709fb45ef5450aaafc8c3a2deee3d6f | Razatop/MCC_sandbox_modDev | /mcc/ambient/cfgFunctions.hpp | C++ | hpp | 1,496 | no_license | class ambient {
#ifdef MCCMODE
file = "\mcc_sandbox_mod\mcc\ambient\fnc";
#else
file = "mcc\ambient\fnc";
#endif
class ambientInit {description = "init ambient civilians";};
class findCivHouse {description = "find nearest civilian house";};
class ambientDeleteCiv {description = "Delete civilians when not in ra... |
a55bf86c8121a54be31259d691c42c1af1a8f7e9 | 68b13c592b709a46a0dd54948965ea52c6435ec1 | linusmossberg/monte-carlo-ray-tracer | /source/ray/intersection.hpp | C++ | hpp | 413 | permissive | #pragma once
#include <memory>
#include <glm/vec2.hpp>
namespace Surface { class Base; }
struct Intersection
{
Intersection() { }
Intersection(double t) : t(t) { }
std::shared_ptr<Surface::Base> surface;
double t = (std::numeric_limits<double>::max)();
glm::dvec2 uv;
bool interpolate = fals... |
97c245ab9d609c5b2db4b92a80f71833a4e3e677 | 830ffc79ef9941ee42eb47481bca054da477a1e3 | Starlink/vtk | /Views/Qt/vtkQtAnnotationView.cxx | C++ | cxx | 5,440 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkQtAnnotationView.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This softw... |
0b7cde5560acfd3b8ab39c1e866a670807fb546e | 64a896eb81361795a3f4fede18d51a30792bbaec | TannerS/Parallel-Processing-Send-Recieve-MPI-Cost | /main.cpp | C++ | cpp | 2,354 | no_license |
#include "mpi.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <iostream>
#include <ctime>
#define SIZE 100000000
// argc = cpu count, argv = file.cpp
int main(int argc, char *argv[])
{
srand(time(0));
double t0, t1;
int n = 0;
int* list;
int msgtag;
float cost = 0;
int myid, numprocs;
... |
c9c225b47f164349b418ba1148c31d4e38fe7ad0 | 0ffc5919ace2d32b11e4c1840fcd6975918c9ec2 | DarkCodez/TCF-SDK | /SDK/TCF_GeometryCache_structs.hpp | C++ | hpp | 1,392 | no_license | #pragma once
// The Cycle Frontier (1.X) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "TCF_Basic.hpp"
#include "TCF_CoreUObject_classes.hpp"
#include "TCF_Engine_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Script Structs
//------------... |
da1ab332f6e9fda43ca9a5c5af1d43388c709b1b | 2353f13c669b6e8b096848cee055a81091de1569 | ss5ssmi/OJ | /codeforce/CF_707B.cpp | C++ | cpp | 594 | no_license | #include<bits/stdc++.h>
using namespace std;
#define int64 __int64
struct node{
int64 x,y,l;
}s[100010];
int cmp(node a,node b){
return a.l<b.l;
}
int main() {
int n,m,k,vis[100010]={0};
int64 x;
scanf("%d%d%d",&n,&m,&k);
for(int i=0;i<m;i++){
scanf("%I64d%I64d%I64d",&s[i].x,&s[i].y,&s[i].l);
}
sort(s,s+m,cmp... |
757e1f889495aaca01294bcb84dfc8d197ff8db6 | 5c94c15adad2410d3b24d7cdb4d3568c2dff459d | Kim-Dewelski/gbcpp | /src/main.cpp | C++ | cpp | 349 | no_license | /*
Gameboy colour emulator written in C++
*/
#include<gameboy.h>
#include<core/instructions.h>
#include<display/display.h>
int main(){
gameboy_t gb;
gb.load_rom("roms/test/gb-test-roms/cpu_instrs/cpu_instrs.gb");
main_window::bind(gb);
main_window::init();
main_window::start();
while(true){... |
8a7f821711a528551b2442aef22b249f467b18a5 | 8b7034551045a7008e83efff991ad0c9be71e0b1 | RiturajKulshresth/competitive-programming | /opencup/xxi/gp-of-eurasia/1.cc | C++ | cc | 448 | no_license | #include <cstdio>
#include <algorithm>
int main() {
int T;
scanf("%d", &T);
for (int cas = 1; cas <= T; ++cas) {
int n, m, r, c, s;
scanf("%d%d%d%d%d", &n, &m, &r, &c, &s);
auto inside = [&](int x, int y) {
return std::abs(x - r) + std::abs(y - c) <= s;
};
if ((!inside(r, 1) && !insid... |
bdf44c8223afa02b0fc07b1b547c4a56a2e3962b | 65a536d5d306221cc8156ba481e91a4d6da27f6d | presto53/ClickHouse | /src/TableFunctions/ITableFunctionFileLike.cpp | C++ | cpp | 3,475 | permissive | #include <TableFunctions/ITableFunction.h>
#include <TableFunctions/ITableFunctionFileLike.h>
#include <TableFunctions/parseColumnsListForTableFunction.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTLiteral.h>
#include <Common/Exception.h>
#include <Common/typeid_cast.h>
#include <Storages/StorageFile.h>
#... |
a9cd543e203217ac8015f3dfc5d0ea4cb8f3046d | 3ed296001e518c0c9f4162bd2c4fa2254a5ebdb5 | mmmfarrell/ros_plane | /src/path_manager_base.cpp | C++ | cpp | 4,139 | no_license | #include "path_manager_base.h"
#include "path_manager_example.h"
namespace rosplane {
path_manager_base::path_manager_base():
nh_(ros::NodeHandle()), /** nh_ stuff added here */
nh_private_(ros::NodeHandle("~"))
{
nh_private_.param<double>("R_min", params_.R_min, 100.0);
_vehicle_state_sub = nh_.subscri... |
fea3c76a27c364e3bbeca17b8295216bbdc4e0ba | e1620d2964dec7ef043793d2e5d5986ffef2cc25 | katwre/fastglm | /src/fit_glm_dense.cpp | C++ | cpp | 7,383 | no_license | #define EIGEN_DONT_PARALLELIZE
#include <bigmemory/MatrixAccessor.hpp>
#include <bigmemory/BigMatrix.h>
#include <Rcpp.h>
#include "glm.h"
#include <RcppEigen.h>
using namespace Rcpp;
using Eigen::VectorXd;
using Eigen::MatrixXd;
using Eigen::Map;
typedef MatrixXd::Index Index;
List fastglm(Rcpp::NumericMatrix ... |
2434f3cafa51445a940a6b7d0d92f3a5472e7497 | 06fa1dca23ac1cf31d659f4e054b1fa441db1277 | mooleetzi/ICPC | /contest/cf600/B.cpp | C++ | cpp | 2,862 | no_license | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#if __cplusplus >= 201103L
#include <unordered_map>
#include <unordered_set>
#endif
#include <vector>
#de... |
8a804ed0f87d6905bb25ef3553706791b7f120e4 | 32a3b56df51a850dbfe79cb1c5d510925c51b025 | booherm/ca-workbench | /ca_workbench/NeuralNetworkModule.hpp | C++ | hpp | 3,583 | no_license | #ifndef NEURALNETWORKMODULE_HPP
#define NEURALNETWORKMODULE_HPP
#include "CaWorkbenchModule.hpp"
#include "NeuronSite.hpp"
#include "NeuralSynapse.hpp"
#include <iostream>
#include <set>
#include <unordered_set>
#include <boost/crc.hpp>
class NeuralNetworkModule : public CaWorkbenchModule
{
public:
// constructors
... |
d719c6b610822fc933a770dfd9c7290b480caf68 | 5825d9994f6bb47978494487e93f6c8b35354d35 | DeveshDutt2710/Competitive_Programming | /LEETCODE/dynamic_programming/22_72_editDistance.cpp | C++ | cpp | 1,520 | no_license | /*
https://leetcode.com/problems/edit-distance/
72. Edit Distance
Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2.
You have the following three operations permitted on a word:
Insert a character
Delete a character
Replace a character
Example 1:
Input... |
4eba4d63cd68147e68856ea2fc8a99d946e41169 | a72232cea46e14687bd995c92adb62b1ae074e3a | 15831944/phoebemail | /dhnetsdk/Demo/DeviceWorkState.cpp | C++ | cpp | 7,882 | no_license | // DeviceWorkState.cpp : implementation file
//
#include "stdafx.h"
#include "netsdkdemo.h"
#include "DeviceWorkState.h"
#include "NetSDKDemoDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
////////////////////////////////////////////////////////... |
ebe6728344179a082031e380e83df47c2f620cd3 | 0906fb5c35a8d5bc9708ddb09a7e21ddf77e9836 | nboixVerne/or-tools | /ortools/glop/revised_simplex.cc | C++ | cc | 152,245 | permissive | // Copyright 2010-2021 Google 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... |
a44bf1c5452c594a3e517972f2e4817a075b2773 | 911bf97ebbb7f5876aa66d3acaf679b245446110 | SelyanKab/chromium | /chrome/browser/password_manager/android/save_password_message_delegate.cc | C++ | cc | 6,803 | permissive | // Copyright 2020 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/password_manager/android/save_password_message_delegate.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/bro... |
851b7d5bb4b719ebd9bbb4fee064144771efd5c4 | 8ca23c2f87952c9ca83e77a95eccf9a711c6df88 | agenthunt/agdevku | /agdevku/src/executor/CreateDatabase.cpp | C++ | cpp | 273 | no_license | /*
* CreateDatabase.cpp
*
* Created on: 17-Nov-2009
* Author: shailesh
*/
#include "CreateDatabase.h"
CreateDatabase::CreateDatabase() {
// TODO Auto-generated constructor stub
}
CreateDatabase::~CreateDatabase() {
// TODO Auto-generated destructor stub
}
|
2aefe4aeadb2266b139bd9f30619f6ce45e67b17 | 0730ad70a2cf9815dad691671e3ebc750ae0a2f4 | HareshPrasannha/PYNQ-Z1_projects | /HLS_proj/proj_5_simple_ACP/simple_ACP/solution1/sim/autowrap/testbench/mod_data.cpp_pre.cpp.tb.cpp | C++ | cpp | 15,261 | no_license | // ==============================================================
// File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2016.3
// Copyright (C) 1986-2016 Xilinx, Inc. All Rights Reserved.
//
// ==============================================================
#1 "A:/COMP_ARCH/PYN... |
e737b4263afed3d9e7c5d08bec81f3c32e14c5aa | 4c675f7251b04524bf99485f2d05d9490d3575be | mimetikxs/ofxOrbbecAstra | /libs/astra/include/astra/streams/Hand.hpp | C++ | hpp | 6,349 | no_license | // This file is part of the Orbbec Astra SDK [https://orbbec3d.com]
// Copyright (c) 2015-2017 Orbbec 3D
//
// 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/licens... |
86d8345821a35c82ac299700e351a63cfb58db4a | fd54ad1355403b0f53008b58de6814a3aa1d2096 | dibery/UVa | /vol125/12592.cpp | C++ | cpp | 357 | no_license | #include<iostream>
#include<map>
using namespace std;
int main()
{
int slogan, query;
string to, from;
map<string,string> dict;
for( cin >> slogan, cin.get(); slogan--; )
{
getline( cin, from );
getline( cin, to );
dict[ from ] = to;
}
for( cin >> query, cin.get(); query--; )
{
getline( cin, from );
... |
bee2560359da3d71dab994615255df173ec93c09 | 4d2c4fb22b58de809ed52e3464f5bc40d884816b | ksekimoto/llvm-project | /mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp | C++ | cpp | 34,709 | permissive | //===- SparseTensorDialect.cpp - Sparse tensor dialect implementation -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
4efd96d2756e698cf3b4e15aa84f7527992c0ddf | 575c056e5789bea03922ab5c52686d8f84b3819b | AhmedMostafa16/swift | /stdlib/public/Concurrency/Task.cpp | C++ | cpp | 42,545 | permissive | //===--- Task.cpp - Task object and management ----------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
fd4dcfb529e226b353433e87e23413964f175494 | 2c72e886898d93bc7b04e7e587ea3b43f58e0919 | SignalK/SensESP | /src/sensesp/transforms/median.cpp | C++ | cpp | 1,339 | permissive | #include "median.h"
namespace sensesp {
Median::Median(unsigned int sample_size, String config_path)
: FloatTransform(config_path), sample_size_{sample_size} {
load_configuration();
buf_.reserve(sample_size_);
buf_.clear();
}
void Median::set_input(float input, uint8_t inputChannel) {
buf_.push_back(inpu... |
7fad8aa5e0201cb2e0bfba9dc09b5e6b6a2004bd | a71d1a3f8c72fa018ba8011b44e848cb67bc9cf0 | jeras/sockit_spi | /src/spi_tb.cpp | C++ | cpp | 1,712 | no_license | #include "Vspi.h"
#include "verilated.h"
#include "verilated_vcd_c.h"
// global time variable
unsigned int n=0;
unsigned int t=0;
// global pointer to top module
Vspi* top;
// global trace file pointer
VerilatedVcdC* tfp;
// dump variables into VCD file and toggle clock
void clk_tgl () {
tfp->dump (n++);
top->... |
4c40f3c2b55ab9b05d3802c8757c8403e0a8694e | aabe2bf8a8bf7e23dd1170c34f3a04fc01cdb47e | thetanyasrivastava/LeetCode | /54_SpiralMatrix.cpp | C++ | cpp | 1,457 | no_license | class Solution {
public:
/*
Using Four Pointer Solution, T.C. = O(n)
1. Four pointers: top,down,left,right
2. Four Directions: 0,1,2,3
dir 0 = left to right
dir 1 = top to down
dir 2 = right to left
dir 3 = down to top
*/
vector<int> spiralOrder(vector<vector<int>>... |
7bc49353bf3739252a0735574a16f2892b7e7354 | 3163fae3051ac25cfa576ba627b7519b6998d2a8 | bencz/Zinnia-lang | /Libraries/ZinniaCore/StandardC.cpp | C++ | cpp | 338 | permissive | #include <stdio.h>
extern "C"
{
FILE *System_StandardC_stdin_get();
FILE *System_StandardC_stdout_get();
FILE *System_StandardC_stderr_get();
}
FILE *System_StandardC_stdin_get()
{
return stdin;
}
FILE *System_StandardC_stdout_get()
{
return stdout;
}
FILE *System_StandardC_stderr_get()
{
... |
b8e9fecd3331cfe577f15d7316d003e3a3fe561b | 10dc051f34288296c2d3ce90db3a962f194621fe | hjw21century/boostTest | /boostTest/boostIntger/static_min_max_test.cpp | C++ | cpp | 3,558 | no_license | // Boost static_min_max.hpp test program -----------------------------------//
// (C) Copyright Daryle Walker 2001.
// 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 for most re... |
1129fafcf5edfe17c491f7b35decbf0708ba6995 | b8a6328f582cd9a2f09d19318db106310986c97c | benlarsendk/DrinkController | /AdminPC/src/client.cpp | C++ | cpp | 1,258 | no_license | #include "client.h"
#include <iostream>
Client::Client()
{
portno = 7913;
server = gethostbyname("10.9.8.2");
}
void Client::send(std::string dataIn){
std::cout << "Trying to send: " << dataIn << std::endl;
char data[2048];
strcpy(data,dataIn.c_str());
sockfd = socket(AF_INET, SOCK_STREAM,... |
ea7266c0bd61f2d653f95ff6d98f94601b3e1d94 | 489330de1bad15f683089c1079398fa3fd2f031d | atzenn/VERGE | /src/test/limitedmap_tests.cpp | C++ | cpp | 2,762 | permissive | // Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2018-2018 The VERGE Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <limitedmap.h>
#include <test/setup_common.h>
#include <boost... |
f7d9e1e68d19aac0b6a651b0fada684a905d6703 | e466ba5ccac26cfb95f0af4e13377c0a51b78a79 | lalitprajapati22/Artificial-Intelligence-program | /aiprogram7.cpp | C++ | cpp | 1,852 | no_license | // C++ program to print DFS traversal from
// a given vertex in a given graph #include<iostream> #include<list>
using namespace std;
// Graph class represents a directed graph
// using adjacency list representation class Graph
{
int V; // No. of vertices
// Pointer to an array containing
... |
f9fec322c8f3e6d9dc35b32a02813fa49c5c4b25 | 091a7a10bb1dfb4076d3a257b2a87837383d65d6 | queid7/mmh | /PyCommon/external_libraries/BaseLib/math/bitVectorN.cpp | C++ | cpp | 8,784 | no_license | #include "stdafx.h"
#include "mathclass.h"
#include ".\bitvectorn.h"
#include "FuzzyCluster.h"
bitvectorn::bitvectorn()
{
m_nSize=0;
}
bitvectorn::bitvectorn(const bitvectorn& other)
{
m_nSize=0;
this->operator =(other);
}
bitvectorn::bitvectorn(const vectorn& other)
{
m_nSize=0;
this->operat... |
64941148d0651669d141c4ca8a172c5540b657a0 | 5bcdbaa7017ceb83d6243612332e283a3b7ee0de | liupengsyk/UTS_NEW | /Framework/UTS_Sensor/SensorDriver/S5K4H8YX/S5K4H8YX.cpp | C++ | cpp | 2,862 | no_license | #include "StdAfx.h"
#include "S5K4H8YX.h"
#include "CommonFunc.h"
//-------------------------------------------------------------------------------------------------
S5K4H8YX::S5K4H8YX()
{
name = _T("S5K4H8YX");
sensorType = Sensor_S5K4H8YX;
sid_len = 5;
}
//-------------------------------------------------------... |
3c278b91f82dfb7dddeac73714d9c64b68320193 | f513f3459cfc99d393c85d41dee432c76ee26d44 | Zero-Fanker/ECSE | /Gluttonous Snake/MPL/Interface.hpp | C++ | hpp | 1,432 | no_license | #pragma once
#include <type_traits>
#include "./Type.hpp"
#include "./TypeList.hpp"
#include "./Rename.hpp"
#include "./Concat.hpp"
#include "./Map.hpp"
#include "./TypeListOps.hpp"
#include "./Repeat.hpp"
#include "./IndexOf.hpp"
#include "./Count.hpp"
#include "./ContainsAll.hpp"
#include "./Filter.hpp"
#include "./... |
94f9aed37f6ca9b6e712c3fa51befe6edfefbf89 | 6d48a81875b00f5b142a1ce4a18408db64b43ff6 | germix/os-applications | /app/BuddySystem-v2/src/BuddySystem.cpp | C++ | cpp | 2,583 | no_license | #include "BuddySystem.h"
#include "BuddyNode.h"
#ifndef NULL
#define NULL 0
#endif
#include <QDebug>
#include <math.h>
#include <time.h>
BuddySystem::BuddySystem(int mem)
{
root = new BuddyNode(mem);
}
BuddySystem::~BuddySystem()
{
delete root;
}
void BuddySystem::init(int mem)
{
delete root;
root = new BuddyN... |
e5824d79d8517509d5cd89cf2c11b479a1624604 | d5b54a389a66878aff2142ae77b2364c99cf14bc | CreativeLabs0X3CF/Sprout | /sprout/generator/generated_value.hpp | C++ | hpp | 1,958 | permissive | /*=============================================================================
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
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.tx... |
df5e947e980fa9f5ca5995ca1b281896908cfef1 | a048c09bed9401e4fd06a06b4a62a38e923ed3b4 | harvard-acc/gem5-aladdin | /src/systemc/ext/channel/sc_fifo.hh | C++ | hh | 6,610 | permissive | /*
* Copyright 2018 Google, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer;
* ... |
2c173eca1c0b9a0880af599cb8703974bda7ffd9 | dc9b9f779354717f4368f913731b04d866b38932 | KaziShoaib/NumericalMethods-IIUC | /assignment 1/qutient.cpp | C++ | cpp | 1,006 | no_license | #include<iostream>
using namespace std;
int n, a[100], b[100], xr;
void input(void)
{
int i;
cout<<"input degree of equation : ";
cin>>n;
cout<<endl;
for(i=n;i>=0;i--)
{
cout<<"input co-efficient of x^"<<i<<" : ";
cin>>a[i];
}
cout<<endl;
cout<<"input a root of the... |
d7e199ce3ce32f6e6489121bc1609d3c027985d0 | 6461b3720e114abc9f96ed53f5ac1ea85b1d5e0e | reactgodx/glnext | /glnext/glnext.cpp | C++ | cpp | 7,764 | permissive | #include "glnext.hpp"
#include "binding.cpp"
#include "buffer.cpp"
#include "compute_pipeline.cpp"
#include "debug.cpp"
#include "extension.cpp"
#include "framebuffer.cpp"
#include "group.cpp"
#include "image.cpp"
#include "info.cpp"
#include "instance.cpp"
#include "loader.cpp"
#include "render_pipeline.cpp"
#include... |
0e171fdd1f7fab0e0e3b05374a3ba5641d7981a1 | 46ff962c80191071061e17ca94ede474b1190b73 | FlorianChevassu/aMNIT | /llvm/tools/clang/tools/clang-model-generator/src/CMG/model/Type.cpp | C++ | cpp | 708 | no_license | #include "CMG/model/Type.h"
namespace CMG {
Type::Type() {
}
Type::~Type() {
}
bool Type::isConst() const {
return m_isConst;
}
bool Type::isReference() const {
return m_isReference;
}
bool Type::isPointer() const {
return m_isPointer;
}
/*Type& Type::getUnderlyingType(){
return *m_underlyin... |
159304f3bd96ca64b45289c9e70360591c43e65a | 0c442789d41f65b7a9d96beecd58820ab9b6ce16 | saphirus87/SGA_ProjectRPG | /FlowerEngine/Application/ComCharacter.cpp | C++ | cpp | 9,956 | no_license | #include "stdafx.h"
#include "ComCharacter.h"
#include "ComObjMap.h"
#include "ComChrControl.h"
#include "ComFollowTarget.h"
#include "ComChrEquipment.h"
#include "ItemInfo.h"
#include "ComEquipment.h"
#include "ComUIInventory.h"
#include "ComSmallderonAI.h"
#include "IChrState.h"
#include "ChrStateStand.h"
#include "C... |
a7cdcd0c716f50877f8394feada8e690a2e51000 | 29c3f050eba8d6132c1507f79b39966480b135d6 | cezyr0511/Bless_DirectX | /Engine/Utility/Codes/SphereCollider.cpp | C++ | cpp | 3,244 | no_license | #include "SphereCollider.h"
USING(Engine)
Engine::CSphereCollider::CSphereCollider(LPDIRECT3DDEVICE9 pGraphicDev)
: m_pGraphicDev(pGraphicDev)
{
m_tSphere.pMesh = NULL;
m_tSphere.pAdjacency = NULL;
ZeroMemory(&m_tSphere, sizeof(SPHERE));
m_pGraphicDev->AddRef();
}
Engine::CSphereCollider::CSphereCollider(cons... |
d87ff8c869cd8017e4db43f8bd884a3b688440e2 | eb52b950f22fc6bd581f81ab461d19f6665a41c7 | Nicky-Jones/Bubble-Collision-Detection-Algorithms | /src/TreeStructure.cpp | C++ | cpp | 1,797 | no_license | #include <TreeStructure.h>
//TreeNode Constructor
TreeStructure::TreeStructure(Vector2 position, Vector2 size, TreeStructure* parent)
{
this->position = position;
this->size = size;
this->parent = parent;
}
// Creates and positions the 4 child nodes and places them into an array of childNodes
TreeStructure* TreeStr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.