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
b9231ade0dcee6166abf9963dcc72034944c2247
1c1506d92eb8af35eea7de784dcb96bb02fe360e
rohith2506/word_embeddings
/parser.cc
C++
cc
380
no_license
#include "parser.h" #include <iostream> int main() { CorpusParser<std::string> *c = new CorpusParser<std::string>(); std::vector<int> X; std::vector<std::vector<int>> Y; tie(X, Y) = c->get_train_x_and_y(); std::cout << X.size() << std::endl; for(int i=0; i<X.size(); i++) std::cout <...
4607fde48188b7d6c444d590b78bbf8d9b0274f5
c8c336dd7f16ff937e51e9dd85aa257f26ee50ed
lecho/obintel
/faceDetector/main.cpp
C++
cpp
715
no_license
#include <QtCore/QCoreApplication> #include "parameterreader.h" //usunieto normalizacje przy zapisywaniu danych treningowych i przy testowaniu(wszedzie gdzie obrazek zamieniano na wektor floatow) // PARAMETRY // generowanie zbioru treningowego: gen plik_do_zapisu katalog_ze_zdjeciami (uwaga, zbior walidacyjny trzeba...
40577247cffb6a5b63882c637e8f3504dc176c8a
0789b7b1abe859f52bf815adc2f65605f57fb123
pinwc4/coyote_miner
/user_database.hpp
C++
hpp
378
no_license
#pragma once #include <fc/reflect/reflect.hpp> struct user_record { user_record():valid(0),invalid(0),total_earned(0),total_paid(0){} uint64_t valid; uint64_t invalid; int64_t total_earned; int64_t total_paid; int64_t get_balance()const { return total_earned - total_paid; } }; FC_REFLECT( ...
7103de772cba3fe189391ea2bd915a5aea9aa41d
6ae8ddafd10e3bd029b50b1e426c3a87b8d1e8e0
anybirds/Newbie
/Engine/Asset.hpp
C++
hpp
986
no_license
#pragma once #include <cstdint> #include <memory> #include <string> #include <type_traits> #include <Entity.hpp> class Resource; CLASS_ATTR(Asset, Entity, ENGINE_EXPORT) { TYPE(Asset); PROPERTY_GET(uint64_t, serial, Serial); PROPERTY(std::string, name, Name); protected: std::weak_ptr<Resource> res...
8f4c7095e29d88f99aa2bbe8e670769009543fb2
507772707ce2ea80aaad360bbfe65291cdd00fa3
mprobst/clang
/lib/CodeGen/CodeGenModule.cpp
C++
cpp
165,830
permissive
//===--- CodeGenModule.cpp - Emit LLVM Code from ASTs for a Module --------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
c687f0d945b3a9e55c36baabd6189c16e012fff3
2aac4bc7be0a6b406d2a43d06a44272047807fe5
mymedia2/snake
/common.hpp
C++
hpp
1,660
permissive
#ifndef COMMON_HPP #define COMMON_HPP #include "std.hpp" #include "objects.hpp" #include "io.hpp" #include "utils.hpp" namespace common { /* Игровой мир, где живут все объекты игры */ class GameWorld { public: /* Создаёт пустой игровой мир со стенками по краям */ GameWorld(); /* Выполняет тик в игре */ void tick...
03e431bee01e97bfcf1b52a71332d53a1c88300e
4e21337a2087d3bdef802acad58f23fd3fd2d38a
AlexP97/Juego-EDA
/AIDJCUBITOv6.cc
C++
cc
12,491
no_license
#include "Player.hh" /** * Write the name of your player and save this file * with the same name and .cc extension. */ #define PLAYER_NAME DJCUBITOv6 struct PLAYER_NAME : public Player { /** * Factory: returns a new instance of this class. * Do not modify this function. */ static Player* factory ()...
fe5e220fc0b0809f35c26ec70b88885664104cfc
473e0515020d34169dd4f687269d6c2c064e3041
LukasCH09/CUDA_GP_GPU
/Student_OMP/src/cpp/core/omp/02_Slice/03_pi_entrelacer_critique.cpp
C++
cpp
1,906
no_license
#include <omp.h> #include "OmpTools.h" #include "../02_Slice/00_pi_tools.h" /*----------------------------------------------------------------------*\ |* Declaration *| \*---------------------------------------------------------------------*/ /*--------------------------------------*\ |* Imported ...
ab31142361a65ddb2b40fc2b34a89a48fe26377b
e13f651f74f388d2ac586b0367b51eaf1c54e47b
buckeye-cn/ACM_ICPC_Materials
/solutions/kattis/boi07/sound_hcz.cpp
C++
cpp
773
no_license
// https://open.kattis.com/problems/sound #include <cstdlib> #include <cstdint> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <set> #include <iostream> using namespace std; int a[1000000]; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.precision(...
03ba801950208a9dd144fa95cf8e2c3cb1862713
56b5032212e9ac995e5e24f7f1c47ccd149b01eb
crackersamdjam/DMOJ-Solutions
/APIO/apio09p2.cpp
C++
cpp
2,758
permissive
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #ifdef LOCAL template<typename T> void pr(T a){std::cerr<<a<<std::endl;} template<typename T,typename... Args> void pr(T a, Args... args) {std::cerr<<a<<' ',pr(args...);} #else template<typename... Args> void pr(Args... args){} #endif using name...
a3f1430a42fd11b37eed6ea32cf27066e3e65e35
7d413dae9fe8f884d8dc5b7f2ff509dcae75f04b
Husaimawx/MyLeetcode
/自测3_关路灯.cpp
C++
cpp
1,480
no_license
// f[i][j]记为当从i到j的灯都熄灭后剩下的灯的总功率,f[i][j][0]表示关掉i到j的灯后,老张站在左端点,f[i][j][1]表示关掉[i][j]的灯后,老张站在右端点 // f[i][j][0] = min ( f[i+1][j][0] + ( a[i+1] - a[i] ) * ( sum[i] + sum[n] - sum[j] ) , f[i+1][j][1] + ( a[j]-a[i] ) * ( sum[i]+sum[n]-sum[j]) ); // f[i][j][1] = min ( f[i][j-1][0] + ( a[j] - a[i] ) * ( sum[i-1] + sum[n] - sum...
61638f0452024389f52d395b63ed4912a13c2835
f86440f0898a5262c0b7a5f814e6423bcb29f5cd
HL2-Ghosting-Team/src
/game/client/c_colorcorrection.cpp
C++
cpp
4,018
no_license
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======// // // Purpose: Color correction entity with simple radial falloff // // $NoKeywords: $ //===========================================================================// #include "cbase.h" #include "filesystem.h" #include "cdll_client_int.h" ...
ec4bbd150c0f083832a564635ebcbcee9451f34c
a78a1cd5b27a06e27ca221b611b713fda3c78e4a
deniskokarev/practice
/c/lc/minimum-ascii-delete-sum-for-two-strings.cc
C++
cc
831
no_license
// https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/ class Solution { public: static int minimumDeleteSum(const string &s1, const string &s2) { const int sz1 = s1.size(); const int sz2 = s2.size(); vector<vector<int>> dp(sz1 + 1, vector<int>(sz2 + 1)); for (int ...
ac37bad345db5912a42e63b9a4b2ae6ff3674496
545162c7e529c274d3ee3639a2a552cca67fac90
yazici/ofxBlur
/example/src/main.cpp
C++
cpp
237
no_license
#include "ofApp.h" int main() { ofGLWindowSettings settings; settings.setSize(640, 480); settings.setGLVersion(3,2); // GL3 // settings.setGLVersion(2,1); // GL2 ofCreateWindow(settings); ofRunApp(new ofApp()); }
83bc4cd492b0f573dc0ea963e7a5575521aad362
a053004c5fd85b4cee96bf392a870d349498d568
yuexiadudiao/ETNetTime
/main.cpp
C++
cpp
264
no_license
#include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); QApplication::addLibraryPath(".");//在当前目录寻找dll,不过还是无法解决 MainWindow w; w.show(); return a.exec(); }
74e4276dbea691cfddef875ff27378cd7d4d1798
d29f65382f98fec9c292c622122360e80e0259e5
de-vri-es/wmpp
/src/layout/graph.hpp
C++
hpp
4,240
no_license
#include <xcb/xcb.h> #include <vector> namespace wmpp { struct Node { /// The type of node. enum class Type { horizontal, vertical, window, empty, } type; /// The size of the node in pixels. int size; /// The child nodes. std::vector<Node> children; bool isParent() const { return type == Type::hor...
50d160baa2d3a9447f50662a1c8648b8c9a84ede
ddfe590ee18260c053bdf275ae243457b7554721
nugabom/ACL-lowp
/src/runtime/GLES_COMPUTE/functions/GCGEMM.cpp
C++
cpp
8,295
permissive
/* * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * ri...
0848c09fba02a70fa7266d770c1716dacebba9cf
9ad7ce30a7066c2808e695bb3e8faf864978b74e
CoderJet/ThinMatrix-OpenGL-Tutorial
/src/textures/ModelTexture.cpp
C++
cpp
910
no_license
// Precompiled header. #include "stdafx.h" // Header include. #include "ModelTexture.h" ModelTexture::ModelTexture(GLuint id) : m_texture_id(id) , m_shine_damper(1) , m_reflectivity(0) , m_has_transparency(false) { } bool ModelTexture::hasTransparency() { return m_has_transparency; } bool ModelTexture::useFakeL...
2313045de9c203b66fda37aceede32fe43ac68da
ebbaa679a201d989e677cae89fdd14b11e15b622
mazans/data-structures
/BST.cpp
C++
cpp
4,633
no_license
#include "BST.h" #include <iostream> #include <cmath> using namespace std; BST::BST() { root = nullptr; size = 0; } int BST::get_size() { return size; } void BST::push(int n) { Node * p = new Node; p -> data = n; p -> left = nullptr; p -> right = nullptr; if(root) { Node ...
4647efd1d63b2ec152a324c7cfafbbc6cd7a59d0
2e2f7290c2027c937e15d16ec99223fe7a3a5f2f
Park18/TIME_CHART
/EXPLAN_FRAME.cpp
C++
cpp
1,277
no_license
#include "EXPLAN_FRAME.h" #include <iostream> using namespace std; EXPLAN_FRAME::EXPLAN_FRAME() { Set_Frame(); } void EXPLAN_FRAME::Set_Frame() { console_ui.Set_Title("나가기 : SPACE / ENTER / BACK을 눌러주세요."); console_ui.Insert_Menu("본 프로그램은 시간표를 csv파일 포맷으로 제작해주는 프로그램 입니다."); console_ui.Insert_Menu("...
2ef4964197efe41633aa936977301dcc744e5752
27a4ee86489d621ec7c1fdc7a62d5a20f3b35ff9
sukrutrao/Infero-Programming-Practice
/CodeChef/SnackDown 2016/EL/p3/p3.cpp
C++
cpp
241
no_license
//numset #include<bits/stdc++.h> using namespace std; int main() { long long t,n,i,j,k,l; cin>>t; while(t--) { cin>>n; long long *arr=new long long[n]; for(i=0;i<n;i++) { cin>>arr[i]; } sort(arr,arr+n); } return 0; }
6166f98e2f0f9b941db8cb0238b1c7e9252e5c1a
c1c53e13a029d10ea503fee55ffb69c31904647b
nizvoo/cpp-libp2p
/test/libp2p/protocol/gossip/gossip_structures_test.cpp
C++
cpp
6,382
permissive
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #include <libp2p/protocol/gossip/impl/message_cache.hpp> #include <libp2p/protocol/gossip/impl/peer_set.hpp> #include <gtest/gtest.h> #include "testutil/libp2p/peer.hpp" // debug stuff, unpack if it's needed to debug...
649a7209481f1f3a71f62d25c77cd47c635c9805
d6b8fc4b0befd5641b3cb11949a9b3c928f0feb2
won-now/Practices-and-Demos
/C Demos/Socket/Linux/udp/udp_server.cpp
C++
cpp
1,190
no_license
#include <iostream> #include <strings.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #define PORT 8888 #define LEN 1024 int main(int argc, char* args[]){ int sockfd; int ret; char buf[LEN] = {0,}; struct sockaddr_in ser_addr, c...
488dce555946b2a622105c5b19b75c0249e41b29
f00abd9ba78d4acf008ac4d729f5135fb9ddacaf
jrriehl/ledger
/libs/crypto/include/crypto/openssl_common.hpp
C++
hpp
4,842
permissive
#pragma once //------------------------------------------------------------------------------ // // Copyright 2018-2020 Fetch.AI Limited // // 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 Licen...
1f2ff87684e488345b246072e7145a96c29b8519
1f8538e6a45b88d39d4d2ce90f63826f3f1b4a8f
coronalabs/corona
/external/Angle/Project/src/compiler/ParseHelper.cpp
C++
cpp
53,434
permissive
// // Copyright (c) 2002-2013 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. // #include "compiler/ParseHelper.h" #include <stdarg.h> #include <stdio.h> #include "compiler/glslang.h" #include "compiler/preprocess...
11454a210a6def114ba63149a39d50caa8912880
72446eb7346962e835fb9e23362ab469607e3047
seirion/code
/algospot/gggcccddd/main.cpp
C++
cpp
1,406
permissive
// http://algospot.com/judge/problem/read/GGGCCCDDD #include <cstdio> #include <cstring> #include <iostream> #include <map> using namespace std; const int MOD = 1000000007; long long limit, loop, sum; long long g[1001][1001]; map<int, long long> m[1001], rr; void input() { scanf("%d %d", &limit, &loop); } long ...
0ad0c6d786a09f832a31166df0ce3adfa1f10803
069320676c3ba371243dabda924f0b984e1c38ca
intmian/hotel-management-system
/sql_tool.cpp
C++
cpp
2,563
no_license
#include "sql_tool.h" #include <QTextStream> bool OpenDatabase() { QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); //数据库驱动类型为SQL Server qDebug()<<"ODBC driver?"<<db.isValid(); QString dsn = QString::fromLocal8Bit("HOTEL"); //数据源名称 db.setHostName("172.20.10.11"); //选择本...
8a577c56f5f8857f62c58ff1802c789217222393
be34f949dc5312a76efcd6ebbfb0dab3086ec370
pventuzelo/SSVM
/lib/vm/hostfunc/wasi/fd_PrestatGet.cpp
C++
cpp
3,232
permissive
// SPDX-License-Identifier: Apache-2.0 #include "vm/hostfunc/wasi/fd_PrestatGet.h" #include "executor/common.h" #include "executor/worker/util.h" #include <errno.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> namespace SSVM { namespace Executor { WasiFdPrestatGet::WasiFdPrest...
4fa4723c9acbaf50506d36ab3046c29306f198c1
8cfafd7c5680c50890a55a1251249e41e6c81b03
Bertug/swift-windows
/stdlib/public/stubs/Stubs.cpp
C++
cpp
14,155
permissive
//===--- Stubs.cpp - Swift Language ABI Runtime Stubs ---------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
c448bb7f6bbce405321938456980abd5fb0af2e3
cbb8b38145454cfb314c3670481e81bf8627056d
Edlward/public
/Super/src/Super/Basic/NetStream.cpp
C++
cpp
2,803
no_license
#include "NetStream.h" NAME_SPACE_MAIN_BEGIN //模板不支持在cpp实现 //void InNetStream::resizeBuffer() //{ // //} // //InNetStream& InNetStream::operator<<(const std::string& s) //{ // //} // //InNetStream& InNetStream::operator<<(const std::wstring& ws) //{ // //} // //OutNetStream& OutNetStream::operator<<(std::string& ...
3821af11df7ca0edecb868ff5f271d08691a5e22
9dbc3f7a4e8d88f724efac3ec8781877502c9a36
timblechmann/nt2
/modules/core/trigonometric/unit/simd/cotd.cpp
C++
cpp
3,104
permissive
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
9b32cd92bdd53dfb4ef215f8c3a08cb0590b0e0d
1c240efe0c8fd68c75d0ef9f04acc0135ec59b7d
PeterSommerlad/MockingFrameworksDemo
/ws/WhiskeyShopMockator/src/Test.cpp
C++
cpp
6,273
permissive
#include "cute.h" #include "ide_listener.h" #include "xml_listener.h" #include "cute_runner.h" #include <map> #include "mockator.h" #include "OOMockTests.h" namespace { using namespace std::string_literals; const auto TALISKER = "Talisker"s; } namespace TDD { struct Warehouse { int getInventory(std::string const& s)...
408b8baab335a395d81edece4b8761942c4a12ac
ca1893a90719a3e486f9cfc6e27c7cd83ca15826
yashrsharma44/Competitive-Programming
/cf/1181/q1.cpp
C++
cpp
523
no_license
#include <bits/stdc++.h> #define int long long using namespace std; #define MAX 1000005 void solve(){ int x,y,z; cin>>x>>y>>z; int ans = (x+y) / z; int a1 = (x%z) + (y%z); if(a1 == 0){ cout<<ans<<" "<<0<<endl; return; } if(a1 >= z){ ans = x / z + y / z + 1; cout<<ans<<" "<<(z - max(x%z, y%z))<<endl;...
36ed2bec80eb03ab84ab7966fcde3c52dda3bfcc
4ec02c9cfaac331bf2257b1c4f26682a0956d32e
cywww123/git101-6110450731
/lab10-02.cpp
C++
cpp
454
no_license
#include <iostream> #include <string> using namespace std; class Hero{ private: string name; int level; public: Hero(string n,int l){ name = n; level = l; } string getName(){ return name; } int getLevel(){ return level; } }; int ma...
a9e68297947dd2cd72053e9f42b3feeeb0cbafb9
f911243fd17f0085a1b2b66dee1f8242ee211bd3
Jseph/google-cloud-cpp
/google/cloud/accesscontextmanager/internal/access_context_manager_connection_impl.cc
C++
cc
35,779
permissive
// Copyright 2022 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
7050b37f3df883b997647ebecdf41a62d8cc69d4
7718488c40f9bd4dbf6985b302c8dc3214f09965
Anantm007/Hackerrank-Solutions
/Algorithms/Implementation/extra-long-factorials.cpp
C++
cpp
966
no_license
#include <bits/stdc++.h> using namespace std; using namespace std; // Maximum number of digits in output #define MAX 500 int multiply(int x, int res[], int res_size); void factorial(int n) { int res[MAX]; res[0] = 1; int res_size = 1; for (int x=2; x<=n; x+...
58be70c9d4d95309104ad98c28aef136b7707185
b0f783f461da11675a185d079706322d6955ce47
fulinli/LeetCodeSolution
/20.Valid Parentheses.cpp
C++
cpp
1,147
no_license
/* Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Note that an empty string is also considered valid. Exa...
4df6bfb54b2b8e13ab978a9e78b005d0d08b6b37
26207b448e38479b4dd420f33c216ebb6312d02b
cwmartin/htcondor
/src/condor_dagman/dagman_submit.cpp
C++
cpp
21,211
permissive
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
2780b743d5f32fc2423aebda7934d33b4f47ab1d
6b4b6255296c73b52bc19b37edfb21a74b14b57a
thecsapprentice/SBSS_Public
/src/lib/CG_Optimized_Kernels/Vector_SAXPY_V/Vector_SAXPY_V_Helper.cpp
C++
cpp
2,731
no_license
//##################################################################### // Copyright 2010, Eftychios Sifakis. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### #i...
8f8985360e044dfa03e5df31f18c5f4459fb7f65
013900c80a78e4c1d00c9a3d3676e18212e1f214
Nek5000/nekRS
/src/mesh/meshNekReader.cpp
C++
cpp
4,235
permissive
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "mpi.h" #include "nrs.hpp" #include "nekInterfaceAdapter.hpp" void meshNekReaderHex3D(int N, mesh_t* mesh) { MPI_Barrier(platform->comm.mpiComm); const double tStart = MPI_Wtime(); if(platform->comm.mpiRank == 0) printf("loading mesh from ne...
d0c826f09b182003a4bdda417f9d0fa715806d08
4c11304a8c0688d7a725b0b17429e07798c200c7
cqyuan/legion
/runtime/realm/deppart/sparsity_impl.cc
C++
cc
33,433
permissive
/* Copyright 2015 Stanford University, NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
6fda1f5670d0688e684306923bfdc977eebc8a51
e025653278cb616d65b5386ffd1f9b9e50131659
willl03/frameworks_av
/media/libstagefright/omx/GraphicBufferSource.cpp
C++
cpp
39,563
permissive
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
9738854b02b9491341bc23c0a886af3add5bd55f
c7a729d386d897e8f90121f2f7a86e5ac8c55376
mwierzbicki/competitive-programming-projects-english
/USACO/2015_December_Bronze_1000pts/Contaminated_Milk.cpp
C++
cpp
1,710
no_license
// // main.cpp // milk // // Created by Marcin Wierzbicki on 12.12.2015. // Copyright © 2015 Marcin Wierzbicki. All rights reserved. // #include <fstream> #include <bitset> #include <algorithm> std::fstream plik; std::pair<int, std::pair<int, int> > tab[1001]; std::pair<int, int> tab2[51]; std::bitset<51> usper;...
1792c9595992a0c0f5608d50a9091d18f4be204b
1e0afab553e16635aa7f638cc06744be7808d5e7
mrodozov/RPCModel
/main_func/producePlot4ClonesFast.cpp
C++
cpp
5,537
no_license
#include <iostream> #include <string> #include <fstream> #include <sstream> #include <new> #include <cmath> #include <stdlib.h> /** non-standart headers , the model , the wrappers and ROOT */ #include "core/DataObject.h" #include "ExtendedStrip.h" #include "ExtendedRoll.h" #include "ParserFunction.h" #include "ROOT/plo...
f1ea1c7d756256aa25f1e1078b42ae44ab63bede
af28f2fdef8d9737d69f0d61dc66fc5af02b1ade
xsthunder/acm
/cf/746/A.cc
C++
cc
741
permissive
const bool test=1; #include<iostream> #include<cctype> #include<algorithm> #include<cstdio> #include<cstdlib> #include<vector> #include<map> #include<queue> #include<set> #include<cctype> #include<cstring> #include<utility> #include<cmath> const int inf=0x7fffffff; #define IF if(test) #define FI if(!test) #define gts(s...
b2911730b34e3ed5765c4e7d43acf0c0239cb7c0
081cee16e61d7926d376d5ab1d6e931d054bfb29
joeyhotz/JoeyCGProject
/Ass1/main.cpp
C++
cpp
2,718
no_license
/** This file contains everything to set up an OpenGL mesh viewer, but for your exercises you do not need to touch it. (But you can, if you want to try out stuff). myFunctions.cpp contains the blank functions that you should implement. */ #include <GL/glut.h> #include "traqueboule.h" #include "mesh.h" #include "myFun...
5e9672c6a8da2f3b83e59c9e2c15573d56473921
acabdc7c55d92f91e50ea0d5f139470e4b9a188c
iridium-browser/iridium-browser
/third_party/dawn/src/tint/sem/load.cc
C++
cc
1,327
permissive
// Copyright 2022 The Tint Authors. // // 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 t...
8f2bf6f87469bd142e54c91f3f1430ab5394af0f
0fee193647684ba2ccd49164ee5b95da19c99b83
strands-project/scitos_apps
/scitos_docking/src/scitos_docking/CHead.cpp
C++
cpp
659
permissive
#include "scitos_docking/CHead.h" CHead::CHead() { status = false; known = false; } CHead::~CHead() { } void CHead::set(bool what) { dynamic_reconfigure::ReconfigureRequest srv_req; dynamic_reconfigure::ReconfigureResponse srv_resp; dynamic_reconfigure::BoolParameter param; dynamic_reconfigure::Config conf; p...
aed3c579be39364185cdd387b49acae1849d2fb4
c8aeba276debe14b36dd98c0d46e09f459259715
kmc7468/cpp-game-challenge-1
/include/turtle/water_tank_type.hpp
C++
hpp
571
permissive
#pragma once #include <turtle/volume.hpp> #include <cstdint> #include <string> namespace turtle { class water_tank_type { public: virtual ~water_tank_type() = default; protected: water_tank_type(const std::string& name, const std::string& brand, std::uint32_t price, const turtle::volume& volume); publi...
251a0d41236409b25fb7ad77aa3efddf6cf94101
734fc231c802fd24ef71890b42ffefe10e8da593
carbonatedcaffeine/zircon-rpi
/zircon/kernel/arch/arm64/mp.cc
C++
cc
4,291
permissive
// Copyright 2016 The Fuchsia Authors // Copyright (c) 2014 Travis Geiselbrecht // // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT #include <assert.h> #include <platform.h> #include <trace.h> #include <zircon/errors.h> #...
11d30e7d27813bb5c20e3ab9a8401c11206d07a6
419224213f7f0a7d2a6a217e03393bdd520a551f
i-sushant/CP
/NumberTheory1/multiplicative_modulo_inverse.cpp
C++
cpp
540
no_license
#include <bits/stdc++.h> using namespace std; int x, y, GCD; int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } void extended(int a, int b) { if (b == 0) { x = 1; y = 0; GCD = a; return; } //recursive case extended(b, a % b); int cx = y; int cy = x -...
b682c898abe4dae4b480092f2335f9c0bd221fd1
89a793d7cc2f4b252acd31c7379add033aaaea49
JSKitty/merge
/src/libzerocoin/CoinSpend.cpp
C++
cpp
5,092
permissive
/** * @file CoinSpend.cpp * * @brief CoinSpend class for the Zerocoin library. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This project is released under the MIT licen...
71a5f5650c6fbfe003f408f2577c19635c915d88
bb58ec69c901015d78101c4ecddb3f6773339857
SixShoot/aiongrindmeter2
/logfiletest/parser/UserCommandFactory.cpp
C++
cpp
970
permissive
#include <map> using namespace std; #include "UserCommandFactory.h" vector<string> UserCommandFactory::getUserCommand(const string& chatLine){ vector<string> arguments; map<string, string> params; if (parser->resembles(chatLine, "%0: .%1", params)){ string& name = params["%0"]; string& message = params[...
955f870eede2e405a55f6e9f0c5cf07e38dac5f3
396f8e44a01b32c37aab8bb1c817ed7f98b1df1d
Menutra/catalyst-cli
/external/rocksdb/db/write_batch.cc
C++
cc
74,108
permissive
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). // // Copyright (c) 2011 The LevelDB Authors. All rights r...
ad1c250c3233bab4f9823259b6fdf558f144d6ae
68b80b432506aac39670202933e449bb24f57f4e
Niram7777/ruy
/ruy/block_map_test.cc
C++
cc
12,077
permissive
/* Copyright 2019 Google LLC. 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 agreed to in ...
93702412a615d88092d66baec96063f6428539bb
c586db03b685bde532c9395e787788f2b0bc7d82
kbeckmann/MetroBoy
/src/AppLib/TextPainter.cpp
C++
cpp
7,764
no_license
#include "AppLib/TextPainter.h" #include "AppLib/GLBase.h" #include <stdio.h> #include "SDL/include/SDL.h" #include "glad/glad.h" extern const char* terminus; const int glyph_size_x = 6; const int glyph_size_y = 12; //----------------------------------------------------------------------------- con...
2090aab3ac6ffa3ceef32920f02533e0805019fb
6baef0ab26a63b93b4aa952b443eb9c1c053be63
MingshanHe/PX4-Autopilot
/src/systemcmds/param/param.cpp
C++
cpp
24,724
permissive
/**************************************************************************** * * Copyright (c) 2012-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Red...
0ea6dfe267b9c3da2b889e9b4dfc3a489f4d5413
544754b13001b2f7d96851c8d9f323e06b375bdd
tusj/pdf-extract-annotation
/extractannotation.cpp
C++
cpp
2,874
no_license
#include "extractannotation.h" std::string replace(const std::string& str, const char* searchFor, const char* replaceWith); std::string extractFromDoc(Poppler::Document* doc, bool verbose) { std::ostringstream str; for (int i = 0; i < doc->numPages(); i++) { Poppler::Page* page = doc->page(i); ...
9fc8fef5a86ec64d06ee2dc63c7b1576abdffe1c
95ee2cc1e83865d7acd307a875ffd4ad3a74fe44
timxx/VC6-Platform-SDK
/VC6PLATSDK/samples/sysmgmt/mmc/About/statnode.Cpp
C++
cpp
909
no_license
//==============================================================; // // This source code is only intended as a supplement to // existing Microsoft documentation. // // // // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LI...
adce97a2177a9d8bbf5cf586a79b9396fd474839
8b13c5a657e0c2687e6fceecdfa70ada324c3636
BattlefieldRecapitator/Placeholders-for-Mordhau
/Source/Mordhau/AdvancedCharacter.cpp
C++
cpp
1,404
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "AdvancedCharacter.h" #include "UnrealNetwork.h" void AAdvancedCharacter::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); // Replicate to e...
17c8c5a09ab3c6b7b164fe9c87b4c40d20700396
846310793b9eb4a7756a9892b11c990c0e4ab3cc
alu3177/IA_Practica2
/lib/solucion.cpp
C++
cpp
868
no_license
/* * Inteligencia Artificial - Práctica 2: Algoritmos de búsqueda * * AUTOR: Fernando González López-Peñalver (alu3177) * EMAIL: alu0100256543@ull.edu.es * * Fecha de entrega: 18 - Octubre - 2012 * * Descripción: * Se obtienen los datos desde tres ficheros (matriz de adyacencia, * matriz de costos y...
e9c3149514445f24416e2e6d14a5704d050a2eeb
8ccd83cee86764bdda2c7860c77b09b353cd60f2
marcinmajkowski/programming_assignment
/MathMatrix.cpp
C++
cpp
9,184
no_license
#include "MathMatrix.h" #include <cmath> // CONSTRUCTORS MathMatrix::MathMatrix() : Matrix<double>(), n(0) {} // default constructor MathMatrix::MathMatrix(int n) : Matrix<double>(n, n), n(n) {} // alternate constructor // METHODS SPECIFIC FOR SQUARE MATRIX OF DOUBLES int MathMatrix::get_size() const // return size...
0e62367c5a74e0f4fc2cdabe8086e9d13bf4f9dc
39a48e2584dacb98c5d599886e2a8687e476ebf1
yurivict/midishare-dev
/src/lib/Network/Midi/MidiShareAppl.cpp
C++
cpp
2,918
no_license
/* MidiShare Project Copyright (C) Grame 2001 Copyright (C) Mil Productions 2001 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/. Grame Research Laboratory, 11,...
6f1fb672ab8a97d290a5806d8909d7ffde010c44
28cee2940537e902cd60049dd046c924c4d53fc6
PlayerDagostino/SingularityViewer
/indra/llvfs/llpidlock.cpp
C++
cpp
5,992
no_license
/** * @file llformat.cpp * @date January 2007 * @brief string formatting utility * * $LicenseInfo:firstyear=2007&license=viewergpl$ * * Copyright (c) 2007-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you unde...
1a0c16797c432077b5a3736fa45843292d5d63ab
9031f330cffac11dc0e9dc2d81ea2efc30e0f047
MarkOates/KrampusHack2018
/src/allegro_flare/graphics/shadow_mask.cpp
C++
cpp
1,398
no_license
#include <allegro_flare/shadow_mask.h> ShadowMask::point2d::point2d(float x, float y) : x(x) , y(y) {} void ShadowMask::update_surface() { ALLEGRO_STATE previous_state; al_store_state(&previous_state, ALLEGRO_STATE_TARGET_BITMAP | ALLEGRO_STATE_BLENDER); al_set_target_bitmap(surface); al_c...
1898ca514c4f0048ad232a4aa1ed3f833d620975
bdf2d0935490ea0cc132050187a9edb1cdc0f906
GeorryHuang/octopus
/include/RPCServer.hpp
C++
hpp
1,470
no_license
#ifndef RPCSERVER_HREADER #define RPCSERVER_HREADER #include <thread> #include <unordered_map> #include <vector> #include "RdmaSocket.hpp" #include "Configuration.hpp" #include "RPCClient.hpp" #include "mempool.hpp" #include "global.h" #include "filesystem.hpp" #include "TxManager.hpp" using namespace std; typedef un...
c365c225f808d36c5339ac30fe5f13347e0944ff
21ff9ec5a48cbc07c047e349179183712af3ab35
prajaktasmane/LP-1
/final2/HPC/4/my_mpi.cpp
C++
cpp
3,672
no_license
#include<bits/stdc++.h> #include<mpi.h> using namespace std; // IMP double sq(double n){ // IMP return n*n; } class Training{ public: // note::: public double r,g,b; int skin; Training(double r,double g,double b,int skin){ this->r =r; this->g = g; ...
79744c6beebf5bdf94207edf45d35fc4d803eb76
cc652f907b3e299dc7c19cdb1a1b1abf356acba9
automatic-orchestra/ao_library
/src/Clock.cpp
C++
cpp
4,319
permissive
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Clock.cpp Copyright (c) 2016 Automatic Orchestra See the COPYRIGHT file at the top-level directory of this distribution and at: https://github.com/automatic-orchestra/ao_library/blob/master/COPYRIGHT. ~~~~~~~~~~~~~~~~~~~~~~~~~...
5848f3b5aadb94b3b23ca574c23c181e831d665b
e27568195246f5d9695d675c2decf1b596ea4ad3
skyformat99/fs123
/core123/include/core123/pathutils.hpp
C++
hpp
4,653
permissive
#pragma once // Various utilities to handle pathnames, dirs and files #include <string> #include <vector> #include <limits.h> // PATH_MAX #include <sys/stat.h> // mkdir #include <core123/throwutils.hpp> #include <core123/strutils.hpp> #include <unistd.h> #include <dirent.h> namespace core123 { // apath - return an ab...
cc017c3bb614cb42683764e1346c61e325b248b8
3b9a6b56ca3e49d4e2724fbc0107e31d7a2538e0
orabaev/cppa2z
/streams/ifstream.t.cpp
C++
cpp
4,216
permissive
#include <catch.hpp> #include <sstream> #include <fstream> using namespace std; TEST_CASE( "ifstream.ctor", "[std] [ifstream]" ) { ofstream fout("ifstream.tmp"); SECTION( "default ctor" ) { ifstream fin; REQUIRE( fin ); REQUIRE( fin.tellg() == -1 ); } SECTION( "open existi...
ef18b54a2b3318f6926d997e8bd1bd9053eb86b0
b15a3556e2ca5f67584fdd145fce0b56aa0177f3
CSCUC/ieee-practice
/Practice Solutions/9-17-19/palindrome.cpp
C++
cpp
344
no_license
#include<bits/stdc++.h> using namespace std; int main(){ string palidrone; cin >> palidrone; bool isPali = true; for(int i = 0; i < palidrone.size() / 2; i++){ if(palidrone[i] != palidrone[palidrone.size() - 1 - i]) isPali = false; } if (isPali) cout << "...
71fbaf63579ae4bd536867872dc638ba8f39e886
1f9dc0d4013ba95bebbefa4badc4fa9418bd3edf
SvenjaNussbaum/GeKo
/src/libraries/GeKo_Gameplay/Object/Ant.cpp
C++
cpp
8,283
no_license
#include "GeKo_Gameplay/Object/Ant.h" #include <stdexcept> Ant::Ant(){ m_id = 0; m_type = ObjectType::DEFAULTOBJECT; m_name = "defaultObject"; m_myNodeName = "NULL"; m_hunger = 10; m_hungerMax = 10; m_health = 1000; m_healthMax = 1000; m_strength = 0.5; m_hasDied = false; m_decisionTree = new DecisionTr...
4220d7c23d457fbb63c6a6be93bc19a9ba666b1f
09a4bf3454ab23eae8a2770357824217bb62dbdb
david-salinas/hcc
/tests/Unit/CXXLangExt/array_array.cpp
C++
cpp
1,163
permissive
// RUN: %hc %s -o %t.out && %t.out #include <iostream> #include <hc.hpp> // added for checking HSA profile #include <hc.hpp> // test C++AMP with fine-grained SVM // require HSA Full Profile to operate successfully bool test() { const int vecSize = 16; int ans[vecSize]; int *p_ans = &ans[0]; parallel_for...
64870a40adc0a9ed722c192f0495b1a16dbf1610
9fac89da733626c53505e75b99a40ab457409b76
xSeanliux/CompetitiveProgramming
/TIOJ/1066/1066.cpp
C++
cpp
1,262
no_license
#include <iostream> using namespace std; const int maxN = 2e6; int T, M, pay[maxN], take[maxN], my[5], oth[5], vals[5] = {1, 5, 10, 20, 50}; inline void solve(){ cin >> M; int myMon = 0, othMon = 0, coins = 0; for(int i = 0; i < 5; i++) { cin >> my[i]; coins += my[i]; myMon += my[i] * vals[i]; } for(int i...
950090369e2a3293c5573198edba1c48f7382f93
c15b0dd2b9d55b95dd3d287ca74ba28e847555d5
Core-Game-Project-2016/nebula-trifid
/code/foundation/util/win32/win32stringconverter.cc
C++
cc
2,536
permissive
//------------------------------------------------------------------------------ // win32stringconverter.cc // (C) 2009 Radon Labs GmbH // (C) 2013-2016 Individual contributors, see AUTHORS file //------------------------------------------------------------------------------ #include "stdneb.h" #include "win32string...
d9f3a3ea78adbfd96963197dc60ed5c0054b8c77
6728b85b6d8976c71745882078b0d69d6a5abbc8
bam241/FRENSIE
/packages/monte_carlo/manager/src/MonteCarlo_BatchedDistributedStandardParticleSimulationManager_def.hpp
C++
hpp
12,894
permissive
//---------------------------------------------------------------------------// //! //! \file MonteCarlo_BatchedDistributedStandardParticleSimulationManager_def.hpp //! \author Alex Robinson //! \brief Batched distributed standard particle simulation manager class def //! //------------------------------------------...
ec9e8d31fb37cf30eba1f3049740bf5f6f91c9cb
9fa9372aecad8d06c0ef080f8cd23c97012ef57d
Mogoai/Franc
/src/test/script_p2sh_tests.cpp
C++
cpp
14,244
permissive
// Copyright (c) 2012-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <consensus/tx_verify.h> #include <core_io.h> #include <key.h> #include <keystore.h> #include <validation.h> #include...
b3518fff853d0304fb4dbe9e63401383098d862d
27c6c4b3f388ad221470ffd143cea04506379898
CharlesPeng1998/Algorithm
/Codeforces/Codeforces Round #551 (Div. 2)/C.cpp
C++
cpp
994
no_license
#include <bits/stdc++.h> #define DEBUG 0 using namespace std; int n; string s; int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> n; cin >> s; int a, b; int val = 0; int cnt = 0; for (int i = 0; i < s.length(); i++) { if (s[i] == '(') val++; else if (s[i] == ')') val--; else cnt++...
91bf1d90bf3d644a529e965a77e158a98449b32b
3396ac61dbfae484891102780736666d8d2e53a3
cfh88888/xmly-downloader-qt5
/cgo.cpp
C++
cpp
866
permissive
#include "cgo.h" #include <QObject> Cgo::Cgo() {} Cgo *Cgo::Cgo::getInstance() { static Cgo cgo; return &cgo; } int Cgo::setCgo(const QString &funcName, void *funcPtr) { if (funcName == QStringLiteral("cgo_getAlbumInfo")) cgo_getAlbumInfo = (CGO_GET_ALBUM_INFO)funcPtr; else if (funcName == QStringLitera...
9271aa695f7232a992fb602c5af8028d320253bb
179f167eb57bc3a203eb719969c9e75436cc1da9
davisking/dlib
/tools/python/src/shape_predictor.cpp
C++
cpp
18,199
permissive
// Copyright (C) 2014 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #include "opaque_types.h" #include <dlib/python.h> #include <dlib/geometry.h> #include <dlib/image_processing.h> #include "shape_predictor.h" #include "conversion.h" using namespace dlib; u...
7a99e031ad69e97cbe4d3dfeb9c5923528b622d4
508a9a2be1e6c553771d180d417f268da382a72f
uos/ReconfROS
/reconfros_hardware/ros/trail_detection/src/buffer.cpp
C++
cpp
751
permissive
/* * buffer.cpp * * Created on: Jun 9, 2020 * Author: Marcel Flottmann */ #include <trail_detection/buffer.h> extern "C" { #include <libxlnk_cma.h> }; #include <stdexcept> using namespace trail_detection; Buffer::Buffer(size_t size) : size(size) { allocate(); } Buffer::~Buffer() { free(); } vo...
84433ee8419fcac95abeedfbac75ed8eae648de3
e195de65fdef23250587e481f7cfdf238e4acce7
vikash-si/serenity
/Kernel/Syscalls/alarm.cpp
C++
cpp
2,565
permissive
/* * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright noti...
8419746679ac825292380a53a1a7724d4839c6b5
d66ea494e94838c28067ad18daf017586568224d
Wesselmast/Kernmodule_v3
/OpenGL/src/rendering/Camera.cpp
C++
cpp
9,393
no_license
#include "Camera.h" #include <algorithm> #include <iostream> glm::vec3 input(0); glm::vec3 cameraFront(0.0f, 0.0f, -1.0f); glm::vec3 cameraUp(0.0f, 1.0f, 0.0f); float pitch = 0.0f; float yaw = -90.0f; float mousewheelPos; float lastX = 400, lastY = 400; bool firstMouse = false; bool jump = false; glm::vec3 p1(0, 0,...
ec25f55f40e12b9d65b42e425cf5a55446286f0e
1e5191362a167a92c479868570cd45db5e25d578
mmdaozhu/leetcode
/cpp/102.BinaryTreeLevelOrderTraversal/BinaryTreeLevelOrderTraversal2.cpp
C++
cpp
1,555
no_license
/* 解体思路:深度优先遍历 时间复杂度分析:O(n) */ #include <cassert> #include <iostream> #include <vector> /** * 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...
b54578b9ed63daefc675f6635a3f47f2626f4079
711ea3f03e469ebd4edafca968d1fd5c19fe5ade
BTCGreen/BTC-Green---Cumulative-Update-01
/src/rpcclient.cpp
C++
cpp
6,224
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The PIVX developers // Copyright (c) 2018 The bitcoingreen developers // Distributed under the MIT software license, see the accompanying // file COPYING or ...
847ff13c4aa6f1edbc8ba430f10012e2abf0e744
6b501d498bf483d2d8bf0e419d86150d1996b397
RenatoBrittoAraujo/Competitive-Programming
/cp/ICPC Brazilian Summer Camp/contest8/A.cpp
C++
cpp
268
no_license
#include <bits/stdc++.h> using namespace std; int n,ind; string s; int main(){ while(getline(cin,s),!cin.eof()){ istringstream ss(s);ind=0; int sum=0,msum=0; while(ss>>n){ sum+=n; sum=max(sum,0); msum=max(sum,msum); } printf("%d\n",msum); } }
b9d9aedd066ed33c49231e3309ddae84b9da7db6
4b529cabdcaef204d0b2382632c3f9b8eabb5ac3
lifujie/Misc
/CCC/04/ccc04j1.cpp
C++
cpp
207
no_license
#include <iostream> #include <cmath> using namespace std; int main() { int num; int ans; cin >> num; ans = (int)(sqrt(num)); cout <<"The largest square has side length "<<ans <<"."<< endl; return 0; }
b95a63acfe6e278a351cab74c8dbcf4d72394959
0d4a86e372faa9890c77f51f28ad2f9eff461d77
adityagupta1089/ComputeLibrary
/tests/validation/NEON/Scale.cpp
C++
cpp
18,907
permissive
/* * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * ri...
ddd2b6bc026469b5311338893d3e478a7a85d04e
ddb9139f2d5638375dd4f6bdebaa43fbddf73527
zhangguof/mkrkr
/src/objects/Tween.cpp
C++
cpp
2,907
no_license
#include "tjsCommHead.h" #include <deque> #include <algorithm> #include <time.h> #include "Tween.hpp" #include "TweenImpl.hpp" #include "ScriptMgnIntf.h" static void RegistToGlobal(iTJSDispatch2* _this,const tjs_char* name); static int test_val = 0; //---------------------------------------------------------------...
13e42752767d6449ff67be61d9ac23b51cecf03c
15b3df178297ee2dff50dab3394bfd83130b3f02
zhutony/lnav
/src/base/humanize.time.tests.cc
C++
cc
4,728
permissive
/** * Copyright (c) 2021, Timothy Stack * * 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 condi...
d4994a2850cb1341c7a7fbf81107d27be6ee39b2
397ab226d0eddd9f2471aa0c7fdce989b5b7b5b8
wfwei/coding
/structures/SearchTree.cpp
C++
cpp
1,837
no_license
#include<stdio.h> #include<stdlib.h> struct TreeNode { int val; TreeNode *left; TreeNode *right; }; typedef struct TreeNode* SearchTree; typedef struct TreeNode* Node; SearchTree MakeEmpty(SearchTree root){ if(root!=NULL){ MakeEmpty(root->left); MakeEmpty(root->right); free(root); } return NU...
bdd54e0fb2f4ded3705ce6337ab0646d1a688324
21aad0d0c284aeb6e98222d2ad6126d6a993b17e
instr3/BZOJ-solution-legacy
/A1567/1567Blue_Mary的战役地图.cpp
C++
cpp
1,836
permissive
#include <iostream> #include <cstdlib> #include <cmath> #include <cstring> #include <cstdio> #include <algorithm> using namespace std; %:define each(i,n) (int i=1;i<=(n);++i) %:define every(i,a,b) (int i=(a);i<=(b);++i) int n,map[2][51][51]; int thash1[2][51][51][51][51]; int thash2[2][51][51][51][51]; bool task(int ik...
9dea0049dbed63186708499c96100f0267be01a9
0a4b8def30352cf3899bcb39c59d07e03b0972a9
heathen557/vangogh_ATE
/receserial_msg.cpp
C++
cpp
27,388
no_license
#include "receserial_msg.h" extern Settings currentSettings; receSerial_msg::receSerial_msg(QObject *parent) : QObject(parent) { qDebug()<<" the thread begin "<<endl; isTranslateFlag = true; serial = NULL; clearFlag = false; isSaveFlag = false; /******读取本地的配置参数 confidence 与 Dmax ******/ ...
5c9e6cc8fb8f35b097c437d8311286b68b0d149d
3e809873a6c0c462d019662c55cd71f1e46fc9a5
SafeNodeNetwork/safenode
/src/test/crypto_tests.cpp
C++
cpp
14,785
permissive
// Copyright (c) 2014-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "crypto/ripemd160.h" #include "crypto/sha1.h" #include "crypto/sha256.h" #include "crypto/sha512.h" #include "crypto...
f82340bfb2af4c8bf71eb682fb230cf4580f2f2e
6f87ebc2f4bab41ab76c9b78278ff5ece108bc3b
w18600843158/romp
/pkgs-src/romp-lib/src/fmt.cpp
C++
cpp
14,789
permissive
// -*-Mode: C++;-*- // technically C99 // * BeginRiceCopyright ***************************************************** // // $HeadURL$ // $Id$ // // -------------------------------------------------------------------------- // Part of HPCToolkit (hpctoolkit.org) // // Information about sources of support for research an...
a2d6aa9d92ef40a2166c9486235e421c6e6053e3
67d26223d9f3af15f23483c9d471e1687407693c
ranger2011/AudioServer
/System.cpp
C++
cpp
1,172
no_license
// // Created by ranger on 2020/7/30. // #include "System.h" #include <boost/regex.hpp> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> using namespace boost; const char *System::FILENAME = "config.json"; System *System::instance() { static System obj; return &obj; } ...
17ba49f1a120b9714fdee41e590bf57d883dc500
29109a36cd9bc69185671b7ca68ee0860b52d1c3
LuLiangxing/KMC_MgY
/src/eam/eam_PreparingKMC.cpp
C++
cpp
267
no_license
#include <iostream> #include <vector> #include <fstream> #include "eamlib.h" #include "mgylib.h" namespace eam { void EAM::PreparingKMC(MGY *mgy) { listing_exchange(mgy); energy_difference(mgy); seaching_saddle(); } // End of "seaching_saddle()" }
a1927da9ed578097fb629146d29800eda8cc9fb5
7bdaae0a95a0fb434655c87fcfecb8b2bfb40c93
Unknow-man/mfc-4
/Ultimate Toolbox/samples/advanced/SkinsDemo/SkinsDemo.cpp
C++
cpp
5,253
no_license
// SkinsDemo.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "SkinsDemo.h" #include "MainFrm.h" #include "ChildFrm.h" #include "SkinsDemoDoc.h" #include "SkinsDemoView.h" #include "OXShadowedWnd.h" #include "OXWorkspaceState.h" #ifdef _DEBUG #define new DEBUG_NE...
3d9034a0bf12db0200a3a7f0a08dbac0def4a0b6
9042fc951088cfa8f290299b8126f330e0f026ee
Eluchon/Voto-electronico-prueba
/provincialnode.cpp
C++
cpp
543
no_license
/* * provincialnode.cpp * * Created on: 24 feb. 2018 * Author: luis */ #include "provincialnode.h" provincialnode::provincialnode() { this->prov = NULL; this->next = NULL; } void provincialnode::setElement(provincial* prov){ this->prov=prov; } provincial* provincialnode::getElement(){ return this->pro...
e88eef92c03dcae2a8dea0e46b858c44e1de61d6
8b54c48f8e54b827ee86dd4ef2cc85f66592922d
Hieu-Dang/backup
/dev_c/btmang_1.cpp
C++
cpp
596
no_license
#include<stdio.h> int max(int mang[],int n){ int max = mang[0]; for(int i = 1;i < n;i++){ if(max < mang[i]) max = mang[i]; } return max; } int min(int mang[],int n){ int min = mang[0]; for(int i =1;i < n; i++){ if(min > mang[i]) min = mang[i]; } return min; } int main(){ int n; printf("nhap so ng...