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
62d054bbf2bda741fb1ec6894fbc78e3b8ebb9be
b88fe54579f26c2ddc6164bdf9857c6b4157ef7e
Findblocks/Encocoin-Master
/src/wallet/rpcdump.cpp
C++
cpp
54,196
permissive
// Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2018 The Encocoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "base58.h" #i...
94214e0cc9310fc868ae20e52f0b6cf22a896cab
6436535ce7552e54dc9af8e6b5b31639d48bbab9
leite0407/SolucoesONI
/introdutorios/A.cpp
C++
cpp
315
no_license
/* ano: introdutorios fase: introdutorios problema: A pontos: 100 autor: Manuel Leite linguagem: C++ topicos: url do problema: http://oni.dcc.fc.up.pt/loop/guias/inicial/oquesao/ url da solucao: */ #include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; cout << N / M << '\n'; }
e125c345f6cd11002d3224ff4e1d9988373a788d
d05e3ffd3c583625c71693e6b6538b7f6419e850
skywind3000/directx9-samples
/Chapter 10/PointLightDemo/PointLightDemo.cpp
C++
cpp
13,173
no_license
//============================================================================= // PointLightDemo.cpp by Frank Luna (C) 2005 All Rights Reserved. // // Demonstrates an animated point light. // // Controls: Use mouse to orbit and zoom; use the 'W' and 'S' keys to // alter the height of the camera. //==...
890223fa426eee62fe8f752d2f85050c5aaf2ed3
648f9293a016430e93318e9bba09423d9616e0a0
smartdevice475/sdl_core_v3.6_wince
/src/components/dbus/src/dbus_message.cc
C++
cc
7,167
no_license
/* Copyright (c) 2014, Ford Motor Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of condition...
132c3665729a7ea8284a6797a2212014f20e4a64
3c6e2f01332420915241a8ded06d98271cac2ccd
niuxu18/logTracker-old
/second/download/rsync/gumtree/rsync_old_hunk_654.cpp
C++
cpp
263
no_license
* allocate a new file list */ struct file_list *flist_new(void) { struct file_list *flist; flist = (struct file_list *) malloc(sizeof(flist[0])); if (!flist) out_of_memory("send_file_list"); flist->count = 0; flist->malloced = 0; flist->files = NULL;
2aa6b51741baa869649bfddfcb099cde01edd226
ef7eb69d603c5cded1bf377a285c290c5b1c182e
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/inetsrv/iis/admin/logui/logodbc.cpp
C++
cpp
6,898
no_license
// LogODBC.cpp : implementation file // #include "stdafx.h" #include <iadmw.h> #include "logui.h" #include "LogODBC.h" #include "CnfrmPsD.h" #include "wrapmb.h" #include "metatool.h" #include <iiscnfg.h> #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ////////////////...
13969b690d74c0f76e15226c1d08c77c803a299a
3a7da05f6521729514da54221adaf264be48ad82
zhaitianyong/slam_algorithm
/Optimization/gauss_newton.cpp
C++
cpp
3,493
no_license
// // Created by atway on 2020/7/7. // #include <iostream> #include <opencv2/opencv.hpp> #include <eigen3/Eigen/Core> #include <eigen3/Eigen/Dense> using namespace std; // 创建数据 void createData(double* weights, std::vector<double>& xData, std::vector<double>& yData){ int N=100; double sigma = 1.0; cv::RNG ...
acfbd0a49f35159a1437dca7628dba596f69b0c9
9c4ab491826d5566e7af45279ee12250dafd4362
wallysonSilva/codigos-uri-judge
/1074.cpp
C++
cpp
616
no_license
#include <iostream> using namespace std; int main(){ int quant, x; cin>>quant; int guarda[quant]; for(int i=0; i<quant; i++){ cin>>guarda[i]; } for(int i=0; i<quant; i++){ if( guarda[i]!=0 && (guarda[i]%2)==0){ cout<<"EVEN"; } else if((guarda[i]%2)...
d5b931f8c4adb4749bbea2811913f8f48e2057bf
da1459cf713342391b027742e07821ca7b238c6a
BuckeyeSoftware/rex
/src/rx/image/matrix.cpp
C++
cpp
6,021
permissive
#include "rx/image/matrix.h" namespace Rx::Image { static constexpr const Float32 SRGB_8BIT_TO_LINEAR_FLOAT[] = { 0.0f, 3.03527e-4f, 6.07054e-4f, 9.10581e-4f, 0.001214108f, 0.001517635f, 0.001821162f, 0.0021246888f, 0.002428216f, 0.002731743f, 0.00303527f, 0.0033465358f, 0.0036765074f, 0.004024717f, 0.004391442f,...
dabbc4d92480298e701543ba2c5e9a271c74f741
438f53f18a831e472fc36016d9fa1721065d2f95
algrandc/FairShip
/EmShield/EmShieldPoint.cxx
C++
cxx
1,579
no_license
#include "EmShieldPoint.h" #include <iostream> using std::cout; using std::endl; // ----- Default constructor ------------------------------------------- EmShieldPoint::EmShieldPoint() : FairMCPoint() { } // ------------------------------------------------------------------------- // ----- Standard construc...
b1f304ccdc774872523b74c4a529c2536bd03060
f3ec1f05beb98174969e717ffb60c89948bc5d76
VadasCorePrj/testbench_Postech
/OpencvTest.cpp
C++
cpp
2,642
no_license
#include <iostream> #include <testbench.hpp> #include <lga.hpp> #include <precisetimer.hpp> #include "opencv2/opencv.hpp" #define DMSGN(x) do { std::cout << x << std::endl; } while(0) #define DMSG(x) do { std::cout << x << " "; } while(0) using namespace std; using namespace testbench; using namespace cv; void fil...
bb84ec8e7a98b5eb36470d8b05ae8b98e4d6340e
e7acbb6f53cc261a5acb55e7cbac50f4b411f3a9
Kaosumaru/luabind
/luabind/luabind/LuaStackStream.hpp
C++
hpp
4,064
permissive
#pragma once #include "lua.hpp" #include <cassert> #include <string> #include <vector> #include <map> namespace luabind { class LuaStackStream { public: LuaStackStream(lua_State* lua) : m_lua(lua) {} lua_State* LuaState() { return m_lua; } protected: lua_State* m_lua; }; //int inline LuaStackStream& ...
7bae169c16d1b654c44ec3b8727789af0bfdb6ef
bbf2edf464e1b70d5855559ded134044c9f5276f
galfandary/viewer
/collide.hpp
C++
hpp
25,202
no_license
#define rabs fabs #define rsqrt sqrt #define rsin sin #define rcos cos #define racos acos const double EPS0((double)1E-6); /*######################################################################*/ #ifdef DEBUG_COLLIDE # define dbg(data) fprintf data #else # define dbg(data) #endif inline double rsq(double r) { ...
5a42f55bf417ff6470b956d3149b9e1cec2732ef
1049d50bfafa377213bccf4fb3bc8f25eb31cdb5
luckydonald-backup/td
/td/telegram/CallManager.cpp
C++
cpp
5,252
permissive
// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2017 // // 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 "td/telegram/CallManager.h" #include "td/telegram/G...
7e5b1270cd668d69434d94084bb3ab46f74bc85f
4745bf38260dba3e4d188d075ed5353aa85f73a8
tgjones/DirectXShaderCompiler
/tools/clang/unittests/HLSL/ValidationTest.cpp
C++
cpp
138,170
permissive
/////////////////////////////////////////////////////////////////////////////// // // // ValidationTest.cpp // // Copyright (C) Microsoft Corporation. All rights reserved. // ...
1ff7af289df99ca19b06118e5aa39449aabea85a
cbd16db4c44d130dc182b776b6280d338d3567f2
rdxxer/SPOJ
/SWAPS3.cpp
C++
cpp
16,969
no_license
/** * SWAPS * TOPIC: Red-Black trees, range trees, range counting * status: */ #include <iostream> #include <vector> #include <memory> #include <algorithm> #include <cassert> #include <istream> #include <ostream> #include <chrono> using namespace std::chrono; class mytimer { private: high_resolution_clock::ti...
68230e273f44326818369d27207d53624e8942f9
b3df7ef699c17441b7b4260bad4c7205d59521f5
SumonAtikul/C-and-CPP-Practice
/C and C++ practice/dijk.cpp
C++
cpp
1,415
no_license
#include <stdio.h> #include <string.h> #include <utility> #include <queue> using namespace std; #define INF 0x3f3f3f3f const int MAXN = 20005; const int MAXM = 100005; typedef pair<int, int> pii; priority_queue<pii, vector<pii>, greater<pii> >q; int t, n, m, s, e; int first[MAXN], a[MAXM], b[MAXM], v[MAX...
cbad4794f070c177a568f9f3ea9b796a2832dbd7
1827b830792bca2cd6f48792b8d9d0157554031c
vient/Brewery
/Beer/BeerBuilders/BeerBuilder.cpp
C++
cpp
487
no_license
#include "BeerBuilder.h" void Brewery::Beer::BeerBuilders::BeerBuilder::setName( _In_ const std::string &_name) noexcept { name = _name; } _Ret_ const std::string Brewery::Beer::BeerBuilders::BeerBuilder::getName() const noexcept { return name; } _Ret_ std::shared_ptr<Brewery::Beer::Beer> Brewery::Beer::...
8feabe9cf50a2fea892e0112593248c6955c30ef
64e9089679829b9dd0aede6a795b0653b5b8d2fa
AdanBalcazar/ProyectoFinal
/Feria/Project1/Project1/esfera.cpp
C++
cpp
3,294
no_license
#include "esfera.h" Esfera::Esfera(GLfloat radio) : radio(radio){ esfera_VAO[4] = ( -1,-1,-1,-1 ); esfera_VBO[4] = (-1, -1, -1, -1); } Esfera::~Esfera() { glDeleteVertexArrays(4, esfera_VAO); glDeleteBuffers(4, esfera_VBO); } void Esfera::init() { const int nn = PARALELOS * MERIDIANOS * 3; GLfloat sphere_nor...
713d0a4ca9c4594d3c606c979bb7e2215601d826
0d6bda6dd545a98485b50804918519204d666a97
ygarrot/PiscineCpp
/D00/ex01/PhoneBook.class.cpp
C++
cpp
2,608
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* PhoneBook.class.cpp :+: :+: :+: ...
830a8518e1a66b25dc9019dd6d6c38be6ad8f279
7be88a59b8fab268f8fbe87b81e7a423a7de74e4
HakierGrzonzo/syncing
/AGH rulez/zad1.6/main.cpp
C++
cpp
1,145
permissive
#include<iostream> #include<vector> #include<tuple> using namespace std; class Board { public: int size; Tower *board[size][size]; Board(int _size){ size = _size; for(int i = 0; i < size; i++){ for(int j = 0; j < size; j++){ self[i][j] = Tower(i, j, *this); } } } }; class Tower { publi...
c879f6f2266238abdda2e3ce332c56d70d373145
d9bf5f170baa997a3ff99a4827d540b4f4ff71d4
Kammann123/Catan
/Catan/CatanNetworking/NetworkParsers/CardIsParser.cpp
C++
cpp
845
no_license
#include "CardIsParser.h" GenericEvent* CardIsParser::generateEvent(unsigned char byte) { GenericEvent* newEvent = nullptr; if (byte == (unsigned char)PacketHeader::CARD_IS && state == States::HEAD) { newEvent = new HeaderEvent(byte); } else if (isResourceValue(byte) && state == States::CARD) { newEvent = ne...
e8fd0f4b14e5c1e2215ffc01c0311ad8d2619386
bfef174ca087bdcbfd77b23e9cc71d6c82adedc6
crypto-wizard/MACDCoin
/src/qt/sendcoinsentry.cpp
C++
cpp
4,255
permissive
#include "sendcoinsentry.h" #include "ui_sendcoinsentry.h" #include "guiutil.h" #include "bitcoinunits.h" #include "addressbookpage.h" #include "walletmodel.h" #include "optionsmodel.h" #include "addresstablemodel.h" #include <QApplication> #include <QClipboard> SendCoinsEntry::SendCoinsEntry(QWidget *parent) : Q...
ac6b73b755ab8a2889047937b2427062d8a95f00
153cef7b12c7069202893be7f5271a2d9df556ac
Haiges/Qt
/test_widget/mainwindow.cc
C++
cc
11,423
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include <qwt_counter.h> #include <qwt_plot_panner.h> #include <qwt_plot.h> #include <QDebug> #include <QHBoxLayout> #include <qwt_legend.h> #include <qwt_plot_magnifier.h> #include <qwt_plot_zoomer.h> #include <qwt_plot_grid.h> #include <qwt_plot_marker.h> #include <Q...
8944480dd5c7e0fa89f4df2d3a1f33198d45ca49
b855bb55d2bcb48f78242258207b284d53482c95
prabhavnegi/Dsa-class
/Day6/floodFill.cpp
C++
cpp
658
no_license
class Solution { public: void dfs(vector<vector<int>>& image, int i, int j, int color, int newColor) { if (i>=0 && j>=0 && i<image.size() && j<image[0].size() && image[i][j]==color) return; image[i][j] = newColor; dfs(image, i, j - 1, color, newColor); dfs(image, i, j + 1, c...
8dc621aef9cf6888a1cc9d57f52ff41ecbf69a29
bd3669cbb990a027dcb42f3a859665c185080386
pelegri/WebKit-PlayBook
/WebKit/blackberry/Api/BlackBerryGlobal.cpp
C++
cpp
5,832
permissive
/* * Copyright (C) Research In Motion Limited 2009-2011. All rights reserved. */ #include "config.h" #include "BlackBerryGlobal.h" #include "ApplicationCacheStorage.h" #include "ApplicationCacheStorageManager.h" #include "Cache.h" #include "CacheClientBlackBerry.h" #include "CookieManager.h" #include "Credential.h"...
02927d73d5ba22e3f379f4637cf6ed9741d20cdb
e5f5960efe39c2f92e61c89ee2f4020f5d524e78
kunal121/C-And-Cpp-Questions
/Manmeet Singh/Data Structure/Class Ques/Doubly Linked List Insert Before.cpp
C++
cpp
1,795
no_license
#include<iostream> using namespace std; int length=0; struct node { int value; struct node *next; struct node *prev; }; //typedef struct node node; node *start = NULL; node *last = NULL; void create(){ node *ptr, *t; cout<<"Enter the elements for the linked list or -1 to exit\n"; while...
ffe84f4743dd0a7317f8706c14dd21e353168aca
0f35b7d8f399489e13f4ef4aa4ff336f8bf1a961
KunYi/em-works
/WINCE600/PLATFORM/COMMON/SRC/SOC/COMMON_FSL_V2_PDK1_9/IPUV3/DDRAW/halcaps.cpp
C++
cpp
21,171
no_license
//------------------------------------------------------------------------------ // // Copyright (C) 2008-2010, Freescale Semiconductor, Inc. All Rights Reserved. // THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS // AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT // //--------------...
b5d8be63b4f6ec015934b3f6a0bc7d866f17f2ad
583115638be4c6e1e71122cc11276c63c61da4c4
ethanweber/drake
/drake/examples/kuka_iiwa_arm/dev/monolithic_pick_and_place/test/monolithic_pick_and_place_system_test.cc
C++
cc
11,660
permissive
#include "drake/examples/kuka_iiwa_arm/dev/monolithic_pick_and_place/monolithic_pick_and_place_system.h" #include <vector> #include <gtest/gtest.h> #include "drake/common/eigen_types.h" #include "drake/common/test_utilities/eigen_matrix_compare.h" #include "drake/examples/kuka_iiwa_arm/iiwa_lcm.h" #include "drake/ex...
634fa8a839e09e70d4a95df2cbf908589a4884fa
ada7d153053bc4034018fbe2b6a4959d89aa8261
omarelkawokgy/Area_Coverage
/Main_Func_1.cpp
C++
cpp
29,417
no_license
#include "Robot.h" #include "MapHandler.h" #include "Scan.h" #include "OBJD.h" #include "ULSH.h" #include "MOVH.h" #include "ENCOD.h" #ifdef ENABLE_SIMULATION #include "SIMU.h" #include <iostream> using namespace std; #endif /*global variable declaration*/ Point Pointlist[POINT_LIST_SIZE]; static uint8 PointListInd...
08c6182ffb193250b4be4aae9aece4e117dd27b0
91e1c26bd4a6908c7def42356e979025b365631c
autheorial/1040proj3
/enrollments.cpp
C++
cpp
1,993
no_license
#include "enrollments.h" Enrollments::Enrollments(){ num = 0; enrollments = new Enrollment[2]; } void Enrollments::add(Enrollment newEnrollment){ Enrollment* temp = new Enrollment[num + 2]; for(int i = 0; i < num + 1; ++i){ temp[i] = enrollments[i]; } delete [] enrollments; enrollments = new Enrollment[num...
58493efe325fee45c5d962737bee1fa10fc8434d
0ec5ca707a6b5978ea84b5b15670cba0a303cbbf
ceci3/Paddle
/paddle/fluid/operators/cast_op_xpu.cc
C++
cc
2,522
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...
734bf412323317055df6228eaafa1ee6a42c02fe
d258cdfc6989ebc194eab7ea68f8766acb1c5524
Shourya742/CP
/String algorithm/z-ALGORITHM.cpp
C++
cpp
1,072
no_license
/* Pattern Matching using z algorithm and then returning the index of pattern*/ #include<bits/stdc++.h> using namespace std; void getZ(int *Z,string str) { int l=0; int r=0; int n=str.length(); for(int i=1;i<n;i++) { if(i>r) { l=i; r=i; while(r<n &...
83c2a9fadb97de6e3c4f147be920b08e06e95162
fb83b11826fbefe53d6f61c3ec3a379220a0cb94
elestranobaron/T4C-Serveur-Multiplateformes
/GameOps/PortalB.cpp
C++
cpp
2,226
no_license
#pragma hdrstop #include "PortalB.h" PortalB::PortalB() {} PortalB::~PortalB() {} extern NPCstructure::NPC IslandPortalNPC; void PortalB::Create( ){ npc = IslandPortalNPC; SET_NPC_NAME( "[7396]A shimmering portal" ); npc.InitialPos.X = 0; npc.InitialPos.Y = 0; npc.InitialPos.world = 0; } void P...
8517901a5cc2b51a0b71bc1b55c185cbc69e8319
24915a2925ab07bfed6db60a840b04cb552e1503
nattee/data2020
/03/vector7.cpp
C++
cpp
354
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; void print(vector<int> v) { cout << "Size of V is " << v.size() << ": "; for (int i = 0;i < v.size();i++) cout << v[i] << ", "; cout << endl; } int main() { vector<int> v = {9,-1,3,7,5,2,1,4}; print(v); sort(v.begin()+...
932d2cae959e9a49a57cc607bbbde393aa07fd39
b86cefa9dadeb4872ee30d47bc41dd8982baad53
vinson0526/incubator-doris
/be/src/olap/rowset/alpha_rowset_reader.cpp
C++
cpp
16,734
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
63041460b592ea9671d4aab2155184d224816e1d
c8626ecac92acc789a4498989034d5f7c240e804
Vory7/sibsutis
/5 семестр/VirtualProgramming/labs/lab7/lab7/graphicsmironenko.cpp
C++
cpp
3,073
no_license
#include "graphicsmironenko.h" void GraphicsMironenko::Init(){ QPolygon poligoneTube; poligoneTube << QPoint(0, 0) << QPoint(40, 0)<<QPoint(40, 60)<<QPoint(0, 60); QGraphicsPolygonItem* tube = addPolygon(poligoneTube, QPen(Qt::black), QBrush(QColor(102, 35, 35))); tube->setPos(400, 100); tube->se...
5e4ce5617d60fd840faf472b49ac2545bcc6ccba
72ed386b18790df5c70d4b82a225c5968698fdb0
b-xiang/CIDLib
/Source/AllProjects/CIDBuild/CIDBuild_VCppDriver.cpp
C++
cpp
29,090
permissive
// // FILE NAME: CIDBuild_VCppDriver.cpp // // AUTHOR: Dean Roddey // // CREATED: 08/29/1998 // // COPYRIGHT: Charmed Quark Systems, Ltd @ 2019 // // This software is copyrighted by 'Charmed Quark Systems, Ltd' and // the author (Dean Roddey.) It is licensed under the MIT Open Source // license: // // https://opens...
6a379b3ffdc33d5e6370254f16de146edb62aa7e
edf2d426e51df6820f6ea4c96fbdb17d6a555e83
alexbarker/set09121_workbook
/practical_3/main.cpp
C++
cpp
1,052
no_license
#include <SFML/Graphics.hpp> #include <iostream> #include "player.h" #include "levelsystem.h" using namespace sf; using namespace std; Player *player; void Load() { player = new Player(); ls::loadLevelFile("res/maze_2.txt"); for (size_t y = 0; y < ls::getHeight(); ++y) { for (size_t x = 0; x < ls::getWidth(); ...
d86a3be437d220a8e815863eb06d85d29b92f610
21f4fefacffeda25ca50c242377ac89fe90dfe85
extester/carbon
/src/carbon/unix/allocator.cpp
C++
cpp
2,287
permissive
/* * Carbon framework * Custom c++ new/delete for various classes (UNIX) * * Copyright (c) 2017 Softland. All rights reserved. * Licensed under the Apache License, Version 2.0 */ /* * Note: Dynamic memory allocations */ /* * Revision history: * * Revision 1.0, 15.02.2017 11:10:16 * Initial revisi...
51e6e3c2d950d87741c7d890e37a073b6654bc22
199ddac428e3fa342bd49cbfad3af8055598c8de
uic-evl/omegalib-evl-apps
/cerebroView_CAVE/src/ooGambit/ooGambitWriterSource.cpp
C++
cpp
3,014
no_license
#include <iostream> #include "ooGambitWriterSource.h" /*** Constructor ***/ ooGambitWriterSource::ooGambitWriterSource() {} /*** Destructor ***/ ooGambitWriterSource::~ooGambitWriterSource() {} /*** Methods - Public ***/ // create flat (primitive data types only) void ooGambitWriterSource::createFlat(string FName, v...
d9c3174d35982a77b9d81e060473b092a9c42848
89b7e417e1ee5e6962ec852bb10daba4a27af4c6
craigricker/cs163_Group1
/Paper.hpp
C++
hpp
1,065
no_license
/********************************************************************* ** Program name: Paper ** Author: Group 16 ** Date: July 24th 2017 ** Description: Includes class definition of Paper, which inherents ** from tool. Very simple class, with very little ** modificatio...
c5fa87205e9562ea85052deff178a200120a1f8d
88870dd3155bcb085c75ea664da30a047e89b445
leisheyoufu/study_exercise
/algorithm/leetcode/73_Set_Matrix_Zeroes/main2.cpp
C++
cpp
1,770
no_license
/* 73. Set Matrix Zeroes Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. */ #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; class Solution { public: void setZeroes(vector<vector<in...
6deb5485e9381a9afebcc4085d38158c27b43d73
f223cadb1b4d48d10e59a7f68e8ce449eb43925b
ArmenHovhannisyan1998/Matrix---vector
/Project47/Source.cpp
C++
cpp
1,185
no_license
#include <iostream> #include <random> using namespace std; int Input(int **arr, int n); void Out(int **arr, int n, int *_arr, short temp); void Calc(int **arr, int n, int *_arr); int main() { int n; cin >> n; int **arr = new int *[n]; short temp=Input(arr, n); int *_arr = new int[temp]; Calc(arr, n, _arr); Out(a...
19fcabd644930f6c1a55e4a2dd88123787964d00
5662ff5e295db80ed5b1d7329164842d7d0b4dd1
nrwade/CS311
/HW1/main.cpp
C++
cpp
293
no_license
// testing main #include "birthday.h" #include <iostream> using namespace std; int main() { Birthday dflt; Birthday mine("nicole wade", 9, 4); cout<< "default values in toString " << dflt.toString()<< endl; cout << "my values in toString " << mine.toString() << endl; return 0; }
a3dcbca297d6f52f1488f9cc6a458b97a4ee8ff8
75d01196b8b249b5384f2acd731667b7c975c58f
davenso/Seeglass
/Classifier.cpp
C++
cpp
4,254
no_license
#include "stdafx.h" #pragma once #include "Classifier.h" #include <ctime> #include "FeatExtractor.h" #include "DimReducer.h" using namespace std; using namespace cv; string algori = "EM"; EM em_model; //EM model TermCriteria termCritaria; //EM termination critaria Mat asRowMatrix(const vector<Mat>& src, i...
39e6298a58cd23d5c16b553ead58205278b056c3
185f19b2d6da58ffd3c25a75984c1affb5e030dd
turgu1/pubsubclient
/tests/src/receive_spec.cpp
C++
cpp
6,800
permissive
#include "PubSubClient.h" #include "ShimClient.h" #include "Buffer.h" #include "BDDTest.h" #include "trace.h" byte server[] = { 172, 16, 0, 2 }; bool callback_called = false; char lastTopic[1024]; char lastPayload[1024]; unsigned int lastLength; void reset_callback() { callback_called = false; lastTopic[0] ...
4dfb29bcdd4adac3f6c077c3e7be2fefc96ddf13
4427a76486382a8b1cf9b6fb04d124431362d200
laserpilot/ofxHTTP
/libs/ofxHTTP/src/DefaultProxyProcessor.cpp
C++
cpp
4,089
no_license
// ============================================================================= // // Copyright (c) 2013 Christopher Baker <http://christopherbaker.net> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal //...
ebf8a5415c49edb0c7b9af3c8f9cc87522deca38
7b8aaa2a90e5378798719186ab7b59ae4a9e32e2
Gui-Lima/Ray-Tracer
/Object/Material.cpp
C++
cpp
320
no_license
// // Created by guila on 17/11/18. // #include "Material.h" Material::Material(Vec3 color, float ks, float kd, float ke, float alpha) { this->color = color; this->ke = ke; this->alpha = alpha; this->ks = ks; this->kd = kd; } Vec3 Material::getNormalizedColor(){ return this->color/255.0; }
f2ce191e4641e79d623b2b4682575a9df29ce785
060edc4eb38200c7f206bbf8ffb2c1f2183166b2
AM-Darshan/Compitaive-Programming
/level2/A_System_of_Equations.cpp
C++
cpp
2,017
no_license
#include<bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i,n) for(i=0;i<n;i++) #define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1) #define ll long long #define pb push_back #define mp make_pair #define F first #define S second #define all(x) x.begin(), x.end() #define clr(x) memse...
2eedb84ff2d8a02a5b5dd4f95c292f6b6ed80b51
22196af91f6df9f518f6b7c8c079ccfb99c0fa88
dgsw-2019-hackathon/han_story
/해커톤- WinAPI/해커톤- WinAPI.cpp
C++
cpp
28,147
no_license
// 해커톤- WinAPI.cpp : Defines the entry point for the application. // #pragma warning(disable:4996) #include "framework.h" #include "해커톤- WinAPI.h" #include <sstream> #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance WCHAR szTitle[MAX_LOAD...
a5e7959617d7d217333b926b43c214fa786e4340
8c132f1a66691efa0cbf9126194992de5e376981
wangxiaose/FrameTest
/lequc/LQBaseData.cpp
C++
cpp
4,535
no_license
// // LQBaseData.m // CZSQ // // Created by chenli on 12-11-22. // Copyright (c) 2012年 LequGame. All rights reserved. // #include "LQBaseData.h" #include "LQStringExtend.h" using namespace cocos2d; IMPLEMENT_CLASS(LQBaseData) LQBaseData::LQBaseData():_tipMaps(NULL) { ////////////////////////////// } LQBas...
448a9457289a1e011eca409204878c9128bcd9f2
fd115c5f22f93d55707d555676eafb3206d766da
anish-sk/Codeforces-Problems-Solutions
/contest/1543/d2/d2.cpp
C++
cpp
6,344
no_license
/* Generated by powerful Codeforces Tool * You can download the binary file in here https://github.com/xalanq/cf-tool (Windows, macOS, Linux) * Author: anish_sk * Time: 2021-07-07 20:05:02 **/ #include<bits/stdc++.h> #include<iomanip> #include <ext/pb_ds/assoc_container.hpp> //required #include <ext/pb_ds/tree_polic...
838f4f29def1431cd3983373fcd67ae32e8e85ef
74524a113abadcaa83aafbe008b1eb4792bcc0c2
salilkanetkar/AI-Playing-Games
/Code/GameSDK/GameDll/GameCodeCoverage/GameCodeCoverageManager.cpp
C++
cpp
40,128
no_license
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license belo...
68f2a146282b57f709c2e9618df5c893e3f47835
0afbb6b5f6c9806b9faa16dfce1be0c5de3ba326
Kamaropoulos/FEX
/External/FEXCore/Source/Interface/Core/LLVMJIT/LLVMCore.cpp
C++
cpp
156,861
permissive
#include "Interface/Context/Context.h" #include "Interface/Core/DebugData.h" #include "Interface/Core/LLVMJIT/LLVMMemoryManager.h" #include "Interface/HLE/Syscalls.h" #include <FEXCore/Core/CPUBackend.h> #include <llvm-c/Core.h> #include <llvm/ExecutionEngine/ExecutionEngine.h> #include <llvm/InitializePasses.h> #inc...
7a1b1246792b51d6673cfa52b88520d9decec13f
b4ec92d2d7608b066fa95febccb87a063442316f
hinike/ds_cinder
/src/ds/ui/touch/touch_mode.cpp
C++
cpp
2,599
no_license
#include "stdafx.h" #include "touch_mode.h" #include <boost/algorithm/string.hpp> #include <ds/cfg/settings.h> namespace ds { namespace ui { bool TouchMode::hasTuio(const TouchMode::Enum &mode) { return mode == TouchMode::kTuio || mode == TouchMode::kTuioAndMouse || mode == TouchMode::kAll; } bool T...
7b53784d9fa6a02cbcf2c711f385d47ff1648b4e
f5fd8ef116b7fcbad74a06dfb3a16ac7b8a61a85
ttyang/sandbox
/sandbox/assign_v2/boost/assign/v2/ref/aux_/list/policy.hpp
C++
hpp
1,219
no_license
////////////////////////////////////////////////////////////////////////////// // Boost.Assign v2 // // // // Copyright (C) 2003-2004 Thorsten Ottosen // // ...
7a2c53286e82c6614603d552c3fb4022dedd019d
7df5895de2f6e18b2738c58802faa1fb066de9c5
violetForeden/chromium
/storage/browser/file_system/sandbox_file_system_backend.cc
C++
cc
6,419
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 "storage/browser/file_system/sandbox_file_system_backend.h" #include <stdint.h> #include <memory> #include <utility> #include "base/bind.h...
d6f5e689cfc5047e003d3bbc11803607ba1786f3
258d5009da2789be426318f9704510ea01b0b3c7
kmorel/VTK
/Views/Testing/Cxx/TestTreeRingView.cxx
C++
cxx
3,720
permissive
/*========================================================================= Program: Visualization Toolkit Module: TestTreeRingView.cxx ------------------------------------------------------------------------- Copyright 2008 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Co...
07436d4601098d669768ab2a4fef6dbbf150d1bc
68f254b4a586689b0f9cae0eed74c1ebf5e0c507
ArimaTakeshi/ArimaTakeshi
/吉田学園情報ビジネス専門学校_有馬武志/Hackathons3_1年_うつす/開発環境/billboord.cpp
C++
cpp
13,179
no_license
//============================================================================= // // ポリゴン処理 [billboord.cpp] // Author : 有馬 武志 // //============================================================================= #include "billboord.h" //ビルボード #include "shadow.h" //影 #include "effect.h" //*****************************...
1cd1c318fbcd18373e880848ca49159d1dc94135
1decd3889b6b67cf01447b56bfce4fb6851c7e21
pkucherov/angle
/src/libANGLE/renderer/gl/egl/FunctionsEGL.cpp
C++
cpp
18,194
permissive
// // Copyright 2016 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // FunctionsEGL.cpp: Implements the FunctionsEGL class. #include "libANGLE/renderer/gl/egl/FunctionsEGL.h" #include <algorithm> #include "co...
3ac2402f1bc07cf4bb220acbcc46ceac006b0689
cd500ea69f5b702617989922992373fe1bd4c29d
sliu3/GCodeGenerator
/Dialoge/dialog_kommentar.cpp
C++
cpp
1,460
no_license
#include "dialog_kommentar.h" #include "ui_dialog_kommentar.h" Dialog_Kommentar::Dialog_Kommentar(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog_Kommentar) { ui->setupUi(this); openToModifyData = false; ui->pushButton_OK->setDefault(true); } Dialog_Kommentar::~Dialog_Kommentar() { delet...
f6b3dd1e55b61a59635151fe82ef16d0a13ccf46
8f75cecb83964abb325dfde86b883c954ddd127a
tangyao0792/ACM_Solutions
/UvaOj/uvaoj301.cpp
C++
cpp
1,727
no_license
#include<iostream> #include<cstring> #ifndef ONLINE_JUDGE #include<cstdio> #endif using namespace std; int cap; //火车容量 int dest; //终点 int ord; //票务请求量 int nMax; int order[25][3]; //[0]记起点,【1】终点,【2】数量 int vis[25]; //表示当前站的人数 void dfs(int cur, int sum); /...
bd0fb3416b6ad1329c8d46d1a31f8d96188ddcb0
85b8d9c16f804ddbfabcd5af0dd52a7a2cc93de0
ThomasLengeling/TheNatureOfCodeCinder
/PhysicsLibraries/MouseJoint/src/Boundary.cpp
C++
cpp
615
no_license
#include "Boundary.h" #include "Convert.h" using namespace ci; Boundary::Boundary(b2World * _world, Rectf _rect) { world = _world; rect = _rect; b2BodyDef bd; bd.type = b2_staticBody; b2Vec2 p = Convert::toPhysics(rect.getCenter()); bd.position.Set(p.x, p.y); body = world->CreateBody(&bd); b2Pol...
b4aaa84fb49a0675dde8a6b820d2ae8ab5f0a59d
3284c726680d637134e11b178b4165fd318db43b
onikko/fightgame
/SkinMesh/CLoadPMX.cpp
C++
cpp
37,838
no_license
//============================================================ //! @file CLoadPMX.cpp //! @brief PMXロードクラス //! @note LastEdited // //! @author OH教務部ゲーム学科有志 //============================================================ #include "CLoadPMX.h" #include <iostream> #include <fstream> // テキストデータをシフトJISに変換して取得 __inline ...
167003e79777c6af2b0ca5ef033b8fc2561ab62c
0e4fe41c168202d937905c57d780ed017278a5f3
KqSMea8/sstd_library
/sstd_boost/sstd/libs/python/test/object_fail1.cpp
C++
cpp
313
permissive
// Copyright David Abrahams 2002. // 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 <sstd/boost/python/object.hpp> int f(boost::python::object const& x) { x._("hello") = 1; return 0; }
d818ba71b1d782a0bc05360b0fba41aefc7333de
8510172da6ae070a67f86509e7db62b3c97528ea
Rajat-Goyal/all-over-again
/cf/624C.cpp
C++
cpp
2,098
no_license
#include<iostream> #include<bits/stdc++.h> #define pb push_back using namespace std; int main(){ ios::sync_with_stdio(false); int n,m,u,v,flag=0,a=0,b=0,c=0,noa=0,nob=0,noc=0; cin>>n>>m; vector<int>adj[1000]; for(int i=1;i<=m;i++){ cin>>u>>v; adj[u].pb(v); adj[v].pb(u); ...
1cfd3b6c81d5939db44a7445d9ddbbb0b6cb6637
70bc93fe790a4e17e6a37de4ed41a38ddd56a386
matooo92/redex
/libredex/IRList.cpp
C++
cpp
18,658
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 "IRList.h" #include <iterator> #include <vector> #include "DexUtil.h" #include "IRInstruction.h" MethodItemEntry::Metho...
a8767c05cdb5be2f0b6ad78abaa7130fa020838b
19ccea9190b5559dac1f1061c4094676018c0c4e
webstorage119/QT-qroilib2
/qroilib/engine/blob.cpp
C++
cpp
27,351
no_license
/************************************************************************ Blob.cpp - FUNCIONALITAT: Implementaci?de la classe CBlob - AUTOR: Inspecta S.L. MODIFICACIONS (Modificaci? Autor, Data): FUNCTIONALITY: Implementation of the CBlob class and some helper classes to perform some calcul...
f1d95eb26dd75f797b00b143f4b0d381b5c2a4ed
89d5a7f478efd8a8207cef28080bb084f7027971
ztang7/MCNR
/src/RcppExports.cpp
C++
cpp
3,552
no_license
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <FLasher.h> #include <RcppEigen.h> #include <Rcpp.h> using namespace Rcpp; // MH_cal Eigen::MatrixXd MH_cal(NumericVector theta0, NumericVector x0, NumericMatrix y0, NumericMatrix ...
b298324531e603c99d42dc53513b7323246074b2
c0ed93f4b17279b1dc2568b06d4699b2796c104c
planbcoin/planbcoin
/src/script/script_error.cpp
C++
cpp
4,468
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The PlanBcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "script_error.h" const char* ScriptErrorString(const ScriptError serror) {...
63fff440bddbbd134f325c195d25081f3e8f84a9
3d3a9256b23e5d93e2350ec583efbad929959428
bkahlert/seqan-research
/raw/pmsb13/pmsb13-data-20130530/sources/hyqvtx6if8lgp35y/2013-04-09T10-56-20.506+0200/sandbox/my_sandbox/apps/first_app/first_app.cpp
C++
cpp
1,199
permissive
#include <iostream> #include <seqan/file.h> #include <seqan/sequence.h> template <typename TSubText, typename TPAttern> int computeLocalScore(TSubText const & subText, TPattern const & pattern) { int localScore = 0; for (unsigned i = 0; i < seqan::length(pattern); ++i) if (subText[i] == pattern[i]) ...
d233c242695dc23bf3c226c105916f029b334212
ec2253280e7579f82de282199d1374873bbb34d0
bkerler/gr-iridium
/python/bindings/iridium_frame_printer_python.cc
C++
cc
1,670
no_license
/* * Copyright 2022 Free Software Foundation, Inc. * * This file is part of GNU Radio * * SPDX-License-Identifier: GPL-3.0-or-later * */ /***********************************************************************************/ /* This file is automatically generated using bindtool and can be manually edited */ /* ...
04178bf58805eccbcde497bfb4d155b76824fa9f
bab97109c5dcf564e1dc3c57a9c713f0d351bc8e
Dumpgrah/HellRetex_Official
/H2A/HRW/Melee/HRW_ModernAxe/HRW_ModernAxe.hpp
C++
hpp
2,460
no_license
class HRW_ModernAxe_Base: FirefighterAxe { scope=0; model = "H2A\HRW\Melee\HRW_ModernAxe\HRW_ModernAxe.p3d"; repairableWithKits[] = {4}; repairCosts[] = {20.0}; rotationFlags = 12; weight = 1160; itemSize[] = {2,7}; itemBehaviour = 2; fragility = 0.01; inventorySlot[] = {"Shoulder","Melee"}; lootCategory = "...
64f02852e5c49c11ed678f4efdd53ecc0f80a6fd
5a362123a2a4b98cc55acedab545d21d2bba9293
AmibisLabs/amibis-cpp
/Messaging/StructuredMessage.cpp
C++
cpp
5,160
permissive
#include <Messaging/StructuredMessage.h> using namespace std; using namespace Omiscid; /** @brief Constructor */ StructuredMessage::StructuredMessage() : Serializer() { } /** @brief Constructor */ StructuredMessage::StructuredMessage( const SerializeValue& SerValue ) { Serializer = SerValue; } /** @brief C...
9f5d8125fa760508c3372f294a186a4fd505a65b
361bf27ee3c72e4d3445f6f83b72e6cbe3a24cbe
YCLTW1995/Operating-System-Practice
/NachOS-4.0_ProcessScheduling/code/network/post.cc
C++
cc
11,521
permissive
// post.cc // Routines to deliver incoming network messages to the correct // "address" -- a mailbox, or a holding area for incoming messages. // This module operates just like the US postal service (in other // words, it works, but it's slow, and you can't really be sure if // your mail really got through!). // // N...
c805fb012c80612d4af70d18b034dd22dae3aca3
e3be32f2a295a8f7319b1ef19fdc400405451127
dqtweb/aixue2
/ aixue2/WeiWeiClient/thirdparty/Theron/Benchmarks/ActorOverhead/Main.cpp
C++
cpp
1,280
permissive
// Copyright (C) by Ashton Mason. See LICENSE.txt for licensing information. // // This benchmark is a simple test of the memory overhead of Actor objects within Theron. // Because user actor classes must derive from the Theron::Actor baseclass to be // valid actors, they inherit some internal state provided by...
1ae4c4c42649726076f79b167305f4b146dfa13f
9e30439fbf020546d16fadf11462a721f5a47d0a
Szelethus/cpp_courses
/2022-23-1/monday12-14/05gy/pm.cpp
C++
cpp
565
no_license
#include <iostream> // (1) Mit ir ki az alábbi program? void f(const int (&t)[5]) { std::cout << "1.: " << sizeof(t) << '\n'; std::cout << "2.: " << sizeof(t[0]) << '\n'; std::cout << "3.: " << t[0] << '\n'; std::cout << "4.: " << sizeof(&t) << '\n'; std::cout << "5.: " << sizeof(*t) << '\n'; std::cout << ...
3174c824cd1d0c0457891587da4e466293f82be7
b2cd00de50f4555c56fb342029e69f3edb8ab725
ricknijhuis/Cheetah
/Cheetah/src/Platform/Windows/WindowsWindow.cpp
C++
cpp
2,671
no_license
#include "WindowsWindow.h" #include "Events/EventTypes.h" #include "Events/ApplicationEvents.h" #include "Events/InputEvents.h" #include "Renderer/RenderAPI.h" #include <iostream> namespace cheetah { static bool s_IsGlfwInitialized = false; Window* Window::create(const WindowProps& props) { return new WindowsW...
7a1f5e49f341cbb747f14596ef73fe619cbb1146
a54aac38d5888e0ea79db4eea5f3a704b423cbfa
testitesti22/palemoon27
/gfx/gl/GLContext.cpp
C++
cpp
104,391
no_license
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* vim: set ts=8 sts=4 et sw=4 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0...
28188931c33425c1f4f260704fad5946e3f1916e
e9cfe74e7a0cb5da68c881f02dcfa344f5dac8f1
idofilus/chromium
/ui/app_list/views/folder_background_view.cc
C++
cc
3,018
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/app_list/views/folder_background_view.h" #include <algorithm> #include "ui/app_list/app_list_constants.h" #include "ui/app_list/app_list_fe...
64efaf800fd169f837f92f13749a887c4c69e929
47eea7e0fcfb594dde1365ee3cff2912a8ff6806
cha63506/chrome-3
/chrome/browser/chromeos/login/lock/screen_locker.cc
C++
cc
18,617
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/chromeos/login/lock/screen_locker.h" #include <string> #include <vector> #include "ash/ash_switches.h" #include "ash/audio/soun...
512b0842cbb59254311d2e4f60096c0e2b187a93
86238383899057b0fc4e0bd8a57585e8e31034af
Victoralin10/ACMPlantilla
/cpp/flows/MaxFlowMinCost.cpp
C++
cpp
2,215
no_license
// Plan-ChotaV2.cpp // For no Integer Cost ( long double ld ) //10746 UVA - Crime Wave - The Sequel // assignment problem on a bipartite graph: // n <= m <= 20 (n = nodes on the left, m = nodes on the right) // unit flow on each edge // cost is a real number typedef int Flow; typedef ld Cost; const Flow INF = 0x3f3f3...
de166ea1f7c5b2d7da0a020960d5a7a2a8fad7cb
5c45f63c6bcfe86abf72cfdcc5a17cc883d7d8c3
gussmith23/universal
/tests/bitblock/arithmetic.cpp
C++
cpp
11,165
permissive
// arithmetic.cpp : test suite for bitblock-based arithmetic operators // // Copyright (C) 2017-2019 Stillwater Supercomputing, Inc. // // This file is part of the universal numbers project, which is released under an MIT Open Source license. #include "universal/posit/exceptions.hpp" // TODO: remove namespace polutio...
a81b5a624d2b46163ff01dc15a7ed9295d21f3f2
2509e046cf35bc209301dec1b80bf6bb64f81703
coolWizard/bistro
/bistro/physical/test/test_cgroup_resources.cpp
C++
cpp
4,007
permissive
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #include <fo...
b1090626c7f691332845487853a9d43198caa790
44464e12d36556730bf409a53607ff8fbb1d44e6
Junjieli0704/DemoAwareSenModel
/TopicBasedModels/JST/JST_inference.cpp
C++
cpp
27,771
no_license
/********************************************************************** Joint Sentiment-Topic (JST) Model *********************************************************************** (C) Copyright 2013, Chenghua Lin and Yulan He Written by: Chenghua Lin, University of Aberdeen, chenghua.lin@abdn.ac.uk. Part of c...
d46c2d53101dae5c7ea8235d497bcf1143646bea
34d8f184fa500cabb22eaadaa7e39e31391ff42f
Fedya001/bsu-1term-labs
/BiDirectionalList/main.cpp
C++
cpp
1,484
no_license
#include <iostream> #include <vector> #include <algorithm> #include <list> #include <assert.h> #include "list.h" #include "tests.h" #include "testing_framework.h" void TestAll() { TestRunner runner; runner.RunTest(TestEmpty, "TestEmpty"); runner.RunTest(TestAsArrayAndContainerConstructor, "TestAsArrayAndContai...
6f10451664e764cc81698a9085c9a94033cff4e4
8a0e5e8e1cfb1ee719701a12cc2c5761ee61e463
RomainBrault/Gem
/include/gem/concept/dimensions_comparable.hpp
C++
hpp
1,579
permissive
#ifndef CONCEPTS_DIMENSIONS_COMPARABLE_HPP_INCLUDED #define CONCEPTS_DIMENSIONS_COMPARABLE_HPP_INCLUDED #include <boost/hana/equal.hpp> #include <boost/hana/not_equal.hpp> #include <boost/hana/core/common.hpp> #include <gem/concept/dimensions_common.hpp> #include <gem/fwd/dimensions.hpp> namespace gem { gem::concep...
8aa831edf4a3a48c028f3dab3f12d376e63707c1
1cdd1c658351beb7066b8d6e25c8c3ac59ec5fac
wth233/algorithm009-class01
/Week_01/设计循环双端队列.cpp
C++
cpp
4,365
no_license
/* 设计实现双端队列。 你的实现需要支持以下操作: MyCircularDeque(k):构造函数,双端队列的大小为k。 insertFront():将一个元素添加到双端队列头部。 如果操作成功返回 true。 insertLast():将一个元素添加到双端队列尾部。如果操作成功返回 true。 deleteFront():从双端队列头部删除一个元素。 如果操作成功返回 true。 deleteLast():从双端队列尾部删除一个元素。如果操作成功返回 true。 getFront():从双端队列头部获得一个元素。如果双端队列为空,返回 -1。 getRear():获得双端队列的最后一个元素。 如果双端队列为空,返回 -1。 i...
1caa952adb611ffc1c60c6e709b70130a8f776cb
80079e7d6aa979ae5eff58dcc5d70efb576dce90
sweetie-bot-project/sweetie_bot_rt_control
/motion/sweetie_bot_resource_control/include/sweetie_bot_resource_control/resource_client.hpp
C++
hpp
2,601
no_license
#ifndef OROCOS_RESOURCE_CONTROL_SERVICE_HPP #define OROCOS_RESOURCE_CONTROL_SERVICE_HPP #include <string> #include <vector> #include <boost/function.hpp> #include <rtt/OperationCaller.hpp> #include <rtt/ServiceRequester.hpp> #include <rtt/ServiceRequester.hpp> namespace sweetie_bot { namespace motion { class Resou...
6c2b998e903f6fabb2a4be7f0d468506d09e70f4
15fc444cba16b48f1c2f180309f0e1f2d4ef0f16
ozonx/ozon
/src/qt/qtipcserver.cpp
C++
cpp
4,927
permissive
// Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/version.hpp> #if defined(WIN32) && BOOST_VERSION == 104900 #define BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTT...
05c4d60d49be394dd2f6d00f6e97020fca341bf5
7752f51862a7678fa1527b8232d87a29347fb50f
envoyproxy/envoy
/source/extensions/matching/input_matchers/runtime_fraction/config.cc
C++
cc
1,274
permissive
#include "source/extensions/matching/input_matchers/runtime_fraction/config.h" #include "envoy/extensions/matching/input_matchers/runtime_fraction/v3/runtime_fraction.pb.h" namespace Envoy { namespace Extensions { namespace Matching { namespace InputMatchers { namespace RuntimeFraction { Envoy::Matcher::InputMatcher...
4ce9c68617ab3130ce0a698c6643a67d6c7fe9df
923c83f58d27ef894384fbcfc988e9979f7259c5
frankie-11/SCUM_SDK7.13.2020
/SDK/SCUM_Bear_Right_Front_Leg_classes.hpp
C++
hpp
642
no_license
#pragma once // SCUM (4.24) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass Bear_Right_Front_Leg.Bear_R...
fa2d4a55f7ff53705a03b4f80374539d1b05067d
f545138c071be88202e98c6ffda4f42fbc5da955
Utkal97/CodingPractice
/ClimbingLeaderboard.cpp
C++
cpp
931
permissive
#include<iostream> #include<vector> #include<set> #include<stdio.h> using namespace std; vector<int> climbingLeaderboard(vector<int> scores, vector<int> alice) { set<int> leaderboard; for (int i = 0; i < scores.size(); i++) { leaderboard.insert(scores[i]); } set <int > ::iterator it; int l_size = leaderboard.s...
e29dd2fde88326018c11df2a84d40a6402f6e3af
82be7815735559263493e857151ce6d063af85c3
TheoBerlin/GameProject
/GameProject/Engine/GUI/FontManager.cpp
C++
cpp
759
no_license
#include "FontManager.h" #include "Utils/Logger.h" std::unordered_map<std::string, Font*> FontManager::fonts; void FontManager::addFont(const std::string & name, const std::string & path, unsigned int size) { std::unordered_map<std::string, Font*>::iterator it = fonts.begin(); if (fonts.find(name) == fonts.end()) ...
2f0b36992e497cac94153f41e8f9bef775da0aae
490fa45fe9a892bf7a0e28545c8adc738110e3ea
arangodb/arangodb
/3rdParty/boost/1.78.0/boost/geometry/geometries/adapted/boost_polygon/ring.hpp
C++
hpp
5,449
permissive
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to 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) #ifnd...
b5939e2274bad023aa5560556a229bf210e87b35
2fb78fceeb1086318b1df4705a134fa424c325a1
novaquark/actor-framework
/libcaf_core/src/serializer.cpp
C++
cpp
1,745
permissive
/****************************************************************************** * ____ _ _____ * * / ___| / \ | ___| C++ * * | | / _ \ | |_ Actor * ...
59386ea1df0c71559250d23de9fd278436c36772
ba036f56e5db538a8e2e413f21d75edd22646472
knagara/ros_training
/test/math_gtest.cpp
C++
cpp
303
no_license
#include <gtest/gtest.h> #include <ros_training/math_for_test.h> TEST(MathTest, mathTest){ int a = 1; int b = 2; int expect = 3; int result = add_for_test(a, b); EXPECT_EQ(result, expect); } int main(int argc, char **argv){ testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
a1eb4854b517ef6bcf25ac2ac615583dd118598c
51e4d15dce01bdd30d76e736b6553d1901edd8ad
rahulbordoloi/cppprogramming
/Leetcode Practice/sqrt_x.cpp
C++
cpp
600
no_license
// Link - https://leetcode.com/problems/sqrtx/ /* 69. Sqrt(x) Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an integer, the decimal digits are truncated and only the integer part of the result is returned. Example 1:...
e70ca51fe06c144b9dbaff85ebb4b656f243c5b6
d5386b4ccc92c18bd6b8e678b0de0a7d0cb85894
riktimmondal/NeuralNetwork_cpp
/openann/include/Neuron.hpp
C++
hpp
607
no_license
#ifndef _NEURON_HPP_ #define _NEURON_HPP_ #include <iostream> #include <math.h> using namespace std; class Neuron { public: Neuron(double val); void setVal(double v); //sigmoid void activate(); //sigmoid derivative void derive(); //Getter double...