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
abf16cc552fcddf3d4257026b4a5aee2b15a1cd6
e6e15e555ef7bac7f1bbb400d68206a175275e93
camolezi/MinecraftCpp-OpenGL
/MinecraftC++/Sources/shaderProgram.cpp
C++
cpp
1,884
permissive
#include "shaderProgram.hpp" shaderProgram::shaderProgram(){ programID = glCreateProgram(); } shaderProgram::~shaderProgram(){ deleteShaders(); glUseProgram(0); glDeleteProgram(programID); } bool shaderProgram::adicionarShader( unsigned int shaderType , string shaderSrc){ shaderClass * newShader = new shade...
cb494964f34b04be69e145b00a418bafcffd3493
3a2367348d8a42e548d57283a3fc51e43f6328d3
harryw1/csii
/projectClasses/Delivery Service/VanishingCabinet.cpp
C++
cpp
590
no_license
#include "VanishingCabinet.h" #include <iostream> VanishingCabinet::VanishingCabinet() : Delivery() { this->weight = 0.0; this->id = ""; } VanishingCabinet::VanishingCabinet(string a_Name, string a_Timestamp, double a_Weight, string a_Id) : Delivery(a_Name, a_Timestamp) { this->weight = a_Weight;...
94658b55d2600d4f4bf40e4543ae058a2bec0f7c
f6e798e1f78e066da932de0e14bbdb062e19f435
FHead/PhysicsHiggsProperties
/Fitting/13123_ZXMassFix/MeasureNormalization.cpp
C++
cpp
2,541
no_license
#include <iostream> #include <cmath> using namespace std; #include "Code/DrawRandom.h" #include "M4lSpectrum.h" int main() { double ZX8TeV2e2mu = 0; double ZX8TeV2mu2e = 0; double ZX8TeV4e = 0; double ZX8TeV4mu = 0; double ggZZ8TeV2e2mu = 0; double ggZZ8TeV2mu2e = 0; double ggZZ8TeV4e = 0; do...
0339a50065b1a6dc0e27439314317fe6c04f11f8
a75b57cdbaeaed14cee19c1c0161a6fdd9519b3d
sr6033/Vision-based-Visual-Surveillance
/track.cpp
C++
cpp
6,167
permissive
#include "opencv2/objdetect/objdetect.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <cstdio> #include "Eserial.h" using namespace std; using namespace cv; /** Function Headers */ void detectAndDisplay (Mat frame, int threshold); vecto...
16fd21b48a3900fdc93fa78ebb01563fcb265f6f
b8151ba2969e281234c02246bb0663cb38f27870
renatomarquesteles/neps-academy
/Programação Básica para Competições/Controlando o código/codcad04-selecao-pt1.cpp
C++
cpp
514
no_license
#include <iostream> using namespace std; int main() { /* < menor > maior <= menor ou igual >= maior ou igual == igual != diferente and E or OU % módulo (resto da divisão) */ int x; cin >> x; if(x > 0 and x % 2 == 0) { ...
09081531090a80837fbc02283fcaf949c984e6a4
d2512759a14efd3e918d32c93f4512299893e43c
mengguanya/Elementary-Computer-Architecture-Lab
/lab2.1/Read_Elf.cpp
C++
cpp
10,557
permissive
#include"Read_Elf.h" #include"string" FILE *elf=NULL; Elf64_Ehdr elf64_hdr; //Program headers unsigned long long padr=0; unsigned short psize=0; unsigned int pnum=0; //Section Headers unsigned long long sadr=0; unsigned short ssize=0; unsigned short snum=0; //Symbol table unsigned int symnum=0; ...
2441dc2f6691c027cf681ea28cb222f4bff3ae87
b98ae874ceda8582a5b0ad5aa3e5ae94db3d5a37
diegomestre2/bloomfilter-bsd
/src/dtl/bitset_util.hpp
C++
hpp
3,200
permissive
#pragma once #ifndef _DTL_BITSET_INCLUDED #error "Never use <dtl/bitset_util.hpp> directly; include <dtl/bitset.hpp> instead." #endif namespace dtl { //===----------------------------------------------------------------------===// /// converts a byte sequence of length LEN/8 into a bitset of length LEN /// Adopted a...
987a0c9916beb08519c04fdf91ba7f95038cde30
ae52fe66b481a8bd08f953a92921d77128ac1c83
hlzz/dotfiles
/graphics/VTK-7.0.0/IO/Parallel/vtkMultiBlockPLOT3DReaderInternals.cxx
C++
cxx
10,850
permissive
/*========================================================================= Program: Visualization Toolkit Module: vtkMultiBlockPLOT3DReaderInternals.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for d...
2d70b7a714753bc1df55d031b349918f38e0e778
4543bfc48becf7a62220ebdf285caaa01aedc1b6
junxuezheng/chromium
/components/consent_auditor/fake_consent_auditor.cc
C++
cc
2,606
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 <string> #include <utility> #include "components/consent_auditor/consent_auditor.h" #include "components/consent_auditor/fake_consent_auditor.h"...
3aeb8fad92b0add8803f7ca51b816df377bcb953
f4b837b99db7b4dd4c78f4b0a8ab450a0fe3e712
clockworkengineer/Helical
/QtTerminal/qtterminal.cpp
C++
cpp
4,931
permissive
/* * File: qtterminal.cpp * * Author: Robert Tizzard * * Created on January 10, 2018 * * Copyright 2018. * */ // // Class: QtTerminal // // Description: Class to act as Qt specific wrapper for class CTerminal. It is QListView that // is used to display a QStringListModel into which the CTerminal buffer has ...
b9b24c6ad69463a0c8443b61eddc9c0ff1d99c6a
7e253d520818884e87dc87f838542845137284a9
johanhenselmans/pkgsrc
/devel/xulrunner/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
C++
cc
1,266
permissive
$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ # Reported upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=753046 --- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/base/platform_thread_posix.cc ...
96191e3c7f801c9706b5ec2c0039658eb4a42f43
996411019685152fa1db76eb9a17e5b6cf100fae
MinhuiGu/545Final
/MetaData.cpp
C++
cpp
764
no_license
/* * MetaData.cpp * * Created on: Nov 24, 2013 * Author: minhuigu */ #include "MetaData.h" MetaData :: MetaData(double close, int volume) { Volume = volume; Close_price = close; } MetaData :: MetaData() { } MetaData :: ~MetaData() { } long double MetaData :: get_return() { return Daily_return; } v...
6f902d9ba788598e20749d2fa3af91835103f1b8
4ee899c0f8904e9314dd9cbe485c2401618113f7
link3force/HelpMePoly
/INF1010/TP - Session Hiver 2016/TP3/TP3/EtudiantBaccalaureat.cpp
C++
cpp
1,247
no_license
/**************************************************************************** * Fichier: EtudiantBaccalaureat.cpp * Auteur: PolySensei & Associates * Date: 11 février 2016 * Mise a jour : 20 février 2016 * Description: Implémentation de la classe EtudiantBaccalaureat **********************************************...
f36c1f78f048e14504bf754f8bccb9176a55ef16
6d1854df526cbcd13c064b4c33fb76c618ba2799
niuxu18/logTracker-old
/second/download/git/gumtree/git_patch_hunk_3759.cpp
C++
cpp
1,628
no_license
if (!p_start && !p_end) { p_start = -1; p_end = -1; } /* Now output a diff hunk for this range */ - printf("%s%s@@ -%ld,%ld +%ld,%ld @@%s\n", + fprintf(opt->file, "%s%s@@ -%ld,%ld +%ld,%ld @@%s\n", prefix, c_frag, p_start+1, p_end-p_start, t_start+1, t_end-t_start, c_r...
f89191942b0555827038f9f2bd5fe8dc994f252b
88c39098397dc65372e86664d68081ad86d65903
Rmalavally/ROCm_Documentation
/ROCm_Libraries/rocALUTION/src/base/host/host_io.cpp
C++
cpp
10,206
no_license
/* ************************************************************************ * Copyright (c) 2018 Advanced Micro Devices, Inc. * * 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 re...
50e306f1f2f0291ee3be035c5ccb63f9f8bab9cc
50aa37fe166609710096b964604c8372b68c555e
samarthkishor/loxplusplus
/src/scanner.cc
C++
cc
6,748
no_license
#include "scanner.h" #include <stdbool.h> #include <stdio.h> #include <string.h> typedef struct { const char* start; const char* current; int line; } Scanner; Scanner scanner; void initScanner(const char* source) { scanner.start = source; scanner.current = source; scanner.line = 1; } static ...
233ebd91b30a0cf002079dd07fa79f09c1128955
9176e5e52f12f3e30580566f479b1bd7911beb2f
sc624/fa17
/lab_avl/avltree.cpp
C++
cpp
7,816
no_license
/** * @file avltree.cpp * Definitions of the binary tree functions you'll be writing for this lab. * You'll need to modify this file. */ #include <queue> #include <stack> #include <iostream> using namespace std; template <class K, class V> V AVLTree<K, V>::find(const K& key) const { retu...
3dd971a76e8278393639841bf83e2a8f2b5bad75
70704af9f1e49e82858d74e3076cab661baa0fae
prem-chand/Cassie_Controller_AngularMomentum
/CustomCodes/utils/funcs/KinDyn200511_221619/kin/mex/Inertia_RightPelvisRotation_mex.cc
C++
cc
3,102
no_license
/* * Automatically Generated from Mathematica. * Mon 11 May 2020 22:27:36 GMT-04:00 */ #ifdef MATLAB_MEX_FILE #include <stdexcept> #include <cmath> #include<math.h> /** * Copied from Wolfram Mathematica C Definitions file mdefs.hpp * Changed marcos to inline functions (Eric Cousineau) */ inline double Power(doub...
e9d62682f6b12dca57cdbef58994f314d7f08896
8343d8ba03a4da7577e47230f643d8b44f29be70
Quant2017/Design3D
/Intermediate/Build/Win64/Design3D/Inc/Engine/DataAsset.gen.cpp
C++
cpp
9,898
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! ==============================================================...
02cc3f20f8de83d0da421482177416d8f0b2facb
0aa1c99ae8ee9a7b6c093a754ff39d26a9b65e87
Marcos2015/Linux_Pra_Fast
/C++/Youqianrushenxue_C++/chapter13/define_of_class/1.cc
C++
cc
606
no_license
#include <iostream> using namespace std; class Test { private: int y; void private_Test() { cout << "x=" << x << endl; } int x; public: // int y; //将数据成员放在public违反数据封装原则,当然可以用,但应放在private. Test(int g,int k) { y=g; x=k; } void disp() { private_Test(); cout << "y=" << y << en...
1ce1cf00996d8a617d8733c28c4cdddf414e60f0
fd312b5f7f6a887138abed3367ac0040a497cf8b
kashyapvinay/leetcode-challenge
/cpp/june/day_27_Perfect Squares.cpp
C++
cpp
529
permissive
class Solution { public: vector<int> dp; int recur_1(int n){ if(n == 0){ return 0; } if(n < 0){ return INT_MAX-1; } if(dp[n] != -1){ return dp[n]; } int i, res = INT_MAX; for(i = 1; i*i <= n; i++){ ...
39df8a38a19fdf2511dde044bd15b389530b63c0
8a2edf4e9da5f635fc8f563ca6d4aa445422f549
SchaichAlonso/freebsd-ports-kde
/www/ungoogled-chromium/files/patch-components_viz_service_display__embedder_skia__output__surface__impl.cc
C++
cc
726
permissive
--- components/viz/service/display_embedder/skia_output_surface_impl.cc.orig 2023-03-10 11:01:21 UTC +++ components/viz/service/display_embedder/skia_output_surface_impl.cc @@ -1259,7 +1259,7 @@ GrBackendFormat SkiaOutputSurfaceImpl::GetGrBackendFor ->GetDeviceQueue() ...
475991a86aa4735349e070c3f09c0c92a670eb77
33a2da474dce3f7ac3d206234f8117339483b267
plastic-ocean/Gauntmore
/oxygine-framework/oxygine/src/core/android/jniUtils.cpp
C++
cpp
3,474
permissive
#include "jniUtils.h" #include "jniHelper.h" #include "core/log.h" jobject _jmainActivity = 0; jclass _jmainActivityClass = 0; jclass _jUtils = 0; jmethodID _jUtils_getTimeUTCMS = 0; jmethodID _jUtils_getLanguage = 0; jmethodID _jUtils_isNetworkAvailable = 0; namespace oxygine { using namespace std; ...
430ac2f808c28bb575b536378bd01d6b7a9fb2c2
c3b92198fd65610b60d8b46284a19ccbd809d4eb
cqj8660/Code_Record
/Others/random-list/hdu3549.cpp
C++
cpp
1,439
no_license
#include <bits/stdc++.h> #define pii pair<int, int> #define ll long long using namespace std; const int maxn = 1e3 + 10; const int INF = 0x7f7f7f7f; struct edge { int to, cap, rev; }; vector<edge> G[maxn]; bool used[maxn]; void add_edge(int from, int to, int cap) { G[from].push_back(edge{to, cap, G[to].size()})...
a54cad1e18a38bfff67bc6450241fb9a1f80be27
9daebcd95c95c273cdda6455416a4022d4e4f500
dexters1/MRKiRM1_projekat
/MRKiRM1_projekat/user.cpp
C++
cpp
704
no_license
#include "user.h" User::User(QObject *parent) : QObject(parent) { topic = "Prazan Topic"; socket = nullptr; next = nullptr; mode = "read"; flag = 1; } void User::append(QTcpSocket *socket) { User *iter = this; if(flag == 1) { flag = 0; iter->socket = socket; iter...
e786d2accc335a5fcbde0d53b29ebd2592950091
4f44c1e19d86f431402aeca6db551392873f6336
innocentboy/myrepository
/src/codee/leet code/Unique_Binary_Search _Tees_2.cpp
C++
cpp
1,600
no_license
/** Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 unique BST's shown below. 1 3 3 2 1 \ / / / \ \ 3 2 1 1 3 2 / / \ ...
3c728e25c598124cbd86aa4704a347495a0085cc
d378b50b2147a4a84ccd64a7b0b2cba486be635e
StIvanov/OOP_CPP
/OOP_CPP/Sample.cpp
C++
cpp
319
no_license
#include "Sample.h" Sample::Sample(const char* name) { ptr = new smp(12); int n = 0; while (name[n] != '\0') { n++; } this->name = new char[n + 1]; for (int idx = 0; name[idx] != '\0'; idx++) { this->name[idx] = name[idx]; } this->name[n] = '\0'; } Sample::~Sample() { delete[] name; delete ptr; }
58d7cb51c9fc2e862f0a3a7b78337d46b13388a3
8769f772564899443ab27b39a8a0a360b156c8ef
Sreyorn/Calendar_Inheritance
/main.cpp
C++
cpp
420
no_license
#include"Date.h" #include"extDate.h" #include"Calendar.h" #include<iostream> using namespace std; int main(){ // Date d(18,3,2015); // d.print(); // extDate dd(18,3,2015); // dd.printNum(); // dd.printMonth(); //working with Calendar Calendar cal; int mon,yr; cout<<"Enter month : "; ...
3604309c13ffc2cea0953dcfee22ac2d683c0b64
caa8ca742dd5ace7243a204082a03318f694b404
whz20024117/Cycling_Fit_Analyzer
/lib/fitsdk/fit_stress_level_mesg.hpp
C++
hpp
3,934
no_license
//////////////////////////////////////////////////////////////////////////////// // The following FIT Protocol software provided may be used with FIT protocol // devices only and remains the copyrighted property of Garmin Canada Inc. // The software is being provided on an "as-is" basis and as an accommodation, // and ...
066b6609c41bd5f47ef2a9a6944ec8fb784bcc68
ebfa3da322c82a0ddf85c55a19beaf4230ef8932
Woosmap/osrm-backend
/include/engine/api/base_parameters.hpp
C++
hpp
5,238
permissive
/* Copyright (c) 2017, Project OSRM contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
7fccea3460e059676126447858b165bf78791748
18707f10a82fe549106f7e166891ed048ef42b07
charygao/SQLiteExplorer
/SQLiteExplorer/utils.cpp
C++
cpp
11,338
no_license
#include "utils.h" #include <stdio.h> #include <string.h> #include <assert.h> #include <stdarg.h> #include <string.h> #include <iomanip> #include <sys/stat.h> #if defined(WIN32) #include <Windows.h> #include <process.h> #include <mmsystem.h> #include <objbase.h> #else #include <dlfcn.h> #include <sys/stat.h> #inclu...
fb19670409206e540b232130368dd76ec320f9da
c1128b995f879cabdc9f2e0c9dce59836a7e22e5
jaichhabra/contest
/cpp/archive/2020/02/13/Educational_Codeforces_Round_82__Rated_for_Div__2____D__Fill_The_Bag/main.cpp
C++
cpp
892
no_license
#include "../../libs/common.h" #include "../../libs/bits.h" using namespace bits; ll log(ll x) { return x == 1 ? 0 : (1 + log(x / 2)); } void solve(int testId, istream &in, ostream &out) { ll n; int m; in >> n >> m; vector<ll> cnts(63 + 1); for (int i = 0; i < m; i++) { ll x; ...
aa547c33d7f1ee9a123f1b1e8ed7c5bdd2053975
7ab5083d8ca3e12f0c42dbf720bda86cd50308f2
DionysiosB/CodeChef
/AUCTION.cpp
C++
cpp
285
no_license
#include <cstdio> int main(){ long t; scanf("%ld", &t); while(t--){ long a, b, c; scanf("%ld %ld %ld", &a, &b, &c); if(a > b && a > c){puts("Alice");} else if(b > a && b > c){puts("Bob");} else if(c > a && c > b){puts("Charlie");} } }
5b8f204bcde992237076a56f6ed09e6f3340cb5c
779514fa2bc013f7688874ed89f815c8e03aa21b
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE122_Heap_Based_Buffer_Overflow/s05/CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806_wchar_t_ncpy_31.cpp
C++
cpp
3,142
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806_wchar_t_ncpy_31.cpp Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE806.label.xml Template File: sources-sink-31.tmpl.cpp */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: Initi...
16e195615c8de5a2a15013b1e9864b82ee89c9f5
e434c013b1a8ead5b8d338cc3f472d2853a576d5
Radhika10128/Algorithmic_Tool
/week1/product.cpp
C++
cpp
635
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; long long product(const vector<int>& arr) { int n=arr.size(); int max_index1=-1,max_index2=-1; for(int i=0;i<n;i++) if((max_index1==-1) || (arr[i]>arr[max_index1])) max_index1=i; for(int j=0;j<n;j++) ...
84eaf43fb618bad1e938d5ff0fcdbee36e62aadc
9f1070c35dfcdf939ae724c8282fc799f9b4060c
ljc25/demo
/41_模拟赛/4.cpp
C++
cpp
480
no_license
#include <bits/stdc++.h> using namespace std; int n,x; bool check(int y) { if(y>2&&y%2==0) return true; for(int i=2;i<=sqrt(y);i++) { if(y%i==0) return true; else continue; } return false; } int main() { cin >> n; for(int i =0;i<n;i++) { cin >> x; if(c...
3eac41f8c8d8ca34d2b57f1ec5029947d95463f8
26c1cc8d2f0266135d27948b79bd5e92fa3bc768
himaniprajapati/carrom
/homescreen.cpp
C++
cpp
813
no_license
#include<simplecpp> int main(){ initCanvas("carrom mania",600,500); Rectangle r0(300,250,600,500); r0.setFill(true);r0.setColor(COLOR("black"));//outer border Rectangle r00(300,250,550,450); r00.setFill(true);r00.setColor(COLOR("yellow"));//inner border Rectangle r1(300,100,textWidth("WELCOME TO CARROM MANIA")+40,60);...
4c789dd86299045bbf526edbe5c1f94c12fc33a9
83618ed0dc1a5362d74ebe02b80564f88b3d4a60
sanghaarsha/CPP-Second-Semester
/text-encrypter/main.cpp
C++
cpp
2,523
no_license
#include <iostream> #include <string> #include <fstream> #include <sstream> // Used methods from std class using std::cin; using std::cout; using std::endl; using std::ifstream; using std::ofstream; using std::string; // Function Declaration void encrypt(const string data, const string key, string); void decrypt(cons...
4a9fbca096e681d41e55d678aea3f62799403283
19c67deab851169cac187d1e07a2f8901a6b68d0
Thaon/Ferret2
/Raay/F2.cpp
C++
cpp
2,289
no_license
#include "stdafx.h" #include "F2.h" F2::F2() { } F2::~F2() { } bool F2::Init(int w, int h) { //Use OpenGL 3.1 core SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); // Init...
0c7477eecdd6abc278df35fa68a7578ea7e9d465
b9aecf8af539762acbd8440e2f371e464b4c40a2
Aadesh-Shigavan/Python_Daily_Flash
/Day_1/00-DailyFlash_Solutions/13_Jan_Solution_One/Cpp/diviby5and11.cpp
C++
cpp
390
no_license
/* Program 5: Write a Program to check whether the number is divisible by 5 & 11 or not. Input: 55 Output: 55 is divisible by 5 & 11. */ #include<iostream> int main(){ int num = 55; if(num%5==0 && num%11==0) printf("%d is divisible by 5 and 11",num);//printf is used in cpp also because cpp is inherited fr...
7c42c51cf36b1ac3916e7aee3ca351fcd85fda30
7d660dd6dad9885ec7a7c08f3dcf5c7863239e21
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_Bigfoot_Chibi_AnimBP_parameters.hpp
C++
hpp
722
permissive
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_Bigfoot_Chibi_AnimBP_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //-------------------------------------------------...
5ea26c0ad7c221cd1b9ed0e3dadaa259a9824aed
291deaf04835f93adc8e986c8f71705c5ec22630
ldc0111/shuatiku
/0.洛谷/普及练习场/Untitled4.cpp
C++
cpp
392
no_license
#include <iostream> using namespace std; int n; int b,maxn = 0; bool zhi(int x) {//ΦΚΚύΕΠΆΟ for(int i = 2; i*i <= x; i++) { if(!(x % i)) { return false; } } return true; } int main() { cin >> n; for(int i = 2; i <= n/2; i++) { if(n % i == 0) { if(zhi(i)) { cout << n/i ...
07204aa7ce7c2de2a38829b608853ca7d9ee2768
a561f9e3d55ba097b32bab0301b33eac2df5017f
xflash/sdl-start-app
/src/HumanSeeker.cpp
C++
cpp
1,592
no_license
#include "HumanSeeker.h" #include "Character.h" #include "systemstub.h" #include "Game.h" #include "tinyXML/TinyXML.h" HumanSeeker::HumanSeeker(Game* game, TiXmlElement* element): _stub(game->getStub()) { _sightRadius=atoi(element->Attribute("sightradius")); _fightRadius=atoi(element->Attribute("fi...
6d559d9bb6e3b1332dcacb3087f63cc2461183e5
f41110c0aae8cf7a58605bbe97817a581e5caecf
choderalab/openmm
/openmmapi/src/CompoundIntegrator.cpp
C++
cpp
5,279
no_license
/* -------------------------------------------------------------------------- * * OpenMM * * -------------------------------------------------------------------------- * * This is part of the OpenMM molecular simulation toolkit originating from * ...
dabdde92976d508cda8953f9483c699d9a5039d6
1a12723bac5958bcd38970c94e7b19fb09b673b3
AurelienBallier/xfstk
/xfstk-sources/plugins/downloader/cloverviewplus/xfstkdldrpluginoptionsinterface.cpp
C++
cpp
11,475
no_license
/* Copyright (C) 2015 Intel Corporation This library 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; either version 2.1 of the License, or (at your option) any later version. This...
9759756ddaaaae2e052ad944aa48a7db101fa4eb
8670d522e98125f1e2e2724486c06adec871f28c
lazybean93/spotian
/tools.cpp
C++
cpp
11,283
no_license
/* * tools.cpp * * Created on: 16.01.2015 * Author: oliver */ #include <iostream> #include <vector> #include <sstream> #include <fstream> #include <iomanip> #include <ctime> #include "tools.h" #include "Variables.h" #include "SpotifyController.h" #include "Timeout.h" #include "VirtualDisplay.h" #include "ut...
a2ebd6e522b84f6370c31a78665fa0b052406647
f403efcaf85946e252146a62fecf40cefafe495a
wjhwsh/Practices2
/llvm/ClangTutorial/old/clangtut/tut04_parse.cpp
C++
cpp
976
no_license
#include <iostream> #include <vector> using namespace std; #include "clang/Basic/IdentifierTable.h" #include "clang/Parse/Parser.h" #include "clang/Driver/InitHeaderSearch.h" #include "PPContext.h" using namespace clang; int main(int argc, char* argv[]) { if (argc != 2) { cerr << "No filename given" << endl; ...
606d64fcf3783addf03721bbb37c94f94447bce6
f04dfb6d77450754ad20a61eaf2ad8c8c9605c60
arielsaadon/Task1_cpp
/PhoneticFinder.cpp
C++
cpp
4,933
no_license
#include "PhoneticFinder.hpp" #include <iostream> #include <string> #include <stdexcept> namespace phonetic { bool equalString(const std::string text,const std::string word){ if(!text.compare(word)) return true; return false; } std::string getWordFromText(const st...
73881bacbb3badc18a16c313c77ca1e3d7e2331e
39a90d8877233a5f6659207188c44e58770f4796
pombredanne/libtools
/dynamic_import_lib/src/importer/importer.cpp
C++
cpp
2,274
no_license
#include "importer/importer.h" #include "utils/prediction.h" #include "dlfcn.h" namespace lib_tools { Importer::Importer(std::string lib_file_name, std::string create_function_name, std::string free_function_name) : _create_func(nullptr), _free_func(nullptr), _handler(nullptr) { _handler...
fe9b0976bf6a02b8e8e22cbf2749c329d9fb4a15
ae5aeaba3bca9c112e17bdaeb666c992683e687e
DeepWolf413/additional-native-data
/gta5/0xEFD79FA81DFBA9CB.cpp
C++
cpp
387
no_license
// fm_bj_race_controler.ysc @ L153717 void func_1665(bool bParam0) { if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false)) { if (bParam0) { func_1532(); } PED::SET_PED_USING_ACTION_MODE(PLAYER::PLAYER_PED_ID(), false, -1, 0); PED::_0x711794453CFD692B(PLAYER::PLAYER_PED_ID(), 0); ...
011281c71080dec482d8b96122042a91d33b6728
97f56784d22323fe097ec4a24be65b3e1db4f069
limberc/mindspore
/mindspore/core/c_ops/atan.cc
C++
cc
722
permissive
/** * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
fd859efc5d8aa5d2fc7624c3501e63bb2d838eff
868c403307ad3110be550355862a7d0fad663352
sanjaysupanch/code
/fibonacci.cpp
C++
cpp
262
no_license
#include<iostream> using namespace std; int fib(int n){ if(n<=1) return n; return fib(n-1)+fib(n-2); } int main(){ int n=10; for (int i=0; i<n; ++i){ cout << fib(i) << " "; } return 0; cout << "fibo in recursion"; }
abe1b3bc001842f9fa81709500477807101cf6ae
28de6166b128183120b72112953c5132bda62b59
xavierr/opm-parser
/opm/parser/eclipse/Deck/Deck.cpp
C++
cpp
3,066
no_license
/* Copyright 2013 Statoil ASA. This file is part of the Open Porous Media project (OPM). OPM 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 l...
4462955929b63e231e9409fff8ac7dc4c9d24323
b78097c6ac945cb39a613f68fb05ee7926d05b6e
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_old_hunk_3655.cpp
C++
cpp
456
no_license
/* Make user name all upper case - for some versions of ufork() */ ap_str_toupper(username); pid = ufork(username); if (pid == -1 && errno == EPERM) { ap_log_error(APLOG_MARK, APLOG_EMERG, errno, ap_server_conf, APLOGNO(02171) "ufork: Possible mis-c...
b4c6cfcda88d442fce016d93f3d708e6fb86b50b
d503602d5392b52b0ff31409aeeeae399a18feae
BenQuickDeNN/LeetCodeSolutions
/移动零b.cpp
C++
cpp
352
no_license
#include <vector> using namespace std; class Solution { public: void moveZeroes(vector<int>& nums) { // 直接覆盖法 int idx = 0; for (int i = 0; i < nums.size(); ++i) if (nums[i] != 0) nums[idx++] = nums[i]; while (idx < nums.size()) nums[...
967bfce0217bc41cf2b5f1aaf6c6cb9b7c5b9b8a
8512cb16cc97f3b2121b0d50c4c01698d1f6c0cc
jixhua/QQmlQuickBook
/sstd_utility/windows_boost/boost/integer/integer_log2.hpp
C++
hpp
2,248
no_license
// ----------------------------------------------------------- // integer_log2.hpp // // Gives the integer part of the logarithm, in base 2, of a // given number. Behavior is undefined if the argument is <= 0. // // Copyright (c) 2003-2004, 2008 Gennaro Prota // // Distributed under the Boost Software Licens...
7651f63c996b5f27ace6d9d8b5bcabbf81038842
fe06187b5c9b4ad1cf86f5feb79334843997b0f0
jDomenech/opencv
/modules/ocl/src/interpolate_frames.cpp
C++
cpp
10,671
no_license
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
44e965fc818dd34881c2d731cee5f2f0119772be
9f16d8ba663fd25369ff5658291207b71d62acfa
iFunFactory/engine-dedicated-server-example
/dedi-shooter-ue4-client/ShooterGame/Plugins/Funapi/Source/Funapi/Private/google/protobuf/io/strtod.cc
C++
cc
4,619
no_license
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
aef58065774f432543a74ed06db2fe46dc1714ab
ff676db56414b28a6a8986670d5def976e6e88b8
xinsec/chromium
/src/content/browser/frame_host/render_frame_host_impl.cc
C++
cc
141,086
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/frame_host/render_frame_host_impl.h" #include <algorithm> #include <utility> #include "base/bind.h" #include "base/command_lin...
c0cc7ca574c3d498b8fcfeef9571d388db01a58b
a8ca29b35edd598327e5aa7e597a167916070f6f
KaiHangYang/leetcode_solutions
/208/main.cpp
C++
cpp
1,924
no_license
#include <iostream> #include <vector> #include <string> using namespace std; const int ALPHA_COUNT = 26; struct TrieNode { bool is_word; TrieNode * children[ALPHA_COUNT]; TrieNode() { this->is_word = false; for (int i = 0; i < ALPHA_COUNT; ++i) this->children[i] = nullptr; } }; class...
be8126bc41c970ff321abdd8c95738a366f760af
4c10d76690a2a69420bad2052d7f17608c1c3cd0
Altinity/ClickHouse
/src/Analyzer/QueryNode.cpp
C++
cpp
12,958
permissive
#include <Analyzer/QueryNode.h> #include <fmt/core.h> #include <Common/assert_cast.h> #include <Common/SipHash.h> #include <Common/FieldVisitorToString.h> #include <Core/NamesAndTypes.h> #include <IO/WriteBuffer.h> #include <IO/WriteHelpers.h> #include <IO/Operators.h> #include <Parsers/ASTExpressionList.h> #inclu...
29162af3895a1e5b39fc7889b1f96d3e2b588b18
cbd69e2f4912dc8376644c4ebc3baf94d75e9ac2
hramos/react-native
/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/ComponentNameResolverManager.cpp
C++
cpp
2,631
permissive
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <string> #include <fbjni/fbjni.h> #include <jsi/jsi.h> #include "ComponentNameResolverManager.h" #include <react/render...
e9ed9d6357d9f92efc2066ebeef6a1084720089a
522c99f67c2b388cd2cd0e66e94c07e3d77ef841
jakwuh/acm
/acmp/29.cpp
C++
cpp
690
no_license
#include <iostream> #include <cmath> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int n; scanf("%d", &n); int a,b,c; switch(n) { case 1: cout << 0; break; case 2: scanf("%d %d", &a, &b); cout << abs(a - b); ...
e4bb0615a133aca37d9b41fb8eb334a2e0c566f3
127b46c7f42608a8d86f9a0aa529bde6643dae95
Warrelis/Acid
/Sources/Fonts/FontMetafile.cpp
C++
cpp
3,837
permissive
#include "FontMetafile.hpp" #include "Files/FileSystem.hpp" #include "Helpers/String.hpp" #include "Resources/Resources.hpp" namespace acid { FontMetafile::FontMetafile(std::string filename) : m_filename(std::move(filename)), m_verticalPerPixelSize(0.0f), m_horizontalPerPixelSize(0.0f), m_imageWidth(0), m_space...
a2a6ac2f3e65c0b312bc51af62a2a8bcd51a5cc1
419fc52a8075ab73b7bf377b18c7f0aa7f658691
subhashreddykallam/Competitive-Programming
/Codeforces/Codeforces Round #135 (Div. 2) - 219/219A-k-String.cpp
C++
cpp
630
no_license
#include<bits/stdc++.h> using namespace std; # define ll long long # define append push_back # define add insert # define loop(i, k, n, inc) for(ll i = k; i < n; i+=inc) # define rloop(i, k, n, inc) for(ll i = k; i > n; i+=inc) int main(){ ios_base::sync_with_stdio(false); ll k; cin>>k; string s; cin>>s; ...
f597c9e610b2c1acac6fb5cefb0ba9bda58e3a53
ef37316b0110fa30377d9e2c1db501677384e241
jaredml/CSE100
/Lab08/Lab5_2.cpp
C++
cpp
1,901
no_license
//HashSort #include <iostream> #include <list> using namespace std; void HashInsert(list<int> T[], int k, int a_size); void HashSearch(list<int> T[], int k, int a_size); void HashDelete(list<int> T[], int k, int a_size); //Hash Insert function void HashInsert(list<int> T[], int k, int size){ int h = k % size; // k ...
da52edbbec36ae81b66f09ae1ffa52937509a990
cf553b479c41175ed0ba774b0022779de03eec1d
engh666/data-algo
/lab2/lab 2 serch/ConsoleApplication1/ConsoleApplication1.cpp
C++
cpp
7,154
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <fstream> #include <string> #include <vector> #include <omp.h> #define NO_OF_CHARS 256 #define ASIZE 500 #define XSIZE 500 using namespace std; class SR {public: vector<int> index; double timer_start = 0; double timer_end = ...
82d0b8fefa91c522041d55f37a20787f90189f2f
9dd187479c1082e0ae1bc510ad5329381b7341f0
GoldFiish/OPGG_Add-on
/qmlclipboardadapter.cpp
C++
cpp
252
no_license
#include "qmlclipboardadapter.h" QmlClipboardAdapter::QmlClipboardAdapter(QObject *parent) : QObject(parent) { clipboard = QGuiApplication::clipboard(); } void QmlClipboardAdapter::setText(QString text){ clipboard->setText(text); }
daf19ab391b2d4c26a4a495b16769c6d0948b272
0096004dbf2211f8d755f6f162bb563fb945702d
lsccsl/lin3d
/build/demo/test_easy/test_easy.cpp
C++
cpp
4,908
no_license
#include "l3_engine.h" using namespace l3eng; float light_x = 0.0f; OBJ_ID old_obj_id = -1; OBJ_ID old_tr_id = -1; OBJ_ID __light_id; int __idx = 0; OBJ_ID __rtt_sence; OBJ_ID __cube_bg; class test_listerner : public default_listener { public: test_listerner(l3_engine * eng):default_listener(eng) {} virtual ...
ba44c9db9fc042565c136094b1b60e95f6160d45
4b4926fab43f4be48f6bd0bbaa48ba5181b1b0a8
berber1016/chromium
/content/browser/compute_pressure/cpu_probe.cc
C++
cc
1,519
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 "content/browser/compute_pressure/cpu_probe.h" #include <memory> #include "base/no_destructor.h" #include "base/sequence_checker.h" #include "b...
5faa349e8049c25dca02113835e1326ba29f2b12
e213b5e69cecc21a590d06ce418084c4450e091c
junaidnz97/Competitive-Programming
/HACKEREARTH/Practice/Feasible_Relations.cpp
C++
cpp
1,129
no_license
#include<bits/stdc++.h> using namespace std; int dfs(vector<vector<int> >&gg,vector<int>&visited,int i,int set_no,vector<int>&finset) { if(visited[i]==0) { visited[i]=1; int j; finset[i]=set_no; for(j=0;j<gg[i].size();j++) { if(visited[gg[i][j]]==0) { dfs(gg,visited,gg[i][j],set_no,finset); ...
d99dc507f4f199fef907dd6021b90d98056e758b
60de74f416ef285ff5a2c179405611993b94b78a
jdavidberger/CMake
/Source/cmFindPackageCommand.cxx
C++
cxx
68,942
permissive
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFindPackageCommand.h" #include <algorithm> #include <assert.h> #include <cmSystemTools.h> #include <cmsys/Directory.hxx> #include <cmsys/FStream.hxx> #include ...
220e0b8e3cddd986c7462efcfe39c1d05c98b8ab
fdfbc4d8540539f2da8abf57b049b3f7bc7e9203
tn-mai/DX12Tutorial
/08/DX12Tutorial08/Src/Action.cpp
C++
cpp
12,052
permissive
/** * @file Action.cpp * * スプライトの動作を制御するスクリプト. * スプライトの移動、回転、消滅、他のスプライトの生成などの各要素について、 * 目標値、動作時間、間隔といったパラメータで制御する. * 漂白剤 お風呂パイプ洗浄液x2 */ #include "Action.h" #include "Sprite.h" #include <vector> #include <string> #include <set> #include <algorithm> using namespace DirectX; namespace Action { ...
a56cd2d7f3bf7d11d8cdbd714c7c27d337325e85
a04c076f9a548deb3eeb7f7158afd68f13bb6905
LeeJunJae/MyStudy
/Level_02/02/FruitSeller.cpp
C++
cpp
587
no_license
#include "FruitSeller.h" void FruitSeller::InitMembers(int applePrice, int numofApple, int money) { this->applePrice = applePrice; this->numofApples = numofApple; this->money = money; } int FruitSeller::salesApple(int num) { numofApples -= num; money += (num*applePrice); return num; } void FruitSeller::Show...
78a17883ad25e8c1afee8cba9ba03eaf2249186f
500005811cea51b7e69c8026aa23bd39a1072e4a
jiangsongyang/v8
/src/init/vm-cage.cc
C++
cc
3,193
permissive
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/init/vm-cage.h" #include "include/v8-internal.h" #include "src/base/bits.h" #include "src/base/bounded-page-allocator.h" #include "src/ba...
620a172140fc668a5326597173a1e93f4ba7230d
bfe768ee31192d5ee3ff17455f15d0111fa92fc7
ngrundback/q
/libs/q/src/lib.cpp
C++
cpp
865
permissive
/* * Copyright 2013 Gustaf Räntilä * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
32cb2c3208269c69cf74511f9f75417a22bda085
824786f00aab674930215b1bfacaeb3f7ae28aa0
rkalit/OpenGL
/OpenGL/TRIANGLE/GL_TRIANGLE_STRIP.cpp
C++
cpp
762
no_license
/* Code Modified by : Name : Anggiat Maruli Tua M ID : 11S16051 */ #include<GL/glut.h> void init(void) { glClearColor(1.0, 1.0, 1.0, 0.0); glMatrixMode(GL_PROJECTION); gluOrtho2D(0.0, 200.0, 0.0, 150.0); } void lineSegment(void) { glClear(GL_COLOR_BUFFER_BIT); glColor3f(0.0, 0.4, 0.2); glBegin(...
699031f4556293e20bea0d64416d36fc2efce491
54687f3b7412c6fd33df297919aa34a6b4361d26
Namdrib/typeshift-solver
/typeshift_solver.cpp
C++
cpp
3,633
permissive
#include "typeshift_solver.h" // --- PUBLIC --- typeshift_solver::typeshift_solver() { ; } typeshift_solver::typeshift_solver(ifstream &ifs) { read_dictionary_words(ifs); } // Read words from an input stream (one word per line) to build into dictionary_words // This dictionary will be used as a list of "real" wo...
d44ebe59509831df311d65387d888badc307f70e
73d005c63cb47087b6898601ac3c3ec376b84ed2
T-tasir/Competetive-Programming
/2020/December/A. Short Substrings.cpp
C++
cpp
2,280
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double dl; typedef unsigned long long ull; #define pb push_back #define PB pop_back #define nn "\n" #define O_O ios_base::sync_with_stdio(false); cin.tie(NUL...
bc65b5bd7276c714d594fbca4b734edea354927e
8f6797d881b1fd528663fbd2f1d2507b9e45d61d
calvinxiao/Algorithm-Solution
/ZOJ/2274.cpp
C++
cpp
1,329
no_license
/* #Problem ID: 2274 #Submit Time: 2013-09-29 15:10:20 #Run Time: 330 #Run Memory: 192 #ZOJ User: calvinxiao */ #include <iostream> #include <cstdio> #include <set> #include <vector> #include <map> #include <stack> #include <queue> #include <cmath> #include <algorithm> #include <cstring> #include <string> #...
3431348dd3f05fa6bdac7d59bfe415a4a4681202
a0e5ab6dad4ef686f2df228c4d6ec077848cf2b4
JeroenDM/arf
/arf_graph/src/graph.cpp
C++
cpp
4,034
permissive
#include "arf_graph/graph.h" #include <algorithm> #include <cmath> #include <iostream> #include <queue> double costFunction(Node n1, Node n2) { double cost = 0; int s = (*n1.jv).size(); for (int i = 0; i < (*n1.jv).size(); ++i) { cost += std::fabs((*n1.jv)[i] - (*n2.jv)[i]); } return c...
37f5c28fc8d01a104d193a5f9f4a328040af6c6f
7c2b5158d1c0701e849cd54afef139d49ff06871
DerNerger/Siedler
/Sourcecode/Model/diceboni.cpp
C++
cpp
376
no_license
#include "diceboni.h" QString DiceBoni::getBoniAsText(){ QString str = "Rohstoffwürfel "; QMap<int, int>::iterator i; for (i = dices.begin(); i != dices.end(); ++i) { if(i.value()>0) str += QString("%1W%2,").arg(i.value()).arg(i.key()); } str.chop(1); return str; } QMa...
0adb8ec0aa52beb0300c2ef6fd9c2538ae87c671
7872dd57cd1037778bacbea2c773c6013b7989de
Jonkoping/data
/src/Platform/Code/Diag_Export/QualcommDiag.cpp
C++
cpp
52,231
no_license
#include "stdafx.h" #include "QualcommDiag.h" #include "Header_MotoXPRS.h" #include "..\Lib\msm\nv_items.h" #include "..\CommonUtil\UnicodeUtility.h" #include "..\CommonUtil\PIMStringUtility.h" #include <stdio.h> #include <assert.h> CQualcommDiag::CQualcommDiag(LPCTSTR lpszModelName, int nComPort) :m_bC...
f2105ba611e669c5a24d3221bd104756c2184e56
9b7f5537c91cc992f33f0955ea1d906177b3be68
FransBouma/InjectableGenericCameraSystem
/Cameras/AssassinsCreedOrigins/InjectableGenericCameraSystem/Overlay/imgui_demo.cpp
C++
cpp
142,269
permissive
#include "stdafx.h" // dear imgui, v1.52 // (demo code) // Message to the person tempted to delete this file when integrating ImGui into their code base: // Don't do it! Do NOT remove this file from your project! It is useful reference code that you and other users will want to refer to. // Everything in this file wil...
fc4897ca7903363a61bce94eb2d32ea769a06ee5
c39bc5b0a7022659ecdd5fe330d6082c85565c2e
shanPic/CodeOfAcm
/2017训练比赛/1-2/c.cpp
C++
cpp
252
no_license
#include<bits/stdc++.h> using namespace std; int a[100000+30]; int main() { int n; int ma=-1,mi=0x3f3f3f3f; cin>>n; int x; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); cout<<a[n-1]+a[1]-(a[n-2]-a[0])<<endl; }
5b6a0998f517354d671d7d2644f145a0be502670
cfc4272a7c1d9be49db5867af153a010f774d034
Tolganay17/coursework
/myproj/applicant.cpp
C++
cpp
307
no_license
#include "applicant.h" void applicant::getInfo() { system("CLS"); cout << "\t\tAPPLICANT INFORMATION"; cout << "\nEnter FIRST NAME: "; cin >> firstname; cout << "\nEnter LAST NAME: "; cin >> lastname; cout << endl; cout << "Enter GPA: "; cin >> GPA; cout << endl << endl; }
5eb2f1f4df93490da47fda417317891515c2046a
b92b42ecb0dc00eaa73142d6b1bbf83f83eaa479
passthefist/OpenSGToolbox
/Source/Contrib/UserInterface/src/Component/Misc/OSGRotatedComponent.cpp
C++
cpp
15,610
no_license
/*---------------------------------------------------------------------------*\ * OpenSG * * * * * * ...
02cd4d646ce94b744d4f5427937ee3b36be40844
28c5548abbb6dea763f6e5774eba6b3371163848
DongzhenHuangfu/CarND-PID-Control-Project
/src/main.cpp
C++
cpp
3,659
permissive
#include <uWS/uWS.h> #include <iostream> #include "json.hpp" #include "PID.h" #include <math.h> // for convenience using json = nlohmann::json; // For converting back and forth between radians and degrees. constexpr double pi() { return M_PI; } double deg2rad(double x) { return x * pi() / 180; } double rad2deg(double...
e48072343033b14dca91b994f55dada1c8796eda
14f62cc2206a4e0b73aae8f89f5dc6be7663ed52
liang0/chromium
/third_party/blink/renderer/modules/indexeddb/idb_transaction.cc
C++
cc
24,525
permissive
/* * Copyright (C) 2010 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of condit...
89c27e11ec58af41dca07c153b74b8f5aad90b9c
7de014bddc58060752848f95c1108f1c2887ad33
mvanotti/fuchsia-mirror
/examples/diagnostics/inspect/codelab/cpp/part_5/reverser_unittests.cc
C++
cc
3,804
permissive
// Copyright 2020 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 <lib/fidl/cpp/binding_set.h> #include <lib/gtest/real_loop_fixture.h> #include <lib/inspect/cpp/inspect.h> #include <lib/inspect/testing/cpp/inspe...
b66a2326087ad7a17d922b94803f05d6bd937489
befd49f81498a78f3a05baf8a662e7a2248baeb4
wlinnp/Gravitation-Simulation
/Game.cpp
C++
cpp
8,915
no_license
//Wai Phyo //Robert Harris //CS256-HW5 //Completed on 007/2016 #include <cmath> #include <cstdlib> #include <ctime> #include <fstream> #include "Game.h" //Helper functions double colliVelX(double m1, double m2, double v1, double v2, double theta1, double theta2, double phi) { return ( ((( (v1 * cos(theta1 - phi) *...
077f4d15cca7364ac8b675d4ed9cdc45001b36cf
7c5136982fdc8c062a16f706f3f0f9fd036af72b
DamienLeBars/Surelog
/src/DesignCompile/DesignElaboration.cpp
C++
cpp
63,066
permissive
/* Copyright 2019 Alain Dargelas Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
feaea2180be36b68e0ae1c29380a384dbdd1a25c
359e4a4c296d3bb3f1f203318ba2f756afed0d36
kingjci/Intel-Xeon-Phi-Bachelor-Thesis-
/matvec/vec-padding/main.cpp
C++
cpp
2,796
no_license
/** * @file main.cpp * * Matvec - Matrix and vector multiplication (Vectorization) * Source file of main function (and other auxiliary functions) * * Bachelor Thesis FIT VUT 2015 * * @author: Dominik Simek <xsimek23@stud.fit.vutbr.cz> */ #include <cstdio> #include <cmath> #include "matvec.h" #include "...
35fac2d3457a14ca1e15d228b757e323dea7cdde
2ccea6fc7ea4e5d0eb1735eb65ede643e5b4bbcb
jainamandelhi/Hackerrank-Solutions
/Coding Skills.cpp
C++
cpp
725
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { long n,x; cin>>n>>x; vector<long>arr(n); for(long i=0;i<n;i++) cin>>arr[i]; for(long i=0;i<n;i++) { arr[i]-=x; } long maxtil...
6bcfd9618d363ff5c4fbb8f90df3c4e69141431a
7cf363cb907da3f161808eecabb3646f6fa7bee9
lherman-cs/cs4050
/homework-3/src/utils.cc
C++
cc
1,040
permissive
#include "utils.hpp" #include <float.h> #include <cmath> #include <iostream> #include <limits> // Calculate diffuse illumination using phong shading // Parameters: // to_source: a normalized vector from a point on a surface to the light // normal: a normalized normal of the surface // // Returns: // diffuse contrib...
8318e386f8e3ca527a59bfde32fd5f359b9ad4c9
7d94b9d092979f1275bd7ad8b5c20c09d4680fec
Walkermc17/myRepository
/AlgoReverb-master/Source/FBCF.hpp
C++
hpp
944
no_license
// // FBCF.hpp // // Created by Eric Tarr on 2/6/20. // Copyright © 2020 Eric Tarr. All rights reserved. // #ifndef FBCF_hpp #define FBCF_hpp #include "FractionalDelay.hpp" using namespace std; class FBCF { public: // Constructor function (special function - no return type, name = Class name) FB...
935ef095eb631e0cd033e110a808b897616d5816
e175cfa6e781aea48ff8d3440fae7b741ac6d214
lisajamhoury/CinderTest
/xcode/RightSensor.hpp
C++
hpp
242
no_license
// // RightSensor.hpp // Sketch1 // // Created by Lisa Jamhoury on 10/12/16. // // #pragma once class RightSensor { public: RightSensor(); void update(); void draw(); cinder::vec2 mLoc; cinder::vec2 mVel; };
61cf57f1faefb05b57c3471f3932c43b14ad4d4e
18d8e5833a0f3dbf58be953518b0a9c4da82bb8c
ot316/enigma_machine
/main.cpp
C++
cpp
2,357
no_license
#include"errors.h" #include"machine.hpp" #include"rotor.hpp" #include"reflector.hpp" #include"plugboard.hpp" #include<iostream> #include<string> #include<list> #include<fstream> //function to check user input int checkUserInput(char ch); //function to check and parse command line arguments int parseArguments(list<s...
7c3878bdce69b33c12b33718f7576a372654ae84
5499c7d237b3880c133a5a65dd24fb3bd62e557d
daliborristic883/HairColorChange
/HairChange/HairChange/boost/intrusive/splay_set.hpp
C++
hpp
45,832
permissive
///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2007-2014 // // 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) // // See http://w...
c61415df5ca694446888c90957d956d957e7f238
16cb327bc7520fca450b33fd513cbecc4a0246a4
andrewwiik/AceyDeucey
/AcesDeuces/Card.hpp
C++
hpp
980
permissive
#ifndef Card_hpp #define Card_hpp #include <iostream> #include <sstream> enum class Rank { Ace, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King, Unknown }; //suits of cards in a deck enum class Suit { Hearts, Diamonds, Clubs, Spa...