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
f477d7ccaadf313135ba51e8b24554b0f668d669
d681196fd77a2526f40b21dbee34f1c326e0e69c
BritClousing/EOSAI
/EOSAI/EOSAIAirUnitPathwayData.cpp
C++
cpp
11,960
permissive
#include "stdafx.h" #include "EOSAIAirUnitPathwayData.h" // #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif CAirPathfinderSubPointsList::~CAirPathfinderSubPointsList() { while( m_List.IsEmpty() == FALSE ){ delete m_List.RemoveHead(); } } CEOSAIAirPathfinderMapPoint::~...
579ab4717a84f80093abfe306397982c4e050793
cc24a282123f2cdb092ae89f27883552f1e874ba
tsstss123/code
/pojpass/poj3376_find_palindromes.cpp
C++
cpp
2,240
no_license
/* poj 3376 finding palindromes * Trie + Extend KMP * */ #include <cstdio> #include <cstring> const int MAXN = 2100000; char s0[MAXN], s1[MAXN]; int ext0[MAXN], ext1[MAXN], next[MAXN]; bool is0[MAXN], is1[MAXN]; int bg[MAXN], len[MAXN]; struct Node { int cnt, leaf; int ch[26]; } nd[MAXN]; int nNd; void insert(in...
859189d7e3b516b187675ee7e18646dbf59b5b46
2afbf1b43f1ab8b5955e8b67d9c7f9f534509e9b
Exr0nProjects/learn_cpp
/problems/x_intest/x_main_intest.cpp
C++
cpp
1,465
no_license
/* * Problem intest (spoj/intest) * Create time: Sun 30 Aug 2020 @ 11:26 (PDT) * Accept time: Mon 31 Aug 2020 @ 23:50 (PDT) * */ #include <bits/stdc++.h> #define ll long long #define dl double #define pii pair<int, int> #define pb push_back #define mp make_pair #define f first #define s second #define F(i,b) f...
382307b9b4ca71d6f72e7596096f5b1df28c780d
dc03b4abb8039b47b51e8f721806d6e907f5d51f
Kelvinyu1117/cs-assignments
/CS3103/asg-3/main.cpp
C++
cpp
6,234
no_license
#include <iostream> #include <math.h> #include <unistd.h> #include <pthread.h> #include <time.h> #include <iomanip> #include <semaphore.h> using namespace std; #define M 4 #define N 2 double *generate_frame_vector(int l); struct ConcurrentQueue { double *arr[5]; int head; // points to the first element of th...
e05230e350ccba929c1d8e05a7affe94f475bc3a
6732bc14bf01be2cfc15fd6c2b77c577cc499c3c
Razor-Sec/30-Days-of-Code-Hackerrank
/day7/c++/main.cpp
C++
cpp
225
no_license
#include <bits/stdc++.h> using namespace std; int main() { int array[10000]; int N; cin >> N; for (int i=0; i < N;i++){ cin >> array[i]; } for (int j=N-1;j >= 0; j--) cout << array[j]<<" "; return 0; }
4bc099c0b30bcea5bfebd33151f9dfa4320263ca
4be26c757f3c3c6aa8f09440d02ac4f1b2dca28d
skt041959/cquery
/index_tests/vars/function_param.cc
C++
cc
1,446
permissive
struct Foo; void foo(Foo* p0, Foo* p1) {} /* OUTPUT: { "includes": [], "skipped_by_preprocessor": [], "types": [{ "id": 0, "usr": 15041163540773201510, "detailed_name": "Foo", "short_name": "Foo", "kind": 0, "declarations": ["1:8-1:11|-1|1|4"], "parents": [], "der...
7cc0431faa9e86f2e413dc27219a108e59bd682a
ed3e009cbd983cb16ec33828072366f3d040d9e8
dearbornlavern/darwin
/domains/drone_vision_ui/scene_ui.cpp
C++
cpp
2,345
permissive
// Copyright 2019 The Darwin Neuroevolution Framework 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 ...
3eb1bbb45761b6344e6ed311f0a2313b451e1ccb
31ff99147ed20a76e76f970aa984871caf0c5545
thomasLeMeur/00-piscine-cpp
/j05/ex03/RobotomyRequestForm.hpp
C++
hpp
1,433
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RobotomyRequestForm.hpp :+: :+: :+: ...
ed97c8917ce6973d98293b21b55301c714d8a08e
b926143d8203e950bc0fcb060ed772523f0edc0d
Phiped/Cpp
/lab2/word.cc
C++
cc
584
no_license
#include <string> #include <vector> #include "word.h" using namespace std; Word::Word(const string& w, const vector<string>& t) { word = w; trigrams = t; } string Word::get_word() const { return word; } unsigned int Word::get_matches(const vector<string>& t) const { int matches = 0; unsigned int index = 0; un...
152e2d6cad2bb3b6695088583c8700af3f3ca774
be10a28947524b3529c4446e7ba9434ccd47d010
padadox/leetcode
/contest/105/920_number_of_music_playlists.cpp
C++
cpp
1,634
no_license
// 20181016 19:17 #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <algorithm> #include <numeric> #include <vector> #include <string> #include <set> #include <map> #include <queue> #include <stack> #include <cmath> #include <cstring> #include <unordered_set> #include <unordered_map>...
5c53e85802d0f7718d1fcc2b55e148ec96de11a7
f451317d65ece9aaf9e7efd33d961cc545c29c26
saikpr/short_codes
/cpp/quick_sort.cpp
C++
cpp
1,556
no_license
#include <iostream> #include <algorithm> using namespace std; template <class T,class T_index> T swap (T *arr,T_index elem1, T_index elem2) //swaps two element with elem1 and elem2 index { T temp=arr[elem1]; arr[elem1]=arr[elem2]; arr[elem2]=temp; } template <class T,class T_index> T_index partition( ...
353e3f4fc57a3f6dd40b32333a07611a3cb3ccec
bcf8021bd40e2a352fe478b010821b138a2af292
vigneshjeevanandam/chromium
/content/renderer/render_view_impl.cc
C++
cc
73,376
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 "content/renderer/render_view_impl.h" #include <algorithm> #include <cmath> #include <memory> #include <utility> #include "base/auto_reset....
7b626d90b0d70ab2ecbbbbedc5f1802d308c1bbd
e96544c914ace2f2be3b0c1030daf0b129f4b78a
shbli/Qt-Cocos2d-Game-Engine
/Srcs/action.cpp
C++
cpp
11,641
no_license
#include "Action.h" Action::Action() { targetNode = 0; target = 0; } Action* Action::moveTo(float duration,qreal x,qreal y, effectiveness effectivenessValue) { Action *newAction = new Action; newAction->ActionTypeV = ActionTypeMoveTo; newAction->endValue[0] = x; newAction->endValue[...
6b21efb8508c3d4e4ea292054cdd779c24ea2790
eeceb37be1ebd520171513deb7a3a052c7ae5e53
tanny411/Interview-prep
/Leetcode/Climbing Stairs.cpp
C++
cpp
220
no_license
class Solution { public: int climbStairs(int n) { //fibonacci int a=1,b=1,c=1; for(int i=2;i<=n;i++){ c=a+b; a=b; b=c; } return c; } };
84e36fa6cd95cae3f2dbab5ed9b7ed94c244a030
4b256567239488d5ee3502d954c1280c4ea73520
x1212/godot4pandora
/modules/multiscript/register_types.cpp
C++
cpp
962
permissive
/*************************************************/ /* register_script_types.cpp */ /*************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /*************************************************/ /* ...
26668ef6ac448b200d719e5929acedb26f826dc1
92966d0eb18e4844196599d38f77713a513a9220
xpic-toolchain/xpic_toolchain
/llvm-3.4.2/tools/clang/lib/CodeGen/CGExpr.cpp
C++
cpp
129,648
permissive
//===--- CGExpr.cpp - Emit LLVM Code from Expressions ---------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
af0dac8f1624a52c85c186db26634719f5315206
150722ef0706c657d31f6413e0aa487b8db57755
siglabsoss/s-modem
/soapy/src/test/test_cplx_1.cpp
C++
cpp
3,293
permissive
#include <rapidcheck.h> #include "driver/AirPacket.hpp" // #include "schedule.h" #include <vector> #include <algorithm> #include <iostream> #include <iomanip> #include "cpp_utils.hpp" #include "common/convert.hpp" #include <boost/functional/hash.hpp> #include "cplx.hpp" // instead of including data std::vector<std::...
6c94e02b8ec971d44bfca35caea6c5022fd12b18
d995b99f9a28c1839f883c81a7d955af65d1f967
pcbend/GRUTinizer
/libraries/TGRUTint/TGRUTTypes.cxx
C++
cxx
1,408
no_license
#include "TGRUTTypes.h" std::map<std::string, kDetectorSystems> detector_system_map{ {"Unknown", kDetectorSystems::UNKNOWN_SYSTEM}, {"Sega", kDetectorSystems::SEGA}, {"Gretina", kDetectorSystems::GRETINA}, {"Gretina_Sim", kDetectorSystems::GRETINA_SIM}, {"Bank88", kDet...
f2e9d0b17480524ce758c7faa0537061e2aec56c
ecc3aabcbd4bc22f0a24356de85be82a6ca9abf3
gem-sw/cmssw
/SimTracker/TrackerMaterialAnalysis/plugins/MaterialAccountingGroup.cc
C++
cc
8,443
no_license
#include <sstream> #include <iomanip> #include <string> #include <stdexcept> #include <TFile.h> #include <TH1F.h> #include <TProfile.h> #include <TCanvas.h> #include <TFrame.h> #include "DataFormats/GeometryVector/interface/GlobalPoint.h" #include "DataFormats/Math/interface/Vector3D.h" #include "DetectorDescription/...
d5ad11227fc5be7308d4fc6d659f735bd329a4a9
be193406f6cf41ac3fb523d0553606ed525a5758
lopippo/toppic-suite
/src/topfd/deconv/deconv_process.hpp
C++
hpp
2,249
permissive
//Copyright (c) 2014 - 2019, The Trustees of Indiana University. // //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 a...
d6f1ae5c9635bb7a073f504183c0809206747f46
4e7f452a3adab2f6ad2a1ce0a98c4ad842d35581
ValtoGameEngines/Lumos-Engine
/Lumos/src/Platform/Vulkan/VKRenderer.cpp
C++
cpp
4,931
permissive
#include "lmpch.h" #include "VKRenderer.h" #include "VKDevice.h" #include "VKShader.h" #include "VKDescriptorSet.h" namespace Lumos { namespace Graphics { void VKRenderer::InitInternal() { m_Context = VKContext::Get(); m_RendererTitle = "Vulkan"; VKDevice::Instance(); ...
b24454c77ff9b717e1330536435f2668a29423d8
010f26c99b3245917f55fa4076ae4f77e3e32cbd
akonarsnyker/openthread
/src/core/net/ip6_filter.hpp
C++
hpp
4,544
permissive
/* * Copyright (c) 2016, The OpenThread Authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * notice, this ...
97d44ae9723fc73105958b8d60c247f630a7113f
90ac37414cef2af1d4f0b5502c9050101e530315
salem-w/Undergrad-Projects
/CSE460/Lab7/modserver.cpp
C++
cpp
1,724
no_license
#include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <stdio.h> #include <semaphore.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <iostream> #define SHMSZ 27 #define TEXT_SZ 2048 char SEM_NAME[] = "SEM"; struct ...
d45ff523286299a4f80c579adcc68d9f2414c87d
5178d42ba9655f7f2a4360ab0ccc415082e5f317
greeshma0601/strings
/Count Occurences of Anagrams.cpp
C++
cpp
1,156
no_license
/* Count Occurences of Anagrams Given a word S and a text C. Return the count of the occurences of anagrams of the word in the text. Input: The first line of input contains an integer T denoting the number of test cases. The description of T test cases follows. The first line of each test case contains a text S consis...
3fb31efb343db7f1f95ba5b7a30e0af815b63518
ac77756877f06e906ec3fa921abcd283d4aa423c
xr1s/brush-title
/UVa/11489/main.cc
C++
cc
455
no_license
#include <iostream> #include <string> using namespace std; int T; string N; int main() { N.reserve(1005); cin >> T; for (int cs = 1; cs <= T; ++cs) { int total[3] = {0}; cin >> N; for (char c: N) ++total[(c - '0') % 3]; int ds = total[1] + total[2] * 2; cout << "Case " << cs << ": "; ...
69904fd03b1042f20d960ea078b8fe44abd1695f
7ffb29a74c1f62df22ee85cf7b39c20eb300e717
web3Payne/LeetCode
/SortList.cpp
C++
cpp
1,522
no_license
#include <iostream> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; void des(ListNode* list) { while (list != NULL) { cout<<list->val<<"->"; list = list->next; } cout<<endl; } class Solution { public: ListNode* sort...
f1494b0fc059ce93b1095d055134256c9d1e52f5
ec846167b899deb658bae6f358ea355bb106a3f9
mchensd/Competitive-Programming
/ER39/C.cpp
C++
cpp
499
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define mp make_pair #define pb push_back int main() { #ifdef USE_INPUT_FILE freopen("C.in", "r", stdin); #endif ios::sync_with_stdio(0); string s; cin >> s; char min = 'a'; for (int i=0; i<s.s...
9527c98f29b9669affaad98194f5b6d4f4e62c9a
c1b75577a822397a4bf4e46a841330bcee322475
Naveen110501/Competitive-Programming-using-C
/count of digits.cpp
C++
cpp
314
no_license
#include<iostream> using namespace std; class ob { public: int sum,a; ob() { sum=0; } void add() { while(a!=0) { a=a/10; ++sum; } cout<<"the numbers of digits"<<endl; cout<<sum<<endl; } }; int main() { ob nav; cout<<"enter the digit"; cin>>nav.a; nav.add(); return 0; }
2180edab7e9a4be3fc7c2a30a91038aa0febd5f8
9fb172874f5517ab98d11f0f44edeb1cb97f31fa
litao1009/SimpleRoom
/externals/OCCTLib/inc/TDF_AttributeDelta.hxx
C++
hxx
2,582
no_license
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _TDF_AttributeDelta_HeaderFile #define _TDF...
02f1c2489f6ff5504950ae631c4b28c3848303ce
2a503c51c703a9237ae80579dcc70e06b124159f
EO-Zanzo/SeaOfThieves-Hack
/SDK/SoT_BP_cmn_cannon_ball_01_a_ItemInfo_classes.hpp
C++
hpp
991
no_license
#pragma once // Sea of Thieves (1.2.6) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_BP_cmn_cannon_ball_01_a_ItemInfo_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //-----------------------------------------------------------...
077fe2d0a7dfa3a9111fb41ec2934429f62f02a4
a4b96a3b14fcde949c5136e5d013033993b40172
sebeneyi/cs112
/proj01/PlayList.cpp
C++
cpp
2,659
no_license
/* * PlayList.cpp defines in the PlayList methods. * * Created on: Feb 10, 2019 * Author: ssy3 at Calvin College for CS 112 proj01 */ #include "PlayList.h" #include <fstream> // ifstream #include <cassert> // assert() #include <vector> using namespace std; /* PlayList constructor * @param: fileName, ...
875b9b7a0401e0413930b080227db55bbcedff61
6ce3e4eea2bfe5f3512cbd79cbb6da50686268f5
mansisaksson/Two31
/Two31/Plugins/FMODStudio/Source/FMODStudioEditor/Private/FMODStudioEditorModule.cpp
C++
cpp
30,454
no_license
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2016. #include "FMODStudioEditorPrivatePCH.h" #include "FMODStudioEditorModule.h" #include "FMODStudioModule.h" #include "FMODStudioStyle.h" #include "FMODAudioComponent.h" #include "FMODAssetBroker.h" #include "FMODSettings.h" #include "FMODUtils.h" #include "...
9e032aa8b7476cda3b4b2f0d261331b0b7ade846
5e94c9511a85c1656c76ea99e50a8540711a2398
PR0TEX/SimulationGame_basic
/swiat/elements/Human.cpp
C++
cpp
3,844
no_license
#include <ncurses.h> #include <curses.h> #include <iostream> #include "Human.hpp" #include "World.hpp" #include "Empty.hpp" #include "Plant.hpp" Human::Human(){} Human::Human(World *world,const CORDS position){ this->world=world; this->position=position; initiative=4; power=5; } void Human::action(){ ...
52dd3b2fbfe01b3a18bc3a86efa0905a86b6c9af
8132b9a32e1a4b5d24bce5c4a001eee8402838f3
PayvandH/Tonb
/include/Global_Message.hxx
C++
hxx
1,720
no_license
#pragma once #ifndef _Global_Message_Header #define _Global_Message_Header #include <iostream> #include <sstream> #include <memory> namespace tnbLib { class Global_Message { public: virtual void SendInfo(const std::string& theStream) = 0; virtual void SendWarning(const std::string& theStream) = 0; virtu...
a563cc7d2818e096a6c734a95c655e7a73f10152
1307d7b3e357436d099f78069952d91bb656c6fe
tkrollins/fantasy_tournament
/fantasy_tourn/HarryPotter.hpp
C++
hpp
731
no_license
/********************************************************************* ** Program name:Fantasy Combat ** Author:Trevor Rollins ** Date:11/5/2017 ** Description:This the header file for HaryyPotter class. The HarryPotter class is a derivation of Character. It is used has public attack and defend functions that can be ...
8ce3a332870b34e1983ba9f26aa72db402a74ebd
f47db1614f4427c2adb47e904615f3b4f38e104a
yangjufo/LeetCode
/C++/817. Linked List Components.cpp
C++
cpp
783
no_license
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: int numComponents(ListNode* head, vector<int>& G) { if (G.empty()) return 0; int count = 0;...
3d23eaccfe254ff4bd55604c7e213e3bd3e84c88
847940434fec45abccdc7c42a07b274a4e38fae2
vladfridman/wisey
/tests/TestObjectKindGlobal.cpp
C++
cpp
1,174
no_license
// // TestObjectKindGlobal.cpp // runtests // // Created by Vladimir Fridman on 5/7/18. // Copyright © 2018 Vladimir Fridman. All rights reserved. // // Tests {@link ObjectKindGlobal} // #include <gtest/gtest.h> #include "IRGenerationContext.hpp" #include "ObjectKindGlobal.hpp" using namespace std; using namesp...
3bc7a51bdc92ccb433143e372fc7b694d20d07d2
dc8d4ee3c7f5a340a8b9aacbaaf4f5c96e0a7822
veedee2000/Competitive-Programming
/Leetcode/BST/Range_Sum_BST.cpp
C++
cpp
563
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int ans = 0; int rangeSumBST(TreeNode* root, int L, int R) { dfs(root, L, R); ...
d50d7e3cd469ca0b9515b9661149e5cec84005f1
0cc30bb2ecf670e3b69198cacf6c3324d0d30e68
jaranvil/C-Workspace
/Zombies/Zombies/Driver.cpp
C++
cpp
766
no_license
#include <iostream> #include <conio.h> #include <time.h> #include "City.h" using namespace std; class timer { private: unsigned long begTime; public: void start() { begTime = clock(); } unsigned long elapsedTime() { return ((unsigned long)clock() - begTime) / CLOCKS_PER_SEC; } bool isTimeout(unsigned long...
56d8eb2d204382608e984749d83279bb855ea324
940dfa605be2b71febe907c52a52313ab33cf617
g-akash/spoj_codes
/cycle_in_permutations.cpp
C++
cpp
1,107
no_license
#include <iostream> #include <vector> //#include <unordered_map> #include <string> #include <math.h> //#include <map> #include <queue> #include <stack> #include <algorithm> #include <list> using namespace std; #define ll long long int #define ull unsigned ll #define umm(x,y) unordered_map<x,y > #define mm(x,y) map<x...
e418a3c0911ba6f3038b942619b8d348e26e16cc
e07ec29e0eb4b856d6b786003c3cf68761015625
Yoshi9154/Project-000A
/130317_Project000A_TodoList_CppQt/main.cpp
C++
cpp
229
no_license
#include <QApplication> #include "userdisplay.h" int main(int argc, char *argv[]) { cout << "timer" << endl; QApplication a(argc, argv); UserDisplay w; w.DisplayListItems(); w.show(); return a.exec(); }
dfdaafa50197a07633522a619f6210752a8f9d0e
e51b686a1682615d224f3e4b217c0b77039ed2c5
ldXiao/polyfem
/src/solver/SparseNewtonDescentSolver.hpp
C++
hpp
8,961
permissive
#pragma once #include <polyfem/Common.hpp> #include <polyfem/LinearSolver.hpp> #include <polyfem/NLProblem.hpp> #include <polyfem/MatrixUtils.hpp> #include <polyfem/State.hpp> #include <polyfem/Logger.hpp> #include <igl/Timer.h> #include <igl/line_search.h> #include <cppoptlib/problem.h> #include <cppoptlib/solver...
4f0b2b124e7f0c1f0397b01d6d5a0de4ac0f684d
a5ba5172e59c1ed4ee566a7c5b33f61a9971b002
teamcodebyte/turbo-desktop
/services/network/url_loader.cc
C++
cc
95,815
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/network/url_loader.h" #include <algorithm> #include <limits> #include <string> #include <utility> #include <vector> #include "base/bi...
3055eb573f56ce730eb361d81f18dea665b30e31
9296f61ad38a2e8ea592f6a8336bd00c43fc2832
marko8904/hifi
/libraries/networking/src/AddressManager.cpp
C++
cpp
35,356
permissive
// // AddressManager.cpp // libraries/networking/src // // Created by Stephen Birarda on 2014-09-10. // Copyright 2014 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include <QGuiApplication>...
0fc8c876274435857781f3eea402e5e196865197
34f8df7eeb587e88e5f5c7b7006288f0d59fc8cb
gary444/lamure
/mesh_preprocessing/src/bvh.cpp
C++
cpp
22,077
permissive
#include <lamure/mesh/bvh.h> #include <lamure/mesh/polyhedron.h> #include <lamure/ren/lod_stream.h> #include <lamure/mesh/tools.h> #include <limits> #include <queue> #include <algorithm> #include <iostream> #include <CGAL/IO/print_wavefront.h> // Stop-condition policy #include <CGAL/Surface_mesh_simplification/...
d4580603e2c7160e470df903cf839f09c344d443
4869406e15ef614332637b4a309309c3d5999a96
operativeF/Kvasir
/Lib/Chip/CM4/Freescale/MK21D5WS/UART3.hpp
C++
hpp
52,436
permissive
#pragma once #include <Register/Utility.hpp> namespace Kvasir { //Serial Communication Interface namespace Uart3Bdh{ ///<UART Baud Rate Registers: High using Addr = Register::Address<0x4006d000,0xffffff00,0x00000000,std::uint8_t>; ///UART Baud Rate Bits constexpr Register::FieldLocation<...
6bd74f56873ea80498500d32ef08586d5517e488
3cb69b28cfcbc400ec02d5efe2174775034163af
svn2github/Themis
/tags/milestone-001/themis/modules/cache/cache_main.cpp
C++
cpp
1,942
no_license
/* Copyright (c) 2000 Z3R0 One. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
4c5964f19ecbf0d5ab0651849639fe60620cfdd8
943ddc8b980f23a0b2c8e2cbb3a2b19f873bbb2d
GIBIS-UNIFESP/BIAL
/bial/inc/SegmentationBorder.hpp
C++
hpp
855
no_license
/* Biomedical Image Analysis Library * See README file in the root instalation directory for more information. */ /** * @date 2013/Jul/12 * @brief: Segmentation of object border. */ #ifndef BIALSEGMENTATIONBORDER_H #define BIALSEGMENTATIONBORDER_H #include "Common.hpp" #include "Vector.hpp" namespace Bial ...
2afb3299bbacb53cb2d6258988a1ad61d54b279f
2ba2f0391cc748c2875238b486a8ae61998f37fb
MrBigDog/MyProject
/src/usGfx/us_d3d9_effect_common_mesh_with_shadow_map.cpp
C++
cpp
4,524
no_license
/////////////////////////////////////////////////////////////////////////// // // This source file is part of Uniscope Virtual Globe // Copyright (c) 2008-2010 by The Uniscope Team . All Rights Reserved // /////////////////////////////////////////////////////////////////////////// // // Filename: us_d3d9_effect_com...
b2ebbb237530a52bccb5b3888bcc0f6b6ec6f2e7
65885bf196b90206b8302cd08a87da0ab7af19d5
hashimoto-atsunori/MyAppRails
/vendor/bundle/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/operators.cpp
C++
cpp
9,246
permissive
#include "sass.hpp" #include "operators.hpp" namespace Sass { namespace Operators { inline double add(double x, double y) { return x + y; } inline double sub(double x, double y) { return x - y; } inline double mul(double x, double y) { return x * y; } inline double div(double x, double y) { return ...
073d1fd3212fbaf96bfa4672d75fede1f1bcac58
ebddd0500aaa6276cfb4a81ca2867a1c418d1e79
ECS-251-W2020/chromium
/content/browser/network_service_browsertest.cc
C++
cc
23,573
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/bind.h" #include "base/files/file_util.h" #include "base/memory/ref_counted_memory.h" #include "base/test/bind_test_util.h" #include "base/...
aa49d2d1d07d5e23669d7af93c970de77dbf9842
54be3699345e952bd4736e6325231e1221c5a72e
wstridsberg/Bootcamp
/Day 2/assignment1.cpp
C++
cpp
925
no_license
#include <iostream> int e1=8; int e2=9; int e3=11; int main() { int usermaxnumber; int array[e1][e2][e3]; std::cout << "Write a positive number" << std::endl; std::cin >> usermaxnumber; for (int i = 0; i < e1; ++i) { //populate the array for (int j = 0; j < e2; ++j) { for (int k = 0; k <...
90be6326b231e2e93738cf820eb26e04df81cdf2
6c2855aa0389d83e1c282b7cb7898e2f349530ab
Ragnarok54/STL-2020
/Course 1 NetRom/Tema/list_demo.cpp
C++
cpp
3,264
no_license
#include <set> #include <iostream> #include <iterator> #include <algorithm> #include <fstream> #include <list> // Define a structure for a rectangle: x1, y1, x2, y2 // Define a constructor for the rectangle struct rect { int x1, y1; int x2, y2; rect(int a, int b, int c, int d) : x1(a), y1(b), ...
18a5a20dc44b611f1b9f1140446290dd14d71b8f
995a70ab9867fe817e43ce7f653d52e174a1e368
WhereIsHeroFrom/Algorithm
/动态规划/最长单调子序列/PKU 3903 Stock Exchange.cpp
C++
cpp
782
no_license
#include <iostream> using namespace std; #define MAXN 100010 int a[MAXN]; int b[MAXN], bn; int main() { int i, n; while (scanf("%d", &n) != EOF) { bn = 0; for (i = 0; i < n; i++) { scanf("%d", &a[i]); int l = 0, r = bn - 1; int ans = bn; whil...
a03dcfd7fb85b553a25761515f9f7f2f20654ae1
6071db3ead03cf0ff9bc2f2b876a43ab3e6fcd6b
noahgoldman/qfs
/src/cc/libclient/KfsOps.cc
C++
cc
64,567
permissive
//---------------------------------------------------------- -*- Mode: C++ -*- // $Id$ // // Created 2006/05/24 // Author: Sriram Rao // // Copyright 2008-2012,2016 Quantcast Corporation. All rights reserved. // Copyright 2006-2008 Kosmix Corp. // // This file is part of Kosmos File System (KFS). // // Licensed under t...
f5b2279f82113a815eab040928b782100438d331
7f89aaf8e73d5057d179ec60e5c516ac1ddd2fc1
antonidass/BaumanStudy
/sem4/OOP/lab_04/src/mainwindow.cpp
C++
cpp
3,568
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); this->setWindowTitle("Elevator"); connect(elevator.getDoors(), SIGNAL(newInfo(QString)), this, SLOT(setInfo(QString))); connect(&elevator, SIGNA...
6081de6c1b0416a8043711ca5c9cc063d9d01c1a
6dacec78ceaf73a6898237089704060e12080429
a62625536/ACM
/51nod/1049.cpp
C++
cpp
398
no_license
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; int n,a[50005]; int main() { scanf("%d",&n); for(int i = 1;i <= n;i++) scanf("%d",&a[i]); long long ans = 0,sum = 0; for(int i = 1;i <= n;i++) { sum += a[i]; if(sum < 0) sum = 0; ...
3c088cde906e1c62a7bab881bdca422e56c17795
daa270714e16ba8ee9e88187ed3b1ae5047dbffd
xzthking/alibabacloud-cpp-sdk
/waf-openapi-20180117/src/waf_openapi_20180117.cpp
C++
cpp
24,096
permissive
// This file is auto-generated, don't edit it. Thanks. #include <alibabacloud/waf_openapi_20180117.hpp> #include <alibabacloud/endpoint_util.hpp> #include <alibabacloud/open_api.hpp> #include <boost/any.hpp> #include <boost/throw_exception.hpp> #include <darabonba/core.hpp> #include <darabonba/util.hpp> #include <iost...
aeb0c51efadb17f2724185b18f1f4508abbc28af
96ce34b76793aa2896e6b21c169e3d2974924418
ecardona506/Compu-grafica
/jupiter.cpp
C++
cpp
610
permissive
#include "jupiter.h" jupiter::jupiter() {} void jupiter::abrirMalla() { objmodel_ptr = NULL; if (!objmodel_ptr) { objmodel_ptr = glmReadOBJ("./modelos/bola.obj"); if (!objmodel_ptr) exit(0); glmUnitize(objmodel_ptr); glmFacetNormals(objmodel_ptr); glmV...
c48ec16e8bdef99fc73472b7d356b32e80cb6a6c
364326a7f338466b6b1289ab956f67fd620036d9
liupanfeng/cocos2d
/NoOneDies/Classes/GameScene.hpp
C++
hpp
716
permissive
// // GameScene.hpp // NoOneDies // // Created by 刘盘风 on 16/3/31. // // #ifndef GameScene_hpp #define GameScene_hpp #include <stdio.h> #include "GameController.hpp" USING_NS_CC; class Game:public LayerColor { private: Vector<GameController*> gcs; int _heroCount; EventListenerPhysicsContact * con...
723676ace7fc0dcce59bae109d43502e1a100fb5
946ba0db19dcfa777d1b3de3881d2b084a5cbda4
koobonil/Boss2D
/Boss2D/addon/webrtc-jumpingyang001_for_boss/examples/peerconnection/server/peer_channel.cc
C++
cc
10,684
permissive
/* * Copyright 2011 The WebRTC 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 in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
f35fc5d6b1b86cb748ed5f9991016f6c8cf24138
cbc0c6b0d6484780d0aa1f968e8bf1e04862a00d
coderintherye/iroha
/test/integration/validation/chain_validator_storage_test.cpp
C++
cpp
7,757
permissive
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #include "consensus/yac/impl/supermajority_checker_impl.hpp" #include "module/irohad/ametsuchi/ametsuchi_fixture.hpp" #include "validation/impl/chain_validator_impl.hpp" #include "ametsuchi/mutable_storage.hpp" #inclu...
2fc8162b605f4c1f5f3ad4c1411a314d7de5df5f
69efeb50e58b7c0297ec888e7a41f2e15bc6d1e8
bootingman/fuchsia2
/src/virtualization/bin/vmm/arch/x64/io_port.cc
C++
cc
13,303
permissive
// Copyright 2017 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/virtualization/bin/vmm/arch/x64/io_port.h" #include <time.h> #include <src/lib/fxl/logging.h> #include "src/virtualization/bin/vmm/bits.h"...
65865eff2381258dce6ca862842aa1981d269cc8
12703a9d5fc43b27a63b3d68e85cd796feb926b1
proggerkz/Coursers-c-plus-plus-white
/Week 2/task7.cpp
C++
cpp
307
no_license
#include <iostream> #include <vector> #include <string> using namespace std; vector<int> Reversed(const vector<int> &v){ vector<int> cur; for(int i = v.size() - 1; i >= 0; --i) cur.push_back(v[i]); return cur; } int main(){ vector<int> v = {0, 1, 2}; v = Reversed(v); cout << v[0]; return 0; }
239e5482b4ac260521d2e8c7e32a402326c8c71c
f1c1ce7be7fd64ed55a02a6f7456bf302c376706
andypandy47/Jank
/Jank/src/Jank/Log.cpp
C++
cpp
434
permissive
#include "Jankpch.h" #include "Log.h" namespace Jank { std::shared_ptr<spdlog::logger> Log::s_CoreLogger; std::shared_ptr<spdlog::logger> Log::s_ClientLogger; void Log::Init() { spdlog::set_pattern("%^[%T] %n: %v%$"); s_CoreLogger = spdlog::stdout_color_mt("JANK"); s_CoreLogger->set_level(spdlog::level::t...
42716bb4198f4d3b62f60cb6e5da027c26365f83
11362505318a9cb1f5af5a714b4b946b8990ba83
Dhinagaran-s/SwitchML
/RDMAExampleClient/Connections.cpp
C++
cpp
12,922
permissive
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "common.hpp" #include "Connections.hpp" #include <mpi.h> #include <chrono> DEFINE_bool(use_rc, false, "RDMA connection type: if set, use RC; otherwise default to UC."); DEFINE_int32(mtu, 256, "RDMA packet MTU: one of 256, 512, 1024, 2...
dede6fcdfbe164d7ca32e4402f7c6c9e9b285b7a
eefd30baf549781aff70a5d6b148d6f89c28e2da
jjzhang166/WinNT5_src_20201004
/NT/ds/security/cryptoapi/pki/rpor/msrevoke.cpp
C++
cpp
39,122
no_license
//+------------------------------------------------------------------------- // Microsoft Windows // // Copyright (C) Microsoft Corporation, 1996 - 1999 // // File: msrevoke.cpp // // Contents: CRL Distribution Points version of CertDllVerifyRevocation. // // Restrictions: // ...
5d60a6fec791afce848c9276620d69816f4e201b
ebc037a90e3ca76cf45ba86410e831654704de3e
MysticSoul/CCplusplus-Project
/Timus/timus_1356_somethingeasier.cpp
C++
cpp
1,699
no_license
/* * * Tag: Number Theory * Time: O(n^1.5) * Space: O(1) */ #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <climits> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <set> #include <list> #include <unordered_map> #...
9bcabd47714dc8554d0ba28c4150b55e301123a0
dc6bae5cc4c794211146509f2db4ce84f9901845
mengtest/BubbleMan
/Classes/Rocker.hpp
C++
hpp
1,722
no_license
// // Rocker.h // T1 // // Created by zhuoyikang on 15-2-25. // // #ifndef __T1__Rocker__ #define __T1__Rocker__ #include <stdio.h> #include "cocos2d.h" USING_NS_CC; typedef enum { tag_rocker, tag_rockerBG, }tagForBRocker; typedef enum { rocker_left, rocker_right, rocker_up, rocker_dow...
371b88e2f1d76f735da8c26a5c1f6fb108792268
ca871a5d47a159b4948e4c79f9005009c426c1c2
m110h/vocabulator
/src/gamesettings.hpp
C++
hpp
638
permissive
#ifndef _GAME_SETTINGS_H_ #define _GAME_SETTINGS_H_ #include <SFML/Graphics.hpp> class GameSettings { public: GameSettings(); ~GameSettings(); void setType(const sf::String& type); void setMode(const sf::String& mode); void setSound(const sf::String& sound); void setDictionary(c...
aaee8b5a9747142b440509b6a801c0547e3dbb3e
9f192057eebd0d7de47f1b3f32bc863d032bdc4f
isabella232/stdcxx
/tests/strings/21.string.op.plus.equal.cpp
C++
cpp
21,638
permissive
/*************************************************************************** * * 21.string.plus.equal.cpp - test exercising [lib.string.op+=] * * $Id$ * *************************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one or more * contribu...
d16e48ef50cefd577aee4dc9e91d04e148335e85
efc63f6a304ecc9d897cc90fc556407e9a3b41fd
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_1/SB+dmb.sy+rfi-pos-data-rfi.c.cbmc_out.cpp
C++
cpp
45,307
no_license
// 0:vars:2 // 2:atom_0_X2_0:1 // 3:atom_1_X2_1:1 // 4:atom_1_X3_1:1 // 5:atom_1_X6_1:1 // 6:thr0:1 // 7:thr1:1 #define ADDRSIZE 8 #define NPROC 3 #define NCONTEXT 1 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) char __get_rng(); char get_...
70583d62394e0d3cbe75a9f9b4b535756329f51d
61033ab1f465bf2cef67a78548784594d2646ce8
rrika/cdcEngineDXHR
/game/ui/Scaleform/ScaleformManager.cpp
C++
cpp
513
no_license
#include "ScaleformManager.h" #include "game/Gameloop.h" #include "cdcLocale/localstr.h" std::map<std::string, uint32_t> scaleformStringMap; void ScaleformManager::Initialize() { for (uint32_t i=0; i<globalDatabase->numScaleformStrings; i++) { auto& entry = globalDatabase->scaleformStrings[i]; scaleformStringMap...
5128497f7c503f2471243afc15838a4390c974f0
a5bd2e928d00decfc56a7f6d117daca3a6623402
jjzhang166/WinNT5_src_20201004
/NT/ds/adsi/nw312/cuas.hxx
C++
hxx
780
no_license
class CNWCOMPATUserAcctStats; class CNWCOMPATUserAcctStats : INHERIT_TRACKING, public IADsFSUserAccountStatistics { friend class CNWCOMPATUser; public: /* IUnknown methods */ STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ; DECLARE_STD_R...
374bb6a94adcbf7385cd13d5824d657ba6cf0bbc
0404267fe300b281dea8c9da23027b69e9eff216
zjhl2/ACM-template
/计算几何/三维计算几何.cpp
C++
cpp
12,309
no_license
//三维几何函数库 #include <math.h> #define eps 1e-8 #define zero(x) (((x)>0?(x):-(x))<eps) struct point3{double x,y,z;}; struct line3{point3 a,b;}; struct plane3{point3 a,b,c;}; //计算cross product U x V point3 xmult(point3 u,point3 v){ point3 ret; ret.x=u.y*v.z-v.y*u.z; ret.y=u.z*v.x-u.x*v.z; ...
ef561f3c7cd69513ddf848f2f3f78a29c974110c
3c1389cd9bb059c5b9a6196c13354c3cb77e6295
jsteemann/cxx-ci-demo
/tests/DivideTest.cpp
C++
cpp
976
permissive
// for std::isinf #include <cmath> #include "gtest/gtest.h" #include "calculator/Calculator.h" #include "calculator/Value.h" TEST(DivideTest, DivideTwoPositiveInts) { ValueInt v1(10); ValueInt v2(20); ASSERT_FALSE(Calculator::divide(v1, v2)->isInt()); ASSERT_FLOAT_EQ(0.5, Calculator::divide(v1, v2)->toDou...
cd3ecad2f6ccd72a990a195e0d1145f5abb53578
6d4dffb49656524c64d962e79fe238384c69c0c6
gary-conbus/webkit
/Tools/WebKitTestRunner/TestController.cpp
C++
cpp
133,048
no_license
/* * Copyright (C) 2010-2018 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditi...
e59dd6189a782baa97d5a54834640c95ee0a18d3
c781e18bc77f52ba4b05ece37e50dfa4fda2cd9b
guisaraiva2000/Compilers
/fir_ei/targets/type_checker.cpp
C++
cpp
9,794
no_license
#include <string> #include "targets/type_checker.h" #include "ast/all.h" // automatically generated #include <cdk/types/primitive_type.h> #define ASSERT_UNSPEC { if (node->type() != nullptr && !node->is_typed(cdk::TYPE_UNSPEC)) return; } //--------------------------------------------------------------------------- ...
f38df90f66d518355ffffd9c310425bc80b5a26d
ef3a37c7ad253426b8ae6e605d4e1b2cd4e36b12
YJBeetle/QtAndroidAPI
/android-33/android/icu/util/ULocale.def.hpp
C++
hpp
7,402
permissive
#pragma once #include "../../../JObject.hpp" class JArray; class JArray; class JBooleanArray; namespace android::icu::util { class ULocale_AvailableType; } namespace android::icu::util { class ULocale_Category; } class JObject; class JString; namespace java::util { class Locale; } namespace android::icu::util { ...
1b2faf785f72126237b95dc00e155d3de6f14b3b
ad6811ed17f37d5d9058488ec7e35ddd78822add
futureclarriczby/matadors
/src/qt/askpassphrasedialog.cpp
C++
cpp
9,321
permissive
#include "askpassphrasedialog.h" #include "ui_askpassphrasedialog.h" #include "guiconstants.h" #include "walletmodel.h" #include <QMessageBox> #include <QPushButton> #include <QKeyEvent> AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : QDialog(parent), ui(new Ui::AskPassphraseDialog), ...
21805df4667db905bda9aed0df6bd68cbee45bea
68b8f9bafe7304cb36f7a3b14a73e0dc99f18237
yi1306c12/suna_c
/environments/Classification.cpp
C++
cpp
6,996
permissive
#include"Classification.h" Classification::Classification(const char* filename) { bool has_title=true; dataset= readCSV(filename, number_of_samples, number_of_attributes, has_title); //printMatrix(dataset, number_of_samples, number_of_attributes); class_index= number_of_attributes -1; //the last attribute is a...
b96e6dd818408e494dc815f4365aa7d3c42bf201
a00fb694f47792927877f5ac0dc973e93c2cac54
TeamVault/tauCFI
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-3319.cpp
C++
cpp
2,405
no_license
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 { bool ac...
7e3c67af107520df52668d5c91f8ab3925d58a73
d61e25d8619a9278554539a90b4e4d92dabece39
FFMG/myoddweb.piger
/myodd/boost/libs/hana/test/experimental/view/joined/at.cpp
C++
cpp
3,116
permissive
// Copyright Louis Dionne 2013-2016 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #include <boost/hana/assert.hpp> #include <boost/hana/at.hpp> #include <boost/hana/equal.hpp> #include <boost/hana/experimental/view.hpp> #...
e6687dc3ea467c3b5a506cc965f6a02b72a18d3c
bb5edc6b5bb158fca4c87ff71a5072942798a65b
dkurt/Halide
/apps/c_backend/pipeline_cpp_generator.cpp
C++
cpp
4,131
permissive
#include "Halide.h" namespace { using namespace Halide; using Internal::Call; // TODO: this is using Halide::Internal, which is naughty for apps outside of Halide proper. // We should find (or add) a way to do this properly, or move this apps into internal tests. Expr make_call_cpp_extern_toplevel(Expr arg1, Expr ar...
a316a7a40d3842b9113db65dd44bb55be7584a84
f4df0d285b92c2517f3d02b7168e85af57756e94
TinyLink/TinyLink_Library_Arduino
/src/TL_HUMIDITY/DHT22/DHT22_Humidity_Arduino_UNO.cpp
C++
cpp
499
permissive
#ifdef TINYLINK_HUMIDITY #if TINYLINK_HUMIDITY == DHT22 #include "DHT22_Humidity_Arduino_UNO.h" DHT22_Humidity_Arduino_UNO::DHT22_Humidity_Arduino_UNO():Sensor(0.0), DHT22Humi(DHT_Lib::getSingleItem(HUMIDITY_DIGITAL_OUTPUT,DHT22_SENSOR)){ } int DHT22_Humidity_Arduino_UNO::_read(){ double chk = (...
7ba2757411c3e9763e84deabfd45bda11d07194c
fbe94fd664582d2dd50496080f0630ea935b8a4f
skyend/hazelcast-cpp-client
/hazelcast/test/src/util/AddressHelperTest.cpp
C++
cpp
1,893
permissive
/* * Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
b8397ecd5b29c99c3057ad7f2ff8ea8639915dfb
79f9aab771161b7451353ac3f68ae13c28c0473b
krishna-raj007/BodhiTree-Annotation
/CS101_Spring2020-21 /LAB4_L2/categorized/pi/all_passed/51_pi.cpp
C++
cpp
246
no_license
#include<simplecpp> main_program{ //Write your code here long long int n; cin>>n; double s = 1, i = -1, r =1; for (int x =1; x<=n; x++){ s += i/(r+2); i *= -1; r += 2; } cout<<4*s; }
f336a1ea51a33b98c24b21aedbc0ac4f9d3c6276
c758d72491efa7963fed9cec27a541f64bdef18b
james1023/test_boost
/boost_lib/boost_1_55_0-windows/libs/thread/test/sync/futures/future/wait_pass.cpp
C++
cpp
3,897
no_license
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===---------------------------------...
88d006a41d6bc347bca578293fe9aef03512d1f6
46c1483366759ae26b36044cfa0767d596893799
white0rchardpUnK/Cpp-Primer-5th-Solutions
/data/GCC_pre_C11/17/rand6.cc
C++
cc
2,802
permissive
/* * This file contains code from "C++ Primer, Fifth Edition", by Stanley B. * Lippman, Josee Lajoie, and Barbara E. Moo, and is covered under the * copyright and warranty notices given in that book: * * "Copyright (c) 2013 by Objectwrite, Inc., Josee Lajoie, and Barbara E. Moo." * * * "The authors and publi...
363559602eef34dafc740623708576539bee5a1c
9d0431ca27e3c1d1a61cdb76e2286238c9705f02
tggo/reindexer
/cpp_src/core/comparator.cc
C++
cc
5,519
permissive
#include "core/comparator.h" #include "core/payload/payloadiface.h" namespace reindexer { Comparator::Comparator() {} Comparator::~Comparator() {} Comparator::Comparator(CondType cond, KeyValueType type, const VariantArray &values, bool isArray, bool distinct, PayloadType payloadType, const FieldsSet &fields...
0dbfa69a21648b5ddb140e2a60c9a4b93eef130e
2cbe4f226a08e5b8a49f3eb9ae7c3cbb01c2fffc
CarbonDev/android_frameworks_base
/core/jni/android/graphics/BitmapFactory.cpp
C++
cpp
27,825
permissive
#define LOG_TAG "BitmapFactory" #include "BitmapFactory.h" #include "NinePatchPeeker.h" #include "SkData.h" #include "SkFrontBufferedStream.h" #include "SkImageDecoder.h" #include "SkImageRef_ashmem.h" #include "SkImageRef_GlobalPool.h" #include "SkPixelRef.h" #include "SkStream.h" #include "SkTemplates.h" #include "S...
30617f3bbdd77650443fbd81f2461909d1eebda0
cfa2b8d418638ee9aba71e4b427b14bba97b6232
its-sachin/LeetCode
/Random/q1512.cpp
C++
cpp
666
no_license
#include<bits/stdc++.h> using namespace std; typedef long long int; #define inf 1e18 #define mod 1000000007 #define pb push_back class Solution { public: int numIdenticalPairs(vector<int>& nums) { unordered_map<int,int> m; for (int i = 0; i < nums.size(); i++){ if(m.find(nums...
ba3f95df184c4af9231cc2ddf423b63ca5cb70e6
a4308878fe8141958193d615183edb06a6c2d221
zhouyinwpu/SearchEngine
/PreProcess/DirScan/DirScan.hpp
C++
hpp
1,962
no_license
/************************************************************************* > File Name: DirScan.hpp > Author:HOU_JUN > Mail: june506@163.com > Created Time: Tue 01 Sep 2015 12:01:35 AM PDT ************************************************************************/ #ifndef _DIRSCAN_HPP #define _DIRSCAN_HPP #include ...
18546b3d1929f2a7576e2459ff9d65fb913edaff
9e5ec5db7c124e58a761dbb51886b4af44df51ac
temurbekkhujaev/icefrog2
/src/entidades/Problema.cpp
C++
cpp
816
no_license
#include "Problema.h" #include "../util/Util.h" std::vector<TipoCaixa> Problema::listTipoCaixaRotacoes() { std::vector<TipoCaixa> listTipoCaixaRotacoes; for (TipoCaixa tipoCaixaOriginal : listTipoCaixaOriginal) { for (TipoCaixa element: (Util::listTipoCaixaRotacoes(tipoCaixaOriginal))) { l...
5a64030c2fdf2da57197328698d8ec9b757a185c
dd690ce3a28bce7a1843a8d95c38c0a326d42120
aliosmanulusoy/Probabilistic-Volumetric-3D-Reconstruction
/core/vil/vil_rotate.hxx
C++
hxx
3,143
no_license
// This is core/vil/vil_rotate.hxx #ifndef vil_rotate_hxx_ #define vil_rotate_hxx_ //: // \file // \brief rotate an image, using the resampling functions // \author dac // // A front end to the resampling functions that allows // an image to be rotated by any angle theta #include <cmath> #include "vil_rotate.h" #inclu...
9b291257f2be2d5e6b7071de2944173d9ef07346
5f481ca67ba65703ef06054b8dbb5ec9baf9fd8c
LGH1996/platform_frameworks_base
/libs/input/SpriteController.cpp
C++
cpp
16,406
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...
49b7d5b95c5544ba5b2d36691cbc02d098b32ac4
d9a298e755a7f9f1058edb04f0b30d468534d57d
ppzzyy11/chatroom
/src/applicationprotocol/applicationprotocol.hpp
C++
hpp
2,730
no_license
/* * applicationprotocol.hpp * Copyright (C) 2019 pzy <pzy@pzy-ThinkPad-Edge-E440> * * Distributed under terms of the MIT license. * * Description: * convert steam bytes into customed message */ #ifndef APPLICATIONPROTOCOL_HPP #define APPLICATIONPROTOCOL_HPP #include <vector> #include <utility> #include "dat...
9aa4dd6588639ebb2da7a187311d9504254031ee
0cb1bf728d0ee3292696c25ecdb8da0d475893ff
Moein-Karami/OlympiadCodes
/M3/21/2/Shoot/main.cpp
C++
cpp
570
no_license
#include <bits/stdc++.h> #define f first #define s second #define int long long int using namespace std; typedef pair<int,int> pii; int ans[20][20]; int mod=10687; pii tmp[4]={pii(-1,0),pii(0,1),pii(1,0),pii(0,-1)}; main() { int x=0,y=0; for(int i=1;i<mod;i++) { x=(x+9)%9; y=(...
b1ca9f0784c118b3084022930c4b55d1dd1f94c6
4aa0436353c48b04e867e6e10ad926849e3d5363
Qianzujin/C-Socket-
/Client2.x/Client2.0.cpp
C++
cpp
2,117
no_license
// Client2.x.cpp : 定义控制台应用程序的入口点。 // #define WIN32_LEAN_AND_MEAN #include "stdafx.h" #include<WinSock2.h> #include<windows.h> #include<iostream> #include<string.h> #pragma comment(lib,"ws2_32.lib") using namespace::std; void initialization() { //初始化套接字库 WORD w_req = MAKEWORD(2, 2);//版本号 WSADATA wsadata; int ...
e904c104f3d09cb79a6ceef069b3c9c6985911ba
c4c50fcecf7e79aed54d734a502a67ea560ab8d6
yachtcaptain23/browser-android-tabs
/chrome/browser/unified_consent/unified_consent_service_factory.cc
C++
cc
2,751
permissive
// Copyright 2018 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/unified_consent/unified_consent_service_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/...