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
3285e746f85d36152d00d058871c771ef9a2b9c8
810ab398d0637c04ea59910abc76b91d7f4c241d
otcshare/chromium-src
/content/browser/accessibility/hit_testing_win_browsertest.cc
C++
cc
11,273
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. #ifndef CONTENT_BROWSER_ACCESSIBILITY_HIT_TESTING_WIN_BROWSERTEST_H_ #define CONTENT_BROWSER_ACCESSIBILITY_HIT_TESTING_WIN_BROWSERTEST_H_ #include "conte...
5e1e55040989172150d5b9a768dd281106b036f8
6ea4031d914ee6f3a5f17578d5dc507231332bb2
miguelraffoul/SortingAlgorithms
/SortingAlgorithms.cpp
C++
cpp
1,834
no_license
#include <iostream> #include <algorithm> #include <vector> #include <ratio> #include <chrono> #include <ctime> #include <cstdlib> #include "QuickSort.hpp" #include "BubbleSort.hpp" #include "MergeSort.hpp" #include "InsertionSort.hpp" #include "SelectionSort.hpp" #include "HeapSort.hpp" #define ELEMENTS 100000000 us...
67e5fe167ca346c6bf86d33f246f301489bfc234
eb92ddf08b331da53d25924b6b98279f439deb50
dskym/Algorithm
/LeetCode/847/Solution.cpp
C++
cpp
1,286
no_license
class Solution { public: int shortestPathLength(vector<vector<int>>& graph) { int result = 10000; int n = graph.size(); int visited[12][5000]; for(int i=0;i<12;++i) for(int j=0;j<5000;++j) visited[i][j] = false; ...
79efcc2b48552666a7b5477e8cb674d706cad17d
6633b8a85ffe7c5cff6a4f365cf880095bafb59a
wcc17/untitled-game
/src/util/XmlManager.cpp
C++
cpp
2,246
no_license
#include "../../includes/util/XmlManager.h" Logger XmlManager::logger("XmlManager"); std::vector<DialogueEvent> XmlManager::loadEntityDialogueForScene(std::string sceneName) { std::string filePath = "assets/xml/dialogue/scene/" + sceneName + ".xml"; //TODO: needs a method in AssetPath tinyxml2::XMLDocument d...
d25fe0a456fa79f8e5b69f1da3687b4a9bcbbb82
1220533e514ebc94848eb70ff05d32df3685304f
jonathantsang/CompetitiveProgramming
/adventofcode/2017/8/day8.cc
C++
cc
1,481
no_license
#include <bits/stdc++.h> using namespace std; int main(){ string line; map<string, int> registers; vector<string> input; // Set all registers while(getline(cin, line)){ input.emplace_back(line); cout << line << endl; stringstream ss{line}; string name; ss >> name; registers[name] = 0; } // input ...
4429252cb46621a915834e40ef8db96dd2cd7434
304519fbdba88359ee996f56b31126e7ca6e49b8
OpenMS/OpenMS
/src/tests/class_tests/openms/source/PeakPickerCWT_test.cpp
C++
cpp
5,224
permissive
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and ...
ad917c5f3fcc9ca698e6acdd7cca3a99f41d56d9
3233ea5a22bf56c31823e261e73cb6f674c3a110
joka921/QLever
/test/FileTest.cpp
C++
cpp
5,562
permissive
// Copyright 2011, University of Freiburg, Chair of Algorithms and Data // Structures. // Author: Björn Buchhold <buchholb> #include <gtest/gtest.h> #include <stdio.h> #include "../src/util/File.h" using std::string; using std::vector; namespace ad_utility { class FileTest : public ::testing::Test { protected: v...
b2caefcca56a57aafc70c689ce3e8e8816c3f0ee
1f216e5e8c05c299037bdff6502658832e29fc81
MehradShm/AlgorithmCodes
/ACM-Sgu.ru/321.cpp
C++
cpp
1,591
no_license
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cstdio> using namespace std; const int maxn=200050; bool mark[maxn]; vector<int> v[maxn], ind[maxn] , ans; vector<bool> pe[maxn]; int h[maxn] , tp[maxn] , tl[maxn] , p[maxn]; void DFS(int x) { mark[x]=1; for(int...
0c379d939d324a7b8957e565a8bf1aff036f69d6
1aa5d19a59ace7c0ad1188274a96431127451ac8
IgorYunusov/Mega-collection-cpp-1
/WNP/01_WNP_소켓입출력모델/01_SELECT모델/01_개요.cpp
C++
cpp
10,117
no_license
//---------------------------------------------------------------- // 블로킹과 넌블로킷 소켓 모드의 장단점 이해 // Select 소켓 입출력 모델 이해 // WSAAsyncSelect 소켓 입출력 모델 이해 활용 // WSAEventSelect 소켓 입출력 모델 이해 활용 //---------------------------------------------------------------- //----------------------------------- // 01 개요 //---------...
cb48dc75d8230ae0a107d5dc853b7f021ae8ed29
952c0edcf61315d49e309f855940c9bdbb40004a
Amaris10/Algorithm-Exercises
/CCFCSP/CSP201912-4.cpp
C++
cpp
3,638
no_license
#include <iostream> #include <queue> #include <unordered_map> #include <stdio.h> #include <iostream> #include <queue> #include <map> #include <vector> #include <algorithm> #include <cstring> #include <vector> #include <algorithm> #include <string> using namespace std; int n, m, t, k; vector<vector<int>> G; ...
b8658534c75c9263dc007fefd8e78757f18f2e23
c700552e8ecd963e25e82ade2a638fd0d56379d0
qingswu/CD-Burn
/BurnTools/BurnControl/code/StartBurnControl/StartBurnControl/Support/Util/UUID.cpp
C++
cpp
1,253
no_license
#include <stdafx.h> #include "UUID.h" extern "C" { #ifdef WIN32 #include <Rpc.h> #pragma comment(lib, "Rpcrt4.lib") #else #endif } #ifdef WIN32 #else #include <uuid/uuid.h> #endif std::string UUID_GetUUID() { #ifdef WIN32 UUID uuid; char *sUUID; std::string strUUID; if (UuidCreate(&uuid) == RPC_S_OK)...
519417104c613fd192633dcf9510c418c555fcc1
d7e2b5995b2d943c3a3a0d01fe36fb3a5a37cdcd
jyhuang91/active-routing
/Apps/benchmarks/naive_art/pagerank/pagerank.cc
C++
cc
15,718
no_license
#include <cstdio> #include <cstdlib> #include <pthread.h> //#include "carbon_user.h" /*For the Graphite Simulator*/ #include <time.h> #include <sys/timeb.h> #include <string.h> #include "hooks.h" // for ROI #define MAX 100000000 #define INT_MAX 100000000 #define BILLION 1E9 //Thread Structure ty...
6d678b0bf69fba847c0047d99ee42b30a3baf07c
efe1fb2473abbb01669eb0de54568659d1457363
httgxx/MyLintCode
/382.triangle-count.cpp
C++
cpp
1,855
no_license
/* * @lc app=lintcode id=382 lang=cpp * * [382] Triangle Count * * https://www.lintcode.com/problem/triangle-count/description * * lintcode * Medium (37.00%) * Total Accepted: 13869 * Total Submissions: 36908 * Testcase Example: '[3,4,6,7]\n' * * Given an array of integers, how many three ...
673e2b65dc7f3e5e30cfecaad7d90da7bd5b8ba0
ef41d1a7bbc747795044e17028ecbdb3defcd773
CMS-TMTT/cmssw
/CondFormats/RPCObjects/src/DccSpec.cc
C++
cc
1,321
permissive
#include "CondFormats/RPCObjects/interface/DccSpec.h" #include <sstream> #include <iostream> DccSpec::DccSpec(int id) : theId(id) { } std::string DccSpec::print(int depth) const { std::ostringstream str; str << "DccSpec:id=" << id() << std::endl; depth--; if (depth >= 0) { typedef std::vector<TriggerB...
6dde07c37f9b61155c7f30ac1640fbc38cfd25c7
08bed5580b047739e73b1504700cf396305d6712
yecol/aws-sdk-cpp
/aws-cpp-sdk-elasticmapreduce/source/model/PutAutoScalingPolicyRequest.cpp
C++
cpp
1,699
permissive
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
805e2a99c361c96c9bb6d063532bb3910edd583c
d3dbbe0384251527179192986f6eef8b8c6de462
Tiogaplanet/d1MiniClock
/d1MiniClock/Paddle.cpp
C++
cpp
1,038
no_license
#include <Adafruit_GFX.h> #include "Paddle.h" // Some graphics constants #define BLACK 0 #define WHITE 1 #define WIDTH 128 #define HEIGHT 64 Paddle::Paddle(int16_t x, int16_t y) : w(2), h(14), x(x), y(y), d(0) {} void Paddle::update(uint8_t target_y, int8_t ball_dx, bool should_miss) { bool my_direction = false;...
5e9cb4120c6c16b172d87db148a779807b6d5281
6bc3b24e336709a9ec7b32128f3a3273157f4aa2
Tsdevendra1/Algorithms
/graphs/kruskals/find_critical_and_pseudo_critical_edges/CriticalPseudoCriticalEdges.cpp
C++
cpp
4,276
no_license
// // Created by Tharuka Devendra on 03/08/2020. // #include "CriticalPseudoCriticalEdges.h" #include "iostream" #include "vector" #include "unordered_set" using namespace std; class UnionFindCopy { vector<int> groupSize; vector<int> parents; public: int numberOfGroups; explicit UnionFindCopy(int n...
4ceb0d4e484368287237345bb0b220e5883c5234
d0714ab665e5c2a068d2991dae55b937dc49acfc
xRiveria/Ithildin
/Ithildin/Vulkan/VulkanDescriptorSets.cpp
C++
cpp
4,041
no_license
#include "VulkanDescriptorSets.h" #include "VulkanDescriptorPool.h" #include "VulkanDescriptorSetLayout.h" #include "VulkanDevice.h" #include <stdexcept> namespace Vulkan { VulkanDescriptorSets::VulkanDescriptorSets(const VulkanDescriptorPool& descriptorPool, const VulkanDescriptorSetLayout& descriptorSetLayout, s...
dd2dc08d2aa05e00576cf0130160ce4d19dfff61
c1fca0bd94b9b321b36a834694c1213831bbde16
quanvovan/ImageProcessing
/Edge Detector/BT01/1712842_1712698_BT02.cpp
C++
cpp
1,696
no_license
#include "EdgeDetector.h" #include <string> #include <string.h> int main(int argc, char* argv[]) { #pragma region ONLY_FOR_DEBUG /*argc = 5; char* temp[5]; temp[0] = _strdup("main.exe"); temp[1] = _strdup("--laplace"); temp[2] = _strdup("--bl"); temp[3] = _strdup("test_gray.png"); temp[4] = _strdup("commandArg...
9dfb2ce62eb42e67f148af5be401aa95136f889e
b1936bc64da0ebd4b4251845956c340f933eb0ce
huahang/sandbox
/thirdparty/googletest-1.8.1/googlemock/test/gmock-actions_test.cc
C++
cc
43,521
permissive
// Copyright 2007, Google 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: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions ...
17f19e1fdf3e4008cb7e61938b01a333140e779f
8cb20f3ea42ec278f477e21b9e70e4d82636646e
Creddit-lol/Creddit-Core
/src/net_processing.cpp
C++
cpp
98,014
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Copyright (c) 2015-2020 The CREDD developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "net_processing.h" #inc...
86d44e53eaca308c4a39cba59e0a635d29eb6101
f10ca3e632104815cb874316a257a7f742dc663b
PatelManav/Codeforces_Backup
/1251B.cpp
C++
cpp
1,587
no_license
/*May The Force Be With Me*/ #include <bits/stdc++.h> #include <stdio.h> #include <ctype.h> #pragma GCC optimize ("Ofast") #define ll long long #define MOD 1000000007 #define endl "\n" #define vll vector<long long> #define pll pair<long long, long long> #define all(c) c.begin(),c.end() #define pb push_back #define f fi...
f539cbff52de8b1be4f57ec4afab4fc1bbb13c5e
59158206a8a5e49cdbabd02d8ca4ed3f46a1b494
dmilos/reflection
/src/reflection/operation/transfer/python/bind/output.hpp
C++
hpp
3,830
permissive
#ifdef Py_PYTHON_H #ifndef reflection_operation_transfer_python_bind_output #define reflection_operation_transfer_python_bind_output // ::reflection::operation::transfer::python::bind::output_class #include "./typeObject.hpp" #include "./interface.hpp" #include "../../factory.hpp" #include "../../../ar...
3246bb143cd4cf8d3f315ee2ec06929dcdec91d9
f1935452d4ae4549bbac00df55c17f745712da4d
rn10950/FVWM95-Updated
/all-applications/net/nrxmail-0.94/OXMoveMail.cc
C++
cc
3,217
no_license
/************************************************************************** This file is part of NRX mail, a mail client using the XClass95 toolkit. Copyright (C) 1998 by Harald Radke. This application is free software; you can redistribute it and/or modify it under the terms of the G...
177134b6073d2df22e0abd7f225e59b3526005f3
875bea7ef76619c449cb182e2ae01946f2a35f2b
guiloor/c-code
/2016/Ejercicios/04_Estructuras_de_Control/01_Estructuras_Iterativas/01_Medias/Medias.cpp
C++
cpp
517
no_license
#include <stdio.h> #include <stdlib.h> int main () { int sumTotal = 0, nIntroducido = 0, media, contador = 0; printf("Introduce las notas de la clase para realizar su media (para parar de introducir notas, escriba un número negativo): \n"); while (nIntroducido > -1){ printf("%iº nota:", contador+1); scanf("...
2aa05c3708e16029c73be64df66a6b2b4a388d18
ad25702fb9c30aeddee74adb4ae1c72a237c809b
ahmCoding/Chip8Emulator
/src/main.cpp
C++
cpp
313
no_license
#include "include/chip8.h" int main() { map<Uchar, bool> tst; typedef std::pair<Uchar, bool> p; tst.insert(p('1', true)); bool eing = false; while (!eing) { Uchar g; cin >> g; eing = tst(g); } //Chip8 tst; //tst.initialize(); //tst.loadGame(); }
32016a9a1eed445db3760abf304026cd7d6a9367
e8c63e6651393f04af5fb596ee2d5798c5cb8b52
mdecourse/mbsim
/examples/mechanics/flexible_body/flexible_crank_mechanism_fe/main.cc
C++
cc
492
no_license
#include "system.h" #include <mbsim/integrators/integrators.h> using namespace std; using namespace fmatvec; using namespace MBSim; int main (int argc, char* argv[]) { DynamicSystemSolver *sys = new CrankMechanism("MBS",8); sys->initialize(); LSODEIntegrator integrator; integrator.setEndTime(0.1); integra...
6441b0e184e6d12d49bdd3baa5dbc20fb8a3fa86
add5d6dcb4f03239039de1c43394579763292231
xlcvv/PAT_train
/念数字.cpp
C++
cpp
770
no_license
#include<stdio.h> #include<string.h> int main() { char k[10][10] = {"ling", "yi", "er", "san", "si", "wu", "liu", "qi", "ba", "jiu"}; int i=0,c=0; char b[10000]; scanf("%s",b); if(b[c]=='-') { printf("fu "); c++; } for(i=c;i<strlen(b);i++) { if(i!=strlen(b)-1){ printf("%s ",k[b[i]-'0']); } else printf(...
6ee7805386620650448f0d34f6605dcb4751dd44
ed95aa1b5ba011c36cd0ba58389ce72787e08011
AMSearer/Cpp-Courses
/Intro to Cpp/9.2/divisible5 (2019_01_09 03_21_30 UTC).cpp
C++
cpp
524
no_license
/* * divisible5.cpp * * Determine if the input integer is a multiple of 5 (use % modulus operator) * * Created on: Dec 3, 2018 * Author: amsea */ #include <iostream> using namespace std; int main() { int input; cout << "Enter an integer, and we'll tell you if it is divisible by 5." <<...
0a119d4afdfe685bc24a2062fb19ae72d63e5505
fb30f6d0e9b1fd4567493c219d0097be4e59ce30
MLouvet/RayTracing101
/quad.cpp
C++
cpp
1,041
no_license
#include "quad.h" #include "triangle.h" Hit Quad::intersect(const Ray & ray) { Triangle t1(point1, point2,point3), t2(point1, point2, point4) , t3(point1, point4, point3), t4(point4, point2, point3); Hit h1 = t1.intersect(ray), h2=t2.intersect(ray), h3=t3.intersect(ray), h4=t4.intersect(ray); if (!h1.no_hit || !...
d1f92488201acf44a29866ff0e2c5496cd69f693
939361763998c7fb62b85eeed5919eaed962d507
vogeldor/Marburg_Software_Library
/WaveletTL/interval/i_adapted_index.cpp
C++
cpp
5,585
permissive
// implementation for i_adapted_index.h #include <cassert> namespace WaveletTL { template <class IAdaptedBasis> IntervalAdaptedIndex<IAdaptedBasis>::IntervalAdaptedIndex(const IAdaptedBasis* basis) : basis_(basis) { if (basis_ == 0) { index_ = 0; } else { index_ = new IMultiIndex(basis->...
94c6560ce2daf0b5ca62c8b7f38fb8e19b8cbc10
f806b6ab5dff232fca4485b04f81925f895c83c4
fungos/seed
/contrib/Rocket/Source/Core/ElementDocument.cpp
C++
cpp
13,877
no_license
/* * This source file is part of libRocket, the HTML/CSS Interface Middleware * * For the latest information, see http://www.librocket.com * * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and assoc...
380f61376098287c49812bdf4373910ee18136e7
a6c6c1be1c1df2be6ed795f89003ce2198b229c8
Gevorg01013/my-first-project
/intherenase.cpp
C++
cpp
1,409
no_license
#include<iostream> using namespace std; #define P 3.14 class Shape { protected: int r; int s; int m; public: Shape(int& r1, int& s1, int& m1) :r(r1), s(s1), m(m1) { cout << "this is a constructor for Shape \n"; } double makeres() { return 1; }; double paragic() { return 1; }; }; class circle :public Shape { p...
7dcba03314bdb756830cf22f34387a3c101b90f1
31ad84d3395344e17ec0ed637e3f6311786acd41
Corsol/ScriptDev3
/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp
C++
cpp
15,966
no_license
/** * ScriptDev3 is an extension for mangos providing enhanced features for * area triggers, creatures, game objects, instances, items, and spells beyond * the default database scripting in mangos. * * Copyright (C) 2006-2013 ScriptDev2 <http://www.scriptdev2.com/> * Copyright (C) 2014-2015 MaNGOS <https://get...
eb735ee1ad5003768cbeb4c2eace2bedb0b1a2d8
130dc01dfab19593aa93c713ee30d64f49843e26
ECS-251-W2020/chromium
/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc
C++
cc
17,031
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h" #include <string> #include "base/strings/string_util.h" #include "base/strings/u...
7b6c2c4729355bba7764c0a9bbbb03242a7ca0f2
7c58a7e0896d08921cd1039c70ba1a799aa8dde9
ECS-251-W2020/chromium
/extensions/browser/image_loader.cc
C++
cc
11,684
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "extensions/browser/image_loader.h" #include <stddef.h> #include <map> #include <utility> #include <vector> #include "base/bind.h" #include "b...
b7384bc769a2ffbd3f8feebe8a89a8d9dc79dac1
b90bf6a2d6ee1aeef69f969395c66a4de4f10409
arnaudgelas/Examples
/c++/PCL/PointCloud/PointCloud2/PointCloud2.cpp
C++
cpp
1,599
no_license
// STL #include <iostream> // PCL #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/common/io.h> #include <pcl/io/pcd_io.h> int main (int argc, char** argv) { sensor_msgs::PointCloud2 blob; //pcl::io::loadPCDFile ("file.pcd", blob); // pcl::fromROSMsg (cloud_blob, *cloud); //* convert fr...
d8832e0f03b7fcfc1613c60ca54dcda7117ce667
9abb6ee57d31d5ef6d1ab06646a8dd7fba46a870
MaxGreil/rdkit
/Code/GraphMol/MolDraw2D/DrawTextFTCairo.cpp
C++
cpp
3,049
permissive
// // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // // Original author: David Cosgrove (CozChemIx) on 08/05/2020. // #include <GraphMol/MolDra...
5b0258cbd6ec5b914d65f772ad64eb1629d833a1
db9e8c91e3fd4f8763600157a8866b160006971c
ReznikovRoman/mirea-hw
/algorithms/EuclideanAlgorithm.cpp
C++
cpp
817
no_license
 #include <iostream> using namespace std; int gcd(int num1, int num2) { // Пока числа не равны (==> пока не нашли НОД) // Отнимаем от большего числа меньшее // Пример /* 1. 35, 10 (35 > 10 ==> 35 - 10) 2. 25, 10 (25 > 10 ==> 25 - 10) 3. 15, 10 (15 > 10 ==> 15 - 10) 4. 5, 10 (...
b0fa5c4339bb4ab4c4520aa2a198ff9a26f228e4
77e45c91cbb9d09ee8e037d241cb39b45eebc0ac
Flaming-Potatoes/Sea-Battle-1.02
/Sea Battle 1.02/Sea Battle 1.02/Shoot.cpp
C++
cpp
2,631
no_license
#include"Header.h" #define ll long long #define rep(i, k, n) for(i=k;i<=n;i++) #define irep(i, k, n) for(i=k;i>=n;i--) #define rrep(i, k, n, j) for(i=k;i<=n;i+= j) #define newl cout << "\n"; #define len(x) x.length() #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL); #define cendl(k) cout << k << endl; #def...
7e0ef62006b51eb32500ffa2ec4bb2d087cccae9
fe68e6c689151ec180cdacdf74803edec7fb75de
sjku1/TechnicalInterviewPrep2020
/assignments/week3/day1/merge.cpp
C++
cpp
235
no_license
class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { for(int i=0;i<n;i++){ nums1[m+i]=nums2[i]; } sort(nums1.begin(),nums1.end()); } };
e8e5401f75270182a69149085b3a7464f332559d
f43f3b4d11c681b25593d8c1bc667474aa214d07
CTHamma/OpenGL
/Week2/week2-6-DynamicTriangles-mouse.cpp
C++
cpp
5,551
no_license
/////////////////////////////////////////////////////////////////////// // // Dynamic Triangles mouse.cpp //To Demo this, you have to press the left mouse button three times, //and it creates a triangle dynamically. Then you click three more times, //it will create a new triangle //A mouse event occurs when one of the...
eaa8bd9d6ad21d17f203f4892611c67baa20198f
28cc44927211160ee71067f84d1a8fb6ffc9aa86
Kevmen/Proyecto-Laboratorio-Computaci-n-Gr-fica
/figuras.cpp
C++
cpp
31,288
no_license
#include "figuras.h" const double PI = 3.1415926535897; float text_der = 1.0; float text_izq = 0.0; float avanza = 1.0; void CFiguras::skybox(float largo, float altura, float profundidad, GLuint text) //Funcion creacion cielo { GLfloat vertice [8][3] = { {0.5*largo ,-0.5*altura, 0.5*profundidad}, ...
2ddab493e22eae0a7bfd28ec8f8e65ab7195fd43
2418fa64bef8791d4aa202f1dff61b39058091be
OpenWoS/ReMix
/src/packetforge.cpp
C++
cpp
2,855
no_license
//Class includes. #include "packetforge.hpp" //ReMix includes. #include "serverinfo.hpp" #include "logger.hpp" #include "player.hpp" #include "helper.hpp" #include "user.hpp" //Qt Includes. #include <QObject> #include <QDebug> PacketForge* PacketForge::instance{ nullptr }; PacketForge::~PacketForge() = default; Pa...
0da1e6c2472ae21d3a5c615b5f6760de026a0dcb
4ea84abfbbe048884d22d8eeba0f74dc9f7744ff
Honey-old-Fashion/Honer-old-Fashion
/ZemiNo3 ver1.6/ZemiNo3/CharacterManager.cpp
C++
cpp
1,219
no_license
#include "CharacterManager.h" #include "Rectangle.h" //#include "Triangle.h" CharacterManager::CharacterManager() { } CharacterManager::~CharacterManager() { } /*********************************************** * @brief 初期化 * @param[in] None * @return None ***********************************************/ void Charac...
02913dde254685e9107226ee8bdbd6bc0d441392
d1e716028baab2462d69ed5aa846aba4a067b8e2
AshiishKarhade/Competitive-Programming-using-Python-C-
/coding_blocks/algo_c++/arrays/challenges/4_rainwater_harvesting.cpp
C++
cpp
603
no_license
#include<iostream> using namespace std; int maxWater(int arr[], int n){ int left[n]; int right[n]; int water = 0; left[0] = arr[0]; for (int i = 1; i < n; i++) left[i] = max(left[i - 1], arr[i]); right[n - 1] = arr[n - 1]; for (int i = n - 2; i >= 0; i--) right...
19c45960ec7b14cefd7fda6974b82f6957a9f7c4
e7c9a934af6570a66f483b1fbbe7345ea0a084e3
W1LDN16H7/mygui
/MyGUIEngine/src/MyGUI_ResourceTrueTypeFont.cpp
C++
cpp
43,141
permissive
/* * This source file is part of MyGUI. For the latest info, see http://mygui.info/ * Distributed under the MIT License * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) */ #include "MyGUI_Precompiled.h" #include "MyGUI_ResourceTrueTypeFont.h" #include "MyGUI_DataManager.h" #inclu...
ef9559931f57de6e79f1495ba6b2297ce3aaade3
1cb2c728b9d2f24125699ca2bbc0ce1afa567bca
MiohitoKiri5474/CodesBackUp
/C++/CodeForces/Education/R-038/pA.cpp
C++
cpp
2,281
no_license
// by. MiohitoKiri5474 #include<bits/stdc++.h> #pragma GCC optimize ( "O3" ) #pragma loop_opt ( on ) using namespace std; typedef long long LL; // define tools #define REPP(i,f,s) for ( int i = f ; i < s ; i++ ) #define REPM(i,f,s) for ( int i = f ; i >= s ; i-- ) #define REPALL(i,n) for ( auto &i: n ) #define debu...
f102197289bdcc112f68f173aafcdcdbe88f41dc
3c308244281bc3f475020178d1090c56b7ed8fb3
rsbergheim/openssl-example
/examples.cpp
C++
cpp
1,821
permissive
#include "crypto.hpp" #include <iostream> using namespace std; int main() { cout << endl; /* cout << "MD5 with 1 iteration" << endl; cout << Crypto::hex(Crypto::md5("Test")) << endl << endl; */ cout << "SHA-1 with 1 iteration" << endl; cout << Crypto::hex(Crypto::sha1("Test")) << endl << endl; c...
532cf447f63c5087a524036158458cf12ed5d662
6b9fe26ccc9478a4d5a641c30be40e202aad4a39
pbb59/ScaffCC
/clang/lib/AST/ExternalASTSource.cpp
C++
cpp
1,834
permissive
//===- ExternalASTSource.cpp - Abstract External AST Interface --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
3cfdcd99f74181c6c1e2cc455ff27d752b68eaa7
2a0299037795e1b0b323e76ba5f32384d2fb5101
jjimenezg93/star-control2
/src/comp_collision.cpp
C++
cpp
4,269
permissive
#include <iostream> #include <assert.h> #include "../include/audiobuffer.h" #include "../include/audiosource.h" #include "../include/collision.h" #include "../include/comp_collision.h" #include "../include/comp_render.h" #include "../include/entity.h" #include "../include/entity_params.h" #include "../include/messages...
3097c23e7c1e6146f60ebea69bb7029722b2043b
9fb61a6544ec420c320e98fa71e3a6d4ef5fd984
cheng-42/test
/libopenfpga/libarchopenfpga/src/read_xml_circuit_library.cpp
C++
cpp
35,785
permissive
/******************************************************************** * This file includes the top-level function of this library * which reads an XML modeling OpenFPGA architecture to the associated * data structures *******************************************************************/ #include <string> /* Headers...
fecff4c902ed4a95594016573f1c63859762c2ed
3c14c0c7833de42cfea88bbf16c3688f0db0cb06
lb9726/Classic-examples-of-practice
/004-网络编程/000-TCP/others/socket-005-epoll/生产者与消费者/Buffer.cpp
C++
cpp
1,161
no_license
/************************************************************************* > File Name: Buffer.cpp > Author: canjian > Mail:410001089@qq.com > Created Time: Wed 16 Jul 2014 05:12:50 AM PDT ************************************************************************/ #include "Buffer.h" #include <iostream> using name...
60a8020be00b50caae22c641b7deed80fb1d0ece
50d76e0f003df00557b452d5904bc2b035f87977
Rariolu/CourseProj1
/CourseProj1/CollisionDemoScene.cpp
C++
cpp
4,945
no_license
#include "CollisionDemoScene.h" CollisionDemoScene::CollisionDemoScene() { } void CollisionDemoScene::Dispose() { Scene::Dispose(); audioDevice->StopSound(bluesiSource); } void CollisionDemoScene::Initialise() { //Call the default "Initialise" method //for general purpose scene initialisation. Scene::Initialis...
ca4476e0c673b61d750cb1f9d5b943b2aa2de4af
718e6e51175a20dc4fb5e916bb3136f982347e05
slavaguk2000/iipu
/Lab3/build-Battery-Desktop_Qt_5_12_0_MSVC2017_64bit-Release/release/moc_batteryinfo.cpp
C++
cpp
5,729
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'batteryinfo.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.0) ** ** WARNING! All changes made in this file will be lost! **************************************************...
338921fa56b741b290e62fd1085e467cd8b56a86
4cb086a23578cb066ae1c2f32426c908ab351745
pdeguing/piscine_cpp
/d03/ex03/ScavTrap.cpp
C++
cpp
2,048
no_license
/** * File : ScavTrap.cpp * Author : pdeguing <pdeguing@student.42.us.org> * Date : 11.04.2019 * Last Modified Date: 11.04.2019 * Last Modified By : pdeguing <pdeguing@student.42.us.org> */ #include "ScavTrap.hpp" ScavTrap::ScavTrap(void) { this->_name = "ScavTrap"; this-...
e923d6f0686680d7d3b22324fd8d9f855d14ae39
baffc1f95ce2a6a26a02f9a79474202dcd207c02
minghao2016/sbo
/src/get_kgram_freqs.cpp
C++
cpp
309
no_license
#include "sbo.h" using namespace Rcpp; // [[Rcpp::export]] List get_kgram_freqsC(const std::vector<std::string>& sentences, int N, const std::vector<std::string>& dict){ List l; kgramFreqs(sentences, dict, N).save_to_R_list(l); return l; }
f742dad2a9f6be9867858bd703f2fdcda2f29420
ee1fa3120953ba9bfda53094f5868a7afbf7dad6
bittuh/pdp-final
/search_block_parallelism/anqi_block_parallel/anqi.cc
C++
cc
9,350
no_license
/*****************************************************************************\ * Theory of Computer Games: Fall 2012 * Chinese Dark Chess Library by You-cheng Syu * * This file may not be used out of the class unless asking * for permission first. \*****************************************************************...
9bfe0000f0c87f65eff1605e5a1efe10c61ad4e3
d54cb936ecbc97d43052963f091978b79feb737c
AJenbo/devilutionX
/SourceX/sound.cpp
C++
cpp
4,847
permissive
#include "all.h" #include "../3rdParty/Storm/Source/storm.h" #include "stubs.h" #include <SDL.h> #include <SDL_mixer.h> namespace dvl { BOOLEAN gbSndInited; int sglMusicVolume; int sglSoundVolume; HANDLE sgpMusicTrack; Mix_Music *music; SDL_RWops *musicRw; char *musicBuffer; /* data */ BOOLEAN g...
6280f3863a54bf1aa569d6279963f49ee58200c9
4ac213f02b1b30acf45e525630a682609182b3c3
MingxuZhang/PolarCodesDNN
/src/gen_fb_list.cpp
C++
cpp
5,690
no_license
#include <numeric> #include "gen_fb_list.hpp" template<typename T> T string_to_value(std::string value_str) { T value; try { std::istringstream iss(value_str); iss.exceptions(std::ios::failbit | std::ios::badbit); iss >> value; } catch(std::exception&) { std::stringstream message; message << "conversi...
f0a7e6ad8d0a9a8b84eb90c422d5f792556e27e1
89a2917a41b6a315728d322606a7980f4c85e2fe
akshaymarch7/chromium
/android_webview/renderer/js_java_interaction/js_java_configurator.cc
C++
cc
3,668
permissive
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "android_webview/renderer/js_java_interaction/js_java_configurator.h" #include "android_webview/common/aw_origin_matcher.h" #include "android_we...
c0ad5e95cfedabedd1f0b46943da60373146f1e8
a56ecee6ed38f4f2bd17a6a730c55278f10e4267
DeathNot/Study
/专业知识/c++/c++ primer plus/ch6/ifelseif.cpp
C++
cpp
460
no_license
#include <iostream> const int Fave = 27; int main() { using namespace std; int n; cout << "Enter a number in the range 1-100 to find "; cout << "my favorite number: "; do { cin >> n; if (n < Fave) cout << "Too low -- guess again: "; else if (n > Fave) ...
718c4a4bb4e94affa91fa1b62a4fe464f5dc9631
036b7e24e9f1e903216f27256810a6209849a888
wgapl/caffe
/include/caffe/net.hpp
C++
hpp
11,354
permissive
#ifndef CAFFE_NET_HPP_ #define CAFFE_NET_HPP_ #include <map> #include <set> #include <string> #include <utility> #include <vector> #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/layer.hpp" #include "caffe/proto/caffe.pb.h" namespace caffe { /** * @brief Connects Layer%s together into a direc...
126012df778df311636eb5207d32e3df8f29af50
0db0d9dd344a3db08ee519ec6fadad5a75931e05
KoreHuang/C-folder
/进制转换/进制转换/main.cpp
C++
cpp
347
no_license
// // main.cpp // 进制转换 // // Created by mac on 16/3/3. // Copyright © 2016年 mac. All rights reserved. // #include <iostream> using namespace std; int main(int argc, const char * argv[]) { // insert code here... int x=15; cout<<hex<<x<<' '<<dec<<x<<' '<<oct<<x<<endl; std::cout << "Hello, World!\n"; ...
2d042ec0ed165da2b9bdb369b5c53796f599622d
b2d3bde3e2351cdc944daf49eb88f7b0974e605e
mazhishuai/ma_zhishuai
/6.36/6.36.cpp
C++
cpp
389
no_license
#include <iostream> using namespace std; long power( long, long ); int main() { long b; long e; cout << "Enter a base and an exponent: "; cin >> b >> e; cout << b << " raised to the " << e << " is " << power( b, e ) << endl; } long power( long base, long exponent ) { if ( exponent == 1 ) ret...
a338cd442cd1c1717e36e1cd85f55ecc1fbb0f46
28608d5bf72e6fefff68eede89e22d943ede288a
apebill/EUChain
/src/qt/sendcoinsentry.cpp
C++
cpp
4,176
permissive
#include "sendcoinsentry.h" #include "ui_sendcoinsentry.h" #include "guiutil.h" #include "bitcoinunits.h" #include "addressbookpage.h" #include "walletmodel.h" #include "optionsmodel.h" #include "addresstablemodel.h" #include <QApplication> #include <QClipboard> SendCoinsEntry::SendCoinsEntry(QWidget *parent) : Q...
d8e511c636bf7df25162b45949414c7ce1a95065
988c8e50dcb745a817494f54d44badf33a2c98cf
tinyauyu/elec4848
/ecdsa_cryptopp/ecdsa_with_arduino.cpp
C++
cpp
6,352
no_license
// g++ -g3 -ggdb -O0 -DDEBUG -Wall -Wextra cryptopp-test.cpp -o cryptopp-test.exe -lcryptopp -lpthread // g++ -g -O2 -DNDEBUG -Wall -Wextra cryptopp-test.cpp -o cryptopp-test.exe -lcryptopp -lpthread #include <stdio.h> #include <stdlib.h> #include <iostream> using std::cout; using std::cerr; using std::endl; #include...
003ac60df51b8d24861d8de70ae6ec3266048681
99a1ca231b6000522dbb024f004c540dfd52204f
testAccountDeltas/xray-oxygen
/code/xrQt/xrDevLaunch/xrMain.cpp
C++
cpp
14,230
permissive
/************************************************* * VERTVER, 2018 (C) * X-RAY OXYGEN 1.7 PROJECT * * Edited: 10 May, 2018 * xrMain.cpp - Main source file for compilation with Qt * xrLaunch *************************************************/ #include "xrMain.h" ///////////////////////////////////////// #ifdef __cplusplu...
584bd38608962703710e780a45b858291f9e71a0
5c9314a6c2bae8c3510f937de68521f26196fe01
alexandraback/datacollection
/solutions_5769900270288896_0/C++/Awcrr/B.cpp
C++
cpp
789
no_license
#include <cstdio> #include <cstring> #include <cstdlib> using namespace std; int ret,r,c,n,T,tmp; int cnt(int x){ int ans = 0; while(x){ if(x & 1) ++ ans; x >>= 1; } return ans; } int calc(int x){ int ans = 0; for(int i = 0;i < r;++ i) for(int j = 0;j < c;++ j) if((x >> (i * c + j)) & 1){ if(i > 0 &&...
bfd6bb23abfbb97ec3932c74b09f9cc8972673e5
f0f6616c76a7af2a5e75a4ba610298b05bc9ba43
protasov-ilja/OOP
/lab4/task1var2/task1Tests/ShapeControllerTests.cpp
C++
cpp
19,028
no_license
#include "stdafx.h" #include "..\CCircle.h" #include "..\CLineSegment.h" #include "..\CRectangle.h" #include "..\CTriangle.h" #include "..\CShapeController.h" #include <vector> struct ShapeControllerDependencies { std::stringstream input; std::stringstream output; }; struct ShapeControllerFixture : ShapeControllerD...
904b9c8ba1d5abce36960b071012b89d4820baf7
f094084887cb0d524f3f0711acc59fadd2497de1
ckti-integral-clone/wagerr
/src/qt/addresstablemodel.cpp
C++
cpp
16,235
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2018 The Wagerr developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-li...
7b666803d8896bd4bb23e56923cc3b6f0dacf4f3
13966443363f1b822cea02a3079be8d9d51aa637
TonyCrane/OI
/local/codes/nc1000_5.cpp
C++
cpp
819
permissive
/************************************************************* * > File Name : pi.cpp * > Author : Tony * > Created Time : 2019年01月14日 星期一 12时43分19秒 **************************************************************/ #include<bits/stdc++.h> using namespace std; int a, sum; void func(int n) ...
0f26ecb64312be4e9e2f51f579c5f863f5937f70
c7eaafc2bc46a62148def5064cf1b7418266ec47
sunnyps/chromium
/third_party/blink/renderer/modules/mediacapturefromelement/canvas_capture_handler.cc
C++
cc
25,724
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 "third_party/blink/renderer/modules/mediacapturefromelement/canvas_capture_handler.h" #include <memory> #include <utility> #include "base/bind....
f72cc9d771367258cedcd70fa41289cc7239ecde
5db5d39df9aa3e8dfe098003c4afa16618c5caac
WilliamOBrienApelgren/SaveExtension
/Source/Editor/Private/SaveExtensionEditor.cpp
C++
cpp
3,533
permissive
// Copyright 2015-2020 Piperift. All Rights Reserved. #include "SaveExtensionEditor.h" #include "Kismet2/KismetEditorUtilities.h" #include "Asset/AssetTypeAction_SlotInfo.h" #include "Asset/AssetTypeAction_SlotData.h" #include "Asset/AssetTypeAction_SavePreset.h" #include "Customizations/SavePresetDetails.h" #inclu...
9c6fd03d7476304b87455e99b4eeefe6e55f3db6
4111a0c2fd2515c081d630e42e5c3340e6b1ab8a
MarkRDavison/zeno
/lib/core/src/Logger.cpp
C++
cpp
394
permissive
#include <zeno/Core/Logger.hpp> #include <iostream> namespace ze { Logger::Logger() : Logger(Severity::Error) { } Logger::Logger(Severity _severity) : Logger(std::cout, _severity) { } Logger::Logger(std::ostream& _ostream) : Logger(_ostream, Severity::Error) { } Logger::Logger(std::ostream& _ostream, Sev...
621d7558741045157c776030c83fcd17ccafadb6
6ee15fc0cbb8dc765e94c0dfbf8d45b676936633
KeyserGuillaume/Window-optimisation
/src/costFunctions.cpp
C++
cpp
14,877
no_license
#include "costFunctions.h" int NbRabots::operator()( const Fenetre & fenetre, const Volet & gauche, const Volet & droit) const{ int result = 0; //bloque en haut à gauche if (gauche.hauteurGondSommet > fenetre.hauteurGondSommetGauche || \ gauche.hauteurInterGonds + gauche.hauteurGondSommet > fe...
aca4ef6743b54b0b46776a133bc38769d28f20b5
e1812047bdd3a16a41c47df7af5d04f82398533e
ameet-1997/Competitive_Coding
/Codeforces/Codeforces_Round_374/japanese_crossword.cpp
C++
cpp
406
no_license
#include <iostream> using namespace std; int main() { int n; cin>>n; char s[10000]; cin>>s; int counter = 0; int a[10000]; for(int i=0;s[i]!='\0';++i) { if(s[i] == 'B') { int temp = i; while((s[i] == 'B')&&(s[i]!='\0')) { i++; } a[counter] = i-temp; counter++; } } cout<<...
f33ce4fb452a70869e6301f4aa764c4d0521e5fc
78bbd61b395605ca64976553ea2898297ebaf3da
pedro-at-decenomy/MBT
/src/bench/base58.cpp
C++
cpp
1,512
permissive
// Copyright (c) 2016 the Bitcoin Core developers // Copyright (c) 2021 The Mobolith developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "bench.h" #include "main.h" #include "base58.h" #include <vector> #includ...
6de26b8cd37af4dd48a04bd2fc54192cab10a65e
c4b91cb3d6920703b81a45463baae5975be7dd8f
tzulang/openGLTest
/ShaderLoader.cpp
C++
cpp
2,837
no_license
#include "Shader.h" #include <string> #include <fstream> #include <sstream> #include <iostream> #include <GL/glew.h> Shader::Shader(const GLchar *vertexPath, const GLchar *fragmentPath) { // 1. Retrieve the vertex/fragment source code from filePath std::string vertexCode; std::string fragmentC...
4a901f5dc20d4a97e4d88e4a5aeb13b5a6b49a0e
8a3db14fb2dc84a55ec612b4d849bd8f350ee0cc
bopopescu/jstrace
/content/browser/media/session/media_session_delegate_default.cc
C++
cc
1,979
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/media/session/media_session_delegate.h" #include "base/command_line.h" #include "content/browser/media/session/audio_focus_mana...
7b494909b5121799bbaebcee85b536c938f80055
6fb59843cd49607aff682632e7a77a8ad169c80c
randombit/rnp
/src/librepgp/stream-sig.cpp
C++
cpp
39,068
permissive
/* * Copyright (c) 2018, [Ribose Inc](https://www.ribose.com). * 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,...
4fb4d0d98218d80bcabcd00a30a966f005c9b951
d8ac3dc63efeb10ba863ceec6c9f711ffa3a8453
ElderOrb/hifi
/libraries/entities-renderer/src/RenderableModelEntityItem.cpp
C++
cpp
59,918
permissive
// // RenderableModelEntityItem.cpp // interface/src // // Created by Brad Hefta-Gaub on 8/6/14. // Copyright 2014 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "RenderableModelEntit...
54c214bf19d7e9859fd38a4a201c23a0df19cf97
c591f0f4d120346a2bf5ae15293a3837fdaae796
antukbala/Competitive-Programming
/UVA/12718 - Dromicpalin Substrings.cpp
C++
cpp
1,550
permissive
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmat...
b705008a3f3af0db6a5984cafb47892db68e7db1
b3873c461707ee54c41c5f080a97af5b5df8e22e
dragonlet/fw4spl
/SrcLib/io/gdcmIO/src/gdcmIO/writer/DicomDistanceWriter.cpp
C++
cpp
8,426
no_license
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2012-2013. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/stri...
4fc24e412df3905442eb1c8e077572064e02e7ce
077d679bab098d017f040fa9657e46f8aecbdd3d
RaphMar/6GEI311_lab1
/main.cpp
C++
cpp
1,397
permissive
#include <dshow.h> void main(void) { IGraphBuilder *pGraph = NULL; IMediaControl *pControl = NULL; IMediaEvent *pEvent = NULL; // Initialize the COM library. HRESULT hr = CoInitialize(NULL); if (FAILED(hr)) { printf("ERROR - Could not initialize COM library"); return; ...
43fa5799ffaad80c3ab59c4129d248f98726e481
e541fb228e6304424a19c63fe0c68dffd616d4b4
keera-studios/hsQt
/qws/src/gui/QHideEvent.cpp
C++
cpp
1,211
no_license
///////////////////////////////////////////////////////////////////////////// // // File : QHideEvent.cpp // Copyright : (c) David Harley 2010 // Project : qtHaskell // Version : 1.1.4 // Modified : 2010-09-02 17:01:58 // // Warning : this file is machine generated ...
1dac360abc01420627a7fff2fc35414301ca979d
62a19aa0e2071cb25a0f068633596d4ab3e8443c
MarAlder/tigl
/src/generated/CPACSControlSurfaceStep.cpp
C++
cpp
7,247
permissive
// Copyright (c) 2018 RISC Software GmbH // // This file was generated by CPACSGen from CPACS XML Schema (c) German Aerospace Center (DLR/SC). // Do not edit, all changes are lost when files are re-generated. // // Licensed under the Apache License, Version 2.0 (the "License") // you may not use this file except in com...
0fdb7e8c8549dfcdb00883da2e81263ef22d519d
301d9f216c9f7ab59cb65344bf307c8f54aad5fd
ichitomo/LeapSv
/LeapSv/main.cpp
C++
cpp
9,131
no_license
// // main.cpp // LeapSv // // Created by 一ノ瀬智太 on 2015/11/24. // Copyright © 2015年 ichinose.tomohiro. All rights reserved. // #include <iostream> #include <string.h> #include "../leapSDK/include/Leap.h" using namespace Leap; class SampleListener : public Listener { public: virtual void onInit(const Controll...
bb34299736c4852a49431d1dd33a1db8fff7d993
629787fb280649dec6ce40f6974c949c661f2f91
Stasis-Project/Stasis-Core
/src/qt/editaddressdialog.cpp
C++
cpp
4,481
permissive
#include "editaddressdialog.h" #include "ui_editaddressdialog.h" #include "addresstablemodel.h" #include "guiutil.h" #include <QDataWidgetMapper> #include <QMessageBox> #include <QClipboard> EditAddressDialog::EditAddressDialog(Mode mode, QWidget *parent) : QDialog(parent), ui(new Ui::EditAddressDialog), map...
449721a220db756aebdf863319492408ea28d688
cfda9df4221556135fe6f550b408ff8f0a4e30f9
diomemilk/gestion_Note
/profile.cpp
C++
cpp
396
no_license
#include "profile.h" #include "ui_profile.h" profile::profile(QWidget *parent) : QDialog(parent), ui(new Ui::profile) { ui->setupUi(this); } profile::profile(QObject *controller) : ui(new Ui::profile) { ui->setupUi(this); connect(ui->pushButton_retour, SIGNAL(clicked()), controller, SLOT(onAuth...
6a31c245f9acb35a233c5afd3d2f0818c44d2943
a59d23956d2fa5e00260f285a2a54e4588bbb5b8
GENERALGUBERNATOR1/realcoin
/src/util.cpp
C++
cpp
36,692
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Copyright (c) 2013 realcoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license...
5b8c4f9d914fa545d2e3b2a3e0325a4038aa15ef
3c7badee2d091701cbe8c87a3c236cf496a655e4
opentable/xgboost
/plugin/updater_gpu/src/updater_gpu.cc
C++
cc
1,346
permissive
/*! * Copyright 2016 Rory Mitchell */ #include <xgboost/tree_updater.h> #include <vector> #include "../../src/common/random.h" #include "../../src/common/sync.h" #include "../../src/tree/param.h" #include "gpu_builder.cuh" namespace xgboost { namespace tree { DMLC_REGISTRY_FILE_TAG(updater_gpumaker); /*! \brief col...
53eb50df26f45ead6a0c11106facb886474bce25
c08ee2b2951c318f28dd14983b9385fdc30e9f47
MoonNight285/C_or_C_Plus_Plus
/practice/Data_Number_Option.cpp
C++
cpp
1,265
no_license
#include"Data_Number_Option.h" #include<iterator> void data_New_Save(list<vector<char>>* data, vector<char>* temp, vector<int>* data_count) { if ((*temp).empty() != true) { (*data).push_back((*temp)); (*data_count).push_back(1); } } int data_Number_Count(list<vector<char>>* data, vector<char>* temp) {...
33fa3c2604658baf65969fa6a3974834fb771b79
40d7b7e9f1a0b978372f6bcda787f42de557a534
gasheva/PascalCompiler
/Compiler/CTokenFactory.cpp
C++
cpp
1,288
no_license
#include "CTokenFactory.h" #include "FStringFunc.h" using namespace std; CTokenFactory::CTokenFactory() {} CToken* CTokenFactory::createToken(string lexem) { string lowerLexem = toLower(lexem); // является ли char (тип value) if (lexem.length() == 3 && lexem[0] == '\'' && lexem[lexem.length() - 1] == '\'') ret...
ad6c9a86ee1edf28a4fad7c50719d2ab2deab22d
b3d54a3c622596a715533cf1d1a2e36e35bdbfa9
alejandroreyes/programacion2primerparcial
/programa15/main.cpp
C++
cpp
779
no_license
#include <iostream> using namespace std; int main() { int numero,cifra,suma=0,maxi=0,mini=9,contador=0,promedio,par=0,impar=0; cout<<"insertar un numero entero"; cin>>numero; /* asi numero alreves y sumar cifras */ while(numero>0) { cifra = numero%10; numero=numero/10; suma+...
070464353f63f08b850047e74a96c180829fb372
96348e2ce08b3091f7d27fe4acbeedfd7b71efb5
kbkarthi/Prep
/CanBePartitioned.cpp
C++
cpp
919
no_license
#include <iostream> using namespace std; bool CanBePartitioned(int array[], int n) { int sum =0; for (int i = 0; i < n; i++) { sum+=array[i]; } if (sum %2 != 0) return false; bool partition[sum/2 + 1][n+1]; for (int i=1; i <= sum/2; i++) { pa...
8dbdc5638ae920f4dd69ebe4e3c28f0d823d6ce8
6657708ee0244782e567518b005732d008f738a3
Scieon/Powagrid
/A1/PowerPlant/PowerplantManager.cpp
C++
cpp
2,612
no_license
#include "PowerplantManager.h" #include "Powerplant.h" PowerplantManager::PowerplantManager() { Powerplant* coal4 = new Powerplant(4, "coal", 2, 1); Powerplant* coal8 = new Powerplant(8, "coal", 3, 2); Powerplant* coal10 = new Powerplant(10, "coal", 2, 2); Powerplant* coal15 = new Powerplant(15, "coal", 2, 3); ...
b81617ea80cf5d731e78afbdf12c842515391fd6
fbb4bab90ab37878e81ff0b0c8de7a4718991752
Brado231/sws
/BuildUtils/MakeWhatsNew.cpp
C++
cpp
8,898
permissive
/****************************************************************************** / MakeWhatsNew.cpp / / A little win32 console application to parse a What's New file (.txt) and / create a formatted HTML file. / This file is also used in the main SWS project so the code must be portable / / Copyright (c) 2010-2012 Tim Pa...
f75f1032e886b8bb464a1b339a3e5ead75ca8e02
7a60259631bd1c23c43915d8c6f052affd9aae17
HMBL98/Competitive-Programming-Problems
/EstructurasNoLineales/FenwickTree/IahubandXors.cpp
C++
cpp
1,079
no_license
#include <bits/stdc++.h> using namespace std; #define MAX 100000+10 int bit[MAX][MAX],N,M,Q; int query(int idx,int idy){ int sum = 0; while(idx > 0){ while(idy > 0){ sum += bit[idx][idy]; idy -= idy&-idy; } idx -= idx&-idx; } return sum; } int update(int idx,int idy,int val){ //Tener cuidado con N+1 ...
ef765f5f2cc0e4eab5ea85a808025692a56de656
12c599c67da963ce44cf884e9e71aa2d5ed45c4e
planbcoin/planbcoin
/src/coins.cpp
C++
cpp
10,798
permissive
// Copyright (c) 2012-2016 The PlanBcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "coins.h" #include "consensus/consensus.h" #include "memusage.h" #include "random.h" #include <assert.h> bool CCoins...