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 |
|---|---|---|---|---|---|---|---|---|
2e9c56eae70c9c46dbb8a752fd1f117de1156fa6 | cd7c18ec5bc9fe4498beb3a42fd144f8ff7df1a8 | blockspacer/yazik | /src/yazik/compiler/generators/cpp_gen.hpp | C++ | hpp | 275 | no_license | #pragma once
#include <yazik/compiler/utility/generator.hpp>
#include "tools/cpp/runfiles/runfiles.h"
namespace yazik::compiler {
generator_ptr_t create_cpp_generator(
::bazel::tools::cpp::runfiles::Runfiles* rf
);
} // end of ::yazik::compiler namespace |
1ad2d8248fb72e3e04713d43139dbf0cf13b8b15 | 588971a7fc9725daaba0734e3d4c210a507e6a8f | b1u33ky/algorithm | /pat/a1002.cpp | C++ | cpp | 390 | no_license | #include <cstdio>
typedef struct {
int expo;
int coef;
} Polynomial;
Polynomial term[100] = {0};
int main(void)
{
unsigned int k;
int expo[100] = {0};
int coef[100] = {0};
scanf("%d",&k);
for (int i = 0; i < k; i++) {
Polynomial term_1;
scanf("%d%d",&term[i].expo,&term[i].... |
60409c59bb013b8ad93c9078a4954e01d819393c | 793dd528539d4800201e63f0866dec1d44dd8630 | Ershany/Arcane-Engine | /Arcane/src/Arcane/Vendor/renderdoc-1.x/renderdoc/driver/d3d11/d3d11_shader_cache.cpp | C++ | cpp | 9,179 | permissive | /******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2019-2022 Baldur Karlsson
*
* 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... |
579904c1f02f43a444939512e1e6e861b4b4094c | 63ce1d67348c69d4e432f200ec23f3eb13d54da9 | remnorton/can_terminal | /common/fileinfo/fileinfo.cpp | C++ | cpp | 2,627 | no_license | #include "fileinfo.h"
#include <QDebug>
#include <QDir>
#include <QByteArray>
#if defined(Q_OS_WIN)
#include "windows.h"
#include "winver.h"
#endif
#if defined(Q_OS_WIN)
QVariantMap strFileInfoW(QString file, QString block, QStringList vals)
{
QVariantMap r;
DWORD h;
DWORD verSize=GetFileVersionInfoSize((... |
2acfb960ff94eb50bc00cebf2974f4365195d79a | 470a1ef4d35dd04aa1cbd787c05f04046e052242 | vpopovyc/piscine-cpp | /d01/ex03/ZombieHorde.cpp | C++ | cpp | 1,992 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ZombieHorde.cpp :+: :+: :+: ... |
6519acb4c5ac9da7e0aba47a6803f84e6d7a314e | 906063d9324ebbd88ae927f100cf5db95c27d929 | linzuxin/XunmaMateDb | /src/sherry_version3/replay.cpp | C++ | cpp | 316 | no_license |
#include "replay.h"
void Replay::ApplyDeltas(Data &data, const std::vector<DeltaItem> &deltas) {
for (auto &&item : deltas) {
ApplyDelta(data, item);
}
}
void Replay::ApplyDelta(Data &data, const DeltaItem &item) {
for (uint8_t i = 0; i < DATA_FIELD_NUM; i++) {
data.field[i] += item.delta[i];
}
} |
9c8e5b837c99489a6c7432576670cde973898b4f | 44a3412fc3a9fb6c57dabec36cfeda0e6d1a14cf | vslavik/poedit | /deps/boost/libs/math/include_private/boost/math/tools/remez.hpp | C++ | hpp | 19,802 | permissive | // (C) Copyright John Maddock 2006.
// Use, modification and distribution are 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)
#ifndef BOOST_MATH_TOOLS_REMEZ_HPP
#define BOOST_MATH_TOOLS_REMEZ_HPP
#ifdef _MSC_VER
#pra... |
c33c212466c8ebdee53b4cc719925c2691408648 | d125f942322035a2f227a69b43e4ad0fe91d4ada | minhnewbie2310/PRF192-C-Fundamental | /TTH/BTPE1.cpp | C++ | cpp | 317 | no_license | #include <stdio.h>
#include <conio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
int main()
{
printf("\nNhap n(n > 0): ");
int n;
scanf("%d",&n);
int sum=0;
for(int i=1;i<=n;i++){
if(n%i==0){
sum+=i;
}
}
printf("\nTong cac uoc cua %d la : %d",n,sum);
return 0;
}
|
fd71e4119ef979d3b3e8b234d1eae58dc1fdf9ac | eacc083d66b5432afb7a535c0e8331b7e8c70492 | nevilparmar11/CompetitiveProgramming | /GoogleCodeJam/19-1A-A.cpp | C++ | cpp | 903 | no_license | #include <bits/stdc++.h>
using namespace std;
int t, n, m;
vector<array<int, 2>> g;
bool u[20][20];
bool rec(int s=0, int li=0, int lj=0) {
if(s>=n*m)
return 1;
vector<array<int, 2>> v;
for(int i=0; i<n; ++i)
for(int j=0; j<m; ++j)
if(!u[i][j])
v.push_back({i, j});
random_shuffle(v.begin(), v.end());
... |
d16a4ed5570b1a67c5a04dc5c08deea7f7c6620b | c580660ae7a5d31c75c39ad548053d9324fb09c6 | xhae/Contests | /ICPC/Japan/2012/b.cpp | C++ | cpp | 1,678 | no_license | #include <vector>
#include <iostream>
#include <tuple>
using namespace std;
int n, m;
string _ref[10], query[10];
int main(void) {
while(cin >> n >> m, n > 0) {
for(int i = 0; i < n; i++) cin >> _ref[i];
for(int i = 0; i < m; i++) cin >> query[i];
vector<tuple<int, int, int>> cands;
for(int r = 1; r <= 20;... |
1c6d771e34c98da9af2e1ac5de468014717117cc | 9221eab909e0b34702a06d2cfb96f90aa2bd5c0c | ritvikanandi/CPP | /codeforces-codechef/photo.cpp | C++ | cpp | 2,019 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define ios ios_base::sync_with_stdio(false), cin.tie(NULL)
#define pb push_back
#define po pop_back()
#define umap unordered_map
#define uset unordered_set
#define mod 1000000007
#define pi 3.141592653589793238
#define maxe *... |
45f598e4d37f239b3727154013a1a07fd16d5e32 | b7513939be2f850411b53805b68c34a8dfd1773b | Triadai/skia | /dm/DM.cpp | C++ | cpp | 50,623 | permissive | /*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "DMFontMgr.h"
#include "DMJsonWriter.h"
#include "DMSrcSink.h"
#include "ProcStats.h"
#include "Resources.h"
#include "SkBBHFactory.h"
#include "SkChecksum.h"
#includ... |
28b8b0afdb08cca44a4306bf6116b97c9922f5cb | 5b04b2fe1ed1f8afe9e57059c010fd4db7c0a2f6 | cnsuhao/web-pap | /server/Server/Skills/ImpactLogic/StdImpact012.cpp | C++ | cpp | 12,084 | no_license | #include "stdafx.h"
///////////////////////////////////////////////////////////////////////////////
// 文件名:StdImpact012.cpp
// 功能说明:效果--State: refix all attack, Defence and MaxHP, MaxMP, MaxRage, MaxStrikePoint
//
// 修改记录:
//
//
//
///////////////////////////////////////////////////////////////////////////////
#includ... |
bafc5aae9425474b231aef31c05a07ae1900c60c | ac084febbd7a4fbb4f9656f4dce2c562c13ca449 | abramcumner/xray16 | /xray/Layers/xrRender/ParticleGroup.cpp | C++ | cpp | 18,719 | no_license | #include "stdafx.h"
#pragma hdrstop
#include "../../xrEngine/psystem.h"
#ifndef _EDITOR
#include "../../xrServerEntities/smart_cast.h"
#endif
#include "ParticleGroup.h"
#include "PSLibrary.h"
#include "ParticleEffect.h"
using namespace PS;
//-------------------------------------------------------------------------... |
2ef1de42abed1cf240d72331b4e173220ef4f827 | 4e0149a9d7dda2fc09631ea7bec456fbb42d262c | py100/University | /ACM/2016tour/14training/20160616/E.cpp | C++ | cpp | 5,461 | no_license | #include <bits/stdc++.h>
#define X first
#define Y second
using namespace std;
pair<char, char> pcc;
typedef long long ll;
const int maxn = 10000200;
map<string, string> mp1;
map<string, int> mp2;
char str[maxn];
char ch[20] = "0123456789ABCDEF";
void out(int x)
{
int l = x / 16, r = x % 16;
printf("%c%c", ch[... |
832b2e84166971fbf363baaea152aee215234cb9 | 66a0dbfaeec2b6747627f123bc58a28ac1101ed9 | RIVeR-Lab/eposcmd | /CommunicationXLib/Common/source/CommunicationModel/VirtualCommandSet/Classes/CommandSets/Drive2/CommandSetInterpolatedPositionMode_VCS_Drive2.cpp | C++ | cpp | 15,911 | no_license | #include "stdafx.h"
#include "CommandSetInterpolatedPositionMode_VCS_Drive2.h"
#include <CommunicationModel/CommonLayer/Classes/Commands/VirtualCommandSet/Command_VCS_Drive2.h>
//////////////////////////////////////////////////////////////////////
// Konstruktion/Destruktion
///////////////////////////////////... |
959bd1faaabba7a7e261f9c4f3a8d82f9dabdc28 | 7bcaf6cae5740146531f246703e57e0b6c029ca4 | xujiasci/mvfst | /quic/fizz/client/handshake/FizzClientHandshake.cpp | C++ | cpp | 12,062 | 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 <quic/fizz/client/handshake/FizzClientHandshake.h>
#include <quic/client/state/ClientStateMachine.h>
#include <quic/co... |
18a67db4209c81ee781350d7a90943498d2df86c | 7b70fd5d0ec7506f1406b6b66f0588ab790cdc3c | lamikae/licode | /erizo/src/erizo/media/ExternalOutput.cpp | C++ | cpp | 11,858 | permissive | #include "ExternalOutput.h"
#include "../WebRtcConnection.h"
#include "../rtputils.h"
#include <cstdio>
#include <boost/cstdint.hpp>
#include <sys/time.h>
#include <arpa/inet.h>
namespace erizo {
#define FIR_INTERVAL_MS 4000
DEFINE_LOGGER(ExternalOutput, "media.ExternalOutput");
ExternalOutput::ExternalOutput(c... |
19e40fb8c78834c403f150ee06597e483fb3629a | e2bfc57107b156f1df1ddd87e64e3f3732b9b9c3 | wmo-ipet-owr/lrose-core | /codebase/libs/Ncxx/src/Hdf5/Hdf5xx.cc | C++ | cc | 60,564 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
57e17edf391de9c886afd4070fc14c48e423f762 | 53fc17f576f0cf25be23a0e7dcbc0734cdd8b2fb | LinYiChun0411/TQC_code | /301.cpp | C++ | cpp | 327 | no_license | #include <stdio.h>
#include <stdlib.h>
void Star();
int main()
{
printf("呼叫印出星星的函數!!!\n");
Star();
printf("我喜歡學C程式語言\n");
Star();
printf("結束函數的呼叫!!!");
system("PAUSE");
return 0;
}
void Star()
{
int i;
for(i=1; i<=30; i++)
printf("*");
printf("\n");
}
|
75b562a204b63f82a1c974f0179efe1df2dede7e | 0ef951e04af317ea62c4d0a0b46e4f22b4f2cd8c | profsung/os-named-pipe | /prog1.cpp | C++ | cpp | 1,329 | no_license | #include <unistd.h> // open() close()
#include <fcntl.h> // O_* constants
#include <sys/stat.h> // mkfifo()
#include <sys/types.h> // mkfifo()
#include <string.h> // strlen() strcmp()
#include <stdio.h> // printf() scanf()
#include <stdlib.h> // exit()
#include "my_const.h"
int main() {
// create the named pipe (F... |
3ef67d6eb162c35d0fcaf8cf0d0cbcdc58752daf | 7029ce15ac272c1de134b8c1f02c17f0b3e4eadb | alipha/streamer | /examples/example_first.cpp | C++ | cpp | 921 | permissive | #include "../streamer/streamer.hpp"
#include <cassert>
#include <vector>
/*
* first and first() return the first element in the stream, or an empty std::optional if
* there are no elements in the stream.
*
* first(UnaryPred) returns the first element in the stream matching the predicate, or
* an empty std::optio... |
93ea165af67648d5efeeee60f75b84e2ad02e1de | d3bf7c29a2cb6e2d28da1daff9a11f4cbc7aa217 | JonSalazar/serialization | /main.cpp | C++ | cpp | 4,964 | no_license | #include <iostream>
#include "sha256.h"
#include "uint256.h"
#include "serialize.h"
#include "version.h"
#include "primitives/transaction.h"
/* ----------- XSN Hash ------------------------------------------------- */
/** A hasher class for XSN's 256-bit hash (double SHA-256). */
class CHash256 {
private:
CSHA256 ... |
fd3ac2001e763bc4a2cd21ad5eff7681f85cac6c | c3cc8d0e7b2c4f545b29480c7d2d67468a56bc3c | Noctis-Xu/Coursera-PKU_Programming-Design-and-Algorithms_Specializations | /北京大学程序设计与算法专项课程_Coursera/C_6_3 寻找山顶.cpp | C++ | cpp | 2,045 | no_license | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
#define SELF p[i][j]
#define UP p[i-1][j]
#define DOWN p[i+1][j]
#define LEFT p[i][j-1]
#define RIGHT p[i][j+1]
int main() {
int m, n;
cin >> m >> n;
double** p = new double* [m];
for (int i = 0; i < m; i++) {
p[i] = new double[n];... |
a3e1da8c2277e5c8234d2779e1a5a5a4fafcb324 | 9d736b1ce9186ff287ca9e636938491346fab9d4 | abhishek1212github/july-leet-code | /3Sum.cpp | C++ | cpp | 1,481 | no_license | /*
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
The solution set must not contain duplicate triplets.
Example:
Given array nums = [-1, 0, 1, 2, -1, -4],
A solution set is:
[
[-1, 0, 1],
[-... |
0dd88e88eb5d3a2fd2fec279ad9f07f2d9ad3520 | b80053c55fd4b07f14b59ffc5112afe40929b04d | fulgorit/qtscrabble | /puzzlewidget.cpp | C++ | cpp | 10,260 | no_license | /****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follow... |
c490d3f7b7fbd7f919efe576560cef6852358098 | 012a0d513a6418ed0cd44de3c89be7c0432ae1fb | VictoriaAlbanese/Verizon5G-SynchronizePCL | /src/transformer_node.cpp | C++ | cpp | 5,610 | no_license | //////////////////////////////////////////////////////////////
//
// Programmer: Victoria Albanese
// Filename: transformer_node.cpp
//
// Purpose: This node transforms the raw cloud tata into a
// global reference frame & publishes the result
//
//////////////////////////////////////////////////////////////
#include... |
f12fd6c72ce273156c60db501839dceca6de7312 | 668b5aef0078fe9138d5f59bc50c4b6f0f6e4427 | synth-soul/HyperNEAT | /boost_1_57_0/libs/asio/example/cpp03/serialization/server.cpp | C++ | cpp | 3,714 | permissive | //
// server.cpp
// ~~~~~~~~~~
//
// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/asio.hpp>
#include <... |
15a006e82e95d0fdbefba811f7f4d966cdfa64da | 73f9400f8887b4986906738055c5145f035478ea | knut0815/CubismUP_3D | /source/cubism_main.cpp | C++ | cpp | 1,333 | permissive | //
// Cubism3D
// Copyright (c) 2018 CSE-Lab, ETH Zurich, Switzerland.
// Distributed under the terms of the MIT license.
//
// Created by Guido Novati (novatig@ethz.ch).
//
#include "Simulation.h"
#include <Cubism/ArgumentParser.h>
#include <cmath>
#include <iostream>
#include <unistd.h>
using std::cout;
int ... |
f2825127fae99f4db5ed595e75a1f261d27ed91f | e6b0507caf801c13791bfeb51939f292bd584f9f | lineCode/ArchiveGit | /Clients/AG/Pm8/App/Upgrade/PHONENUM.CPP | C++ | cpp | 2,195 | no_license | /*
// $Workfile: PHONENUM.CPP $
// $Revision: 1 $
// $Date: 3/03/99 6:13p $
//
// Copyright © 1995 MicroLogic Software, Inc.
// All rights reserved.
*/
/*
// Revision History:
//
// $Log: /PM8/App/UPGRADE/PHONENUM.CPP $
//
// 1 3/03/99 6:13p Gbeddow
//
// Rev 1.0 14 Aug 1997 15:42:06 Fred
... |
045ee54ba1df0a3826187b1c08af2aaa945ecb95 | 5c2f642b7cce8be2199a2b0b7492bc463c0b609a | SkyCMD/ParkClarkDungeonCrawl | /Driver.cpp | C++ | cpp | 1,494 | no_license | /***************************************
Project: Dungeon Crawl
Authors: Parker Evans and Skyler Clark
Class: CS 3150
Date: 21-Sep-2019
***************************************/
#include "Structs_and_enum.h"
#include "Map.h"
#include "Hero.h"
#include <iostream>
#include <cstdlib>
#include <ctime>
int main()
{
sr... |
f2c4b9a3582003742830fd0494c7045bfed2e74e | 360a40b1a549d89bde81b640b2204900b5b2ef0e | LLNL/ExaConstit | /src/BCData.hpp | C++ | hpp | 420 | permissive |
#ifndef BCDATA
#define BCDATA
#include "mfem.hpp"
#include "mfem/linalg/vector.hpp"
#include <fstream>
class BCData
{
public:
BCData();
~BCData();
// scales for nonzero Dirichlet BCs
double essVel[3];
double scale[3];
int compID;
void setDirBCs(mfem::Vector& y);
... |
fc449abf761c8396b5cceb0ada381e427818b52d | 749c62224bd6ec87c935f95a19a9a66782419616 | jonitox/Algorithm_Studies | /사칙연산 수식 계산기(후위표기법 변환,stack).cpp | C++ | cpp | 2,874 | no_license | #include <iostream>
#include <string>
#include <cstring>
#include <set>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <typeinfo>
#include <iomanip>
#include <cmath>
#include <cstdio>
////// #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef... |
1bbc2ab9ea8e3e3a2b985cbbb9315525a526db53 | ce8f8ad1d213b742accf2ba3b299d15663004beb | williame/megaglest-source | /source/shared_lib/sources/platform/common/simple_threads.cpp | C++ | cpp | 36,840 | no_license | // ==============================================================
// This file is part of Glest Shared Library (www.glest.org)
//
// Copyright (C) 2009-2010 Titus Tscharntke (info@titusgames.de) and
// Mark Vejvoda (mark_vejvoda@hotmail.com)
//
// You can redistribute this code and/or modify it... |
58491c1dc08b90870927000fb81de360386bb558 | 71bd79820554639815081836fadaf19cf786f073 | tanmaybichu/pandapilot | /Firmware/src/drivers/bmp180/bmp180.cpp | C++ | cpp | 28,667 | no_license | /****************************************************************************
*
* Copyright (C) 2013 Navstik Development Team. Based on PX4 port.
*
* Copyright (C) 2012 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permit... |
907999fec9c51c1276a4f4e4c991ee7d3f4abea0 | 069d3bf1d8ec9508960260ebbc4b7b653f9256b5 | playmer/StrawberryJam | /Transform.cpp | C++ | cpp | 366 | no_license | #include "Transform.hpp"
DefineType(Transform)
Transform::Transform(Space *aSpace,
Composition *aOwner,
glm::vec3 aTranslation,
glm::vec3 aScale,
glm::vec3 aRotation)
: Component(aSpace, aOwner),
mTranslation(aTranslation),
... |
368a22b1eaf3d88a423553016bcf943ed422aee7 | 294f492a9b30d38cc3f6c616db5eb2c66c0daad3 | AutoCoder/xtrader_lite | /tools.cpp | C++ | cpp | 47,204 | no_license | #include "stdafx.h"
#include "tools.h"
#include "CostMs.h"
int GetHoldPos(const CThostFtdcInvestorPositionField* pInv)
{
int iHoldPos=0;
if (pInv->PosiDirection == THOST_FTDC_PD_Long)
{ iHoldPos = pInv->Position-pInv->ShortFrozen; }
else if (pInv->PosiDirection == THOST_FTDC_PD_Short)
{ iHoldPos = pInv->Position-... |
3489ae502007785633d6529928488487fe4823f1 | d16bdffbe7d754e31207406681b78805d796848c | PierrickLP/ObEngine | /include/Core/Utils/MathUtils.hpp | C++ | hpp | 3,737 | permissive | #pragma once
/**
* \brief Functions to work with maths
*/
namespace obe::Utils::Math
{
constexpr static double pi = 3.14159265359;
/**
* \brief Get a random integer between the given bound
* \param min Min bound
* \param max Max bound
* \return A random int between the given bound
*... |
5b16838544b773aa1e59934a00cca7bdee10b15b | ae673e803bdc6262aa3d7bd5102a62915180914a | ValtoForks/anki-3d-engine | /src/anki/gr/ShaderCompiler.cpp | C++ | cpp | 14,149 | permissive | // Copyright (C) 2009-2018, Panagiotis Christopoulos Charitos and contributors.
// All rights reserved.
// Code licensed under the BSD License.
// http://www.anki3d.org/LICENSE
#include <anki/gr/ShaderCompiler.h>
#include <anki/gr/GrManager.h>
#include <anki/core/Trace.h>
#include <anki/util/StringList.h>
#include <an... |
2d51158ec4b03798c10a0b703a16bda54feb31cc | eb552a0706b90ac10402a3edc5bd0bba83c05ef7 | zysundar/CPP_Programming | /postfix_to_infix.cpp | C++ | cpp | 959 | no_license | #include<iostream>
#include<string>
#include<stack>
using namespace std;
bool isoperand(char ch)
{
if('0'<=ch && ch<='9')
{
return true;
}
else
return false;
}
bool isoperator(char ch)
{
if(ch=='+' || ch=='-' || ch=='*' || ch=='/')
{
return true;
}
else
return false;
}
int apply(char... |
a8d0a0036ef4fff2a9582992a41ad22eb9554c6c | 95239787d323aa7452f6c9a8d71a83f5f5fdb95e | shivani96-hub/Kassiopeia | /KGeoBag/Source/Visualization/Vtk/Include/KGVTKGeometryPainter.hh | C++ | hh | 11,416 | no_license | #ifndef KGVTKGEOMETRYPAINTER_HH_
#define KGVTKGEOMETRYPAINTER_HH_
#include "KGAppearance.hh"
#include "KGConicalWireArraySurface.hh"
#include "KGCore.hh"
#include "KGExtrudedArcSegmentSurface.hh"
#include "KGExtrudedCircleSpace.hh"
#include "KGExtrudedCircleSurface.hh"
#include "KGExtrudedLineSegmentSurface.hh"
#inclu... |
050e77d62775fc65084c56066bf19859a05a6154 | d23f21106004c737ac747ccd786380459df9323b | LanghaoZ/rubber-duck | /tests/nginx/config_statement_test.cc | C++ | cc | 1,550 | no_license | #include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "nginx/config_parser.h"
#include "nginx/config.h"
#include "nginx/config_statement.h"
using ::testing::_;
using ::testing::Return;
namespace nginx {
class mock_config : public config
{
public:
MOCK_METHOD1(to_string, std::string(int));
};
TEST(ConfigStat... |
d68e6864619b0c1a1d8030884d28358c959fc06b | bbe880d982beaaf8eb6b12469c1c3d25b75fc028 | tagattie/FreeBSD-Electron | /devel/electron9/files/patch-net_base_features.cc | C++ | cc | 486 | no_license | --- net/base/features.cc.orig 2020-05-26 08:03:25 UTC
+++ net/base/features.cc
@@ -92,7 +92,7 @@ const base::Feature kBlockExternalRequestsFromNonSecur
#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
const base::Feature kCertVerifierBuiltinFeature {
"CertVerifierBuiltin",
-#if defined(OS_CHROMEOS) || define... |
7c67eb35ac8b910f380247ab821d8e63183ac54f | 07c5c4b59bb4fa4426fac5259cbf871175b6cb0d | mtconnect/cppagent | /src/mtconnect/sink/rest_sink/server.hpp | C++ | hpp | 9,378 | permissive | //
// Copyright Copyright 2009-2022, AMT – The Association For Manufacturing Technology (“AMT”)
// 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
//
// ... |
f9fad21ee258fa4b66067491d790491c518d2db5 | 001df84c008180bf4542616f70c6043649c852d1 | radtek/MTI_WINCE317_BSP | /PLATFORM/TI_EVM_3530/SRC/Ctlpnl/Cplmain/sndschem.cpp | C++ | cpp | 28,839 | no_license | //
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this samp... |
11bc1d51c0e7ce6ad3b5551f237a0006b64a2d44 | 533c93c98bca63ae790f5787e43ba7d7fd1c9c52 | namangup/CP | /Codeforces/1352/B.cpp | C++ | cpp | 3,250 | no_license | /******Author : c0d3rpr0********/
#include <bits/stdc++.h>
using namespace std;
const auto start_time = std::chrono::high_resolution_clock::now();
typedef unsigned long long ull;
typedef long long ll;
typedef pair<ll,ll> ii;
typedef vector<ll> vi;
typedef vector<ii> vii;
typedef vector<long long> vll;
typedef vector<... |
6dde59e3fcf4f4babce6845daa50af16a0dfec92 | 27ff69408bfd4e64f63ac33b782d82e4c2806b57 | andres-rad/Programming-Challenges | /NEERC17/m.cpp | C++ | cpp | 714 | no_license | #include <bits/stdc++.h>
using namespace std;
#define tint long long
#define forsn(i,s,n) for(tint i = (tint)(s); i < (tint)(n); i++)
#define forn(i,n) forsn(i,0,n)
#define dforsn(i,s,n) for(tint i = (tint)((n)-1); i >= (tint)(s); i--)
#define dforn(i,n) dforsn(i,0,n)
#define fst first
#define snd second
#define pb pus... |
dfc9a5af182e60911443531749fee57422a33e56 | 6734218009b3f89b5056a68a6d7bcd0ce2d95f82 | Vizionnation/chromenohistory | /chrome/credential_provider/gaiacp/gcp_crash_reporter_client.cc | C++ | cc | 3,424 | 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/credential_provider/gaiacp/gcp_crash_reporter_client.h"
#include "base/file_version_info.h"
#include "base/files/file_path.h"
#include "... |
ea5a01cc23f9950cae9fb894ed07d260097049ea | 913c91e15af6c61f1c8470626e6f1c33a93a70f7 | ssskhw/- | /selfdrive/ui/qt/offroad/onboarding.cc | C++ | cc | 4,410 | permissive | #include <QLabel>
#include <QPainter>
#include <QVBoxLayout>
#include <QQuickWidget>
#include <QQmlContext>
#include <QDesktopWidget>
#include "common/params.h"
#include "onboarding.hpp"
#include "home.hpp"
#include "util.h"
void TrainingGuide::mouseReleaseEvent(QMouseEvent *e) {
QPoint touch = QPoint(e->x(), e->y... |
a52c7e116e92f02ad737a310ce8f8c8fef07bca2 | dee8e74d5a124806cf9ad56b99c7cdbdb2a0e41a | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/S+dmb.ld+popl.c.cbmc.cpp | C++ | cpp | 25,125 | no_license | // 0:vars:2
// 2:atom_1_X0_1:1
// 3:thr0:1
// 4:thr1:1
#define ADDRSIZE 5
#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_rng( char from, char to ) {
char ret = __get_rng();
... |
eea84bb942387a37b8bfe49fbdf5f0a2e120aff8 | 84cc4a7e40a317e8f735ff30827c75f0e125bfb5 | bobthepiman/TwoStepperControl | /main.cpp | C++ | cpp | 289 | no_license | #include "mainwindow.h"
#include <QtWidgets/QApplication>
#include <stdio.h>
#include "tsc_globaldata.h"
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
MainWindow w;
w.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
w.show();
return a.exec();
}
|
6c27478c368878ec0915d88df2fe22304167ed81 | 60dfa59742d1f3cd9e88861b92ce26b578244b29 | muthiyanbhushan/Algorithms | /endianness/endianness.cpp | C++ | cpp | 462 | no_license | /*
* endianness.cpp
*
* Created on: Feb 24, 2017
* Author: bhushan
*/
#include <iostream>
#include <string>
#include <stdio.h>
using namespace std; // namespace std
void show_endian(char* i,int n)
{
for(int j=0;j<n;j++)
{
printf("%.2x",i[j]);
}
}
int main()
{
int i = 1;
//show_endian((char *)&i,si... |
4f24fe7703cb41ffb2f09d58c47ae95ce7b62d4e | d95c642fefcd2e39daa31ca8e6027b807e31aad4 | pigrange/LeetCodeStepByStep | /src/accepted/133.CloneGraph.cpp | C++ | cpp | 1,286 | no_license | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
class Node {
public:
int val;
vector<Node *> neighbors;
Node() {}
Node(int _val, vector<Node *> _neighbors) {
val = _val;
neighbors = _neighbors;
}
};
class Solution {
unordered_map<Node *, Node *> map;
public:... |
9f2b6e3f27da80c8d1e182762f58495eb36c4c1b | f34e1fd7bf524a44a8f611ce6834b0e7301f0b12 | realcapacitor/cpp_returns | /42Pointers.cpp | C++ | cpp | 225 | no_license | #include<iostream>
using namespace std;
int main(){
int age = 24;
bool human = true;
int* ageptr = &age;
bool* humanptr = &human;
cout<<age<<" --> "<<ageptr<<endl<<human<<" --> "<<humanptr;
return 0;
} |
715b9a9b96cd3ec8d3f4badadae463105be13df9 | 621b86eec8ca5a7aecd33a3383a48c6df6bc4e8e | SuckShit/bitcoin | /src/rpc/mining.cpp | C++ | cpp | 47,257 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 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 <chain.h>
#include <chainparams.h>
#include <consensus/co... |
77e12d05fec8e201103c935868b4af620553cd6d | 12086afc0b954ab8bedef061412c011425cc96b9 | chinhhi102/GiaiThuat | /kattis/Math/Jumbled Compass.cpp | C++ | cpp | 1,276 | no_license | #include <map>
#include <set>
#include <queue>
#include <cmath>
#include <vector>
#include <cstdio>
#include <bitset>
#include <cstring>
#include <cstdlib>
#include <complex>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <list>
#include <stack>
#include <iterator>
#include <complex>
#include <stdi... |
3d6faf5165aba66c00ef3487219a8bfb09573bac | 475bcf3fdee071afaac44b89348d4b6122c86e5d | salem-w/Undergrad-Projects | /CSE570/Lab2/lab2.cpp | C++ | cpp | 860 | no_license | #include<ctype.h>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int limit, x = 0;
vector<string> productions;
void manipulate_string(char c) {
int temp;
for(temp = 0; temp < x; temp++) {
if(s[temp] == c)
return;
}
s[temp++] = 'c';
}
void find_first(char c) {
i... |
f4bf898d6b612404e88001cd34fd583ce87a6d3c | ef8eee9445276f63113b57f5521fc19bc65dfecf | galapaegos/old-engine | /apps/test-texture/test.cpp | C++ | cpp | 2,394 | no_license | #include <string.h>
#include "test.h"
class Test : public gswin::gswindow
{
public:
Test () : gswin::gswindow ()
{
gsscene::gsscenemgr *pSceneMgr = new gsscene::gsscenemgr;
pKernel.setMgr (pSceneMgr);
gsscene::gscameranode *pCam = new gsscene::gscameranode;
pCam->setProjection (getAreaWidth (), getAreaHeigh... |
9448c8c28364da11bdad4d84f2b71e3fd9e6bbea | a4f0e4e7ef94d4f7078872dea4c35043980acea1 | johannes-braun/graphics_utilities | /src/gfx/math/spline.cpp | C++ | cpp | 4,032 | permissive | #include <algorithm>
#include "spline.hpp"
#include <numeric>
namespace gfx {
inline namespace v1 {
[[maybe_unused]] bspline& bspline::add(const vertex2d& p)
{
_points.insert(_points.end(), p);
_selection_points.insert(_selection_points.end(), p);
return *this;
}
void bspline::add(const vertex2... |
cadcbf264a32e7d4f70db41f053dc0fd148f3b53 | a74393eb342882f277b58b0a4399d938fae14aee | cool2528/miniblink49 | /third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp | C++ | cpp | 15,498 | permissive | /*
* Copyright (C) 2011 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
ecbc155bf867337b860685a4a0ec16ae62853b25 | 75dff19f350cbba947b0711e3cf77a18720bb609 | odarbelaeze/ising-tests | /test/SystemTest.cc | C++ | cc | 2,048 | permissive | #include "SystemTest.h"
CPPUNIT_TEST_SUITE_REGISTRATION(SystemTest);
void SystemTest::setUp()
{
up = Spin::Up;
down = Spin::Down;
}
void SystemTest::tearDown() {}
void SystemTest::testConstructorThrows()
{
sys = new System(0);
}
void SystemTest::testConstructorThrowsNegative()
{
sys = new System(... |
935ea5d2e3f459bbb682798484017a9daf8a9e53 | d350ecbaa34396256d9289a54e8488a6d4b24f5e | rolisz/OOPQt | /sales.cpp | C++ | cpp | 3,985 | no_license | #include "sales.h"
Sales::Sales(QObject *parent):sales(*(new QVector<sale>())),QAbstractTableModel(parent) {
QFile fisier("sales.txt");
if (!fisier.open(QIODevice::ReadOnly) )
throw QString("Eroare la citirea fisierului");
QTextStream in(&fisier);
while (!in.atEnd()) {
sale s;
in>>s;
if (s.isValid())... |
bc471c250d9435678edce698ef2b8f7c7ab2a940 | 4d1b33281502c89686b48dc4efd3fe270a00c9a3 | HamedSabri-adsk/maya-usd | /lib/usd/ui/layerEditor/qtUtils.cpp | C++ | cpp | 1,821 | permissive | //
// Copyright 2020 Autodesk
//
// 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 ... |
626a9ebfe707b4aa07b047d5ed16125dae5176a7 | 5ac3eaf8a70ebcd09f6f7bcb5d59ef4da35fe2d2 | SLGames2020/dispatchmayhem | /GameServer/server/LoginResponse.cpp | C++ | cpp | 514 | no_license | #include "LoginResponse.h"
LoginResponse::LoginResponse()
{
}
LoginResponse::~LoginResponse()
{
}
bool LoginResponse::ProcessResponse(LoginModel model)
{
bool success = true;
// set the UserID inside of our Response
ResponseBody[L"ResponseStr"] = json::value::string(model.ResponseStr);
ResponseBody[L"SessionTok... |
864b6c5c74f16f83982da30e217ec69873b4d9da | 397dc2fcade05a01cd027deec89f32b11399cd60 | wackou/graphene | /libraries/chain/include/graphene/chain/protocol/withdraw_permission.hpp | C++ | hpp | 8,447 | no_license | #pragma once
#include <graphene/chain/protocol/base.hpp>
#include <graphene/chain/protocol/memo.hpp>
namespace graphene { namespace chain {
/**
* @brief Create a new withdrawal permission
* @ingroup operations
*
* This operation creates a withdrawal permission, which allows some authorized account... |
cd585aa522eadfb4afc794f6b8603d062efeb0fb | d3a5e83c9f3b3ee99078bf744572ca0c136799ba | anu-prakash-dev/WarZone_2 | /gd_native/src/movement/lib.cpp | C++ | cpp | 430 | no_license | #include "Movement.h"
extern "C" void GDN_EXPORT godot_gdnative_init(godot_gdnative_init_options *o)
{
godot::Godot::gdnative_init(o);
}
extern "C" void GDN_EXPORT godot_gdnative_terminate(godot_gdnative_terminate_options *o)
{
godot::Godot::gdnative_terminate(o);
}
extern "C" void GDN_EXPORT godot_nativescript_... |
e9c8a1b2120d9c2c6d8e1aba478956e7b5545997 | acd755d6e68f5c851d67696026f94420e627c991 | geme9876/PracticeC14 | /Stack/소스.cpp | C++ | cpp | 589 | no_license | #include "JStack.h"
#include "JQueue.h"
#include <iostream>
int main()
{
JStack t;
for (int i = 0; i < 10; i++)
{
t.push(i);
std::cout << i;
}
std::cout <<std::endl;
for (int i = 0; i < 10; i++)
{
StackNode* popNode = t.pop();
std::cout << popNode->data;
delete popNode;
}
std::cout << std::endl;... |
8386ceac22320f47db551fc929dcaa98dc26e234 | cb08b3e69cea0f2e9fe7816fba902b6828b9dcc4 | mrmohim/All-OJ-Contest-Problem-Solution | /CodeForces/Round 338/B.cpp | C++ | cpp | 2,002 | no_license | /* ===================================*/
/* Author : Moshiur Rahman Mohim */
/* Email : mtmohim74@gmail.com */
/* Institute: HSTU */
/* ===================================*/
#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cctype>
#i... |
bdb774cc2eef2f1947930a16c777d85e974641f2 | b4d0d76f887eea7b3e8551a808285f4a6f96bace | chenghuige/gezi | /test/folly/test_fbvector.cc | C++ | cc | 1,808 | no_license | /**
* ==============================================================================
*
* \file test_fbvector.cc
*
* \author chenghuige
*
* \date 2015-07-20 11:02:17.262888
*
* \Description:
*
* ==========================================================================... |
9a15dc8e96a99b4e2a2a88c55f2cbd72557208ca | dda9838d8b692112d0c2d78b5886d1cfda7d7df2 | ibiscum/fast_ber | /include/fast_ber/util/Extract.hpp | C++ | hpp | 3,190 | permissive | #pragma once
#include "fast_ber/ber_types/Class.hpp"
#include "fast_ber/ber_types/Construction.hpp"
#include "fast_ber/ber_types/Tag.hpp"
#include "absl/types/span.h"
namespace fast_ber
{
// Extract the construction of a ber packet
// Return true on success, false on fail
inline bool extract_construction(absl::Span... |
59f896538bdc4b38d281c43f5c5377ad8b845128 | 2d4e73e3c928a07dd41c8dd248bf8792c1d621d5 | iqbal-lab-org/gramtools | /libgramtools/src/prg/coverage_graph.cpp | C++ | cpp | 14,052 | permissive | #include "prg/coverage_graph.hpp"
#include "common/utils.hpp"
coverage_Node::coverage_Node()
: sequence(""),
site_ID(0),
allele_ID(ALLELE_UNKNOWN),
coverage(),
pos(0),
is_site_boundary{false} {};
coverage_Node::coverage_Node(std::size_t pos)
: sequence(""),
site_ID(0),
... |
2950623feb51c3b64fe45d0c6d3d543efdab23a3 | fe5410229ec9f3c25d01d33cdb1e1a5af4ad73a4 | chromium/chromium | /chrome/browser/policy/url_blocking_policy_test_utils.cc | C++ | cc | 2,572 | permissive | // Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/policy/url_blocking_policy_test_utils.h"
#include <string>
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/browser.h"
#i... |
3c525ce2ed78cee2148a727e9892f8594cdecdf7 | decbad2021eaaad4195253df48b0c70b0dbc8006 | Microsheep/NCTU_algorithm_2015 | /HW1/hw1.cpp | C++ | cpp | 845 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
FILE *f_in, *f_out;
f_in = fopen("./input.txt", "r");
f_out = fopen("./output.txt", "w");
char line[100000];
vector<int> numbers;
fgets(line,100,f_in);
while(fgets... |
fcf7ae0b0ac7e4b7fa6b3a6f216e2c5e90b21126 | 88aadd43da1dd6ec8bb40584af3d13c161637bb2 | frankie-11/SCUM_SDK7.13.2020 | /SDK/SCUM_Smoked_Goat_Steak_functions.cpp | C++ | cpp | 4,905 | no_license | // SCUM (4.24) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function ConZ.FoodItem.OnRep_Temperature... |
bdbd28a390809d586adbd9bd9fa2a65ea1693b02 | cea430d1f830f38cff9be6b05e93e85407d302e6 | minhaz1217/My-C-Journey | /EWU/cse325/Project/projectv1.cpp | C++ | cpp | 10,526 | no_license | #include<bits/stdc++.h>
#define SIZE 100
using namespace std;
int CLOCK;
class Process{
private:
int processID;
string processName;
string processStatus;
int burst;
int arrivalTime;
int priority;
static int processCounter;
public:
Process(){}
/*
Process(string processName, int bu... |
dbbd46ba48447cbd0b5154746a236c64768d2d30 | 8e0a5b8d3cfb617f9c643da33d009d68bfeb16cd | KoSangWon/Algorithm | /BOJ_c++/Baekjoon1966(프린터 큐)/Baekjoon1966(프린터 큐)/main.cpp | C++ | cpp | 1,091 | no_license | //
// main.cpp
// Baekjoon1966(프린터 큐)
//
// Created by 고상원 on 2020/02/16.
// Copyright © 2020 고상원. All rights reserved.
//
#include <iostream>
#include <queue>
using namespace std;
int main(int argc, const char * argv[]) {
int T;
cin >> T;
for(int i = 0; i < T; i++){
int N, M, c... |
59974e5d382af5a46b8d1c4b4f108b591205241b | cbac9ed3bc69a94c4115923d5e79750ba58c226f | rushioda/PIXELVALID_athena | /athena/Trigger/TrigEvent/TrigRoiConversion/Root/RoiReader.cxx | C++ | cxx | 1,985 | no_license | /*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
//
// @file RoiReader.cxx
//
//
// @author M.Sutton
//
//
// $Id: RoiReader.cxx, v0.0 Wed 18 Nov 2015 12:22:35 CET sutt $
/// class header
#include "TrigRoiConversion/RoiReader.h"
/// xAOD storage class
#include ... |
31425f15429701bc281e93ac8c5fdfd56a5f65db | ea2f2bb9ea36fe0000e7c57a1a096363100e2eab | LKHUUU/SZU_Learning_Resource | /计算机与软件学院/面向对象程序设计(荣誉)/大作业1/素材1/2017163101_1235_1.cpp | C++ | cpp | 1,198 | no_license | 2017163101:Problem1235:答案错误
#include<iostream>
#include<cstdio>
using namespace std;
class Geometry{
public:
virtual double getArea()=0; //计算面积,结果保留小数点后两位
};
class Rect:public Geometry{
private:
double l,h;
public:
double getArea(){
double area=l*h;
return area;
}
Rect(double _l,double _h):l(_l),h(... |
edb7d828a6fcd78b863571137c94c28217423957 | 38b7ea5772634ff23b586c10630d62e8a3a5b469 | desktopgame/Bean | /Bean/bean/env/native/component/ComponentGetWidthExecutor.cpp | C++ | cpp | 474 | no_license | #include "ComponentGetWidthExecutor.h"
#include "../../../env/user/UserComponent.h"
//public method---
ComponentGetWidthExecutor::ComponentGetWidthExecutor() {
}
ComponentGetWidthExecutor::~ComponentGetWidthExecutor() {
}
Object_ * const ComponentGetWidthExecutor::executeImpl(Method * const proxy, Object_ * const in... |
d8ab1e065fb51256d244b76f7036cf91851c3d86 | fdbe73841a371e454dba3bd63c027bf865ce6f9f | SymbianSource/oss.FCL.sf.adapt.NECNaviengine | /navienginebsp/ne1_tb/specific/cs42l51.cpp | C++ | cpp | 11,190 | no_license | /*
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-... |
f79fba262d8ba237f610fb6036ba842989db78dc | 7d4f50851964ce2a2571f0f0d87da6bca3212817 | LittleForker/sirikata | /libcore/src/transfer/HttpManager.cpp | C++ | cpp | 20,685 | permissive | /* Sirikata Transfer -- Content Transfer management system
* HttpManager.cpp
*
* Copyright (c) 2010, Jeff Terrace
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistribut... |
c51938d215445dbd8da00763865fcbb167bda3af | abe17621e763a64ff17cc7879eb57415e73cc849 | kbc1992/zircon | /kernel/dev/pcie/address_provider/mmio.cpp | C++ | cpp | 3,908 | permissive | // Copyright 2018 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <trace.h>
#include <fbl/auto_lock.h>
#include <dev/address_provider/address_provider.h>
#include <dev/pci_common.h>
#in... |
ea37d1d56dd6e0c7a6e05c4509499193082f13ab | cc33ea13a87c0c7fda247ac9adb6a679c5905128 | testgit23/newrepo | /Servers/SystemServer/main.cpp | C++ | cpp | 3,598 | permissive | #include <AK/Assertions.h>
#include <LibCore/CFile.h>
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
void sigchld_handler(int)
{
int status = 0;
pid_t pid = waitpid(-1, &status,... |
148865489634550f0128be0cc19094aab79b3e8b | 1e5fa079ac0b12ad385d89b31e15be7f89e10db9 | LASTEXILE-CH/TotoroEngine | /Engine/Source/File/BinaryReader.cpp | C++ | cpp | 2,542 | no_license | // Modified version of DirectXTK12's source file
//--------------------------------------------------------------------------------------
// File: BinaryReader.cpp
//
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/?LinkId=248929
// http://go.microsoft.co... |
9a09adc334e54e502b6f034b6c5fcd59aa06791e | bb6bbc9a6212b1f10b4e42445516b1f654202902 | pikzen/cours | /prog/TP13/src/main.cpp | C++ | cpp | 882 | no_license | /*
* main.cpp
*
* Created on: 8 mars 2013
* Author: engel
*/
#include "constantes.h"
#include "enregistreur_fichier.h"
#include "enregistreur_fichier_texte.h"
//#include "harmonique.h"
#include "signal_constant.h"
void
q2_signal_constant() {
signal_constant sc(0.5);
enregistreur_fichier_texte enr("02_s... |
eadc5219784499714b5ce92a39a828346bfc7d53 | acb99316b50ac4c2eba79b1479d31c0b0a9853d9 | anatoliy80210/FileFactory | /HW1_3/main.cpp | C++ | cpp | 2,863 | no_license | /**
* File: main.cpp
* Author: Ryan Johnson
* Email: johnsonrw82@cs.fullerton.edu
* Purpose: This file contains the main entry point for the FileFactory program for HW1. All printing operations
* are initiated from here.
*/
// includes
#include "FileFactory.hpp"
// main entry point
int main() {
// create a file ... |
b2adb1aecf638e25d631eaf9d581405bbd99a0e7 | 334aa69dca3969adbd2cb6644d1ec0cd63273a1c | lwhay/NCores | /test/btree/btreeTestSearch.cpp | C++ | cpp | 860 | no_license | //
// Created by Michael on 2018/11/30.
//
#include <iostream>
#include <cmath>
#include <unordered_set>
#include "SerialBTree.h"
#include "cache/LSMCache.h"
#include "utils.h"
#define DEFAULT_TEST_COUNT 10000//000
#define SKIP_GRAN 10//000
using namespace std;
extern int DIM;
int main(int argc, char **argv) {
... |
f1ec9918c97171e510fe050f7554b1981349c0a7 | 8957f7474f5d4e39ba447a7f85843ab1ead7b6c3 | Strongc/proview | /abb/lib/wb/src/wb_c_abb_acs800motoraggr.cpp | C++ | cpp | 2,803 | no_license | /*
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 ... |
173acddf6a9bafa1fbd3cf5d379734f6b197a828 | 16c5267232164a297cdd51335063ddfbefaf0c15 | abhi6991/InterviewPreparation | /Coding/Graphs/detect_cycle_undirected.cpp | C++ | cpp | 1,452 | no_license | #include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define N 100005
#define S(x) scanf("%d",&x)
#define S2(x,y) scanf("%d%d",&x,&y)
#define wl(n) while(n--)
#define PB push_back
#define MP make_pair
#define P(x) printf("%d\n",x)
#define fl(i,n) for(i=0;i<n;i++)
#define fil(i,a,n) f... |
b0dafa427aa9e0a473b671ae8a59d69b346e1109 | 2d8ef4f1c0089b38ade02f2ae3ebf5cae19ae3ee | cpmech/vismatrix | /src/boost/spirit/home/karma/binary/meta_grammar.hpp | C++ | hpp | 7,961 | permissive | // Copyright (c) 2001-2008 Hartmut Kaiser
//
// 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)
#if !defined(BOOST_SPIRIT_KARMA_META_GRAMMAR_MAY_04_2007_0853AM)
#define BOOST_SPIRIT_KARMA_META_GRAMMAR_MAY_04_2007... |
f398f70278ef97b00c215274ef5980c715350ce2 | 0de3aac6cc15aace38f565836a8623db7f0870ef | kingsleylow/MetaTrader4.Manager.Wrapper | /src/P23.MetaTrader4.Manager.ClrWrapper/ConversionHelpers.cpp | C++ | cpp | 84,045 | permissive | #include "stdafx.h"
#include "P23.MetaTrader4.Manager.ClrWrapper.h"
#define COPY_STR(dst,src) { strncpy_s(dst,src,sizeof(dst)-1); dst[sizeof(dst)-1]=0; }
P23::MetaTrader4::Manager::Contracts::Configuration::Manager^ P23::MetaTrader4::Manager::ClrWrapper::Convert(ConManager* configuration)
{
P23::MetaTrader4::Manag... |
7c4bafb2540c0f2b2260225bd010780534517eb4 | c17f6858a5761b4827040b5ba956d21ab08bd931 | tlynch591/tlynch591 | /main.cpp | C++ | cpp | 373 | no_license | //Name: Tristan Lynch
//Student ID: #0587591
//Example 01 - Displays hello world to the console
#include <iostream>
#include <string>
using namespace std;
int main() {
// create a variable to store a message
string message ="Hello C++ World!";
// display a message to the console
cout << "Hello, Wor... |
cf8e19d10518b179831d07122d87d775fb66efad | 2e6c7609adf2b44ebf4afd6a1db99c848d78ae08 | Bishal16/Codeforces_D | /1352D.cpp | C++ | cpp | 778 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,t,x,i,a,b;
cin>>t;
while(t--)
{
cin>>n;
int as=0,bs=0,c=0,k,a=0,b=0;
deque<int>dq;
deque<int>::iterator it;
for(i=0;i<n;i++){
cin>>x;
dq.push_back(x);
}
while(dq.size()>0){
a=0;k=0;
while(a<=b &&... |
d0d63b68897f3bb7ac14e195b85e313bd2e7a12c | 71ac2953d4e73bbc463eb00ae38db840915e0f10 | simonecid/cmssw | /L1TriggerOffline/L1Analyzer/src/BSCTrigger.cc | C++ | cc | 9,317 | permissive | // -*- C++ -*-
//
// Package: BSCTrigger
// Class: BSCTrigger
//
/**\class BSCTrigger BSCTrigger.cc L1TriggerOffline/BSCTriggerSimulation/src/BSCTrigger.cc
Description: <one line class summary>
Implementation:
<Notes on implementation>
*/
//
// Original Author: Muriel VANDER DONCKT *:0
// Created: ... |
f3848e0ddf05fb558618f3463c4a3e983ec32c4c | 85f21d5a29b4653585228f85eafd1570eda8bb38 | SOFTK2765/PS | /BOJ/3028.cpp | C++ | cpp | 509 | no_license | #include <bits/stdc++.h>
using namespace std;
char a[51];
bool cup[3] = {true, false, false};
void swap(bool *a, bool *b)
{
bool tmp;
tmp = *a;
*a = *b;
*b = tmp;
return;
}
int main()
{
scanf("%s", a);
int l = strlen(a);
for(int i=0;i<l;i++)
{
if(a[i]=='A') swap(&cup[0], ... |
8be8129fc18e227a6756fec0dfaac1d16af4ea8e | e738ece466116337b5acac393c7daff0f855066a | jesuscraf/peopletech | /cpp/m4presentation/src/component.cpp | C++ | cpp | 114,515 | no_license |
//==============================================================================
//
// (c) Copyright 1991-1997 Meta Software M.S., S.A
// All rights reserved.
//
// File: Component.cpp
// Project: Service presentation
// Author: Meta Software M.S. , S.A
// Language: C++
// Opera... |
121a0123097561b9ccfd599ec7106b4c32d6005d | 21742b395ba78ab7d1c1e16794b793b2f3a93921 | paucoma/fotografix | /Fotografix/FillDialog.cpp | C++ | cpp | 1,044 | permissive | // FillDialog.cpp : implementation file
//
#include "stdafx.h"
#include "Fotografix.h"
#include "FillDialog.h"
// CFillDialog dialog
IMPLEMENT_DYNAMIC(CFillDialog, CDialog)
CFillDialog::CFillDialog(CWnd* pParent /*=NULL*/)
: CDialog(CFillDialog::IDD, pParent)
, colour(0)
, opacity(100)
{
CWinApp *app = AfxGetAp... |
b1644d738cf551ea8695e77125083a3715af3d30 | b474e5010329da28512cbaa9249c9097567c5e54 | lipeiyuuuuuu/PTA- | /PTA code/7-5编程打印空心字母菱形.cpp | C++ | cpp | 1,727 | no_license | /*7 - 5 编程打印空心字符菱形 (10 分)
本题目要求读入菱形起始字母和菱形的高度,然后输出空心字符菱形。
所谓“空心菱形”是指:每行由两端为字母、中间为空格的字符串构成,
每行的字符串中心对齐;上半部分相邻两行字符串长度差2,
且字母从给定的起始字母逐一递增;下半部分与上半部分对称。
输入格式 :输入在一行中给出起始字母(范围为英文大写字母A - G)
和菱形的高度(为不超过10的奇数)。输出格式 :输出空心字符菱形。
输入样例 :B 5输出样例 :
B
C C
D D
C C
B
*/
/*
#define _CRT_SECURE_NO_WARNINGS
#in... |
eb3363b23879e15b377ff6c167e1a5c8ed84ab1e | cbb009e62806584fb4bb00bf1ba461477e214dc0 | ulricheza/Isima | /zz2/Simulation/tp4/Simu_SMA/simulator.cpp | C++ | cpp | 8,145 | no_license | /**
* \file Simulator.h
* \brief fichier d'implementation de la classe Simulator
* \author Maxime ESCOURBIAC Jean-Christophe SEPTIER
* \date 7 fevrier 2011
* \version 1.0
*
*/
#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include "agent.h"
#include "arme.h"
#include "humain.h... |
0aa7db07451ade26352d019e3817424a0926b794 | 4ab4d5e4b01ecae1f80e8ece53355b106d720bf5 | viticm/plainframework | /pf/core/src/basic/util.cc | C++ | cc | 6,535 | permissive | #include "pf/basic/string.h"
#include "pf/sys/assert.h"
#include "pf/basic/util.h" //无论如何都是用全路径
namespace pf_basic {
namespace util {
char ascii_table[] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', 'A', 'B', 'C', 'D', 'E', 'F'
};
char value_toascii(char in) {
char out =
0 < in && sizeof(ascii_ta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.