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 |
|---|---|---|---|---|---|---|---|---|
b2bd73d185d3bb4a3d4ee0eb2a405f528a3b9db8 | 2297fb0a92b5fb20232b9089d6933c08c6590ba3 | woneill81/CSCI3731 | /HW02/hw2program.cc | C++ | cc | 326 | no_license | #include <cstdio>
#include <iostream>
using namespace std;
int multiplication(int x, int y)
{
return x*y;
}
int main(int argc, char** argv)
{
int num1, num2;
cout << "enter a value for number 1: ";
cin>>num1;
cout << "enter a value for number 2: ";
cin>>num2;
printf("%d\n", multiplication(num1,num2))... |
1f87f94895d22423019ae0264fa0899d049c6357 | a5142da63d684c020e309ac03a0aed739ff3c5b5 | wolfoxonly/dk | /src/kernelrecord.cpp | C++ | cpp | 3,255 | permissive | #include "kernelrecord.h"
#include "wallet.h"
#include "base58.h"
using namespace std;
bool KernelRecord::showTransaction(const CWalletTx &wtx)
{
if (wtx.IsCoinBase())
{
if (wtx.GetDepthInMainChain() < 2)
return false;
} else
if (wtx.GetDepthInMainChain() == 0)
ret... |
a27fd6c21c31263bed71576a3da80b6792c9ff01 | 89b392b59d23c5ece3cfc9f867423122c4156af4 | rohankadekodi/rocksdb_mmap | /db/c.cc | C++ | cc | 74,557 | permissive | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
// Copyright (c) ... |
4f7d3cb15b0b677349e6601adaf6555b7886a742 | 69954e575d10ac4b6d6da2b7fd47a844098d6241 | racecrypto/racecoin | /src/test/miner_tests.cpp | C++ | cpp | 17,653 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h"
#include "coins.h"
#include "consensus/consensus.h"
#include "consensus/merkle.h"
#include "consensu... |
d10b1d0f6ce7d9a1df649cfff1d318087b5909f5 | b0d8db802ef69f5d91b9396ce01fc7b2058d004b | odinshen-git/armnn | /src/backends/reference/test/RefLayerTests.cpp | C++ | cpp | 95,687 | permissive | //
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "RefWorkloadFactoryHelper.hpp"
#include <backendsCommon/test/LayerTests.hpp>
#include <reference/RefWorkloadFactory.hpp>
#include <test/TensorHelpers.hpp>
#include <test/UnitTests.hpp>
#include <boost/test/unit_test.h... |
2fc86359f388ec7e5dec5615e1cb47b7259ede28 | 7c1f18bc46a155678cf8257be3a3653de09b8ec6 | foxboy26/practice | /hackerrank/icecream-parlor.cpp | C++ | cpp | 822 | no_license | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
struct num {
int n;
int idx;
};
bool mySort(const num& a, const num& b)
{
return a.n < b.n;
}
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int T, L, C... |
6e43c485ca4fb7ad046f7bbf8bfff51527634822 | b4a54b8df1acc4fc239d1eeff4ec9567e3441932 | yoshi5534/schorsch-the-robot | /src/Control2012/libreoffice/com/sun/star/ui/XUIElementFactoryRegistration.hpp | C++ | hpp | 1,848 | no_license | #ifndef INCLUDED_COM_SUN_STAR_UI_XUIELEMENTFACTORYREGISTRATION_HPP
#define INCLUDED_COM_SUN_STAR_UI_XUIELEMENTFACTORYREGISTRATION_HPP
#include "sal/config.h"
#include "com/sun/star/ui/XUIElementFactoryRegistration.hdl"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/container/NoSuchElementExc... |
5e1596401b3f778e1464928ed56194769ee4c456 | fcc41ee46ef37050ee15f9aaff638ae75796aeef | wudeven/cells-android10 | /system/linkerconfig/modules/variables.cc | C++ | cc | 1,572 | no_license | /*
* Copyright (C) 2019 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... |
ceebc6ea1a03cd6ebc41305f6edf807461c25548 | c741746de02a171422f1063350f7311d0291ed2f | xrLil-Batya/gitxray | /xrSpherical/Main.cpp | C++ | cpp | 3,155 | no_license | #include "BoundingSphere.h"
#include "Point.h"
#include "Timer.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <conio.h>
float rand(float min, float max)
{
return min + (max - min) * rand() / (float)RAND_MAX;
}
int main()
{
using namespace MiniBall;
const float epsilon =... |
c45304749fbe1bbb5ec349966176fca63356ea52 | 189f4996c6bb9c6ae1ba251ec2871741988894f7 | 0003088/qt-gui-test | /src/libs/tools/benchmarks/benchmark_plugins.cpp | C++ | cpp | 3,596 | permissive | /**
* @file
*
* @brief benchmark for getenv
*
* @copyright BSD License (see doc/LICENSE.md or http://www.libelektra.org)
*
*/
#include <backendbuilder.hpp>
#include <kdbconfig.h>
#include <kdbtimer.hpp>
#include <unistd.h>
#include <fstream>
#include <iostream>
extern "C" char ** environ;
const long long n... |
b67b5a75b49102ca80c9a5cae576bb89f31f5beb | 4f935853250fecc0d4c9d525235ab50f32a68cd1 | sgzwiz/misc_microsoft_gamedev_source_code | /misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/extlib/Rockall/Code/Rockall/Benchmark/TunedHeap.hpp | C++ | hpp | 2,890 | no_license | #ifndef _TUNED_HEAP_HPP_
#define _TUNED_HEAP_HPP_
// Ruler
// 1 2 3 4 5 6 7 8
//345678901234567890123456789012345678901234567890123456789012345678901234567890
/************************************************... |
3bb774426d760cc27dd3ba187a7fd1da87f95376 | 50ae25ab497c9d8bae4d37b4d2e6556996ff136b | timepp/bdlog | /tplogview/filtersetdlg.cpp | C++ | cpp | 1,909 | no_license | #include "stdafx.h"
#include "filtersetdlg.h"
#include "config.h"
extern HWND g_activeModlessDlg;
CFilterSetDlg::CFilterSetDlg()
: m_dlg(CConfig::Instance()->GetConfig().ui.savedpath.filter)
{
}
void CFilterSetDlg::Show()
{
m_dlg.SetFilter(CConfig::Instance()->GetConfig().log_filter);
ShowWindow(... |
d757f8e0aa8191ab69812dd1af7cde22c6e3ccad | dfdc8e6c00f8308ba33ca834e85c8d7c6faa2e6a | salvAuri/optimisationRefactoring | /optimisationRefactoring/differentiatedCAD/occt-min-topo-src/src/IGESSelect/IGESSelect_AutoCorrect.cxx | C++ | cxx | 1,858 | no_license | // Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with spe... |
40668d263b6bf8b042ea9d149bd27dec2468caae | 35d38cad9ffd1a070d247053fac92a05bc1730e2 | ShaneTonkin/OtagoCSRayTracer | /DirectionalLightSource.cpp | C++ | cpp | 1,684 | no_license | #include "DirectionalLightSource.h"
#include "utility.h"
DirectionalLightSource::DirectionalLightSource(const Colour& colour, const Direction& direction) :
LightSource(colour), direction_(direction) {
}
DirectionalLightSource::DirectionalLightSource(const DirectionalLightSource& lightSource) :
LightSource... |
9b032ac70440be1c7ab1b7ecc4d4505ec8cbd60d | 04202f88a4c65340c69a69ffffeb4e0d71a05ef8 | sstsimulator/sst-macro | /tests/api/mpi/datatype/zeroblks.cc | C++ | cc | 1,639 | permissive | /*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include <stdio.h>
#include <sstmac/replacements/mpi/mpi.h>
#include "mpitest.h"
namespace zeroblks {
int zeroblks( int argc, char *argv[] )
{
int errs = 0;
int position, pack_size, i;
int dis[2], blklens[2... |
50da6b8181c307bb17358d21850f7dc227f2e415 | 95ea16665d5961c8907e705b9e70bf702f48d262 | mmarineBlueQuartz/SIMPL | /Source/SIMPLib/CoreFilters/WriteASCIIData.cpp | C++ | cpp | 17,386 | permissive | /* ============================================================================
* Copyright (c) 2009-2016 BlueQuartz Software, LLC
*
* 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 ... |
e458b9d6cf93e4b2ff2adbb05128b43958af2dc1 | 5e973b0d80fd5ec71833f16d9082d7a371998129 | Dreaouth/TinyWebServer | /version_3.0/timer.cpp | C++ | cpp | 3,076 | permissive | #include "timer.h"
sort_timer_lst::sort_timer_lst(){
head = NULL;
tail = NULL;
}
sort_timer_lst::~sort_timer_lst(){
util_timer *temp = head;
while(temp){
head = temp->next;
delete temp;
temp = head;
}
}
void sort_timer_lst::add_timer(util_timer *timer){
if (timer == NU... |
e27c18aba205280d5a2e88d3eb6478fe5e1ef1ee | fa676acf482a67deabb2579bc6ee9437a476b12d | devlabcmu/airtouch | /windows/PMDServer/PMDServerTest/CppPMDServerTest.cpp | C++ | cpp | 3,913 | no_license | #include <stdio.h>
#include <tchar.h>
#include "simplewinsock.h"
#include "strutils.h"
#include"pmddata.h"
#include "PMDCamera.h"
#include "PMDUtils.h"
#include <opencv/cxcore.h>
#include <opencv/highgui.h>
#define BUFSIZE 512
#define BIT_DEBUG false
PMDData _fromServer;
PMDRequest _toServer;
char _handShake[BUFSIZ... |
220ebffd192f689b5c4997954726d6aaf941c968 | c2924c8e77cd177a86d9407e8dc0f34ba5d536f9 | ghsecuritylab/arm_robot | /User/BSP/dmabuffer_uart.cpp | C++ | cpp | 2,811 | no_license | #include <array>
#include <cstring>
#include "usart.h"
#include "dmabuffer_uart.hpp"
namespace hustac {
std::list<DMABuffer_UART*> DMABuffer_UART::instances;
void DMABuffer_UART::init_uart(const char* name) {
for (DMABuffer_UART* dmabuffer : instances) {
if (!name || strcmp(dmabuffer->name_, name) == 0... |
fa4a8afd84d286fb91c5ed5b2b68f5db85a793bd | e532cdd8fd0e821bb49831cd15b295b6dc2ddc4d | NeilConnatty/DungeonJanitor | /src/bathroomstall.cpp | C++ | cpp | 1,164 | no_license | // bathroomstall.cpp
#include "bathroomstall.hpp"
#include <random>
Texture BathroomStall::stall_textures[NUM_STALL_TEXTURES];
bool BathroomStall::init(vec2 pos)
{
std::default_random_engine rng;
std::uniform_int_distribution<int> dist;
rng = std::default_random_engine(std::random_device()());
dist = std::un... |
a139a3a851202fe52aee81ffa841399c2d1b6337 | 68935fafa5490c77580a99e1799de4e6e4118a19 | aryangulati/launchpadNS19 | /Lecture11/spiral.cpp | C++ | cpp | 919 | no_license | #include<iostream>
using namespace std;
int main()
{
int arr[100][100];
int r,c;
cin>>r>>c;
int val=1;
for(int row=0;row<r;row++)
{
for(int cols=0;cols<c;cols++)
{
cin>>arr[row][cols];
}
}
for(int row=0;row<r;row++)
{
for(int cols=0;cols<c;cols++)
{
cout<<arr[row][cols]<<" ";
}
cout<<end... |
903932875ee6760fc18d85b1e205c6e1e31ea2b4 | 05c85068e70900fee161cf88cd98ff24a8170425 | QuantumBob/BlankGL | /src/cWindow.cpp | C++ | cpp | 5,169 | no_license | #include "cWindow.h"
#include "cApp.h"
//#include <gl/gl.h>
//#include "gl/glext.h"
//#include "gl/wglext.h"
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
///////////////////////////////////////////////////////////
cWindow::cWindow() : m_RC(0), m_hwnd(0), m_DC(0), ... |
e213c428d2f124a85559b489837c1455dd2e9607 | 08fcefaa8c0b29855f09725481c7fe2dbf33b343 | jeanpaul/flexcpp-old | /flexc++/parser/lookahead.cc | C++ | cc | 768 | no_license | #include "parser.ih"
spSemUnion Parser::lookahead(spSemUnion &left, spSemUnion &right)
{
d_doError = false;
if (d_usesLOP)
{
emsg << "multiple trailing contexts ('/', '$') not supported" << endl;
ERROR();
}
if (d_parentheses)
{
emsg << "parenthesized trailing contexts ... |
446e425388af42ca96267a02c3042d420a8283b2 | 2bf7f14d0d6313392e6304a37d6755bce811168f | hyeonski/ft_containers | /tests/deque.cpp | C++ | cpp | 13,239 | no_license | #include <iostream>
#include <string>
#include <deque>
#include "deque.hpp"
#ifndef LEAK_TEST
# define LEAK_TEST 0
#endif
#ifndef TEST_NS
# define TEST_NS ft
#endif
# define TESTED_TYPE std::string
template <typename T>
void printSize(TEST_NS::deque<T> const &vct, bool print_content = 1)
{
std::cout << "size: " <<... |
cda065b13b29a58cd2163363caab89665a6fa45e | 85ebc8d2699e91f0b838e065b9fa35d7b72ea812 | rakivchanyn/COMPort | /mainwindow.cpp | C++ | cpp | 4,733 | no_license | #include <QtWidgets/QComboBox>
#include <QtSerialPort/QSerialPortInfo>
#include "mainwindow.h"
#include "ui_mainwindow.h"
static const char blankString[] = QT_TRANSLATE_NOOP("SettingsDialog", "N/A");
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
mSeria... |
a9c0cd203c5331afa9352f4b3a6629b533a360f3 | 340ae5d9bc60b21bcc38dccbf0fdacdb104675eb | koval4/aChecker | /src/state.cpp | C++ | cpp | 2,504 | no_license | #include "state.h"
#include <string>
#include <list>
#include <memory>
#include <functional>
#include <iterator>
#include "parseexception.h"
State::State()
: name()
, check()
, is_reading(false)
, is_error(false)
, is_call(false)
, jump_to() {}
State::State( std::string name
, bool... |
67b5bc0438ae16513bb2c509d9a95debe8ad7a8b | d6a4ee431ec429c75af1b17455bca33b194f16f1 | Saroko-dnd/Test-programs | /CPlusPlus/WinApi/TestsForWindow/WindowTest/WindowTest/WindowProcedure.cpp | C++ | cpp | 595 | no_license | #include <Windows.h>
#include "WindowProcedure.h"
LRESULT CALLBACK MainWindowProcedure(HWND hWnd, // дескриптор окошка
UINT uMsg, // сообщение, посылаемое ОС
WPARAM wParam, // параметры
LPARAM lParam) // сообщений, для последующего обращения
{
switch (uMsg)
{
case WM_DESTROY: // если окошко закрылось, то:
P... |
b43175edeb12785e7cb4fd553aa136362278f65d | 17430c7e77bebd6544e683b7993813d223e5a67c | JayYe/ACMICPC | /Contests/Codeforces/CF92/C.cpp | C++ | cpp | 1,677 | no_license | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef __int64 ll;
const int N = 100+5;
int a[N][N], vis[N][N], is[N<<1], s[N<<1];
int n, m;
ll K, dp[N<<1][N<<1];
inline void Add(ll &x, ll y) {
x += y;
if(x > K) x = K+1;
}
int main() {
scanf("%d%d%I64d", &n, &m, &K);
... |
8ae82346a6c4dec8ad91e110fc7191a2dd5f1e22 | bd4d041d6e4c9f54de5563ce8f9aea397a97e421 | idiap/tracter | /tracter/StreamSocketSource.cpp | C++ | cpp | 666 | permissive | /*
* Copyright 2008 by Idiap Research Institute
* http://www.idiap.ch
*
* See the file COPYING for the licence associated with this software.
*/
#include "StreamSocketSource.h"
void Tracter::StreamSocketSource::open(
const char* iHostName, TimeType iBeginTime, TimeType iEndTime
)
{
/* C... |
0c6b495f1758f521b845ecbdd950d64bf29afce7 | 76ea9072afd12dca6880fcb394771c30b7e7698e | flomar/CrypTool-VS2015 | /trunk/aestool/Splash.cpp | C++ | cpp | 1,787 | permissive | /**************************************************************************
Copyright [2009] [CrypTool Team]
This file is part of CrypTool.
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 a... |
6ea68fd41f631e372f720fee894316e95b536c11 | 9760c18f772ccc74fa75fe9b5d683050599a2a04 | Andres-Hernandez/tapescript | /tapescript/cpp/cl/tape/examples/impl/adapter_performance_test.hpp | C++ | hpp | 1,106 | no_license | /*
Copyright (C) 2015-present CompatibL
This file is part of TapeScript (the "Software"), an open source library
for adjoint algorithmic differentiation (AAD), available from:
http://github.com/compatibl/tapescript (source)
http://www.tapescript.org (documentation)
The Software is distributed under multiple licenses... |
7f0371785819fc4ef1f155763ffa57013b35bf9d | f656f5eaabf756f0d7dbbef0ed1a105f024b1856 | Rengaht/PSlapXmas | /src/ofApp.cpp | C++ | cpp | 4,013 | no_license | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
_param=new Param();
string folder="sound/";
string frontname_="key/Kb_FM1_";
string keyname[13]={"Do","Do#","Re","Re#","Mi",
"Fa","Fa#","So","So#","La","La#","Ti","HiDo"};
for(int i=0;i<13;++i){
ofSound... |
195ace2029ed7e0d459f88532adebe56fa8cb027 | 37238bfa322b14962cdf820988a465a14cead044 | gcrabe/OtherSemester | /Code_archive/Graphics_Task3/Graphics_Task3/Transform.cpp | C++ | cpp | 1,629 | no_license | #pragma once
#include "stdafx.h"
#include "Transform.h"
#include <math.h>
t_matrix ETransform;
void t_times_matrix_to_matrix(t_matrix a, t_matrix b, t_matrix c)
{
for (int i = 0; i < MDIM; i++)
{
for (int j = 0; j < MDIM; j++)
{
float tempVal = 0;
for (int k = 0; k < MDIM; k++)
tempVal += a[i][k] *... |
a80800a8c176106132b9fae81d45fa2258bdac9a | f0c85f4a22b1b6b04b4633f244ef9de0711f40e1 | fgarcia0x0/codebook | /algorithms/sorting/selection_sort.hpp | C++ | hpp | 612 | permissive | #pragma once
#include <algorithm>
#include <functional>
#include <iterator>
#include <utility>
namespace codebook::algorithms::sorting
{
template <std::random_access_iterator RandomIter,
std::predicate<std::iter_value_t<RandomIter>,
std::iter_value_t<RandomIter>>
Comparator = std::less<>>
... |
9be10da65ade2c42673b942e14207d14c377e8b2 | f7d9f99c54034b28ba713431b7cf32e7154ebc23 | yjsyyyjszf/winScreenCapture | /ScreenCapture/ScreenCaptureDll/ScreenCaptureDll.cpp | C++ | cpp | 2,116 | no_license | // ScreenCaptureDll.cpp : 定义 DLL 的初始化例程。
//
#include "stdafx.h"
#include "ScreenCaptureDll.h"
#include "CapDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
//
//TODO: 如果此 DLL 相对于 MFC DLL 是动态链接的,
// 则从此 DLL 导出的任何调入
// MFC 的函数必须将 AFX_MANAGE_STATE 宏添加到
// 该函数的最前面。
//
// 例如:
//
// extern "C" BOOL ... |
13ad81a4cdd4ef40896500b58cdcfb1f3dd4a540 | 5cd160eb7a831a7af312d5fd96a9f92fcd8dffa5 | altynbek132/yandex_CPP_specialization | /2__yellow_belt/kursovoi-proiekt/entry.cpp | C++ | cpp | 280 | no_license | //
// Created by Addmin on 15.12.2020.
//
#include "entry.h"
std::ostream &operator<<(std::ostream &out, const Entry &entry) {
out << entry.date << " " << entry.event;
return out;
}
Entry::Entry(const Date &date, const std::string &event) : date(date), event(event) {}
|
f9dc3695909ce96eafe4ae1e39e70bf624fdcc9a | 0b7c5b1f34c09c799f5fce4e5a0a410965f53862 | Dynamical-Systems-Laboratory/ABM-COVID-Mobility | /src/places/place.cpp | C++ | cpp | 1,559 | permissive | #include "../../include/places/place.h"
/*****************************************************
* class: Place
*
* Base class that defines a place
*
*****************************************************/
//
// Initialization and update
//
// Add an agent
void Place::register_agent(const int agent_ID, const ... |
a03de017a8d3725b6ad06589fd9a3752f3ed3762 | 2f7f4a193cd87d743c715e7ae364f3753510ee82 | GonzaloCirilo/Advent-Of-Code | /2021/Day 08 - Seven Segment Search/Part1.cpp | C++ | cpp | 553 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
int main(){
string s;
cout << "ans: ";
int ans = 0;
while(getline(cin, s)){
stringstream ss(s);
string aux; bool passed = false;
while(ss >> aux){
if (passed) {
... |
2dcd349ab30c7c973531a3cd06c8740ef3ee5078 | 7b86c49ca32866987dc7092449f78c3bc39e86e6 | thiyaguleet/LeetCode | /Validate Binary Search Tree.cpp | C++ | cpp | 1,352 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
bool isBST(TreeNode* root, long min, long max){
if(!root) return true;
if(root-... |
e99125d19bd57e733eb5bea4b65367fc00f315cf | 3c4717ba9b99fb373d6544c3a4fc4f1544251a31 | corefan/fluid-engine-dev | /src/python/fdm_jacobi_solver.cpp | C++ | cpp | 3,025 | permissive | // Copyright (c) 2017 Doyub Kim
//
// I am making my contributions/submissions to this project solely in my
// personal capacity and am not conveying any rights to any intellectual
// property of any third parties.
#include "fdm_jacobi_solver.h"
#include "pybind11_utils.h"
#include <jet/fdm_jacobi_solver2.h>
#include... |
4ec501343093cd7abb6828de9880bd294ca875d6 | a8610c45d7157902d05a7e15a8f10b0d33f39fb2 | xkasiax/PROE2 | /Klub/SquashSportClub.cpp | C++ | cpp | 898 | no_license | #include "SquashSportClub.h"
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <cstdlib>
using namespace std;
SquashSportClub::SquashSportClub()
{
sportType = "squash";
typ = 2;
}
SquashSportClub::SquashSportClub(string name, string type, int bikes, int rackets) : SportClub(name, ... |
04c7942330ef95fa6715b7d8cca77127afedd200 | f0035afd05758deb52a0b29ecfea5dd31bce2201 | olerapx/VLSI-Designer | /src/control/pool/manager/poolmanager.cpp | C++ | cpp | 16,140 | no_license | #include "poolmanager.h"
PoolManager::PoolManager(Version programVersion, FileSystem& system, PoolNode& selfNode, int selfPort) :
PoolEntity(programVersion, system, selfPort),
selfNode(selfNode)
{
data = new SessionData();
connectDispatcher();
connect(&selfNode, &PoolNode::sendManagerAddress, this... |
6ff001e341658d6e7bd1aa0de042713dacf8b5cf | 3ff289f0a0ff29b76f6c53dcafb70fe9e3c7871d | LavishGulati/Codeforces | /Round 668 (Div. 2)/D.cpp | C++ | cpp | 1,869 | no_license | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
typedef long long ll;
typedef pair<long long, long long> pll;
typedef pair<int, int> pii;
typedef pair<int, pair<int, int>> tii;
typedef pair<long long, pair<long long, long long>> tll;
typedef pair<int, bool> pib;
#define pb push_back
#define ... |
c4d4cea7bbabdb3f2a4d5c2c17d776d4604fbb84 | 5da1fd3f2a9e5bf255d5d6d4260b8262c4d24681 | anderisa/IMT1032 | /OOP/Chapter6/englConst.cpp | C++ | cpp | 1,010 | no_license | #include <iostream>
using namespace std;
class Distance {
private:
int feet;
float inches;
public:
Distance() : feet(0), inches(0.0f) {
//empty class function
}
Distance(int f, float i) : feet(f), inches(i) {
//empty class function
}
void getDist() {
cout << "\nEnter feet: "; cin >> feet;
... |
f0eea4c37ffc14eb26c5f73003eaec9911e50c7f | a91dc019c4b646c7adc94f588a8fd2a602196f21 | motoishmz/RAM_CodeSnippets | /src/ofApp.cpp | C++ | cpp | 5,272 | no_license | #include "ofApp.h"
#include "Extractor.h"
#include "CameraMove.h"
#pragma mark - oF methods
//--------------------------------------------------------------
void ofApp::setup() {
ofSetFrameRate(60);
ofSetVerticalSync(true);
//! ram setup
rdtk::Initialize(10000, true);
//! scenes setup
rdtk::SceneManage... |
485fa6f17c0c1e2bbf5cd918bdbbde31dd22b25c | f807343abdc02b92a08270f8a206e779a4f0e5fd | ChengzhiHuang/core | /init/builtins.cpp | C++ | cpp | 34,332 | permissive | /*
* Copyright (C) 2008 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... |
f5e1b2f5a389d488f70919190edde5f4a75e2fa4 | 4259da358bc40fcdc9d67909cea0e958eaf913fb | Sunday111/SocketTools | /Projects/SocketTools/src/Socket.cpp | C++ | cpp | 1,010 | no_license | #include <SocketTools/Socket.h>
#include "WSA_Helpers.h"
namespace socket_tools
{
Socket::Socket(SOCKET socket) :
m_socket(socket)
{}
Socket::Socket(Socket&& that)
{
MoveFrom(that);
}
Socket::~Socket()
{
if (SocketIsValid())
{
closesocket(m_socket);
}
}
void Socket::Shutdown()
{
CheckSocke... |
62746f7a5fc6f3b4536652361c29512a20fe0d5b | e40a2dc5edcb5307be3244738e2ea0f00066268e | JiaqiHe/Leetcode | /380-Insert Delete GetRandom/insert_delete_getrandom.cpp | C++ | cpp | 1,001 | no_license | class RandomizedSet {
private:
unordered_set<int> database;
public:
/** Initialize your data structure here. */
RandomizedSet() {
}
/** Inserts a value to the set. Returns true if the set did not already contain the specified element. */
bool insert(int val) {
if(database.f... |
3e882cbb8a6fefd32067cc7a5dc2826457803549 | 802e3d4f5e6b91c9e4c2c855d28169264007e767 | almohajer/DBC-AIComputingNet | /src/check_env/util/SystemResourceManager.cpp | C++ | cpp | 7,995 | no_license | #include "SystemResourceManager.h"
void SystemResourceManager::Init() {
init_os();
init_cpu();
init_gpu();
init_mem();
init_disk();
}
void SystemResourceManager::init_os() {
m_os.name = os_name();
m_os.version = os_version();
}
std::string SystemResourceManager::os_name() {
std::strin... |
bc35987ade6a46c66c27844e8c2ca940bde3a2b3 | f2a941582b756e845c0b0c1a01dc271189bbd2be | mezox/Volumetric-Effects-GPU | /vfxFluid/src/Obstacle.cpp | C++ | cpp | 886 | permissive | #include "Obstacle.h"
#include "Image3D.h"
#include "Quantity.h"
#include "vfxEngine.h"
namespace vfx
{
Obstacle::Obstacle( const std::shared_ptr<Image3D>& volume,
const std::shared_ptr<Pipeline>& pipeline,
const glm::vec3& workGroupSize)
: mVolume(volume)
, mPipeline(pipeline)
, mWorkGr... |
b6f138960127a50010ca6df638b044c21796a85a | 2875a84202d1ac9fa11f4b6c11f50e335426110d | Caspar-Chen-hku/Leetcode-solutions | /C++/groupsOfSpecial-EquivalentStrings.cpp | C++ | cpp | 492 | no_license | class Solution {
public:
int numSpecialEquivGroups(vector<string>& A) {
set<vector<int>> setVec;
vector<int> chars;
for (string s:A){
chars = vector<int>(52, 0);
for (int i=0; i<s.length(); i++){
if (i%2){
chars[s[i]-'a']++;
... |
8e03798cfd56a6b06fba399a9279989abe27e830 | 34e90fe2d38c53c2208a38aec1f1bdbe2fc19df5 | KFTrack/BTrk | /BTrk/TrkBase/TrkCentralVolume.hh | C++ | hh | 1,548 | no_license | //--------------------------------------------------------------------------
// File and Version Information:
// $Id: TrkCentralVolume.hh 105 2010-01-15 12:14:11Z stroili $
//
// Description:
// TrkCentralVolume Class - Implements a TrkVolume as a single cylinder
// centered on the Z axis. The inner flight dista... |
57525237c2cc2aa56075809d997375302f4e252f | 7ee2f22cf434b91fb5c233af681eb7ff3959cb90 | sblyufer/Compi-HW3 | /Semantics.cpp | C++ | cpp | 24,792 | permissive | //
// Created by 1912m on 12/05/2021.
//
#include "Semantics.h"
#include "iostream"
#include <memory>
#include <cstring>
extern char *yytext;
int DEBUG = 0;
vector<shared_ptr<SymbolTable>> symTabStack;
vector<int> offsetStack;
vector<string> varTypes = {"VOID", "INT", "BYTE", "BOOL", "STRING"};
string currentRunnin... |
2afdc97ac1ba61a8492fb72d479fc0aa4b673b5f | 402961765d32dd0ea543b67976a5d5a851f6ff7a | davidt1016/Data-Structure | /Stack and Recusrion/a4.cpp | C++ | cpp | 6,073 | no_license | /*
** David Teng
** a4.cpp
**
**
** Reads a sequence of integers (in the range of int's) from standard in;
** It is interpreted as two lists, separated by a single 0
**/
#include <iostream>
#include <stack>
#include <fstream>
#include <string>
using namespace std;
//-------------------Function Declaration----------... |
402637742eee4a2cc7e32be531925289c18428f4 | 6cc0b88191b5bd81756d5ea7fc8421893b2a7889 | Easonyxz/Code | /C++/tempCodeRunnerFile.cpp | C++ | cpp | 1,623 | no_license | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include <algorithm>
using namespace std;
#include<vector>
#include<string>
#include<iostream>
#include<time.h>
/*
标题:带分数
100 可以表示为带分数的形式:100 = 3 + 69258 / 714
还可以表示为:100 = 82 + 3546 / 197
注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。
类似这样的带分数,100 有 11 种表示法。... |
3601ced0d64399a653d04eb9768d173161d6c7ca | c25e92da8bd0bdc025f2582c5f490b620d57af1c | bizunionchain/pango | /src/p2p/connection_basic.cpp | C++ | cpp | 10,144 | permissive | /// @file
/// @author rfree (current maintainer in pango.cc project)
/// @brief base for connection, contains e.g. the ratelimit hooks
// Copyright (c) 2014-2017, The BUC Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provide... |
831f633c031400fef93fb3a46ab3d769dc427215 | 833e70e71260fc0d8fb5485de715e7587cce8b4a | ngzHappy/cxx17 | /cplusplus_basic/Qt/boost/geometry/policies/compare.hpp | C++ | hpp | 5,842 | no_license | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifn... |
c4ce667b79a5f6ea3394ff91ecf2df1ead17a806 | 68f52e75b18fc528ebe40123fb62a0f5d5a8c9ad | H2O-2/particleGL | /src/engine/geometries/geometry.hpp | C++ | hpp | 1,072 | permissive | #pragma once
#include <vector>
#include <memory>
#include <glm/glm.hpp>
#include <glad/glad.h>
// All Geometries are created at position (0,0,0) with radius / length of 1
class Geometry {
public:
typedef std::vector<glm::vec2> TexCoord;
typedef std::vector<glm::vec3> PosnCoord;
typedef std::vector<uint32... |
32b0406cd255a192166a592d3ab9d3a30190ea52 | 6be8c9676077882980eebe862f0fbaa3f28982ef | spinos/gorse | /core/mesh/HistoryReformSrc.cpp | C++ | cpp | 1,239 | no_license | #include "HistoryReformSrc.h"
#include "HistoryMesh.h"
namespace alo {
HistoryReformSrc::HistoryReformSrc()
{}
bool HistoryReformSrc::reformF(AdaptableMesh *outMesh, HistoryMesh *stageMesh,
const float &lod, const HistoryMesh *sourceMesh)
{
int istage;
int selV;
sourceMesh->selectStage(istage, selV, lod);
... |
0ac49e9f05ffc1230159300775f61129077398a7 | ab2229c4e045b1b812a501cf90cc528c7554c8eb | Strawberry9583/OFEC_Alpha | /instance/problem/continuous/large_scale/CEC2013/ShiftedElliptic_F1.cpp | C++ | cpp | 1,913 | no_license | /*************************************************************************
* Project:Open Frameworks for Evolutionary Computation (OFEC)
*************************************************************************
* Author: Changhe Li and Li Zhou
* Email: changhe.lw@gmail.com, 441837060@qq.com
* Language: C++
************... |
435bf6b80ce48df7a9deb61a8ee27aa07f0ba5ce | f2026f6ddc508979606ef5b9f9e4c9ac4334e7ca | blockspacer/sdk-native | /modules/sdk-core/include/Tanker/DataStore/Table.hpp | C++ | hpp | 1,049 | permissive | #pragma once
#include <Tanker/DataStore/Connection.hpp>
#include <Tanker/DataStore/Version.hpp>
#include <Tanker/DbModels/Version.hpp>
#include <optional>
#include <sqlpp11/char_sequence.h>
#include <sqlpp11/type_traits.h>
#include <string>
namespace Tanker
{
namespace DataStore
{
namespace detail
{
template <typen... |
ae0979dc84e964b399323ebc8813a1395299eb4b | 442f4e2bb0b8186d97406af35076c3d4d7c0d515 | kouellet/libnifalcon | /src/cpp/util/FalconCLIBase.cpp | C++ | cpp | 6,567 | no_license | /***
* @file FalconCLIBase.cpp
* @brief Utility class for common operations (device opening, firmware loading, etc...) needed in command line interface examples
* @author Kyle Machulis (kyle@nonpolynomial.com)
* @version $Id$
* @copyright (c) 2007-2008 Nonpolynomial Labs/Kyle Machulis
* @license BSD License
*
*... |
05129fe2ffa64c2f62ede3d2ccd98e2ecd59b264 | d43b3980c61f367b7996f3d7f0e27a03c093abd6 | C00KI8/eclipse | /src/qt/rpcconsole.cpp | C++ | cpp | 14,390 | permissive | // Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcconsole.h"
#include "ui_rpcconsole.h"
#include "clientmodel.h"
#include "bitcoinrpc.h"
#include "guiutil.h"
#in... |
bfe0a1375e42b4af894bc77fab386a68cd1ba7df | d9f817473d7cc2695b63cac63e6979e2b57b4c42 | yuan-energy/small_tensor | /smalltensor/utils/generate_permute_operation/expr3_subtraction_core.hpp | C++ | hpp | 659 | no_license | template <typename val_type,
std::size_t d1, std::size_t d2,
std::size_t d3,
char i1, char i2, char i3>
inline expr3<val_type,d1,d2,d3,i1,i2,i3> operator-(
expr3<val_type,d1,d2,d3,i1,i2,i3> const& Lijk_,
expr3<val_type,D1,D2,D3, A, B, C> const& Rijk_){
typedef expr3<v... |
5d56667606b12a225830a06086644ea7ad6ec007 | c637a7fe2f23fdd4375b090d13e3ae2eda9ced4f | radtek/ABCDE | /PCS/PCS/XYPCS/PCS.Core/FittingProcess.cpp | C++ | cpp | 4,070 | no_license | #include "FittingProcess.h"
#include "FittingStation.h"
#include "ProcessStep.h"
#include "StepLoopStart.h"
#include "StepLoopEnd.h"
#include "StepAutoMotion.h"
#include "StepScanBarcode.h"
#include "StepMeasureData.h"
FittingProcess::FittingProcess(FittingStation *station)
: station(station)
, currentStep(nul... |
f59b2d780fe4fcb0508ca28b3f5c70f6c5290cf6 | 47af6aefdf7c1091c9e87685f6d5c232dc04619a | cschomak/SimplifiedModelScanTools | /LimitPlotting/StyleSettings_SinglePhoton.cc | C++ | cc | 18,406 | no_license | // $Id: StyleSettings_SinglePhoton.cc,v 1.1 2012/06/26 13:58:23 auterman Exp $
/*** ------------------------------------------------------------------------------------------------------- ***
TheBetterPlotScript, a tool to plot final results, limits and exclusion contours, based on 'PlotScript'
Christian Au... |
987cf5ae30002996de754b627c88228642ef9451 | d78b925515399d126598615b218374e304ebadd5 | viter-oliver/my_imgui | /examples/auto_future_graphics_design/ft_raw_trans.cpp | C++ | cpp | 1,207 | no_license | #include <cmath>
#include "ft_raw_trans.h"
namespace auto_future
{
ft_raw_trans::ft_raw_trans()
{
float transM[16] = {1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
1, 0, 0, 1, };
memcpy(_pt._trans_mat4x4, transM, 16 * sizeof (float));
#if !defined(IMGUI_DISABLE_DEMO_WINDOWS)
... |
a69106bff3b58e92f5ca6a1368bb9b922527e84b | 71a7194fe240cb0187104c0ea589bb943a670847 | liushaopu8/Elastos.OS | /Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/hardware/soundtrigger/SoundTriggerRecognitionEvent.cpp | C++ | cpp | 11,232 | permissive | //=========================================================================
// Copyright (C) 2012 The Elastos 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
//
// ... |
000fc6c9c8777cae7d6f883388180c0358af6a84 | 3e88829e3d355a0926083118f61d4e5cc04045ab | wangscript007/server_fk | /fk/slience/netio/tcp_stream_socket.hpp | C++ | hpp | 5,762 | no_license | #pragma once
#include "slience/netio/tcp_base_socket.hpp"
M_NETIO_NAMESPACE_BEGIN
template<typename T, typename SocketType>
class TcpStreamSocket : public TcpBaseSocket<T, SocketType> {
protected:
struct _readerinfo_ {
base::s_byte_t* readbuf;
SocketLib::Buffer msgbuffer;
_readerinfo_();
~_... |
229501d11803c963a3a2f0ebd5e372b31c284b2a | 7c858ae65e0364c449984414feae34dd195d3b34 | 00mjk/qcor | /lib/qsim/impls/modules/time_series_iqpe.cpp | C++ | cpp | 12,863 | permissive | #include "Instruction.hpp"
#include "InstructionIterator.hpp"
#include "qsim_impl.hpp"
#include "utils/prony_method.hpp"
#include "xacc.hpp"
#include "xacc_service.hpp"
/// Implements time-series phase estimation protocol:
/// Refs:
/// https://arxiv.org/pdf/2010.02538.pdf
/// Notes:
/// We support both *unverified* ... |
74b387a6fa9c388732a7e6c6f4e357b9aa1f1454 | 03ed19d9a65fbdd09250d6be634860f4c011eb69 | CDAT/VTK | /Rendering/OpenGL2/Testing/Cxx/TestGlyph3DMapperEdges.cxx | C++ | cxx | 2,525 | permissive | /*=========================================================================
Program: Visualization Toolkit
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRAN... |
b113e83e214e7f9f25006b2bb1ac70d1af86445b | cf4bb35d9785d7d030343f0b4f80d8498929c7be | shubhomoydas/computer_graphics | /src/glMatrix.cpp | C++ | cpp | 4,587 | permissive | #include "glMatrix.h"
#include <iostream>
#include <iomanip>
#include <cmath>
#define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;}
namespace smd {
// unit test
void testGaussSeidel() {
Matrix A(4,4);
double **a = A.data;
a[0][0] = 10.0; a[0][1] = -1.0; a[0][2] = 2.0; a[0][3] = 0.0;
a[1][0] = -1.0; a[1][1] ... |
163253dcaca525047b195c5c087e2c3e76e57189 | 0a64f0e750f81853002328987805ceb150a21464 | Bl00per/AIE-Programming | /Exercises/Exercise - Arrays (Part 8)/Part 8.cpp | C++ | cpp | 1,420 | no_license | #include <iostream>
#include <ctime>
int main()
{
//Player health of 5 characters
int attack_count = 5;
const int health_count = 5;
int player_health[health_count] = { 100,100,100,100,100 };
int player_choice = 0;
// Random number generator
srand((unsigned)time(0));
int attack_random = 0;
bool is_valid = fal... |
3fd10465eded24556e636f96df4b9a3f2f16dd57 | 65edeab64768b524498b7c1c2057c652dba85568 | rohanm9/interviewprep | /String/interviewbit/Implement_Strstr.cpp | C++ | cpp | 851 | no_license | int Solution::strStr(const string A, const string B) {
string str = B + "$" + A;
int n = str.length();
int L , R , k;
L = R = 0;
vector<int> Z(n);
for(int i = 1 ; i < n ; i++){
if(i > R){
L = R = i;
while(R < n && str[R - L] == str[R]){
R++;
... |
d93635ba49b27f1c6be63e213b72977e23416c93 | 797e0ce8e5d75533c1736b5a43cc8a49100254cd | kranack/XMP-Toolkit-SDK | /XMPCore/source/XMPMeta2-GetSet.cpp | C++ | cpp | 46,061 | permissive | // =================================================================================================
// Copyright 2003 Adobe
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it. If you have recei... |
3b65b3ea3d734fe1ae3dd05117205cd169e9d155 | 49e90aa63a32a7e4ea7b68b9b95e89fa9514bb25 | Try/OpenGothic | /lib/edd-dbg/src/osx/frames.cpp | C++ | cpp | 3,497 | permissive | // Copyright Edd Dawson 2012
// 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 "dbg/frames.hpp"
#include "memcpy_cast.hpp"
#include <pthread.h>
#include <stdint.h>
#if !defined(__i386__) && !defined(__a... |
71632617665718581ca2c68ea3c421c0c816f0b0 | 123ab7b2709f14bc515e85cbcf812a8cd50af8e3 | shashankch/DataStructures-Algorithms | /cnqueuelinkedlist.cpp | C++ | cpp | 1,572 | no_license | #include <bits/stdc++.h>
using namespace std;
template <typename T>
class Node
{
public:
T data;
Node *next;
Node(T data)
{
this->data = data;
next = NULL;
}
};
template <typename T>
class Queue
{
Node<T> *head;
Node<T> *tail;
int size;
public:
Queue()
{
... |
06aab3a05c74c3c797dde66f7f06bd7098b14345 | 7ce63af8628357f7c07bd79e7852cde91f60fae1 | samshao1111/xmltest | /ChildFrm.cpp | C++ | cpp | 1,534 | no_license | // ChildFrm.cpp : implementation of the CChildFrame class
//
#include "stdafx.h"
#include "xmlread.h"
#include "ChildFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// ... |
a4efbadfe21c908916e44d90d953b475d4bc24d8 | 89bfb575b6afa33ff334c6ac277821127acef409 | aseprite/skia | /gm/asyncrescaleandread.cpp | C++ | cpp | 19,940 | permissive | /*
* Copyright 2019 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRect.h"
#include "include/cor... |
4a6e081f8fae05357f1628f4dfc7f9e89457b65c | 49b6947b3d03c9f5164c39b6b3ad41df3edee910 | bspfp/BSFileManager | /ShellExplorerControl.cpp | C++ | cpp | 15,304 | permissive | #include "stdafx.h"
#include "BSFMApp.h"
#include "ShellExplorerControl.h"
namespace
{
bool isFilesystemFolder(IShellItem* psi)
{
SFGAOF flag = 0;
if (SUCCEEDED(psi->GetAttributes(SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_STREAM, &flag)))
return (flag == (SFGAO_FILESYSTEM | SFGAO_FOLDER));
return false;
}
... |
15c11c50c1f5032fb2e24c53a92c474075f5bfa2 | e0adb190835368a64d657c47eca4c0fdcfd110df | googleapis/google-cloud-cpp | /google/cloud/sql/v1/samples/sql_backup_runs_client_samples.cc | C++ | cc | 6,671 | permissive | // Copyright 2023 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
14835d1f6c9945fd6ed499f83a90657befaa6ce7 | 2b260ff6461142956684b7f226eff2042336e16c | greenteawarrior/CameraArmMonster | /BrushlessGimbal/MPU6050.cpp | C++ | cpp | 130,141 | no_license | // I2Cdev library collection - MPU6050 I2C device class
// Based on InvenSense MPU-6050 register map document rev. 2.0, 5/19/2011 (RM-MPU-6000A-00)
// 8/24/2011 by Jeff Rowberg <jeff@rowberg.net>
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib
//
// Changelog:
// ...... |
fca01f99f2000c0ec83983db398af5defb9dc3dd | aa8964ca1b28bbf18ae457f2164ec9966cec7cd3 | AlexMLourenco/sofs18-fileSystem | /src/syscalls/read.cpp | C++ | cpp | 429 | no_license | /*
* \author Artur Pereira - 2016-2018
*/
#include "bin_syscalls.h"
#include "core.h"
namespace sofs18
{
int soRead(const char *path, void *buf, uint32_t count, int32_t pos)
{
if (soBinSelected(108))
return bin::soRead(path, buf, count, pos);
else
/* replace bin:: wi... |
e9071e6698dcfd40dcc7023111b026c533e35d0a | 6757adc0dc34fe350230ef3ba8070b75382e5e06 | kimsutto/AlgorithmStudy | /code/Programmers/Level1/신규아이디추천/신규아이디추천_이민정.cpp | C++ | cpp | 1,109 | no_license | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
string solution(string new_id) {
string answer = new_id;
transform(answer.begin(), answer.end(), answer.begin(), ::tolower);
for (int i = 0; i < answer.size(); i++) {
char temp = answer[i];
if (!(temp >... |
de5dc25d73eca9d1e925cd987eec5d7b1735be66 | 7818282c83a6d8a88aa1ed02d8f2929f3f49bad5 | chi-tech/chi-tech | /framework/lua/chi_lua.cc | C++ | cc | 4,316 | permissive | #include "chi_lua.h"
#include "chi_log.h"
#include <string>
#include <sstream>
#include <map>
static int a = 15;
/**Posts a generalized error message indicating that the
* expected amount of arguments don't match the given amount.*/
void LuaPostArgAmountError(const std::string& func_name,int expected, int given)
... |
78a88f9fac979f29f6f2d80f51b6dea786609c91 | 79f247cb678f643ec73cf4e8b6db47fbe768a074 | myllern/EDAF50-1 | /Labs/lab4/nameserver/umns.cc | C++ | cc | 443 | no_license | #include "umns.h"
#include <algorithm>
void UMNS::insert(const HostName& hn, const IPAddress& ia){
addresses[hn] = ia;
}
bool UMNS::remove(const HostName& hn){
auto it = addresses.find(hn);
if (it != addresses.end()) {
addresses.erase(it);
return true;
}
return false;
}
IPAddress UMNS::lookup(const ... |
d5db16a465b5e441ed60a39e966f82ea85a99479 | d3276c44776761e8ad0fef9a3fc51d86141db821 | Jproque35/Simple-Game-Engine | /Simple Game Engine/PlayerMoveRightState.cpp | C++ | cpp | 395 | no_license | #include "PlayerMoveRightState.h"
#include <iostream>
PlayerMoveRightState::PlayerMoveRightState(PlayerData* context) {
this->context = context;
}
void PlayerMoveRightState::update(float elapsedTime) {
Vector2f newPos = this->context->getPosition();
newPos.x += this->context->getXSpeed() * elapsedTime;
this->c... |
d465b15db5e993ca02470f1cacd22e5bbda0c27d | 0aed34c0a3c369fec9fc8872d0570dca24758058 | leleliu008/luau | /Analysis/src/AstQuery.cpp | C++ | cpp | 11,604 | permissive | // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
#include "Luau/AstQuery.h"
#include "Luau/Module.h"
#include "Luau/Scope.h"
#include "Luau/TypeInfer.h"
#include "Luau/TypeVar.h"
#include "Luau/ToString.h"
#include "Luau/Common.h"
#include <algorith... |
2ce4510a83e03988d4dff8061daba270509e12b7 | 625bc67b54b9ca9d5e64613d528a5abb57837bc0 | make1122/tencentcloud-sdk-cpp | /iotcloud/src/v20180614/model/DescribeDeviceClientKeyResponse.cpp | C++ | cpp | 3,071 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
3706a2b7fba406eef7db13d4066ee0b163571150 | 656dba2057e6930b8fc376fe3bbc700cae2750b2 | KevinMathewT/Competitive-Programming | /HelpVoldemort.cpp | C++ | cpp | 1,263 | no_license | #include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define F0(i,n) for (ll i = 0; i < n; i++)
#define F1(i,n) for (ll i = 1; i <= n; i++)
#define CL(a,x... |
40fe9d3619bf2700121db9263b07d5b7bc530e52 | 1ed3706157723c13ffc084335f7b8f4d3b2f9106 | su-u/Class | /algorithm/線形ソート/線形ソート/線形ソート/Source.cpp | C++ | cpp | 532 | no_license | #include "DxLib.h"
// プログラムは WinMain から始まります
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
if (DxLib_Init() == -1) // DXライブラリ初期化処理
{
return -1; // エラーが起きたら直ちに終了
}
DrawPixel(320, 240, GetColor(255, 255, 255)); // 点を打つ
WaitKey(); // ... |
95b098ec8d1d96dcd7b984dad9935c022719d670 | bf2dcc50f17668d3cfb49b984b6acff52e37a89a | bravesoftdz/realwork | /shared/Morpho/impl/Impl/Normalizer_i.cpp | C++ | cpp | 11,765 | no_license | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Модуль: "w:/shared/Morpho/impl/Impl/Normalizer_i.cpp"
// генератор файлов реализации C++ (.cpp)
// Generated from UML model, root element: <<SimpleClass::Class>> shared::Morpho::Impl::Normalize... |
cfc720b8284907d6b5373107a11eea8e45fff0a8 | 93364302f341513eacfd85d00a7e6bd982d56131 | rjeans/aws-sdk-cpp | /aws-cpp-sdk-ec2/source/model/DescribeBundleTasksRequest.cpp | C++ | cpp | 1,664 | permissive | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
de856b04312834ebc2ace327d99ce1744dae5caa | 641bcec83fa7adc816a1f962ff3057fd71649cf2 | metrumresearchgroup/Torsten | /cmdstan/stan/lib/stan_math/test/unit/math/rev/functor/integrate_1d_impl_test.cpp | C++ | cpp | 32,431 | permissive | #include <gtest/gtest.h>
#include <stan/math.hpp>
#include <test/unit/math/rev/fun/util.hpp>
#include <test/unit/util.hpp>
#include <vector>
#include <iostream>
#include <limits>
#include <sstream>
std::ostringstream *msgs = nullptr;
struct f1 {
template <typename T1, typename T2, typename T3>
inline stan::return... |
b8a01b36098ae2be845f58c383fcfcfd75ce769b | 1ec5ace0567fb89bda81bce9db4a4f9915cfca94 | collinedington/Final_Project | /FinalProjectWindow.cxx | C++ | cxx | 4,137 | no_license | /*=========================================================================
University of Pittsburgh Bioengineering 1351/2351
Final project example code
Copyright (c) 2011 by Damion Shelton
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of... |
26d1cace1af04efcabd0c8cbf434a175d9ffbed2 | d1f2434cb8879925e17a3ba5e164de3746f150e3 | SamuelT13/Competition_Programming | /Algorithms/GeometricObjects_Lines.cpp | C++ | cpp | 3,321 | no_license | #include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
const double EPS = 1e-9;
const double pi = acos(-1);
struct point{
double x, y;
point(){x = y = 0.0;}
point(double x_0, double y_0): x(x_0), y(y_0){};
bool operator < (point other) const{
if (x -... |
ba0a2089a9664f173d9b2ac2330a4d4c308b30e8 | 6185d380a18ea7ca34c1e7416140ad3d2e80670e | aakanksha503/aggaa503_dtOF_2017 | /midterm doodle board - TYLER/src/ofApp.cpp | C++ | cpp | 4,862 | no_license | #include "ofApp.h"
int alpha =0;
//--------------------------------------------------------------
void ofApp::setup(){
Avenir.load("Avenir.ttc", 12);
//ofSetBackgroundAuto(false); // TYLER - try without this ?
ofBackground(0);
boy.load("images/boy.jpg");
tree.load("images/tree.jpg");
... |
0f52d2c7de0afc6089cd78de3d5167eb450da33d | 85ba8a954895f7f599af42f23e403857c7ebb601 | MeganGrass/nosysfile | /types/bit.cpp | C++ | cpp | 918 | no_license |
#include "stdafx.h"
#include FRAMEWORK_H
// bit
UCHAR System_Type::GetBit(UCHAR Bit, UCHAR Value) {
UCHAR bRet = NULL;
switch (Bit)
{
case 0:
if ((Value & 1)) { bRet = ON; }
else { bRet = OFF; }
break;
case 1:
if ((Value & 2)) { bRet = ON; }
else { bRet = OFF; }
break;
case 2:
if ((Value & 4)) {... |
46b29ace52c97e717379ea6160a1541425be0a7a | d9f23700213815e25e1c7cdf0177eec5f0fdbb07 | yuxineverforever/plinycompute | /pdb/src/pipeline/headers/ComputePlan.cc | C++ | cc | 32,223 | permissive | /*****************************************************************************
* *
* Copyright 2018 Rice University *
* *
* ... |
98ad193c9d51a47978e935f14583dbec1c10757c | b4260278a1c13828aebc7e11b65e356e6398a7da | IHR57/Competitive-Programming | /CodeForces/CodeForces - 1181C.cpp | C++ | cpp | 1,276 | no_license | #include <bits/stdc++.h>
#define MAX 1005
using namespace std;
char ch[MAX][MAX];
int dp[MAX][MAX];
int main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int n, m;
cin>>n>>m;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cin>>ch[i][j];
dp[i][j] = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.