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
6154f064954298e628b838a20648f6f80b9c7ff2
73d10ac101867897504dc2655a5c8460fb3584c0
AkiLotus/AkikazeCP
/Vault/Codeforces Gyms-VPs/April Fools Day Contest 2016/G.cpp
C++
cpp
2,232
no_license
/** Template by proptit_4t41 Applied for C++11/C++14 Add -std=c++14 to your IDE. **/ #include <bits/stdc++.h> using namespace std; #define endl '\n' #define i64 long long #define u64 unsigned long long #define ld long double #define pub push_back #define puf push_front #define pob pop_back #define pof pop_front #d...
7608d99d5c15af405b00d7760d6b47093c0918ca
fc61368f7d3f521ae79aae9025009fc984401503
metux/chromium-suckless
/third_party/WebKit/Source/core/css/invalidation/InvalidationSetTest.cpp
C++
cpp
2,224
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "core/css/invalidation/InvalidationSet.h" #include "testing/gtest/include/gtest/gtest.h" namespace blink { // Once we setWholeSubtreeInvalid, ...
d9181e0a855477c9bc3078c4731af2e7274cd034
f2944791f64c67ce24a055b31b523332558ff867
pollodimodena95/Project_d-d
/Dnd_Project/Intermediate/Build/Win64/UE4Editor/Inc/Dnd_Project/Dnd_Project.init.gen.cpp
C++
cpp
1,083
no_license
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ==============================================================...
1a60d4bf3d7b2702de611d10f7c8a5bedadba59e
29058d27d51b5899818f825ed1e0d5ea10d668a0
15831944/PHStart
/Win32/NXOPEN/NXOpen/Features_HoodVisibilityBuilder.hxx
C++
hxx
4,454
no_license
#ifndef NXOpen_FEATURES_HOODVISIBILITYBUILDER_HXX_INCLUDED #define NXOpen_FEATURES_HOODVISIBILITYBUILDER_HXX_INCLUDED //-------------------------------------------------------------------------- // Header for C++ interface to JA API //-------------------------------------------------------------------------- // // So...
a82e77f5d3c4318b1fe0979681662ea7fc72d0bd
7275c3dcad3df15f5b93641fd9fad38da09a4300
lectureStudio/avdev
/avdev-jni/src/main/cpp/src/JNI_VideoDeviceManager.cpp
C++
cpp
1,694
permissive
#include "AVdevException.h" #include "JNI_AVdevContext.h" #include "JNI_VideoDeviceManager.h" #include "api/VideoCaptureDevice.h" #include "JavaArrayList.h" #include "JavaRef.h" #include "JavaRuntimeException.h" #include "VideoManager.h" #include "VideoCaptureDevice.h" using namespace avdev; JNIEXPORT jobject JNICALL...
ba3f589493b45cd72c647d063ce8d631ea7de355
186f28e7004d98064f6da59033f38dbdc7668a9f
gem-sw/cmssw
/DQM/DTMonitorModule/src/DTNoiseTask.cc
C++
cc
11,700
no_license
/* * See header file for a description of this class. * * $Date: 2011/06/10 13:23:26 $ * $Revision: 1.20 $ * \authors G. Mila , G. Cerminara - INFN Torino */ #include "DTNoiseTask.h" // Framework #include "FWCore/Framework/interface/Event.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include ...
7dc502a3b4520ff7c3b2d469c05618413eff6e68
2f4942d55bce038911a744485b42e28564410ea7
Dwood15/Chimera
/client/interpolation/widget.cpp
C++
cpp
3,197
permissive
#include <math.h> #include <string.h> #include "../../math/data_types.h" #include "../halo_data/table.h" #include "widget.h" extern interpolate_vector_fn interpolate_vector_objects; struct AntennaVertex { Vector3D position; Vector3D velocity; float scale; uint32_t counter; }; struct Antenna { uin...
9e5ce085e6a770382f03451f9a7ad125c7e4522d
eb92fc437020bc4f07b75e1ba04766899edaa62b
Koweiyi/LC_cpp
/405.数字转换为十六进制数.cpp
C++
cpp
1,444
no_license
/* * @lc app=leetcode.cn id=405 lang=cpp * * [405] 数字转换为十六进制数 * * https://leetcode-cn.com/problems/convert-a-number-to-hexadecimal/description/ * * algorithms * Easy (50.46%) * Likes: 70 * Dislikes: 0 * Total Accepted: 11.4K * Total Submissions: 22.6K * Testcase Example: '26' * * 给定一个整数,编写一个算法将这个数...
361f40d9e5b000db3ebe84a9e397d6d0b90ad725
7118431bd52107c0891aedb32b08ff287515586a
kajalpunia/LeetCode
/Max_Product_Of_3_Numbers.cpp
C++
cpp
336
no_license
class Solution { public: int maximumProduct(vector<int>& nums) { sort(nums.begin(),nums.end()); if(nums.size()<3) return 0; int n = nums.size(); int m = nums[n-1]*nums[n-2]*nums[n-3]; int l = nums[n-1]*nums[1]*nums[0]; return max(...
063b4c61911f65aa2d63ddb3338fda1819a1171d
45cf59ac1eda590951e1795b55bd276f3bf27a8b
NickDennis2580/Cpp-Practice
/mergeTwoLinkedLists.cpp
C++
cpp
1,533
no_license
// Definition for singly-linked list: // template<typename T> // struct ListNode { // ListNode(const T &v) : value(v), next(nullptr) {} // T value; // ListNode *next; // }; // ListNode<int> * mergeTwoLinkedLists(ListNode<int> * l1, ListNode<int> * l2) { // Check to see which is the lower of the two l...
3adba939e0662991f13488cb41262e7d42856c6d
974eb95f4e2ac0efa217091ad68f1a3e1cb56c85
liquanhai/cxm-hitech-matrix428
/硬件仿真测试环境合集版17_加入16位CRC校验/MatrixTestSoft/MatrixTestSoft/HeartBeatThread.cpp
C++
cpp
4,466
no_license
// HeartBeatThread.cpp : 实现文件 // #include "stdafx.h" #include "MatrixTestSoft.h" #include "HeartBeatThread.h" #include "Parameter.h" // CHeartBeatThread IMPLEMENT_DYNCREATE(CHeartBeatThread, CWinThread) CHeartBeatThread::CHeartBeatThread() : m_bclose(false) , m_uiSendPort(0) { } CHeartBeatThread:...
14059867d43519218e6e32719ad819a4dbb69b66
e2518ab4c6cd229f6f1fda3cbaaae413aa84bb3c
adam-rumpf/social-transit-solver
/search_common.cpp
C++
cpp
2,363
permissive
/// Functions common to all search and logger classes. #include "search.hpp" /** Reads the initial solution vector and objective value from the initial solution log file. Returns a pair consisting of the initial fleet size vector along with its objective value, respectively. Normally the current and best solutions ...
7b4ea41d2f6390563f6b33a858eb47cb8c45e660
0db0a4b9e5528a4266ebad80fb2ecf4bf87f14be
terz99/course-oop-ii
/a4/p4/testAccess.cpp
C++
cpp
887
no_license
/* CH08-320143 a4 p4.cpp Dushan Terzikj d.terzikj@jacobs-university.de */ #include <bits/stdc++.h> #include "Access.h" using namespace std; int main(){ Access access; access.activate(123456); access.activate(999999); access.activate(187692); unsigned long code; while(true){ cout ...
1ce58ee8bc72e1644b5de7810f2e810c2296ef52
e6a778113d23a2a819fc60724a09525de9f6604a
ManasviGoyal/Competitive-Programming
/Shake Shake Shaky.cpp
C++
cpp
1,240
no_license
#include<bits/stdc++.h> using namespace std; #define lli long long int lli bin_search(lli*, lli,lli, lli, lli); int f(lli*, lli, lli, lli); int main() { lli t,n,k,i,*arr,max,a; cin>>t; while(t--) { cin>>n>>k; arr = new lli[n]; cin>>arr[0]; max = arr[0]; f...
c1af249e07bd77d66a97c9406fd9218723986952
08d98de3d09fd7b629888f85a4d6075e0ed0b4ea
WhiZTiM/coliru
/Archive2/87/3629394d0ae5c2/main.cpp
C++
cpp
599
no_license
#include <cstdio> #include <vector> #include <string> #include <functional> #include <iostream> int main() { typedef std::string T; typedef std::reference_wrapper<T> RefT; std::string t0 = "Hi"; std::string t1 = "Hello"; std::string t2 = "Bye!"; std::vector<RefT> v; ...
6d370be12f0b3b2e2a0673b6e36aab887671444b
a6069957628a3a7d34dede802e4c8de7ce7802c2
ChefSemiColon/Set091221
/lib/sfml/src/SFML/Window/SensorManager.cpp
C++
cpp
3,674
permissive
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2021 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages a...
5daa54197591a3e7dcc601d81e7292a348053729
f0daca1d6a6445c6b9f44fd2e8dcacb4016faa25
willrebuild/flyffsf
/SRC/OFFI SRC!/boost_1_34_1/boost_1_34_1/libs/spirit/test/symbols_add_null.cpp
C++
cpp
1,841
permissive
/*============================================================================= Copyright (c) 2004 Joao Abecasis http://spirit.sourceforge.net/ Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://ww...
803cfb98e96f8f741955b830d7f5408cb6ea0601
771106e41e78f51fd2f4eec4ba23c376c647fe87
Mohib04/Competitive-Programming
/Algo_DS_Code_Library/01/LOJ/1406 - Assassin`s Creed.cpp
C++
cpp
1,450
no_license
int setBit(int mask, int pos) { return mask | (1 << pos) ; } int togBit(int mask, int pos) { return mask ^ (1 << pos) ; } int chkBit(int mask, int pos) { return mask & (1 << pos) ; } int n,m, target; vii graph[17]; int dp[1 << 16]; bool graphMat[17][17]; void printBin(int n) { if(!n) return; printBin(n>>1); ...
5550247b39374dd50098e16a0d2b9db3be3ae52e
b5c2a4c3aed967cc886eae576fa74b0cd49458b9
ovr/hlvm-cpp
/main.cpp
C++
cpp
3,294
no_license
#include <llvm/Support/TargetSelect.h> #include <llvm/Support/Printable.h> #include <llvm/IR/LLVMContext.h> #include <llvm/IR/Module.h> #include <llvm/IR/Constants.h> #include <llvm/IR/Instructions.h> #include <llvm/IR/Verifier.h> #include <llvm/ADT/APInt.h> // Main Execute Class #include <llvm/ExecutionEngine/Execu...
45ee74304f02259dc9292ccf57194e67c1e9c5da
81850dd3b275556bdfe503a7ed7eb02beb3d6426
randboy/BAYEMCOIN
/src/qt/optionsmodel.cpp
C++
cpp
18,216
permissive
// Copyright (c) 2011-2016 The Bitcoin Core developers // Copyright (c) 2017 The Ravencoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/bayemcoin-config.h" #endif #...
5e02639919401bd53955d433eec75273e573e4ca
f113ed855c38c190dcc52f59dfd85d1b7bf15a0e
eleval/Half-Life-VR
/common/glm/gtc/quaternion.hpp
C++
hpp
14,163
no_license
/// @ref gtc_quaternion /// @file glm/gtc/quaternion.hpp /// /// @see core (dependence) /// @see gtc_constants (dependence) /// /// @defgroup gtc_quaternion GLM_GTC_quaternion /// @ingroup gtc /// /// Include <glm/gtc/quaternion.hpp> to use the features of this extension. /// /// Defines a templated quaterni...
8e340ba5f9b77a7fbf9fff4af64c3473ff04ba93
f99b96c1cdca7fe21252b5ce66443e659e6e889f
seanho00/twu
/09spr/cmpt166/examples/Sierpinski/SierpinskiUI.cxx
C++
cxx
1,082
no_license
// generated by Fast Light User Interface Designer (fluid) version 1.0109 #include "SierpinskiUI.h" static void cb_Quit(Fl_Button*, void*) { exit(0); } int main(int argc, char **argv) { Fl_Double_Window* w; { Fl_Double_Window* o = new Fl_Double_Window(400, 400, "Sierpinski"); w = o; { Fl_Button* o = ne...
e38cecf14d40d6576ab3b8467d91c4effcec305f
b84fd9e783c8b3086491b19851ebe62002525564
maple3142/Practice
/uva11258.cpp
C++
cpp
514
no_license
#include<iostream> #include<cstring> using namespace std; typedef long long int ll; ll ar[205]; int main(void){ ios::sync_with_stdio(false); int T; cin>>T; while(T--){ string s; cin>>s; for(int i=0;i<s.length();i++){ if(s[i]=='0'){ ar[i+1]=max(ar[i+1],ar[i]); } else{ ll x=0; for(int j=i;j...
5713472c6b111885db6f5b343b1427a40bffa168
c794896acfaeea770bc5af74dc34bfaac0dfb7d9
pankajjindal/DailyCoding
/c++/50_questions/greedy_knapsack.cpp
C++
cpp
1,271
no_license
#include <iostream> #include <algorithm> using namespace std; struct Item{ int value, weight; Item(int value, int weight) : value(value), weight(weight) {} }; bool cmp(struct Item a, struct Item b){ double r1 = (double) a.value / a.weight; double r2 = (double) b.value / b.weight; return r1 > r2...
aa862c6c71af6f27bbb7303842d9303e4860cf3d
aa0b7ea8f7e33143c994516b30aa228e4e406e51
AIREL46/SCAO
/C++/intervalle_nex4.cc
C++
cc
337
no_license
#include <iostream> using namespace std; int main() { cout <<"Entrer un reel x : "<<endl; int x; cin >>x; cout <<"x = "<<x<<endl; if ((x>=-10 and x<=-2) or (x>=0 and x<=1) or (x>=2 and x<=3)){ cout <<"x appartient a l'intervalle []"<<endl; } else { cout <<"x n'appartient pas a l'intervalle []"<<endl; ...
3c9276fe497d5b4023fc9593ec221a88aae4bb83
4645a62c0774a2cd973417fad2ec7809b4253515
zlion95/face_recognition
/MFCApplication1/MFCApplication1/NEEDMOREMESSAGE.cpp
C++
cpp
751
no_license
// NEEDMOREMESSAGE.cpp : implementation file // #include "stdafx.h" #include "MFCApplication1.h" #include "NEEDMOREMESSAGE.h" #include "afxdialogex.h" // NEEDMOREMESSAGE dialog IMPLEMENT_DYNAMIC(NEEDMOREMESSAGE, CDialogEx) NEEDMOREMESSAGE::NEEDMOREMESSAGE(CWnd* pParent /*=NULL*/) : CDialogEx(NEEDMOREMESSAGE::IDD,...
cd9acc8fcc843c7e571a220544af9809b0c1e777
47ffd5abca5817375a3181ef2e4279e7c338329c
marshall/webkit_titanium
/WebKit/win/WebDropSource.cpp
C++
cpp
4,063
permissive
/* * Copyright (C) 2007 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions ...
98e126e06280d2736d40597b25877f920508991e
80ee5df4b948e9febdf2c83d72904ff796135a91
barathum000/AMDMIGraphX
/test/api/test_op_construct.cpp
C++
cpp
732
permissive
#include <migraphx/migraphx.h> #include <migraphx/migraphx.hpp> #include "test.hpp" TEST_CASE(add_op) { auto add_op = migraphx::operation("add"); EXPECT(add_op.name() == "add"); } TEST_CASE(reduce_mean_without_quotes) { auto rm = migraphx::operation("reduce_mean", "{axes : [1, 2, 3, 4]}"); EXPECT(rm.n...
9b1260ba8aacd4f4ae97baccd50442b6a3e63db6
79b252bcd8ccb6a8906b60931388bd7fabe7c980
AcademySoftwareFoundation/OpenShadingLanguage
/src/liboslexec/wide/wide_opnoise_periodic_perlin_float.cpp
C++
cpp
1,216
permissive
// Copyright Contributors to the Open Shading Language project. // SPDX-License-Identifier: BSD-3-Clause // https://github.com/AcademySoftwareFoundation/OpenShadingLanguage #ifndef __OSL_USE_REFERENCE_INT_HASH # define __OSL_USE_REFERENCE_INT_HASH 0 #endif #if __OSL_USE_REFERENCE_INT_HASH // incorrect results when ...
62c1cf92c8ebda776500804a33675815cb2d2568
2429e42eed80c66e08c94801d5e85fdadcf3cec8
husarion/Micro-XRCE-DDS-Client
/test/transport/serial_comm/SerialComm.cpp
C++
cpp
5,931
permissive
#include "SerialComm.hpp" #include <stdint.h> #include <unistd.h> #include <fcntl.h> SerialComm::SerialComm() : fd_(-1) { } SerialComm::~SerialComm() { (void) unlink("/tmp/serial_fifo"); } int SerialComm::init() { int rv = 0; (void) unlink("/tmp/serial_fifo"); if (0 < mkfifo("/tmp/serial_fifo", S_I...
6dba63b8deb7db76cfd63eedc01a581d3a3789c4
1eb6e08e2dd23b62c5b06ee32434fce217b60777
MRPT/mrpt
/libs/obs/src/CObservationBeaconRanges.cpp
C++
cpp
5,435
permissive
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Cop...
e86a5b54db0d534879b6867d831249e659952d3f
5b986310605c535cc35e347cddc6373d9b9312a1
alex7alves/Sistemas_de_Tempo_Real
/Trabalho 2.4/Trilhos_treen_beagle.cpp
C++
cpp
5,775
no_license
/* Autor : Alex Alves Thulio Matheus Programa para coordenar ações de treen em trilhos de 1 a 7 onde ambos os treens não podem estar no trilho 3 representados aqui por 3 e 8 para saber de onde vem. ATENÇÃO : A logica do acendimento dos leds esta trocada devido a mon...
f7c99ce2c75efa66b3db69bde41f79b37720d189
6b6fd7a5900bb0b6ccfef6d2df1afe65bafe16d8
thngkaiyuan/chromium
/components/ntp_snippets/remote/remote_suggestions_status_service_unittest.cc
C++
cc
2,762
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/ntp_snippets/remote/remote_suggestions_status_service.h" #include <memory> #include "base/memory/ptr_util.h" #include "components/n...
7cd76ca81f7f7bbbc9403582adc1252e42e08da9
97edb38d50b5c9530f8a0a2ba5f94c778f6b5d97
fishca/tool1cd
/src/SystemClasses/System.cpp
C++
cpp
3,668
permissive
#include "System.hpp" namespace System { bool operator == (const TGUID &a, const TGUID &b) { return a.D1 == b.D1 && a.D2 == b.D2 && a.D3 == b.D3 && a.D4[0] == b.D4[0] && a.D4[1] == b.D4[1] && a.D4[2] == b.D4[2] && a.D4[3] == b.D4[3] && a.D4[4] == b.D4[4] && a.D4[5] == b.D4[5] && a.D4[6] == b.D4[6...
14082406de8bd42fc0ead2aefe22791a9ba0f87f
7bf35d26bfc790ab74613e2a9b48aa4150346367
ucb-bar/chisel2-deprecated
/src/test/resources/NameSuite_DebugComp_1.cpp
C++
cpp
5,862
no_license
#include "NameSuite_DebugComp_1.h" void NameSuite_DebugComp_1_t::init ( val_t rand_init ) { this->__srand(rand_init); NameSuite_DebugComp_1_dpath__wb_reg_ll_wb.randomize(&__rand_seed); clk.len = 1; clk.cnt = 0; clk.values[0] = 0; } int NameSuite_DebugComp_1_t::clock ( dat_t<1> reset ) { uint32_t min = ((ui...
10744f0537820adaed56ab76b6c1feea286ca767
38e8d556bbb5a141f910f51e11938a754f1dfafb
s22047-pj/PJATK-PRG1
/03-loops/s03-echo.cpp
C++
cpp
2,214
no_license
#include <algorithm> #include <iostream> #include <string> #include <vector> /* std::vector<std::string> reverse_vector(std::vector<std::string> vector_to_reverse, int argc) { for (int i = argc-1; i > 0; i--) { vector_to_reverse.push_back(vector_to_reverse[i]); vector_to_reverse.erase(vector_to_rev...
1d2d25eddf99f7c1a4e8e0ca8658196e54196c34
d5f5dfef9a091d9d4b381d75da6e1cecb7546bfc
James-N-M/60-340-Genetic-Algorithm-Project
/main.cxx
C++
cxx
4,631
permissive
//------------------------------------------------------------------------------ // // This program runs a genetic algorithm for computing task/machine // schedules. It is mainly for testing the GA routine on subsequently // larger and larger pool sizes to see how it compares when run // serially vs multithreaded. // ...
3dd903bb1fea9aadb8b93fa0457dbc22b26a74cc
cd7190136cd4851cb7b2feba58113efcc5296fbf
xtblock/chromium
/extensions/browser/content_script_tracker.cc
C++
cc
13,004
permissive
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "extensions/browser/content_script_tracker.h" #include <algorithm> #include <map> #include "base/containers/contains.h" #include "base/logging....
7766d51fe93d6a03a1a089dd2d97c82b3db0a8c3
e74691c3307cf173111f624610c82f7df4dc640a
CU-0xff/juliet-cpp
/000/113/177/CWE762_Mismatched_Memory_Management_Routines__delete_array_char_malloc_54e.cpp
C++
cpp
1,539
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__delete_array_char_malloc_54e.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete_array.label.xml Template File: sources-sinks-54e.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory Managemen...
befd18277aa182daae2ca8cdbdc33aec62778cfd
54ac6895590edc450f6df26148d898a674fb5f35
SiarheiFedartsou/engine
/lib/ui/window/window.cc
C++
cc
8,896
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "flutter/lib/ui/window/window.h" #include "flutter/lib/ui/compositing/scene.h" #include "flutter/lib/ui/ui_dart_state.h" #include "flutter/lib/u...
4b8cebf1c642f9fc0a7f70c332a7cffe553f64bf
c221b56ca8c72158bec12efc68bce4d0b57ce468
Ramys/Hooaahcore
/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
C++
cpp
7,665
no_license
/* * Copyright (C) 2021 Hooaahcore * * 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 * option) any later version. * * This program is distrib...
6049d3da7af03fb1aa7fa07b220c2d034164ed5a
f77ca6ea6e88de083ab83d2d3148a301faf0d656
liuxinglu/pyjieba
/cppjieba_src/include/cppjieba/Utils.hpp
C++
hpp
2,025
permissive
#ifndef CPPJIEBA_UTILS_H #define CPPJIEBA_UTILS_H #include <set> #include "limonp/StringUtil.hpp" namespace cppjieba { using namespace std; class Utils { public: /** 将allowedPOS字符串,转换成set,例如:allowedPOS="vn,n,v,ns" */ static set<string> GetAllowedPOS(const string& allowe...
0c9b1a8cdef56597bf1a80fa7ac7a32dff8b0f86
f92cafaffd92f270c76bbee413d3cb27a1bfe275
imxood/code
/ccxx/XfyunASR.cpp
C++
cpp
7,000
no_license
#include <cpprest/http_client.h> #include <cpprest/filestream.h> #include <cpprest/containerstream.h> #include <utils/LogUtil.h> #include <utils/JsonUtil.h> #include <rapidjson/document.h> #include <rapidjson/prettywriter.h> #include <ctime> #include <cstring> #include <boost/format.hpp> #include <openssl/md5.h> #i...
f4eb3d3daa9c01f76cbf8bdeeaca8ec9c6a1eed6
bdc7e08deb845fc218ca06065c15d7de6c338c69
uniquenightmare/Chat_system
/src/ChatWindow.hpp
C++
hpp
9,368
no_license
#pragma once #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <ncurses.h> #include <pthread.h> #include <vector> #include "ChatClient.hpp" #include "Message.hpp" class ChatWindow; class Param { public: Param(ChatWindow* winp, int threadnum, ChatClient* chatcli) { wi...
099f77a0226c836ac4ce1638291e9bd98e72a27d
929fc380085c40ee8b04330d14fffb2083e80c9b
ende1031/ProjectHaku
/MonsterBullet.cpp
C++
cpp
1,861
no_license
#include "MonsterBullet.h" MonsterBullet::MonsterBullet(Texture texture, Sound* sound, D3DXVECTOR3 pos, float angle) { Start(texture, sound, pos, angle); } MonsterBullet::MonsterBullet(Texture texture, Sound* sound, D3DXVECTOR3 pos, D3DXVECTOR3 target) { Start(texture, sound, pos, target); } MonsterBullet::~Monste...
06dd4241ac62ea4ca7e3c72b7c9eb9ad6bd4082c
324a6a2fc3b478ec6a90f876c30e80fdcb8a265a
yair-k/Win2000SRC
/private/ispu/pkitrust/performance/perftest/perftest.cpp
C++
cpp
6,777
no_license
//+------------------------------------------------------------------------- // // Microsoft Windows // // Copyright (C) Microsoft Corporation, 1996 - 1999 // // File: perftest.cpp // // Contents: performance suite // // History: 04-Dec-1997 pberkman created // //--------------------------------------...
b7e28f7e5a98fdf5a364bab385843f8881c4db80
0091223301a92050eb16632517722a22dbe783ec
apogza/Hex
/hex_board.cpp
C++
cpp
5,024
no_license
#include <iostream> #include <memory> #include <stack> #include "hex_board.h" hex_board::hex_board(short board_size) { this->board_size = board_size; init_nodes(); init_node_neighbours(); } void hex_board::copy_board(shared_ptr<hex_board> b) { if (b->board_size != this->board_size) { ret...
04b93cc3900dc3dd053cf60643f1decff06f26dc
189318937282e1cebc98364886a6d230cdbc1124
flavionm/comp3
/lambda/src/lambda.cpp
C++
cpp
10,506
no_license
#include <iostream> #include <vector> #include <type_traits> class Access { public: Access(int i): i(i) {} template <typename T> auto operator () (T x) -> typename T::value_type { return x[i]; } private: int i; }; class X { public: template <typename T> T operator () (T x) { return x; } Ac...
8f9223ff06d76a0af9cd5b60961390ab1b0fac81
74b07deaf560c27853e482638a9cfadf22e14918
jufusong/BoringLife
/2017-12/2017-12-15 - HackerRank world-codesprint-12/max-transform.cc
C++
cc
4,268
no_license
#include <bits/stdc++.h> struct Matrix { static constexpr int md = 1e9 + 7; int rowCount, columnCount; std::vector<std::vector<int>> a; Matrix(int rowCount, int columnCount) { this->rowCount = rowCount; this->columnCount = columnCount; a.assign(rowCount, std::vector<int>(columnCount)); } Matr...
9eefe3ca9690a0d2a49c6ebb259b78dde2c3c3b8
4cd26bb9b57dfa6bf21429f6c703f6805ceb5796
MisterHLunaticwraith/TGV_Assets
/Functions/cfgfunctions.hpp
C++
hpp
2,297
no_license
class TGV // Defines the "owner" { class TGVDrinks// category { tag = "TGV"; file = "\TGV_Assets\Functions"; class DrinkEffects {}; class MRHInfo {}; }; class TGVVideoFunctions // category { tag = "TGV"; file = "\TGV_Assets\Functions"; class SplashVideoSkippable //class myfunction {}; cla...
6c365cd6fb5b2a308b6bdaec42fa1c6976f60893
1b93e7a3bfc822f48676d811211962ee72df5d8f
Rakib-31/Algorithm
/template.cpp
C++
cpp
665
no_license
#include<bits/stdc++.h> using namespace std; #define Boost ios_base::sync_with_stdio(0); cin.tie(0) #define ll long long #define db double #define fo freopen("output.txt","w",stdout) #define in scanf #define pr printf #define rep(i, n) for(int i = 0; i < (n); i++) #define repset(it, st) for(it = st.begin(); it != st.e...
d165212b01fbb3de57b64e96f969fb7100f04262
54e1550cc07031dc91868423fa4599d97601df2f
corbett5/RAJA
/include/RAJA/util/LocalArray.hpp
C++
hpp
3,676
no_license
/*! ****************************************************************************** * * \file * * \brief Header file for multi-dimensional shared memory tile Views. * ****************************************************************************** */ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
136390f54751c71456ccffdd444d2104d5045e53
c9d532ffe746d29758e9707031df6afcb1c43945
Dwood15/OpenSauce_Upgrade
/OpenSauce/shared/Include/blamlib/Halo1/cutscene/recorded_animations_structures.hpp
C++
hpp
756
no_license
/* Yelo: Open Sauce SDK Halo 1 (CE) Edition See license\OpenSauce\Halo1_CE for specific license information */ #pragma once #include <blamlib/Halo1/cutscene/recorded_animation_playback.hpp> #include <blamlib/Halo1/memory/data.hpp> #include <blamlib/Halo1/units/unit_control.hpp> namespace Yelo { namespace Script...
9f1bc513d0b3c5d96c8a5be7706f1301bd3ef89f
f588c455c66347d63a2201ad876df442fd300fa1
hffelix/csci580
/csci580/csci580/csci580.cpp
C++
cpp
40,962
no_license
#include "stdafx.h" #define GLUT_DISABLE_ATEXIT_HACK #include <stdlib.h> #include <string.h> #include "stdio.h" #include "math.h" #include "../freeglut/include/GL/glut.h" #include "FileReader.h" #include "windows.h" #ifdef _MSC_VER #pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") #endif #if !defi...
efdf3a766b18caab3e0d8d6b8eb31335ab144e21
979efcb1f4b294db953d9f4c82c93f50a4271916
eleonoradgr/CompetitiveProgramming
/testexam/segments.cpp
C++
cpp
2,205
no_license
#include <cmath> #include <vector> #include <iostream> #include <algorithm> // // Created by eleonora on 14/01/21. // template< typename T> void perform_prefix( std::vector<T> &p ){ for(auto i = 1 ; i < p.size(); ++i ){ p[i] = p[i] + p[i-1]; } } template<typename T> struct query{ int l; int r;...
06e69bf65f1fcaab58e85a51f4df9c4b8d98a827
491801f467d264cbbcd393189865e3f2085da67b
Bigcheese/geordi
/prelude/lvalue_rvalue.hpp
C++
hpp
3,800
permissive
// Section/paragraph references refer to N2461. // Some of the tests may fail in the presence of user-defined conversion operators to reference types. // Todo: Maybe add some array/volatile tests. #ifndef LVALUE_RVALUE_HPP #define LVALUE_RVALUE_HPP #include <utility> #ifdef __GXX_EXPERIMENTAL_CXX0X__ #include ...
7a5c32251b8c0af4cac82ab27defda1b29708ed9
115397b037337ed0038f3622d65d292441b5068b
brucewaynebrucewayne/ccapi_cpp
/dependency/asio/asio/src/examples/cpp03/http/server2/request_parser.cpp
C++
cpp
6,363
permissive
// // request_parser.cpp // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2018 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) // #include "../../../../../../../...
bf75daff6cdf299fdcf811ee57a28f908f1c11b9
e3ca6f8bbc5900d6922d9891d66d732b64a86099
phoehne/ZeroMQKit
/ZeroMQKit/ipc_connecter.hpp
C++
hpp
3,513
no_license
/* Copyright (c) 2011 250bpm s.r.o. Copyright (c) 2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; 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;...
aa621287d1ad7e6f1d86a465d42da622b377b40f
7650fc92843b9122b2c0dcd90d089af145e072b0
Sagar73594/C-Tutuorials
/22STL/19Permuations.cpp
C++
cpp
1,264
no_license
#include <bits/stdc++.h> using namespace std; int main() { // just larger from smaller to bigger. // means 123 then 132 then 213 then 231 like this lexicographical order. vector<int> arr{1, 2, 3}; do { for (auto i : arr) cout << i << " "; cout << endl; } while (next...
5801dabcb2667d4f8c870d7298f34e10d278a729
2b0ed75ac619c69cb4486387466017aecee56d51
perrozzi/cmg-cmssw
/RecoMuon/MuonSeedGenerator/src/RPCSeedGenerator.cc
C++
cc
10,719
no_license
// -*- C++ -*- // // Package: RPCSeedGenerator // Class: RPCSeedGenerator // /**\class RPCSeedGenerator RPCSeedGenerator.cc RecoMuon/MuonSeedGenerator/src/RPCSeedGenerator.cc Description: <one line class summary> Implementation: <Notes on implementation> */ // // Original Author: Haiyun Teng // Crea...
ce28128876de6f098ea02f4961b510300792b089
f4742550c1da188027bca18e89a0dbfa3b2a1acf
Revendell/LeetCode
/src/378kth-smallest-element-in-a-sorted-matrix.cpp
C++
cpp
3,878
no_license
#include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; class Solution { public: int kthSmallest(vector<vector<int>>& matrix, int k) { //简化版:pair<int,int>分别是matrix中的横纵坐标,但是因为是自己实现的堆所以性能上不如直接使用priority_queue vector<pair<int,int>> min_heap; int res; ...
0d2b32f2bc8bc736f1935c36a5bbe42deafb47b8
c1e34c1afacac119a4a8b1d83801914319ec24c4
Walkmilton/Software-Design
/Vending Machine/VendorMechanism.cpp
C++
cpp
691
no_license
#include "VendorMechanism.h" #include <iostream> using namespace std; //constructor and destructor VendorMechanism::VendorMechanism() { } VendorMechanism::~VendorMechanism() { } //dispencing a snack void VendorMechanism::dispenceSnack(Snack& snack, MoneyHandler& moneyhandler) { if (snack.getAmmount() > 0) { ...
16f3f955b2eba10d6223e50f4a6e11fa33f4456f
b7fe4a11438a5fe2da0d71d16eb034026d24878d
VivekMargapuri/Image_Analysis
/Image_Analysis/view.cpp
C++
cpp
6,345
no_license
#include <stdio.h> #include <opencv2/opencv.hpp> #include <queue> #include <bits/stdc++.h> #include <sstream> #include <iostream> #include <string> #include "ffill.h" #include "perimeter.h" #include "displays.h" using namespace cv; using namespace std; int main(int argc, char **argv) { if (argc != 7) { ...
344bdf212a5302b279e6adcdbcbaced1eb26432e
e34d0e61d2b4da3591ba44346c31eb855de64d30
CptDD/visual-grasping
/arm_grasps/src/custom_path.cpp
C++
cpp
1,665
no_license
#include <moveit/move_group_interface/move_group.h> #include <moveit/planning_scene_interface/planning_scene_interface.h> #include <moveit_msgs/DisplayRobotState.h> #include <moveit_msgs/DisplayTrajectory.h> #include <moveit_msgs/AttachedCollisionObject.h> #include <moveit_msgs/CollisionObject.h> #include <ros/ros.h...
776e299034ce978e895605550b39c295202373f8
f68aa08b96d92b188b53cd7e02c4fa6cb16d279d
musyoku/slam2d
/run/main.cpp
C++
cpp
19,304
no_license
#include "include.h" #include <iostream> #include <memory> #include <stdio.h> #include <vector> static void glfw_error_callback(int error, const char* description) { fprintf(stderr, "Error %d: %s\n", error, description); } void build_field(slam::environment::Field* field) { float wall_thickness = 0.05; { ...
362d761d0bcd53e00468da9fb33553034fde4605
96d3b7358a6cdb2653b133bf6ad8a515b0e65b3b
jaduwvad/SherLock
/Main/Sort.cpp
C++
cpp
2,137
no_license
#pragma once #include "stdafx.h" #include "Sort.h" IMPLEMENT_DYNAMIC(CSortList, CListCtrl) CSortList::CSortList() : m_bAscend(FALSE) { } CSortList::~CSortList() { } BEGIN_MESSAGE_MAP(CSortList, CListCtrl) ON_NOTIFY_REFLECT(LVN_COLUMNCLICK,&CSortList::OnLvnColumnclick) END_MESSAGE_MAP() void CSortList::OnLvnColum...
4422fee2b052a15be59cdcff039fbe0209f50b65
2e4aa074024020ebddaf2996591d67d23cb0d57f
pathi/robust-homography
/ImageUndistortionDW/UT_imageUndistortion.cpp
C++
cpp
4,396
no_license
#include "UT_imageUndistortion.h" #include "cvxImage.h" #include "cvxRobustHomoImageUndistortion.h" void UTImageUndistortion::testImageCenterUndistortionSimulateImages() { Mat image = cv::imread("testImage\\simulation\\render_chessboard_0.png", 1); assert(!image.empty()); double lambda = -0.003; cv::...
cbc5a2f73fe38841d93ae73266cb5ea8e04ccab5
ce898040c3392797f4ff446ff17cd93468144c56
JuHyeon-Lee/BOJ
/1000-9999/1003.cpp
C++
cpp
327
no_license
#include <iostream> using namespace std; int dp[42]; int fib(int n){ if(n==0||n==2) return 1; if(n==1) return 0; if(dp[n]) return dp[n]; else return dp[n] = fib(n-1) + fib(n-2); } int main(){ int T; scanf("%d", &T); while(T--){ int N; scanf("%d", &N); printf("%d %d\n", fib(N), fib(N+1)); } retu...
df48af6a98cbfa625dcb9d27b0ac79de5e8e488c
509bf9b58323fde0a5873dd186f7d820f8d355dc
Pepsi1x1/runtime
/src/coreclr/src/vm/tieredcompilation.cpp
C++
cpp
36,746
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // =========================================================================== // File: TieredCompilation.CPP // // ===================================================================...
0b3aa9818d6c6de802288d742388f10ad322d29c
887cba105f4dd06056acd9f6d9d359ff8f1df21f
Kopernik999/metticoin2
/src/qt/sendcoinsentry.cpp
C++
cpp
4,617
permissive
// Copyright (c) 2011-2013 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 "sendcoinsentry.h" #include "ui_sendcoinsentry.h" #include "guiutil.h" #include "bitcoinunits.h" #include "addressbo...
acf24e32a72ca342a5837f6de20823710258e330
34ecc8dccd1ad86c58749e1b0deb976f35313aa4
sidharth87/redfox
/harmony/harmony/hir/implementation/ControlFlowGraph.cpp
C++
cpp
7,805
no_license
/*! \file ControlFlowGraph.cpp \date Tuesday November 24, 2009 \author Gregory Diamos <gregory.diamso@gatech.edu> \brief The header file for the ControlFlowGraph class */ // Harmony Includes #include <harmony/hir/interface/ControlFlowGraph.h> #include <harmony/hir/interface/Module.h> // Hydrazine Includes #in...
93b76995316b71d142f542efa65a5a756b75f4d6
d31d8c1fa55446968715dc1a11b5fcbc329f9576
pzelasko/range-v3-snippets
/src/views.cpp
C++
cpp
1,123
permissive
#include <iostream> #include <string> #include <vector> #include <iterator> #include <range/v3/all.hpp> using namespace std; int main() { namespace view = ranges::view; // Unlike std:: algorithms, views are lazily evaluated. // They operate on ranges and return lightweight range objects, // which ca...
e0e46b1f7ddcac7ed18c4226b22228ae3cca3b22
2c2ff4ea57a70dcce0695bd3439310b2edd79991
CU-0xff/juliet-cpp
/000/242/555/CWE762_Mismatched_Memory_Management_Routines__delete_class_realloc_09.cpp
C++
cpp
4,805
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__delete_class_realloc_09.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__delete.label.xml Template File: sources-sinks-09.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory Management Routines ...
bb4f8b591dafaea87563030c5ca88226494efcd9
552be5ca40e68538b504a3cbc1ced9f2d477ce1c
yjhCoder/caculate
/jisuanqi3/jisuanqi3/jisuanqi3Dlg.cpp
C++
cpp
10,048
no_license
// jisuanqi3Dlg.cpp : 实现文件 // #include "stdafx.h" #include "jisuanqi3.h" #include "jisuanqi3Dlg.h" #include "afxdialogex.h" #include <math.h> #ifdef _DEBUG #define new DEBUG_NEW #endif // 用于应用程序“关于”菜单项的 CAboutDlg 对话框 class CAboutDlg : public CDialogEx { public: CAboutDlg(); // 对话框数据 enum { IDD = IDD_ABOUTBOX }...
5250ce9ed7a9d756e3a1dfceec5eda2aabbf5ca2
3aaa384004b579d665656f8636304491303eb1c9
MDE4CPP/MDE4CPP
/src/common/abstractDataTypes/src/abstractDataTypes/Union.hpp
C++
hpp
489
permissive
/* * Union.hpp * * Created on: 12.05.2017 * Author: frbe5612 */ #ifndef ABSTRACTDATATPYES_UNION_HPP #define ABSTRACTDATATPYES_UNION_HPP #include <memory> #include <vector> #include "abstractDataTypes/Bag.hpp" template<class T> class Union : virtual public Bag<T> { public: Union() { } template<cl...
002e41378a3c8363f7cd309d0f7aafbeda59cf56
53e66e567b3ca3f3ea7918256856dbb506034ba0
CodeTest-StudyGroup/Code-Test-Study
/kuyhochung/1. 매주 문제풀이/09주차/2502_떡먹는호랑이.cpp
C++
cpp
681
no_license
#include <iostream> using namespace std; #define MAX_D 31 int fibonacci[MAX_D]; int main() { int D, K; cin >> D >> K; fibonacci[1] = 1; fibonacci[2] = 1; for (int i = 3; i <= D; i++) { fibonacci[i] = fibonacci[i-1] + fibonacci[i-2]; } //teok D = K = fibonacci[D...
082b1ca048e69c86a8b1aa14313ddbe0757e3c0e
7d9c97c47eb888d0e046fe629e117a5c0c1c0d63
kuangyu0801/ScientificVisulization_SS20
/Assignment03/assignment03_Li_Hsu_Hsu/exercise_02.cxx
C++
cxx
6,364
no_license
#include "exercise_02.h" #include "vtkCellData.h" #include "vtkDataObject.h" #include "vtkDoubleArray.h" #include "vtkFloatArray.h" #include "vtkInformation.h" #include "vtkInformationVector.h" #include "vtkObjectFactory.h" #include "vtkPointData.h" #include "vtkPolyData.h" #include "vtkRectilinearGrid.h" #include "vt...
d3e0d03b0c6fbcb4d22e6dce21d5aa20f4bb9151
9e23ae0f3871c0a95ac2dcb12063b12ddaea84df
nguyenlamlll/CaptainAmericaAndTheAvengers
/CaptainAmericaAndTheAvengers/CaptainAmericaStateAttack.cpp
C++
cpp
1,313
permissive
#include "stdafx.h" #include "CaptainAmericaStateAttack.h" #include "CaptainAmericaStateManager.h" #include "TextureManager.h" #include "BulletPool.h" CaptainAmericaStateAttack::CaptainAmericaStateAttack() { } CaptainAmericaStateAttack::~CaptainAmericaStateAttack() { } CaptainAmericaStateAttack::CaptainAmericaStateA...
d8474770f0a2887c428705a2a0724b439fece880
f9aba8c0a5d034f1453e8df205990757b81e0f22
lhy0718/C-language
/C_Codes/1_새싹1.cpp
C++
cpp
406
no_license
#include <stdio.h> int main() { int a, i, j; printf("숫자를 입력 하세요 : "); scanf("%d", &a); if(a<=1 || a>=9) printf("2~8의 정수를 입력하세요."); else { printf("\n%d단 %d단", a, a+1); for(i=1 ; i<10 ; i++) { printf("\n%d * %d = %2d %d * %d = %2d", a, i, a*i, a+1...
a226df61ad8a885dba4c19a79b292184f023e66a
e57f1a5096f54129fefc27e5851fe876a1f98561
Oxydros/HoloTek
/DesktopTek/MainPage.cpp
C++
cpp
8,126
permissive
#include "pch.h" #include "MainPage.h" using namespace winrt; using namespace Windows::UI::Xaml; using namespace Windows::UI::Xaml::Media; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Windows::Media; using namespace Windows::Graphics::Imaging; using namespace ...
2734045caf484ae218897165dad0c2b89d6960d4
876ccf61646f1227e641fba3aa5110722ab74da6
james-kkj/ssw3
/main.cpp
C++
cpp
10,605
no_license
#include <iostream> #include <string> #include <fstream> #include "library.h" using namespace std; int main() { //get resource.dat class library _library; ifstream resourceFile("resource.dat"); if (resourceFile.fail()) { cout << "resource open error." << endl; return 1; } string resourceI...
13ffa137dd23b04b78cf4e9fdb741b8fdd96013a
6a73c4d4901dfbf24243a9a08c86faf600966601
tbgeorge/putty_engine
/Networking/SocketThread.hpp
C++
hpp
3,965
no_license
//================================================================================= // SocketThread.hpp // Author: Tyler George // Date : January 25, 2016 //================================================================================= #pragma once #ifndef __included_SocketThread__ #define __included_SocketThread_...
49e2f15f2bc5197c128f7fc909f15ba72c727c7a
21124417f20d717e865ee1ed1f9c59c022d274b8
compy-art/SoT-SDK
/SDK/SoT_BP_audio_cls_shop_functions.cpp
C++
cpp
725
no_license
// Sea of Thieves (1.4) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_BP_audio_cls_shop_classes.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function...
e4dee7d32622950103a0511653dc6b8cc72e903f
05e675718bca3d81e0efdb37a096396945785e2e
griff613/CSCI2270
/Homework/Assignment7/test.cpp
C++
cpp
654
no_license
#include "MovieTree.hpp" #include <string> #include <fstream> #include <iostream> using namespace std; int main() { MovieTree m; m.addMovie(5,"Enron", 1969, 3.3); m.addMovie(5,"Dogtown", 1969, 3.3); m.addMovie(5,"Dancin'", 1969, 3.3); m.addMovie(5,"Bowling for Columbine", 1969, 3.3); m.addMovie(5,"Taxi to the ...
8f35e112434c7883ee5dd852809a48cd70440a8b
2aa24cef24ace67d04019b9feb2ed1e5940dbc31
ChongJiang/vertica_export
/src/Exportdata.cpp
C++
cpp
25,134
no_license
/* Copyright (c) 2005 - 2011 Vertica, an HP company -*- C++ -*- */ /* * Description: User Defined Transform Function: concurrently exporting data to files. * * Create Date: Dec 15, 2011 */ #include "Vertica.h" #include <sstream> #include <fstream> #include <iconv.h> #include "ProcessLaunchingPlugin.h" using names...
9fdda41742571121b0ae9c04c6117ba51d0ccb15
c4e604a91c260eb38fc985f4b8b8b33f51eea4bc
AnupamDas054/competitve-programming
/codeforces/1079A.cpp
C++
cpp
547
no_license
#include<bits/stdc++.h> using namespace std; int main() { int d,k1;double k; cin>>d>>k; int m2=INT_MIN; map<int ,int>m; map<int,int> :: iterator it; for(int i=0;i<d;i++) { cin>>k1; m[k1]++; } for(it=m.begin();it!=m.end();it++) { int k2=it->second; ...
d2c24c78047634d9482712517479414e4a448f7e
54ec1c11cc2c70a807e3b84169a6267ba4ad3b56
akhikolla/InformationHouse
/GPareto/inst/testfiles/nonDomInd_cpp/nonDomInd_cpp_DeepState_TestHarness.cpp
C++
cpp
892
no_license
// AUTOMATICALLY GENERATED BY RCPPDEEPSTATE PLEASE DO NOT EDIT BY HAND, INSTEAD EDIT // nonDomInd_cpp_DeepState_TestHarness_generation.cpp and nonDomInd_cpp_DeepState_TestHarness_checks.cpp #include <fstream> #include <RInside.h> #include <iostream> #include <RcppDeepState.h> #include <qs.h> #include <DeepState.hpp> ...
dcfeac6e2f7547aeded38fb9a89f49f439c8be9b
2287e03e895cee2f8153f378a2b2f7d1653c48ea
LineageOS/android_external_skia
/tools/viewer/TouchGesture.cpp
C++
cpp
10,215
permissive
/* * Copyright 2010 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <algorithm> #include "TouchGesture.h" #include "SkMatrix.h" #include "SkTime.h" #define DISCRETIZE_TRANSLATE_TO_AVOID_FLICKER true static const SkScalar MAX_FLIN...
3d9e9e05f76457443a9559fe9df37040458ed619
ff02842eb799d0d2765b4ae020349d31462a1d65
Acmenwangtuo/WinterHoliday2021
/2.5zhijianyuan.cpp
C++
cpp
967
no_license
// // Created by 王拓 on 2021/2/5. // #include <iostream> #include <vector> const int N = 200010; using namespace std; #define ll long long int w[N], v[N]; int l[N], r[N]; int cnt[N]; ll sum[N]; int n,m; ll S; ll get(int W) { for (int i = 1; i <= n; i ++ ) if (w[i] >= W) { sum[i] = sum[i ...
7a1d63cb1e2d00108be742851471acb6520545f0
bcfee20129ca2cf92cbeb04be495f9ab06062d7e
KylianVincent/Ski_OpenGL
/teachers/Geometries.hpp
C++
hpp
1,795
no_license
#ifndef GEOMETRIES_HPP #define GEOMETRIES_HPP /**@file * @brief Some useful functions to ease the development. */ // #include "GeometricTransformation.hpp" // #include "Sphere.hpp" // #include "Plane.hpp" #include <vector> #include <utility> #include <glm/glm.hpp> namespace teachers { void getUnitCube(std::vecto...
f7f6f0c27adfe68887761cc8d51626d21d4162d7
cd7e9b669523444e0fa2c55f65bc5407bf6df315
classicsxdx/dankcoin
/src/rpcrawtransaction.cpp
C++
cpp
20,286
permissive
// Copyright (c) 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 <boost/assign/list_of.hpp> #include "base58.h" #include "bitcoinrpc.h" #inclu...
190b0505ddd7272b2eb1ebea4834439268ca55f5
8a248c7c7fc0de7adf4c92446c1c3efd4984ee62
AlexMapley/workstation
/code/cplus/cplusplus_tuts/func_rep.cpp
C++
cpp
277
permissive
// passing parameters by reference #include <iostream> using namespace std; void duplicate (int& a, int& b, int& c) { a*=2; b*=2; c*=2; } int main () { int x=1, y=3, z=7; duplicate (x, y, z); cout << "x=" << x << ", y=" << y << ", z=" << z << '\n'; return 0; }
94b00a36835248ee4964db2e431b8f5e08d45c26
d63d6292d49dc152ce7ebaffe3f9919f0a7f4a6a
d4v33d123/Type3Games
/Type3Engine/window.cpp
C++
cpp
1,523
no_license
#include "window.h" #include "errors.h" namespace T3E { window::window() { } window::~window() { } int window::create(std::string windowName, int screenWidth, int screenHeight, unsigned int currentFlag) { screenHeight_ = screenHeight; screenWidth_ = screenWidth; Uint32 flags = SDL_WINDOW_OPENGL; ...
051a38c7d601f1a2b21910b9111ed850a63a05f6
c20e16af12a48e4a4fc48db3b64741578ac2d530
cqf1991/LeetCode
/AddTwoNumbers___002(AC).cpp
C++
cpp
1,521
permissive
/* Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Output: 7 -> 0 -> 8 */ #include "stdafx.h" #inc...
879c83274f1b6095c6f2a38d14d7798c95b9bc12
dffb6ec17630d0d3d990bc0d3129e06d5745a202
sbconlon/g4-xray-sim
/include/XRayActionInitialization.hh
C++
hh
2,281
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
8373c8e737acbbcc3038cad729f45a5e2360689e
50c251c7a1914bd32cac0f0281dd97249b298739
Petercov/Quiver-Engine
/src/game/server/vehicle_baseserver.cpp
C++
cpp
87,247
no_license
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // //=============================================================================// #include "cbase.h" #include "vcollide_parse.h" #include "vehicle_base.h" #include "npc_vehicledriver.h" #include "in_buttons.h" ...
65ff6240908f13042972b2eee1b4cefdea211172
8ebd4307f346034f16e5a07372cae63919b54331
tmyksj/atcoder
/AtCoder Beginner Contest 184/F - Programming Contest/main.cpp
C++
cpp
1,369
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, t; cin >> n >> t; vector<long long> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector<long long> b((n + 1) / 2); for (int i = 0; i < (n + 1) / 2; i++) { b[i] = a[i]...
38e60bca75876999ada5226dcfd1da9a1e6fbcd9
aefdea1452c6058a6d5f8087323bdb004af0cd1f
holgerschmitz/vlasov-darwin
/helpers/phaseprobe.cpp
C++
cpp
2,085
no_license
#include "filename.h" #include "hdfstream.h" #include "matrix.h" #include <list> #include <fstream> typedef std::pair<int,int> Point; typedef std::list<Point> PointList; void phaseprobe(SimFileName srcname, SimFileName destname, const PointList &vec) { Matrix<double,3> probe; Matrix<double,5> phase; HDFistrea...
766dc7f2647d26f87e672761c9aebf81536b21ad
8769acbc0ec80635264e76639ecf6fa2ff943893
statgen/bamUtil
/src/Revert.cpp
C++
cpp
8,860
no_license
/* * Copyright (C) 2011 Regents of the University of Michigan * * 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 3 of the License, or * (at your option) any later v...
3d7b43fd18f41910d9787e55d981ad47c0580a78
4ac089d72dd70db16c51471f6441d7ddb36cda06
Nauchnik/utils
/MakeHexSolution/main.cpp
C++
cpp
992
no_license
#include <cstdio> #include <stdlib.h> #include <iostream> #include <fstream> #include <string> #include <sstream> using namespace std; const char ch[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; int main( int argc, char **argv ) { ifstream input_file; string str; input_file.open(argv[1...