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
58fbcb92e38baba50bf98de2f42162a3fc01ac15
7623e2ae20900997c9cacadb6ccae8f69573b4c1
h-g-s/npsep
/utils/preprocess.cpp
C++
cpp
33,701
no_license
#include "preprocess.h" #include <cmath> #include <vector> #include <queue> #include "constraint_propagation.h" using namespace std; extern "C" { #include "memory.h" #include "cgraph.h" } #define EPS 1e-8 struct _Preprocess { const Problem *problem; double **coefficients, *rhs; double *colLb, *...
b8fe1a2fe8a150b6a049654f7813bba2a84964ac
182a3f00c516dac65110f5618a9ed3f758e07c31
PhoeniX-d/Essential_CPP_StanleyLippman
/Chapter 1 - Basic C++ Programming/1-8.cpp
C++
cpp
374
no_license
const char *Message(int numTries) { const int n = 4; static const char *user_message[n] = { "Oops! Nice guess but not quite it.", "Oh. Sorry. Wrong again.", "Ah, this is harder than it looks, no?", "It must be getting pretty frustrating by now!" }; if (numTries < 0) numTries = 0; else if (numTries >= n) ...
155d7874c7d7c35bb380be4c3639fc4fe803247b
0e884a246793a09852c1ea22cf532aab4d70cd8c
NishikinoD/Biquadris
/SShape.cc
C++
cc
4,250
no_license
#include "SShape.h" using namespace std; SShape::SShape(Grid *g, int x, int y): Block(g, x, y) {}; void SShape::init() { shared_ptr<Cell> c1 = g->get(lb_x, lb_y); shared_ptr<Cell> c2 = g->get(lb_x, lb_y + 1); shared_ptr<Cell> c3 = g->get(lb_x - 1, lb_y + 1); shared_ptr<Cell> c4 = g->get(lb_x - 1, lb...
bb225db1ac5b782176a18f4641baed5626182d95
6a8c5a028928710be37a80187c2d8e6abb20f162
Ahmadreza-Jeddi/rloss
/deeplab/include/caffe/internal_thread.hpp
C++
hpp
1,382
permissive
#ifndef CAFFE_INTERNAL_THREAD_HPP_ #define CAFFE_INTERNAL_THREAD_HPP_ #include "caffe/common.hpp" /** Forward declare boost::thread instead of including boost/thread.hpp to avoid a boost/NVCC issues (#1009, #1010) on OSX. */ namespace boost { class thread; } namespace caffe { /** * Virtual class encapsulate boo...
1847263bc9443ce9a1f4b218ba0c395a00e17507
ab5b7feaefbef34c8e510e75bbc247c531af569a
proaholic/Win2K3
/NT/multimedia/dshow/filters/image2/video/vmrfilter.cpp
C++
cpp
115,539
no_license
/******************************Module*Header*******************************\ * Module Name: VMRFilter.cpp * * * * * Created: Tue 02/15/2000 * Author: Stephen Estrop [StEstrop] * * Copyright (c) 2000 Microsoft Corporation \**************************************************************************/ #include <streams.h> ...
fed8461f40d62a3f57335e0ee444daec5c73de4e
02965b29036042f124e0357dcbbcc4541f812e32
paulvollmer/ofxModifierKeys
/src/ofxModifierKeys_impl_linux.cpp
C++
cpp
1,532
no_license
#include "ofxModifierKeys.h" #ifdef TARGET_LINUX #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/X.h> #include <GL/glx.h> bool ofGetModifierPressed(unsigned int mod) { unsigned int t = 0; //return false; Display* disp = glXGetCurrentDisplay(); char key_map_stat[32]; XQueryKeymap(disp, key_map_stat); ...
ccea3f7f911aa256c6f678892516add0ea07738f
d7521a0a21b10407310c1bc4411a1610bbf4e626
ygjukim/tictactoe_ros
/include/tictactoe_ros/qnode.hpp
C++
hpp
2,492
no_license
/** * @file /include/tictactoe_ros/qnode.hpp * * @brief Communications central! * * @date February 2011 **/ /***************************************************************************** ** Ifdefs *****************************************************************************/ #ifndef tictactoe_ros_QNODE_HPP_ #def...
51b9ce25e36ec73fdb681f97d67056725a0cf0a2
749060d6f79d20aae902ea2d37ac872c22f04048
hymsly/CompetitiveProgramming
/hackerrank/codesprint13/2.cpp
C++
cpp
1,924
no_license
#include<bits/stdc++.h> using namespace std; const int N = (1e5); int f,s,t,mini,maxi; struct group{ int a,b,c; group(){ a=0; b=0; c=0; } group(int _a,int _b,int _c){ a=_a; b=_b; c=_c; } void show(){ cout<<"----grupo----\n"; cout<<a<<" "<<b<<" "<<c<<endl; } bool possible(){ if(a > f) return...
4f5945a6a65e8fe3e438c3297ed0866ff31a1051
dc35a00e724a9048879e36f951415ac205b750f6
RedCaplan/Cplusplus
/Games/SimpleChess/SimpleChess/ChessFiguresG.cpp
C++
cpp
8,113
no_license
#include "ChessFiguresG.h" #define FieldSizeY 7 #define FieldSizeX 10 ChessFiguresG::ChessFiguresG ( ) { } void ChessFiguresG::SetColor (int text , int background) { HANDLE hStdOut = GetStdHandle (STD_OUTPUT_HANDLE); SetConsoleTextAttribute (hStdOut , (WORD)( ( background << 4 ) | text )); } void ChessFi...
39e60be43116701be1d7b0acf45314553b077921
8c0de2525692095e9c981217d3cad6452c0f8807
buckeye-cn/ACM_ICPC_Materials
/solutions/kattis/ecna16/thathanoi_laurence.cpp
C++
cpp
1,274
no_license
#include <bits/stdc++.h> using namespace std; vector<int64_t> ba, bb, bt; bool at_back(vector<int64_t> const& v, int64_t x) { return !v.empty() && v.back() == x; } int64_t dp(int64_t depth) { if (depth < 1) return 0; int64_t res = 0; if (at_back(ba, depth)) { res += 1l << (depth - ...
6bafdf21b015c6d1c8be6714e0e6904a90def6b9
0f335173632d4a75f98fa942f0d49946e846bc83
kurgankin/GameBots
/MineSweeper/MineSweeperBot/PicRecognition.cpp
C++
cpp
2,901
no_license
#include "PicRecognition.h" #include <vector> #include <opencv2/opencv.hpp> #include <Windows.h> #include <tchar.h> cv::Size TmplSize(18, 18); static cv::Mat InputTrainingData; static cv::Mat OutputTrainingData; static cv::Ptr<cv::ml::ANN_MLP> ann; void ReadSample00(std::string Dir, int num) { std::vector<std...
067537b0d03ed244829d840b325fa82df63ebc26
da7641889bbda608a57c8de17823aec5ab2f7352
logbasetwo/CPP_Programs
/C++ Programs/calculator/Mult.cpp
C++
cpp
290
no_license
#include "Mult.h" #include <iostream> using namespace std; Mult::Mult() { float x; float y; float pro; cout << "Enter first number: "; cin >> x; cout << "Enter second number: "; cin >> y; pro = x * y; cout << "The product is " << pro << "." << endl; }
e04e3ba2c68a0349ab3ed9e2c3f08ecf565fb170
dcb8c7cd83345133e829d5827c4869a750973355
ryotgm0417/AtCoder
/contests/GCJ2020/GCJ_qual2020/nestingdepth.cpp
C++
cpp
1,583
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i=0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using ll = long long; using VL = vector<ll>; using VVL = vector<vector<ll>>; using P = pair<ll, ll>; // chmin, chmax関数 template<typename T, typename U, typename Com...
c71c762974f2ca54dbcbb73b116915cb77a5dd81
99a20f4215375b05e7b157dc351ad4836520720f
ParitoshKelkar/cpp_practice
/trees/listInBtree.cpp
C++
cpp
784
no_license
class Solution { public: bool isSubPathUtil(ListNode* head, TreeNode* root){ if(head == NULL){ return true; } if(root == NULL) return false; bool c = false; if(root->val == head->val){ head = head->next; ...
09932ac14b0043452a7643144b6d31bd88290fd1
e96cd5e4a3ecd1911a8d8574fb4a3674438c5334
timblechmann/boost.simd
/include/boost/simd/function/definition/is_gtz.hpp
C++
hpp
1,010
permissive
//================================================================================================== /*! @file @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //===========================...
1763b1517960bd493512f8a7fe2b0174e38e8bce
5505b9d30dd57a47571854c795cd434431804e1b
masterchef2209/coding-solutions
/codes/codeforces/1183B.cpp
C++
cpp
1,711
no_license
/*Read the problem carefully before starting to work on it*/ #include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //using namespace boost::multiprecision; //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> using namespace std; //using namespace __gnu_pbds; typedef lo...
c0b9838b79c35e6c56144c015942d5810d8b4144
ed4f3ab9ccb3e41807c7ea89a277f75f1fe4407a
2bite/ARK-SDK
/SDK/ARKSurvivalEvolved_DmgType_Explosion_Cannon_parameters.hpp
C++
hpp
397
permissive
#pragma once // ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DmgType_Explosion_Cannon_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //---------------------------------------------...
5009829cf3a7fc76ad7fa1d9fffd1b042856da33
15cbcf7983964df88fbcb3331ee1751cf27025c1
lxg5763/-
/浏览器密码获取/Data_Get.cpp
C++
cpp
750
no_license
#include "pch.h" #include"Firefox_decrypt.h" // 获取logins.json中保存的登录信息 char* getBuffer(string profilePath) { profilePath = profilePath + "\\logins.json"; DWORD szBuffer = 100000, szWrotedBytes; char* buffer = (char*)malloc(szBuffer); HANDLE fLoginFile = CreateFileA(profilePath.c_str(), GENERIC_READ,FILE_SHARE_READ ...
672976a6d3ec420fcc365217e5918764c941c1f3
ef3a8d3f21209325718103ea4c0dacf412306077
khushboosinghrecs/Data_Structure
/tree/bst.cpp
C++
cpp
1,365
no_license
#include<iostream> using namespace std; struct node { struct node *lchild; int data; struct node *rchild; } *root=NULL; void insert(int key) { struct node *t=root; struct node *r=NULL, *p; if(root==NULL) { p=new node; p->data=key; p->lchild=p->rchild=NULL; ro...
965c437d18a27cd4441962f7e3abc588d6e6262f
73eaab12fe089986e12e0ce37743c032e13f8f33
SarswaManish/SDE-Interview-Problems
/Sheet Solutions/binary tree/maximum path sum.cpp
C++
cpp
886
no_license
ERROR: type should be string, got "\nhttps://leetcode.com/problems/binary-tree-maximum-path-sum/\n\n/**\n * Definition for a binary tree node.\n * struct TreeNode {\n * int val;\n * TreeNode *left;\n * TreeNode *right;\n * TreeNode() : val(0), left(nullptr), right(nullptr) {}\n * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n * };\n */\nclass Solution {\npublic:\n int ans=INT_MIN;\n \n int inorder(TreeNode *root)\n {\n if(root==NULL)\n return 0;\n int x=inorder(root->left);\n int y=inorder(root->right);\n ans=max(ans,x+y+root->val);\n int z=max(x,y);\n if(z+root->val<0)\n return 0;\n return z+root->val;\n \n }\n \n \n int maxPathSum(TreeNode* root) {\n \n inorder(root);\n return ans;\n }\n};\n"
54c174d9ee6a1b93a6a2a10a5734192130408065
585251122ab31bd064b2c108928a5f002d911e5c
cnyali-czy/code
/luogu/3723.cpp
C++
cpp
2,499
no_license
#define REP(i, s, e) for (int i = s; i <= e; i++) #define DREP(i, s, e) for (int i = s; i >= e; i--) #define DEBUG fprintf(stderr, "Passing [%s] in Line %d\n", __FUNCTION__, __LINE__) #define chkmax(a, b) a = max(a, b) #define chkmin(a, b) a = min(a, b) #include <iostream> #include <cstdio> #include <cmath> #define ...
b11d63ec79cb92da22c3b36e662ab6f90f228233
3720e457926e58e4a2e83708ba6f668f17822206
anhnguyendepocen/SMRD
/src/SFTEVAL_fteval_dqags_dqagse_dqk21.cpp
C++
cpp
7,216
no_license
#include <base/base.hpp> #include <utility/dmachine.hpp> //' date written 800101 (yymmdd) //' revision date 830518 (yymmdd) //' category no. h2a1a2 //' keywords 21-point gauss-kronrod rules //' author piessens,robert,appl. math. & progr. div. - k.u.leuven //' de doncker,elise,appl. math. & progr. div...
392b85b58e369b3eb4175276d996258a2074ab5a
e323d52b53ea70b2e7b1c9e450cc9a6f059a4fd7
CadQuery/pywrap
/opencascade/GeomProjLib.hxx
C++
hxx
5,631
permissive
// Created on: 1993-08-25 // Created by: Bruno DUMORTIER // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GN...
60b53f7433faf85d0499f5d72619963ac5a3389b
08346e0cc46e5fdaa37325e69686bdd45f85b743
mindspore-ai/mindspore
/mindspore/ccsrc/frontend/parallel/ops_info/inplace_op_info.cc
C++
cc
3,443
permissive
/** * Copyright 2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
8569b52ee255d4cbe6d4b310d58d5eaa133d88b4
2627164b394bed8946505efbf9c436cefb87b4ac
KatanaGraph/katana
/lonestar/analytics/cpu/k-core/kcore_cli.cpp
C++
cpp
5,523
permissive
/* * This file belongs to the Galois project, a C++ library for exploiting * parallelism. The code is being released under the terms of the 3-Clause * BSD License (a copy is located in LICENSE.txt at the top-level directory). * * Copyright (C) 2019, The University of Texas at Austin. All rights reserved. * UNIVER...
f928154c1abd9db335ef34d8ecc1f9b39adab215
e078f3986daf16b56b0979d0f031d0207943de30
Renniej/Object-Oriented-Software-Development-using-C--11--BTP305-
/Labs/Lab 4 (Container)/Lab 4 (Container)/Source.cpp
C++
cpp
1,070
no_license
// Workshop 4 - Containers // w4.cpp // Author: Dr. Elliott Coleshill // Date: 2018-08-22 #include <iostream> #include "Message.h" #include "Notifications.h" const char REC_DELIMITER = '\n'; w4::Notifications collect(std::ifstream& in, char recDelim) { w4::Notifications notifications; do { w4::Message message(...
85486e19404c20356e6bbf7100fb02ec8a287858
3f655b65a3e8cde969490baafcd766ba12a2cda0
skyshore/raft
/core/persist_test.cc
C++
cc
1,548
permissive
/* * testPersist.cc * * Created on: Jan 3, 2014 * Author: fan */ #include <unistd.h> #include <sys/types.h> #include <fcntl.h> #include <gtest/gtest.h> #include <raft/core/persist.h> #include <raft/core/options.h> using namespace raft; class TestPersist { }; TEST(logfile, indexName) { { LogFile lo...
239b489dadca0e8f80ceb18c2194eeb699d0f673
fc206c96d0cce62ed504db7e5d9e5a6904811c78
locustwei/Leadow
/plugins/LdFileProtect/LdFileProtect.cpp
C++
cpp
1,370
no_license
// LdFileProtect.cpp : 定义 DLL 的初始化例程。 // #include "stdafx.h" #include "LdFileProtect.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // //TODO: 如果此 DLL 相对于 MFC DLL 是动态链接的, // 则从此 DLL 导出的任何调入 // MFC 的函数必须将 AFX_MANAGE_STATE 宏添加到 // 该函数的最前面。 // // 例如: // // extern "C" BOOL PASCAL EXPORT ExportedFun...
4b725d9fa7a4f7198f0e1cdd6bcd10a000fa4bca
b1b5f92369f8174251a0dd067bf7bdc8ef46fe47
mosb/manhattan-vision
/source/svm_helpers.cpp
C++
cpp
1,376
no_license
#include "svm_helpers.h" #include "common_types.h" #include "manhattan_dp.h" #include "camera.h" namespace indoor_context { /*void OutputLabelViz(const ImageRGB<byte>& bg, const MatI& clas, const string& file) { // Output classifications MatI orients(bg.GetHeight(), bg.GetWidth()); int s ...
0a7200bb42446a35352f3dbc0b1c3bf94d0d6e83
2d5f50f4e6503621ca788f35eb0f556b513fad73
bhuman/BHumanCodeRelease
/Src/Modules/MotionControl/WalkingEngine/WalkingEngine.cpp
C++
cpp
49,013
permissive
/** * @file WalkingEngine.cpp * * This file implements a module that generates walking motions. * * The basic ideas of using the FSRs to determine the support change and the gyroscope * for directly proportional feedback to the ankle joints are borrowed from the 2014 * walking engine from rUNSWift written by Ber...
f6965589ebbcc39925536fc23285a4f11afde5c9
233710e50c484c30d7d6da008851150504be094b
YaoEmily/Algorithms
/1082 与7无关的数.cpp
C++
cpp
852
no_license
#include <iostream> using namespace std; int T; long long arr[1000001]; void init() { arr[0] = 0; for(long long i = 1; i < 1000001; i++) { int flag = 1; if(i / 7 * 7 == i) { flag = 0; } else { long long tmp = i; while(tmp)...
febddaef81b00327591b13b0bf57a840070d95b4
4e8f18fe043bff82ac3625d97bfc407b1cb3ef2a
nuzumglobal/Elastos.Trinity.Alpha.Android
/src/v8/src/compiler/typer.cc
C++
cc
69,031
permissive
// Copyright 2014 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/compiler/typer.h" #include <iomanip> #include "src/base/flags.h" #include "src/bootstrapper.h" #include "src/compiler/common-operator.h"...
ae6334590f575dd8bdb3d4d943abcdc2f85ee602
b4f66d8fcf1d6d22b927f2055e7aa9e93475445e
bytedance/incubator-mxnet
/src/operator/contrib/multibox_detection.cc
C++
cc
8,316
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
080107b70ef6d09048249692c3efa76bf280d144
640882d48ed888a63c0ac6a1e4b552146ec026aa
253627764/Flappy-Bird
/Classes/domain/Pipe.cpp
C++
cpp
3,918
permissive
// // Pipe.cpp // supertarkartGame // // Created by 陶正凯 on 14-11-1. // // #include "Pipe.h" #include "../util/GameConst.h" #include "../layer/GameScoreLayer.h" using namespace CocosDenshion; Pipe::Pipe():isStart(true) { } Pipe::~Pipe() { pPipeVector.clear(); } bool Pipe::init() { if (!Layer::init())...
712db6d4aa3c213f963fa4d24d78245d8300e74d
4614555ddcac20492f670fc2935195b8416f310d
wildoak/machjs
/src/mach_api_use.cc
C++
cc
1,118
no_license
#include "mach_api_use.h" #include "mach_api_fs.h" #include "mach_environment.h" #include <fstream> namespace mach { v8::Local<v8::Value> api_use(const mach::FunctionCall<v8::Value>& info) { v8::EscapableHandleScope scope_v8(info.GetIsolate()); auto &&env = mach::Environment::Get(info.GetIsolate()); a...
fc9b6b31f78de0f01e35afe9075e119db653e4a1
684451016f0e50054866c582e2cc3c64118a2752
kunal121/C-And-Cpp-Questions
/Mohit Bansal/C++_Programs/virtual_functions1.cpp
C++
cpp
557
no_license
#include<iostream> using namespace std; class shape { public: double l,h; void get_data() { cin>>l>>h; } virtual void display() { cout<<"area"; } }; class triangle:public shape { public: void display() { cout<<"area:"<<(.5*l*h); } }; class rectangle:public...
2456e35039a2d925c1a86c1a5470016a5d95dc1f
90e4c6711b6b47a6b6fc357ac24abf80ae24f3ba
harrisonjansma/Cpp-Algorithm-Implementations
/Linked List Implementation/Source.cpp
C++
cpp
3,728
no_license
#include <array> #include<iostream> using namespace std; class intNode { //Class for individual nodes. private: int val; intNode* next; friend class SinglyLinkedList; }; class SinglyLinkedList { //Class for a SLL object public: SinglyLinkedList(); void addFront(int n); int getNth(int n); ...
2110e01136eba19e86ebd888eba63dff3717d680
dc5890511d0862d9109cde8fac650fd215b8512f
lucasalj/mjcompiler
/tests/mjc_stringtable_test.cpp
C++
cpp
567
permissive
#include <catch.hpp> #include <mjc_stringtable.h> #include <string_view> TEST_CASE("", "[stringtable]") { using namespace std::literals; mjc::StringTable table; auto testStr1 = "test1"sv; auto testStr2 = "test2"sv; auto testStr3 = "test3"sv; auto testStr4 = "test4"sv; auto id1 = table.insert(testStr1); ...
cb3afdf28edbc04e0c7ab2bb9178b61bd6cd6bdf
fdda720ecb36aa78c6a502be56315285ee756645
jelledebock/c-files-schakelprogramma
/Les11/Voorbeelden/vb_move2.cpp
C++
cpp
3,239
no_license
// opmerking: ga ook eens na wat er gebeurt als de // move-constructor en -operator in commentaar staan #include <iostream> #include <vector> using namespace std; class A { public: A() : grA(0),tabA(0) {} A(const vector<int> &v, int i=0, int *p=0); A(const A &a); A(A &&a); ...
94a1dfb1a670348dc78e589ffab9d258b1e5635e
b8cb880fe56667200295be352b7fc8d148a94205
waaberi/chromium
/chrome/browser/sharesheet/sharesheet_service_delegate.cc
C++
cc
2,708
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/sharesheet/sharesheet_service_delegate.h" #include <utility> #include "base/bind.h" #include "chrome/browser/profiles/profile.h...
353f7e906ccf40e1518809783364710e7e5b9e3b
46750770515ee5e529ef6175ad6e2fc372285a47
BrandtRobert/OnionRouter
/src/reader.cpp
C++
cpp
1,811
no_license
#include "reader.h" bool Reader::fetch(string url, string chainfile) { vector<pair<string, int>> chainfile_entries = read_chain_file(chainfile); int next_index = rand() % chainfile_entries.size(); // Pop element at index pair<string, int> next_hop = chainfile_entries.at(next_index); chainfile_entri...
528ac46defa31322ac06acc9514ab224d5d9a64d
cf98e4b94e78593731d5de9c490d3c810967ec74
CERN/TIGRE
/Common/CUDA/TIGRE_common.cpp
C++
cpp
566
permissive
#if defined(IS_FOR_PYTIGRE) #include <stdlib.h> #include <stdio.h> #include <stdarg.h> #include "TIGRE_common.hpp" void mexPrintf(const char* format, ...) { PRINT_HERE(""); va_list argpointer; va_start(argpointer, format); vprintf(format, argpointer); va_end(argpointer); } void mexErrMsg...
2d2f632b65c07bc4db08d1563b8d0af8671bdb3d
87db8022b16ae60fa5442374bcf6955a8ed60dfd
KrisStevenson/CommonCore
/Memobs.cpp
C++
cpp
1,695
permissive
/* The MIT License (MIT) Copyright (c) 2010-2014 KrisStevenson 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, ...
80193a874886c650a4d81ca2518f8a7486eee84f
4f9e6546b2dd223e836bb6c7f32efe94434aed76
KamikazeChan/Contest
/CodeLib/Graph/ZOJ 3642 Just Another Information Sharing Problem.cpp
C++
cpp
4,863
no_license
/* ** ZOJ 3642 Just Another Information Sharing Problem ** Created by Rayn @@ 2014/08/19 */ #include <cstdio> #include <string> #include <cstring> #include <set> #include <map> #include <queue> #include <vector> #include <algorithm> using namespace std; typedef long long LL; const int INF = 1 << 30; const int MAXN = 50...
7eea6733de30e45efe543ddadd0482f5a8e41bd2
429466d24c2dbb4831f9ee38d2382f9380e71141
jennyb2911/chromium
/media/audio/win/audio_manager_win.cc
C++
cc
14,442
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 "media/audio/win/audio_manager_win.h" #include <windows.h> #include <objbase.h> // This has to be before initguid.h #include <initguid.h>...
d0ca23ee921bc0d912118dfdd5a8de3d323932d7
33bcab4ad2f02cdf98fe7b076d4c4bd783cb4393
sergadin/109-2020
/Krasilnikov_NA/Sem2/5.2/test.cpp
C++
cpp
2,057
no_license
#include <iostream> #include "math.h" #include "interpolation.h" using namespace std; int main() { try { // Тест № 1 int n = 10; double x1[n] = {1.59, 1.87, 2.51, 3.43, 4.88, 7.22, 8, 8.04, 8.8, 9.49}; double point = 2.43; double ca; //calculated_answer double ea; //exact_answer double *y = (double*) ...
f37942dc99088878a596de12984bd3eb65a447f8
33ed790f14d45959de6bb012a2b3ed3d03d4ee79
niuxu18/logTracker-old
/second/download/squid/gumtree/squid_repos_function_269_squid-3.4.14.cpp
C++
cpp
306
no_license
int main(int argc, char *const argv[]) { setbuf(stdout, NULL); setbuf(stdin, NULL); char buf[6400]; while (1) { if (fgets(buf, sizeof(buf) - 1, stdin) == NULL) { } fprintf(stdout, "ERR\n"); fprintf(stderr, "LDAP group authorisation not supported\n"); } }
7a055d6f483e90ab831a2ee17ebf7800196fee61
41b368ec321fd9476a9add5317331897b606bca8
multi-os-engine/art
/runtime/jni_internal_test.cc
C++
cc
90,474
permissive
/* * Copyright (C) 2011 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...
fc111137db42ed5a773d5189aa014c53498dfa4c
cc6412c4cf8b4bc42dd34ddebf13cfd362ae5828
szjerrywang/my-math-app
/MathFunctions/mysqrt.cpp
C++
cpp
708
no_license
#include <iostream> #include <cmath> #include "MyMathAppConfig.h" // a hack square root calculation using simple operations double mysqrt(double x) { if (x <= 0) { return 0; } #if defined(HAVE_LOG) && defined(HAVE_EXP) double result = exp(log(x) * 0.5); std::cout << "Computing sqrt of " << x << " to be " ...
a430bf56a36abf01e74f5a1b256c0e3b5c6f411d
0b4cae84695f8ef9ddc09166d79ae26d4c466b94
GC1829/GameJam
/GameTemplate/GameTemplate/Game/graphics/SkinModel.cpp
C++
cpp
5,128
no_license
#include "stdafx.h" #include "SkinModel.h" #include "SkinModelDataManager.h" SkinModel::~SkinModel() { if (m_cb != nullptr) { //定数バッファを解放。 m_cb->Release(); } if (m_samplerState != nullptr) { //サンプラステートを解放。 m_samplerState->Release(); } } void SkinModel::Init(const wchar_t* filePath, EnFbxUpAxis enFbxUpAxis)...
8ef70ce0d00dd5e23fab23ce09994e5d1c9a545d
017f5390077c8faa741f6160cd1d779707f6cb0b
bootingman/fuchsia2
/src/developer/debug/zxdb/symbols/build_id_index_unittest.cc
C++
cc
2,850
permissive
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/developer/debug/zxdb/symbols/build_id_index.h" #include <filesystem> #include "gtest/gtest.h" #include "src/developer/debug/zxdb/common/hos...
98f1a92983e810f1df23784050f7b7d47f8eadb0
4b8a0d240afcb78cfe30034e3108c2b7948fb347
SharathChampzz/Placement_Preparation
/Easy Cpp Programs/greatest of 3 numbers.cpp
C++
cpp
330
no_license
#include<iostream> using namespace std; int main(){ int a,b,c; cout<<"Enter a and b and c : "; cin>>a>>b>>c; if(a>b and a>c){ cout<<a<<" is greater"<<endl; } else if(b>a and b>c){ cout<<b<<" is greater"<<endl; } else{ cout<<c<<" is greater"<<endl; ...
96811f99febffcc6e4fc99945992955f2fc0d4ab
b8bbd9ab758e96dcdc7b6fd9ce3a970260b14811
2dev2/contest
/dp/lis/lis_nlogn_set.cpp
C++
cpp
718
no_license
//We will see here an algorithm which take O(n log k) time where k is the size of the LIS. //http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence /* Only they use set instead of array. This helps in finding a place to update. With array you should implement binary search. There is a mistake though. It s...
5d4fcb518c072dfa0af5b8206d457e7261b5dfe5
a616e4ce6976c7b274b18b47c72c765b47464ac1
rwebber1/CollegeTour
/collegemodel.cpp
C++
cpp
14,980
no_license
#include "collegemodel.h" #include "ui_collegemodel.h" /*! The College User-Interface * \brief CollegeModel::CollegeModel * \param collegeClicked - A struct argument * \param asuTrip - bool for starting point * \param parent */ CollegeModel::CollegeModel(College collegeClicked, bool asuTrip, QWidget *parent...
9e5d44f3ce0716196c2d955e4562d04345d15393
b2c0e897f0297a3d9d7cce5d46220647bad2b773
antonl/micro-manager
/DeviceAdapters/AndorShamrock/AndorShamrock.cpp
C++
cpp
22,988
no_license
#include "AndorShamrock.h" #include "ShamrockCIF.h" #include "../../MMDevice/ModuleInterface.h" #include <sstream> using namespace std; const char* g_ShamrockName = "Andor Shamrock"; const char* g_DeviceDescription = "Device Adapter for Andor Shamrock Spectrographs"; const char* gsz_SerialNo = "Shamrock Seri...
e2e5af50e770ec0aedf252f280fddf710c07796b
4f9c28c652505aa706037c4f06cb719a3fd7dcf5
moraispgsi/pin-bootstrap
/pintools/source/tools/DebugInfo/backtrace_from_dll.cpp
C++
cpp
2,306
permissive
/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2017 Intel Corporation. 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 noti...
4725fb8ac7dc5f1349646ebaa1369ef6d60e1074
5d57cfb3435ae6ab2271cee8ade35b2ad26d9187
thyrdmc/eepp
/src/eepp/system/platform/win/threadlocalimpl.cpp
C++
cpp
454
permissive
#include <eepp/system/platform/win/threadlocalimpl.hpp> #if EE_PLATFORM == EE_PLATFORM_WIN namespace EE { namespace System { namespace Private { ThreadLocalImpl::ThreadLocalImpl() { mIndex = TlsAlloc(); } ThreadLocalImpl::~ThreadLocalImpl() { TlsFree(mIndex); } void ThreadLocalImpl::setValue(void* ...
aa923ee13a8be668a479d5284b91bf5f08f75f78
41597aa81b2b6f709ead83e5da0743d2f346b1f5
riyadparvez/Delta-Atomicity-Calculator
/intel tbb/FileReader.hpp
C++
hpp
852
no_license
#ifndef FILEREADER_H #define FILEREADER_H #include <boost/algorithm/string.hpp> #include <iostream> // std::ios, std::istream, std::cout #include <fstream> #include <istream> #include <string> #include <vector> #include "tbb/concurrent_vector.h" class FileReader { public: FileReader(std::string filePath) :fi...
6bf4c0dca7d0d521e0ccdb62b206c2cfb4414068
239597ef3df0a92b0fc8bb3f79c9ad4db5ab5656
sidharth2189/CPP
/class/pyramid.cpp
C++
cpp
1,172
no_license
#include <cassert> #include <iostream> #include <math.h> using std::cout; class Pyramid{ public: Pyramid(int length, int width, int height) { Length(length); Width(width); Height(height); } // Get functions int Length() const { return length_;} int Width() const { retur...
061fe19b8e351f91dcc9c7f7e69e6732cfffc912
a54eda2326534ecc046ac3bdfa0026256d00bf18
cswangle/SwitchedConvolutions
/cuda/switched_conv_cuda_naive.cpp
C++
cpp
2,439
permissive
#include <torch/extension.h> #include <vector> using namespace std; torch::Tensor switched_conv_cuda_forward(torch::Tensor x, torch::Tensor mask, torch::Tensor kernel, torch::Tensor bias, int stride); vector<torch::Tensor> switched_conv_cuda_backward(torch::Tensor x, torch::Tensor x_grad, torch::Tensor mask, torch::T...
58fd04e64c3cee654c7f9fc60c10fee8b19fe726
9ba063739e9af0d68510140e0167fbab02ce1677
SaashaJoshi/Python
/AI/Tictactoe Magic Square.cpp
C++
cpp
6,033
no_license
#include<iostream> using namespace std; int board[9]; int turn = 1; int m[9]={8,3,4,1,5,9,6,7,2}; void user_move(){ int move; cout << "Enter Your Move\n"; cin >> move; if((move > 9) || (move < 1) || (board[move - 1] != 2)){ cout << "INVALID...ENTER AGAIN\n"; user_move(); } else{ board[mov...
37d62e32f617450b6d0dde7b8cb500e9b8b3328b
732408c8cb2bbbd3db4fee227ec3ce5c46d23e4c
hewenhao2008/miniVPN-multi-client-supporting
/serv.cpp
C++
cpp
6,102
no_license
/* serv.cpp - Minimal ssleay server for Unix 30.9.1996, Sampo Kellomaki <sampo@iki.fi> */ /* mangled to work with SSLeay-0.9.0b and OpenSSL 0.9.2b Simplified to be even more minimal 12/98 - 4/99 Wade Scholine <wades@mail.cybg.com> */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <str...
414ab33f4d418c7ceb5beb915ee746a21dead045
0cbe930b66706bc76b3f5392750d23575764fabd
AndressaUmetsu/IA
/sat/SA/main.cpp
C++
cpp
1,823
permissive
#include "sa.h" #include "readFile.h" #include "media.h" #include <sys/time.h> void TestIn(); double Test(string filename, string name); void Print(); int main(int argc, char const *argv[]) { long seed = time(NULL); srand(seed); TestIn(); //Print(); return 0; } void Print(){ Info info; string filename = "i...
70c3fcaedfbae2693d2ac661d1ea7fbd12fa45de
5d5bb51535ff1908f83d22b2efc9bf454e7b762d
SingularInversions/FaceGenBaseLibrary
/source/LibFgWin/FgGuiWinSplit.cpp
C++
cpp
7,633
permissive
// // Copyright (c) 2023 Singular Inversions Inc. (facegen.com) // Use, modification and distribution is subject to the MIT License, // see accompanying file LICENSE.txt or facegen.com/base_library_license.txt // // #include "stdafx.h" #include "FgGuiApi.hpp" #include "FgGuiWin.hpp" #include "FgThrowWindow...
952ab9fef0707333c0fef1f0bd9328da568d6fe4
1c45009402da5828d84f308c0f35592f4034cf3b
namnguyen2909/DoHoa
/CODE/VD/VD1.4.cpp
C++
cpp
995
no_license
//Ve diem anh tai vi tri nhan phim trai chuot #include <windows.h> #include <math.h> #include <glut.h> #include <gl/gl.h> void myDisplay(void) { glClear(GL_COLOR_BUFFER_BIT); glFlush(); } void myMouse(int button, int state, int x, int y) { int yy; yy = glutGet(GLUT_WINDOW_HEIGHT); y = yy - y; /* In Glut, Y coordi...
8b5bfda79f9b8fcdf45b7be6ee7a88020cc93a20
8bc1e7806d095dc1671dc8415ea787ff7d8cbfe9
rdrgjmantovani/asteroid-clone
/Core/CircleCollision.hpp
C++
hpp
788
no_license
#pragma once #include <SFML/Graphics/Sprite.hpp> #include <cmath> #if _DEBUG #include <SFML/Graphics/CircleShape.hpp> #endif class CircleCollision { public: CircleCollision(int radius = 10); ~CircleCollision() = default; CircleCollision(const CircleCollision&) = delete; CircleCollision& operator=...
4f3199780daefa88e59b517481cadea8562cfead
e0752774a67de9e306a6e9b7686703dc16b8a724
xiangyu-97/leetcode
/leetcode-33_搜索旋转数组(二分法).cpp
C++
cpp
1,038
no_license
class Solution { public: int search(vector<int>& nums, int target) { int index = 0; int n = nums.size(); if ( n == 1 ) { if ( target == nums[0]) { return 0; } else { return -1; } } int l = 0...
c642a21d6ef3868f81dffd3165412651897fa553
5e5516329e7f6b1541eadceb886c1b7a809c906e
j-tooyoung/leetcode-cpp
/weekcontest/week226/lc5665.cpp
C++
cpp
1,250
no_license
// // Created by tooyoung on 2021/1/31. // #include "bits/stdc++.h" using namespace std; class Solution { public: vector<int> restoreArray(vector<vector<int>>& adjacentPairs) { vector<int> res; int n = adjacentPairs.size(); unordered_map<int, int> map; unordered_map<int, vector<in...
347ef53e1659bded17e010d49e5e604617b8d468
fcd237d61d31884e442da479baf714d18e93370b
nasosev/SheafSystemTest
/fiber_bundles_test/base_spaces/scalable_point_block_2d.t.cc
C++
cc
2,788
no_license
// // Copyright (c) 2013 Limit Point Systems, Inc. // // 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 ...
57ecb9ff761734de686c9169f6e7f69bd6839e18
04681304e7eae91299fb2e028827b9557245961c
donnadionne/grpc
/src/core/lib/slice/slice_intern.cc
C++
cc
13,639
permissive
/* * * Copyright 2016 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...
338f1c2dc22e9a86f8472847cec04161159c0352
b3cb589e7bbcb5bf706408f991df7827b9199ca9
openucx/ucx
/test/gtest/ucp/test_ucp_perf.cc
C++
cc
16,623
permissive
/** * Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2014. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * Copyright (C) ARM Ltd. 2020. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #include "ucp_test.h" #include <common/test_perf.h> #include <ucp/core/ucp_types.h> ...
c838f1307f79a447d129150420860b4b806ebc92
e1035f9cc44393fec5dddff94e8a91bfa61457cb
zk2013/SoT-SDK
/SDK/SoT_BP_PirateLord_ShoresOfGold_classes.hpp
C++
hpp
2,036
no_license
#pragma once // Sea of Thieves (2.0) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_BP_PirateLord_ShoresOfGold_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //-------------------------------------------------------------------...
05e9a3cc71987370d3d091df1bf2d643fc3ad3c5
d34a51f71ed8b829a183a9ab70078407133fcbbe
major-winter/c-_tic_tac_toe
/main.cpp
C++
cpp
3,922
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; char board[3][3]{{'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'}}; void player1st_move(vector<int> &moves); void player2nd_move(vector<int> &moves); int check_win(); int check_row(); int check_col(); int check_diagonal(); void draw_boar...
430f5d916ad18ad7abc784cea3bdb3e3df660739
59b873aa782cd73e16523113f02d6354d895e878
GonzaloHernandez/cpfloat-gecode
/tests/sinxcosx.cpp
C++
cpp
2,069
no_license
/* * Authors: * Gonzalo Hernández <gonzalohernandez@udenar.edu.co> * Gustavo Gutierrez * * Year of last major update * 2011 * * This file is a complement of Gecode, the generic constraint * development environment: * http://www.gecode.org * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT W...
bb666efb46f5cc875924a08182c6212aa84548f5
8da3c169f720c9c6afee96a1c94bd416957378ec
kop3una/KSIS_lab3
/TCP/ECHO-TCP-SERVER/Server/Server.cpp
C++
cpp
2,574
no_license
#include "pch.h" #define _CRT_SECURE_NO_WARNINGS #include <iostream> #pragma comment(lib, "ws2_32.lib") #include <Windows.h> #include <conio.h> #include <time.h> using namespace std; #define ECHO_PORT 7 DWORD WINAPI WorkWithClient(LPVOID client_socket); DWORD WINAPI CheckCommonBuffer(LPVOID client_socket); int n...
d8b434b804255f56c24f8e613e689ebe65e2237e
f2e294a523e0a589c470de00e68dfaacf6937cdb
nalingoyal094/May-LeetCoding-Challenge-2021
/To Lower Case.cpp
C++
cpp
267
no_license
class Solution { public: string toLowerCase(string s) { for(int i=0;i<s.size();i++) { if (int(s[i]>=65 && int(s[i])<=90)) { s[i]=s[i]+32; } } return s; } };
12d3f069449f5027d260ac2ffada1d7e7c21ae0d
b77d688a6676b16048fe03427647cde049575c62
cryptolog/mygulfcoin-master
/src/main.cpp
C++
cpp
129,386
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 "alert.h" #include "checkpoints.h" #include "db.h" #include "txdb.h" #inc...
1b573895982200ab935f9e40b2642e46156804ad
7d05bce125a4818d550530fb0e4b16a8db4333b2
NathPrz/Intro-Cpp
/tinycar/mission5/question4.cpp
C++
cpp
2,800
no_license
//Programme pour gérer un panier #include <iostream> #include <string> using namespace std; //Fonction qui calcule et rajoute la TVA pour chaque accesoire. double calculePrixTTC(double prixHT) { double tva = 0.2; return prixHT * (1 + tva); } //Fonction qui affiche les éléments des differents tableaux. void af...
21e2c65c73f08a9cca0de114a9e66e69d5254a69
e57d4a67c0dea3eb3801a62582984ee782cc94f0
F-Burning/tahoma2d
/toonz/sources/toonz/lipsyncpopup.cpp
C++
cpp
33,333
permissive
#include "lipsyncpopup.h" // Tnz6 includes #include "tapp.h" #include "iocommand.h" #include "menubarcommandids.h" // TnzQt includes #include "toonzqt/menubarcommand.h" #include "toonzqt/icongenerator.h" // TnzLib includes #include "toonz/toonzscene.h" #include "toonz/txsheet.h" #include "toonz/tscenehandle.h" #in...
247bf71d9c41ebd2625f3abd84c16823f5e32c41
bfb9ae0d7dad0a95fc1a2400250cdfcd9bc17631
AlaskaJoslin/client-server
/basic/asio/ssl/detail/openssl_types.hpp
C++
hpp
815
no_license
// // ssl/detail/openssl_types.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef ASI...
86e30f71366489703a727eff6141056c0ede3b6e
8f323d0f4ca3191388e5481caa85294b3434e754
hitanvil/tce
/tce/src/tools/Reversible.hh
C++
hh
2,374
permissive
/* Copyright (c) 2002-2014 Tampere University. This file is part of TTA-Based Codesign Environment (TCE). 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, ...
d530044e521667b25a395930f00475c89ef5f584
19bc5a058aa63530d5b47c2ae98a32b048d424bc
gsm1011/fall-2010
/fall-2010/data_mining/proj1/GeneFeatureItem.cpp
C++
cpp
348
no_license
#include "GeneFeatureItem.h" // Constructor. GeneFeatureItem::GeneFeatureItem(gene_feature_t g_f, gene_class_t g_c) { g_feature = g_f; g_class = g_c; g_group = 'u'; // unknow group. } // Overloading << operator. ostream& operator<<(ostream& out, GeneFeatureItem const& item) { out << item.getGroup();...
df631efa42dffd95c865c1b03449fc312eadc9ba
9b263ea0f32e2677dc6d168fb5864d04ba9d8fdb
fujicoin/fujicoin-0.21.0
/src/rpc/misc.cpp
C++
cpp
32,182
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2020 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 <httpserver.h> #include <index/blockfilterindex.h> #include <index/txindex.h>...
0609843e59619c5ecfe6aa69cc213c2bf1cfb8fb
b8ea5f359474b11de4494bebb24833ad5129de75
alirezafour/practice
/cpp/Design_Pattern/Observer/src/ConsoleListener.cpp
C++
cpp
481
no_license
// // Created by alireza on 6/27/17. // #include "ConsoleListener.h" void ConsoleListener::personChanged(Person &p, const std::string &property_name, const boost::any new_value) { std::cout << "person's" << property_name << " has been changed to "; if (property_name == "age") { std::cout << boost:...
f8f36cad59aca7d0486ee454aad61e82baf3d300
d024b6f3c849331e09f98e65b3ddfb47870f3d52
zeienko-vitalii/se-cpp
/shazhko-artem/src/shazhko03/CWheel.cpp
C++
cpp
1,883
permissive
/** * @file CWheel.cpp * @brief Содержит реализацию класса CWheel * @author Shazhko Artem * @version 0 * @date 03.10.17 */ #include "CWheel.h" #define _USE_MATH_DEFINES // for C++ #include <cmath> #include "CWheel.h" CWheel::CWheel() : diameter(0), width(0), units(EUNITS_CENTIMETERS) { } CWheel::CW...
610af11ead57f091c07e79ddda66b9e632fc7588
33c451afa5d12bc461446e7ca24f7466c2920e56
DQSSSSS/Algorithm-Competition-Code
/CF/126B.cpp
C++
cpp
1,411
no_license
#include<bits/stdc++.h> using namespace std; typedef long long LL; typedef long double LD; typedef pair<LL,LL> pii; const int SZ = 1000010; const int INF = 1e9 + 10; const int mod = 1e9 + 7; const LD eps = 1e-8; LL read() { LL n = 0; char a = getchar(); bool flag = 0; while(a > '9' || a < '0') { if(a ...
1e799fa7a8ec853e7833b99e6080affc2b598f9c
c1525ed842a4eaf22e0317e7628cd0eeb7866299
Roopam-mishra/CPP_Algorithms_and_Problems
/Algorithm/Segment_Trees/segment_tree_simple_implementation.cpp
C++
cpp
1,361
no_license
// Written By Dheeraj Maurya // Btech student IET CSE (2018 - 2022) // segment tree with range query and range update #include<bits/stdc++.h> using namespace std; typedef int ll; const int N = 10005; ll seg[4*N] , lazy[4*N]; void check(ll v,ll l,ll r){ if(lazy[v]!=-1){ seg[v] = lazy[v]*(r-l+1); if...
af5befdcf325afe13d5568457b48641fbb08f6a0
938c32afc3bd187d2db61edd3945e2980f4ed616
massnetwork/mass-browser
/chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.cc
C++
cc
3,802
permissive
// Copyright (c) 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/policy/user_cloud_policy_token_forwarder.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/...
b62559da1b202c352a3a9683f38728a5c97e3ead
4d362c8ae178c1f1868a049d58798a76647ca467
apache/mesos
/src/examples/test_module.hpp
C++
hpp
2,594
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
86da423f4db69dce75863f3ff4381ba300954d5d
9641624a2630de5b05eb252b32ab7a0fd0728431
handahye/AlgorithmStudy
/BOJ/15683_감시.cpp
C++
cpp
2,104
no_license
#include<iostream> #include<cstring> #include<vector> #include<queue> #include<algorithm> /*15683 감시*/ using namespace std; int map[9][9]; int visit[9][9]; int minN = 987654321; int N, M; vector<pair<int, int>>cctv; int dr[] = { 0,-1,0,1 }; int dc[] = { 1,0,-1,0 }; void mapCopy(int a[][9], int b[][9]) { for (int i = 0...
bc69b2c2cb7477a800a99ae32a860057702b3d56
4e282868ce6f38e0d721e569901211a4bf64f5a8
DrEntropy/ClassyClash
/Character.cpp
C++
cpp
2,126
no_license
#include "raylib.h" #include "Character.h" #include "raymath.h" Vector2 Character::getScreenPos() { return screenPos; } void Character::tick(float deltaTime) { // update worldpos, save previous worldPosLastFrame = worldPos; if(IsKeyDown(KEY_A)) velocity.x -= ...
b8daac3a172ffac3cfeb72e2c0270c895c8def43
f8d921d93902a84b0ae9e11f570c699db3cf0aa1
RachanaRajSunku/Implementation-of-High-Level-Synthesis-Tool
/hlsyn.cpp
C++
cpp
3,612
no_license
#include<iostream> #include<string.h> #include<cstdlib> #include "parse_net.h" #include "verilogfile.h" using namespace std; int main(int argc, char *argv[]) { //Check for commandline arguments //Commandline argument for help if(argc == 2) { if(strcmp(argv[0], "./hlsyn") == 0) //if(strcmp(argv[0], "./src/hl...
8233f280d82eda6e0e256467fcf0db0266bdce96
02d2fcb05a1fce3c799d14f296b4b94fccc722d2
zeta1999/MythEngine
/Projects/myth_shapes/myth_shapes/obb.cpp
C++
cpp
3,017
permissive
#include <myth\debug\assert.h> #include <myth\debug\assertfunctions.h> #include <myth\phys\aabb.h> #include <myth\phys\obb.h> #include <myth\phys\ray.h> #include <myth\phys\sphere.h> using myth::phys::AABB; using myth::phys::Distance; using myth::phys::Distance2; using myth::phys::OBB; using myth::phys::Point; using...
f2a592aec43ae2cddda32f00fe074d679834b086
d9d320dea4cd1742ceead453ed542b150b8b8b00
realm/realm-object-store
/src/impl/realm_coordinator.hpp
C++
hpp
12,093
permissive
//////////////////////////////////////////////////////////////////////////// // // Copyright 2015 Realm Inc. // // 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/li...
68311c6c7d702bbed0ed31d1a5249271382a2eb5
2cb2fb9a04c344d85952b8fad00894a80e26034c
kishore-narendran/EECS221-HighPerformanceComputing
/homework1/parallel-qsort.cc
C++
cc
2,955
no_license
/** * \file parallel-qsort.cc * * \brief Implement your parallel quicksort using OpenMP in this * file, given an initial sequential implementation. */ #include <assert.h> #include <stdio.h> #include <stdlib.h> #include "sort.hh" /** * Pivots the keys of A[0:N-1] around a given pivot value. The number * o...
d1f4922e763f33dcdab2cc59ab01afae1ab893a9
4e101c1d190626322095ebbf32a941c485f0ba04
li5ch/tencentcloud-sdk-cpp
/sms/src/v20190711/model/PullSmsReplyStatusResponse.cpp
C++
cpp
3,552
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
7247f6a7447f2b088ae53cc7b2f0d8f79397792f
97b7efcd0950c1631740c7d52bb82b0cd1fab7a4
matteosan1/cmssw
/HLTrigger/HLTfilters/src/HLTSmartSinglet.cc
C++
cc
2,999
no_license
/** \class HLTSmartSinglet * * See header file for documentation * * $Date: 2012/02/23 12:21:51 $ * $Revision: 1.12 $ * * \author Martin Grunewald * */ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "HLTrigger/HLTfilters/interface/HLTSmartSinglet.h" #include "DataFormats/Common/interface...
7da6a3e99af5dc12c1d594e7ee8fbd1ddcdc8ada
d48bbe3cf6f99cfa3cb9108dd7c45f01dca6e5aa
BackupTheBerlios/v-q-svn
/trunk/base/qmailvqd/qmail_mrh_rm.cc
C++
cc
2,586
no_license
/* Virtual Qmail (http://v-q.foo-baz.com) Copyright (C) 2002-2005 Pawel Niewiadomski (new@foo-baz.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your opt...
d7240fb8f4289fdc10245eaf958afa301f4a468e
c7fe402df6b66285607bd5a7f13d8783b3a467d4
joonhwan/study
/qt/QtMoreActiveX/WDispatchDriver.cpp
C++
cpp
26,843
no_license
#include "WDispatchDriver.h" #include <qaxtypes.h> WDispatchInfo::WDispatchInfo() { m_dispID = 0; m_bstrName = NULL; m_wFlag = 0; m_oVft = -1; m_callconv = CC_STDCALL; m_vtOutputType = VT_EMPTY; m_pOutput = NULL; m_nParamCount = 0; m_pParamTypes = NULL; } WDispatchInfo::~WDispatchInfo() { if(m_bstrName!=NUL...
a91821c81de5e43db9d98d5975da8536dafc1cc3
87bd3f545d025e767fb9eb5c629ce40e06cd90d5
afarnudi/Corona_Structure_anlysis
/source/Circle_mask_gen.cpp
C++
cpp
1,341
no_license
// // sphere_mask_gen.cpp // Mahmoudi Image Processing // // Created by Ali Farnudi on 19/05/2018. // Copyright © 2018 Ali FarnudiSUT. All rights reserved. // #include "sphere_mask_gen.hpp" void circle_mask_generator(vector<vector<int> > &circle_mask, int circle_radius){ vector<int> temp_coordinate; temp_...