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 |
|---|---|---|---|---|---|---|---|---|
9269fe5176ddd6681c6f66d5e5b21b2e66939e84 | 5716d63371741baa78116c1154e9026ddd0526db | yueyueQwQ/test | /c语言/第一章/练习1-5.cpp | C++ | cpp | 232 | no_license | /*
读取一个整数并显示其加上12的数
*/
#include <stdio.h>
int main(void)
{
int no;
printf("请输入一个整数:");
scanf("%d",&no);
printf("该整数加上12的结果是%d。\n",12+no);
return 0;
}
|
bad610a89a6abf7877c487f1e317f5cfcab525e4 | cb2fc7271c3b30c007e35302a7c521fb14f5f19d | gazzyt/xmlrip | /testxmlrip/main.cpp | C++ | cpp | 229 | permissive | #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "gtest/gtest.h"
#pragma GCC diagnostic pop
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
} |
2c0e3e78dc83aa23d1e1093d86d942ecb0cf4151 | 06a02c982b64acfb029ae13f6ae63d18e12b40da | longstl/mus12 | /_Library/_Include/boost/spirit/include/karma_grammar.hpp | C++ | hpp | 944 | no_license | ////////////////////////////////////////////////////////////////////////////////
// karma_grammar.hpp
/*=============================================================================
Copyright (c) 2001-2010 Joel de Guzman
Copyright (c) 2001-2010 Hartmut Kaiser
http://spirit.sourceforge.net/
Distributed ... |
c2667bdd4ef6a58c198e0094e458414f6ae89e69 | 46728fb5d0cd7b3056dfbd1a0182995f87f45660 | Jeremy-Martin4794/CS2-projects | /string/test_len_cap.cpp | C++ | cpp | 2,219 | no_license |
// testing length and capacity functions
// Jeremy Martin
#include "string.hpp"
#include <cassert>
#include <iostream>
//===========================================================================
int main()
{
{
//------------------------------------------------------
// SETUP FIXTURE
// TEST
String test;
... |
38cc684e9ffbee9abd09acd24cc710c8486c0006 | fc6b61e9b814517851d0b22271bc5a224d9ea413 | fuqinho/TopCoder | /SRM/536/RollingDiceDivTwo.cpp | C++ | cpp | 1,817 | no_license | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <c... |
c7c4460b7de16f50abb436606b8d518556b2b5a8 | 2db6f9ce1bd8cc0845c7d6d17d3a4800f450cdac | skim06uw/Lab5 | /Accelerometer.cpp | C++ | cpp | 3,010 | no_license | #include <stdlib.h>
#include <stdbool.h>
#include <Arduino.h>
#include <Math.h>
#include "Accelerometer.h"
void updateAccel(float* a1, float* avgAccel, int* accelPins, float* CAL_OFFSET) {
float a0[3];
for (int i=0; i<3; i++) {
a0[i] = *(a1+i);
*(a1+i) = map(analogRead( *(accelPins+... |
04f2dda6d46b2d8212494c5318415a9402a5dd1b | 5321394422094c35912d52ed1d536f416c856608 | hangim/ACM | /POJ/1661_Help Jimmy/1661.cc | C++ | cc | 2,732 | permissive | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct Node {
int x1, x2, h;
Node (int _x1, int _x2, int _h) : x1(_x1), x2(_x2), h(_h) {}
bool operator < (const Node &o) const {
return h > o.h;
}
};
const int INF = 1e8;
vector<Node> v;
int dp[1010][2];
int mai... |
09e6badb1745dcc39b7a59f0175475b57020b325 | 180a3ba057e9f479634437c36e654ee3dc05ab2d | SuprDewd/Forritunarkeppnin-2 | /2006-2007/Alfa/Fyrri Hluti/22.cpp | C++ | cpp | 1,232 | no_license | #include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <... |
451ca61c5f9831b33e4d6782a4870f2cdede6b30 | 7994a153c1b2fca06aef7d541fbe66589bcdbe38 | IgorYunusov/Mega-collection-cpp-1 | /Learning Boost C++ Libraries/ch08/listing8_08.cpp | C++ | cpp | 601 | no_license | #include <boost/chrono/chrono.hpp>
#include <boost/chrono/chrono_io.hpp>
#include <iostream>
#include <cstdint>
namespace chrono = boost::chrono;
int main()
{
chrono::duration<int64_t, boost::ratio<1, 100>> csec(10);
std::cout << csec.count() << '\n';
std::cout << csec << '\n';
chrono::seconds sec(10);... |
de82359b57300f73fec4073a08c5b5dba5e74b47 | 60a965c963e59814e3584cfec1c1f2c8d754c49c | entuerto/cdda2flac | /lib/audio/encoders/OggVorbisAudioEncoder.cpp | C++ | cpp | 12,024 | no_license | //
// OggVorbisAudioEncoder.cpp
//
// Copyright 2009 tomas <tomasp@videotron.ca>
//
// 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
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any... |
697267894a40793fdefe0fdfeaa1163546a69c2b | 7efde42a24ca9bdccfb334a46ad3b3aa3a29b59e | AbyssAbbeba/MDS-picoblaze-AVR-ide | /IDE/GUI/widgets/HWCanvas/hwcanvas.cpp | C++ | cpp | 332 | no_license | /**
* @brief
* C++ Implementation: ...
*
* ...
*
* (C) copyright 2013, 2014 Moravia Microsystems, s.r.o.
*
* @author Erik Chalupa <erik.chalupa@moravia-microsystems.com>
* @ingroup HWCanvas
* @file hwcanvas.cpp
*/
#include <QtGui>
#include "hwcanvas.h"
HWCanvas::HWCanvas(QWidget *parent)
:QWidget(pare... |
48b7b2f10d3ba0da67b59af45235289084469f09 | ff538141e965d8e8df3814fada73a5c379f881f4 | Aakash1312/appleseed | /src/appleseed.studio/debug/tests/testoutputwidgetdecorator.cpp | C++ | cpp | 2,266 | permissive |
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited
// Copyright (c) 2014-2017 Francois Beaune, The appleseedhq Organization
//
... |
42a0a9b7789953e789b2b07578151e95160c7412 | dde424188718e90e8d03814ce726a12eb7bf1644 | KVVaisakh/CompetetiveProgramming | /codechef/18-3-long/MINEAT2.cpp | C++ | cpp | 2,012 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin>>t;
while(t--)
{
long double n,h,maxm=0,ind3=-1,maxm2=0,ind=-1,ind2=-1,maxm3=0;
cin>>n>>h;
... |
785de89de782d8047caf7219f425fc69db5b35c6 | ac9410d3017cd0893b5d38f4a0b54d014b686915 | fd/webrtc | /ice_candidate.cpp | C++ | cpp | 1,301 | no_license | #include <cstdlib>
#include <cstring>
#include <string>
#include "talk/app/webrtc/jsep.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "constants.h"
#include "ice_candidate.h"
extern "C" {
#include "_cgo_export.h"
using talk_base::scoped_refptr;
using talk_base::RefCountedObject;
using webrtc::Peer... |
d880ac46f3f443840cb673b9db04dedda539816f | 9a8f73b6b93cbb5627e7d69b177b4889427a65f5 | haipengliu/leetcode | /src/binaryTreeLevelOrderTraversal/binaryTreeLevelOrderTraversal.II.cpp | C++ | cpp | 2,509 | no_license | // Source : https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/
// Author : Hao Chen
// Date : 2014-06-27
/**********************************************************************************
*
* Given a binary tree, return the bottom-up level order traversal of its nodes' values.
* (ie, f... |
15a358ceea51fd0d5cf29b466a755e74bd628d5a | 25af8632ee0da17902faad8c732a459faf650ea9 | pamd/foo | /faq/mitbbs/test.cpp | C++ | cpp | 288 | no_license | #include <stdio.h> /* printf, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
#include <iostream>
using namespace std;
int rand01() {
return rand() % 2;
}
int main() {
//srand (time(NULL));
cout << sizeof(long) << endl;
return 0;
}
|
c8fcd765c24bf09795b9b41f215ec5930db845a9 | aaa244d4ae4a281cacc2e973a8b6768a2e8eac8f | jmbyam/String_Calculator | /String_Calculator.cpp | C++ | cpp | 879 | no_license | //
// String_Calculator.cpp
// String_Kata
//
// Created by Joseph Byam on 2/13/19.
// Copyright © 2019 Joseph Byam. All rights reserved.
//
#include "String_Calculator.hpp"
#include <string>
#include "catch.hpp"
int stringCalculator( std::string s ) {
int sum = 0;
string delim = ",";
if(s.empty(... |
1de3e31e8784b81b31a6f1952fd3befbc59aa786 | a9ee3fa4205092c94a063e3c586224734c924f09 | pragunsambyal/C- | /13_max_sub_arraysum.cpp | C++ | cpp | 659 | no_license | #include<iostream>
using namespace std;
int maxsubarraysum(int arr[],int size)
{
int maxsofar=0,maxendinghere=0;
for(int i=0;i<size;i++)
{
maxendinghere=maxendinghere+arr[i];
if(maxendinghere<0)
maxendinghere=0;
if(maxsofar<maxendinghere)
maxsofar=maxendinghere;
}
return ... |
0d7fb23400e156cc6d689b6d6342bba9041c4fd2 | f5cbc9fb5b5d1a41363ac4343eba26503137421f | sunyinkai/ACM_ICPC | /2018/CRT_BSGS/b.cpp | C++ | cpp | 939 | no_license | #include<cstdio>
#include<cstring>
#include<cstdlib>
typedef long long LL;
LL extend_gcd(LL a,LL b,LL &x,LL &y){
if(a==0&&b==0)return -1;
if(b==0){ x=1;y=0;return a;}
LL d=extend_gcd(b,a%b,y,x);
y-=a/b*x;
return d;
}
LL m[10],a[10];
bool solve(LL &m0,LL &a0,int m,int a){
LL y,x;
LL g=extend_gcd(m0,m,x,y);
i... |
904448a26a059e7ae7aa428d03ebaaf43720cf61 | 0e128825cbed93b0b87bc6cd5cbb9f9edacc31b8 | rajat2004/programming | /a2oj/ladder12/45.cpp | C++ | cpp | 1,339 | no_license | #pragma GCC optimize ("-O3")
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef pair<int,int> p32;
typedef pair<ll,ll> p64;
typedef pair<double,double> pdd;
typedef vector<ll> v64;
typedef vector<int> v32;
typedef vector<vector<int> > vv32;
typedef vector<vector<ll> ... |
b9b06deafb0d2d3858f25d0085be48da3c131f94 | 4a880307ade6ee9696cb5446adf5e2dd8e69b86d | stephenvfg/pid-controller | /src/main.cpp | C++ | cpp | 5,043 | no_license | #include <math.h>
#include <uWS/uWS.h>
#include <iostream>
#include <string>
#include "json.hpp"
#include "PID.h"
#include "Twiddle.h"
// for convenience
using nlohmann::json;
using std::string;
// For converting back and forth between radians and degrees.
constexpr double pi() { return M_PI; }
double deg2rad(double ... |
9c36fb45c148bc956cafba3eb2687282627de024 | 3644ab2127bd2ef81ce57c05a8871ef2324c64cd | Johniel/contests | /codeforces/442div2/A/main.cpp | C++ | cpp | 820 | permissive | #include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
template<typename P, typename Q>
ostream& operator << (ostream& os, pair<P, Q> p)
{
os << "(" << p.first <<... |
a604831ee0d7d1d3b89d1fb1d4fa9eff91d27fdb | 825f0dabd20ce0099ac2d946a97198edf20ce1eb | bilke/ogs | /ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp | C++ | cpp | 13,408 | permissive | /**
* \copyright
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "ThermoMechanicalPhaseFieldFEM.h"
#includ... |
e65a405f0fba83571b64fd97a30116804ec55140 | d44d8d7dca83c9378868fc6fadd206c989b308e3 | QiuRuiBo/NewPregel-Differential-privacy-1 | /code/src/GraphConstruction_backup1.cpp | C++ | cpp | 30,894 | no_license | #include "Distributed_graph.h"
#include <sstream>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include "Utils.h"
#include <string>
#include "Count_triangles.h"
#include "../FindVertexRandomNeighbor.h"
#include "Check_connectivity/Count_subgraphs.h"
#define ... |
458dbf3a4863f1dcc9f39d46daa3b49a79efb06d | d37f7c29ad6aba348fab4e3419c795a6cfec412c | lab104yifan/ACM | /UVA501.cpp | C++ | cpp | 703 | no_license | #include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
using namespace std;
const int N = 30005;
int t, m, q, vis[N], num[N];
void solve() {
priority_queue<int> a;
priority_queue<int, vector<int>, greater<int> > b;
for (int i = 1; i <= m; i++) {
a.push(num[i]);
b.push(a.top());
a.pop(... |
719ccada68b288a5acd18f5ff16c8d67b6cb0bb1 | d188ccf94cd0a2037be3555aad67a97ac75d9a8c | MedicaicloudLink/Rosetta | /main/source/src/core/scoring/func/CharmmPeriodicFunc.cc | C++ | cc | 3,507 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
a1a307737f248f3e62833c1125a56bd48d652957 | d4a373daa46a1e207f30bcf8eeee1bf32b8d5362 | raymon1/data-structures-and-algorithms | /1 Algorithmic toolbox/week3_greedy_algorithms/7_maximum_salary/largest_number.cpp | C++ | cpp | 641 | no_license | #include <algorithm>
#include <sstream>
#include <iostream>
#include <vector>
#include <string>
using std::vector;
using std::string;
bool compare(string a, string b) {
return std::stoi(a + b) > std::stoi(b + a);
}
string largest_number(vector<string> a) {
//write your code here
std::sort(a.begin(), a.end(), ... |
fcf9588139f33dc406930f3dc6a7ccd39623c404 | 3a8195986095b1d6d8d96eff1b2322a16ce4983a | PoundKey/Algorithms | /LintCode/46. Majority Number.cpp | C++ | cpp | 442 | no_license | class Solution {
public:
/**
* @param nums: A list of integers
* @return: The majority number
*/
int majorityNumber(vector<int> nums) {
int count = 0, n = 0;
for (int i = 0; i < nums.size(); i++) {
if (count == 0) {
n = nums[i];
count++;... |
024e6bc2e5ee582e681e9e741989300dbd713175 | ad269a9540e5833fcf89a25b36024194eeba9886 | AnMi3/arm | /AYX-32/Firm/boot.cpp | C++ | cpp | 2,717 | no_license |
// AYX-32 boot module
//
// AYX-32 project
// (c) TS-Labs
//
// Das boot!
// Hints:
// + mutexes for flasher UART vs. Z80
#define BOOT
/// - Header includes ---
#include <stdarg.h>
#include <limits.h>
#include "string.h"
#include "clock.hpp"
#include "core/stk.hpp"
#include "core/scb.hpp"
#inclu... |
63ab9bd6111cbe83fca663e2b66492b344d0aaa5 | f71c48e3178b40f9bafce65a62a34f544a3bf568 | babanuki/BOJ | /C++/16304.cpp | C++ | cpp | 420 | no_license | #include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
vector<int> v;
int main(){
int n, i, x, price, pickup;
scanf("%d%d",&n,&x);
for(int i=0; i<n; i++){
scanf("%d",&price);
v.push_back(price);
}
if(n==1){
printf("1");
return 0;
}
sort(v.begin(), v.end());
for(i=1; i<... |
2582840a8c9d87ce4cd8705dd8e7526a7ffb12bc | a297027bbc1fc0b994a574048aa1ee45606ad3e6 | calmackenzie/VG1819 | /unitInteraction/TileGetter.cpp | C++ | cpp | 5,311 | no_license | #include "TileGetter.h"
TileGetter::TileGetter()
{
m_reg = false;
m_respond = false;
}
TileGetter::~TileGetter()
{
deregisterEvent();
}
void TileGetter::requireTile(unit::AbilityDescription * p_ad, unit::Unit* p_source, bool p_needUnit, bool p_autoClick)
{
if (!m_reg)
{
registerEvent();
m_reg = true;
}
/... |
80591d250736806e9cdc7886f6e7b543fc6f13b4 | 50aaa23493457a7546cd178fec9fefd40790b91e | pj499/library-management-system | /project.cpp | C++ | cpp | 3,099 | no_license | #include<iostream>
#include<fstream>
#include<cstring>
#include<bcrypt/BCrypt.hpp>
using namespace std;
class hashtable
{
public :
int hash1(int k)
{
int ans=k%10;
return ans;
}
int hash(int key)
{
int index1=hash1(key);
return index1;
}
};
class Login
{
char username[20];
char name[20];
int ha... |
309a9796453901ef984ab3a1520679351f0e0ae4 | e48c758620e8541edfd2baa6ba0dfdf971c14d07 | caogenwang/tencentcloud-sdk-cpp | /redis/src/v20180412/model/InstanceSet.cpp | C++ | cpp | 50,706 | 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
... |
2ea8e302be7e3a90c5fd007c158ef073967d20d0 | e9ac03c0a739f460fe8a3356d4825370325714db | hirama-akihiro/CocosBasic | /CocosBasic/Classes/AppDelegate.cpp | C++ | cpp | 3,591 | permissive | #include "AppDelegate.h"
#include "HelloWorldScene.h"
USING_NS_CC;
static cocos2d::Size designResolutionSize = cocos2d::Size(480, 320);
static cocos2d::Size smallResolutionSize = cocos2d::Size(480, 320);
static cocos2d::Size mediumResolutionSize = cocos2d::Size(1024, 768);
static cocos2d::Size largeResolutionSize = c... |
bf6a3646e08f9a3e28365673cd8881326e7112ba | 911401516ea69f2f0ee822b47289dca6606e7040 | Nabil-Babu/GAME3015_A3_BabuNabil | /GAME3015_A1_DirectX/GAME3015_A1_DirectX/StateStack.cpp | C++ | cpp | 2,063 | no_license | #include "StateStack.hpp"
#include <cassert>
#include "Game.hpp"
StateStack::StateStack(State::Context context)
: mStack()
, mPendingList()
, mContext(context)
, mFactories()
{
}
void StateStack::update(const GameTimer& gt)
{
for (auto itr = mStack.rbegin(); itr != mStack.rend(); ++itr)
{
if (!(*itr)->update(... |
0239c68aacd5b24e7bacd68d4201a929c5066509 | ae401f84139b6fb7356c80d1a17a3711b2d7b80e | andyanidas/Justin | /17Feb/arr4.cpp | C++ | cpp | 367 | no_license | #include<iostream>
using namespace std;
int main(){
int array[100] = {1, 2, 3, 5, 1, 5, 20, 2, 12, 10};
bool uniq = true;
for(int i = 0; i < 10 ; i++){
for(int j = 0; j < 10; j++){
if(array[i] == array[j] && i != j){
uniq = false;
break;
}
}
if(uniq){
cout<<array[i]<<" ";
... |
820d0e533415d9038b2c789f664070e143dbffb2 | b1386233accf87016dc163e5da3f3278a1014e0d | aman-aman/Codeforces | /653a.cpp | C++ | cpp | 647 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
scanf("%d",&a[i]);
sort(a,a+n);
set<int> st(a,a+n);
vector<int> vec(st.begin(),st.end());
bool ans=false;
if(vec.size()<3)
ans=false;
else
... |
e5339f2b0882003725157c3300eebdc055261b91 | 322429ecb40e6d4609da3de36fd4f56575994653 | kk-katayama/com_pro | /Codeforce/edufo88/edufo88f.cpp | C++ | cpp | 13,101 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <cstdio>
#include <limits>
#define rep(i,n) for(int i = 0; i < n; ++i)
#define rep1(i,n) for(int i = 1; i <= n; ++i)
using namespace std;
template<clas... |
14369b50b2be359e18979d9b928f4a7c3637ed13 | ae28271cdd23138ad1a175a6116dc02473c92ee7 | liyu0007/-AI | /Normal.cpp | C++ | cpp | 362 | no_license | #include "Normal.h"
CNormal::CNormal(void):CArtificialIntelligence(6)
{
TreeDepth = 6;
}
CNormal::~CNormal(void)
{
}
POINT CNormal::CreateChess(CBackArray BackArray)
{
POINT pointTemp = {0};
//´´½¨Ê÷
CreateTree(BackArray,TreeDepth);
//ËÑË÷
pointTemp = MaxMinSearch(TreeDepth);
//
Dele... |
0a2675fc3b2dd75d3a2362268882ea69e5caabac | bfdebe1805de42cfb587cb359514dfe82fbdf1ad | Astatine404/DS_repo | /glist2packedarr.cpp | C++ | cpp | 677 | no_license | #include <iostream>
using namespace std;
struct adnode;
typedef struct gnode
{
int data;
struct gnode *vnext;
struct adnode *alist;
} gptr;
typedef struct adnode
{
struct gnode *av;
struct adnode *avnext;
} adptr;
void fill(int a[], int *aptr, adptr *A)
{
while(A!=NULL)
{
a[*aptr] = A... |
bda1b1c2625854a35b41d2eae01aaad25efff464 | 0cf2acaf7909cd7e03a692a828b070f90ad79eb9 | scottsideleau/MOOS-IvP-releases | /ivp/src/app_nsplug/Expander.cpp | C++ | cpp | 19,346 | no_license | /*****************************************************************/
/* NAME: Michael Benjamin, Henrik Schmidt, and John Leonard */
/* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */
/* FILE: Expander.cpp */
/* DATE: May 28th, 2005 ... |
4b8a9e6c220215cee1730c288100c76ce9080b01 | 2927e0ec0f6da0be0294fa6a6fffd1f89ed2b2df | ShaoBF/HeatMeterVerifier | /HeatMeterVerifier/ColumnProperty.cpp | C++ | cpp | 283 | no_license | #include "stdafx.h"
#include "ColumnProperty.h"
ColumnProperty::ColumnProperty(){
}
ColumnProperty::~ColumnProperty(){
}
ColumnProperty::ColumnProperty(CString name, int format, int width){
this->name = name;
this->format = format;
this->width = width;
}
|
0e4dad95f46040de47a1a09650cde671cf42bc4c | 832882afc2c959f1dceacc2c39c059992d83b69a | 2mhk/All-In-One-Code-Framework | /Visual Studio 2008/ATLShellExtDragAndDropHandler/FileDragAndDropExt.cpp | C++ | cpp | 6,680 | no_license | /****************************** Module Header ******************************\
* Module Name: FileDragAndDropExt.cpp
* Project: ATLShellExtDragAndDropHandler
* Copyright (c) Microsoft Corporation.
*
* FileDragAndDropExt is an example of drag-and-drop handler for file objects.
* After the setup of the handl... |
91db8d1dc996c5b8f7282be2d6f5abbf7963b0c0 | 9ab533835469b5c03946494dae100341276d13bd | girlcoder18/Model-Based-IDS | /robot_formation/01042017/robot_8/robot/slros_initialize.cpp | C++ | cpp | 672 | no_license | #include "slros_initialize.h"
ros::NodeHandle * SLROSNodePtr;
const std::string SLROSNodeName = "robot";
// For Block robot/camera/Subscribe1
SimulinkSubscriber<geometry_msgs::PoseStamped, SL_Bus_robot_geometry_msgs_PoseStamped> Sub_robot_10;
// For Block robot/camera/Subscribe2
SimulinkSubscriber<geometry_msgs::Pos... |
55d819ae96c98e7fc3f137f7705307eb19a1367d | 7c5cc64c54c22e3ed08c25abb631fe5a025844f6 | mumbel/ghidra | /Ghidra/Features/Decompiler/src/decompile/cpp/opcodes.hh | C++ | hh | 5,895 | permissive | /* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writin... |
ce852b056190384b31bce43eae8de8d62f70c00f | 0885cb535e80432f27fbeb5648de23e68a21c375 | perfectcoincore/perfectcoin | /src/utiltime.cpp | C++ | cpp | 2,449 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Copyright (c) 2017 The Pigeon Core developers
// Copyright (c) 2018 The PerfectCoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licen... |
f6822336ea174cbe0b9e08fdb5734cbc9f6444b8 | 3f1f03842817ad7aaa62c6d9d468fc2cc83c45a9 | bas524/macchina.io | /platform/RemotingNG/RemoteGen/src/SkeletonGenerator.cpp | C++ | cpp | 42,593 | permissive | //
// SkeletonGenerator.cpp
//
// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH.
// All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
#include "SkeletonGenerator.h"
#include "InterfaceGenerator.h"
#include "ProxyGenerator.h"
#include "GenUtility.h"
#include "RemoteObjectGenera... |
d87e7621c6a5d6b719cac93c3fc4b9349b02251b | 0ef500e617f4803382bbafd04018318872aaba87 | live106/cocos2d-x-AoB | /extensions/GUI/CCControlExtension/CCControlButton.cpp | C++ | cpp | 21,987 | permissive | /*
* Copyright (c) 2012 cocos2d-x.org
* http://www.cocos2d-x.org
*
* Copyright 2011 Yannick Loriot.
* http://yannickloriot.com
*
* 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... |
798d5b87bc6974b1e11b484e1908813a33b1a236 | 4a02d78166552ea8b843f9509e92faeb332f5300 | x2110311x/CPSIC | /src/Main.cpp | C++ | cpp | 11,324 | no_license | #include <iostream>
#include <iomanip>
#include <string>
#include "Appointment.h"
#include "AppointmentSlot.h"
#include "datetime.h"
#include "Invoice.h"
#include "Patient.h"
#include "Payment.h"
#include "Personnel.h"
#include "PersonnelSchedule.h"
#include "Report.h"
#include "Schedule.h"
#include "Test.h"
#include "... |
0296266191cf95bda2e545878fd98ee03dbda214 | 7aba2fa76e5c81607c6d5d1aa603b6c9ac0bda31 | swjang/cloudexchange | /vtn/coordinator/modules/upll/vrt_momgr.cc | C++ | cc | 82,589 | no_license | /*
* Copyright (c) 2012-2014 NEC Corporation
* All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this
* distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
*/
#include "vrt_momgr.... |
bf11114d1475b454b9147e6ee1942f0ef0af8c01 | 1659d0bd193ec1762ec120b1be725ca0fda5a422 | luqian2017/Algorithm | /LintCode/609_Two-Sum-Less-than-or-equal-to-target/609_Two-Sum-Less-than-or-equal-to-target.cpp | C++ | cpp | 583 | no_license |
class Solution {
public:
/**
* @param nums: an array of integer
* @param target: an integer
* @return: an integer
*/
int twoSum5(vector<int> &nums, int target) {
int len = nums.size();
sort(nums.begin(), nums.end());
int p1 = 0, p2 = len - 1;
int count = 0;
... |
8d4da83025ddfa115a47503404ab3864ea8033a6 | fea08c5f45f265be793baa16317d05940c578fd5 | ProjectStarGate/StarGate-Plus-EMU | /src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp | C++ | cpp | 5,378 | no_license | /*
* Copyright (C) 2005-2011 MaNGOS <http://www.getmangos.com/>
*
* Copyright (C) 2008-2011 Trinity <http://www.trinitycore.org/>
*
* Copyright (C) 2006-2011 ScriptDev2 <http://www.scriptdev2.com/>
*
* Copyright (C) 2010-2011 ProjectSkyfire <http://www.projectskyfire.org/>
*
* Copyright (C) 2010-2012 Project-... |
af14d4a9c7e4918c335eb8800b0f4146305999b4 | 9d96c1bb9711aa91879058953cb12e24d66f3f5b | peteratebs/webcwebbrowser | /webc/WebC/gui/cpeg/source/fonts/Courier13b.cpp | C++ | cpp | 21,600 | no_license | /*
This Font was created by PEG Font Capture, a utility program
written by Swell Software Inc. for use with the PEG graphical
interface library.
The font captured was 13 Point Courier New
*/
#ifdef WEBC_USE_CPEG
#include "peg.h"
#ifdef WEBC_PEG_190_OR_LATER
#define WORD PEGUSHORT
... |
a9af6cc5c310174da058b5bab8acf75a2b998ac3 | d7a2f8b5667445dd1a5f5b07de364e3b37218284 | Shinimani/simple_road_cross_game | /first.cpp | C++ | cpp | 3,261 | no_license | #include <bits/stdc++.h>
using namespace std;
class Player
{
// private:
public:
int x,y; //x and y coordinates of the player
Player(int width) //initialised at the center
{
x=width/2;
y=0;
}
};
class Lane
{
private:
deque<bool> cars; //wil... |
e771ec5490a52d1d37e3f7cba0b2e5481c3446d9 | d548c75b28fe430ae4561e7b4b0ecd959cb17469 | samanseifi/Tahoe | /tahoe/src/elements/continuum/solid/materials/geomodel/GeoModelSST.cpp | C++ | cpp | 51,546 | permissive | /* 3-invariant, single-surface dilation/compaction plasticity model
* with isotropic and kinematic hardening
* Implemented 8/02 Craig Foster
*/
#include "GeoModelSST.h"
#include "SSMatSupportT.h"
using namespace Tahoe;
const int kNumInternal = 3; // number of internal state variables
const double sqrt3... |
404568ac73c97d6a96ef149687d668daf8d660f0 | c1b6c623362a6d5e79360c11ab9e9d27f4040ac2 | make1122/tencentcloud-sdk-cpp | /cpdp/src/v20190820/model/BankCardItem.cpp | C++ | cpp | 12,183 | 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
... |
a943582c9a1522bdd84007d50b9415348af514fd | 05cf2f04217454bda887367419070fde652ac174 | kurufeenve/C-_pool | /day06/ex01/Serializator.cpp | C++ | cpp | 1,373 | no_license | #include "Serializator.hpp"
/* Constructors/Destructors */
Serializator::Serializator()
{
this->_data = new Data();
return ;
}
Serializator::Serializator(const Serializator &S)
{
*this = S;
}
Serializator &Serializator::operator= (const Serializator &S)
{
if (this != &S)
{
this->_data = S.getData();
... |
2ba63342c62df8d3c1c53bde3d444327636742b9 | 6502a0ff0431cad21f60ec60a5786cc67563fcc5 | ttyang/sandbox | /sandbox/chrono/libs/stopwatches/example/nested_stopclock_accumulator_example.cpp | C++ | cpp | 3,247 | no_license | // stopwatch_accumulator_example.cpp ---------------------------------------------------//
// Copyright 2009-2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/stopwatches for documentation.
#inc... |
45d9feec7fc3dfab30e813f7abc421dbf52b17db | c776851b0cb9dd01efcf605411bdb27eba00d4cd | KongCang/Slicer4 | /Libs/MRML/Testing/vtkMRMLSliceNodeTest1.cxx | C++ | cxx | 741 | permissive | /*=auto=========================================================================
Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH)
All Rights Reserved.
See Doc/copyright/copyright.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Program: 3D Slicer
=========================... |
39ab580ae87feabed097f59c26161ee364f16c2b | f671cfbd7977f0eb3dd2437d376b9abdf75d2543 | siddharth94/competitive | /Codechef/Practice/chefpres.cpp | C++ | cpp | 2,425 | no_license | #include <bits/stdc++.h>
using namespace std;
#define R(i,a,b) for(int i=a;i<b;i++)
#define RE(i,a,b) for(int i=a;i<=b;i++)
#define RR(i,a,b) for(int i=a;i>b;i--)
#define RRE(i,a,b) for(int i=a;i>=b;i--)
#define F(i,n) for(int i=0;i<n;i++)
#define FE(i,n) for(int i=0;i<=n;i++)
#define FR(i,n) for(int i=n;i>0;i--)
#def... |
b2040d563c870c5a909cee9547efbb9db1b38f02 | f29dd30bdad8ab75b941de1fec0cffbe14e957cc | isheoran/CSES-Introductory-Problems | /Number_spiral.cpp | C++ | cpp | 812 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
#ifndef DEBUG
ios::sync_with_stdio(false);
cin.tie(nullptr);
#endif
int t;
cin>>t;
while(t--)
{
ll ans=0;
ll x,y;
cin>>y>>x;
if(x==y)
{
ans=x*x-x+1;
... |
479f04cdf95c433f17a304ceed372ece1406f616 | 8170b5624949e533a2270cc239ca03345daffe88 | doevelopper/cfs-osal | /src/main/cpp/cfs/osal/BidirectionnalContainer.hpp | C++ | hpp | 2,805 | permissive |
#ifndef CFS_OSAL_BIDIRECTIONNALCONTAINER_HPP
#define CFS_OSAL_BIDIRECTIONNALCONTAINER_HPP
#include <stdio.h>
#include <stdint.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace cfs::osal
{
template <typename Object>
class BidirectionnalContainer
{
protected:
... |
da19005e622acea021ad3b7d283d9e990e53579e | f30c8e3928e185b5b51c789e3fe393585ad8ea7d | beckgom/smallk | /tests/src/test_openmp.cpp | C++ | cpp | 4,111 | permissive | #include <cmath>
#include <thread>
#include <limits>
#include <vector>
#include <cassert>
#include <iostream>
#include "timer.hpp"
#include "tests.hpp"
#include "random.hpp"
#include "openmp_pragma.hpp"
using std::cout;
using std::cerr;
using std::endl;
bool ElementwiseProductTest(Random& rng);
namespace OpenMPTest
... |
f896ebc2c48cb5d3ff0f80110b0561a580ce5e85 | c8ea8ec6404d75a0a0fff0a9d9f4a6058b28893c | vmali007/Compitative-Programming | /vector_erase.cpp | C++ | cpp | 587 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int N, temp;
vector<int> v;
cin >> N;
// fill vector
for(int i = 0; i < N; i++){
cin >> temp;
v.push_back(temp);
}
// remove item specified in 3rd line
cin >> temp;
if( temp < v.size() )
v.erase(v.begin() + temp - 1);
// remove range speci... |
f38a15442641042ef735d0b536a7f6ae4ad3c0d1 | 9758f5a2246512c614a02885ae0292f5fc234018 | cryeo/ramen | /ramen.hpp | C++ | hpp | 24,455 | no_license | #ifndef RAMEN_HPP
#define RAMEN_HPP
#include <immintrin.h>
#define FORCE_INLINE __attribute__((always_inline)) inline
namespace Ramen {
////////////////////////
// SIMD Extension
////////////////////////
struct SimdExt {
static FORCE_INLINE constexpr __m256d _mm256_set1_pd(double d) { return ... |
30968497a6cab448b94db7add01c63e71300b9da | 3b82c275466735f17b14c7b50fec9187a575f4fd | luchenqun/leet-code | /problems/162-find-peak-element.cpp | C++ | cpp | 1,196 | no_license | /*
* [162] Find Peak Element
*
* https://leetcode-cn.com/problems/find-peak-element/description/
* https://leetcode.com/problems/find-peak-element/discuss/
*
* algorithms
* Medium (37.80%)
* Total Accepted: 494
* Total Submissions: 1.3K
* Testcase Example: '[1,2,3,1]'
*
* 峰值元素是指其值大于左右相邻值的元素。
* 给定一个输入数组... |
e1ca176572efdad178558f0455959f3625842692 | 5879dd9d26daea13082136329d257e3dcc0b2e08 | hsorby/opencor | /src/plugins/miscellaneous/Core/src/file.cpp | C++ | cpp | 9,158 | permissive | /*******************************************************************************
Licensed to the OpenCOR team under one or more contributor license agreements.
See the NOTICE.txt file distributed with this work for additional information
regarding copyright ownership. The OpenCOR team licenses this file to you under
t... |
fc7d2893ab9ec41734e0c32882f32ee93af1718b | 24e486136eeba4d77672d396eab57b133f2c0039 | saceandro/CancerGenomeEvolution | /src/lda_mix/lda_mix_compare_gradient.cc | C++ | cc | 22,863 | no_license | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <math.h>
#include <fenv.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_multimin.h>
#include <gsl/gsl_deriv.h>
#include <gsl/gsl_sf.h>
#include "../mt19937-64/mt64.h"
using namespace std;
#define logsum(a, b) ((... |
207f5d665fd2187c2c6c13ab0e7bc857bbfd23b3 | bc1f55fa13a1f59fe322f4163e7186388bd5d761 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/MP+dmb.sy+pos-addr-rfi-pos.c.cbmc.cpp | C++ | cpp | 44,510 | no_license | // 0:vars:2
// 2:atom_1_X0_1:1
// 3:atom_1_X2_1:1
// 4:atom_1_X6_1:1
// 5:atom_1_X7_1:1
// 6:thr0:1
// 7:thr1:1
#define ADDRSIZE 8
#define NPROC 3
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_... |
f68957d8a75679d1f48ab68ff6ff34298c07964c | 434d8a88f28757a5bf0b59f3d8a10b73e75f710a | adct-the-experimenter/binaural-audio-editor | /src/timeline-track-editor/src/timeline-track-editor.cpp | C++ | cpp | 7,812 | permissive | #include "timeline-track-editor.h"
//event table to out event commands to functions
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(ID_Hello, MyFrame::OnHello)
EVT_MENU(wxID_EXIT, MyFrame::OnExit)
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
wxEND_EVENT_TABLE()
//implements main in MyApp(derived from wxApp)
... |
db0e6988017b8abef49a258fa28b71a5b6f2f6e8 | 7865c148aa8a7460a49455a971907a8325d342ed | alucoin/biblepay | /src/qt/walletmodel.cpp | C++ | cpp | 31,207 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Däsh Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "walletmodel.h"
#include "addresstablemodel.h"
#include "guicons... |
723963398b2e580113ba0255f9d81e263f1cbf17 | 12a8e66771d4db1b8bec5f8723237eb83b8bd4d6 | rahdirs11/HackerRank | /C++/arraySum.cpp | C++ | cpp | 263 | no_license | #include <numeric>
#include <set>
#include <iostream>
using namespace std;
int main(){
long long sum = 0;
int n, x;
cin >> n;
set <int> numbers;
for (int i = 0; i < n; ++i){
cin >> x;
sum += x;
numbers.insert(x);
}
cout << sum << endl;
return 0;
} |
1d86bbb588baebdd2c196fef44485a66a2407b79 | c49754062e6e03e93ee5573056dc97783a94599a | yeadong/THE_DEAD_FOREST | /Classes/Scene/LogoScene.hpp | C++ | hpp | 512 | no_license | //
// LogoScene.hpp
// TheDeadForest
//
// Created by 남준현 on 2015. 11. 29..
//
//
#pragma once
#include "cocos2d.h"
namespace realtrick
{
class LogoScene : public cocos2d::Layer
{
public:
virtual ~LogoScene();
static cocos2d::Scene* createScene();
... |
fc4e4b9fb084a3d2a31631393253fd9f8043d18b | 3ae8e0d513234c267d3e9d2f18a7192839d008a4 | SaiFi0102/WebWidgets | /src/WebWidgets/DboDatabase/ModuleDatabase.cpp | C++ | cpp | 1,628 | no_license | #include "DboDatabase/ModuleDatabase.h"
#include "DboDatabase/ReadLock.h"
#include <Wt/WLogger>
namespace WW
{
ModuleDatabase::ModuleDatabase(DboDatabaseManager *manager)
: AbstractDboDatabase(manager)
{ }
void ModuleDatabase::load(Wt::Dbo::Session &dboSession)
{
MAP_MODULE_DBO_TREE(dboSession)
fetchAll(dboSessi... |
2761a706e9e57ee643f1ec05f2ae1a662a3327ab | 24004a654588c0c9a1d80da068bf160f5908d224 | MorSunChen/udpproxy | /udp_proxy.cpp | C++ | cpp | 5,351 | no_license | #include <sys/socket.h>
#include <stdlib.h>
#include <errno.h>
#include <arpa/inet.h>
#include <cstring>
#include <iostream>
#include <string>
#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
#include "udp_priv.h"
#include "udp_proxy.h"
using namespace std;
int UdpProxy::Init(ProxyConfig& config)
{
uin... |
70a695c1101258049b5ccd095b06810f4a0e7800 | a4389dc951fe72236052b69114761db72115ea88 | EoinAM/ProgrammingLabs | /labs-C00217717/Lab 8/src/TankAI.cpp | C++ | cpp | 5,447 | no_license | #include "TankAi.h"
////////////////////////////////////////////////////////////
TankAi::TankAi(sf::Texture const & texture, std::vector<sf::Sprite> & wallSprites)
: m_aiBehaviour(AiBehaviour::SEEK_PLAYER)
, m_texture(texture)
, m_wallSprites(wallSprites)
, m_steering(0, 0)
{
// Initialises the tank base and turr... |
a251603c8c2df060d89538783cae4e73b098ea03 | 400f17ef1fa169bc27188758c80f26d936b740ce | vnatara4/CAPRI | /src/capri.cc | C++ | cc | 6,561 | no_license | #include "capri.h"
#include <limits>
#include <iostream>
using namespace std;
using namespace CONTROL_DIVERGENCE;
unsigned long long total_instructions_issued= 0;
unsigned long long total_instructions_diverged = 0;
unsigned long long tbc_warp_saved = 0;
unsigned long long capri_warp_saved = 0;
unsigned long long capr... |
f24bf07e0bab4e1e40cee2db1f390b76059f56de | 0ad3f5d0db68dc9a9cda6a9f0165260b076ec216 | gw1108/swarch168 | /SwarchLibrary/GamePiece.cpp | C++ | cpp | 3,973 | no_license | // ================================================================================================
// Filename: "GamePiece.cpp"
// ================================================================================================
// Author(s): Travis Smith
// Last Modified: Apr 22, 2014
// ==============================... |
739f29a9f89745364fb44401f3d2d217761ca36c | a3c8e137cdc17a94bb2198edddb221777a07f190 | Sunken-City/Engine | /Code/Engine/Core/Memory/MemoryOutputWindow.hpp | C++ | hpp | 641 | no_license | #pragma once
class TextBox;
class MemoryOutputWindow
{
public:
//CONSTRUCTORS/////////////////////////////////////////////////////////////////////
MemoryOutputWindow();
~MemoryOutputWindow();
//FUNCTIONS/////////////////////////////////////////////////////////////////////
void Update(float deltaS... |
5ce178b0d2a1b0e3ae60e7dea5efb473ab705144 | 0f2e54695a2dc6910cc6cf9d25c04b599fc3c89f | stoodlesz/SET07109-2020 | /40444454/bst.cpp | C++ | cpp | 2,172 | no_license | #include <fstream>
#include <iostream>
#include <map>
#include <regex>
#include <string>
#include <unordered_set>
#include <vector>
#include "declarations_B.h"
void BinarySearchTree::insert(
node **tree,
Identifier
identifier) { // function to insert a new node from the identifiers
... |
2eec0dfd7fe3f9772e703fba9af4a0ea77981ecf | fc453d7869e4324a0cfa2ae9e8110e4250b4355b | Igorek9g/M_FW_V1_done | /src/GeoMess.cc | C++ | cc | 442 | no_license | //
// Created by idalov on 26.05.17.
//
#include <GeoMess.hh>
GeoMess::GeoMess(Geometry *geometry) :detGeom(geometry){
change_H = new G4UIcmdWithADouble (" new_commands/ch_H_detector", this);
change_H->SetGuidance("change H of detector (tubs) ");
}
GeoMess::~GeoMess(){
}
void GeoMess::SetNewValue(G4UIc... |
d2f870fa142890f4742a6a5f98014fef8b9cf1f0 | df94b6db2fd0fa20906049ae3cdf67ddffc7a73d | dliang0406/dldt | /inference-engine/include/ie_plugin.hpp | C++ | hpp | 8,745 | permissive | // Copyright (C) 2018 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
/**
* @brief A header file for Main Inference Engine API
* @file ie_plugin.hpp
*/
#pragma once
#include <ie_icnn_network.hpp>
#include <ie_iextension.h>
#include "ie_api.h"
#include "details/ie_no_copy.hpp"
#include "ie_error.hpp"... |
7b893e9c9d1e20fc05732533d6649c8d432d3e50 | fbff52fd86617c2abfbdb6f13aed53138f1d9b4c | prabhsimar100/Backup-for-Codes-Competitive-Programming- | /generate parenthese.cpp | C++ | cpp | 851 | no_license | #include<bits/stdc++.h>
using namespace std;
#define int long long int
#define P pair<int,int>
#define pb push_back
#define F first
#define S second
vector<string> ans;
int n;
void func(string s,int l, int r)
{
if(r==n)
{
ans.pb(s);
return;
}
if(l<n)
{
s+='(';
func(... |
ef167097fcc94dd044cbc1580204e6458339c651 | 2387e25f94ee057602f714612d6fa4c30cb833ba | GISjingjie/DataStruct | /DataStruct/P33尾插法双链表_0731review.cpp | C++ | cpp | 1,694 | no_license | #include <stdio.h>
#include <stdlib.h>
typedef struct d{
int data;
struct d *front;
struct d *next;
}dlink;
dlink *DEL(dlink *head,int pos);
dlink *insert(dlink *head,int x,int pos);
dlink *build()
{
dlink *head=(dlink*)malloc(sizeof(dlink));
dlink *rear=(dlink*)malloc(sizeof(dlink));
head->front=rear;head->next... |
f4662b20d02e1fca7f4ec2c0823b16b2dd78d8aa | 3eab9cbe9befcfe7f25ca76984ecb140b019a226 | schloerke/roxygen2 | /src/parser2.cpp | C++ | cpp | 3,902 | permissive | #include <Rcpp.h>
using namespace Rcpp;
#include <fstream>
#include <sstream>
class RoxygenLine {
std::string line_;
const char* begin_;
const char* end_;
const char* cur_;
public:
RoxygenLine(const std::string& line) : line_(line) {
begin_ = cur_ = line_.data();
end_ = begin_ + line_.size();
}
... |
fb129515c4b156035620da80754ff4715977d532 | 5d97304378f80db1d8b75f1a1ade1dc33d648ff8 | generalova-kate/openvino | /inference-engine/tests/functional/inference_engine/lp_transformations/prelu_transformation.cpp | C++ | cpp | 7,207 | permissive | // Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "layer_transformation.hpp"
#include <string>
#include <sstream>
#include <memory>
#include <gtest/gtest.h>
#include <transformations/utils/utils.hpp>
#include <transformations/init_node_info.hpp>
#include <low_precision/... |
255ee1446c73a2ac0e1a63ce0b0aaa457cde106b | 8042a0f581e9bc973bdbabd2cd855973c1ec90fa | Ambrou/spectre | /tests/Unit/Time/TimeSteppers/Test_RungeKutta3.cpp | C++ | cpp | 1,522 | permissive | // Distributed under the MIT License.
// See LICENSE.txt for details.
#include "Framework/TestingFramework.hpp"
#include "Framework/TestCreation.hpp"
#include "Framework/TestHelpers.hpp"
#include "Helpers/Time/TimeSteppers/TimeStepperTestUtils.hpp"
#include "Time/TimeSteppers/RungeKutta3.hpp"
#include "Time/TimeStepp... |
955c46c0cc8a0a97c02911c74fddfb4d57d612ab | dca493ed3ed8159d45ae78b878e2a0f82bc2d623 | chenyao1208/skia | /src/sksl/SkSLUtil.cpp | C++ | cpp | 4,168 | permissive | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/sksl/SkSLUtil.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLStringStream.h"
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
nam... |
6eb2aba9468acee9797d32a94000cc118de2a1b3 | 08ca833cbe4aff10142a87be83aece9f5809f2c0 | cryptotetsuya/shin4 | /src/wallet/rpcwallet.cpp | C++ | cpp | 146,922 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 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 "amount.h"
#include "base58.h"
#include "chain.h"
#include "consensus/validat... |
00e28c92f0feb4d60ddce6b7acbe8a75bd012539 | 6082979d83923dfca36cb0d7db003c3510e03268 | iboB/word-grid | /core/code/core/GridElement.hpp | C++ | hpp | 2,522 | permissive | // word-grid
// Copyright (c) 2019-2021 Borislav Stanimirov
//
// Distributed under the MIT Software License
// See accompanying file LICENSE.txt or copy at
// https://opensource.org/licenses/MIT
//
#pragma once
#include "API.h"
#include "GridElementTraits.hpp"
#include "LetterSequence.hpp"
namespace core
{
// a grid... |
fe7d01d1cab070496a7262f1ad7aedc46b2caf07 | 77a3805f0f8462e8cded9edc3587e84e72e74839 | Samsung/Castanets | /components/autofill/core/browser/geo/phone_number_i18n_fuzzer.cc | C++ | cc | 1,501 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "base/at_exit.h"
#include "base/i18n/icu_util.h"
#include "base/strings/string16.h"
#... |
dfdfdeea9aafb3c99b13afd1eb356cc0f226beed | 0b4e974de08d57962cc552faddc60ebde6402b00 | xawi2000/redex | /analysis/ip-reflection-analysis/IPReflectionAnalysis.cpp | C++ | cpp | 8,040 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "IPReflectionAnalysis.h"
#include "AbstractDomain.h"
#include "CallGraph.h"
#include "MethodOverrideGraph.h"
#include "Pa... |
6bef8072be275e8659e2806b742e815c7c4ed5fb | 99f0aaef87b225664662771a5f258f37f832aa66 | CryptoHelp/GROUPCoin | /src/qt/bitcoingui.cpp | C++ | cpp | 35,380 | permissive | /*
* Qt4 bitcoin GUI.
*
* W.J. van der Laan 2011-2012
* The Bitcoin Developers 2011-2012
*/
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "addressbookpage.h"
#include "sendcoinsdialog.h"
#include "signverifymessagedialog.h"
#include "optionsdialog.h"
#include "aboutdialog.h"
#include "clientm... |
34e638f845e59bc159c6f98490b33a99ee00065d | 40c97ae85c7fcd02a62534cb1871a2519218bd02 | svarvel/browser-android-tabs | /chrome/browser/browser_switcher/browser_switcher_browsertest.cc | C++ | cc | 7,670 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/browser_switcher/browser_switcher_service.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
#i... |
b43ef6e5f0899f23b4bdcbc9db382d89abad9f78 | 48609afed305ee8a0a5e00a2ef699c2527ebf4d1 | dc-tw/leetcode | /445-Add Two Numbers II.cpp | C++ | cpp | 939 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
stack<int> s1;
stack<int> s2;
while (l1) {
... |
f27728f0ba35479b4b9e7ccc40ab27109e2359b5 | dec09b603a929a919d14b0d03572fbe9fb707458 | efarriol/Mecanica | /Particles2D - initial/Particles2D/Particle.cpp | C++ | cpp | 2,648 | no_license | #include "Particle.h"
#include <iostream>
Particle::Particle() :
_previousPosition(0, 0, 0), _currentPosition(0, 0, 0), _velocity(0, 0, 0), _force(0, 0, 0), _bouncing(1), _lifetime(50), _fixed(false)
{
}
Particle::Particle(const float& x, const float& y, const float& z) :
_previousPosition(0, 0, 0), _velocity(0, 0, ... |
27cbeb3295201157774831a61a598bfe4b342ef5 | c405f29d12be093061a499dac03b5be374c90ee8 | valdenicio22/Programming-Marathon | /Noic/Programacao_Basica/Aula03_Vetores/Led.cpp | C++ | cpp | 788 | permissive | #include <bits/stdc++.h>
using namespace std;
int main(){
int x;
char frase[110];
scanf("%d", &x);
for(int i=0;i<x;i++){
int leds=0;
scanf("%s", frase);
int t = strlen(frase);
for(int j=0;j<t;j++){
if (frase[j] == '1') leds +=2;
else if (frase[j... |
cb75214d2cb80035badeeeaedd333f4d2bb2c140 | 76888eba56dacf9bcf3d3fef38ec9e3417d1097f | cha63506/SynciaGreedyBot | /SynciaGreedyBot.cpp | C++ | cpp | 3,788 | no_license | #ifdef SYNCIAGREEDYBOT_UNIT_TEST
#include "SynciaGreedyBot.h"
#include <iostream>
using namespace syncia;
int main(int argc, char* argv[])
{
boost::asio::io_service service;
boost::asio::io_service::work w(service);
boost::thread_group thread_group;
int thread_num = 4;
for(int i = 0; i < thread_num; ++i){
thre... |
3a34a396ce5b71c6b56573aa566250c245b3f4d7 | d4ff211a2191197e0888ed8aa01fd49d4f5934a8 | kautzerelias/xls | /xls/dslx/deduce_ctx.cc | C++ | cc | 6,950 | 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... |
89b725efc6351a6571cdbb21799e7206f4d616b3 | 891475b940e8fc05c4c661ae42b8c265a6558790 | seronet-project/SeRoNet-examples | /SeRoNet-Tooling-ROS-Mixed-Port/DomainRosModelsRepositories/ROSRos_core/smartsoft/src-gen/ROSRos_core/Std_msgs_MultiArrayDimensionCore.hh | C++ | hh | 3,109 | no_license | //--------------------------------------------------------------------------
// Code generated by the SmartSoft MDSD Toolchain
// The SmartSoft Toolchain has been developed by:
//
// Service Robotics Research Center
// University of Applied Sciences Ulm
// Prittwitzstr. 10
// 89075 Ulm (Germany)
//
// Information abo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.