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
8cce749459eda83b50e3b1314e89483693ef1d01
6359ba4b7133f7f86e6d47f4c1855b4da73ca844
thiagofigcosta/keylogger
/main.cpp
C++
cpp
7,144
permissive
#include <iostream> #include <windows.h> #include <locale.h> #include <conio.h> #include <libwsock32.h> using namespace std; void salvar(char tecla, char *file); void verificar(int a); void email(); int main(){ /* //janela invisivel HWND stealth; AllocConsole(); stealth=FindWindowA("Consol...
f9bafc12509b8ac7adacdba2e850905c15e5a456
89e799d54a7dcf6bde2b244f11e185306934e514
mattbona/numerical-simulation-laboratory
/NSL-05/statistical_functions.cpp
C++
cpp
2,094
no_license
/*################################### File containing the implementation of different statistical function. LIST of available functions: - standard deviation: std_dev(); - block method for uncertainty: prog_average_std_dev_block_method(); - chi squared: chi_sqrd(); ###################################*/ #include "st...
47f26731af4d581bd54c82d06f10a1eef2d27482
7aed18c35c5e9a6ec4729ba2eb6ef7ddcf28c771
MrYxJ/ACM_problem
/算法入门经典(第二版)/第九章/9-12 Uva12186.cpp
C++
cpp
4,101
no_license
/* #include<bits/stdc++.h> using namespace std; string c[10]={"ZERO","ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE"}; vector<int>d[10]; int v[30]; vector<int>ans; void solve(){ for(int i=0;i<10;i++){ for(int j=0;j<c[i].size();j++){ int x=c[i][j]-'A'; d[i].push_back(x);...
8a5b8e3b404104ffc268203a9faf7f26e97344c2
808168e21cad29fff6d6d0f75d124368e24b4e82
kobi3028/Securing-an-Editor
/testingProject/ScureEditor/mbedtls/x509_csr.cpp
C++
cpp
10,727
no_license
/* * X.509 Certificate Signing Request (CSR) parsing * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * 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...
3ffcfe979de347452b470eaea52906d947a96e7d
67b153f9f77942f2526a22bc75c72f8f703d7789
ywapple/chromium
/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc
C++
cc
31,253
permissive
// Copyright 2017 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/webui/chromeos/login/encryption_migration_screen_handler.h" #include <cmath> #include <string> #include <utility> #include "...
2975b97f2f6734cfdf8181416ad2a552fe5966e0
2fd0f609e1f613a6bd50e7e9b0c9623325e4fb2b
pyzh/nme
/project/src/windows/System.cpp
C++
cpp
8,664
permissive
#ifndef HX_WINRT #include <windows.h> #include <shlobj.h> #include <Utils.h> #include <stdio.h> #include <string> #include <vector> #include <NMEThread.h> namespace nme { static bool nmeIsCoInit = false; static bool nmeIsCoInitOk = false; bool nmeCoInitialize() { if (!IsMainThread()) ret...
780448dfd5cf0a47d165c4c0a294511c10502bf1
873625a8e688bf1b9f21df6494b35a3acd8c2b14
zief/blazefox
/src/js/vm/SymbolType.cpp
C++
cpp
4,099
permissive
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ...
877875e3ffaf280fd5444beebd38262f24185bab
50f0458f09072f1640dd48ba871849aa5807e59c
gogun/Labs-for-SPbSPU-C-course-during-2019
/korolev.denis/A1/rectangle.hpp
C++
hpp
492
no_license
#ifndef A1_RECTANGLE_H #define A1_RECTANGLE_H #include "shape.hpp" class Rectangle : public Shape { public: Rectangle(const point_t &center, double width, double height); Rectangle(double x, double y, double width, double height); double getArea() const override; rectangle_t getFrameRect() const override; v...
1bdc08510658d459735328d89bf766915b90bf04
9f0b4c67552eef48a9920a97acac93e97999abc3
MarcoDiFrancesco/LittleProjects
/C++/2016-02-18 Tris.cpp
C++
cpp
3,943
no_license
#include <allegro5/allegro_primitives.h> #include <allegro5/altime.h> #include <allegro5/color.h> #include <allegro5/display.h> #include <allegro5/drawing.h> #include <allegro5/keyboard.h> #include <allegro5/keycodes.h> #include <allegro5/mouse.h> #include <allegro5/system.h> #include <iostream> using namespace std; c...
a6cf101941de297db936cd7db5c68ad20f0a7bd1
6218dabf4c479848e439be8b12ee8b3cf347d067
fromasmtodisasm/SpriteCraft
/MoleSkin2/mGRAPHICS/m_glyphsource.cpp
C++
cpp
1,763
no_license
/* Copyright © 2003-2013, Alexéy Sudachén, alexey@sudachen.name 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,...
8c70f1a171051b69db8e48adf65e457b4002de37
dee8de2598dec7c7681b26bdfd7ff70a0f2cc24e
neuromancer/engge
/src/PathFinder.cpp
C++
cpp
9,965
permissive
#include <utility> #include <math.h> #include <sstream> #include "PathFinder.h" #include "_NGUtil.h" namespace ng { class _IndexedPriorityQueue { std::vector<float> &_keys; std::vector<int> _data; public: explicit _IndexedPriorityQueue(std::vector<float> &keys) : _keys(keys) { } voi...
931dd0dc470f32b9edde5e503ab7256b6ed36b9b
b1b1feccaa2eb6eb04326dd05858e29347fe316d
pidddgy/competitive-programming
/codeforces/lakesinberland.cpp
C++
cpp
4,575
no_license
// https://codeforces.com/contest/723/problem/D #include <bits/stdc++.h> using namespace std; #define endl '\n' #define maxn 60 #define pii pair<int, int> #define fi first #define se second #define cerr if(false) cerr #define watch(x) cerr << (#x) << " is " << (x) << endl; pii par[60][60]; bool vis[60][60]; int dis[60...
4ef2349ef0b5386295c7ca53e10b3b659e79838b
93b448c5a927f6aefa36bff1af5b030e263e9eb1
MatthewKuoHF/Data-Security
/Ceaser Cipher/1.cpp
C++
cpp
876
no_license
#include<iostream> #include<cctype> #include<fstream> using namespace std; int main(){ string ifile, ofile; //cout<<int('w')-int('e'); int num=0; cout<<"Enter the name of the file you want to open: "; cin>>ifile; cout<<"Enter the key: "; cin>>num; ifstream fin; fin.open(...
104c6eeb23f8c562dc4589485a3b893de68c59c4
86374e0e48d3a2d5d7d30a15303b267e474285ec
dendisuhubdy/HugeCTR
/HugeCTR/include/data_readers/source.hpp
C++
hpp
1,446
permissive
/* * Copyright (c) 2020, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
acbebc5330b3cbb8b93defb288d2dc865755cdf6
1cbb49c26b8d2944f09339fdeff80a0ebd513704
csagan5/kiwi
/components/sync/protocol/proto_value_conversions_unittest.cc
C++
cc
18,511
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 "components/sync/protocol/proto_value_conversions.h" #include <string> #include "base/strings/string_number_conversions.h" #include "base/t...
16e36a4467574ab4fb9443deab11db584f124fdd
2afee435849fb60f71022c1862068b2f177e2fb4
mj8353/cpp11test
/src/TestClasses.cpp
C++
cpp
405
no_license
// // Created by mj on 2/8/20. // #include "TestClasses.h" #include <iostream> using namespace std; TestClass::TestClass():mVal("default") { cout<< "TestClass("<< mVal <<") is created!" << endl; } TestClass::TestClass(std::string iVal):mVal(iVal){ cout<< "TestClass("<< mVal <<") is created!" << endl; } T...
c4d1a7e1f11412e0ad08eca7aaaea6cd3a73937e
13d49adbb57eb8413cf3bb5604221424981003dc
homocysteine/player1
/player_6/Player.cpp
C++
cpp
10,524
no_license
#include "Player.h" #include"Step.h" #include"Top.h" extern Top * top; Player::Player() { setRect(0, 0, playerSize, playerSize); QBrush brush_player(QImage(":/Player_1/Resources/Player_D.png")); setBrush(brush_player); setFlag(QGraphicsItem::ItemIsFocusable); setFocus(); } void Player::arrival(Boxes * box) { box...
a1409fad1ac97f08ba32e4db5dcb1f54ddf8eb38
8ecf2d685989a818b206f0934af257cc3be4b2ac
Neill3d/OpenMoBu
/Src/Neill3d_Archive/tool_Hand/handTool.cxx
C++
cxx
94,087
permissive
///////////////////////////////////////////////////////////////////////////////////////// // // Licensed under the "New" BSD License. // License page - https://github.com/Neill3d/MoBu/blob/master/LICENSE // // GitHub repository - https://github.com/Neill3d/MoBu // // Author Sergey Solohin (Neill3d) 2014 // e-mail t...
585ae1649744bf29c4e0a41c2b100771d727443e
d70b3243b4262b809646bddaa10678eb819bfe6c
Yberion/M1-Nachos
/utility/config.cpp
C++
cpp
11,054
no_license
/*! \file config.cpp \brief Routines for setting up the Nachos hardware and software confuguration // // Copyright (c) 1999-2000 INSA de Rennes. // All rights reserved. // See copyright_insa.hpp for copyright notice and limitation // of liability and disclaimer of warranty provisions. */ #ifndef CONFIG_CPP #...
47b29ee4b188f63a85d6d81d08f949ef6fbb1c4a
327b4111e900bd2df77b7bab31074620ca3749d5
stepanyurkiv/Homekit
/main/HAP/HAPUpdate.cpp
C++
cpp
15,510
permissive
// // HAPUpdate.cpp // Homekit // // Created on: 20.08.2017 // Author: michael // #include "HAPUpdate.hpp" #include <ArduinoOTA.h> #include <ArduinoJson.h> #include <pgmspace.h> #include "HAPLogger.hpp" #include "HAPLimits.hpp" /* * * Follow this to create your certificates: * https://datacenteroverlords....
2aa51a1fca1150725b96ef6c631c46abdc2e6537
928716c3cde4c32250508ac5e5a849070777a518
selfcompiler/c---files
/graph/graph.cpp
C++
cpp
283
no_license
#include<iostream> #define NODE 1 #define EDGE 2 using namespace std; struct node { string name; node *next; short int status; }; class graph { node *start; public: graph() { start=NULL; } void insertnode(string name); void insertedge(string path); int main() {
d78ca6b0f2890a790e72d9a4a89303230357dcbc
07ddfd30eee833ade00a565a8320b17d0b74387b
nishant8BITS/grpc
/test/cpp/naming/resolver_component_test.cc
C++
cc
16,366
permissive
/* * * Copyright 2017 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...
2430a6520560522bb5035d19d5a2594c68da6c3c
68a939a7a3c431ec32715ddbe478931e97ebefdd
kh-8484/DSA
/237_maximum_length_chain_of_pairs_dp.cpp
C++
cpp
1,612
no_license
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; struct val { int first; int second; }; int maxChainLen(struct val p[], int n); int main() { // your code goes here int t; cin >> t; while (t--) { int n; cin >> n; val p[n]; for (int i = 0; i < n; i++) { ...
4de765afc95169f5b05e266694e517c53a9309f5
b62d6c09f957f942fcbfb02d3915cc42f492b5b0
scissor-project/open-scissor
/docker/d-streamon-master/d-streamon/streamon/lib/fc/Exporter.cpp
C++
cpp
3,468
permissive
#include "Exporter.h" #include "Constants.h" namespace IPFIX { Exporter::Exporter(uint32_t domain, size_t mtu): buf_(NULL), set_id_(0), msg_empty_(true), set_active_(false), session_(), tmpl_(NULL), domain_(domain), mtu_(mtu) { /* allocate buffer */ if (!(buf_ = reinterpret_cast<uint8_t *>(mallo...
a3aedd2fba87d1becd0b34683558b7e4dde95127
c68489e80fadb9364f99ae61b62cb09f91967d94
ruhul005/DataStructure
/UnsortedList2/main.cpp
C++
cpp
2,534
no_license
#include <iostream> #include"unsortedtype.h" using namespace std; #include"unsortedtype.h" #include"unsortedtype.cpp" int main() { UnsortedType<int>ut; // UnsortedType<int>list[5]; //Checking The List IF it is empty or not /* ut.isFull(); if(ut.isFull()==0) { ...
1ca21fd7f755d7edb934fd9503fb0e510a24dc17
ac04dfe2b55ac5b6da21962b9f9b43dab25d1ec2
dave98/cpp_2018_01
/r_tree_v3/main.cpp
C++
cpp
8,936
no_license
#define GLUT_DISABLE_ATEXIT_HACK #include <iostream> #include <windows.h> #include <math.h> #include <vector> #include <GL/glut.h> #include "c_r_tree.h" #include "c_point.h" //Alllows me to interact with points of n dimensions #include "c_nodo.h" #include <ctime> #include <fstream> //CREATED BY jose david mamani vilca...
21c280ce3d7250d656539c51279c713247cd42a8
9a7664d73070a5b52a1d4904d53e4031d478c2e4
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14215/function14215_schedule_4/function14215_schedule_4.cpp
C++
cpp
1,395
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function14215_schedule_4"); constant c0("c0", 524288), c1("c1", 128); var i0("i0", 0, c0), i1("i1", 0, c1), i01("i01"), i02("i02"), i03("i03"), i04("i04"); input input00("input00", {i0}, p_int3...
e223eb07e8557b2477bed61bb1840141d8d1a422
894f91360f7bded315f7b4ede79b4d7a3504f8bb
Martin1330/NLMech
/src/rw/mshReader.cpp
C++
cpp
8,758
permissive
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2019 Prashant K. Jha // Copyright (c) 2019 Patrick Diehl // // 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) /////...
84e4c0434ec7f747e7e20643e6ca488b666fe078
d7f4abd0912b1de3bec119ea6c8e3e5b927f63f3
SOFTK2765/PS
/BOJ/1011-2.cpp
C++
cpp
454
no_license
#include <bits/stdc++.h> using namespace std; long long dp[65000]; int main() { for(int i=1;i<65000;i++) dp[i] = dp[i-1]+2*i; int t; scanf("%d", &t); while(t--) { int x, y; scanf(" %d %d", &x, &y); int tmp = y-x, d = 0; while(++d) if(tmp<=dp[d])...
1516659fabf6517e9b32c150269f53c98459549d
7c0a7265a18f88612bcc2ea78b4fd5b3844910d0
tyl271334644/C_plusplus
/client.cpp
C++
cpp
913
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <arpa/inet.h> #include <sys/socket.h> #define BUF_SIZE 100 int main() { //创建套接字 int sock=socket(AF_INET,SOCK_STREAM,0); //向服务器发起请求 struct sockaddr_in serv_addr; memset(&serv_addr,0,sizeof(serv_addr)); serv_addr.sin_family=A...
8be1dbadcb1365e6436ae34af2723e487dc691d6
e546b6323c3d23558a463bf8894cc3620ec79bb9
Aingram2/Minesweeper_FinalProject_Minesweeper
/Minesweeper_FinalProject_Minesweeper/Minesweeper_FinalProject_Minesweeper.cpp
C++
cpp
636
no_license
// Minesweeper_FinalProject_Minesweeper.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <cstdlib> #include <time.h> using namespace std; void minePlacement(int minefield[10][10]) { int minesLeft = 20; for (int i = 0; i < 10; i++) { ...
db93e09511329240fd150583461651d809abddf7
4f92c1787cafe50c846cd9f7157d359521d31f3b
airspeedswift/swift
/lib/Basic/Mangler.cpp
C++
cpp
6,430
permissive
//===--- Mangler.cpp - Base class for Swift name mangling -----------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
03ea27f976a74bb5758643a97754d150760c3ba6
1ba00eee7c45d7524cc35be766b802efe2a60e60
QubeNet/QubeNet-Core
/src/qt/paymentserver.cpp
C++
cpp
28,237
no_license
// Copyright (c) 2011-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/paymentserver.h> #include <qt/bitcoinunits.h> #include <qt/guiutil.h> #include <qt/optionsmodel.h> #include <b...
0ee3d8cec9bd79063d6a10509bec806685b23ace
d3b9d56050d98b618a453ba2e7ba3699cd04c730
anasrasyid/Competitive-Programming
/URI Online Judge/Ad hoc/1329.cpp
C++
cpp
393
no_license
#include <iostream> using namespace std; int main() { long n,x; cin>>n; while (n != 0){ long a =0; long b =0; for(long i =0;i<n;i++){ cin>>x; if(x != 1) a++; else b++; } cout<<"Mary won "<<a<<" times ...
c97fa63aec9343176fc83e200e7ea3eb7adfa258
97b8599e91231a6bf19b44717fb0edea2462b9a4
GarrettXUPT/C-_STL_Naive
/day02_file/list容器.cpp
C++
cpp
3,626
no_license
#include <list> #include <iostream> using namespace std; void printList(list<int> lst){ list<int> :: iterator it = lst.begin(); while(it != lst.end()){ cout << *it++ << " "; } cout << endl; } // 初始化 void test01(){ list<int> lst1(10, 2); list<int> lst2(lst1.begin(), lst1.end()); printL...
a3e85a155a059146511436b8f8b241517b27a388
7a561b62392019d4323fde7ae7c293ab95c5aa14
qiaofenlin/cpp_study
/note/files/代码/08_第8章_STL详解/01_test/main.cpp
C++
cpp
8,817
no_license
#include <iostream> using namespace std; /* 3.1.2.1 string 构造函数 string();//创建一个空的字符串 例如: string str; string(const string& str);//使用一个string对象初始化另一个string对象 string(const char* s);//使用字符串s初始化 string(int n, char c);//使用n个字符c初始化 v 3.1.2.2 string基本赋值操作 string& operator=(const char* s);//char*类型字符串 赋值给当前的字符串 ...
cf5c161ba064b0b1922e7779f49fc23c0924e07c
78f0b788d30bf9d34e6b0445097ed87ea475dc56
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/WRC+fencembonceonce+poacquireacquire+Release.c.cbmc_out.cpp
C++
cpp
47,372
no_license
// Global variabls: // 3:atom_2_X0_1:1 // 0:vars:2 // 2:atom_1_X0_1:1 // 4:atom_2_X2_0:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 5 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt,...
2f87eecc0338323807cc25154b18d555127d8c12
41733597b825fa8959b40f4e2247a1bccef33544
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
C++
cc
32,098
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrom...
bed0794c1017793b8fb7df464c823596a12f21a7
a26ec24a7be97d67be2215093e88d4820541d5f3
romilpunetha/Online-Judges
/CodeForces/379/E.cpp
C++
cpp
1,141
no_license
#include <bits/stdc++.h> #define endl '\n' #define inf INT_MAX #define pb push_back #define present(c, x) ((c).find(x) != (c).end()) #define base 999983 #define baseinv 943912055 #define ff first #define ss second #define tr1(x) cerr << #x << ": " << x << endl; #define tr2(x, y) cerr << #x << ": " << x << " | " << #y <...
09c0d8545079b539eb9a9fa21dd0448ce9090f2f
e40f36a58de22ce90f6b51b7f8ca3b88542721ea
samyak24jain/Competitive-Coding
/HackerEarth/PrateekAndFriends.cpp
C++
cpp
886
no_license
// Problem Link : https://www.hackerearth.com/code-monk-array-strings/algorithm/prateek-and-his-friends/ #include <bits/stdc++.h> using namespace std; #define sd(x) scanf("%d",&x) #define sl(x) scanf("%lld",&x) #define pnl printf("\n"); int main() { int t,flag; long long int n,x,i,j,sum; sd(t); while(t--) { ...
76aea5e0de9bf855d70fae66e56ebd751dbf1fd2
2ef912fe66c3d946df8462058a6af04af7ff6382
ifisher18/CS172HW06
/CS172_HW06_EX06_01/CS172_HW06_EX06_01/Source.cpp
C++
cpp
821
no_license
////////////////// // Ian Fisher // CS 172 // 11/3/16 ////////////////// #include <iostream> #include <string> #include <fstream> // library to use ofstream #include <cstdlib> #include <ctime> using namespace std; // program that creates a file, appends new data (100 ints), puts data into file using text I/O int mai...
e53623013400ec4c38c46a78437afdfb584b75df
872ef127558531e06ba54b1387ea9ae1a44f4372
calccrypto/sst-macro
/sstmac/backends/mpi/mpi_runtime.cc
C++
cc
8,818
permissive
/* * This file is part of SST/macroscale: * The macroscale architecture simulator from the SST suite. * Copyright (c) 2009 Sandia Corporation. * This software is distributed under the BSD License. * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, * the U.S. Government ret...
f41a1fc7e84612529da0252bc91450cc89e69ab6
dfb8adac55e01baa1324aa2561c7439535c9160c
phongnhitrung/seastar
/core/xen/gntalloc.cc
C++
cc
6,652
permissive
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
0173a00eede121ad0493e6373aac78d0c57fdaac
152e91b4d0e5362773e60639d494a78bc31121a1
Joshssiegel/MYO_RPS
/myoduino/Arduino/MyoController/get_data.cpp
C++
cpp
4,693
no_license
// Copyright (C) 2013-2014 Thalmic Labs Inc. // Distributed under the Myo SDK license agreement. See LICENSE.txt for details. // This sample illustrates how to use EMG data. EMG streaming is only supported for one Myo at a time. #include <array> #include <iostream> #include <sstream> #include <stdexcept> #include <st...
c73a6034245aa8fc71eb71e3464f5bd973d5aed9
ab33ec72fc254b118c307c3871229a3ab959107f
rizwin007/CppND-System-Monitor
/src/linux_parser.cpp
C++
cpp
8,864
permissive
#include <dirent.h> #include <unistd.h> #include <sstream> #include <iomanip> // std::setprecision #include <string> #include <vector> #include <iostream> #include "linux_parser.h" using std::stof; using std::stol; using std::string; using std::to_string; using std::vector; /************************ local functions...
a2b1027233bdc7d07a5ee1bf658a3e0a78d938f4
678279c019eb3b8ce1c99ea5efc5c7a927bf247e
baidang201/design_patternsPractice
/结构型模式/外观模式/Facade/facade.cpp
C++
cpp
837
no_license
#include "facade.h" #include <iostream> using namespace std; Subsystem1::Subsystem1() { } Subsystem1::~Subsystem1() { } void Subsystem1::Operation() { cout << "Subsystem1 operation..." << endl; } Subsystem2::Subsystem2() { } Subsystem2::~Subsystem2() { } void Subsystem2::Operation() { cout << "Subsy...
83df08ef3aa41132913e9996a8c7bfe9c30004bd
6a61a801a232d6c42e767e59e229f22ffd08808a
de4sh/chemkit
/src/plugins/randicindex/randicindexplugin.cpp
C++
cpp
2,421
permissive
/****************************************************************************** ** ** Copyright (C) 2009-2011 Kyle Lutz <kyle.r.lutz@gmail.com> ** All rights reserved. ** ** This file is a part of the chemkit project. For more information ** see <http://www.chemkit.org>. ** ** Redistribution and use in source and binar...
2135802d39cc5b61d5623b52516a52aff18d8312
6f7e6ec8382490b7d04a7cd5d2d5121ed0eb18e4
RinLaNir/Algorithms_and_data_structures
/Lab 9/9/9/9.3(1718).cpp
C++
cpp
1,697
no_license
#include <string> #include <stdlib.h> #include <string.h> #include <iostream> #include <vector> #include<algorithm> using namespace std; #define INF INT_MAX int n; vector < vector<int> > a; vector<int> xy, yx; vector<char> vx, vy; vector<int> minrow, mincol; bool dotry(int i) { if (vx[i]) return false; vx[i]...
3637b8b56208b73ffe4786dead57e4135b5a920f
fad91f01ee66e9203aff3d43b9885fb021c56ee5
typhomnt/TP_3D_Dragon
/TP_Dragon/Dynamic/viewer.cpp
C++
cpp
4,882
no_license
#include <QKeyEvent> #ifndef __APPLE__ #include <GL/glew.h> #include <GL/glut.h> #else #include <GLUT/glut.h> #endif #include "viewer.h" #include "renderable.h" Viewer::Viewer() { } Viewer::~Viewer() { for (std::list<Renderable *>::iterator it = renderableList.begin(), end = renderableList....
ca9073760d16e8cb0c896a7be5e5702c39ddf1d8
0ab33a6bd1860efadcbc7d5eb6c189d98f783d93
yyhaos/Competitions
/牛客寒假算法基础集训营/1.29/g.cpp
C++
cpp
1,906
no_license
//Problem Web: https://ac.nowcoder.com/acm/contest/330/G #include<bits/stdc++.h> #include<ext/rope> using namespace std; #define ll long long #define lowbit(x) (x&-x) #define rep(i,x,y) for(int i=x;i<=y;i++) #define crep(i,x,y) for(int i=x;i>=y;i--) #define gcd(x,y) __gcd(x,y) #define mem(x,y) memset(x,y,sizeof(x)) /...
068b9744828d2834db42ed1745d6effb9d06f7b7
f75e702951962f90a080f5f8b7821e40281568fd
MPFGlaser/robotArm
/RampsStepper.cpp
C++
cpp
2,092
no_license
#include "rampsStepper.h" #include <arduino.h> RampsStepper::RampsStepper(int aStepPin, int aDirPin, int aEnablePin) { setReductionRatio(1, 3200); stepPin = aStepPin; dirPin = aDirPin; enablePin = aEnablePin; stepperStepPosition = 0; stepperStepTargetPosition; pinMode(stepPin, OUTPUT); pinMode(dirPi...
d2463b5425246cbec242dde68088f5e699b622bd
c99fa94d5e9283ff29703dbeff84137e0badb136
BitSavage0202/MUTX
/src/rpcmasternode-budget.cpp
C++
cpp
45,473
permissive
// Copyright (c) 2014-2015 The Dash Developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "activemasternode.h" #include "db.h" #include "init.h" #include "main.h" ...
cbba2a44ce268f5723b900a8a16bdc088e3db5b1
bb6e6b39c28b12fc52ea187163eeb0f546f9a444
juslee/boost-svn
/libs/graph/test/degree_centrality.cpp
C++
cpp
3,245
permissive
// (C) Copyright 2007-2009 Andrew Sutton // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0 (See accompanying file // LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) #include <vector> #include <boost/graph/undirected_graph.hpp> #include <boost/graph/directed_gr...
8877ce4e6c5b224b27df776aafa2f38d7038786c
0457870e4e681e3b7aabea240d58e437c9f77249
vivilor/nelder-mid-optimization
/main.cpp
C++
cpp
627
no_license
#include <cmath> #include <iostream> #include "nma.h" #define OUTPUT_FILE_NAME "output.dat" using namespace std; double ZakharovFn(Point& p) { double partA(.0), partB(.0); for (unsigned i(0); i < p.Size(); i++) { partA += p.At(i) * p.At(i); partB += i * p.At(i); } return partA + pow(partB, 2) + pow(partB...
2b270fcd06475b951784896f9773c7f66d922c7c
61453519ad12ff1c619183976e93333edabf1ff1
ray77/zeitcoin
/src/net.cpp
C++
cpp
59,684
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "irc.h" #include "db.h" #include "net.h" #include "init.h" #include "strl...
9d6ccba68151d85eac3dedbe2cda895280c7ea9c
d5dab583b0f61a582d0bcf00fcfdfb2e9141cc78
mpsitech/wdbe-WhizniumDBE
/wdbecmbd/CrdWdbeMod/QryWdbeModCorMNModule.cpp
C++
cpp
7,713
permissive
/** * \file QryWdbeModCorMNModule.cpp * job handler for job QryWdbeModCorMNModule (implementation) * \copyright (C) 2016-2020 MPSI Technologies GmbH * \author Alexander Wirthmueller (auto-generation) * \date created: 4 Oct 2021 */ // IP header --- ABOVE #ifdef WDBECMBD #include <Wdbecmbd.h> #else #include <Wdb...
7a3940d2f748c6bd10027745afeca0d99e7b6e5e
b41b49d2627a4b63a5c6cd232a088d83d1246d5f
stevekeol/v8
/src/interpreter/interpreter-assembler.cc
C++
cc
56,475
permissive
// Copyright 2015 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/interpreter/interpreter-assembler.h" #include <limits> #include <ostream> #include "src/code-factory.h" #include "src/frames.h" #include...
8fd67f4022884c9d660cc5477c28410a326f1756
445ca28e5f5da78fd391cb9660125f14b8538810
KTK33/BattleDOOOM
/MyGame/Actor/ShootingPlayerMode/ShootingPlayer/ShootingPlayerActor/State/Jump/ShootingPlayerJump.cpp
C++
cpp
1,111
no_license
#include "ShootingPlayerJump.h" #include "../Actor/ShootingPlayerMode/ShootingPlayer/ShootingPlayerActor/State/stateInc.h" ShootingPlayerJump::ShootingPlayerJump(IWorld * world, ActorParameters & parameter) { world_ = world; parameters_ = &parameter; } void ShootingPlayerJump::Stateinitialize() { mNextStateFlag = ...
57bd0244289812068fc84d783e9a3675f635aed5
452650ced29327bf1a1f35c027b673481c71d1bc
solenick/smv
/Source/smokeview/glui_colorbar.cpp
C++
cpp
15,019
permissive
#define CPP #include "options.h" #include <stdio.h> #include <string.h> #include GLUT_H #include <math.h> #include "smokeviewvars.h" GLUI *glui_colorbar=NULL; GLUI_Panel *PANEL_cb1=NULL; GLUI_Panel *PANEL_cb2=NULL; GLUI_Panel *PANEL_cb2L=NULL; GLUI_Panel *PANEL_cb2R=NULL; GLUI_Panel *PANEL_cb2R2=NULL; GLUI_Panel *P...
cacf8a1d971c8d4a4e1cbb72215b93bc2448f275
22d1521fdde77c470db8c61391c2a27f5df90b50
ecce-editorial/coresoftware
/offline/packages/KFParticle_sPHENIX/KFParticle_Tools.cc
C++
cc
25,727
no_license
/* * This file is part of KFParticle package * Copyright ( C ) 2007-2019 FIAS Frankfurt Institute for Advanced Studies * 2007-2019 Goethe University of Frankfurt * 2007-2019 Ivan Kisel <I.Kisel@compeng.uni-frankfurt.de> * 2007-2019 Maksym Zyzak * * KFParticle is free sof...
f79aa6412660defb36b24c77fe0d5d66b1c2eef2
533561e2cab72b977652e323e2a9c611367101f7
oldbuffalo/plane
/CGameApp/PlaneApp.cpp
C++
cpp
3,637
no_license
#include "PlaneApp.h" #include"SmallPlane.h" #include"MiddlePlane.h" #include"BigPlane.h" IMPLEMENT(CPlaneApp) void CPlaneApp::CreateGame() { dc = ::GetDC(m_hwnd); hMemdc = ::CreateCompatibleDC(dc); hBitamp = ::CreateCompatibleBitmap(dc,380,550); ::SelectObject(hMemdc,hBitamp); //加载资源 back.InitBack(m_hins)...
b38b85c8a60567f20fe8926bebd42c2b6015bf1c
4837d97eb80e701526293335ce282a009c2c07ec
Shane1026/data-structures
/bar_graph.cpp
C++
cpp
1,140
no_license
#include<iostream> using namespace std; void plot(int ar[], int n) { int highest=0; for(int i=0; i<n; i++) { if(ar[i]>highest) highest=ar[i]; } cout<<endl; for(int c=highest;c> 0;c--) { if(highest<10) { cout<<"\t\t"; cout<<" "<<hi...
cdc94db86563b8137b726932f19e8775399ae9fb
844bd833c451af8ba1db571744c2df7d42cdaa09
KrzysztofKozubek/Projects
/RecognitionNLP - praca licencjacka/.localhistory/RecognitionNLP/1470167726$Recognitionnlp.cpp
C++
cpp
49,690
no_license
#include "Recognitionnlp.h" RecognitionNLP::RecognitionNLP(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); setParameters(); fillVectorValue(); fillDefaultValue(); //load data connect(ui.buttonLoadData, SIGNAL(released()), this, SLOT(clickLoadData())); //clear list data connect(ui.buttonLoadClear...
04123b426df499b9046962b7be7824b5eb1b77e2
40c61946dabbf163142f33ca78c6028d773589c4
Blackrose/QT
/Scada/Src/Thread/reciverhandle.cpp
C++
cpp
17,613
no_license
#include "reciverhandle.h" #include "analysisthread.h" #include "../Scada/Src/Math/Math.h" #include "../Runer/Runer.h" #include "customprotocol.h" #include "Runer.h" #include <QPair> #include "timersendthread.h" #include "../Scada/Src/Qchart/mainwidget.h" ReciverHandle::ReciverHandle(QObject *parent):QThread(parent) { ...
bf7f8d6972c83aeab22ee7a0bbe4e6c857ea24c2
c4ef5f45e6cfe932d2b9cc19bf483865f31fe615
LauraDiosan-CS/lab8-11-polimorfism-Raul2326
/Lab_10-12_Festival/RepoCSV.cpp
C++
cpp
2,972
no_license
#include "RepoCSV.h" #include <fstream> RepoCSV::RepoCSV() : Repo() { } RepoCSV::RepoCSV(string fileName, ValidationShow* ValidateS) : Repo(fileName, ValidateS) { loadFromFile(); } RepoCSV::~RepoCSV() { } void RepoCSV::loadFromFile() { ifstream f(this->fileName); if (f.is_open()) { this->em...
cb3436b99f287e09af0a4920a79d06c9e8b34be3
2e7a4e808ca3c8e89ce410ce8b3920e820f1bb95
adipapp/SZE-Codes
/OOP/vizsga_minta/Konyvtar.cpp
C++
cpp
1,091
no_license
#include "Konyvtar.h" Konyvtar::~Konyvtar() { for (auto& i : konyvek) { delete i; } } void Konyvtar::add(Konyv* ujkonyv) { konyvek.push_back(ujkonyv); } void Konyvtar::print() { for (auto& i : konyvek) { i->print(); } } int Konyvtar::db(string szerzo, string cim) { int db = 0; for (auto& i : konyvek) ...
f0e37cd9b4dcfa8f61a7f09842e260e0b01bdb3a
b052aae7dac14108e63e2cd207448eeef7642af9
Chipato1/SMACC
/smacc_client_library/move_base_z_client/move_base_z_client_plugin/src/client_behaviors/cb_navigate_global_position.cpp
C++
cpp
2,723
permissive
#include <move_base_z_client_plugin/client_behaviors/cb_navigate_global_position.h> namespace move_base_z_client { using namespace ::move_base_z_client::odom_tracker; CbNavigateGlobalPosition::CbNavigateGlobalPosition() { } CbNavigateGlobalPosition::CbNavigateGlobalPosition(float x, float y, float yaw) { auto p...
29a76c8a343018a0f8f92a8921af68ea61e61a64
c2df4a1a607e1a4d66aa4118514e4cb7d5a8ff48
google/skia
/src/codec/SkJpegXmp.cpp
C++
cpp
7,693
permissive
/* * Copyright 2023 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/codec/SkJpegXmp.h" #include "include/private/SkGainmapInfo.h" #include "include/utils/SkParse.h" #include "src/codec/SkCodecPriv.h" #include "src/codec/SkJpegCo...
b9ad333dbd630188b807e620481664f46fb95896
308f7b8d23396cab4b4a387e81879ee27889ba5c
Genki-S/Hi
/Demo_kinect/ofxTrueTypeFontUC/src/ofxTrueTypeFontUC.cpp
C++
cpp
25,657
no_license
#include "ofxTrueTypeFontUC.h" //-------------------------- #include "ft2build.h" #include "freetype2/freetype/freetype.h" #include "freetype2/freetype/ftglyph.h" #include "freetype2/freetype/ftoutln.h" #include "freetype2/freetype/fttrigon.h" #include <algorithm> #include "ofUtils.h" #include "ofGraphics.h" static...
0e02d60ff4f9c0c162b5e94eba8c1b6ac30d4155
16a5e0e5a4512ef31ea85bb16b3bfbac1975ffc7
wdalmorra/Hash-Table
/Table Hash/TableHash.cpp
C++
cpp
1,589
no_license
#include "TableHash.h" #include "Elemento.h" #include <stdlib.h> #include <iostream> TableHash::TableHash(int tam) { conflitos = 0; numElementos = 0; tamHash = tam; int i; flagHash = (int*)malloc(tamHash * sizeof(int)); for (i = 0 ; i < tamHash ; i++) { flagHash[i] = 0; } tableHash = (Elemento*) malloc (tamH...
ad596f05d71ff205b54d3c1773f85b09556ae899
503f9fa1e7ba4e6dd912aacb4b80df31c7f3aaba
DmitryBorozdin/Work-with-matrix
/Matrix3.cpp
C++
cpp
5,267
no_license
//Необходимо сформировать матрицу размером N*M из рандомных чисел в диапазоне [0;999], далее необходимо: //1) Вывести эту матрицу на экран //2) Посчитать количество 2-значных элементов матрицы //3) Посчитать количество 3-значных элементов матрицы //4) Найти среднее арифметическое 2-значных элементов матрицы //5) н...
846d0e2b546acfd7b99a2aa4c6045b847a9d9ab9
4fa791d1e6d01b9399ff726f31fb81ccf2f09c13
masaori335/trafficserver
/lib/records/RecCore.cc
C++
cc
34,361
permissive
/** @file Record core definitions @section license License Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you unde...
fd7c4cdd49833a0b00abdab77d87d0971bc9adbe
7f772de356a2b829ecb2c3782c2d378ba1bd497e
uxter/async_server
/event_loop.cpp
C++
cpp
1,346
no_license
#include "event_loop.h" namespace ASYNC_SERVER { EventLoop::EventLoop(ConfigStore * config) { this->maxEvents = config->getIntProperty("maxEvents", maxEvents); this->fd = epoll_create(1); this->handlersList = new std::vector<EventHandler *>; } EventLoop::~EventLoop() { del...
a5cc72045f71cd3425b73e8f51c7265a719968b9
f846dc84db8e0b64ad918976fa72d3bd608b9aee
junhyeokahn/PnC
/pnc/atlas_pnc/atlas_controller.cpp
C++
cpp
5,391
permissive
#include <pnc/atlas_pnc/atlas_control_architecture.hpp> #include <pnc/atlas_pnc/atlas_controller.hpp> #include <pnc/whole_body_controllers/ihwbc/ihwbc.hpp> #include <pnc/whole_body_controllers/ihwbc/joint_integrator.hpp> AtlasController::AtlasController(AtlasTCIContainer *_tci_container, ...
f1a6c70bc5834bd5a71a94f434197b558b6b62f5
bd0d9abb832574efb1644a877da010c9ac673241
chlwnsgud7/problem-solving
/BOJ/7469.cpp
C++
cpp
1,347
no_license
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<bool> vb; typedef vector<vb> vvb; typedef vector<string> vs; typedef long long int ll; typedef unsigned long long int ull; typedef pair<int, int> pii; typedef vector<ll> vll; typedef vector<vll> vvll; typedef ve...
8b0acdbf94ce7bfe2e580dfabd49ff67c4c47504
17868efeee65708e71449d20b26ab9cdafb5d374
jgbarbosa/dgswemv2
/source/general_definitions.hpp
C++
hpp
8,648
permissive
#ifndef GENERAL_DEFINITIONS #define GENERAL_DEFINITIONS #include <chrono> #include <iomanip> #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <string> #include <cmath> #include <functional> #include <algorithm> #include <numeric> #include <memory> #include <stdexcept> #include <typ...
3ac0ec0bbd11931a1042e9463aed9f134cfcba9c
b1fdb7ff50e3b90b15323954f722c096fb2fe6e2
jacklee032016/pbx
/800/VPBX_Support/include/stacks/sipstack/SipRawHeaderContainer.hxx
C++
hxx
3,813
no_license
#ifndef SIP_RAW_HEADER_CONTAINER_HXX_ #define SIP_RAW_HEADER_CONTAINER_HXX_ /* * $Log: SipRawHeaderContainer.hxx,v $ * Revision 1.1.1.1 2006/11/30 16:27:09 lizhijie * AS800 VPBX_Support * * Revision 1.1.1.1 2006/06/03 11:55:33 lizhijie * build a independent directory for VPBX support libraris * * $Id: SipRawHeade...
560bf2dbc131dee31218420333e9d2838532eed6
00b6fb2bb3b4571b1c3ac8cc4aca67def6e17a4f
skinnydoo/chromium
/chrome/browser/lookalikes/safety_tips/safety_tip_infobar_delegate.cc
C++
cc
3,256
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 "chrome/browser/lookalikes/safety_tips/safety_tip_infobar_delegate.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_co...
74c6163d5d51a4ce3be860073ba0fc5d331d76db
9ab8243cb186f653fde0d1f4670fc93f78cce748
alexandraback/datacollection
/solutions_5695413893988352_0/C++/iamnoobi/B.cpp
C++
cpp
2,130
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef vector<ii> vii; template <typename Type> void print_array(Type* array, int start, int end); template <typename Type> void print_vector(vect...
ee10dc2ae61b02358f9b60dc70d33e9690e08209
0460bd4aab7aa61f6c60ede13a365b7d22c4582d
waggle-sensor/sensors
/v3.8/firmware/src/scanner.cpp
C++
cpp
1,007
permissive
#include "scanner.h" #include <ctype.h> Scanner::Scanner(int (*readchar)()) { this->readchar = readchar; lookahead = -1; tokpos = -1; } // TODO Decide if we should filter nonprintable characters out. char Scanner::Next() { lookahead = -1; do { int c = readchar(); if (isprint(c) |...
746c4a0552308a9aad39222658f4b50a334a3baf
ed3e6cea9b71c137a255edeca82869ea05dc949f
mpsitech/idec_public
/ideccmbd/CrdIdecFil/PnlIdecFilDetail_blks.cpp
C++
cpp
22,257
permissive
/** * \file PnlIdecFilDetail_blks.cpp * job handler for job PnlIdecFilDetail (implementation of blocks) * \author Alexander Wirthmueller * \date created: 30 Dec 2017 * \date modified: 30 Dec 2017 */ /****************************************************************************** class PnlIdecFilDetail::Vec...
8ff9f9fb6f8ba440bf10e2a9b51c367d9b7e0caa
bb09414efb8e2b0a4875e09c7b204bbfee7fb00f
lfricken/Beta
/include/Universe/ShipModule/Plating.hpp
C++
hpp
767
no_license
#ifndef PLATING_HPP #define PLATING_HPP #include "ShipModule.hpp" struct PlatingData; class Plating : public ShipModule { public: Plating(const PlatingData& rData); virtual ~Plating(); protected: private: }; struct PlatingData : public ShipModuleData { PlatingData() : ShipModuleData() { ...
742bee8cc93d20b89a7f3aa48e6a3e9f70ec759c
7e4c3eee0951b3e8a9c6633274cac09af5a10a4a
markpen/Algorithm-and-Data-Structure
/Algorithm/Merge Sort/src/MergeSort.cpp
C++
cpp
1,368
no_license
#include "MergeSort.h" MergeSort::MergeSort() { //ctor } MergeSort::~MergeSort() { //dtor } void MergeSort::mergeSort(std::vector<int>& nums) { std::vector<int> a = nums; split(a, nums, 0, nums.size() - 1); } void MergeSort::split(std::vector<int>& a, std::vector<int>& b, int left, int right) { ...
5e21043f3855bae442fb61e79d2f965db38e5013
6c99b230a0ea29867ad7dcbfe66312d1c768c23d
dragon-li/fatfrog
/jni/omx/OMXMaster.cpp
C++
cpp
5,977
permissive
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
af8202591a2a9efef08d729fe89a9594153ed1b9
71709615e90c2763eac40327a322d1da40e99526
NTUwanderer/MABMA
/Problem.cc
C++
cc
1,516
no_license
// Problem.cpp: implementation of the methods specific to the problem. // #include "Problem.h" #include "EDA.h" /* * Reads the problem info of the instance set. */ int GetProblemInfo(string problemType, string filename) { if (problemType=="fsp") { //problem is FSP m_problem= new PFSP(); } ...
6b119fc1c74aeb976dabe83fe36173a4e9cb7abb
4c7c53138aa0f730bb013262340052ad67342069
iqubb/simulated-annealing
/src/visualization.cpp
C++
cpp
1,524
no_license
#include <visualization.hpp> #include <annealing.hpp> Visualization::Visualization() : main_window(sf::VideoMode::getDesktopMode(), "Salesman problem visualization", sf::Style::Fullscreen), kPointColor(sf::Color::Red), kPointRadius(10), kMaxPoints(1000) {} void Visualization::run() { bool annealing_start = false...
7fcb0b666713f34a812509116aa403c16578e23f
5b0d1d04d95bbd768a02727a6f8f158898372d9a
streamerinn/Verklegt-1
/Verklegt1 - Vika2/scientist.cpp
C++
cpp
1,036
permissive
#include "scientist.h" #include <iostream> #include <string> #include <sstream> Scientist::Scientist() { _id = 0; _name = ' '; _gender = ' '; _dateOfBirth = 0; _dateOfDeath = 0; } Scientist::Scientist(int id, string name, string gender, int dateOfBirth, int dateOfDeath) { _id = id; _name =...
83492253bf54e06b67663aa9d6916a9e19f8010c
ca1be5f9d6e7e77923e6af58f76b59945779c685
evildead/HashesToHashes
/app/ui/mainwindow.cpp
C++
cpp
1,700
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include "hashes/hashesmanager.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); init(); } MainWindow::~MainWindow() { delete ui; } void MainWindow::init() { ui->h...
4022a529b88611c02a4e31e335f846275b16d20a
e8c773dffe11488c8be790c7e0282a7be7404d31
ChenQL6/chenql2
/0331实验3/0331实验3/0331实验3Doc.cpp
C++
cpp
2,677
no_license
// 0331实验3Doc.cpp : CMy0331实验3Doc 类的实现 // #include "stdafx.h" // SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的 // ATL 项目中进行定义,并允许与该项目共享文档代码。 #ifndef SHARED_HANDLERS #include "0331实验3.h" #endif #include "0331实验3Doc.h" #include <propkey.h> #ifdef _DEBUG #define new DEBUG_NEW #endif // CMy0331实验3Doc IMPLEMENT_DYNCREATE(CMy0...
36374d36a2baff9064dc979269c828d0eb34bd29
a201e79e19998f3ce60db565cbaa10cf76c61233
efifogel/sgal
/src/libs/SGAL/lib/SAI/SAI_updates_interface.hpp
C++
hpp
1,600
no_license
// Copyright (c) 2004 Israel. // All rights reserved. // // This file is part of SGAL; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; version 2.1 of the // License. See the file LICENSE.LGPL distributed with SGAL. // ...
bbde8502aeb4197091937069989670280c826724
58268944e56682af244f4f440e51a8bc975bb868
ggjersund/TDT4102
/Exercises/oving-12/FancySafeArray.hpp
C++
hpp
1,264
no_license
// // FancySafeArray.hpp // oving12 // // Created by Gjert Ingar Gjersund on 23.04.2018. // Copyright © 2018 Gjert Ingar Gjersund. All rights reserved. // #ifndef FancySafeArray_hpp #define FancySafeArray_hpp #include <iostream> #include "SafeArray.hpp" template<class T> class FancySafeArray: public SafeArray<T...
b3463743843b8f39bf6be52f16587c6cc9e0350a
76934ae5936a5796c119c27a82913a65752f637d
redeff/cmp
/icpc/2014-tap/E/main.cpp
C++
cpp
810
no_license
#include <bits/stdc++.h> #define forn(i, n) for(int i = 0; i < n; ++i) using namespace std; int main() { int m, n; cin >> m >> n; vector<vector<int>> graph(n); forn(i, m) { int p = graph.size(); graph.emplace_back(); ++n; int c; cin >> c; forn(lala, c) { int t; cin >> t; --t; graph[t].push...
4e4e24bc5a3c80179cb37ae6df2b57049566dca3
4e91521f51a7d382d3726b1be5e2cdca568a4d50
gumpu/prezoids
/src/game_limits.cpp
C++
cpp
541
permissive
#include "game_limits.h" // TODO refactor away const int LEVEL_WIDTH = 1280; const int LEVEL_HEIGHT = 1280; /* --------------------------------------------------------------------*/ const int OVER_LEVEL_WIDTH = 1280; const int OVER_LEVEL_HEIGHT = 1280; const int UNDER_LEVEL_WIDTH = (128*5); const int UNDER_LEVEL_H...
924e5946aa6b6676565b9fa67192e2eebd00440f
c8c90216574f1c8b854e0152fcb3395b52160a4d
oknashar/Problem-Solving
/Light OJ/1022 - Circle in Square.cpp
C++
cpp
361
no_license
// problem link : http://lightoj.com/volume_showproblem.php?problem=1022 // Geometry, Basic Geometry #include <bits/stdc++.h> #define PI 2 * acos(0.0) using namespace std; int main(){ int t; cin>>t; for(int i=1; i<=t; i++){ double r; cin>>r; cout<<"Case "<<i<<": "<<setprecision(2)<<fixed<<r * r...
b81b3b6ea694eae1cdd166484fa2f3f168b10197
de9fbb1304be8fcb4715d82f20874cb90d400812
AnjanaKN/imageconverter
/fisheye_undistort.cpp
C++
cpp
1,129
no_license
#include "ocam_functions.h" using namespace cv; cv::Mat fisheye_undistort(cv::Mat ab,std::string calib_file) { //char * calib=calib_file; const char * calib = calib_file.c_str(); struct ocam_model o, o_cata; get_ocam_model(&o,"/home/anjana/vision/cam0.txt"); IplImage src1 = ab; static...
793a0a27dcbba1858c644509c9481fddff3fadd5
c29ae0ab78da9d62ea5ec41e5cace5070c91d1d1
npow/LeetCode
/InterleavingString/main.cc
C++
cc
814
no_license
class Solution { public: bool isInterleave(string s1, string s2, string s3) { vector<vector<bool> > visited = vector<vector<bool> >(s1.size(), vector<bool>(s2.size(), false)); return isInterleave(s1, s2, s3, 0, 0, 0, visited); } bool isInterleave(string& s1, string& s2, string& s3, int i, in...
9511bdae913bb9e9ed391f0ade8dcfe1535f546c
7038717dba452fc0754a9338da79085060644d4b
Mohammed-Shoaib/Coding-Problems
/HackerRank/30 Days of Code/Days/Day 6.cpp
C++
cpp
431
permissive
/* Problem Statement: https://www.hackerrank.com/challenges/30-review-loop/problem */ #include <iostream> using namespace std; void odd_even(string& S) { string odd, even; odd = even = ""; for (int i = 0; i < S.length(); i++) { if (i & 1) odd += S[i]; else even += S[i]; } cout << even << " " << odd <<...
b8a6b7d6d7398661a91bba9d7f58246578280ad7
8893cc2bebb4bc3d84377cc0cdd0dce1dcb5b62d
pxinghao/dimmwitted
/word_embeddings/cyclades_word_embeddings_serial.cpp
C++
cpp
6,527
permissive
#include <iostream> #include <stack> #include "../src/util.h" #include <vector> #include <fstream> #include <string> #include <algorithm> #include <math.h> #include <time.h> #include <map> #include <unistd.h> #include <set> #include <numa.h> #include <sched.h> #include <omp.h> #include <iostream> #define K 30 #define...
a105e316f742b03937b9f62822fc1a32ed89c1a5
38facaaa15c9491267bd7b00c7095b407473a25a
blgo/cpplessons
/Working with files/1.cpp
C++
cpp
311
no_license
/*Jose Blas Gomez Fuentes 76631979g 2šA electricidad*/ #include <stdio.h> #define a 9.78 int main(){ float s; int t,i=1; printf ("Dame el tiempo de caida libre: "); scanf("%i",&t); while(i<=t){ s=(1.0/2)*a*i*i; printf("Ha recorrido %0.2f metros en el instante t=%i\n",s,i); i++; } }
ce4cb9b12deb1776def9bae73c54214b26637184
39eb6e2524fefd1dbeb6e6f1ba75eb12ba29ee9b
iridium-browser/iridium-browser
/v8/src/objects/js-array-buffer.cc
C++
cc
16,671
permissive
// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/objects/js-array-buffer.h" #include "src/execution/protectors-inl.h" #include "src/logging/counters.h" #include "src/objects/js-array-buf...