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
e5d759a520984d6b3e7e6efd9f37b54ae0e5ed49
6b37f6a49dca476796ba862eeda5daa3f134fb50
ensisoft/newsflash-plus
/engine/bigfile.cpp
C++
cpp
12,493
no_license
// Copyright (c) 2010-2015 Sami Väisänen, Ensisoft // // http://www.ensisoft.com // // This software is copyrighted software. Unauthorized hacking, cracking, distribution // and general assing around is prohibited. // Redistribution and use in source and binary forms, with or without modification, // without permission...
6165305f097431d7c832410f896217065cd7191b
e418178675d6166b55e5de9a969a01f0681e582f
firatcan/LeetCode_Cozumler
/leetcode14/leetcode14/main.cpp
C++
cpp
645
no_license
#include<iostream> #include<stdio.h> #include<vector> using namespace std; string longestCommonPrefix(vector<string>& strs) { if (strs.empty()) return ""; string prefix = strs[0]; for (int i = 1; i < strs.size(); i++) { while (strs[i].find(prefix) != 0) { prefix...
7a0b0133b5127cde84dfd6f5d7c52a2d2d09876e
e2038b539f197513d4a0720e69284e56b5222f1c
simeonfilev/Database
/sources/Catalog.cpp
C++
cpp
2,127
no_license
// // Created by Moni on 10-May-20. // #include "../headers/Catalog.h" #include <iostream> std::ostream &operator<<(std::ostream &out, Catalog &object) { std::map<std::string, std::string>::iterator it; for (auto const &x : object.catalog) { out << (x.first + " - " + x.second) << '\n'; } ret...
d79810655425c2bf234fb07f290bcfebd451f3ad
a44e589e5b63c33ea378d33467acc8f97de8ae87
dhr15/Travelling-Shortest-Path-Algo
/main.cpp
C++
cpp
3,125
no_license
//-1: same row and same col -10: that row and col are selected //ans:43122431 #include <iostream> #include<stdio.h> #include<stdlib.h> using namespace std; void row(); void col(); void zero(); void dis(); int a[4][4]={{-1,10,15,20},{5,-1,9,10},{6,13,-1,12},{8,8,9,-1}}; int t[8]={0}; int flag=0; int main() ...
3343861d0edad082ef4c3f23e3e53b60e9297f6d
30fde2c73b9a7d95668e5db03f78429c0d9512ca
KingOfTheBeef/VulkanRender
/src/Swapchain.cpp
C++
cpp
9,098
no_license
// // Created by jonat on 20/08/2020. // #include <iostream> #include "Swapchain.h" void Swapchain::initSwapchain(DeviceInfo device, VkSurfaceKHR surface) { VkPresentModeKHR presentMode; initPresentMode(device, surface, &presentMode); VkSurfaceCapabilitiesKHR surfaceCapabilities; vkGetPhysicalDeviceSu...
44f0857e476502175e4b45003e33ce8c798f7eb2
f4cc36b49d36493c062aa01d13db085ce4ce78e8
chase0213/Attacker
/HypotheticalGreedy.cpp
C++
cpp
3,517
permissive
// // HypotheticalGreedy.cpp // Crawler // // Created by 長谷川 知里 on 12/06/11. // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. // #include "HypotheticalGreedy.h" #include "resource.h" HypotheticalGreedy::HypotheticalGreedy(const Network net, const int s) { Crawl(net.getNodes(), net.getV(), net.ge...
b59e936e428eb26a5cb4bb6cc21ab92d8e752e25
c88d2efab8953199405380b5de5c1e35ff6d3daa
Anil-Bhimwal/DS-Algo
/topological sorting.cpp
C++
cpp
1,677
no_license
#include<bits/stdc++.h> using namespace std; vector<int> graph[10001]; int * topoSort(vector<int> graph[],int N); void helper(int start,vector<int> graph[],bool *visited,stack<int>&st) { visited[start]=true; vector<int>a = graph[start]; for(int i=0;i<a.size();i++) { if(!visited[a.at(i)]) ...
36cacabdfe61e5c5525075b002f05cad6f53e5ce
496893ee4efeaae7fed32b6cf97a6d696c0871dd
enriquefynn/contests
/CodeForces/445/A.cpp
C++
cpp
1,456
permissive
#include <iostream> #include <cmath> #include <cstdio> #include <cstdlib> #include <vector> #include <algorithm> #include <map> #include <set> #define EPS 0.0000000000000001 #define fori(N) for(i = 0; i < N; ++i) #define forid(N) for(int i = 0; i < N; ++i) #define forj(N) for(j = 0; j < N; ++j) #define forjd(N) for(int...
f4ac0130bb735274bafe6c6b17f741c52314e5da
338de018c59dcb5d9e83425e16691767e0e7ddd5
jjgp/llvm-development
/src/SamplePass.cpp
C++
cpp
496
no_license
#include "llvm/IR/Module.h" #include "llvm/Support/Debug.h" #define DEBUG_TYPE "samplepass" using namespace llvm; namespace { struct SamplePass : public ModulePass { static char ID; SamplePass() : ModulePass(ID) {} bool runOnModule(Module &M) override { bool modified = false; LLVM_DEBUG(dbgs() << "I'm ...
46f29039957c3c841e5f71231a515ce4a587d40e
f7763adbdddf8a12b245df73693a06745808b952
kyomukyomupurin/Submission
/ABC181/B_Trapezoid_Sum.cpp
C++
cpp
1,724
no_license
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #include <cmath> #include <complex> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <stri...
aeb972a3e3b5ec7f307446ea0e58b46f9e19db08
a4bf305a3acc7aeb418739a271d371ff07da8b95
inamotomasayuki/Game
/GameTemplate/Game/UI/menu/UIManager.cpp
C++
cpp
767
no_license
#include "stdafx.h" #include "UIManager.h" #include "UISelect.h" #include "UISprite.h" #include "UIText.h" #include "UIShadowText.h" #include "../../option/OptionControl.h" #include "UISound.h" UIManager::UIManager() { NewUIObject<UISound>(); NewUIObject<UISelect>(); NewUIObject<OptionControl>(); NewUIObject<UISpr...
0c07e7c5845e377d84f8962598b8d7ef5a06bab9
f0619ea65f1848efd3f10ffb385334acf9ef5f07
WhiZTiM/coliru
/Archive2/95/9c715b10d4d439/main.cpp
C++
cpp
1,596
no_license
#include <array> #include <memory> #include <type_traits> #include <iostream> #include <iomanip> using byte = unsigned char ; template< typename T > std::array< byte, sizeof(T) > to_bytes( const T& object ) { std::array< byte, sizeof(T) > bytes ; const byte* begin = reinterpret_cast< const byte*...
a52668cf9586b899010d72055d03879edb6ba881
baca39fa23e13db86c7ec525cdc9f0d526aa91df
Jucap1163/Rubik-s-cube-3-phase-solver
/SolverCube/Phase1.cpp
C++
cpp
22,271
no_license
#include "Phase1.h" string chercherP1(int cas) { ifstream MvtsPhase1; MvtsPhase1.open("C:\\Users\\jucap\\Documents\\SolverCube\\MovesP1.txt"); MvtsPhase1.seekg(0, ios::beg); MvtsPhase1.ignore(); while (!ws(MvtsPhase1).eof()) { int val; string mot; MvtsPhase1 >> val; MvtsPhase1 >> mot; if...
3ba812a796a7dbf27e57500cb225d22f154de12c
3a90f48fb26a0ae81350ce07ce68f372e03e493c
umbalaloan/SFrame
/oss_src/lambda/worker_pool.hpp
C++
hpp
17,938
permissive
/** * Copyright (C) 2015 Dato, Inc. * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef GRAPHLAB_LAMBDA_WORKER_POOL_HPP #define GRAPHLAB_LAMBDA_WORKER_POOL_HPP #include<lambda/lambda_utils.hpp> #include<logger...
f07252c4b56890d90bade01da042ec5bef0f9b0d
9f1ea22b182146c256b83199111cba81c4092663
LASArtem/TrafficLight
/MainUnit/Support/stateMachine/Headers/StateMachine.hpp
C++
hpp
391
no_license
#ifndef STATEMACHINE_HPP #define STATEMACHINE_HPP #include "StateMachineCtrl.hpp" class StateMachineCtrl; class StateMachine { public: StateMachine(COLOUR_STATE colourState = RED); ~StateMachine(); const char *getName() const; const COLOUR_STATE getColourState() const; private: StateMachineCtrl *...
a3d220219b29aa3fa8081d0125983cc2811a5da7
5af65cbab3e0138ace712f065a9bd2e11e583c1a
Knio/eRacer
/eRacer/Source/Graphics/BoundingSphere.cpp
C++
cpp
2,140
no_license
#include "BoundingSphere.h" #include <cassert> namespace Graphics{ void BoundingSphere::recompute(ID3DXMesh& mesh){ unsigned int positionOffset = -1; D3DVERTEXELEMENT9 vertexElement[MAX_FVF_DECL_SIZE]; mesh.GetDeclaration(vertexElement); unsigned int i=0; while(i<MAX_FVF_DECL_SIZE && vertexElemen...
78675fb7301078c61df473ecd1fc548874eb749d
34e074ee49e9ed2c199e3a325c3c6117a3475e9e
rrivas-utec/poo1_2020-2_SP2_template
/test_3.cpp
C++
cpp
595
no_license
// // Created by rudri on 9/12/2020. // #include "catch.hpp" #include "SP2.h" #include "redirect_io.h" #include <fstream> #include <string> using namespace std; TEST_CASE("Ejercicio #3") { redirect_io_t redir; ifstream file("test_3.in"); string line; string result; int i = 0; while (!file.eof...
39fbd492d8709029f9e8ee903cfa486cd30afa87
b1779a6bba62dcc2eb47cd6c6d1fd5f7df29ce8e
Ubehebe/filth
/src/HTTP_Client_Work_Unix.hpp
C++
hpp
2,297
no_license
#ifndef HTTP_CLIENT_WORK_UNIX_HPP #define HTTP_CLIENT_WORK_UNIX_HPP #include "HTTP_Client_Work.hpp" class HTTP_2616_Server_Work; // fwd declaration for ref below /** \brief Special-purpose class for a server to interact with a local socket. * \remarks This is a class for a special kind of HTTP client: an HTTP * se...
86dd8868cf07b244f5a804512c72cd0fa8dad4e5
42ada57a9f970f742d15814f6c48ddb4289de027
ghlekq/RythmGamePlayer
/RythmGame/RythmGame/ResourceManager.cpp
C++
cpp
981
permissive
#include <stdio.h> #include "ResourceManager.h" #include "GameSystem.h" using namespace std; ResourceManager* ResourceManager::_instance = NULL; ResourceManager::ResourceManager() { } ResourceManager::~ResourceManager() { map<string, SDL_Texture*>::iterator it; for (it = _textureMap.begin(); it != _textureMap.en...
d26bad4435d4d06344ee9684bbccab515072a931
0af699249b8670f915c488836965c383315d1e31
felipealmeida/javabind
/include/jvb/detail/select_static_call_functor.hpp
C++
hpp
2,401
no_license
// (c) Copyright 2012 Felipe Magno de Almeida // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef JVB_DETAIL_SELECT_STATIC_CALL_FUNCTOR_HPP #define JVB_DETAIL_SELECT_STATIC_CALL_FUNCTOR_HPP #include <jvb...
5bf40bf0848e8d3a8d7d8f69f1724249ec42d140
5799f3a72facbebfab595ebf907e39907c389380
DamieFC/chromium
/chrome/browser/ui/ash/holding_space/holding_space_browsertest_base.cc
C++
cc
7,966
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/ash/holding_space/holding_space_browsertest_base.h" #include <string> #include "ash/public/cpp/holding_space/holding_space_c...
8398e88885327a4c528c542c6f6f5090fbf6c649
326ef337d7411535692fb7bc3db7ab60e4ccf7dc
MinSikMoon/windowApp
/mLibrary01/mLibrary04/main07_mShape2.cpp
C++
cpp
4,468
no_license
//텍스트 에디터 클래스화 시키기 #include "mTextEditor.h" #ifdef _DEBUG #pragma comment(linker, "/entry:WinMainCRTStartup /subsystem:console") #endif using namespace std; class mRectangle { private: POINT upLeft, downRight; //좌상단 우하단 좌표 mTextEditor textEditor; int diff = 2; public: //1. 생성자 mRectangle() { textEditor.make(...
13868a7b3cdbc1d17e6e01b161920c82330397d4
5fb8f6445d3b54d62b3ab85146d7f0c12d3c9c44
osoko/maxmods
/libxml.mod/glue.cpp
C++
cpp
80,958
permissive
/* Copyright (c) 2006-2012 Bruce A Henderson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
427e06c32176cf7a3b01f097a94b3b1a99fbe266
b117eef3a022704b9c8d67adc378d3a311701fa3
Pefes/TankSimulatorOpenGL
/src/rendering.cpp
C++
cpp
6,065
no_license
#include "rendering.h" #include <thread> #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/gtc/matrix_transform.hpp> #include <stdlib.h> #include <iostream> #include <condition_variable> #include "ShaderProgram.h" #include "GLobject.h" using namespace std...
208991d4efb4049877c71ff9740295652eda5ee1
4782d1f13fc559fbd3f3c92f5d08fbc30f94f96c
RealZiangLiu/usc_csci420_sp20
/hw2-starterCode/.history/hw2_core_code/hw2_20200320215138.cpp
C++
cpp
26,166
no_license
/* CSCI 420 Computer Graphics, USC Assignment 2: Roller Coaster C++ starter code Student username: ziangliu ID: 9114346039 */ #include "basicPipelineProgram.h" #include "openGLMatrix.h" #include "imageIO.h" #include "openGLHeader.h" #include "glutHeader.h" #include <stdio.h> #include <stdlib.h> #include <...
ae4f2500253258fc1d446c24719a0105f7fe4f5f
73a348d055b58231d0671ab0b82bcbe86be2760d
yeopgi/coding
/baekjoon/c++/2133.cpp
C++
cpp
474
no_license
#include <iostream> using namespace std; int d[31] = {1, 0, 3}; int main(void) { ios_base::sync_with_stdio(false); cin.tie(nullptr); int length; cin >> length; if (length % 2 == 0) { for (int i = 4; i <= length; i += 2) { d[i] = d[i - 2] * 3; for (in...
56750bcf20b7514418f3b84735728473540a1aad
a2da023efcae04305f796dff3e68153fad98692c
Flatta/AudioPlayer
/WavDecoder.cpp
C++
cpp
4,721
permissive
#include "Config.hpp" #ifdef ENABLE_WAV #define NOMINMAX #include "WavDecoder.hpp" #include <algorithm> #include <Windows.h> #include <Mmreg.h> using namespace std; using sample_t = IDecoder::sample_t; using byte_t = IDecoder::byte_t; // コンストラクタ WavDecoder::WavDecoder(unique_ptr<istream> p_input) : input(move(p_...
00b127b9a82b9e3d1a34f95159d0679d82baeced
4eff5742fd201cb5d600784c3b9a67269756ee1a
ledschat/algomaze
/binary/lib/matlab/eml_rand_mt19937ar_stateful.cpp
C++
cpp
939
permissive
// // File: eml_rand_mt19937ar_stateful.cpp // // MATLAB Coder version : 3.3 // C/C++ source code generated on : 04-Oct-2017 10:47:28 // // Include Files #include "rt_nonfinite.h" #include "generateMaze.h" #include "updateMazePledge.h" #include "updateMazeRandomMouse.h" #include "updateMazeShortestPathBFS....
de20b3e97a996785a6805035b4adf91831cc85c3
cabaffc53090c68358cdfb3ff501afaed339acbf
rebider/MT4-1
/src/renderer.hpp
C++
hpp
1,221
no_license
#ifndef __MT4_RENDERER__ #define __MT4_RENDERER__ #include <QtOpenGL/QGLWidget> #include "vect2D.hpp" #include "segment.hpp" #include "sprite.hpp" #include "color.hpp" class Renderer : public QGLWidget { Q_OBJECT private : float scaleY; static const unsigned int NLayer = 3; SpriteSet* layer[...
a5e4539bd2c50fa4b77434fed7321f7df5f0294e
161d44044733613c030f3187c4bf17bb3853d7b0
alexmustdie/cpp-labs-1st-sem
/kovalenko.alexey/common/triangle.hpp
C++
hpp
854
no_license
#ifndef TRIANGLE_HPP_INCLUDED #define TRIANGLE_HPP_INCLUDED #include "shape.hpp" namespace kovalenko { class Triangle: public Shape { public: Triangle(const point_t &, const point_t &, const point_t &); friend bool kovalenko::operator==(const Triangle &, const Triangle &) noexcept; point_t getCen...
678be2f236267205a52bdbc144c6b45383ab5802
10d9359b7796842e985773643b22aad8a9e02cdc
weimingtom/nnlib-hifi4
/xa_nnlib/test/android_nn/runtime/test/generated/models/conv_float.model.cpp
C++
cpp
2,609
permissive
/******************************************************************************* * Copyright (c) 2018-2020 Cadence Design Systems, Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to use this Software with Cad...
b33e1f626eba295f0ff95570f68a27fdb1090c00
743154e72824b851e16027ecb2b5b09cc72a9e43
JoeyLi-1/webkit
/Source/WebKit2/UIProcess/API/C/WKPageGroup.cpp
C++
cpp
4,709
no_license
/* * Copyright (C) 2010 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
2ff6c80945f21d36597a36734e22083ec11e5e78
28bc918c3714a54cbd26c0940eb497e1edf49140
bouillon21/CPP_modules
/Module02/ex02/Fixed.hpp
C++
hpp
1,550
no_license
#ifndef FIXED_HPP # define FIXED_HPP # include <iostream> # include <cmath> # define RED "\033[1;38;2;255;0;0m" # define GREEN "\033[1;38;2;0;200;0m" # define BLUE "\033[1;38;2;0;0;255m" # define BROWN "\033[1;38;2;200;60;60m" # define RANDOM "\033[1;38;2;90;200;90m" # define RESET "\033[0m" class Fixed{ public: F...
9fa859bf120aa5fca02e9a125d764c197133d9df
bad1e6929c060039dcbd1f302b7bc3762c1aeb70
valerit/react-native-strava
/ios/lib/usr/local/include/fit_zones_target_mesg.hpp
C++
hpp
7,549
no_license
//////////////////////////////////////////////////////////////////////////////// // The following FIT Protocol software provided may be used with FIT protocol // devices only and remains the copyrighted property of Garmin Canada Inc. // The software is being provided on an "as-is" basis and as an accommodation, // ...
c0765c2cf9ba80cb449421f24523eef4b5f3ae2e
bc88b355594864a8ba9050cc6a35d5d425dfd367
TrellixVulnTeam/Chromium_7C66
/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
C++
cc
11,535
permissive
// Copyright (c) 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 "content/shell/renderer/layout_test/layout_test_content_renderer_client.h" #include "base/callback.h" #include "base/command_line.h" ...
f1ed4b7dc7e82f188ff89002c428cdf9a22e8087
bd65fb2db1cb4e98136ea6ffe2fcf01aa6b5753a
jmoraes7/Elements-of-Programming-Interviews
/Arrays/GenerateNonuniformRandomNumbers.cpp
C++
cpp
2,725
no_license
/* * GenerateNonuniformRandomNumbers.cpp * ----------------- * * Chapter 6 Question 16 */ #include <iostream> #include <vector> #include <algorithm> #include <random> #include <unordered_map> using namespace std; using std::default_random_engine; using std::random_device; using std::swap; using std::uniform_int_dis...
5392ccaa9622e5d2e774fc34a8bd02b6eba48216
0fa15abdf3693621b4bbd58b721f1d1b2e851c83
kuantumlad/crossSectionStudies12
/rad_corr/radCorr.cxx
C++
cxx
1,794
no_license
#include <iostream> #include <vector> #include <cmath> #include <map> #include <string> #include <TFile.h> #include <TH1D.h> #include <TH2D.h> #include <TMath.h> #include <TF1.h> #include <TGraphErrors.h> #include <TRandom.h> #include <TRandom3.h> #include <TCanvas.h> TH1D *lundToHisto(const char* h_name, int n_bins, ...
330483a492947ef55fcb4feafcff0d2294745835
970d23e86e8d418f0138eaa2041daea84b79f21f
Mehulcoder/Codeforces
/639Div2/A.cpp
C++
cpp
4,425
no_license
/* Name: Mehul Chaturvedi IIT-Guwahati */ /* Talent is Overrated */ #include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, le...
d6d866665c339a3410e261b7fe9e34c89bb8e1fc
0ea37c7f2fd56a623b5b764d1e2c3f4327ff793e
bjornheidar/aflv
/breakingbad/main.cpp
C++
cpp
1,799
no_license
#include <cstdio> #include <map> #include <string> #include <vector> #include <iostream> using namespace std; vector<int> adj[100000]; vector<int> side(100000, -1); bool is_bipartite = true; void check_bipartite(int u) { for (int i = 0; i < adj[u].size(); i++) { int v = adj[u][i]; if (side[v] == ...
f6dd47cd6f59c2d218077b110c9dae1056a31c5d
b9a56257854c1485387687f349b1b16e1cc0ad11
Rioo-may/PUBG-SDK
/SDK/PUBG_ObserverTeamInfoList_classes.hpp
C++
hpp
3,739
no_license
#pragma once // PlayerUnknown's Battlegrounds SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace Classes { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // WidgetBlueprintGeneratedClass...
bf2a95afb2b5d4fc91a8d5f51aab9458aae10961
3605973ce8eced7138649c6eb15136726ace85c4
peterfine/Robust-Sensors
/src/RobustSensorsSimulator.cpp
C++
cpp
8,796
no_license
/******************************************************************************* * RobustSensorsSimulator.cpp * * Peter Fine - EASy MSC, Thesis * Created March '05 * ******************************************************************************/ using namespace std; #include "RobustSensorsSimulator....
beee87d215d1c21998d5f61254f9a57c74d3ed59
70ef347cf0a0bda246ab6fd7e31b87259c9a63f9
ztybigcat/167final
/main.cpp
C++
cpp
2,518
no_license
#include "main.h" void error_callback(int error, const char* description) { // Print error. std::cerr << description << std::endl; } void setup_callbacks(GLFWwindow* window) { // Set the error callback. glfwSetErrorCallback(error_callback); // Set the key callback. glfwSetKeyCallback(window, Window::keyCallback...
8ed9c59f8eb18926878fabbc81df8d6df996cf9d
6d547cb53094a70cf0ff7228cf3710d4d147e9bc
personalrobotics/hebi-cpp-examples
/advanced/demos/arm_teach_repeat.cpp
C++
cpp
12,289
permissive
/** * This file demonstrates a simple teach repeat example with a 3 DOF arm. */ #include "lookup.hpp" #include "group.hpp" #include "group_command.hpp" #include "group_feedback.hpp" #include "trajectory.hpp" /// Macros needed for getting keyboard input without waiting user needing to press <enter> #if defined(_WIN3...
9d81725d58436e5469820e8e3d23384b984071ea
b0c132ed03bf47d283f7e0e9602a51f77e376b7f
MingkaiMa/Algorithm-Data-Structure
/Dynamic-Programming/LongestNoDuplicateSubstring/LongestNoDuplicateSubstring.cc
C++
cc
761
no_license
#include <iostream> #include <string> using namespace std; int longestWanted(const string s) { int maxLength = -1; int currLength = 0; int *array = new int[26]; for(int i = 0; i < 26; i++) array[i] = -1; for(int i = 0; i < s.size(); i++) { int preIndex = array[s[i] - 'a']; ...
598f5d7ddaa9c18e47527abdd5e37717ea6dc670
64daeddd740ecf95096b49f8e38c273a5169f5d5
rtakeshi/sorts
/ordenacoes/main.cpp
C++
cpp
1,597
no_license
#include <iostream> #include <iomanip> #include "exec.cpp" using namespace std; int main(){ vector<string> sortNames; sortNames.push_back("Seleção"); sortNames.push_back("Inserção"); sortNames.push_back("Shell"); sortNames.push_back("Heap"); sortNames.push_back("Merge"); sortNames.push...
82773191f84eb71d2318382a32792ded426f6c78
536ae977fe7861f2082d294a5a6de0bd16915f4d
fanliaokeji/lvdun
/flyrabbit/code/FlyRabbit/FRKernel/FRApp.cpp
C++
cpp
2,708
no_license
#include "StdAfx.h" #include <string> #include <winsock2.h> #include "FRApp.h" using namespace std; CFRApp::CFRApp(void) { m_strCmdLine = L""; } CFRApp::~CFRApp(void) { } BOOL CFRApp::InitInstance(LPWSTR lpCmdLine) { if (NULL != lpCmdLine) { m_strCmdLine = lpCmdLine; } // 初始化LuaRu...
2a061ba2192769b3814c9241cc5fe28f52726709
095e66e8aac157bc3c51d35d6b0468f445e2ee69
rosoareslv/SED99
/c++/cm-compiler/2019/12/kmeans.cpp
C++
cpp
16,412
no_license
#include "cm_rt.h" #include <sys/types.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <jansson.h> #include <vector> #include <iostream> #include "point.h" // Includes cm_rt_helpers.h to convert the integer return code returned from // the CM runtime to a meaningful string ...
688ce87f352a64a8fe03e155c8fb8a9801da37a9
5cfdf62d728f3a318c89d2c1a2cd95b4739d0850
nibilin33/chromium
/services/network/trust_tokens/has_trust_tokens_answerer.cc
C++
cc
2,907
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/network/trust_tokens/has_trust_tokens_answerer.h" #include "base/memory/ptr_util.h" #include "services/network/public/cpp/is_potential...
85d5e31b59d206e43cc89a597253dbcef904c975
acde9ff3a2a7e32bf9e0c05197da3b5d2cbe3cf1
peke2/test_lua
/call/return_multi.cpp
C++
cpp
1,023
no_license
#include <stdio.h> #include <cstdlib> #include "lua.hpp" // 戻り値が複数持てるので、試しに読んでみる int main() { lua_State *lua = luaL_newstate(); luaL_openlibs(lua); const char *filename = "sample.lua"; if( luaL_loadfile(lua, filename) || lua_pcall(lua, 0,0,0) ) { printf("ファイル[%s]が開けませんでした\n", filename); ...
d2fbe8af72134535a2f9280acfc7b9780039d172
0e794b47df286d1981f7ca2019c762d40de45c1c
ashminbhandari/Five-Crowns
/fivecrowns/hand.cpp
C++
cpp
987
no_license
#include "cardCollection.h" //Calculate information from the card collection void cardCollection::calculateInformation() { //Iterate through the collection of cards provided and set up the map for book check for (int i = 0; i < this->collection.size(); i++) { this->mmForBookCheck.insert(make_pair(this->col...
0a5c1b56c9986318ee20eab254af00462c9f9648
84bd607d723c1236f00d150580d72671411a1f0d
MattiHyvonen/SDL_Test
/libnn.cpp
C++
cpp
8,374
no_license
// // libnn.cpp // libnn // // Created by Ismo Torvinen on 23.5.2016. // Copyright (c) 2016 Ismo Torvinen. All rights reserved. // #include "libnn.h" #include <math.h> #include <iostream> #include <fstream> #include <sstream> //SIGMOID const float SIGMOID_RESPONSE = 0.5; void Sigmoid(float* netinput) { *net...
e5b034ad63fadf4fd1c38de569395cf7f65dc455
601c805ce1647c3414b42745f8af064f2a426331
NVIDIA/tensorflow
/tensorflow/compiler/xla/service/gpu/hlo_algorithm_blacklist.cc
C++
cc
3,691
permissive
/* Copyright 2019 The TensorFlow 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 a...
f351fe87c2ef0aa5946f5842f9432d5cb51d7086
b8a5dcac1aa0c8f3af15e34cb4c7a023fef99714
Johannyjm/c-pro
/AtCoder/othercontests/old/somethingOnIt.cpp
C++
cpp
227
no_license
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin >> S; int res = 700; if(S[0] == 'o')res += 100; if(S[1] == 'o')res += 100; if(S[2] == 'o')res += 100; cout << res << endl; }
23d3a4d054f9fc20efd1228ada0be8dd06add70f
ead6c7689b58b1cba0ae55e9b7137a69311c3720
ss1008359/chat
/chatClient/moc_ThAccept.cpp
C++
cpp
2,943
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'ThAccept.h' ** ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6) ** ** WARNING! All changes made in this file will be lost! ************************************************************...
5be2e97eee08b0dcd8ce1b12a1879c33296b9ef0
1ada7de20cd391d8712b358d4e905ec382919f57
ZyoungInc/EE205
/Lab4/project/01-wheres-my-parent.cpp
C++
cpp
1,390
no_license
#include <iostream> #include <cassert> class Mammal { private: unsigned count; public: Mammal() : count(0) {} Mammal(unsigned i) : count(i) {} void heartbeat() { count = (count + 1) % 4; if (count == 0) { std::cout << "Boom" << std::endl; } else { ...
a9596ba579db2259cc35fa8af80fe56fc82ded8b
f4b77071f76807b63cabbb89bc55cbabe1d826fb
emoy-kim/LeetCode
/[1081]SmallestSubsequenceOfDistinctCharacters.cpp
C++
cpp
1,035
no_license
/* * https://leetcode.com/problems/smallest-subsequence-of-distinct-characters/ */ #include <iostream> #include <vector> #include <algorithm> #include <stack> using namespace std; string smallestSubsequence(string text) { const int len = text.length(); vector<int> last_occurrence(26); for (int i = 0; i <...
8b9669ee0f4078dafcdedbdbc340bf20a4d7ac42
43dc927762d43972546ef0337fdbedf17967fafe
findawaytowin/ems
/nodejs/nodejs.cc
C++
cc
14,999
permissive
/*-----------------------------------------------------------------------------+ | Extended Memory Semantics (EMS) Version 1.4.0 | | Synthetic Semantics http://www.synsem.com/ mogill@synsem.com | +---------------------------------------------------------------------------...
8c2a42cf090b294ab98c9f47146287a046633c7a
42b2e99d0cb87fe928a1c3949cfecdfb56ff6f67
imyzx2017/mindspore_pcl
/mindspore/ccsrc/transform/graph_ir/op_declare/nn_calculation_ops_declare.cc
C++
cc
5,930
permissive
/** * Copyright 2019 Huawei Technologies Co., Ltd * * 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...
37e046a84e7885a37e6ab73bc56a353ede95e88d
4cf1e099d1026cd1eb6c39fc6734f6bdfb15c82b
antpaster/personal
/C_CplusPlusProjects/TimeSeriesForecast/main.cpp
C++
cpp
20,639
no_license
#include <iostream> #include <math.h> #include <stdlib.h> #include <vector> #include <map> #include <typeinfo> #include "commontsdata.h" #include "ema.h" #include "sma.h" #include "resampling.h" using namespace std; double getChebyshevFilteredValue(const vector<double> inputValues, const vector<double> inputCoeffs, ...
015e9b98b7ce7ec3667557bc37c2c8fb8e0fd8eb
a51f0f026ad467261318aa9df75c7591f439a704
xinan-jiang/iree
/iree/base/dynamic_library_win32.cc
C++
cc
5,891
permissive
// Copyright 2020 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...
f16978da167a70d03a5b72755d32d60a0dfab583
5a9c55052c87f33bc6b82d8ec9657ee04c00a5da
JohnReddyZhang/Cpp_Assignments
/Projects/ClassArray/ClassArray/Source.cpp
C++
cpp
957
no_license
#include <iostream> #include <string> using namespace std; class Human { private: int Age; string Name; public: Human() : Name("x"), Age(0) { cout << "Constructed a Human called " << Name; cout << ", " << Age << " years old" << endl; } Human(string InputName, int InputAge = 0) : Name(InputName), Age(In...
3e02511d679b6d1e91bb533ce43fd2d92118436f
0debca4ab91a790da85e9e135f4a0092e3f35f99
PatrikOkanovic/ETH-AlgoLab-2020
/week13/Punch/punch.cpp
C++
cpp
1,407
no_license
#include <iostream> #include <vector> #include <limits> using namespace std; void ispisi(vector<vector<pair<int, int> > >& dp, int n, int k) { for (int i = 0; i <= n; ++i) { for (int j = 0; j <= k; ++j) { cout << "(" << dp[i][j].first << "," << dp[i][j].second << ")" << " "; } cout << "...
224fe82b8ce846a46d024b4b58571e8e60906fa1
47fb52adb0c6247ccc7957c865cafbf540abfbfe
sterniste/align-server
/test/jwt_verify/test-json_web_token.cc
C++
cc
532
no_license
#include <gtest/gtest.h> #include <json_web_token.h> using namespace jwt_verify; TEST(json_web_token, test1) { json_web_token jwt{"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3N0ZXJuaXN0ZS5ldS5hdXRoMC5jb20vIiwic3ViIjoiZ29vZ2xlLW9hdXRoMnwxMTQ1NjI3NDM2MTU0OTgyMTIyNDQiLCJhdWQiOiJ2YU9JaWVvOUdySHV3ZEhheWl...
fef7fdfd3208c5b6e92f32d42bbbb9f58a19c271
c6059a2bda42f1fc721706b641bac5d59865ce10
woxiaoyao81/GacUI
/Source/Controls/TextEditorPackage/GuiDocumentViewer.cpp
C++
cpp
37,063
no_license
#include "GuiDocumentViewer.h" #include "../../GraphicsHost/GuiGraphicsHost.h" namespace vl { namespace presentation { namespace controls { using namespace collections; using namespace elements; using namespace compositions; /*********************************************************************** GuiDo...
12714d5e794a7f1bfbd97daae87f13969848cc6a
34dcd05539137f593ff2c4a139a8ca98c50cde87
harpribot/SPOJ
/source/ACPC10A.cpp
C++
cpp
778
permissive
#include<iostream> #include<stdio.h> using namespace std; class Progression{ private: int n1,n2,n3; int a,d; public: Progression(int num1, int num2, int num3):a(0),d(0){ n1 = num1; n2 = num2; n3 = num3; } void findProgression(){ if((2 * n2) == n1 + n3){ printf("AP "); ...
2ba46cebaa782d7c2e02a1691a3f66a9b984f601
e04f9b125f7e1b78d421ced575fc1a6fc9bfd19e
ssyze/Codes
/HD Multi-University/4/1007.cpp
C++
cpp
4,009
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 10; int tr[2][maxn << 2], a[2][maxn]; void pushup(int flag, int rt) { tr[flag][rt] = max(tr[flag][rt << 1], tr[flag][rt << 1 | 1]); } void build(int flag, int l, int r, int rt) { if (l == r) { tr[flag][rt] = a[flag...
57516cb90a80e0d47da2c1bf9ba049524755d3ec
a06efd5358c702f4ddc551111c148158c75a41f9
mgravell/grpc
/test/core/end2end/fixtures/h2_uds_abstract.cc
C++
cc
3,898
permissive
/* * * Copyright 2015 gRPC 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 agree...
93bbfe5cd49c638da3cf3a421bf732caca1bb4ab
63020c118a14f6c8c57c2a12acfe67099c1998f0
otmgit/coordinates
/test/converter_test.cpp
C++
cpp
4,265
permissive
/** * Tests conversion from coordinate to coordinate * * Copyright 2013 Bruce Ide * * 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...
477765be31fd088cb83aeebf6b61274a9a43ede8
0086fe1f2f21902084701d99295e0d45f75f7a9b
JSKitty/merge
/src/qt/splashscreen.cpp
C++
cpp
5,272
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2019 The Merge developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-lic...
7ebc12f53ca3e6323b2c90b3586a1d435a619772
64fcf49cac08800a9010180ad46475b7aaa8b101
xzlinux/fuchsia
/src/graphics/lib/magma/src/magma_util/platform/zircon/zircon_entry.cc
C++
cc
11,967
permissive
// Copyright 2017 The Fuchsia 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 <fuchsia/gpu/magma/llcpp/fidl.h> #include <fuchsia/hardware/platform/device/c/banjo.h> #include <lib/ddk/debug.h> #include <lib/ddk/device.h> #inc...
e25c6d45402ea0441b63c6397cb2d322ed526c15
b79d08a2afe846e559de42a87d8f8153d2bc240e
advancedwebdeveloper/webcl-webkit
/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
C++
cpp
121,143
no_license
/* * Copyright (C) 2010-2017 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditi...
e1eb6e34d1d60b4372c1604ad91ff3afaab934c6
a55887a2d7f0c4a4b9e8c34511a1c66cae0d6096
Provmawn/asteroids
/source/main.cc
C++
cc
651
permissive
#include "game.h" #include <cstdlib> #include <ctime> Game game; extern const int LEVEL_WIDTH = 3000; extern const int LEVEL_HEIGHT = 2250; extern const int SCREEN_WIDTH = 1080; extern const int SCREEN_HEIGHT = 720; int main(int argc, const char* argv[]) { srand(time(nullptr)); game.init("Game", SDL_WINDOWP...
f61d469cab3ffb15898cd022764870cd89497109
f8049634eca9322d674104e1843533088153cc50
ParadiseFallen/AsyncServer
/Project6/Source.cpp
C++
cpp
1,770
no_license
#include <Windows.h> #include<iostream> #include<string> #include<conio.h> using namespace std; //1. Написать функцию, определяющую четное или нет переданное ей число. //2. Написать функцию, определяющую простое или нет переданное ей число. //3. Написать функцию, принимающую в качестве параметра номер года и опред...
f67285ed9b45616be7b4cf03bdf7617e3ab663e3
c48e546abc9ee113bfe74b7b541e6e6076e299d8
ECS-251-W2020/chromium
/components/data_reduction_proxy/core/browser/db_data_owner.cc
C++
cc
2,027
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/data_reduction_proxy/core/browser/db_data_owner.h" #include <utility> #include "base/logging.h" #include "components/data_reduction...
a6ace04826c0e6c89b733d8a03fdd9a66596971a
c46d968f3320107f8bbc819cd6f8ad8ca9f40718
eduhirt/CG
/t1/SCV 4.2.2 CodeBlocks/InterfaceDesigner/src/GroupPanelWrapper.cpp
C++
cpp
5,412
permissive
#include <SCV/SCV.h> #include "GroupPanelWrapper.h" GroupPanelWrapperMenu::GroupPanelWrapperMenu(GroupPanelWrapper *host) : scv::ContextMenu("Group Panel") { _host = host; addMenu(new scv::ContextMenu("Add Parallel Group")); addMenu(new scv::ContextMenu("Add Sequential Group")); } GroupPanelWrapperMenu::~Gr...
add861c78a6c7db8afbe6c655f3b8c9e5a6e2df4
d48ffaa94d7082cb408c4f567fc6e8111ab9138b
gosuwachu/bsl
/groups/bsl/bsl+bslhdrs/test/bsl_c_stdio.t.cpp
C++
cpp
1,424
permissive
#include <bsl_c_stdio.h> #include <stdio.h> #ifdef std # error std was not expected to be a macro #endif namespace std { } int main() { return 0; } // ---------------------------------------------------------------------------- // Copyright (C) 2012 Bloomberg L.P. // // Permission is hereby granted, free of charge, ...
153ad55e23e565e535292209c3004d4197e1facd
07c7ab21b753465b4f8f0e62015d358d0646f40f
Sparkier/inviwo
/tools/meta/src/main.cpp
C++
cpp
6,204
permissive
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2018-2019 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
c64833212d07b85220aad09ba941ff17815e37f9
62281f3ee9945755f5eaa15b577d6f9d1a1c781c
pseudo-windows/terminal
/src/host/utils.cpp
C++
cpp
9,047
permissive
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #include "precomp.h" #include "utils.hpp" #include "../interactivity/inc/ServiceLocator.hpp" #include "srvinit.h" using Microsoft::Console::Interactivity::ServiceLocator; short CalcWindowSizeX(const SMALL_RECT& rect) noexcept ...
4af2302b5280981960c61122b3dda57423cf18f8
18b300ca2f4da3688ccac8d4f429b17b8f0392a3
Soth1985/Thor
/thor/code/Thor/Framework/ThiEvent.cpp
C++
cpp
230
permissive
#include <Thor/Framework/ThiEvent.h> namespace Thor { THOR_REG_TYPE(ThiEvent, THOR_TYPELIST_1(ThiObject)); THOR_REG_TYPE(ThiSysEvent, THOR_TYPELIST_1(ThiEvent)); THOR_REG_TYPE(ThiSimEvent, THOR_TYPELIST_1(ThiEvent)); }
b597a1c6f9d8671d2562b3d0f9a002ef1fe47f46
8b7433e589017c6650fcd305cf3055b4f5158b63
chebykinn/university
/io/lab1/src/input_capture/Prescaler.cpp
C++
cpp
1,194
permissive
#include "Prescaler.h" #include "../InputCapture.h" Prescaler::Prescaler(sc_module_name nm) :sc_module(nm), clk_i("clk_i"), icm_i("icm_i"), ins_i("ins_i"), ins_o("ins_o"), reg_counter(0) { ins_o.initialize(0); SC_METHOD(on_clk); sensitive << clk_i.pos(...
45c1fe22bd88cc3a26638d19d6bf9b6d92d7935e
a21bdd451682ee11c0d69e1733c3432397593013
sapostolakis/noelle
/src/core/loop_unroll/include/LoopUnroll.hpp
C++
hpp
1,632
permissive
/* * Copyright 2019 - 2020 Simone Campanoni * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
3edb644cc78e311f18be45231793e09a35224da5
7c45d65d29dedbf698fdb3a82d1f2658ca0563fe
BramandUn/pallycoin
/src/walletdb.cpp
C++
cpp
31,411
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Pallycoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletdb.h" #includ...
4a323f1feea542feb4994ce8766b4e9d5e5b456e
4dab59fdae26e22e29b03b3582cad7a07a26dd31
Kode/Krom
/deps/v8/src/ast/ast-value-factory.cc
C++
cc
15,939
permissive
// Copyright 2014 the V8 project authors. 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 ...
a5e328142847877ab135808905a6042f2d54c414
f4c38fa668c137bda603b7685d5a2b57da8353ee
exirous/GyverLampCpp
/src/effects/basic/MatrixEffect.cpp
C++
cpp
1,016
no_license
#include "MatrixEffect.h" namespace { CRGB mainColor = 0x00FF00; CRGB fadeColor = 0x002000; } // namespace MatrixEffect::MatrixEffect() { } void MatrixEffect::tick() { for (uint8_t x = 0; x < mySettings->matrixSettings.width; x++) { for (uint8_t y = 0; y < mySettings->matrixSettings.height - 1; y++) {...
9e1923a784feafe844041c9f663729219f013fe7
e0a206ca15142b7b623f1c30fc3fe0bec51f783e
V47VANSH/Hacktober-Challenges
/fizzbuzz_dufftt.cpp
C++
cpp
304
no_license
#include<bits/stdc++.h> using namespace std; int main(){ for (int i=1; i<101; i++){ if(i%3 == 0) cout<<"FIZZ "; if(i%5 == 0) cout<<"BUZZ "; if((i%3)*(i%5)) // if (i%3) && (i%5) !=0, then only the if case gets executed cout<<i<<" "; cout<<","; } }
4685261f6a6dcca462259f361f8c8f7c348dea74
5127365d7c87717092edbd4fb12a2e87f844b158
OLR-xray/XRay-NEW
/XRay/xrAI/space_restrictor_wrapper.cpp
C++
cpp
9,643
permissive
//////////////////////////////////////////////////////////////////////////// // Module : space_restrictor_wrapper.cpp // Created : 28.11.2005 // Modified : 28.11.2005 // Author : Dmitriy Iassenev // Description : space restrictor wrapper ////////////////////////////////////////////////////////////////////////////...
107b12410a821faeea824b2e326a7b0edd684436
debc39996690cf712eaf980c06ddc323f5211dbc
Anmol-Sri/Competitive-Programming
/CodeChef/Long Challenge/JULY2019/CIRMERGE_4.cpp
C++
cpp
1,052
no_license
#include<bits/stdc++.h> using namespace std; long long int dp[401][401]={-1}; int len; long long int sum(int *a,int l,int r) { long long int i,ans=0; for(i=l;i<=r;i++) ans=(ans+(*(a+i))); return ans; } long long int sol(int *a,int l,int r) { if(l>=r) return 0; if(dp[l][r]!=-1) { ...
40711dc2027855bf5689f3540a7e0c9c5344165f
78621adb7cfcdacaf503ae42cdaec5625640d48c
berkus/plist2flurry
/plist/include/Plist.hpp
C++
hpp
40,927
permissive
// // PlistCpp Property List (plist) serialization and parsing library. // // https://github.com/animetrics/PlistCpp // // Copyright (c) 2011 Animetrics Inc. (marc@animetrics.com) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated docume...
867deda241544540c15a3706131a0a5cc9a245b1
abc729e94dbb6477b760938511d54aeab195a42e
linuxepoch1970/sxpsourcecode
/PTB/PortfolioServer/lib/LoopbackOrderEngine.cpp
C++
cpp
4,784
no_license
/* * Copyright 2012 SXP Analytics, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
89d724578eec8ccbc0794e919b66f751544fb7b0
650fd6e91ac30d3392e5a8a9f340770d56591f18
nipinghe/Kratos
/applications/StructuralMechanicsApplication/custom_python/structural_mechanics_python_application.cpp
C++
cpp
5,549
no_license
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // license: structural_mechanics_applic...
fb8256674a7a62c9268860a372a0fab19077442a
2fe75f9b082ced0eb3e244b6e8c3c0c21218c6a5
rushioda/PIXELVALID_athena
/athena/Trigger/TrigTools/TrigJPsiTools/src/DiMuonTool.cxx
C++
cxx
4,030
no_license
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ // *********************************************************************** // DiMuonTool.cxx // Creates an object holding a pair of tracks // AUTHORS: Weina Ji (weina.ji@cern.ch) // Peter Wijeratne (paw@hep.ucl.ac.uk) // ********...
3bb6886aa853189b095b79bd072512282d787236
ecaf0f1369a3b3de44dffd757e2d69311dc850a9
dankernel/mnist-ncnn
/build/ncnn/src/layer/x86/dropout_x86_avx.cpp
C++
cpp
4,556
no_license
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
a2635c47f9b087e78721cac44c23de98b1b5462e
ed10719ba2b5c83f83c71d0593ae509d9253b95c
SergioMasson/SimpleLittleEngine
/src/SLEngine.Shared/math/frustum.cpp
C++
cpp
4,321
permissive
#include "pch.h" #include "frustum.h" using namespace sle::math; void Frustum::ConstructPerspectiveFrustum(float HTan, float VTan, float NearClip, float FarClip) { const float NearX = HTan * NearClip; const float NearY = VTan * NearClip; const float FarX = HTan * FarClip; const float FarY = VTan * FarClip; // D...
02d35abd6bdc6de044ba42cb737886d07c9d092f
c7fefdf98eae9b19904ddacd3e1c153e3acfcd1a
AlexanderViand/MP-SPDZ
/Processor/Processor.hpp
C++
hpp
19,784
permissive
#include "Processor/Processor.h" #include "Networking/STS.h" #include "Auth/MAC_Check.h" #include "Auth/fake-stuff.h" #include "Processor/ReplicatedInput.hpp" #include "Processor/ReplicatedPrivateOutput.hpp" #include <sodium.h> #include <string> template <class T> SubProcessor<T>::SubProcessor(ArithmeticProcessor& ...
9fcaf3401b136fe00c16d8288739422583eca90b
2eb8bece3ef80f2a370c836415ff1f82276a8e73
kamiltalipov/295-a2
/alexey-berdnikov@yandex.ru/Task4/EulerTour/EulerTour/Исходный код.cpp
C++
cpp
1,368
no_license
#include <cassert> #include <cstdlib> #include <iostream> #include <vector> #include <algorithm> using namespace std; bool find_Euler_tour(const vector<vector<unsigned>>& arcs, vector<unsigned>& list) { unsigned n = arcs.size(); list.clear(); unsigned first = 0; while (first < n && arcs[first].empt...
422366ffe10b713f282445571573614566ea9692
22165f8aeabf7319a3ce09b08138ca70fa0432f7
zjsxzy/Leetcode
/Maximum Subsequence Score/main.cpp
C++
cpp
1,028
no_license
#include <bits/stdc++.h> using namespace std; typedef long long LL; class Solution { public: long long maxScore(vector<int>& nums1, vector<int>& nums2, int k) { int n = nums1.size(); vector<pair<int, int>> vec(n); for (int i = 0; i < n; i++) { vec[i] = {nums2[i], nums1[i]}; ...
37f6e85cc33244bf4d7e359ad672fcda8e47de0a
c6feb379919d69d27a366a394a11e90b0973f735
ekke/encrypt_text
/ios/src/rsautils.hpp
C++
hpp
306
permissive
// (c) 2017 Ekkehard Gentz (ekke) @ekkescorner #ifndef RSAUTILS_H #define RSAUTILS_H // #include "shareutils.hpp" #include <QObject> class RSAUtils : QObject { Q_OBJECT public: explicit RSAUtils(QObject *parent = nullptr); QString encrypt(const QString &text); public slots: }; #endif
bc2974c1a4eb71b862a9a302801909e3d6ec4cdd
aa2e985378c15d933d903105937f4cdf188e2140
openspim/3rdpartypublic
/boost/libs/proto/example/mixed.cpp
C++
cpp
11,267
permissive
//[ Mixed /////////////////////////////////////////////////////////////////////////////// // Copyright 2008 Eric Niebler. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // This is an example of using BO...
d5748d077fafb51b1d9daae0f361d22577019c37
699ea36b97e3077368d3c145905b70148f51d807
bit-board/bitboard
/mbed/ble_hid_kbd_prototype/BLE_HID/examples_common.cpp
C++
cpp
3,058
no_license
/* mbed Microcontroller Library * Copyright (c) 2015 ARM 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 License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
ed28b796a5bf3285f1dfa37bd740c42fb2c4bc63
e2ae5bb5e9bc4e25c3fb191d61119b0031b0d517
SREERAGI18/chromium
/ui/display/test/test_screen.cc
C++
cc
1,216
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/display/test/test_screen.h" #include <vector> #include "ui/display/display.h" namespace display { namespace test { // static constexpr gf...