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 |
|---|---|---|---|---|---|---|---|---|
af403b8911a9e44cffcb18be9030d8061dd14cff | d976d3ebcf0666459e1c3ca887918af081f9e319 | livingbody/Paddle-Lite | /lite/kernels/cuda/softmax_compute_test.cc | C++ | cc | 6,305 | permissive | // Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
647276d39b07014e62d39d7cbcd45b2cbb737b4f | 5cb40467658db70251c5cb80f5fb76665075b703 | Bocity/ACM | /vjudge/HDU/2544/13132242_WA_0ms_0kB.cpp | C++ | cpp | 1,259 | no_license | #include <iostream>
#include <functional>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <functional>
using namespace std;
#define MAX 0x3f3f3f3f
int main()
{
int dis [101] = {0} ;
int vis [101] = {0} ;
//init
int n, k;
while (cin >> n >> k && (n || k))
{
//从1开始计数
vec... |
d8302066752966b4ac878e2e0be430ea022e90dd | 1562c0203a24c249860253e0714466483bb46ea6 | thegamer1907/Code_Analysis | /contest/1542502084.cpp | C++ | cpp | 495 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long lol;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
string pass;
int n;
cin>>pass>>n;
vector<string>v(n);
for(int i=0;i<n;i++){cin>>v[i]; if(v[i]==pass){cout<<"YES"; return 0;}}
for(int i=0;i<n;i++){
if(... |
a7eecef0cdff730f475cd5b0ddc9f51fc48704eb | 15350e4123227d061b872fcdcc1b0c0a19fbeb34 | Tretjak/Schoolwork | /sfmlalex/Main.cpp | C++ | cpp | 888 | no_license | #include <SFML/Graphics.hpp>
#include <iostream>
#include <string>
int main()
{
std::string tobias;
int mousex=0;
int mousey=0;
sf::RenderWindow window(sf::VideoMode(1024, 768), "Button");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
shape.setPosition(sf::Vector2f(800... |
8fdcea572142dac2e73ee34cbb57ebcd457ba1cf | fcb858eb8a03674f56b1fa0c15fb10af1b49e567 | iyashu/Competitive-Programming | /Spoj/NITT2.cpp | C++ | cpp | 2,412 | no_license | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll ar[10],len;
char st[60000];
ll H[] = {1,3,2,-1,-3,-2};
bool divisibleBy1()
{
return true;
}
bool divisibleBy2()
{
ll temp = st[len-1]-48;
if(temp&1)return false;
return true;
}
bool divisibleBy3()
{
ll sum = 0;
for(ll i=0;i<l... |
d6be055987b06536455fb016cc9c2099a0e0ce97 | 5d6e0f848e3f9fd468ff8fcb3244b26262de934a | jimzer/6clop | /src/hitables/sphere.hpp | C++ | hpp | 464 | no_license | #ifndef SPHEREH
#define SPHEREH
#include "core/cyclop.hpp"
#include "core/hitable.hpp"
#include "core/transform.hpp"
namespace hitable {
class Sphere : public Hitable {
public:
Float radius;
transform::Transform objWorld;
transform::Transform worldObj;
Sphere(const transform::Transform &t, const Float &r);... |
052a844d95913af236670550803b0587c540e322 | 3b4d427278b22610df51853803f1631635e61490 | xionggithub/leetcode | /algorithms/cpp/257_binaryTreePaths.cpp | C++ | cpp | 736 | no_license | #include <iostream>
#include <vector>
#include <string>
using namespace std;
struct TreeNode{
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x): val(x), left(NULL), right(NULL) {}
};
void binaryTreePaths(vector<string>& paths, TreeNode* root, string path)
{
if (root->left == NULL && root->right == NULL)... |
b4221aee435a62aa1a76b7d03e6484134c6ad917 | 02e262c59184cb205b384d99418ab7b4266189f3 | HannahJHan/BlueNoiseSampling | /wei-noise-master/10-RainbowNoise/src/Library/Random.cpp | C++ | cpp | 1,396 | permissive | /*
Random.cpp
Li-Yi Wei
06/28/2007
*/
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "Random.hpp"
#include "Math.hpp"
// Li-Yi: this is not working yet.... 07/07/2007
#define _WIN32_USE_RAND48
#ifdef WIN32
#ifdef _WIN32_USE_RAND48
extern "C" {
void srand48(long seed);
double drand48(void);... |
f40a31277db38b4ea185910725ed0529bd4a31cd | 60546a2e55209ccc3c7b37334731540b50e0fcb0 | saraffa13/c- | /B_Running_for_Gold.cpp | C++ | cpp | 1,650 | no_license | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define ll long long
#define ld long double
ll compare(ll arr[][6],ll count3,ll i ,ll j)
{
ll count1 = 0, count2 = 0, l = 0, m = 0;
for... |
0240abc15d12da7219a18041a025e1e945b14dba | 06ebe3f6a216c51f06b7e4fba9728643083a615a | chxj1980/FuZhou-AnalyseCheckpoint | /XSProxyServer/NTservice.cpp | C++ | cpp | 17,893 | no_license | // NTService.cpp
#pragma once
#include "stdafx.h"
#include "NTService.h"
#include "ProxyServer.h"
#include <shellapi.h>
#pragma warning (disable:4800)
CNTService* CNTService::m_pThis = NULL;
CProxyServer g_ProxyServer;
CNTService::CNTService(const char* szServiceName)
{
// copy the address of the current objec... |
4a7463c6e7932e760c0e1caedcdcb6b4fd376c23 | 6451e233ea0aa7b087194154e839274311349fe7 | Alacrity17/darklight | /Darklight Premium/utilities/memory.cpp | C++ | cpp | 2,333 | permissive | #include "memory.h"
// used: logging
#include "logging.h"
std::uintptr_t MEM::FindPattern(const char* szModuleName, const char* szPattern)
{
static auto PatternByte = [](const char* szPattern) -> std::vector<int>
{
std::vector<int> vecBytes{ };
char* chStart = (char*)szPattern;
char* chEnd = (char*)szPattern ... |
121c80c1e129914ea339cf50688a1fb974919de0 | f84856bb38b277aeec432d732a5584ce4018f9a4 | akhikolla/RcppDeepStateTest | /issuestests/seismicRoll/inst/testfiles/roll_mean_numeric_vector/AFL_roll_mean_numeric_vector/roll_mean_numeric_vector_DeepState_TestHarness.cpp | C++ | cpp | 2,313 | no_license | // AUTOMATICALLY GENERATED BY RCPPDEEPSTATE PLEASE DO NOT EDIT BY HAND, INSTEAD EDIT
// roll_mean_numeric_vector_DeepState_TestHarness_generation.cpp and roll_mean_numeric_vector_DeepState_TestHarness_checks.cpp
#include <fstream>
#include <ctime>
#include <RInside.h>
#include <iostream>
#include <RcppDeepState.h>
#in... |
bec768e173ee16d18cf2f0f30324fb24e99b3c0b | 0c4d67e856452e68b57a041c281b7018cb496f71 | rvincke/zedboard-trd | /software/xsdk/filter_lib/src/opencv_sobel.cpp | C++ | cpp | 6,156 | no_license | /***************************************************************************
* © Copyright 2013 Xilinx, Inc. All rights reserved.
* This file contains confidential and proprietary information of Xilinx,
* Inc. and is protected under U.S. and international copyright and other
* intellectual property laws.
*... |
d0e5d78280e630520529e788bd688b38ed2edcb5 | 80a56a47cfd846c37eece4f0dcdcb34e3e0f1681 | tianyangche/leetcode-1 | /PascalsTriangleII/getRow.cpp | C++ | cpp | 526 | no_license | class Solution {
public:
vector<int> getRow(int rowIndex) {
vector<int> prev;
prev.push_back(1);
for (int row = 0; row < rowIndex; row++) {
vector<int> curr;
vector<int>::size_type size = prev.size();
for (vector<int>::size_type i = 0; i < size; i++) {
if... |
2a600cb72e0a5d905174d8c89594b2404830b063 | 2afd67f3604d5b15f9b320b2f101a3be8c99bbbf | Mrd278/Codeforces_Java | /CandiesAndTwoSisters.cpp | C++ | cpp | 328 | no_license | #include<iostream>
using namespace std;
#define ll long long
int main()
{
ll a, b, t, n;
cin>>t;
while(t--)
{
cin>>n;
if(n == 1 || n == 2)
cout<<"0"<<'\n';
else if(n%2 == 0)
cout<< n/2 -1<<'\n';
else
cout<<n/2<<'\n';
}
retu... |
6e1efe6a56635b106d5f8c9f71b986f69e3f00d1 | 7bdcf9d2ae5182e1b7be443e109f2ddb25d6dd2f | xzlinux/fuchsia | /garnet/bin/run_test_component/test/run_test_component_test.cc | C++ | cc | 18,124 | permissive | // Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <fuchsia/debugdata/cpp/fidl.h>
#include <fuchsia/process/cpp/fidl.h>
#include <fuchsia/sys/cpp/fidl.h>
#include <lib/async-loop/cpp/loop.h>
#inclu... |
87ac96f4ad88844fed007ec9a6c0c05b7203cb14 | c74d0127dc89545a252d42f7fb8148d63916d7fc | MichaelJL3/Arduino | /sketch_oct01a/ControlledServo.hpp | C++ | hpp | 333 | no_license |
#ifndef CONTROLLEDSERVO_HPP
#define CONTROLLEDSERVO_HPP
#include <Servo.h>
class ControlledServo : public Servo {
short pos;
public:
const static short MAXPOS = 180;
const static short MINPOS = 0;
ControlledServo();
ControlledServo(const short p);
void move(const short n);
void position(const short n)... |
b494b1f56b0527abe6ef3279edef23d4f8338468 | 21d34d73818488cf7c6928995b98787354ba9ac9 | switchey321/XSEngine | /XSEngine/Primitives/Square.cpp | C++ | cpp | 1,366 | no_license | #include "../Primitives.hpp"
Square::Square(int x1, int y1, int lenght, int color, bool fill) {
this->x1 = x1;
this->y1 = y1;
this->width = lenght;
this->x2 = x1 + lenght;
this->y2 = y1 + lenght;
this->color = color;
this->fill = fill;
}
Square::Square(int x1, int y1, int lenght, int r, int g, int b, bool fill... |
59c04c1f8bf6956bc8689476590815e51768ecb1 | 60fe81173ed831c911847c2506796901e1151cfa | Arryboom/LeagueAPI | /include/lol/def/LolHonorV2Reward.hpp | C++ | hpp | 453 | permissive | #pragma once
#include "../base_def.hpp"
namespace lol {
struct LolHonorV2Reward {
std::string rewardType;
int32_t quantity;
};
inline void to_json(json& j, const LolHonorV2Reward& v) {
j["rewardType"] = v.rewardType;
j["quantity"] = v.quantity;
}
inline void from_json(const json& j, LolHo... |
b60596f8a26f4f64a078a3d68e827b2cf7584f5c | 0e597ded16a6048daa9b79df5739b0aa9c58a0f3 | ardmn/escher | /escher/renderer/framebuffer.cc | C++ | cc | 2,358 | permissive | // Copyright 2016 The Fuchsia 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 "escher/renderer/framebuffer.h"
#include "escher/impl/escher_impl.h"
#include "escher/impl/vulkan_utils.h"
#include "escher/renderer/image.h"
na... |
0033716844c672098854c6f661825555f85ab4dd | b64e9465fc2f7eb1655e278947e8f0636934d1c7 | brightclark/slang | /tests/unittests/PortTests.cpp | C++ | cpp | 17,671 | permissive | #include "Test.h"
#include "slang/compilation/Definition.h"
TEST_CASE("Module ANSI ports") {
auto tree = SyntaxTree::fromText(R"(
module mh0 (wire x); endmodule
module mh1 (integer x); endmodule
module mh2 (inout integer x); endmodule
module mh3 ([5:0] x); endmodule
module mh4 (var x); endmodule
module mh5 (input... |
8f6230b450090eb2fcd167f98ba4d8c42239b349 | af9b6563ee2d9c170c08305c9543437c949df0b1 | wwwwodddd/Zukunft | /PE/156.cpp | C++ | cpp | 819 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll F(ll n, int x) { // < n contains how many x
n++;
ll t = 1, z = 0;
while (t < n) {
z += n / 10 / t * t;
if (n / t % 10 > x) {
z += t;
} else if (n / t % 10 == x) {
z += n % t;
}
t *= 10;
}
n--;
return z - n;
}
ll FF(ll n, int x... |
64c52a4c0c6800b82c13f69707df156ec50145f9 | 98e3bc325cb2c2771fecf113a7b13d186324fb36 | IEEE-NPD/vespa | /eval/src/vespa/eval/eval/simple_tensor.cpp | C++ | cpp | 26,468 | permissive | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "simple_tensor.h"
#include "simple_tensor_engine.h"
#include "operation.h"
#include <vespa/vespalib/util/overload.h>
#include <vespa/vespalib/util/visit_ranges.h>
#include <vespa/vespalib/obj... |
652104e803e3209355579850f970fc2e266a03e9 | 126d5b57c380404a62f85a338d6c0bba220aeec4 | GXhua/puno | /.libs/puno_automatic_generated/inc/types/com/sun/star/sdbcx/XDrop.hpp | C++ | hpp | 1,250 | no_license | #ifndef INCLUDED_COM_SUN_STAR_SDBCX_XDROP_HPP
#define INCLUDED_COM_SUN_STAR_SDBCX_XDROP_HPP
#include "sal/config.h"
#include "com/sun/star/sdbcx/XDrop.hdl"
#include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "r... |
9b947c804ead8e7a3e260958b2c6918ab92283cf | ef90289e8ccb9ff282e74a50e4398edafd6d5d08 | urzq/NACRe | /src/shader/ShaderProgramManager.cpp | C++ | cpp | 757 | permissive | #include "ShaderProgram.h"
#include "ShaderProgramManager.h"
ShaderProgramManager::ShaderProgramManager()
{
}
ShaderProgramManager::~ShaderProgramManager()
{
for (auto& entry : m_ShaderPrograms)
{
delete entry.second;
}
}
ShaderProgram* ShaderProgramManager::GetShaderProgram(const std::string& vertex_file_path... |
a2ae444f8398a9167d4985a7abdbd05732ad228a | 56fbf5b73ac23b5ee91f1c5c3b6ac8eb1451440a | HJLebbink/Spike-Izhi | /VS/Spike-Izhikevich-LIB/v4/SpikeEpspContainer4.hpp | C++ | hpp | 3,639 | permissive | // The MIT License (MIT)
//
// Copyright (c) 2017 Henk-Jan Lebbink
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to us... |
6068d5c48ff02e0016b71824645269c701c4e3e5 | d7e4e00aa5e49977eb83b105e60b67c119b6f218 | zH4x/SpellBreak-FULL-SDK | /SDK/SB_BP_WeaponActor_Earth_Tier_3_parameters.hpp | C++ | hpp | 397 | no_license | #pragma once
// SpellBreak By Respecter (0.15.340) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SB_BP_WeaponActor_Earth_Tier_3_classes.hpp"
namespace SpellSDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------... |
a162c7a09155a7c590605e834a0ed1426a5b5ad4 | 4386c29431691b29404882bd19fc6021cf058c8f | Vxider/ClickHouse | /src/Interpreters/ProfileEventsExt.cpp | C++ | cpp | 1,291 | permissive | #include "ProfileEventsExt.h"
#include <Common/typeid_cast.h>
#include <Columns/ColumnsNumber.h>
#include <Columns/ColumnString.h>
#include <Columns/ColumnArray.h>
#include <Columns/ColumnMap.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeString.h>
#include <DataTypes/DataTypeArray.h>
namespace ... |
d5e76aca0351879d4096b75a22bbea896bdd4531 | 6601979c6344805f14227d3cb495f25873c948ee | SergiiPiatakov/TemplateSnippets | /013_main.cpp | C++ | cpp | 793 | no_license | // Class template inheritance.
// Compile and run:
// $ g++ -Wall -Wextra 013_main.cpp -std=c++11 -o 013_main
// $ ./013_main
#include <iostream>
#include <vector>
template <typename T>
struct Animal
{
virtual void Say () = 0;
};
template <typename T>
struct Dog : Animal <T>
{
void Say () override {std::cou... |
b3b694b2da1f98c984310e1573a2ec942efda68b | 9cff35a7abd755ac16a7e87e3dc32ef6acdce8de | EgorBo/runtime-1 | /src/coreclr/src/vm/assemblyspec.hpp | C++ | hpp | 17,026 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/*============================================================
**
** Header: AssemblySpec.hpp
**
** Purpose: Implem... |
5d59a5a7ebb892d082bc22b11eff4681d46f47ab | ea691d99d4f47988d21859cd61c34b163fb3d764 | JetAr/ZDoc | /code/Windows-classic-samples/Samples/Win7Samples/multimedia/DirectWrite/FontEnumeration/FontEnumeration.cpp | C++ | cpp | 3,723 | permissive | /************************************************************************
* This file is part of the Microsoft Windows SDK Code Samples.
*
* Copyright (C) Microsoft Corporation. All rights reserved.
*
* This source code is intended only as a supplement to Microsoft
* Development Tools and/or on-line documenta... |
759493ec398be4c35daecdf8efbfcbfeb68be71c | c5dd2c936c2624c5785f78375581aba2c9248ccc | ArneStenkrona/Prototype | /Prototype/src/GameObject/Component/gameplay/weapon.cpp | C++ | cpp | 3,528 | permissive | #include "weapon.h"
#include "System\graphics\textureManager.h"
#include "System\IO\inputManager.h"
#include "GameObject\Prefabrications\prefabrications.h"
#include "System\Physics\physicsEngine.h"
#include "GameObject\objectPool.h"
#include "System\sound\soundManager.h"
#include "movement.h"
Weapon::Weapon(GameObject... |
7ec945313bab57f9ba640846309787d92c334630 | 0c0c61397e2f7d98154e0737a3fcd0edc2a92a05 | alex3fx/qmlbattlecity | /source/game.cpp | C++ | cpp | 21,569 | no_license | #include <Qt>
#include <QFile>
#include <QSound>
#include "game.h"
Game::Game(QObject *parent)
: m_parent(parent)
, m_objectCounter(10000000)
, m_controlKey(Qt::Key_unknown)
, m_loopCounter(0)
, m_lifesCounter(3)
, m_fragsCounter(0)
, m_maxFragsCount(20)
, m_canMove(true)
, m_lastP... |
b35aac1fc3866c29f8ab1e1f694c498273db2043 | 0e84b0b3f1ebf5851a6dc30cc924dd80659effc8 | shz0116/pytorch | /torch/csrc/jit/passes/python_print.cpp | C++ | cpp | 50,071 | permissive | #include <torch/csrc/jit/passes/python_print.h>
#include <ATen/core/qualified_name.h>
#include <c10/util/Exception.h>
#include <c10/util/StringUtil.h>
#include <torch/csrc/jit/attributes.h>
#include <torch/csrc/jit/ir.h>
#include <torch/csrc/jit/ir_views.h>
#include <torch/csrc/jit/resource_guard.h>
#include <torch/csr... |
d99caa4b776c0247a7d119b3811e2ee44b34ee75 | 14283afdb487576f66d7273f6e7eccf39aeb6c96 | zenotech/VTK | /Filters/AMR/Testing/Cxx/TestAMRGhostLayerStripping.cxx | C++ | cxx | 16,646 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: TestAMRGhostLayerStripping.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
Thi... |
48fa77d8bf67e879c57f6f3d3c0cc5afe3d6b915 | 24275860348421df639047a10866d19c45387bcf | FranciOrtiz/jutge_problems | /P92845_ca_Billar__1_.cc | C++ | cc | 3,063 | no_license | #include <iostream>
#include <vector>
using namespace std;
void printm (vector <vector <int> > &v) {
for (int i=0; i < v.size(); i++) {
for (int j=0; j < v[i].size(); j++) {
if (j!=0) cout << ' ';
if (v[i][j]!=-1) cout << ' ';
cout << v[i][j];
}
cout << e... |
1537617d11444bc6f6930d6f913497ac92b6c404 | da95fb2d33616eb667e2d8561786c2fca3616a0b | WaiwaiTAN/matrix_theory_project | /mtcp_1&2/mtcp_1and2/main.cpp | C++ | cpp | 720 | no_license | #include "JordanForm.h"
#include "uSimilar.h"
#include <string>
void presse_demo(project_base & proj)
{
std::string cmd;
std::cout << "intput command to run a demo.\ncommand 'std' means input in std stream.\ncommand 'rand' means run a random demo\ncommand 'quit' means quit\n";
while (true)
{
std::cout << ">> ";... |
c3eb0ed2a39d57f8d0513aff1d22fa5433b516c9 | b5a27d3851139a2a910e3d428b51884da23a767c | ucsb-seclab/difuze | /InterfaceHandlers/MainAnalysisPasses/RangeAnalysis/src/RangeAnalysis.cpp | C++ | cpp | 108,354 | permissive | //===-------------------------- RangeAnalysis.cpp -------------------------===//
//===----- Performs a range analysis of the variables of the function -----===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for detail... |
30dbdcdc70f172357fa3b334f0277a7ddcf334af | 4fdb74361880dce1d1904267ba0be85b0cfe129f | kcat/twokinds | /src/terrain/terraingrid.hpp | C++ | hpp | 2,768 | no_license | #ifndef COMPONENTS_TERRAIN_TERRAINGRID_H
#define COMPONENTS_TERRAIN_TERRAINGRID_H
#if 0
#include "world.hpp"
#include "material.hpp"
namespace Terrain
{
class Chunk;
struct GridElement
{
Ogre::SceneNode* mSceneNode;
Terrain::MaterialGenerator mMaterialGenerator;
Terrain::Chunk* ... |
ab27c9d53ae7c42f54427c122a03aaa294144d3a | e6a2234735b80ca3ad964bc89de97659cc676297 | jtleek/ballgown | /tablemaker/tablemaker-2.1.1/src/genes.cpp | C++ | cpp | 3,636 | permissive | /*
* genes.cpp
* cufflinks
*
* Created by Cole Trapnell on 8/23/09.
* Copyright 2009 Cole Trapnell. All rights reserved.
*
*/
#include <boost/thread.hpp>
#include "genes.h"
using namespace boost;
#if ENABLE_THREADS
mutex gene_id_lock;
#endif
int next_isoform_id = 1;
int get_next_isoform_id()
{
#if ENABLE... |
e1b877ba09055272eb3b51bb95b45a18d80bcc20 | 62eab72b57785ade2d2156f96051f484111038bf | SimVascular/SimVascular | /Code/Source/sv4gui/Plugins/org.sv.gui.qt.mitksegmentation/sv4gui_QmitkSegmentationPreferencePage.cxx | C++ | cxx | 8,813 | permissive | /* Copyright (c) Stanford University, The Regents of the University of
* California, and others.
*
* All Rights Reserved.
*
* See Copyright-SimVascular.txt for additional details.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated doc... |
5794790267401d9a39e5bdb8b857b36a7ab6cb67 | 3354264f6d500233fe17ce3fa87764626f4f19d5 | Samsung/Castanets | /components/invalidation/impl/invalidator_registrar_with_memory.cc | C++ | cc | 5,042 | 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 "components/invalidation/impl/invalidator_registrar_with_memory.h"
#include <cstddef>
#include <iterator>
#include <string>
#include <utility>
... |
3674cf4238d86059cb951ac7be2992e4e73ab589 | 9d7ab2b8a01efa6e723fb24266b038b662d3cb3f | jahid-coder/competitive-programming | /AtCoder/abc174/B.cpp | C++ | cpp | 1,080 | permissive | #pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("trapv")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds... |
8a262363fc4057403ea676b3f4e6a41d9ca3f19a | ba512bbbf55c17aa2cc0b7ac6654fe6870e6fbb3 | dragonxu/proview | /xtt/lib/ge/gtk/ge_curve_gtk.cpp | C++ | cpp | 55,353 | no_license | /*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* 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... |
a3e5241ddf2761bca760a6cb600c89b85390a324 | 166e7884d7b1db444667b782542d5969266d5bdb | gura-lang/gura | /src/lib/Class_dict.cpp | C++ | cpp | 21,187 | no_license | //=============================================================================
// Gura class: dict
//=============================================================================
#include "stdafx.h"
namespace Gura {
static const char *helpDoc_en = R"**(
# Overview
The `dict` class provides measures to handle dictio... |
cda1b8f9ebb4633ee2dffbfa11974edf664ef1ba | 48bac0a4cf1ea8229086e569ce005b308615881c | lcx1249445475/rtc | /src/test/peer_scenario/sdp_callbacks.cc | C++ | cc | 1,922 | permissive | /*
* Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All con... |
8517da20701cd5d7915373a81852499e9a00c35e | 691d98056ccabd7d48994faf3d34591ee759c463 | roshanreji92/Projects | /Principles of Networking/Assignment 3/PNET LAB-3/model/my-pnet-mac.cc | C++ | cc | 4,531 | no_license | #include "ns3/uinteger.h"
#include "ns3/event-id.h"
#include "ns3/assert.h"
#include "ns3/packet.h"
#include "ns3/simulator.h"
#include "ns3/log.h"
#include "ns3/node.h"
#include "my-pnet-mac.h"
#include "pnet-phy.h"
#include "my-pnet-phy.h"
#include "ns3/packet.h"
#include "ns3/simulator.h"
#include "ns3/nstime.h"
#in... |
beba5723a75e9947f6f3578a1abebab5a09885a1 | e7da0f617cabfeab112fdedac7c18974a26f6a79 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-ssm/source/model/ListComplianceSummariesResult.cpp | C++ | cpp | 1,725 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/ListComplianceSummariesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <... |
3b001035cc60ea30bdf57c5e33122ac3ccce054e | 46d5efed7919cc1b45e931aaaf97d36da89f999d | nriviere/Pathogen | /SpawnLine.cpp | C++ | cpp | 650 | no_license | #include "SpawnLine.h"
#include "Level.h"
SpawnLine::SpawnLine(Level *level)
{
this->level = level;
}
SpawnLine::~SpawnLine()
{
}
void SpawnLine::addSpawnPool(SpawnPool *spawnPool)
{
spawnPools.push_back(spawnPool);
}
void SpawnLine::update()
{
if (spawnPools.size() != 0)
{
if (spawnPools.front()->isEmpty())... |
817b99580e100abab9e0a25071b4f9ee2f7b7aa3 | f5000642128648426817a36ee5646b3d8ec98edb | terrymah/Euchre | /ai/randombot.cpp | C++ | cpp | 1,609 | no_license | #include <vector>
#include "RandomBot.h"
#include "../EuchreGame.h"
void RandomBot::Order(EuchreGame& g)
{
// Order 25% of the time
if(gen() % 4 == 0)
{
g.OrderUp(gen() % 10 == 0);
}
else
{
try
{
g.Pass();
}
catch(const IllegalOperation&)
... |
9cc7e0c4e71e227c2aced8edceb44ae929087182 | 56db4950fbd4bcda92e603eed7b06852d0861750 | kirillPshenychnyi/AEP | /vlog_data_model/ih/writable/vlog_dm_concatenation.hpp | C++ | hpp | 1,011 | no_license | #ifndef __VLOG_DM_WRITABLE_CONCATENATION_HPP__
#define __VLOG_DM_WRITABLE_CONCATENATION_HPP__
/***************************************************************************/
#include "vlog_data_model\api\vlog_dm_fwd.hpp"
#include "vlog_data_model\api\vlog_dm_concatenation.hpp"
/***************************************... |
c8820ef6e8387f24e616de9bed348557556b65cc | 73063be358cdd60076c2d5c7fed0557272a3e83c | Raphine/Raph_Kernel | /source/kernel/net/eth.cc | C++ | cc | 2,118 | no_license | /*
*
* Copyright (c) 2016 Raphine Project
*
* 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 later version.
*
* This program is... |
7237691f03351ba36dc5cb6df1bb7dd39c326a22 | c2951f6461cbe8a372f0323aca98cfc448c715e0 | mk13579/algorithm | /Tree_Isomorphism.cpp | C++ | cpp | 1,331 | no_license | #include<bits/stdc++.h>
using namespace std;
const int N = 55;
const int inf = 1000000009;
int head[N]={0};
int nex[N]={0};
int V[N]={0};
int f[N]={0};
int num[N]={0};
int tot=0;
int mx=inf;
int n=0;
string h[N];
string q[N];
void add(int a,int b){
tot++;
nex[tot]=head[a];V[tot]=b;
head[a]=tot;
}
int find(int rt,int... |
47d6b7de465d97576e2f5687781122fd8a98a49d | 2558915b9c5365416179ada699b3eed0611c5173 | pverdile/chromium | /components/autofill/core/common/autofill_features.cc | C++ | cc | 12,437 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/autofill/core/common/autofill_features.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/metrics/field... |
273fd70c13ddb1f89e0e86f772fae05d9a8ab4d6 | fff7fa8479c2ad976ae091c8b476baea6e533c5e | SFNCY/imguiTree | /src/imgui/examples/example_sdl_opengl2/main.cpp | C++ | cpp | 6,981 | no_license | // dear imgui: standalone example application for SDL2 + OpenGL
// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// **DO NOT USE THIS CODE ... |
3ddbd2c1f690db122d052cc8a5e447f8244ed700 | 0944c1dc9b063663e5395984f2363c1d8384fab8 | SherlockThang/sidecar | /Messages/VMEHeader.cc | C++ | cc | 1,880 | permissive | #include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <time.h>
#include "VMEHeader.h"
using namespace SideCar::Messages;
ACE_InputCDR&
VMEHeader::load(ACE_InputCDR& cdr)
{
cdr >> msgSize;
cdr >> msgDesc;
cdr >> timeStamp;
cdr >> azimuth;
cdr >> pri;
cdr >> temp1;
... |
6e2c268476f2083b04689bae060ae74bdcddf5bf | 70bd1dcacf3206d0c40417a74b083a5540acc6e3 | MadCatDestiny/Multithreaded-server | /server.cpp | C++ | cpp | 2,288 | permissive | #include <iostream>
#include <thread>
#include <mutex>
#include <ctime>
#include <map>
#include <vector>
#include "data.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
using namespace std;
bool add(int client);
//bool send_info(int client);
void listen_ip(size_t ip ,size_t port );
void client... |
71c85fc25fbfc57694a655116e1909c05805ada0 | 94ace9d4de77d001ed83c6c7695c98469c48f0ac | zhuqiweigit/cpp_primer | /ch10/ex10_30.cpp | C++ | cpp | 399 | no_license | #include <numeric>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <list>
#include <fstream>
using namespace std;
int main(){
vector<int> vec;
istream_iterator<int> in(cin), eof;
copy(in, eof, back_inserter(vec));
sort(vec.begin(), vec.end());... |
ace1382189e7240a6236bb4be29285191bb0bf43 | a614eece9646b5904caa39f2f598f5a6a60da7b2 | wangfeilong321/OpenEaagles | /src/otw/OtwCigiClV2.cpp | C++ | cpp | 96,789 | no_license |
#define CIGI_LITTLE_ENDIAN
// disable all deprecation warnings for now, until we fix
// they are quite annoying to see over and over again...
#if(_MSC_VER>=1400) // VC8+
# pragma warning(disable: 4996)
#endif
#include "openeaagles/otw/OtwCigiClV2.h"
#include "openeaagles/simulation/AirVehicle.h"
#include "openeaa... |
3b617882bff0eae9f528dc9398f11041c59e0631 | 46b54ebce94a3f14559246a87a131ddb3072d543 | luciodra/amiga-fryingpan.app | /ISOBuilder/Xlators/Translator.cpp | C++ | cpp | 1,357 | no_license | /*
* FryingPan - Amiga CD/DVD Recording Software (User Intnerface and supporting Libraries only)
* Copyright (C) 2001-2011 Tomasz Wiszkowski Tomasz.Wiszkowski at gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as p... |
8cf45a80fee7eb3175b60aece0a805c632dfd2f2 | 296ed7ee8ededf636b84cb2ee34c3c61a90d2acf | shiro0005/HEW- | /player_hp.cpp | C++ | cpp | 885 | no_license | #include "player.h"
#include "sprite.h"
#include "texture.h"
#include "game.h"
#include "Hp_table.h"
static PLAYER player;
#define HP_WIDTH (298)
#define HP_HEIGHT (298)
void Hp_Initialize(void)
{
player = GetPlayer();
}
void Hp_Finalize(void)
{
}
void Hp_Update(void)
{
player = GetPlayer();
}
void Hp_Draw(vo... |
48b5e5cbc5da5579b82dadb7b70280d1fcfb779f | efc366a73ba9b7aea46de3cbb662e52b76ac7c6b | akhikolla/TestedPackages-NoIssues | /lfl/inst/testfiles/hedge/libFuzzer_hedge/hedge_DeepState_TestHarness.cpp | C++ | cpp | 1,410 | no_license | // AUTOMATICALLY GENERATED BY RCPPDEEPSTATE PLEASE DO NOT EDIT BY HAND, INSTEAD EDIT
// hedge_DeepState_TestHarness_generation.cpp and hedge_DeepState_TestHarness_checks.cpp
#include <fstream>
#include <RInside.h>
#include <iostream>
#include <RcppDeepState.h>
#include <qs.h>
#include <DeepState.hpp>
NumericVector he... |
3f847571cc1ffb1240a26f0a71de5e35a28b10d8 | 3c81edee26265efbde543596e1ce40db083259b0 | low10high10/ThreadsLibrary | /test13.cc | C++ | cc | 10,532 | no_license | #include "thread.h"
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <vector>
#include <map>
#include <queue>
using namespace std;
int postedItems;
int sandLock;
//unsigned int hasPosted;
int boardSize;
int numberCashiers;
int MaxNumberCashiers;
int cashNum = 0;
unsigned int isFull = 10;
unsigned int... |
c9c5752e5171ebe8e1bac71e0ae12d1a7c60aae8 | 27c7e5dd734afcc8be1c5e711d2b87b843d8c8cb | KIT-ISAS/iviz | /iviz/Assets/MarkerDetection/Plugins/iOS/iviz_opencv.framework/PrivateHeaders/dictionary.hpp | C++ | hpp | 7,018 | permissive | /*
By downloading, copying, installing or using the software you agree to this
license. If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement
For Open Source Computer Vision Library
(3-clause BSD Licens... |
94b314a60e0a1cab8e37f8f68d03f5347379e955 | 8aac3b860c44d952207e564ecdf01386f52c7f42 | GabrielM97/Snake | /Snake/MAIN.CPP | C++ | cpp | 688 | no_license | /*
Circle Drawing start code for Practical 10
*/
#include "WORLD.H"
#include <iostream>
#include <vector>
#include <stdlib.h>
#include <time.h>
using namespace std;
int main()
{
// Seed the random
bool reset = true;
bool start =true;
while(reset)
{
cout<<"in main"<<endl;
Wo... |
dfc7f3653f8df1a042addf0f01cbacfc9d025172 | fcd7ec06f56dbcba7eadcd93eae9f943968ddcdf | angel-utn/laboratorio2-20202c | /Clase 07/Archivo/ui.cpp | C++ | cpp | 1,709 | no_license | #include <iostream>
using namespace std;
#include <cstring>
#include "ui.h"
#include "rlutil.h"
using namespace rlutil;
void initUI() {
/*system("mode con: cols=80 lines=25");
SetConsoleOutputCP(1252);
SetConsoleCP(1252);
setlocale(LC_ALL, "spanish");
*/
}
void setColors(int foreColor, int ba... |
eebb47d34f2de0835c7194a04ac6ee1c0e43f2e4 | 864c0509fa9eb8e17728c4cfed26ef9557986fa9 | Yelloooowww/nctu-self-driving-cars-course | /mid/catkin_ws/src/localization_309605008/src/icp_locolization3.cpp | C++ | cpp | 9,219 | no_license | #include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <ros/package.h>
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <sensor_msgs/PointCloud2.h>
#include <tf2/LinearMath/Matrix3x3.h>
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/filters/passthrough.h>
#include <pc... |
492a4c82f02022077c6aa81d8049713a863d0315 | fcf59fe6a16cb097c1d480acaee2d94e0aa96166 | fengjixuchui/urltraveler | /src/Utility/tinyxml/tinyxml.cpp | C++ | cpp | 37,000 | no_license | /*
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permissio... |
ac7e68f8ea5d17c725b69c8dda6e21a0a3406cf1 | 7a82ed1604f5962c06881cfb49b5db993738919d | shayan18/chromium | /chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc | C++ | cc | 28,239 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/api/language_settings_private/language_settings_private_api.h"
#include <algorithm>
#include <map>
#include <memory>
... |
5a3deddbcb082894e54ff207ceb0f7c8440e816e | 15c867c371be157809aa6e61c1babd75eb233b4c | ruoxianSun/nestpp | /RectangleBinPack/SkylineBinPack.cpp | C++ | cpp | 11,403 | no_license | /** @file SkylineBinPack.cpp
@author Jukka Jylänki
@brief Implements different bin packer algorithms that use the SKYLINE data structure.
This work is released to Public Domain, do whatever you want with it.
*/
#include <algorithm>
#include <utility>
#include <iostream>
#include <limits>
#include <cassert>
#inclu... |
a0a4e337f3b6fe309a9300406ca14635cb3a26a9 | 62b04921ff275e2a11a4cab57330e705543383f4 | avallete/CPPool | /J05/ex04/Bureaucrat.hpp | C++ | hpp | 1,435 | no_license | #ifndef BUREAUCRAT_HPP
#define BUREAUCRAT_HPP
#include <iostream>
#include <string>
#include "Form.hpp"
class Bureaucrat
{
public:
Bureaucrat(void);
Bureaucrat(std::string, int);
Bureaucrat(Bureaucrat const &);
~Bureaucrat(void);
std::string& getName(void) const;
int getGrade(void) const;
void incGrade(voi... |
076b9a80eb06815480e368313393318d571258c8 | 47c9ab4b3e34e1c0c722c1e3cfbbb29c7a779e53 | Elojah/ft_gkrellm | /src/modules/CPUInfo.cpp | C++ | cpp | 1,869 | no_license | #include "CPUInfo.hpp"
#include <mach/mach_init.h>
#include <mach/mach_error.h>
#include <mach/mach_host.h>
#include <mach/vm_map.h>
#include <iostream>
CPUInfo::CPUInfo(void) {
_data.title = "CPU info";
_data.h = 15;
_data.w = 50;
_data.y = 7;
_data.x = 52;
_data.type = 1;
}
CPUInfo::CPUInfo(CPUInfo const &src... |
9f072cd12d8e7dee56322c504f5dee66d0aa2dec | a4dc931767a9c1d69e0cdd34b8e35de5b8bf4778 | soxar/soxar | /src/clientversion.cpp | C++ | cpp | 3,765 | permissive | // Copyright (c) 2012-2014 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 "clientversion.h"
#include "tinyformat.h"
#include <string>
/**
* Name of client reported in the 'version' messa... |
b58730993f004be97227d0955f10baa4caedd0d1 | 55664cf79f93aa10370d89f136f0722a6dc95b52 | byte4byte/cloudretro | /net/url_request/url_request_job_factory_impl_unittest.cc | C++ | cc | 3,606 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/url_request/url_request_job_factory_impl.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/memory/weak_ptr.h"
#includ... |
b547e530a7eb9250ffb2720fec1dc2ab28c7b751 | d03c45897d0ec709dcb6f5dfa222f5faf1ea8592 | chobits/tengine | /modules/mod_dubbo/utils/objects.cc | C++ | cc | 13,212 | permissive | #include "objects.h"
#include "utils.h"
#include "hessian2_output.h"
#include <sstream>
/*
* Object implementation
* @author jifeng
*/
namespace hessian {
using namespace std;
/*
* maybe not init, cannot use on init
*/
const string Boolean::DEFAULT_CLASSNAME("boolean");
const string Integer::DEFAULT_CLASSNAME("... |
dabf6c5d09c607bde17f45335c3ea883f4ddb3a9 | 6b4e1bab22a9306bbfd9d63cc30e2a0b430b205f | pdpdds/cgsf2019 | /Sample/ServerConnector/DatabaseServerCallback.cpp | C++ | cpp | 274 | no_license | #include "stdafx.h"
#include "DatabaseServerCallback.h"
DatabaseServerCallback::DatabaseServerCallback()
{
}
DatabaseServerCallback::~DatabaseServerCallback()
{
}
bool DatabaseServerCallback::HandleNetworkMessage(BasePacket* pPacket)
{
return true;
}
|
c3cc4dc98b08d1058c36bebcef3040c56fb148c2 | 403d82a1cd8436cbb126d34e2656383f25e39599 | ICEJM1020/MeetingSpy | /code/MeetingSpy/src/DataAnalyse.cpp | C++ | cpp | 5,517 | permissive | #include "DataAnalyse.h"
DataAnalyse::DataAnalyse()
{
mlpack::data::Load(MODEL_FOLDER + "RFModel.xml", "RFModel", clf_rf);
mlpack::data::Load(MODEL_FOLDER + "AdadsModel.xml", "AdadsModel", clf_ada);
}
DataAnalyse::~DataAnalyse()
{
}
std::string DataAnalyse::load_data()
{
std::string msg = "";
bool loaded = ml... |
8d8b660d40957a3ed4e05a53fde3ab010936e527 | e4e20a0ce8ec5a1d9f7e3e8c8a594a4df1fa75ca | testcoins/test | /src/qt/addressbookpage.cpp | C++ | cpp | 12,977 | permissive | // Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "addressbookpage.h"
#include "ui_addressbookpage.h"
#include "addresstablemodel.h"
#include "optionsmodel.h"
#includ... |
34fd7db32c0d163254ade90855a67091d8e15328 | 4f7af8b3bf490e4cea43e646f0889311ed5254d2 | trsquarelab/csscene | /src/scene/rfrustumitem.cpp | C++ | cpp | 1,363 | no_license |
#include "rfrustumitem.h"
namespace chikkooos
{
void RFrustumItem::draw(RGc & gc) const
{
RFrustum of = gc.frustum();
gc.setFrustum(mFrustum);
RItem::draw(gc);
gc.setFrustum(of);
}
RItem * RFrustumItem::clone()
{
return new RFrustumItem(*this);
}
void RFrustumItem::setProperties(RPropertyMap... |
5e6c42b09642ca9a0584e79862b478f4c9a2b057 | 93db73e1769945e944ad35d2a591d60c4a7a32b6 | welcome2hell25/GCG | /src/qt/rpcconsole.cpp | C++ | cpp | 16,997 | permissive | #include "rpcconsole.h"
#include "ui_rpcconsole.h"
#include "clientmodel.h"
#include "bitcoinrpc.h"
#include "guiutil.h"
#include "dialogwindowflags.h"
#include <QTime>
#include <QTimer>
#include <QThread>
#include <QTextEdit>
#include <QKeyEvent>
#include <QUrl>
#include <QScrollBar>
#include <openssl/crypto.h>
#in... |
8dcdb88de3e909a604299570cd0837c621f662a5 | 60c8e75f346fe5cd5817b130e9226cc4741beccb | madildev/Gym-Management-System | /GymHalls.cpp | C++ | cpp | 3,466 | no_license | #include"GymHalls.h"
GymHalls::GymHalls()
{
for (int i = 0; i < 10; i++)
{
GymId[i] = 0;
GymName[i] = " ";
}
}
GymHalls::GymHalls(int id, string name)
{
for (int i = 0; i < 10; i++)
{
GymId[i] = id;
GymName[i] = name;
break;
}
};
int* GymHalls::GetGymId()
{
int id[10];
for (int i... |
1d4f5cbed1b57426a2d99ac3d229a933c711267a | a7d77b60d15fd4348ee2e7b63f2cc01d245d848d | pluciro/VCSamples | /VC2010Samples/MFC/ole/TstCon/TypeAttr.Cpp | C++ | cpp | 2,294 | permissive | // File: TypeAttr.Cpp
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Classes Reference and related electronic
// documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft C+... |
cd2e1ef2f3aad3d75058768247aecbbb338c7a7b | 5b958b23d68e120157ea8080d15c6a7cf46a1525 | codefreak77/algo | /cpp/STL/priority_queue.cpp | C++ | cpp | 410 | no_license | #include <iostream>
#include <queue>
#include <iterator>
using namespace std;
void show_queue(priority_queue <int> g)
{
cout << "\n";
while(!g.empty()) {
cout << "top element: " << g.top() << "\n";
g.pop();
}
}
int main()
{
//cout << "Hello world \n";
priority_queue <int> gqueue;
... |
6701ebe3dd50380397648d9466d20363fed0e5b2 | 31824a5f31b44fc2b5d5846bde4cb85b585f8b07 | Soplia/Codes | /JfF/CODE-JfF-B/Devcpp/dev/优先级队列排序数组的实现方法.cpp | C++ | cpp | 465 | no_license | #include <iostream>
#include <iomanip>
using namespace std;
int remove(int *array,int count)
{
int pos=0;
int max=*array;
for(int i=0;i<count;i++)
if(max>*(array+i))
{
pos=i;
max=array[i];
break;
}
array[pos]=array[count-1];
return max;
}
int main()
{
int arr[]={5,4,3,2,1};
in... |
721bb21d8d49dfb6a427f390c58d415cb2b07504 | df0400c2af41f5e525961f6723eb10538298fbad | davidkm2/globalmetin | /source/client/source/eterGrnLib/LODController.cpp | C++ | cpp | 16,930 | no_license | #include "StdAfx.h"
#include "LODController.h"
static float LODHEIGHT_ACTOR = 500.0f;
static float LODDISTANCE_ACTOR = 5000.0f;
static float LODDISTANCE_BUILDING = 25000.0f;
static const float c_fNearLodScale = 3.0f;
static const float c_fFarLodScale = 25.0f;
static const float LOD_APPLY_MAX = 2000.0f;
st... |
32738754373da4f32eae32244b051bd5dcc0d6c7 | 27df52732f10f37e412f5c78a612fe28c7fb76f2 | shen13203708051/learn-cpp | /opencv-mat-learn/main.cpp | C++ | cpp | 3,933 | no_license | #include<iostream>
#include<opencv2/core.hpp>
#include<opencv2/highgui.hpp>
#include<ctime>
#include<cstdlib>
#include<cmath>
#include<iomanip>
#include"myFunction.h"
using namespace std;
using namespace cv;
int main(int argc,char* argv[])
{
cout << setiosflags(ios::left)<< setiosflags(ios::fixed)<< setprecision(2);/... |
917e2512d60cb3163afc2cf2e84b91fad43faedb | e9b83125695d76089e3e9740d7857481ed6ef76e | gmonacho/Vik_Wrap | /src/Exception.cpp | C++ | cpp | 1,598 | permissive | /*
Copyright (c) 2019 Gael Monachon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... |
2c9c83de042160c67e14fe5e9578316063a9f506 | 2457068402b421dddc13812d3e5367156ee14583 | yyhaos/Competitions | /zby_solo/2018CCPC吉林赛区(重现赛)- 感谢北华大学/c.cpp | C++ | cpp | 3,015 | no_license | //Problem Web:http://acm.hdu.edu.cn/contests/contest_show.php?cid=867
#include<bits/stdc++.h>
#include<ext/rope>
#include<iostream>
#include<stack>
#include<vector>
#include<queue>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;
#define ll long long
#define lowbit(x) (x&-x)
#define rep(i,x,y... |
e5168877d56e3a91af94889df3b0107a46dfac67 | eb06099976ed659a102c065d092b321776a4fa36 | cash2one/XStudio | /master/xgcBase/Common/ini.cpp | C++ | cpp | 11,838 | no_license | #include <mbstring.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <io.h>
#include "ini.h"
namespace XGC
{
namespace common
{
xgc_bool IniFile::Load( xgc_lpcstr lpFilePath )
{
return Load( lpFilePath, "" );
}
///
/// 加载Ini文件
/// [8/11/2014] create by albert.xu
///
xgc_bool IniFile::Load( xgc... |
4495772357a875cc1486bc89ef56dedaeddb0594 | 84265ef2e797daf3766498bab47cdc13304bd1e6 | aisenn/CPP_Piscine | /d03/ex01/ScavTrap.hpp | C++ | hpp | 1,081 | no_license | #ifndef SCAVTRAP_HPP
# define SCAVTRAP_HPP
# include <iostream>
# include <time.h>
class ScavTrap
{
private:
int _hitPoints;
int _maxHitPoints;
int _energy;
int _maxEnergy;
int _level;
std::string _name;
int _meleeAttackDamage;
int _rangedAttackDamage;
int _armorDamageReduction;
public:
ScavTra... |
521f4a94d19ada43dbca1dc50f55b09dcbd44021 | 0e01ab944a3c728207aa48a6efb79aa949c998c9 | yuenanchen/c_language | /多项式求和.cpp | C++ | cpp | 354 | no_license | #include<stdio.h>
#include<math.h>
double fact(int b)
{
int i,result=1;
for(i=1;i<=b;i++)
result=result*i;
return result;
}
int main()
{
int x,i,sum=0;
while(scanf("%d",&x)!=EOF)
{
for(i=1;i>0;i++)
{
if(abs(pow(x,i)/fact(i))<0.00001)
{break;}
sum=sum+(pow(x,i))/(fact(i));
}... |
c84486162be6334db2677d4ab80443ac25fd901c | 317fe6f3b701eb581e0f63f7972b5ebd98427a4f | ivanchenko-m-v/filesystem_info | /dir_csv_exporter.cpp | C++ | cpp | 4,696 | no_license | /// $Header
/// ============================================================================
/// Author : M. Ivanchenko
/// Date create : 08-03-2017
/// Date update : 11-03-2017
/// Comment :
/// ============================================================================
#include <QDir>
#include <QFile>
#include... |
6631365fccb4c109486069a0a30f0d0242ebe706 | 71de8ce846ac2013f19e4bc1bfd76ca3db551a07 | andongfan/oicode | /3538.cpp | C++ | cpp | 1,201 | no_license | #include<iostream>
#include<cstring>
using namespace std;
struct node{int to,nx,val;}edge[50005];
int cnt=0,h[50005]={0},n,k,m,st,ed,rej[105][105]={0},cil[1005]={0},vis[1005]={0},ans=0x7f7f7f7f,fl=0,opp[1005]={0};
void Add(int x,int y,int z)
{edge[++cnt].to=y,edge[cnt].nx=h[x],h[x]=cnt,edge[cnt].val=z;}
void DFS... |
9573001f9497fb29ec25a0b4921e0fca2ad98a81 | 4e094f59ebc8f87cd62618ae1199673a22ad5259 | krdipen/Floating-Point-Addition | /2018CS50098/Processor.cpp | C++ | cpp | 3,710 | no_license | #include<fstream>
#include<sstream>
#include<math.h>
using namespace std;
int main(){
ifstream infile;
infile.open("input.txt");
ofstream outfile;
outfile.open("output.txt");
string str;
while(getline(infile,str)){
start://I will start reading the number from here
istringstream... |
ea85b9285c8fb1aa23a84221ad171132206a035a | 6344f6f4ab38aef3cb5e5e7b667be12c87ca723d | CraneOfClubs/cg_course_clone | /Filters/settingwidget.cpp | C++ | cpp | 6,734 | no_license | #include "settingwidget.h"
#include <QMessageBox>
SettingWidget::SettingWidget(QWidget *parent) : QWidget(parent)
{
}
SettingWidget::SettingWidget(QWidget *parent, int32_t size_x, int32_t size_y) : QWidget(parent)
{
this->setGeometry(50, 400, size_x, size_y);
setMouseTracking(true);
firstControlName ... |
3bc1ba246e0f2c4911f6bafded20a2cd0180ca24 | 94684e54066365565595ec7dd6c97bbdde3b9711 | cuadrosjb/Chapter4AVLTree | /AvlTree_Test/avlTreeUnittest.cpp | C++ | cpp | 2,099 | no_license | #include "stdafx.h"
#include "CppUnitTest.h"
#include <iostream>
#include <string>
#include "AVLTree.h"
#include "AVLTree.cpp"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace AvlTree_Test
{
class StringCompare
{
public:
bool less(const std::string &lhs, const std::string &rhs) const
{... |
7fa7fe9b9bcdf75b0006927e32d08862d41f6a6b | bfad9051df4cf8b02ad9be45cfe8f546cca6a396 | saikpr/short_codes | /cpp/dynamic_programming_and_similar/min_path_sum_array_optimised.cpp | C++ | cpp | 1,159 | no_license | /*input
3 3
1 2 3
4 5 6
7 8 9
*/
#include <iostream>
#include <stack>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
#include <unordered_map>
#define MAXN 100
using namespace std;
int minPathSum(vector<vector<int>>& grid) {
int sum = 0 ;
int m = grid.size();
i... |
4ab7ec6cfc339559c09d7ced897134e33c8f77fa | 8dc5bc661ec7d25649e3682bf02f002b48b345be | ChinguunU/APT-assignment-2-qwirkle-console-game | /Qwerkle/src/LinkedList.cpp | C++ | cpp | 3,042 | no_license | #include "LinkedList.h"
LinkedList::LinkedList()
{
head = nullptr;
tail = nullptr;
length = 0;
}
LinkedList::~LinkedList()
{
clear();
}
int LinkedList::size()
{
return length;
}
void LinkedList::clear()
{
Node *tmp;
while (head != nullptr)
{
tmp = head;
head = head->next;
d... |
03f062c5045229c8a502bc003b5ebe15c5717659 | 1278a34f116e39c8c665ff7e314bc8a2905724cf | gstarkman/cwru-pat-cosmic_topology | /T3-correlations/eigenbasis_sph_T3.cpp | C++ | cpp | 41,331 | no_license | #include "EigBase.hpp"
#include <iostream>
std::complex<double> imu(0.0, 1.0); //imaginary unit
/**==============================__Wave-Vectors__===================================**/
/// some notation:
/// KEI -> Ith fundamental domain's wave-vector
/// KEI_NJ -> N = J solution
/// inputs:
/// nvec: 3-vector of ele... |
ce34e26f43140ddce0e023fae933b8bc0af23d5b | f3e46745b88b9ecebc4705c61cdb5de0b54b5a2e | AnaWhatever16/thesis_visionfordrone | /scripts/vision_examples/mainTemplMatch.cpp | C++ | cpp | 753 | no_license | #include <opencv2/highgui.hpp>
#include <iostream>
#include <realsense/RealSenseCamera.h>
#include <vision/TemplateMatching.h>
#include <Eigen/Eigen>
int main(int _argc, char **_argv){
RealSenseCamera realSenseCamera(RealSenseCamera::RS_TYPE::D435);
TemplateMatching templateMatching(_argv[1]);
cv::Mat f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.