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 |
|---|---|---|---|---|---|---|---|---|
c602e2a0b03ae42f74dfbf94fb19c04f9aa144ed | b9a417a54f03ffb4f777cbc436cf7a98b45f4370 | karunmatharu/Android-4.4-Pay-by-Data | /external/chromium_org/chrome/browser/net/chrome_net_log.cc | C++ | cc | 2,760 | 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/chrome_net_log.h"
#include <stdio.h>
#include "base/command_line.h"
#include "base/logging.h"
#include "base/strings/st... |
f872bce6c8e74c3eb09db69971b6590e7a330ae3 | 8321d113da5904da312ad85c139b6dfafb8af281 | joergi-w/lara | /src/io.hpp | C++ | hpp | 18,600 | permissive | // ===========================================================================
// LaRA: Lagrangian Relaxed structural Alignment
// ===========================================================================
// Copyright (c) 2016-2019, Jörg Winkler, Freie Universität Berlin
// Copyright (c) 2016-2019, Gia... |
d4bbded5b4a41779e6d6603c7a1c365b5e9d8c34 | 2359c18b01846076aea00aca43b6aed3ad6d94d4 | influs/Test_repo_cals_techno | /taskArr/taskArr/taskArr.cpp | C++ | cpp | 2,091 | no_license | // taskArr.cpp: определяет точку входа для консольного приложения.
//
#include "stdafx.h"
class CTestArray{
private:
int *arr;
int last;
public:
//constructor
CTestArray()
{
last = 0;
}
// copy constructor
CTestArray(const CTestArray & m){
last = m.last;
for(int i = 0; i < m.last; +... |
5278c696ac892f19a11a390650aad05353469015 | 298b0b374d52effab4a4ace4aea3cccd174bc4b9 | diksha1996/mycodes | /CODEBLOCKS/codefroces.cpp | C++ | cpp | 549 | no_license | #include<iostream>
#include<string>
using namespace std;
int main(){
int n,c;
char zero, one;
int count_a=0,count_b=0;
cin>>n>>c;
string s;
cin>>s;
for(int i=0;i<n;i++){
if(s[i]=='a')
count_a++;
else
count_b++;
}
if(count_a>count_b)
{zero = 'b';
one = 'a';
}
else{
zero = 'a';
one = 'b';
... |
124db1ed0bb95d7453738f4bce1160b247c71446 | f8fff4414f4950349554fcfc7343a81dc583d9af | yrnkrn/zapcc | /lib/MC/MCExpr.cpp | C++ | cpp | 29,531 | permissive | //===- MCExpr.cpp - Assembly Level Expression Implementation --------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
d7d7a3e47005bb5a35e165a33bda178c7b9b6331 | 4ab00d386dda6696e0418af08efccc3f0f58511f | cbisho12/cs344-solutions | /Problem Set 3/reference_calc.cpp | C++ | cpp | 1,359 | no_license | #include <algorithm>
#include <cassert>
#include <iostream>
void referenceCalculation(const float* const h_logLuminance, unsigned int* const h_cdf,
const size_t numRows, const size_t numCols, const size_t numBins,
float &logLumMin, float &logLumMax)
{
logLumMin = h_logLuminance[0];... |
2af37a3940ffde7932642c399dd76e7df6bb482b | 9a1bb8e9590f85810a6ec5c8129bd8cfd11a9f77 | ThePotato97/SoT-SDK | /SDK/SOT_BP_TreasureChest_Wieldable_Weeping_parameters.hpp | C++ | hpp | 539 | no_license | #pragma once
// SOT: Sea of Thieves (1.0) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x4)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Function BP... |
d6d969a00bd6178b001e23b2315eec675a852786 | 92c4ab2389a050fd0730977efd16416c4471803d | wgbusch/Orga1 | /tallerBuses/paquete/ejemplo/print.cpp | C++ | cpp | 1,127 | no_license | /* **************************************************
Taller de Buses - Organizacion del computador I
(por compatibilidad se omiten tildes)
************************************************** */
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <unistd.h>
#include "bus.h"
usi... |
bff8276d3749c5827bb1b502465d84cb8ad71bc8 | aa402847beb607d79bc6a045a7ed51f1f8590656 | duyvuleo/Mantidae | /src/dual-learning.cc | C++ | cc | 17,715 | permissive | /*
* This is an implementation of the following work:
* Dual Learning for Machine Translation
* Yingce Xia, Di He, Tao Qin, Liwei Wang, Nenghai Yu, Tie-Yan Liu, Wei-Ying Ma
* https://arxiv.org/abs/1611.00179 (accepted at NIPS 2016)
* Developed by Cong Duy Vu Hoang (vhoang2@student.unimelb.edu.au)
* Date: 21 May 2... |
3b7ee5fbd4d4366dd422272163d03444858ac907 | 3b4c4722d92beaa52961348a633ba4fd01184fc7 | ExpLife0011/OS-shutdown-winapi | /src/Shutdown_service/Shutdown_service/Service.cpp | C++ | cpp | 4,175 | permissive | #include "Service.h"
#include <thread>
const int g_pendingTimeout = 10000;
Service::Service( const std::wstring& serviceName ):
m_serviceName( serviceName ),
m_checkPoint(0),
m_statusHandle(NULL)
{
memset(&m_status, 0, sizeof(SERVICE_STATUS));
m_status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
m_status.d... |
ee9551cad362e42452519dc29d200293e9ba56f2 | c4f30424a9ff361c836f9a4c08cfa6846aad37b6 | NativeScript/webkit | /Source/ThirdParty/openvr/src/vrcommon/vrpathregistry_public.cpp | C++ | cpp | 13,493 | permissive | //========= Copyright Valve Corporation ============//
#include "vrpathregistry_public.h"
#include "json/json.h"
#include "pathtools_public.h"
#include "envvartools_public.h"
#include "strtools_public.h"
#include "dirtools_public.h"
#if defined( WIN32 )
#include <windows.h>
#include <shlobj.h>
#undef GetEnvironmentV... |
f6f79e2d035a07c2fa429f58156db0b39327de1c | 4dd09fe7977d7fa4bdc1f9ee0b71bb555b5ab064 | FabienGadet0/Lunar-Lander | /srcs/collider.cpp | C++ | cpp | 1,218 | no_license | #include "collider.h"
Collider::Collider()
{
_f = sf::Vector2f(0, 0);
}
Collider::~Collider()
{
}
void Collider::init(const sf::Rect<float> &c, const int &id)
{
_c = c;
_c.width /= 2;
_id = id;
_f = sf::Vector2f(0, 0);
}
sf::Rect<float> Collider::getRekt() const
{
return _c;
}
sf::Vector2f Collider::getPos()... |
e5a6fd40e5c2c7d7f18fcb35ae46d72706377073 | 4b44c2c94ebcd8037f7e1f38522bb98962f648b8 | dwilliamson/GDMagArchive | /jul98/Lander/Code/OGL/Spray/EditEmit.cpp | C++ | cpp | 3,340 | no_license | // EditEmit.cpp : implementation file
//
#include "stdafx.h"
#include "Spray.h"
#include "EditEmit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEditEmit dialog
CEditEmit::CEditEmi... |
483ddb95a94a004d049db5641edfe7e73bdc1ed5 | 85b67b5fe01ca187acbfc1c4c912ad5bbbfd5d02 | MD-Foxtail/test-task-ITS-partner | /parS.cpp | C++ | cpp | 3,215 | no_license | #include <iostream>
#include <string>
#include <climits>
#include "parS.h"
#include "logger.h"
LOG_CONNECT;
int findWord(std::string &str, std::string &word, int start)
{
if (start >= str.size() || word == "")
{
LOG_ERROR("findWord(): received invalid input data");
return -1;
}
int i = start, j = 0, r... |
948b13244b0d1d76052c1ac12576d1808351725b | eb39494aad42100b19ceb4e5253521361768b78e | xiangyun-kongxy/genetis | /src/frame/plugin/manager/function_manager.cpp | C++ | cpp | 2,667 | no_license | //
// function_manager.cpp
// plugin
//
// Created by xiangyun.kong on 10/18/17.
// Copyright © 2017 孔祥云. All rights reserved.
//
#include "function_manager.hpp"
#include <lib/init/initializer.hpp>
#include <iostream>
#include <functional>
using namespace std;
using namespace kxy;
namespace pf {
extern re... |
d15176657c0b566fb88cd7f1ba8aa5b8f286f947 | 6bfe20429f578b802c76d4e84759e58b5cc5daac | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/libs/xpressive/test/test_static.cpp | C++ | cpp | 1,010 | permissive | ///////////////////////////////////////////////////////////////////////////////
// test_static.cpp
//
// Copyright 2008 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/xpressive/xpr... |
f68bb5cafe1faffa1b460d09632464302800e18e | 6559169539987c7536dba0995a7aaebccd4e3e2c | dahahua/pap_wclinet | /client/Client/WXClient/Network/PacketHandler/GCShopSoldListHandler.cpp | C++ | cpp | 2,415 | no_license | // GCShopSoldListHandler.cpp
#include "stdafx.h"
#include "GCShopSoldList.h"
#include "..\..\Procedure\GameProcedure.h"
#include "..\..\Object\ObjectManager.h"
#include "..\..\Object\Character\Obj_PlayerOther.h"
#include "..\..\DataPool\GMDataPool.h"
#include "..\..\Event\GMEventSystem.h"
#include "..\..\Object... |
4c43dc709cb5f8205020f48a205473b6e162b773 | 2e26d38a895a6ddbb9480f383a4e838c2cf48e35 | Chen-Zhihui/SeismicPackage | /CPSeis/spws_home/include/vfgui/vfpop_delete.hh | C++ | hh | 2,811 | permissive | /*<license>
-------------------------------------------------------------------------------
Copyright (c) 2007 ConocoPhillips Company
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 with... |
9ae36db086b616045980d875fb9383d1685ccb7a | 61971c400fba8859828b45bb192f4ccbf7459fb0 | MichaelMCE/LCDMisc | /src/ScriptProcs/Time/ScriptWait.cpp | C++ | cpp | 14,922 | no_license | //#include <stdlib.h>
#include "ScriptWait.h"
#include "../../global.h"
#include "../../vm.h"
#include "../../unicode.h"
//#include "../../util.h"
//#include "../../stringUtil.h"
#include <time.h>
#include "../../http/httpGetPage.h"
//#include "../../malloc.h"
#include "../../ScriptObjects/ScriptObjects.h"
struct Scr... |
d0b9ceab35423bde56937121aa1cb1733af54bfa | 1500d4c5e977daf4485106eb9d5d3038eeea0515 | GunterMueller/Ingres | /Ingres_SVN/server/xerces-c-src_2_5_0/src/xercesc/dom/deprecated/DOM_NodeIterator.cpp | C++ | cpp | 5,069 | permissive | /*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. 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 sou... |
57211b5f464a6679dac7a31a16f1e1379b7499b5 | 6e0945cc9dc6005a27e33afad897217e6736437c | Venkatmalu/Programs-in-C-Plus-Plus | /hackerrank1.cpp | C++ | cpp | 450 | no_license | #include<iostream>
using namespace std;
int main() {
long int n,i,j;
long int arr[100][100],b,a;
long int choose;
cin>>a;
cin>>b;
for(i=0;i<a;i++)
{
cin>>n;
for(j=0;j<n;j++)
{
cin>>arr[i][j];
}
}
while(b)
{
... |
9cbfacc8541ad114ac82adf280fd478929753a61 | 93d9731c32d4b18c18782baeb79f028410f420ef | ivan-aksamentov/magma | /src/ssytrd_sy2sb.cpp | C++ | cpp | 17,020 | no_license | /*
-- MAGMA (version 2.1.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date August 2016
@author Azzam Haidar
@author Stan Tomov
@generated from src/zhetrd_he2hb.cpp, normal z -> s, Tue Aug 30 09:38:17 2016
*/
#include... |
5c87a0fdc1380e47b909787438be7c7ce02f0176 | 519187e459d14220d5490ab145a3ffcf22341e0b | ghutchis/avogadroapp | /avogadro/tooltipfilter.cpp | C++ | cpp | 912 | permissive | /******************************************************************************
This source file is part of the Avogadro project.
This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/
#include "tooltipfilter.h"
... |
b3545d2615820e10a8f33eafbda8e50e8f51b2e2 | 5549810a6f07eba09764cf0ff51425635860365f | victorsenam/treinos | /ojs/vjudge/172461/D/D.cpp | C++ | cpp | 2,645 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
#define pb push_back
const int N = 2e6+7;
int a[N];
vector<int> f[N];
vector<vector<int> > g;
vector<pii> pqn;
int n, qs;
int t;
int q[N][4];
int opn[N], cls[N];
ll rs[N];
ll bit[N];
void add (int i, int x) {
for (i += ... |
e9cceb5a72820caab3c54b86e6853522e5bd2ebc | 65ca42b2f6cf148cf6788b1d3a8e0477c0482140 | NiltonGMJunior/learn-cpp | /Chapter06/Section09a/Quiz01/calculate.cpp | C++ | cpp | 594 | no_license | #include <iostream>
#include <string>
#include <utility>
// sortNames returns an array of sorted names
void sortNames(std::string *names, int lengthNames)
{
// Selection sorts the names array
for (int startIndex = 0; startIndex < lengthNames - 1; ++startIndex)
{
int lowestIndex = startIndex;
... |
184cd3720c17f1dd4245a1600f3b3fd0cf85d4b6 | 331ed78cf5d05281484ff65bb37a0afa05494eb9 | uel-dataexchange/Opencascade_uel | /src/TDF/TDF_AttributeIterator.cxx | C++ | cxx | 3,536 | no_license | // File: TDF_AttributeIterator.cxx
// --------------------------
// Author: DAUTRY Philippe
// <fid@fox.paris1.matra-dtv.fr>
// Copyright: Matra Datavision 1997
// Version: 0.0
// History: Version Date Purpose
// 0.0 Feb 7 1997 Creation
#include <TDF_AttributeIterator.hxx>
//===============... |
9f6a94072de0eb49adf0459e3809a97bcdb33080 | b50c0f9b9304d14fbf78250aeedaa8bf39e4855b | esakiryota/aoj | /aoj6.cpp | C++ | cpp | 686 | no_license | #include<iostream>
#include<algorithm>
#include<vector>
#include <typeinfo>
#include <cstdlib>
#include <cstdio>
using namespace std;
int top, S[1000];
void push(int x) {
S[++top] = x;
}
int pop() {
top--;
return S[top+1];
}
int main() {
int a, b;
top = 0;
// char l[100];
char l[1000];
while(cin >> ... |
fb15a08faedc284a703929efc840d76ce47a63ef | 75095be4007803641075cedb400c2db992f7d1a7 | Gopu2001/ucsb_ccs_labs | /cs16/lab06/mafTest.cpp | C++ | cpp | 6,541 | no_license | #include <iostream>
#include "arrayFuncs.h"
#include "moreArrayFuncs.h"
#include "tddFuncs.h"
using namespace std;
int main() {
int fiveThrees[5]={3,3,3,3,3};
int zeros[3]={0,0,0}; // initializes all elements to 0
int empty[] = {};
int primes[] = {2,3,5,7,11,13,17,19,23,29};
int meaning[] = ... |
16baf87926ea3c99226413a4d5f17098be21239b | ce6e480b3290bbca957e4d60860637d7f68598ec | 0xB111B/Pyramid | /pyramid.cpp | C++ | cpp | 565 | no_license | #include <string>
#include <vector>
using namespace std;
bool isPyramidWord(const string& s)
{
if (s.length() == 0)
return false;
vector<int> count('z'-'a', 0);
for (int i = 0; i < s.length(); i++)
{
if (!isalpha(s[i]))
return false;
count[tolower(s[i])-'a']++;... |
fb8de1f1343f6ad3d8b4c052a4c01e7317acbc17 | 0301d33001f47610d8df4dafe5eb00f316e446d3 | Sub-Way/ComputerGraphicsWeek13 | /week_13_physically_based_animation/main.cpp | C++ | cpp | 4,787 | no_license | #include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <GL/GLU.h>
#include <GL/freeglut.h>
#include <cstring>
#include <stdlib.h> // srand, rand
#include <thread> // std::this_thread::sleep_for
#include <chrono> // std::chrono::seconds
#include <iostream>
#include "math.h"
#include <vector>
#include <... |
e8e336e0027ad930a0b0f66f6b744b765f781ee4 | a159fb03317d9fd6d09b089802525421c0d4d276 | lizhenghong66/open_spiel | /open_spiel/games/hex.cc | C++ | cc | 9,983 | permissive | // Copyright 2019 DeepMind Technologies Ltd. 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 require... |
5b9ba873ebe43146f47ebb41fd4b24c1fed5cce7 | 9e528b31a8c51eed8d87e53b7f26076fc54bf80d | CaptFrank/GHID | /BLUNO_Project/BLUNO_MMA7361L/Src/Main/MMA7361LDriver.cpp | C++ | cpp | 8,984 | no_license | /*
* MMA7361LDriver.cpp
*
* Created: 5/21/2014 1:10:40 PM
* Author: Administrator
*/
#include "MMA7361LDriver.h"
//! Public Context
/**
* This is the default constructor for the class. A pin map
* is passed to the constructor to allow for setting up of the device.
*
* @param pin_map -... |
5579df73786cdd23b98063947069f12e5ff9ff8e | 2a0015cb5e98dba2b12670ef3a8e51e76c1c7d70 | khoa102/mobile-bench | /app/src/cpp/benchmark/SHOC-level0/BusSpeedDownload.cpp | C++ | cpp | 8,674 | permissive | #include <string>
#define CL_TARGET_OPENCL_VERSION 200
#include <CL/opencl.h>
#include <CL/err_code.h>
#include <stdio.h>
#include <Event.h>
#include <BusSpeedDownload.h>
std::string BusSpeedDownload(cl_device_id id,
cl_context ctx,
cl_command_queue queue, std::string& message, bool... |
80386a3cfeac18a18b579b2d4ff7b0f5027bc0de | f65f10c6c7f0b5ff280e2bc4763a9edbf71c6669 | ChaseTuring/acm-codes | /contest/HHU2020_1/G.cpp | C++ | cpp | 1,564 | no_license | #include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const int mod = 1e9+7;
const double eps = 1e-5;
const int N = 1e5+10;
void redirect() {
freopen("test.in","r",stdin);
freopen("test.out",... |
f5fe9853ffdfd88dccd7268a0c8ccf289773ad9e | 67dc0d252f65dea2f96fffdf8d930a468654046b | dumganhar/Skia | /tests/Matrix44Test.cpp | C++ | cpp | 4,633 | no_license | #include "Test.h"
#include "SkMatrix44.h"
static bool nearly_equal_scalar(SkMScalar a, SkMScalar b) {
// Note that we get more compounded error for multiple operations when
// SK_SCALAR_IS_FIXED.
#ifdef SK_SCALAR_IS_FLOAT
const SkScalar tolerance = SK_Scalar1 / 200000;
#else
const SkScalar tolerance = ... |
70b506603f112504b52f8558a3fd105e88f48a12 | bb22198360c4f230e81a8d053d129c9055633075 | adolfans/Lost-of-the-deed | /LostOfTheDeed/src/MyGameLevel.cpp | C++ | cpp | 7,195 | no_license | #include "StdAfx.h"
#include "MyGameLevel.h"
#include "MyGameFunctions.h"
#include "MyGameMessage.h"
#include "MyGameMessageBox.h"
//definitions of the static members in MyGameLevel
//MyGameInstance* MyGameLevel::gameInstance = NULL;
MyGameLevel* MyGameLevel::currentLevel = NULL;
string MyGameLevel::dataFil... |
0be44b47f55c927156391e2915bfd20343d4ef97 | 5b298d76e46b60648828fcc4359eec8e026fda5b | WAR10CKfreeworld/RetroShare | /retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp | C++ | cpp | 5,885 | no_license | /****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2008 Robert Fernie
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by th... |
b031ad05b83bc9926bc97124bddb55bb1336a719 | 4306e8931b0e8fd74ac5d060e39b463e4ee8358c | iridium-browser/iridium-browser | /base/uuid.cc | C++ | cc | 5,709 | permissive | // Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/uuid.h"
#include <stddef.h>
#include <stdint.h>
#include <ostream>
#include "base/rand_util.h"
#include "base/strings/string_util.h"
#include "base/strings/st... |
99fd0478ae7579e235d9941a46724bdffecf1eba | 48fe1edb4396edf4e7b1d469fcab0d4072179f95 | ece8264/Vitis-HLS-Introductory-Examples | /Interface/Memory/manual_burst/manual_burst_example/auto_burst_inference_failure/example_tb.cpp | C++ | cpp | 479 | permissive | #include "example.h"
#include <iostream>
#define iter 10
int main()
{
int size = 512;
int in[size*iter];
int a[size];
int out[size*iter];
for(int i=0;i<size;i++)
{
in[i]= i;
a[i] =i;
}
krnl_transfer(in,out,size);
int var ;
for(int j=0; j<iter;j++)
{
for(int i=0;i<size;i++)
{
if(out[i] != a[i] )... |
91da3c2eca2ca8c2f1a8322edb1a93431e57a49f | ed3c86589ceef6c47d53e60e9f1a356745110198 | BrodaNoel/expo | /ios/versioned-react-native/ABI30_0_0/ReactCommon/cxxReactABI30_0_0/ABI30_0_0JSBundleType.cpp | C++ | cpp | 883 | permissive | // Copyright 2004-present Facebook. All Rights Reserved.
#include "ABI30_0_0JSBundleType.h"
#include <folly/Bits.h>
namespace facebook {
namespace ReactABI30_0_0 {
static uint32_t constexpr RAMBundleMagicNumber = 0xFB0BD1E5;
static uint32_t constexpr BCBundleMagicNumber = 0x6D657300;
ScriptTag parseTypeFromHeader... |
676d8b9d1cb6c90d9a82c1feefcea3f871f99a01 | 4acedb271ce0970f26b21b405e3557b846af07cd | Ntels-sup/SRC_ATOM_BE | /SERVER/ALM.20160509/NodeManagerIF.hpp | C++ | hpp | 1,007 | no_license | #ifndef __NODE_MANAGER_IF_HPP__
#define __NODE_MANAGER_IF_HPP__
#include <cstring>
#include <string>
#include <vector>
#include "CMesgExchSocket.hpp"
#include "AlarmDataDef.hpp"
class NodeManagerIF
{
public:
NodeManagerIF();
~NodeManagerIF();
bool Init();
bool Connect(const char * _ip, int _po... |
5e930d5f669ae161c8e839a3749ab7d93a0b9459 | 0d19a745afbbefac3eb55aaad104690b113e64c1 | oTreasureo47/ZeloEngine | /Engine/Core/Physics/src/pworld.cpp | C++ | cpp | 3,317 | permissive | /*
* Implementation file for random number generation.
*
* Part of the Cyclone physics system.
*
* Copyright (c) Icosagon 2003. All Rights Reserved.
*
* This software is distributed under licence. Use of this software
* implies agreement with all terms and conditions of the accompanying
* software licence.
*/... |
10ddbf57e2797193864d8d1e95bb25877ba5bded | 93db319972ee556dd98176f60f5c041cbd465531 | briansrls/xls | /xls/noc/config/virtual_channel_config_proto_builder.cc | C++ | cc | 1,244 | permissive | // Copyright 2020 The XLS Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
a7678f0e55c7d279cba4106f2f7499d2c6c75c91 | 210afbdfd0964803f827a930465fcf4d009f0b8f | yhoon-skku/2020FALL_CPE | /lecture11/3_pet_pure_virtual.cc | C++ | cc | 471 | no_license | #include <iostream>
using namespace std;
class Pet
{
public:
string name;
virtual void print() const = 0;
};
class Dog : public Pet
{
public:
string breed;
void print() const override final;
};
void Pet::print() const
{
cout << "name: " << name << endl;
}
void Dog::print() const
{
Pet::prin... |
21de628ca75dc430b8538e1e0159f7230fb706f3 | 34de2303b270b84ad6795d161ba5071b2084338b | sifudiep/OOChess2.0 | /OOChess2.0/Queen.cpp | C++ | cpp | 1,805 | no_license | #include "Queen.h"
void Queen::updatePossibleCoordinates(BoardSquare board[8][8], std::vector<Piece*> &allPieces) {
possibleCoordinates.clear();
// Move like BISHOP
for (int i = 1; coordinate.y + i < 8 && coordinate.x + i < 8; i++) {
bool squareIsOccupiedByOwner = addPossibleBoardSquare(board, coordinate.x + i,... |
24e620f2ba3c4c8491943f372c22d3e5bcbe75cc | 046893db847efd92e344bf46567ff864a6105072 | saltty9188/OpenGL3D | /src/Drawables/Texture.cpp | C++ | cpp | 1,675 | no_license | #include "Texture.h"
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
using namespace Drawables;
Texture::Texture(const std::string& fileName) : _filePath{ fileName }, _texID{0}, _loaded{ false }, _pixels{ nullptr }, _width{0}, _height{0}, _bitsPerPixel{0}
{
if (fileName != "")
{
//stbi_set_flip_... |
d1ddb7e7a482f903e6ca808b4ea37d160f622ec9 | 51d2531ae9a90d6ec725706ecd414c5a4c4be05a | kartalozbalkanli/deneyapOdev9-10 | /main.cpp | C++ | cpp | 1,109 | no_license | #include <iostream>
using namespace std;
class Oyuncular{
public:
string ad;
int numara;
int basket;
Oyuncular(string ad, int numara, int basket){
this->ad = ad;
this->numara = numara;
this->basket = basket;
}
void bilgiler(){
cout << "Ad Soyad: " << ad << endl;
... |
f16e3b5761c498cb2c244a2d5e9682e56b570a5f | e7a895ff1eca02bd2e021990e440f871fa8c028b | rails-engine/script_core | /ext/enterprise_script_service/dlmalloc_config.hpp | C++ | hpp | 654 | permissive | #ifndef ENTERPRISE_SCRIPT_SERVICE_DLMALLOC_CONFIG_H
#define ENTERPRISE_SCRIPT_SERVICE_DLMALLOC_CONFIG_H
#include "error.hpp"
#define ONLY_MSPACES 1
#define HAVE_MREMAP 0
#define CORRUPTION_ERROR_ACTION(state) \
do { \... |
ec05c50c3bd1f871d559794ab7bdedd3a357eea9 | c634504e70cbe5c5fb369a0c47753b9221aa5975 | slicer2/leetcode | /search_matrix_zeros/main.cpp | C++ | cpp | 463 | no_license | #include <iostream>
#include <vector>
#include <sstream>
#include <string>
using namespace std;
class Solution {
public:
void setZeroes(vector<vector<int> > &matrix) {
}
};
int main() {
string s;
vector<vector<int> > matrix;
while( getline(cin, s)) {
stringstream ss(s);
vector<int> row;
int n;
whi... |
77a7ed237b033e954dbf7d65da3751e892381291 | 3dfd269606618782c08bea2c433423ada6c8fa7b | ncsuandrew12/yamo | /src/common/database/DBQueryException.cpp | C++ | cpp | 325 | no_license | // Header
#include "DBQueryException.hpp"
// Standard includes
// Third-party includes
// Yamo includes
namespace Yamo {
std::ostream& DBQueryException::printMsg(std::ostream& os) const
{
return Exception::printMsg(os) << std::endl
<< " " << mSqlError.what()
<< " QUERY: " + mSqlError.query();... |
71c409e0195f23f2164b490cfed708f14b0a260e | 0a1f206021bee38493e42c209749a6d477c92283 | zenoalbisser/chromium | /ash/system/tray/tray_popup_header_button.cc | C++ | cc | 2,483 | 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 "ash/system/tray/tray_popup_header_button.h"
#include "ash/ash_constants.h"
#include "ash/system/tray/tray_constants.h"
#include "ui/base/resour... |
0dd86f9805215e9897987aab2fff64b10932b156 | 223f033e8d27e274c1532426728dc3a55159a90e | caifubing/study | /facade/facade.cpp | C++ | cpp | 202 | no_license | #include "facade.h"
Facade::Facade(std::shared_ptr<Light> light)
{
m_light = light;
}
Facade::~Facade()
{
}
void Facade::on()
{
m_light->On();
}
void Facade::off()
{
m_light->off();
}
|
a15567fcc9420be584d0ae6a20643c71837db9fa | be05068d7a525bc1d442f29287dc7cf4ca19c012 | quinsmpang/foundations.github.com | /build/pc/MTL_4_0_8878/MTL-all-4.0.8878-Linux/usr/include/boost/numeric/mtl/operation/dot.hpp | C++ | hpp | 9,093 | no_license | // Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: Peter Gottschling and And... |
47816d18100629985db55f24cafbe0e3e5c1effe | 21fe5dbb03d5e81d183e830c4e46a50cb97afc8e | oneapi-src/oneDAL | /cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_cpu.cpp | C++ | cpp | 1,509 | permissive | /* file: stump_regression_train_dense_default_batch_fpt_cpu.cpp */
/*******************************************************************************
* Copyright 2014 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ... |
16e9e446f4c84611739eb3aac2084de18450bfb9 | 0d9a8e7bdbbb3f12f7a9df9e8c12c00bfdccacab | saleph/GKOM_quern | /GKOM-opengl/main.cpp | C++ | cpp | 11,331 | no_license | #include "main.h"
#include "CubeBuilder.h"
std::atomic<unsigned long> fps;
std::atomic<double> frameTimes;
int SPIN_DIRECTION = 1;
float CAMERA_Z = 5.0f;
void MainScene::setupScene() {
const float ROTATION_SPEED = 300.0f;
const float PI = 3.1415f;
const float CYLINDER_HEIGHT = 1.0f;
const float TOWER_HEIGHT = 5.0... |
c9dbc6d7af7c852e5f4fbbe7e92e72bb381efdaa | 98fca5035ccfcaeb497e6b6658e211abe7b60baf | DarkCodez/TCF-SDK | /SDK/TCF_EN_EffortTypes_enums.hpp | C++ | hpp | 1,055 | no_license | #pragma once
// The Cycle Frontier (1.X) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Enums
//---------------------------------------------------------------------------
// UserDefinedEnum EN_EffortTypes.EN_Effort... |
782e9545ae1eb4c11261134f82797b5419f56e6c | 695aa3a578f59fb615758b62693bc574ca10b668 | UBIC-repo/core | /PassportReader/Reader/BacKeys.cpp | C++ | cpp | 3,210 | permissive | #include "BacKeys.h"
#include "../../Crypto/PassportCrypto.h"
#include "../../Tools/Hexdump.h"
#include "../../Tools/Log.h"
#include <string.h>
#include <iostream>
using namespace std;
void BacKeys::calculateKey(int cType, char* ka, char* kb) {
char d[100];
char seed[16];
calculateKSeed(seed);
Hexdump... |
ed6b997362e4b8d82919a87f40e6277f176cecae | 32f292a076b90b340f686a5e1557225c821f2e92 | blavad/NeuralNetworks-manager | /src/deeplearn/archi/Sigmoid.cpp | C++ | cpp | 697 | no_license | #include "Sigmoid.hpp"
Sigmoid::Sigmoid(std::string no):CoucheActivation(no)
{
}
Sigmoid::Sigmoid(DimTenseur din, std::string no):CoucheActivation(din,no)
{
}
double calcul_sigmoid(double x)
{
return 1.0/(1.0+exp(-x));
}
double calcul_derive_sigmoid(double x)
{
return calcul_sigmoid(x)*(1-calcul_sigmoid(x));
}
T... |
99a08ed04565841b16329a732456a454bf59b496 | 4484822674db9aae06625899ea988a7e4db08a48 | cjlee1197/437x497 | /framewnd.cpp | C++ | cpp | 3,615 | no_license | /* Copyright (C), 2003-2008, Techmation. Co., Ltd.*/
/*===========================================================================+
| Class : FrameWnd |
| Task : Frame window file |
|---------------------------... |
c39dc1c12e1be321dc3dce99f231bc4e397dc6dd | 5aa3f2b5c2a646bc590c5ce20085c6661dc20d92 | 2dgirlismywaifu/Cplusplus-oop-knowledge | /btkethua/bt01_kethua/bt01_kethua.cpp | C++ | cpp | 2,395 | no_license | #include <iostream>
using namespace std;
class shade {
private:
//length: x
//width: y
float x, y;
public:
void setX(float x) { x = x; }
float getX(void) { return x; }
void setY(float y) { y = y; };
float getY(void) { return y; }
shade(float x, float y);
};
shade::shade(float x, float y... |
13cfd404078579cc123d197915f7d2552fcbaa16 | 22f5e622b3e96df8e2d9dd8edc8c5ab4928c61b8 | arcaneframework/framework | /arcane/src/arcane/materials/MeshMaterialModifierImpl.cc | C++ | cc | 14,719 | permissive | // -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
//-----------------------------------------------------------------------------
// Copyright 2000-2023 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: Apache-2... |
459438455caac046ad91df938b21789a766e0e81 | 98fa18ff2a8e552295675991c3f385d014950a1e | NoCodeBugsFree/NetworkShooter | /Source/NetworkShooter/Weapons/Projectiles/GrenadeProjectile.cpp | C++ | cpp | 3,624 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "GrenadeProjectile.h"
#include "Net/UnrealNetwork.h"
#include "GameFramework/ProjectileMovementComponent.h"
#include "Components/SphereComponent.h"
#include "Kismet/GameplayStatics.h"
#include "ConstructorHelpers.h"
#include "Parti... |
ad9f0e7820757f0aa9a48bcc49ab93525437d060 | 9240e574accaa752b638e06b524ecb3ee9d5ee62 | dlin172/Plange | /source/plc/include/document/FUNCTION_MODIFIER_MODEL.hpp | C++ | hpp | 1,905 | permissive | // This file was generated using Parlex's cpp_generator
#ifndef INCLUDED_FUNCTION_MODIFIER_MODEL_HPP
#define INCLUDED_FUNCTION_MODIFIER_MODEL_HPP
#include <optional>
#include <variant>
#include <vector>
#include "erased.hpp"
#include "parlex/detail/abstract_syntax_tree.hpp"
#include "parlex/detail/builtins.hpp"
#i... |
1fec5ee9b4eee4747fa06619121e3ce21c3ea290 | 94ae16289482e3ceabeced1d9b32464c6440b61b | Spritutu/Common | /Xtreme/Android/AndroidRenderer.cpp | C++ | cpp | 9,505 | no_license | #include "AndroidRenderer.h"
#include <android/log.h>
AndroidRenderer::AndroidRenderer() :
m_Window( NULL ),
m_Width( 0 ),
m_Height( 0 ),
m_Display( EGL_NO_DISPLAY ),
m_Context( EGL_NO_CONTEXT ),
m_Surface( EGL_NO_SURFACE )
{
}
bool AndroidRenderer::Initialize( GR::u32 Width, GR::u32 He... |
078c0f45debd347ff1c303e6556c5f90e53b597a | db937158bbdb65f5a12413af8dc9ba9126aa5df0 | sasdf/chromium | /chrome/browser/android/autofill_assistant/ui_controller_android_utils.cc | C++ | cc | 15,279 | permissive | // Copyright 2019 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/android/autofill_assistant/ui_controller_android_utils.h"
#include "base/android/jni_array.h"
#include "base/android/jni_string.h... |
e24892a288224493ce0e48d82a12d24efafb93dd | b05fb71cdc677794e5b6bfcf15d50a15142210d7 | AcuteAngleCloud/Acute-Angle-Chain | /contracts/libc++/upstream/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/dereference.runtime.fail.cpp | C++ | cpp | 759 | permissive | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
853edcf49f171b2988ed2225e556a66b7a931f92 | 47b7219f15bd5d8f306b6cfe02edd3b266fb393d | karunmatharu/Android-4.4-Pay-by-Data | /external/chromium_org/content/browser/indexed_db/indexed_db_metadata.cc | C++ | cc | 1,212 | 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/indexed_db/indexed_db_metadata.h"
namespace content {
IndexedDBObjectStoreMetadata::IndexedDBObjectStoreMetadata(
cons... |
6b38bbb78415e9ac90ade93b94855b70a48c60c7 | a84c909b7fa18b929c8bf9a34593652825cdd9b0 | tangxianbo/vkhr | /include/vkpp/physical_device.hh | C++ | hh | 4,047 | permissive | #ifndef VKPP_PHYSICAL_DEVICE_HH
#define VKPP_PHYSICAL_DEVICE_HH
#include <vkpp/extension.hh>
#include <vkpp/surface.hh>
#include <vulkan/vulkan.h>
#include <string>
#include <unordered_set>
#include <vector>
namespace vkpp {
class PhysicalDevice final {
public:
PhysicalDevice() = default;
Ph... |
67384195b69bdba2ebee16c2ff361edebe7fae29 | e93ed453859371e876c1517ad0ce7f85a0f29e61 | ChoiSunPil/algoritm | /stringtest.cpp | C++ | cpp | 467 | no_license | #include <iostream>
#include <string>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main()
{
string a = "123456789";
cout<<a.length()-1 <<endl;
string s;
s.assign(a,0,1);
cout<<a.length()-1 <<endl;
cout<<a.assign(a,1,a.length()-1)<<endl;
cout<<a<<endl;
a.append(s);
cout<<a<<endl;
s = a;
for (int i... |
c5de357136da762c760e2b2f93a0357122d9eb4f | 94a47a91d80bee7400c6477ad770d95cb611557c | toggl-open-source/toggldesktop | /third_party/poco/Net/samples/HTTPTimeServer/src/HTTPTimeServer.cpp | C++ | cpp | 5,728 | permissive | //
// HTTPTimeServer.cpp
//
// This sample demonstrates the HTTPServer and related classes.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/HTTPServer.h"
#include "Poco/Net/HTTPRequestHandler.h"
#include "P... |
e8ed2a7d7a4e7c1cdf614e22c9cca8aeb7adfb42 | 9baa6c20d3d6776898f7f8d7f4721a56d01380a5 | GloryShovel/Warms | /src/physics.cpp | C++ | cpp | 987 | no_license | #include "physics.hpp"
void Physical::update(double dt_f)
{
using namespace tp::operators;
auto new_acceleration = (acceleration - velocity * length(velocity) * friction) + (gravityAcc);
auto new_velocity = (velocity + new_acceleration * dt_f);
auto new_position = position + new_velocity * dt_f + new_accelera... |
4bc44d3e67af94569f0a4515625969ebe9cdc89d | b9e469a84c9c2a017fd8a53581dbf766e4f5f402 | igchesnok/AHRUnrealEngine | /Engine/Source/Editor/TaskBrowser/Private/TaskBrowserModule.cpp | C++ | cpp | 1,204 | no_license | // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#include "TaskBrowserPrivatePCH.h"
#include "STaskBrowser.h"
#include "ModuleManager.h"
#include "Editor/WorkspaceMenuStructure/Public/WorkspaceMenuStructureModule.h"
IMPLEMENT_MODULE( FTaskBrowserModule, TaskBrowser );
namespace TaskBrowserModule
{
stat... |
ce71695b5f2dd4ed629be228cecfdf6a73008f74 | 4a966dfafb0d42293d650dcf1b426c1057d0e401 | cfinegan/Comp-IV-Final-Assignment | /InputParser.cpp | C++ | cpp | 19,530 | no_license | /*
* File: InputParser.cpp
* Author: Conor Finegan
* Contact: conor_finegan@student.uml.edu
*
* Created on November 24, 2015, 12:19 PM
*/
#include "InputParser.h"
XERCES_CPP_NAMESPACE_USE
using namespace std;
InputParser::InputParser()
{
Initialize();
}
void InputParser::Run()
{
... |
4dc7e7f031b909babf1ed88bec993a11e64c5b21 | bc8c1cc85f670518f861a552561970b3741011cc | SantiagoTadio/SpaceOdissey2 | /usuario.cpp | C++ | cpp | 331 | no_license | #include "usuario.h"
usuario::usuario(string _alias,string _password)
{
//asignacion del nombre de usuario y contraseña
alias=_alias;
password=_password;
}
string usuario::get_alias()
{
return alias; //retorna el nombre de usuario
}
string usuario::get_pass()
{
return password; //retorna la cont... |
99162bdd805f4d5c0363900bbbfaadd1f0843ae3 | 185a1c6c6728ea3cefa62f17f92dc5e816b7eac5 | blob810/makemkv | /makemkv-oss-1.12.0/libmakemkv/src/libmkv.cpp | C++ | cpp | 42,734 | no_license | /*
libMakeMKV - MKV multiplexer library
Copyright (C) 2007-2018 GuinpinSoft inc <libmkv@makemkv.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.1... |
cffdc17e659005750a5623601f13e4f712c6fe2f | 8e7151e8b496fba4f567dc77760362bd109b544b | ShinSeungChul/BOJ | /15829/15829/소스.cpp | C++ | cpp | 495 | no_license | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<set>
#include<utility>
#include<string>
#include<map>
#pragma warning(disable:4996)
using namespace std;
#define MOD 1234567891
int main() {
int n;
long long ans = 0;
string s;
long long temp = 1;
cin >> n;
getcha... |
ec4afcfd34fc640a4573d2e330fde48828fd46fc | 222ffc35d1448450eb37fcaf055418a7664d6be8 | solodynamo/protobuf | /src/google/protobuf/util/internal/proto_writer.cc | C++ | cc | 28,942 | permissive | // 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:
//
// ... |
708a25836b57fdafcbac1e848ea7aabae455ee04 | eda33cfcec8b871a33889727742c26267b8419e6 | Vild/testbench | /gl_testbench/main.cpp | C++ | cpp | 13,643 | no_license | #include <string>
#include <SDL_keyboard.h>
#include <SDL_events.h>
#include <SDL_timer.h>
#include <type_traits>
#include <assert.h>
#include <math.h>
#ifdef _WIN32
#include <filesystem>
#else
#include <experimental/filesystem>
#endif
#include "Renderer.h"
#include "Mesh.h"
#include "Texture2D.h"
#include <math.h>
#... |
7fd3358ac3a1051f30a71fc345494f69913cbce0 | ed2c6e15f1a23db4fa0c071ed12e92f74f047cca | elemel/oglplus | /include/oglplus/shapes/wicker_torus.hpp | C++ | hpp | 24,950 | permissive | /**
* @file oglplus/shapes/wicker_torus.hpp
* @brief WickerTorus builder
*
* @author Matus Chochlik
*
* Copyright 2010-2013 Matus Chochlik. 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)
*/
#pragma on... |
145e3fcdebd775dc06c01459e71f439a572a4360 | 7c6f8423f127c94ea75a7dccc8bb115f2a046567 | sravanti298/openthread | /src/core/thread/network_data_leader_ftd.cpp | C++ | cpp | 47,907 | permissive | /*
* Copyright (c) 2016, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this ... |
700b5901161595c8206325d7fe1afcc14b70731c | e3a10053affe17df072515dce33ff00ffc5c552c | Ayoob7/google-research | /scann/scann/distance_measures/one_to_one/cosine_distance_novec.cc | C++ | cc | 957 | permissive | // Copyright 2020 The Google Research Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... |
7ef954cc3b17272c3ddbbf3ab795850e76ca0281 | 153e6a497304424017252a82e5a3b528b2598f4c | moaminsharifi/cpp-class-97982 | /12/array/main.cpp | C++ | cpp | 306 | no_license | #include <iostream>
#include<array>
using namespace std;
int main()
{
array<int , 12> arr;
for(int i = 0 ; i < 12 ; i++){
arr[i] = i * i;
}
for(i : arr){
i = 10 ;
}
for(i : arr){
cout<<i<<endl ;
}
cout << "Hello world!" << endl;
return 0;
}
|
646c613ae58416b5991f9037eb4a78bcd47fd321 | 588e2dfb06cab431bddb5064510e77949f86cc1c | Song1996/Leetcode | /p113_Path_Sum_II/p113.cpp | C++ | cpp | 1,134 | permissive | #include <iostream>
#include <memory>
#include <vector>
#include <stack>
#include <map>
#include <string>
#include <assert.h>
#include <algorithm>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
p... |
d8dda69fce1e22515aeb2b9b4ccfdb66568b0773 | 304fe880255338c0eaef97413832fd593a30deac | ossimlabs/ossim | /src/imaging/ossimPdfWriter.cpp | C++ | cpp | 52,901 | permissive | //----------------------------------------------------------------------------
//
// License: See top level LICENSE.txt file
//
// Author: David Burken
//
// Description: OSSIM Portable Document Format (PDF) writer.
//
//----------------------------------------------------------------------------
// $Id$
#include <o... |
a2473d347763a3bf24c190857a546a898e8008a4 | ac87781cb77bd3c6450ce7fb1ec30e94a228860b | shaunakbhanarkar/Practice-Geeks-For-Geeks | /Arrays/kadane.cpp | C++ | cpp | 813 | no_license | #include<bits/stdc++.h>
using namespace std;
int kadane(int a[], int n)
{
int currentMax = a[0];
int globalMax = a[0];
for (int i=1;i<n;i++)
{
currentMax = max(a[i], currentMax + a[i]);
globalMax = max(currentMax, globalMax);
}
return globalMax;
}
int main()
{
//code... |
ecf97fd378cf42d8bc230c80592b96f00f3d6f92 | 5037fe64ae485f0b0bb917d96b6d59e7503de60b | GABRIELMUTTI/game-engine | /mtgraphics/include/mtgraphics/graphic/ModelRenderer.hpp | C++ | hpp | 710 | no_license | #pragma once
#include "mtgraphics/graphic/IRenderer.hpp"
#include "mtgraphics/graphic/Model.hpp"
#include "mtgraphics/graphic/ShaderProgram.hpp"
#include "mtgraphics/graphic/Camera.hpp"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <vector>
#include <algorith... |
5145e6c26da4404f5e4d8ace05ebe54ada3bb0cc | aa0484a7a8afafaf1ae9ef9d99c65204c6fccc00 | GoldenThumbs/Urho3D | /Source/Samples/53_LANDiscovery/LANDiscovery.cpp | C++ | cpp | 6,652 | permissive | //
// Copyright (c) 2008-2021 the Urho3D project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, m... |
e7be8fce838718538115b94d3e0e443c272a2ff3 | ff0fa810cac0a7bc3c4190bcf31c2769e5862f5d | askarakshabayev/PP1-2018 | /week3/1/3.cpp | C++ | cpp | 261 | no_license | // N = 60, 1, 4, 9, 16, 25, 36, 49
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int k = 1;
while (k * k <= n) {
cout << k * k << " "; // 1 4 9 ...
k++;
}
// n = 60
// k = 2
return 0;
} |
b7ab27c9c07e3bb343c95063afd9ef7de34a5175 | a13c2ad0cc1bad34157eea4198badf5020b9b853 | virtuallyud/Postion-Indipendent-Code-Framework | /PICFramework/resolver.cpp | C++ | cpp | 8,183 | no_license | #include <windows.h>
#include <Shlobj.h>
#include "definitions.h"
#include "LogicalEntryPoint.h"
#pragma optimize( "", off ) // *** Disable all optimizations - we need code "as is"!
#pragma code_seg(".extcd") // *** Lets put all functions in a separated code segment
int __stdcall ResolverEntryPoint()
{
DWORD dwCur... |
54d449d4509274b657f529a24369101f894120a8 | caafe3973d2a2b5ec750b95d019850d17a4a5b8b | adaptive-intelligent-robotics/AURORA | /cpp/modifier/preprocessor.hpp | C++ | hpp | 3,336 | no_license | //
// Created by Luca Grillotti on 31/10/2019.
//
#ifndef SFERES2_PREPROCESSOR_HPP
#define SFERES2_PREPROCESSOR_HPP
#include <iostream>
template<typename TParams>
class RescaleFeature {
public:
RescaleFeature<TParams>(float epsilon_std) : no_prep(true), m_epsilon_std(epsilon_std) {}
typedef Eigen::Matrix<fl... |
f6724d8c5d28ae1c9b16c70b12353be47f491575 | ec96598e38e328b7c0bdeb978e1335b97dd3e5f4 | ChrisYuan/sqlines | /sqldata/sqlasaapi.cpp | C++ | cpp | 62,502 | permissive |
// SqlAsaApi Sybase SQL Anywhere API
// Copyright (c) 2012 SQLines. All rights reserved
#include <string.h>
#include <string>
#include "str.h"
#include "sqlasaapi.h"
#include "os.h"
// MySQL C API definitions
#include <mysql.h>
// Constructor
SqlAsaApi::SqlAsaApi()
{
_henv = SQL_NULL_HANDLE;
_hdbc = SQL_NULL_HAND... |
ccf75c784d557ae7a715a687427885412f5a5943 | b35b56f809f19687e902e162b34aae448e0fcc1e | varshith15/Othello-Bot | /MyBot.cpp | C++ | cpp | 8,255 | no_license |
#include "Othello.h"
#include "OthelloBoard.h"
#include "OthelloPlayer.h"
#include <cstdlib>
#include <ctime>
#include <list>
using namespace std;
using namespace Desdemona;
#define INF 1e18
Turn my;
clock_t start,finish;
OthelloBoard globalBoard;
// m = myMove
// y = yourMove
// e = emptyCell
bool canMove(char s... |
70724eea644a6ea1f7886954c1415b6d3a675fea | 9676a8efd24b3078532c7357e4e631f3565c104b | mfkiwl/TASMANIAN | /SparseGrids/tsgOneDimensionalWrapper.hpp | C++ | hpp | 17,321 | permissive | /*
* Copyright (c) 2017, Miroslav Stoyanov
*
* This file is part of
* Toolkit for Adaptive Stochastic Modeling And Non-Intrusive ApproximatioN: TASMANIAN
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redi... |
479b50182fd0a63bdcdad75427fbbdb507439751 | e3b2939520f78087700cf08d0e9933a31f67a1b0 | Chaste/Chaste | /heart/src/problem/PapillaryFibreCalculator.hpp | C++ | hpp | 8,237 | permissive | /*
Copyright (c) 2005-2022, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
6bb33b138ba1bac0f40019ad7e9fd8af0bb6491a | 0008b8eeaf492542d2cae4ab359d1b678f744a3b | r00tk1ts/chromium | /ui/views/mus/views_mus_test_suite.cc | C++ | cc | 9,895 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/views/mus/views_mus_test_suite.h"
#include <memory>
#include <string>
#include "base/base_switches.h"
#include "base/command_line.h"
#inclu... |
a6f3ccdef1ea2030b363f0e70edbb2d647a4e139 | bbc14b5bac71d94df7f2e4ce438619eb0d419c96 | guisoni/Concurrent-Traffic-Simulation | /src/Graphics.cpp | C++ | cpp | 2,552 | no_license | #include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include "Graphics.h"
#include "Intersection.h"
void Graphics::simulate()
{
this->loadBackgroundImg();
while (true)
{
// sleep at every iteration to reduce CPU usage
std::this_threa... |
b03fc786269f109135b10fe016a811662f6d8d2a | 92c652ab66e22ad766cd7f7c247716dc384779af | Phon1209/Competitive_Programming_SourceCode | /JOI/coin2.cxx | C++ | cxx | 2,928 | no_license | #include<bits/stdc++.h>
using namespace std;
// #define DEBUG
// #define TIME
/*
Learn : -
Problem Type : -
Source : -
*/
#pragma GCC optimize ("Ofast")
#define sint(a) int a; qread(a);
#define sint2(a,b) int a,b; qread(a),qread(b);
#define sint3(a,b,c) int a,b,c; qread(a),qread(b),qread(c);
#define int1(a) qread(a);
#... |
8d8db5d1884a1622e675669242edc3a1e03477b4 | 0f0eab8aeb51c13d156f91ca21dbc4aed1c0e035 | globotree/nano-node | /nano/node/lmdb/lmdb.cpp | C++ | cpp | 46,005 | permissive | #include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/utility.hpp>
#include <nano/node/common.hpp>
#include <nano/node/lmdb/lmdb.hpp>
#include <nano/node/lmdb/lmdb_iterator.hpp>
#include <nano/node/lmdb/wallet_value.hpp>
#include <nano/secure/buffer.hpp>
#include <nano/secure/versioning.hpp>
#include <boost/fi... |
c25117435177b07f9cd547ba439b26a4785cf554 | 733c354c6fe8cdb4f6bf7670d8aa5fab1016dc63 | 1736262587/text | /8.3将jpg文件路径存入abc.txt中/MFCApplication1/MFCApplication1/MFCApplication1View.cpp | C++ | cpp | 2,466 | no_license |
// MFCApplication1View.cpp : CMFCApplication1View 类的实现
//
#include "stdafx.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "MFCApplication1.h"
#endif
#include "MFCApplication1Doc.h"
#include "MFCApplication1View.h"
#include <fstream>
#include <iostream>
#incl... |
8e270c783e33d0a23a6f9ebc7aebca2bc38fd3ba | 6ad65c4487002752d6c33acc2719cef00c64e6f0 | auberginekenobi/fgsea | /src/fastGSEA.cpp | C++ | cpp | 12,436 | permissive | #include <Rcpp.h>
using namespace Rcpp;
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <limits>
#include <random>
#include <chrono>
using namespace std;
const double eps = 1e-13;
template <class T>
class SegmentTree {
private:
vector<T> t;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.