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 |
|---|---|---|---|---|---|---|---|---|
04487a39af72630bb6e074389e89f00a9866b2d6 | 8985dc2faf51ade4e2c035c962ac07714025ae17 | forsyth2/lbann | /include/lbann/utils/profiling.hpp | C++ | hpp | 1,827 | permissive | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... |
ecf593b35b514dcc9a59a063cde8ad7661086ca5 | 707eb80c756050656218a3e888119194ae0d41a6 | 299299/golden_game_engine | /Source/Game/Engine/Graphics/Graphics.cpp | C++ | cpp | 18,160 | no_license | #include "Graphics.h"
#include "Log.h"
#include "DataDef.h"
#include "MemorySystem.h"
#include "Profiler.h"
#include "Engine.h"
//============================================
#include "RenderCamera.h"
#include "DebugDraw.h"
#include "ShadingEnviroment.h"
#include "Material.h"
#include "Light.h"
#include "Mesh.h"
#inclu... |
a5252703df3bac3e9add276a5acbb1836d7a0ac2 | 270467762d1547a8ac32eb112e4b7dab282c4a51 | MaraVG/Practicas-C | /C++/funchora/main.cpp | C++ | cpp | 391 | no_license | #include "funch.h"
int main()
{
Hora h1(86399), h2(3601), h3;
cout << "h1 debe decir 23:59:59 - dice: <" << h1 << ">" << endl;
cout << "h2 debe decir 1:0:1 - dice: <" << h2 << ">" << endl;
h3 = h1 + h2;
cout << "h3 debe decir 1:0:0 - dice: <" << h3 << ">" << endl;
Hora h4(172799), h5(h3);
cout << "h4 debe decir 0:0:0... |
8c6f84b5141517ca7b69fd044ee7fa0424f3cfc2 | 9916423a4ba74c49d41ecdc5f3d63e96ce457a8e | xulunfan/magma | /sparse-iter/src/zjacobi.cpp | C++ | cpp | 21,353 | no_license | /*
-- MAGMA (version 2.0.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date February 2016
@author Hartwig Anzt
@precisions normal z -> s d c
*/
#include "magmasparse_internal.h"
#define RTOLERANCE lapackf77_dlamch( "E" ... |
6d3cf0eae3690326de16d03a9506d044b9cc1f07 | e2ac9d0e1b3e25d93b91789ba7be9f3ff876a2fa | AgriyaRavindra/codeforces | /old/rswap.cpp | C++ | cpp | 1,087 | no_license | #include<bits/stdc++.h>
using namespace std;
#define FOR(x,n) for(int i=x; i<n; i++)
#define pb push_back
typedef long long ll;
int solve(vector<string> v){
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll t,q,k;
cin>>t>>q;
ll s = pow(2,t);
vector<ll> v;
FOR(0,s){
ll n;
... |
2b5add6e259e15f64c121c0c2ebd195b4d33f37a | 0ced4ee12ac51aa85fb8c3194c5c025839ad5905 | MoKee/android_frameworks_base | /core/tests/webkit/apk_with_native_libs/jni/WebViewTestJniOnLoad.cpp | C++ | cpp | 725 | permissive | /*
* Copyright (C) 2017 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... |
9b249bf2419b710706ce43f0a50874f0ae2748d9 | c4edff49aa6b1119a801d25ca3560b93768a20e7 | NocturnalShadow/OpenGL_RenderingEngine | /OpenGLTutorialProject/shader.cpp | C++ | cpp | 3,448 | no_license | #include "shader.h"
#include <string>
#include <fstream>
#include <iostream>
#include <utility>
static std::string LoadShader(const std::string& fileName);
static void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, const std::string& errorMessage);
static GLuint CreateShader(const std::string& text, GLe... |
1625041aa0cca2d21b9d3e6aaddbf78449f20294 | c48a67d4e84e91fcfdaf8d08b69df29888597a8b | mofed8461/V5CrossCompile | /V5Compiler.cpp | C++ | cpp | 1,285 | no_license |
#include "V5Compiler.h"
#include <dirent.h>
void V5Compiler::SetCommandLine(const string& cmdline)
{
this->cmdline = cmdline;
}
string V5Compiler::GetCommandLine()
{
return cmdline;
}
void V5Compiler::SetArgs(const string& args)
{
this->args = args;
}
string V5Compiler::GetArgs()
{
return args;
}
... |
34431f7129d9b6a0405eda6761ebcc193a963be2 | 772e11c5180c80b82ea67783096e2258faf937b1 | lindakovacs/hhvm | /hphp/runtime/vm/hhbc.cpp | C++ | cpp | 31,088 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
cf951e24f4d6f836ec6ceb571eec12c5544c4348 | c72d851b0e442d2ba1b2165398cdcc32a86b6937 | smartdevicelink/sdl_core | /src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_response.cc | C++ | cc | 2,525 | permissive | /*
Copyright (c) 2018, Ford Motor Company
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 fo... |
51c904dac4d32db3a885b61e39f92a2cb150749c | c2c413666c9a27f59021cd42bd6752c17ff8d058 | sherwin-dc/C-to-MIPS-Compiler | /src/codegen/three_op_arithmetic.cpp | C++ | cpp | 12,353 | no_license | #include "codegen.h"
/* a:t = b:t op c:t
{1, #1, f, #3, f, +, #4, f} */
bool is_integral_type(const string type);
int is_pointer_array_type(const string type);
void op_plus(const statement_3AC &line) {
// check for and perform pointer arithmetic
int b_sz = is_pointer_array_type(line.bt);
int c_sz = is_pointe... |
ec6b6b65dc147ea4c5e45ecfff61d58cb58ed7e3 | 076e68b412977f5fe2ba7593854cb45835fd9834 | Abhi-Gautam/Codeforces | /B_Caisa_and_Pylons.cpp | C++ | cpp | 334 | no_license | #include <iostream>
using namespace std;
int main()
{
int n, e(0), d(0);
cin >> n;
int p[n];
p[0] = 0;
for (int i = 1; i <= n; i++)
{
cin >> p[i];
e += p[i - 1] - p[i];
if (e < 0)
{
d -= e;
e = 0;
}
}
cout << d << endl;
... |
954081964fe70b73e56d9164ba242319f92af3fc | 27c4317087e0e424c616e2483dbddc2c526e7353 | malcom2073/obdtool | /qmlwindow.cpp | C++ | cpp | 6,639 | no_license | /**************************************************************************
* Copyright (C) 2010 by Michael Carpenter (malcom2073) *
* malcom2073@gmail.com *
* *
* This fil... |
dded9e3aaea1d2183afb728083e1194bc9765ba1 | f460a7647adc5f2041fddcb6e2f522d1361467bd | Allyn69/tensorflow | /tensorflow/core/graph/graph_constructor.cc | C++ | cc | 59,657 | permissive | /* Copyright 2015 The TensorFlow Authors. 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 by applicable law or a... |
e5b7185833e9992dadf54e4553c647201b7156a4 | a03e973ec7b45f35a6f501d5d0c72a1415ddc670 | shreysingla11/ssl-project | /Backend/Parser/submissions/Assignment 11/39.cpp | C++ | cpp | 2,699 | no_license | #include<iostream>
#include<string>
#include<stdio.h>
#include<unordered_map>
using namespace std;
int main(){
char C[26];
for(int i=0;i<26;i++){
C[i] = 'a' + i;
}
long long A[46];
long long temp=1;
for(int i=0;i<46;i++){
A[i] = temp;
temp*=2;
}
int B[26][5];
... |
666d1cf38553598e52ad70e0c4ab782a2cd17edc | af39b14c44fb99091a09aac7d6587291e6af40d6 | t-kameyama/kotlin | /kotlin-native/runtime/src/gc/common/cpp/GC.hpp | C++ | hpp | 3,354 | permissive | /*
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
#pragma once
#include <atomic>
#include <cstdint>
#include "ExtraObjectData.hpp"
#include "GCScheduler.hpp"
#include "Memory.h"
#include "Utils.hpp"
#include "std_sup... |
5ecdcca57360de1d1c743168a66a97d2848eaa0f | 09ed2ea13d5cf5e21b7d9bfbb640a22ce5edb041 | zionhjs/LeetCode-Problem-List | /Divide_Conquer/1649.Create-Sorted-Array-through-Instructions/1649.Create-Sorted-Array-through-Instructions_v1.cpp | C++ | cpp | 1,659 | no_license | class Solution {
int numSmaller[100005];
int temp[100005];
int count[100005];
int sorted[100005];
int M = 1e9+7;
public:
int createSortedArray(vector<int>& nums)
{
int n = nums.size();
for (int i=0; i<n; i++)
sorted[i] = nums[i];
... |
a288b9cfff271456ef9bab97feb6cc04aec94f6c | aa082a6616ea3688ea560ea02b53e6ab2626e63e | feserafim/gecode | /gecode/gist/treecanvas.hh | C++ | hh | 12,494 | permissive | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Guido Tack <tack@gecode.org>
*
* Copyright:
* Guido Tack, 2006
*
* Last modified:
* $Date: 2012-05-01 08:25:23 +0900 (火, 01 5 2012) $ by $Author: tack $
* $Revision: 12803 $
*
* This file is part of Gec... |
d4bc29cf6f195626ba7cf392ac2a6775742af507 | f103a7ee0748b2294b03b4d5b27a3c6736849fa1 | mohamed-amine-aouadi/my-hotel | /modifier.cpp | C++ | cpp | 2,799 | no_license | #include "modifier.h"
#include "ui_modifier.h"
#include <QTabWidget>
#include "animation.h"
#include "equipement.h"
#include <QMessageBox>
#include <QPixmap>
#include <QPrintDialog>
#include <QPrinter>
#include <QTextDocument>
#include <QTextStream>
#include"QDate"
#include <iostream>
#include "statistique... |
0169c4940056aa72d1a3b3654c3c48031bae1edc | 79ec8a3d26a9c62daa054b84eadb7a240d78f95a | bmclaine/ProtoTowers | /Code/InfernoEngine/Inc/Core/Private/ThreadPool/WorkerTypes/WorkerThreadFuctionPointers.cpp | C++ | cpp | 575 | no_license | #include "ThreadPool\WorkerTypes\WorkerThreadFuctionPointers.h"
#include "AssertHelper.h"
WorkerThreadFuctionPointers::WorkerThreadFuctionPointers()
{
WorkFunction = nullptr;
CallbackFunction = nullptr;
DeleteOnFinish = false;
}
WorkerThreadFuctionPointers::~WorkerThreadFuctionPointers()
{
}
void WorkerThreadFuct... |
875e0676e0a4070a32e585ee031564941ae00e28 | 6d6c64fc30da398499476fc4f0876d85d4d85786 | thegamer1907/Code_Analysis | /DP/1754.cpp | C++ | cpp | 1,617 | no_license | #include <bits/stdc++.h>
#define LL long long
#define nod 1000000007
using namespace std;
LL f[10],f1[10];
LL arr[1001000];
LL pe(LL a,LL b)
{
if(b==0) return 1;
LL re=1;
while(b>1)
{
if(b%2==0)
{
b=b/2;
a=a*a%nod;
}
... |
6e650a7b8469200b5b7126a513ad563a757a8b75 | 8d7c26e967f41a66df4e06db994d60a43e11c08c | kokizzu/ClickHouse | /src/Common/Config/ConfigProcessor.cpp | C++ | cpp | 26,562 | permissive | #include <Common/config.h>
#include "ConfigProcessor.h"
#include "YAMLParser.h"
#include <sys/utsname.h>
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <functional>
#include <filesystem>
#include <boost/algorithm/string.hpp>
#include <Poco/DOM/Text.h>
#include <Poco/DOM/Attr.h>
#... |
a53e64788b263830575d7e30bb375a4bfbddcb6d | ca058265a60ff022d21e2c1515e0955ddd0c4ecc | laien529/chromium | /base/feature_list.cc | C++ | cc | 23,151 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/feature_list.h"
#include <stddef.h>
#include <utility>
#include <vector>
#include "base/base_switches.h"
#include "base/debug/alias.h"
#... |
e82bca29ef409061d7d014a149b4a44c8986b33b | 77e51b826435b83b462d9b339a8940a5822f2232 | BitcoinClassicDev/BitcoinClassic | /src/util/strencodings.cpp | C++ | cpp | 19,023 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The BitcoinClassic Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <util/strencodings.h>
#include <tinyformat.h>
#include <algorit... |
69659c0f90c81ba518a07fe93ccb9f27914c3c76 | 86f69cb5662a464e6d35f2c68a50ef43468e64f8 | msun2018/test2 | /MFCApplication2Doc.cpp | C++ | cpp | 2,950 | no_license |
// MFCApplication2Doc.cpp : implementation of the CMFCApplication2Doc class
//
#include "stdafx.h"
// SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail
// and search filter handlers and allows sharing of document code with that project.
#ifndef SHARED_HANDLERS
#include "MFCAppli... |
27b6ef0a5cd36ca7bf15ab29d361944b84bfc5e8 | 8fc778de47177254729165811aa050c664c62739 | pmiddend/libawl | /include/awl/backends/windows/window/event/combine_result.hpp | C++ | hpp | 519 | permissive | #ifndef AWL_BACKENDS_WINDOWS_WINDOW_EVENT_COMBINE_RESULT_HPP_INCLUDED
#define AWL_BACKENDS_WINDOWS_WINDOW_EVENT_COMBINE_RESULT_HPP_INCLUDED
#include <awl/backends/windows/window/event/return_type_fwd.hpp>
namespace awl
{
namespace backends
{
namespace windows
{
namespace window
{
namespace event
{
awl::backends::wi... |
57d14e8ce0e60148c0f224cc19d15db17fc84b00 | 4a0a215cca08098fe62d102f9da0e965a556b852 | koobonil/Boss2D | /Boss2D/addon/_old/webrtc-qt5.11.2_for_boss/rtc_base/rtccertificategenerator_unittest.cc | C++ | cc | 5,706 | permissive | /*
* Copyright 2016 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 ... |
410725555d7fdeaca645e9565b5516cbeeec72bc | b1ee9cf4c0f23df9470f65931ea6f08d6631b61a | vsrikrishna/cplusplus | /Sorting & Searching/SuffixArray.cpp | C++ | cpp | 3,062 | no_license | // A suffix array based program to searh a given pattern in a given text
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
// Structure to store information of a suffix
struct suffix
{
int index;
char *suff;
};
// A comparison function used by sort(... |
9d878513119fdbdab2907cf11c3b7508a4ac4a71 | 7b9fa96f57a5d134a21e3242558083990378c6f3 | Mar115/pruebas-proyectofinal | /Star_Chasers_sistemas_fisicos/proyectil.cpp | C++ | cpp | 3,711 | no_license | #include "proyectil.h"
proyectil::proyectil(int a)
{
if(a == 1) proyectil_.load(":/new/prefix1/images/proyectil_.jpg");
else if(a == 2) proyectil_.load(":/new/prefix1/images/shoot_2.png");
else if (a==3) proyectil_.load(":/new/prefix1/images/proyectil_Jf.png");
}
void proyectil::set_imagen()
{
setPixm... |
93f75f12b8da740f70f6c4534b075dc797c55ae9 | 95bf0dc6075e610db9fc242aec325aed727e0fd7 | Exemocaro/TicTacToe-Minimax | /main.cpp | C++ | cpp | 3,985 | no_license | #include <iostream>
#include <stdlib.h> // For the random numbers
#include <time.h> // For the time function
using namespace std;
char bgChar = ' ';
char playerChar = 'X';
char enemyChar = 'O';
char board[9] = { bgChar, bgChar, bgChar, bgChar, bgChar, bgChar, bgChar, bgChar, bgChar };
int gameState = 0; // ... |
96dcafb953b699fd8e0f670208e0c7ea5f7c48c2 | d0b4bac21d06a6c1b84f3f8a99a4a6e73cf4872c | shuningzhou/JoltPhysics | /Jolt/ObjectStream/ObjectStreamOut.cpp | C++ | cpp | 4,960 | permissive | // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
// SPDX-License-Identifier: MIT
#include <Jolt.h>
#include <ObjectStream/ObjectStreamOut.h>
#include <ObjectStream/ObjectStreamTextOut.h>
#include <ObjectStream/ObjectStreamBinaryOut.h>
#include <ObjectStream/SerializableAttribute.h>
#include <ObjectStream/TypeDeclarations... |
0d10cd0c2bfc2ce83b172ec9230b62696d86a2b5 | 87641b218cfa93b536d47d599e2797ac315fc818 | emilyblack95/CS-2413 | /Project 3/Source.cpp | C++ | cpp | 8,954 | permissive | /**
Source.cpp
Purpose: This class runs the main functions.
@author Emily Black
@version 3.0
@date 2/24/16
*/
#include <iostream>
#define MAX_SIZE_OF_NAME 50 //default size for buffer before it breaks
#define MAX_SIZE_OF_INT 50
#include "Exceptions.h"
#include "CellNode.h"
#include "MasterCell.h"
#inc... |
507692bf010ad5b386e2ae04753e1003a1d23797 | 9c0c3760995f982f01b5f417eba58cf0f80ef802 | WalteR-MittY-pro/Gazebo-MPI | /gazebo7_7.14.0_exercise/gazebo/physics/CollisionState.cc | C++ | cc | 3,321 | permissive | /*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* 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 appli... |
ef555956cd45e6c7f3d3ca21893a7274345d5b79 | 375d0862324cfe8aad61cb1b9e77054ac8873072 | lagadic/visp_sample | /core/sample-vpThetaUVector-5.cpp | C++ | cpp | 535 | no_license | #include <visp3/core/vpThetaUVector.h>
int main()
{
{
vpThetaUVector tu;
tu[0] = M_PI; tu[1] = M_PI_2; tu[2] = M_PI_4;
std::cout << "tu (rad):" << std::endl;
for (unsigned int i = 0; i < tu.size(); i++) {
std::cout << tu[i] << std::endl;
}
}
{
#ifdef VISP_HAVE_CXX11
vpThetaUVector ... |
d0cee42f93054d4e281612f207f9caeb235e7b1e | 46746142670219685fb39f86aa7f4a6ecb9145b1 | MasterZul/Example-Project-C- | /Project C++/Mini Project/Long Distance Call Calculation/Long Distance Call.cpp | C++ | cpp | 489 | no_license | /*
Program : Long Distance Call
*/
#include<iostream>
using namespace std;
int main(){
int minute;
float time, charge;
cout<<"Enter the Starter Time"<<endl;
cin>>time;
cout<<"Enter the number of minute"<<endl;
cin>>minute;
if((time>=00.00)&&(time<=06.59)){
charge = minute*0.12;
}
else if((time>=07.00)&&... |
71da950973b7c4895b6160ddfc6e880dc28f714a | e3fbc0acb4875fd3586beee146a9035c5ec8495b | crr0004/terrian_prototype | /tests/luaeutilitiestest.cpp | C++ | cpp | 1,050 | permissive | #include <catch.hpp>
#include <lua/lua.hpp>
#include "luae/Utilities.hpp"
#include "luae/scriptmanager.hpp"
TEST_CASE("Lua util tests"){
using namespace Luae;
lua_State* l = ScriptManager::instance()->getState();
SECTION("Copy table"){
lua_createtable(l, 1, 0);
lua_createtable(l, 1, 0);
int FIRST_TABLE = lua_... |
40cd3f5d8fca8f155710c62b80682e92ac29c5eb | ecaa1ca1fb2f84d0641815cf85f7e4e3364fbd8e | Saikka/School-Projects | /Notemap/listmodel.cpp | C++ | cpp | 3,889 | no_license | #include "listmodel.h"
#include "database.h"
#include <QDate>
ListModel::ListModel(QObject *parent) :
QSqlQueryModel(parent)
{
QDate date = QDate::currentDate();
this->updateModel(date.toString("dd.MM.yyyy"));
}
QVariant ListModel::data(const QModelIndex & index, int role) const {
int columnId = role... |
16343ab9ee6e10a61454856decbf46f611faf16e | 8541679e7c5ed7115170a0acbe1953270afba300 | charlesyz/Tetris | /source files/game.cpp | C++ | cpp | 6,307 | no_license | // Charles Zhang ICS3U mrs Cullum June 13, 2016
// main menu and game
#include <stdio.h>
#include <allegro.h>
#include <stdlib.h>
#include <time.h>
#include "engine.h"
#include "input.h"
#include "globals.h"
#include "output.h"
bool menu(int &level){
bool lock = false;
int counter = 0;
int wait_counter = 0;
/... |
4d83ebf8e4edc30d356bd136efaeb667eccda4f1 | 00aceb0cff27ee2a1dd91427ed1aab13815bd1a6 | acheeseye/CS372-TDD-Kata-Calculator | /calculator.cpp | C++ | cpp | 1,123 | no_license | #include "calculator.hpp"
#include <string>
using std::string;
int calculator(const std::string & s, char inc_c_delim, const string & inc_s_delim)
{
char c_delim = '\n';
string s_delim = "";
int i = 0;
int sum = 0;
if (s == "")
{
return 0;
}
if (inc_c_delim != NULL)
{
c_delim = inc_c_delim;
}
if (i... |
ab57f519ec8b4dc55039f05daacdcba4395fc540 | 6e068d40a97baed9484c2f2bc325e7f11c1ba812 | peartail/DirectXPractice2 | /DirectXStudy1/GraphicClass40.cpp | C++ | cpp | 6,178 | no_license | #include "GraphicClass40.h"
#define NEW_CLASS(x,y) {x = new y; if(!x) return false;}
#define V_RETURN(x,y) { if(!x){MessageBox(hwnd,y,L"Err",MB_OK);return false;}}
#define IS_V(x) {if(!x) {return false;}}
#define GETDEVICE _D3D->GetDevice()
#define SHUTDOWN_OBJ(x) {if(x) {x->Shutdown();delete x; x = NULL;}}
#define SA... |
2a3624a0aa7d2bc14ec4426944e59040c223f8be | e5fc700ee81bb2671dc9714a6cb7d77786c2bad3 | JiangySky/CocosManual | /Classes/CCSLayer.cpp | C++ | cpp | 1,571 | no_license | //
// CCSLayer.cpp
// CocosManual
//
// Created by Jiangy on 14/6/12.
// Copyright (c) 2013 35VI. All rights reserved.
//
#include "CCSLayer.h"
CREATER_FROM_CCS(CCSLayer, "ccs/UI/UI_1.ExportJson")
CCSLayer::~CCSLayer()
{
// NOTE: destructor here
}
void CCSLayer::reset()
{
}
void CCSLayer::bindFromCCS()
{
... |
3ed7bad70cc6491c42a79d00c08edbd0a70beee5 | 5f7951e39b4517219bb4c50a8afed7858508b2e1 | kevinmiles/instrumentation | /cpp/nh-vend.cpp | C++ | cpp | 13,756 | no_license | /*
* Copyright (c) 2014, Daniel Swann <hs@dswann.co.uk>
* 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,
* ... |
41cae09442feab6823b21df053e88b367acd4b15 | ee6301ca9858ddfcd7eb6bc2f25fc1102d523832 | minhduc2803/School | /HK2/ProgrammingTechniques/theory/exercise_05/1712358/BAI02/DELETECHAR.cpp | C++ | cpp | 314 | no_license | #include"DELETECHAR.h"
char* DeleteChar(char S[], char A)
{
static char Buf[101];
int j = 0;
bool flag = false;
if (A >= 'A'&&A <= 'Z')
A = A + ('a' - 'A');
for (int i = 0; S[i] != NULL; i++)
{
if (S[i] != A && S[i] != A - ('a' - 'A'))
{
Buf[j] = S[i];
j++;
}
}
Buf[j] = NULL;
return Buf;
} |
1abea47aaf9d469275c5ea2ed2ca543f077ffa75 | e2045694f33d23fd22f1cdc697d2e1d5ab106cda | AugustoCalaca/competitive-programming | /references/dynamic-programming/lcsubstring.cpp | C++ | cpp | 609 | no_license | #include <iostream>
#include <string>
using namespace std;
int max(int a, int b) { return a > b ? a : b; }
// O(n x m)
int lcsubstring(string s, string s2) {
int sz = s.size(), sz2 = s2.size();
int pd[sz + 1][sz + 1];
int ans = 0;
for(int i = 0; i <= sz; i++)
for(int j = 0; j <= sz2; j++) {
if(i =... |
00e9d3a7037898c9fce6555b4fa39227d690fec1 | d8e6830d97646cb2c3d093efe5342b88da5b5f02 | cdelorme/learning_cpp | /sfml/30.cpp | C++ | cpp | 5,669 | no_license |
#include <iostream>
#include <string>
#include <SFML/Graphics.hpp>
int main() {
sf::Vector2i screenDimensions(800, 600);
sf::RenderWindow w(sf::VideoMode(screenDimensions.x, screenDimensions.y), L"Whee");
w.setKeyRepeatEnabled(false);
// use to map to sprite facing by index (eg. first sprite is down,... |
2c0dd5d575226274eb9a40dd03cfd27a9fa885d4 | c36440920f05140adedb9366d5313fedc4706137 | FernandoWei/WZMediaPlayer | /WZMediaPlayer/Player/Player/player_impl/MediaSource.hpp | C++ | hpp | 1,397 | no_license | //
// MediaSource.hpp
// WZMediaPlayer
//
// Created by fernando on 16/9/22.
// Copyright © 2016年 Fernando. All rights reserved.
//
#ifndef MediaSource_hpp
#define MediaSource_hpp
#include "utility.hpp"
namespace WZ {
namespace MediaPlayer {
class MediaSource : public Utility::WZObject {
public:
MediaSo... |
955039d813504f89eba62791ca5598061689dea5 | 42f15441852e986c52662cff2ea9ad24f31f0b0b | AlexClazrey/HappyFarm | /src/DisplayManager.cpp | C++ | cpp | 1,271 | no_license | #include "DisplayManager.h"
#include "GameDriverSingleton.h"
#include <algorithm>
#include <panel.h>
DisplayManager::DisplayManager()
{
}
void DisplayManager::start() {
// libncurses initialize
initscr();
// Event subscribe
GameDriverSingleton::getInstance()->getEventManager()
->addObserver(Ga... |
321227f11e318910083de1b00716617b95e5c088 | 7769229770c1904a079d106cf2f548d5ae65f957 | Scar556/UnrealCourseTanks | /BattleTank/Source/BattleTank/TankPlayerController.cpp | C++ | cpp | 2,344 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "TankPlayerController.h"
#include "TankAimingComponent.h"
void ATankPlayerController::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
AimTowardsCrosshair();
}
void ATankPlayerController::BeginPlay()
{
Super::BeginPlay();
... |
07006167e763393f42611edfabedc7a70e69be9f | e45b5797a84c60f537cc2c86989a9c501cd9da2f | DanuAdiP/menghitung-jarak-tempuh | /6. Rumusjaraktempuh.cpp | C++ | cpp | 279 | no_license | #include<iostream>
using namespace std;
int main()
{
float S,v,t;
cout<<"MENGHITUNG JARAK TEMPUH"<<endl<<endl;
cout<<"Rumus S = v*t"<<endl;
cout<<"Masukkan Kecepatan (v) = ";cin>>v;
cout<<"Masukkan Waktu (t) = ";cin>>t;
S=v*t;
cout<<"Maka Jarak tempuh (S) = "<<S;
}
|
ea6bca63d28ea0f5886e8132a8736916a3e24e1d | a156347bc4e22f718344b53275a2d28274abc2bb | zowhair/chromium | /components/url_formatter/url_formatter_unittest.cc | C++ | cc | 66,173 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/url_formatter/url_formatter.h"
#include <stddef.h>
#include <string.h>
#include <vector>
#include "base/macros.h"
#include "base/s... |
ac7b4b7159ed7f0d04b71bb2806c9174085656f6 | 58bfe17e4975b7c67db94efe3608bc5721bdece0 | lucasEngdComp/BallAndPlate | /balanceball.cpp | C++ | cpp | 2,487 | no_license |
#include "./camera/camera.hpp"
#include "ConecxaoSerial/ConexaoSerial.hpp"
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp> // cv::Canny()
#define REFRESH_PERIOD 5 // In milliseconds
#define ESC_SC 27 // ... |
f35bca41d3b0f1334c88d65659b892a6766b0ed4 | 6e6c707a21d25b6b71e5abcdf7a6c69fa85991ec | oneWayOut/Fission2013 | /libraries/AP_Motors/AP_MotorsQuad.cpp | C++ | cpp | 3,048 | no_license | /*
* AP_MotorsQuad.cpp - ArduCopter motors library
* Code by RandyMackay. DIYDrones.com
*
* 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... |
feae2cd8df583ab8bd61d075bebfa00809e3e958 | f0c1a697f9fec130b2b07bbc15c711d997d20d65 | EmilPoulsen/MasterThesis | /MasterThesis/CIFem_wrapper/WR_XSecCSS.cpp | C++ | cpp | 521 | no_license | #include "stdafx.h"
#include "WR_XSecCSS.h"
CIFem_wrapper::WR_XSecCSS::WR_XSecCSS()
{
_radius = -1;
_xSec = gcnew m_shared_ptr<CIFem::CircularSolid3d>(new CIFem::CircularSolid3d());
}
CIFem_wrapper::WR_XSecCSS::WR_XSecCSS(double radius)
{
_radius = radius;
_xSec = gcnew m_shared_ptr<CIFem::CircularSolid3d>(ne... |
bf2980d2f951c46b5e80a281e0a36411db0f376a | c9aaf8247b81e37c745bbda84b1a91cc2190cb6f | gosour/competitive | /chef/beginner/LCH15JAB.cpp | C++ | cpp | 1,148 | no_license | #include<cstdio>
#include<iostream>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<bitset>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<algorithm>
#include<functional>
#include<utility>
#include<iterator>
using namespace std;
#defin... |
a7cd996e3c986954d0c23be7e49d7128f1e2d113 | b18e8da761915c7ebe1f6cde0ec3e93b4552d1a9 | 0xF6/openvino | /ngraph/test/type_prop/slice.cpp | C++ | cpp | 15,623 | permissive | //*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
97e30e189a481a9321ace86b45fcd9a20195e5d2 | 01f714f9ddce4e0734a6e0310f2b95884ad0418e | bystc/SomeExercisesAboutC | /xianxingbiao1.cpp | C++ | cpp | 442 | no_license | #include<stdio.h>
void MergeList(List La,List Lb,List&Lc){
InitList(Lc);
i=j=1; kj=0;
La_len=ListLength(La);Lb_len=ListLength(Lb);
while((i<=La_len)&&(j<=Lb_len)){
GetElem(La,i,ai);GetELem(Lb,j,bj);
if(ai<=bj) {ListInsert(Lc,++k,ai);++i; }
else{ListInsert(Lc,++k,bj);++j; }
}
while(i<=La_len){
... |
8d428d00f9d3096b72fd777f34a18d6c25d696ea | 7b688b44a42b674cb72c7717305d6386f9047bbe | bzxing/barrier-synchronization | /mp/main.cpp | C++ | cpp | 2,059 | no_license |
#include <iostream>
#include <string>
#include <vector>
#include <thread>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/assert.hpp>
#include <omp.h>
#include "profiler.h"
extern "C" {
#include "gtmp.h"
}
class ArgParse
{
public:
ArgParse(int argc, char ** argv)
{
if (argc >= 2)
{
std::st... |
f377c5d00605da4ff1bdba08a7f89472d0475d83 | 09a089fb55b2c432d1396350b3a144a083abaa8b | Thawatchai-Yango/Data_Structure_with_CPP | /203074Ass1_DSL.cpp | C++ | cpp | 4,728 | no_license | /*
* MARKS.cpp
*
* Created on:
* Author: thawatchai yango SE COMP B
* Roll No:203074 BATCH E
* Assignment 1
* Problem Statement
* write c++ program to sore marks scored for first test of subject 'Data Structure and alogorithms'
* for N student. Compute
* 1.the average score of cass
* 2.h... |
c91ec593d453103d8efa48c2dbd617c8e4eb4b69 | 472ebd968d6f3ec3f8eb8f1bbda2d08f908bbb05 | AndyJMR/ITK | /Modules/IO/ImageBase/src/itkImageFileWriter.cxx | C++ | cxx | 901 | permissive | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... |
d158524d032691a716730729e35370a7fea5a445 | 03218f6cbc9b6e4b045398c184038267e2dac6a9 | odanek/mouse3 | /source/core/co_main.cpp | C++ | cpp | 4,278 | permissive | /*
* Copyright (c) 2006, Ondrej Danek (www.ondrej-danek.net)
* 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, ... |
7e6b62e6521787e9916642531a1987f2cfec4895 | 76e7f64b44225384583b1fd10ada47419b497bbd | CM4all/beng-proxy | /src/cgi/Client.cxx | C++ | cxx | 10,360 | permissive | // SPDX-License-Identifier: BSD-2-Clause
// Copyright CM4all GmbH
// author: Max Kellermann <mk@cm4all.com>
#include "Client.hxx"
#include "Error.hxx"
#include "Parser.hxx"
#include "pool/pool.hxx"
#include "istream/Sink.hxx"
#include "istream/UnusedPtr.hxx"
#include "istream/istream_null.hxx"
#include "stopwatch.hxx"... |
c919cc44d841395f0c55468e4c3a8c2e18dbd55a | a53a296bcaf243cc7128f6fe5a9dc95721646c46 | aogcontrols/T3000_Building_Automation_System | /T3000/T3000Option.cpp | C++ | cpp | 1,956 | no_license | // T3000Option.cpp : implementation file
//
#include "stdafx.h"
#include "T3000.h"
#include "T3000Option.h"
#include "afxdialogex.h"
#include "SqliteLib/CppSQLite3.h"
#include "globle_function.h"
// CT3000Option dialog
IMPLEMENT_DYNAMIC(CT3000Option, CDialogEx)
CT3000Option::CT3000Option(CWnd* pParent /*=NULL*/)
:... |
2608100c57d3fc55a32294948cfa448078fdd3d7 | e20e5eb852c623925a7c8719b8188ce1ae022dec | Samsung/Castanets | /media/base/android/mock_android_overlay.cc | C++ | cc | 1,965 | 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 "media/base/android/mock_android_overlay.h"
#include <memory>
#include "base/bind.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace ... |
e252f5c9340380c440d3fc9e6a7e4299b1542228 | e6f26a843412c52e6b0dfb789cfdb4d031972584 | bapadapa/programmers | /programmers/cpp/Lv1_핸드폰 번호 가리기.cpp | C++ | cpp | 933 | no_license | /*
--출처--
프로그래머스
--문제 제목--
핸드폰 번호 가리기
문제 설명
프로그래머스 모바일은 개인정보 보호를 위해 고지서를 보낼 때 고객들의 전화번호의 일부를 가립니다.
전화번호가 문자열 phone_number로 주어졌을 때, 전화번호의 뒷 4자리를 제외한 나머지 숫자를 전부 *으로 가린 문자열을 리턴하는 함수, solution을 완성해주세요.
제한 조건
s는 길이 4 이상, 20이하인 문자열입니다.
입출력 예
phone_number return
01033334444 *******4444
027778888 *******8888
*/
#include <io... |
8f956567866e7dd594179ef890619b1c37e3fc60 | c61f83d024b32c8d169965fff10bbacd346be22e | quantumcthulhu/botan | /src/lib/prov/openssl/openssl_ec.cpp | C++ | cpp | 10,841 | permissive | /*
* ECDSA and ECDH via OpenSSL
* (C) 2015,2016 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/openssl.h>
#if defined(BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO)
#include <botan/der_enc.h>
#include <botan/pkcs8.h>
#include <botan/oids.h>
#include <botan/in... |
c1d2164e18dea34e8e70e275da6d02aeaa040fa0 | 823d01e8ad7a0f742258ecd71861502596364442 | JerYme/Casablanca | /Release/tests/Functional/http/listener/listener_construction_tests.cpp | C++ | cpp | 14,380 | permissive | /***
* ==++==
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* ==--==
* =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
*
* listener_construction_tests.cpp
*
* Tests cases for covering creating http_listeners in various ways.
*
* =-=-=-=... |
0b1e4ba3a780fd85199d66c67cd2b6f09e21e129 | 9174faa608d121cc46eeb649371bc983830e69fe | cyjjj/ZJU-CG | /Ex6/Ex6/main.cpp | C++ | cpp | 12,602 | no_license | // glutEx1.cpp : 定义控制台应用程序的入口点。
//
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include "glut.h"
float fTranslate;
float fRotate;
float fScale = 1.0f; // set inital scale value to 1.0f
bool bPersp = false;
bool bAnim = false;
bool bWire = false;
int wHeight = 0;
int wWidth = 0;
... |
d54627b13a12e6a25111c4d27f3ee44d2061709a | c2489ac7e5654b87738e88f77174e3393cf51897 | shyamjvs/cs296_g29_project | /cs296_g29_project_base/src/callbacks.cpp | C++ | cpp | 6,677 | permissive | /*
* Base code for CS 296 Software Systems Lab
* Department of Computer Science and Engineering, IIT Bombay
* Instructor: Parag Chaudhuri
*/
//! These are user defined include files
//! Included in double quotes - the path to find these has to be given at compile time
#include "callbacks.hpp"
#ifndef __APPLE__
... |
9d49df759955dcb2b805319da3a1a5796af4721b | 056893d09f5d9562d45bfeabe4f92b8d8027026f | sckomoroh/InfoView | /plugins/MongoDBPlugin/MongoJobStorage.cpp | C++ | cpp | 2,312 | no_license | #include "MongoJobStorage.h"
MongoJobStorage::MongoJobStorage()
{
}
MongoJobStorage::~MongoJobStorage()
{
clear();
}
void MongoJobStorage::clear()
{
fireBeginChange();
foreach (MongoJobData* pObject, m_jobs)
{
delete pObject;
}
m_jobs.clear();
m_filteredJobs.clear();
fireEndChange();
}
void MongoJobSt... |
7a136745989a4a56366e26d7d3e509993b6223a9 | 612f497a6e0b5358c55f8715e9572dfcf5d223b5 | Pangeamt/nectm | /tools/mosesdecoder-master/moses/TranslationModel/UG/mm/test-dynamic-im-tsa.cc | C++ | cc | 1,619 | permissive | // -*- c++ -*-
// test program for dynamic tsas
#include <boost/program_options.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/parsers.hpp>
#include <boost/program_options/variables_map.hpp>
#include <boost/iostreams/device/mapped_file.hpp>
#include <iostream>
#include <... |
9b9bb967fb60949899a37d08e87aa301037c56ef | b2b585da0dfede74ae104ff5e1f02ead77fc8db0 | LiyifeiG/C | /素数因子函数。。.cpp | C++ | cpp | 223 | no_license | #include <stdio.h>
#include <math.h>
void fun(int m)
{
int i;
for(i=2;i<=sqrt(m);i++)
{
while(m%i==0)
{
printf("%d ",i);
m=m/i;
}
}
if(m!=1)
printf("%d",m);
}
main()
{
int n;
scanf("%d",&n);
fun(n);
}
|
623362b30ef79a1f30f6f2579fb5b83d294684c4 | 67ef666315141483915e96cba382f22cba43189a | schnetzko/Cpp_Training_Polymorphism_Part1 | /src/Cpp_Training_Polymorphism_Part1.cpp | C++ | cpp | 958 | no_license | //============================================================================
// Name : Cpp_Training_Polymorphism_Part1.cpp
// Author : Nico
// Version :
// Copyright : Your copyright notice
// Description : Testing Polymorphism in C++, Ansi-style
//===================================================... |
d88fb3f63c7988519ea1fe323a0d219e9b52ee08 | 89817496f4d2d920142ad67bf7e8f6869aa6961d | Csineneo/Vivaldi | /chromium/fuchsia/runners/common/web_component.cc | C++ | cc | 3,597 | 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 "fuchsia/runners/common/web_component.h"
#include <fuchsia/sys/cpp/fidl.h>
#include <lib/fidl/cpp/binding_set.h>
#include <lib/fit/function.h>
#... |
1a900963587efd8fad0e82ab4b1d7ab9ea36ed1f | b957ef36e5b399223a7c17ee4742ec1b92aede92 | vladjester2020/darkspore_server | /source/blaze/client.cpp | C++ | cpp | 8,225 | no_license |
// Include
#include "client.h"
#include "component/authcomponent.h"
#include "component/redirectorcomponent.h"
#include "component/utilcomponent.h"
#include "component/usersessioncomponent.h"
#include "component/gamemanagercomponent.h"
#include "component/associationcomponent.h"
#include "component/roomscomponent.h"
... |
d78542319b845dc9d4f99636de2bbc23f75546a4 | dc64327743e8fb5bb5a1f906094f74118e918af0 | Quang0309/profilo | /deps/museum/6.0.1/art/runtime/gen.cc | C++ | cc | 50,401 | permissive | // Copyright 2004-present Facebook. All Rights Reserved.
// Generated by: //native/museum/run_codegen.sh
// This is generated code -- do not modify manually.
// @generated SignedSource<<d4b3d5fac52cd05683ee2af5e6cc654a>>
// @model md5 696dc852bde18455922d82c29c372c63
#include <museum/6.0.1/art/runtime/base/logging-i... |
4a9cbd4e43d75ef6831b680dd3a769e55df94fd2 | 7b7399c95d975f476dff93d123180d87de7fe728 | kims32/Computer-Organization | /final-project/p1.cpp | C++ | cpp | 25,828 | no_license | //
// main.cpp
// co_project
//
// Created by 宋初文 on 12/9/18.
// Copyright © 2018 宋初文. All rights reserved.
//
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <map>
#include <cstring>
#include <algorithm>
#include <iomanip>
using namespace std;
/*
* It reads in instructions fr... |
de676d23df93dacb92514c189c52f6e7564e5c3c | 2b572b96538f0b1c791c55174973d4b2851a7dc1 | vinzenz/evipp | /unit/string/utf16_string_test.cpp | C++ | cpp | 815 | permissive | #include "../evipp_test.hpp"
#include <evipp/string/utf16/type.hpp>
#include <evipp/string/utf16/type_impl.hpp>
struct utf16_string_data {
evipp::string::utf16::type str;
};
EVIPP_TEST_GROUP_DEF(utf16_string_data, "evipp::string::utf16")
EVIPP_TEST_DEF(1)
{
ensure( "str.size() == 0", str.size() == 0 );
ensure( "s... |
896f0b7066fc4a725c1136dccfb2209c1184445a | 56370b4c8a452d13b86b6aef7ec8e6a9ddb7ecd9 | Nightwish-cn/my_leetcode | /code/341.cpp | C++ | cpp | 2,540 | permissive | #include <bits/stdc++.h>
#define INF 2000000000
using namespace std;
typedef long long ll;
int read(){
int f = 1, x = 0;
char c = getchar();
while(c < '0' || c > '9'){if(c == '-') f = -f; c = getchar();}
while(c >= '0' && c <= '9')x = x * 10 + c - '0', c = getchar();
return f * x;
}
struct TreeNode {
int val... |
47cc47811221c5c36c6e9ee6e4ba7e7aa1d110fe | 83598f99ece24626b915407facbdac5d8e80b965 | sharpglasses/chromium-2 | /chrome/browser/net/http_pipelining_compatibility_client_unittest.cc | C++ | cc | 19,397 | 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 "chrome/browser/net/http_pipelining_compatibility_client.h"
#include <map>
#include <string>
#include <vector>
#include "base/basictypes.h"... |
9a71396725bd0a41979f37761c69faa548bc8f29 | 32544941366345b357bcf533978f36d16d798ab6 | jennyb2911/chromium | /content/browser/media/capture/audio_mirroring_manager.cc | C++ | cc | 10,332 | permissive | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/media/capture/audio_mirroring_manager.h"
#include <stdint.h>
#include <algorithm>
#include "base/bind.h"
#include "base/bi... |
6aa7449115bf7da8e096d40a042257b63240ffc5 | e9863a675494b45a90985a279ab4869b52855d11 | mrdooz/physics | /vector3.hpp | C++ | hpp | 1,340 | no_license | #pragma once
namespace physics
{
#pragma pack(push, 1)
struct Vector3
{
Vector3() {}
Vector3(float x, float y, float z) : x(x), y(y), z(z) {}
float x, y, z;
Vector3& operator *= (float s) { x *= s; y *= s; z *= s; return *this; }
float& operator[](u32 idx) { return ((float*)&x)[idx]; }
f... |
238f74d7859db548dd91efcbc8f6f688f82f52bd | 94d4d1dd17f8fa1b8db70bf41a9b7d90cfefbd80 | mishrraG/STL | /tests/std/tests/Dev09_126254_persistent_aux_allocators/test.cpp | C++ | cpp | 3,176 | permissive | // Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include <assert.h>
#include <deque>
#include <forward_list>
#include <list>
#include <map>
#include <new>
#include <set>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <unordered_map>
... |
457fe2f4c9a2d367d1c8c5cb510abdd2169335e8 | 97951f5c7044cb63197e82f0c510c6cb6e0964e2 | yaoling1997/desktop | /question/Codeforces/contest/328 (Div. 2) _/a.cpp | C++ | cpp | 636 | no_license | #include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<vector>
#include<queue>
#include<cmath>
using namespace std;
const int maxn= 3001;
char s[10][10];
int i,j,k,x,y,z,A,B;
int main()
{
//freopen("1.in","r",stdin);
//freopen("1.out","w",stdout);
A= B= 10;
for (i= 1;i<=8;i++)
scanf("%s... |
c1cae8158aa3686150e8fccd3f09aadfc84a8db8 | d6b2d19c2b7ff68574bd39654df454454b4bc325 | KiraiChang/openmesh-project | /windows-form-application/OpenMesh_Course/OpenMesh_Course.cpp | C++ | cpp | 450 | no_license | // OpenMesh_Course.cpp : main project file.
#include "stdafx.h"
#include "Form1.h"
using namespace OpenMesh_Course;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCo... |
f34de8ed9173800a2f45d731491c67c1c6635c86 | ebd1aacb6b13b0de3263f2c0c430dd862474de91 | NHinzpeter/SemesterarbeitWS1718 | /clilib.cpp | C++ | cpp | 8,060 | no_license | #include <iostream>
using namespace std;
#include <fstream>
#include <string.h>
#include <istream>
#include "ntoken3.h"
ClElement *verarbeite(ifstream& datei);
//liest die drei Dateien ein und speichert sie in Objekten. Startprozedur, die nur einmal ausgeführt werden muss.
//Gibt false zurück, wenn beim E... |
98397256f9437c395e4493fb06e8825cfce1c5b5 | c5e1dc404ee1932e63e9b3d357d4c0c3602e7183 | roussukke/Yorozuya | /library/ATF/_be_damaged_charDetail.hpp | C++ | hpp | 356 | permissive | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <_be_damaged_charInfo.hpp>
START_ATF_NAMESPACE
namespace Detail
{
extern ::std::array<hook_record, 1> _be_damaged_char_functions;
}; // end... |
7fd8ec5bd35dfdc9b5054a4aa331e1a528e07893 | 1c175b778cd288aef9dad2bc0558e92a8bab085b | markej/hifi | /libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp | C++ | cpp | 18,983 | permissive | //
// Created by Bradley Austin Davis on 2015/05/29
// Copyright 2015 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 "OpenGLDisplayPlugin.h"
#include <condition_variable>
#include <QtC... |
56076ef8ab1a62ca450dbf2c724ccc15b56b5a90 | df411bf910419f378c9a81dadcb9d48c17f0c61d | ClangBuiltLinux/llvm-project | /llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | C++ | cpp | 25,107 | permissive | //===- DWARFDie.cpp -------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
7181ae7712837110722d473e637c60992476af3b | f73dc07d68ffb9dfb59f10a043a2ab7ac115b745 | Sightline/Project-Allocator | /student.cpp | C++ | cpp | 4,281 | no_license | #include "student.h"
#include <QDebug>
Student::Student(QObject *parent) : QObject(parent)
{
firstName = QString("none");
familyName = QString("none");
matricNumber = 0;
choiceAllocated = 0;
GPA = 10.0;
firstChoice = QString("none");
secondChoice = QString("none");
thirdChoi... |
5a615355bd711fa9dfedfe1d2c87697582dceca1 | a340a946356ac2f853e690fcd273b6eef0f4f11b | Cruziken/Project-Tracking | /Project1/Project1/Getdistance.cpp | C++ | cpp | 780 | no_license | #include "C:\\Users\\Titanium\\Downloads\\opencv-2-cookbook-src-master\\opencv-2-cookbook-src-master\\Chapter 03\\colordetector.h"
#include <vector>
cv::Mat ColorDetector::process(const cv::Mat &image) {
result.create(image.size(), CV_8U);
if (useLab)
cv::cvtColor(image, converted, CV_BGRLab);
cv::M... |
e7437936f3bb957d040d14b350ac4873309bbb4a | 5d8fc820c4e2a7911ef6bdd884ac7acff4217eb2 | rheehot/Algorithm_cpp | /02.Implementation/b1316.cpp | C++ | cpp | 596 | no_license | #include <iostream>
#include <string.h>
#include <string>
using namespace std;
// 그룹 단어 체커
int main() {
ios::sync_with_stdio(0);
int n;
int k;
int sum = 0;
string str;
cin >> n;
for(int i = 0; i < n; i++) {
int a[26] = {0, };
bool isGroup = true;
cin >> str;
a[str[0]-'a']++;
for(... |
07d70a1e6fa658a5ff524869c2c66f5d237b9a97 | d4a6c1f4004d1c123af641678b0a00515ff22848 | hendry19901990/babycoin | /src/test/allocator_tests.cpp | C++ | cpp | 7,351 | permissive | // Copyright (c) 2012-2016 The Babycoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "util.h"
#include "support/allocators/secure.h"
#include "test/test_babycoin.h"
#include <boost/test/unit_test.hp... |
b26ac6cc6d018ef9cccb508121cf69d3eef32555 | 14ff31a94a66656ebc9fc4926a9f079c6c806a4d | yao-yl/stan | /src/test/unit/io/trim_spaces_test.cpp | C++ | cpp | 489 | permissive | #include <gtest/gtest.h>
#include <stan/io/trim_spaces.hpp>
TEST(ioUtil, trimSpaces) {
using stan::io::trim_spaces;
EXPECT_EQ("", trim_spaces(""));
EXPECT_EQ("", trim_spaces(" "));
EXPECT_EQ("", trim_spaces(" "));
EXPECT_EQ("", trim_spaces("\t"));
EXPECT_EQ("", trim_spaces("\t\n\r"));
EXPECT_EQ("a", t... |
031c8e39e91e7ce1a7894b1c2c3d523df0abcee7 | 075fa5f286327659c701551290b83203ddc63992 | Ivancic91/RSoft | /VectorTools/Std1D.cpp | C++ | cpp | 452 | no_license | #include "VectorTools.hpp"
#include <vector>
#include <numeric>
double VectorTools::Std1D(std::vector<double>& vec)
{
double mean = Mean1D(vec);
std::vector<double> diff(vec.size());
std::transform(vec.begin(), vec.end(), diff.begin(),
std::bind2nd(std::minus<double>(), mean));
double sq_sum = std::inner_p... |
752f31a398e99591149048a12fb3a83f64e16565 | d322a6824f8d36b0325f547342b9ca75d83ed57b | zeta1999/siconos | /kernel/src/modelingTools/FirstOrderNonLinearR.cpp | C++ | cpp | 7,148 | permissive | /* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2020 INRIA.
*
* 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
*
*... |
4aedf8bb619513ab56796e1abe6b66264ffccebf | 249e34cf5de0dadb4fa760cda81692ff55240bc7 | jo-jstrm/rime-data-streaming-iot | /code/rime/src/srt_config.cpp | C++ | cpp | 3,870 | permissive | //srt_config.cpp
#include "srt_config.hpp"
#include <deque>
#include <map>
#include <utility>
#include "caf/io/all.hpp"
#include "attribute.hpp"
#include "node_info.hpp"
#include "query.hpp"
#include "results.hpp"
#include "subtree_range.hpp"
using namespace std;
using namespace caf;
srt_config::srt_config(){
/*... |
3ec00d70aade2c9aec86fae065e77eaf87f0538a | 4af5e8a20e10b68fcc1f1e1dbd7f27c720bb832a | PaddlePaddle/Paddle-Lite | /lite/kernels/x86/conv_transpose_compute.cc | C++ | cc | 8,074 | permissive | // Copyright (c) 2019 PaddlePaddle Authors. 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... |
4fbfa70dbfab6237acf38d58d2005ba2332daa2f | b05e6626b881e03aa949164728b05f1d8d928aab | utec-cs1102-2019-2/ec1-rodrigorecharte | /session4b/main.cpp | C++ | cpp | 363 | no_license | #include <iostream>
using namespace std;
void notas(float &a, float &b);
int main() {
float pc1 = 0.0;
float bonus = 0.0;
notas (pc1, bonus);
cout<< pc1 << "\t" << bonus << endl;
float *ptr_pc1 = &pc1;
*ptr_pc1 = pc1 + bonus;
cout<< *ptr_pc1;
return 0;
}
void notas(float &a, float &b) ... |
81e0a463a102522c7f64e5cc7c8cc9373ff73289 | 4e550133495e10c6890e257bb71109b612d77564 | mschwartz/v8t | /src/sockets.cpp | C++ | cpp | 2,213 | no_license | #include <net/inet.h>
#ifdef __APPLE__
//#define TCP_CORK TCP_NOPUSH
#define TCP_CORK TCP_NODELAY
#endif
class Socket {
protected:
int sock;
char remote_addr[16];
char error[256];
public:
Socket(int aSocket, char *aRemoteAddr) {
error[0] = '\0';
sock = aSocket;
strcpy(remote_ad... |
44ac4643d37813640557ff7fa94e91b80802e50b | 2f88eb6faa917fe027231fb0406011f8cb30d0e7 | bmcdorman/libgabgui | /src/simulation.cpp | C++ | cpp | 431 | no_license | #include <gabgui/simulation.hpp>
#include <ui_simulation.h>
using namespace gab::gui;
gab::gui::simulation::simulation(QWidget *parent)
: QMainWindow(parent)
, _ui(new Ui::simulation)
{
_ui->setupUi(this);
}
gab::gui::simulation::~simulation()
{
delete _ui;
}
void gab::gui::simulation::model(gab::simulation... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.