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 |
|---|---|---|---|---|---|---|---|---|
6cea279ffe7474aca1c7e3e25b9f07eaf8c868ef | 4b053a1c7eef632a4c24467f8b144247da713094 | DottieDot/gta5-additional-nativedb-data | /usages/0xF9096193DF1F99D4.cpp | C++ | cpp | 352 | no_license | // am_mp_arcade_claw_crane.ysc @ L732
void func_29()
{
struct<10> Var0;
Var0.f_8 = func_31(Local_206.f_93);
Var0 = 521268843;
Var0.f_2 = 1;
Var0.f_6 = MISC::ABSI(NETWORK::GET_TIME_DIFFERENCE(NETWORK::GET_NETWORK_TIME(), Local_206.f_100));
if (func_30(PLAYER::PLAYER_ID()))
{
Var0.f_9 = 1;
}
STAT... |
1755d0c407bc8b69d36860b55fb4b0ddbad99287 | a294d24e05615eefb46cd94cbfdff3b1215117d4 | flylong0204/osgProjs | /PROJECT/PhysX-3.3/PhysXSDK/Snippets/SnippetSerialization/SnippetSerialization.cpp | C++ | cpp | 10,667 | no_license | /*
* Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
* and any modifications thereto. Any use, reproduction, disclosure or
* distribution of this so... |
f98619469133c9c1a89875f3cbcd9bcb3446aa3d | 722681028b04515f0ba469e5e353b477a9e5f802 | PollockCR/School | /CS302-Data-Structures/PA02-L7/storesim.cpp | C++ | cpp | 2,687 | no_license | //--------------------------------------------------------------------
//
// Laboratory 7, Programming Exercise 1 storesim.cs
//
// Program implementation shell.
//
//--------------------------------------------------------------------
// Simulates the flow of customers through a line in a store.
... |
989d506336bc76a41fbee58e1389c2ccb52b1c98 | b64c106390157d8970e4b93ba31298ad54cde1dc | TheMindVirus/opengl32-skeleton | /opengl32.cxx | C++ | cxx | 1,201 | permissive | #define _OPENGL32_CXX_
#include "opengl32.hxx"
BOOL APIENTRY DllMain
(
HMODULE hModule,
DWORD dwReason,
LPVOID lpReserved
)
{
switch (dwReason)
{
case (DLL_PROCESS_ATTACH): { debug("[INFO]: DLL_PROCESS_ATTACH"); } break;
case (DLL_THREAD_ATTACH): { debug("[INFO]: DLL_THRE... |
ffc385d9fb3b083dfb6a17670d985c1207acb3d5 | c85ac69bfd10b8c4c23df4d38d5827ddda0e3516 | KqSMea8/sstd_library | /sstd_boost/sstd/boost/fiber/fixedsize_stack.hpp | C++ | hpp | 801 | permissive |
// Copyright Oliver Kowalke 2014.
// 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)
#ifndef BOOST_FIBERS_FIXEDSIZE_STACK_H
#define BOOST_FIBERS_FIXEDSIZE_STACK_H
#include <sstd/boost/config... |
013e8da3bbaf6f5ae0bda22e894855bd5d9bd84f | d8789c2ca6ab80a636d5695ebb41b9af9ef137fb | xeecos/upm | /src/mma7660/mma7660.cxx | C++ | cxx | 6,071 | permissive | /*
* Author: Jon Trulson <jtrulson@ics.com>
* Copyright (c) 2015 Intel Corporation.
*
* 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 limitatio... |
6d014426051ba912d63323c923543d535cbadb4f | 233cb99feb626ededa3982ec6d6332bd94e23d88 | freebsd/freebsd-ports-haskell | /www/iridium/files/patch-media_capture_video_linux_video__capture__device__factory__linux.cc | C++ | cc | 1,868 | permissive | --- media/capture/video/linux/video_capture_device_factory_linux.cc.orig 2022-03-28 18:11:04 UTC
+++ media/capture/video/linux/video_capture_device_factory_linux.cc
@@ -72,6 +72,9 @@ class DevVideoFilePathsDeviceProvider
: public VideoCaptureDeviceFactoryLinux::DeviceProvider {
public:
void GetDeviceIds(std::... |
e67279db4b046bf58690628a584f959bebf16d31 | 327f676be3402737517364a4ac1549b40ab61ad6 | satoruhiga/ofxPostProcessing | /src/NoiseWarpPass.cpp | C++ | cpp | 7,846 | no_license | /*
* NoiseWarpPass.cpp
*
* Copyright (c) 2013, Neil Mendoza, http://www.neilmendoza.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code m... |
a20000f962d674da28f06bd2aad0f5686245c933 | 5413ec365bb045403a501e4018552cd8bbba4ae5 | Turno/chromium | /chrome/browser/ui/app_list/search/arc/arc_app_shortcut_search_result.cc | C++ | cc | 4,521 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/app_list/search/arc/arc_app_shortcut_search_result.h"
#include <string>
#include <utility>
#include "ash/public/cpp/app_list... |
9c5b81a837de951870b9e8a0a9092278a6a3470f | dc95a54a4131a12251385af30963182744f15ff6 | y0sshi/vdma | /zybo_z720/zynq_PS/rootfs/lib/libvdma/include/slab/video/ScuGicInterruptController.hpp | C++ | hpp | 2,246 | no_license | /*
* IInterruptController.h
*
* Created on: May 27, 2016
* Author: Elod
*/
#ifndef IINTERRUPTCONTROLLER_H_
#define IINTERRUPTCONTROLLER_H_
#include <stdexcept>
#include <slab/bsp/xscugic.h>
#define STRINGIZE(x) STRINGIZE2(x)
#define STRINGIZE2(x) #x
#define LINE_STRING STRINGIZE(__LINE__)... |
9e4f2c8b6a4cf9c1427e68b0f302f27ee48d16c0 | 8ea0300a563f35649713fbbdff127568e36bc45e | mdmosley1/SFND_Unscented_Kalman_Filter | /src/main.cpp | C++ | cpp | 1,660 | no_license | /* \author Aaron Brown */
// Create simple 3d highway enviroment using PCL
// for exploring self-driving car sensors
//#include "render/render.h"
#include "highway.h"
int main(int argc, char** argv)
{
std::cout << "Running main!" << "\n";
pcl::visualization::PCLVisualizer::Ptr viewer(new pcl::visualization::P... |
51327f044e2c6b8fe7dc06cbe9ba08d05af39503 | e93ec40de099c7be63c48d337b4225bcb93ba665 | ellery85/sparselizard | /src/expression/operation/opsin.cpp | C++ | cpp | 2,632 | permissive | #include "opsin.h"
std::vector<std::vector<densematrix>> opsin::interpolate(elementselector& elemselect, std::vector<double>& evaluationcoordinates, expression* meshdeform)
{
// Get the value from the universe if available and reuse is enabled:
if (reuse && universe::isreuseallowed)
{
int precompu... |
7f5540a0fe74150cf40fd8b3b4e238c732fc9226 | 48d642ced18abcfd690d9c4286930916d91a1fe2 | TomislavBak/QTAssigments | /Zadaca6_1/stedac.cpp | C++ | cpp | 707 | no_license | #include<iostream>
#include"covek.h"
#include"stedac.h"
int Stedac::brojStedaci = 0;
float Stedac::kamata = 0.3;
Stedac::Stedac(char *podat,int sostojba):covek(podat){
/* ime = new char[strlen(Ime) + 1];
prezime = new char[strlen(Prezime) + 1];
adresa = new char[strlen(Adresa) + 1];
broj =... |
93df1490fdc362f56bd0a91f68f29418c8f62515 | 3e3401a3f97e4a788087babbbecd23aa3ce4d461 | stardog-union/boost | /libs/algorithm/test/transform_inclusive_scan_test.cpp | C++ | cpp | 9,535 | permissive | /*
Copyright (c) Marshall Clow 2017.
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)
For more information, see http://www.boost.org
*/
#include <vector>
#include <functional>
#include <numeric>
... |
efe34c51623fa9b27f1678acb9d445f450073b0e | 499286cae3919e07bd256d6fa73d239315aa1a74 | alekseygrud/qudexpay | /src/masternode-payments.cpp | C++ | cpp | 29,473 | permissive | // Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2018 The QDP developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "masternode-payments.h"
#i... |
607cc1b0891465bfb610e7da51d7969e68925733 | c7782c21dba9946576f80ed0b77b7627f7dbf1bd | 99Kies/python-sdk | /cython_tassl_wrap/cpp_linux/tassl_sock_wrap.cpp | C++ | cpp | 16,280 | permissive | /*
This lib is a tls client for FISCO BCOS2.0 (https://github.com/FISCO-BCOS/)
This lib is free software: you can redistribute it and/or modify it under the
terms of the MIT License as published by the Free Software Foundation. This project is
distributed in the hope that it will be useful, but WITHOUT ANY WARR... |
37d270e544cfa13919f3aba81365a85f35b4b2e2 | b810868c55003ec09eedfc0bb3b111184972409a | rpatil524/irods | /server/api/src/rsDataObjClose.cpp | C++ | cpp | 30,311 | permissive | #include "apiNumber.h"
#include "dataObjClose.h"
#include "dataObjLock.h"
#include "dataObjOpr.hpp"
#include "dataObjRepl.h"
#include "dataObjTrim.h"
#include "dataObjUnlink.h"
#include "fileClose.h"
#include "fileStat.h"
#include "getRescQuota.h"
#include "key_value_proxy.hpp"
#include "miscServerFunct.hpp"
#include "... |
345f52c688e9d4870541aa8b816f701270a08387 | 77c060fd0f61b1e8b127b417308f507e1ee2e430 | coxchris502/chromium | /chrome/browser/chromeos/chrome_browser_main_chromeos.cc | C++ | cc | 54,534 | permissive | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
#include <stddef.h>
#include <string>
#include <utility>
#include <vector>
#inclu... |
4c09be7bf99e99d54ede6baba559dd03e51db39c | 11cb828392a95399f0f317e2488e96a986cf8e0a | Vimarsh-Koul/Leet_Code | /random_node.cpp | C++ | cpp | 1,733 | no_license | // CPP program to Select a Random Node from a tree
#include <bits/stdc++.h>
using namespace std;
struct Node {
int data;
int children;
Node *left, *right;
};
Node* newNode(int data)
{
Node *temp = new Node;
temp->data = data;
temp->left = temp->right = NULL;
temp->children = 0;
return temp;
}
... |
f6de09e469871f41691aca97cd5da020d06c5f62 | d092e83d627ce6e97ac8afcc47825e3d98774e33 | krzysztofszczurek/TasmaProdukcyjna | /Produkt.cpp | C++ | cpp | 1,229 | no_license | //
// Produkt.cpp
// Projekt ostateczny
//
// Created by Jacek Stankiewicz on 02.06.2017.
// Copyright © 2017 DziuCoilJaca. All rights reserved.
//
#include "Produkt.hpp"
float Produkt::losujWartosc(float min, float max)
{
float zmienna;
zmienna = (rand() % int(max)) + min;
return zmienna;
}... |
c8b11cf7116f5dda096278a2cb9087316759e0e7 | 62457e6704ad2c68dcaac18bc2667282784df194 | lhbemt/learn_opengl | /Application/DrawTriangle.cpp | C++ | cpp | 2,229 | no_license | #include "DrawTriangle.h"
void DrawTriangle::initBuffer()
{
glGenBuffers(1, &vbo); // 生成一个顶点缓冲对象 vbo 缓冲对象类型有很多 下一步设置为array类型
glGenVertexArrays(1, &vao); // 生成一个vao 用来保存顶点属性解释 我们一个程序可以有很多vao 代表不同的顶点属性解释方法 只需要绑定到相应的顶点上就可以对buffer做正确的解释
glBindVertexArray(vao); // 表示我们的程序的顶点属性应该按照它来解释 就是上面的glVertexAttribPointer这行。
glBi... |
040340ca3332de30ea669df3c48c22869817c07a | 9024d70011eccc13e83dd8cb9c0c944c0b88dd06 | abrother94/IntelRSD2.4 | /PSME/agent/fpga-of/discovery/src/discovery_manager.cpp | C++ | cpp | 7,150 | permissive | /*!
* @brief FPGA-oF discoverer interface.
*
* @copyright Copyright (c) 2018-2019 Intel Corporation.
*
* 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/LICE... |
52244a7ae3383612a545829dbd3d64d102779ed8 | 9af9c4b9188c1d6a58443ea8dc2d2f2edc960086 | ledgerc/Something | /ACM/OJ/HDU3045.cpp | C++ | cpp | 1,681 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<cmath>
#include<queue>
#include<map>
#include<vector>
#include<set>
#include<stack>
#include<cctype>
#define sc(x) scanf("%d",&x);
#define PR(x) cout<<#x<<": "<<x<<endl;
using namespace std;
typedef long long ll;
typedef... |
ff43f70cc023198212b466cabeb926e4ea81d60a | e715c02d0d2cb01e0430a2396b4706074c423780 | CromwellEnage/concept | /include/boost/concept/traits/query/is_ublas_matrix_expression.hpp | C++ | hpp | 6,535 | permissive | // Copyright (C) 2013-2017 Cromwell D. Enage
// 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)
#ifndef BOOST_CONCEPT_TRAITS_QUERY_IS_UBLAS_MATRIX_EXPRESSION_HPP
#define BOOST_CONCEPT_TRAITS_QUERY_IS_UBLAS_MATRIX_E... |
8c715020ce2e1560ef052e553b4fdfa997b42140 | 3612d0842b562a6019ad7b5acdd26d6e1f27c14c | strigazi/athena | /PhysicsAnalysis/TopPhys/xAOD/TopFakes/Root/TopFakesMMWeightCalculator.cxx | C++ | cxx | 39,006 | permissive | /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
//////////////////////////////////////////////////////////////////////
//
// Author :
// Timothée Theveneaux-Pelzer
// Creation :
// Purpose : helper to be used in analyses
//
// Updated :
// 2016-01-29 : FD:... |
8e6d227fb94d3c3942dc49c00666208ab0f4489e | e00a5e425bd60951a01d5d1d2b836937edd96e45 | jcowles/effects-salad | /fx/grassIntro.cpp | C++ | cpp | 8,082 | no_license | #include "grassIntro.h"
#include "common/programs.h"
#include "common/demoContext.h"
#include "noise/perlin.h"
#include "glm/core/func_geometric.hpp"
#include <cstdlib>
void GrassIntro::Init()
{
Perlin noise(2, .1, 2, 0);
name = "GrassIntro";
Effect::Init();
Programs& progs = Programs::GetInstance()... |
3756643fc16f0a635f08bb047f91f760c57b5335 | 681d291d7e42e8bad800f9bc139159b35d59110d | Pandinosaurus/OTB | /Modules/Core/Metadata/src/otbMetadataSupplierInterface.cxx | C++ | cxx | 1,443 | permissive | /*
* Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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 ... |
defb7ae2b178622b53317eae080a1c820dd9a80f | e1910fa99c5c90d0ba27a9de7823468290dafe09 | Diptendu28/myCprogram | /Binary search of a number by its position.cpp | C++ | cpp | 477 | no_license | /* binary search of a number by its position */
#include<stdio.h>
int main()
{
int a[10],i,s,start,end,mid,f=0;
for(i=0;i<10;i++)
{
printf("enter no");
scanf("%d",&a[i]);
}
printf("enter no to search");
scanf("%d",&s);
start=0;
end=9;
while(start<=end)
{
mid=(start+end)/2;
if(s==a[mid])
{
printf(... |
89863e4f646e711745e2092d9708d773a8a30259 | c6e138fb26c61a6750331ea1db1259a9b7bb00c4 | kisstheu/samples | /cplusplus/level2_simple_inference/1_classification/resnet50_async_imagenet_classification/src/model_process.cpp | C++ | cpp | 11,812 | permissive | /**
* @file model_process.cpp
*
* Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include "model_process.... |
42be138713706bc227324212366ca7120cad3bff | df6a23f5f752d98bf2a47c987671da3f49ee09e7 | ach-group/VHS | /src/qt/vhsstrings.cpp | C++ | cpp | 27,941 | permissive |
#include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *vhs_strings[] = {
QT_TRANSLATE_NOOP("vhs-core", ""
"(1 = keep tx meta data e.g. account owner and payment request information, 2 "
"= drop ... |
26136f6c58e18e46e9f99c9a655793f3844e1732 | cdee17d10c1ebf2a1513ed1022eb344145dbfc75 | YamadaTsuyoshi/SterConnect | /SimplSample021/BaseCrossDx11/Scene.cpp | C++ | cpp | 3,447 | no_license | /*!
@file Scene.cpp
@brief シーンなど実体
*/
#include "stdafx.h"
#include "Project.h"
namespace basecross {
//--------------------------------------------------------------------------------------
/// ステージ(シーンで管理するインターフェイス)
//--------------------------------------------------------------------------------------
//追加オブジ... |
383311802de1e83c773008773858b8e35a3c9753 | d9553e56a2ecf9bd24a085f4e6ee5e8c57edc922 | DangZhonghua/CodingPractice | /LeetCode/MedimumLevel/Wiggle Sort II.cpp | C++ | cpp | 3,388 | no_license | /*
https://leetcode-cn.com/problems/wiggle-sort-ii/
Wiggle Sort II
Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]....
Example 1:
Input: nums = [1, 5, 1, 1, 6, 4]
Output: One possible answer is [1, 4, 1, 5, 1, 6].
Example 2:
Input: nums = [1, 3, 2, 2, 3, 1]
Output: One possible... |
6a5e629ab73fa6e980c161ba19fe9a0be4c1db58 | 2552f2a8702e685b654edd5b1b98e79540b0bf7b | jjchromik/hilti-104-total | /hilti/codegen/coercer.cc | C++ | cc | 5,929 | permissive |
#include "../hilti.h"
#include "codegen.h"
#include "coercer.h"
using namespace hilti;
using namespace codegen;
codegen::Coercer::Coercer(CodeGen* cg)
: CGVisitor<llvm::Value*, llvm::Value*, shared_ptr<hilti::Type>>(cg, "codegen::Coercer")
{
}
codegen::Coercer::~Coercer()
{
}
llvm::Value* codegen::Coercer::ll... |
8b27f84ec7cd44b2de30af4cb651d33ef897a940 | a617b9fb1d948340d25853252be79fdd08fe0438 | kolinwei/Paddle | /paddle/fluid/operators/cross_entropy_op.cc | C++ | cc | 15,005 | permissive | /* Copyright (c) 2016 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 by applicable law or... |
95709ad56a15272f573924b7f2632f8a809955db | faf39080836a47f664def18be3025593561bc39c | romualdo97/parallel_computing_studies | /001_gpu_programming_model_II/code_vs_v14_2015/002_hello_opencv/main2.cpp | C++ | cpp | 1,263 | no_license | #include <opencv2\core.hpp>
#include <opencv2\imgcodecs.hpp>
#include <opencv2\highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
// unlinked opencv_calib3d331d.lib
// unlinked opencv_features2d331d.lib
int main(int argc, char** argv)
{
/*if (argc != 2)
{
cout << "Usage 002_hello_opencv.exe ... |
504040a4febd68e01827df5fe54e825c2cf65db4 | 55fc7db19f0a46e1cd192f7b9f721af93b75dc0a | Jackson1992/CLAIMS | /common/Block/DynamicBlockBuffer.cpp | C++ | cpp | 2,270 | no_license | /*
* DynamicBlockBuffer.cpp
*
* Created on: Dec 20, 2013
* Author: wangli
*/
#include "DynamicBlockBuffer.h"
//#include <assert.h>
#include "BlockStream.h"
DynamicBlockBuffer::DynamicBlockBuffer() {
// TODO Auto-generated constructor stub
}
DynamicBlockBuffer::DynamicBlockBuffer(const DynamicBlockBuffe... |
0d8df64cc3f9f918ee841157b98290ccdbba743d | b76c5c6bc854aaa21ad68a47a96b1ee040a06a4c | Hengle/UDX12 | /src/core/Device.cpp | C++ | cpp | 1,184 | permissive | #include <UDX12/Device.h>
#include <UDX12/Desc.h>
using namespace Ubpa;
void UDX12::Device::CreateCommittedResource(
D3D12_HEAP_TYPE heap_type,
SIZE_T size,
ID3D12Resource** resources)
{
ThrowIfFailed(raw->CreateCommittedResource(
&CD3DX12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_DEFAULT),
D3D... |
fc3eadf050cb76669da4b2c94c79f745714cafa0 | 5cc289c56e741cdbc8ce63a3ec2b753bd01f99af | bobsayshilol/ProjectEuler | /C/solution_12.cpp | C++ | cpp | 3,691 | no_license | /**
* Highly divisible triangular number
*
* The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
* 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...
* Let us list the factors of the first seven triang... |
c2ab7c8ab2c82a76fb40cb919562ba4fc6aca8e9 | b20d6d0d7ca2743b15048e52cb8c76b514a0f888 | sunnyxhuang/weaver | /src/global.cc | C++ | cc | 3,193 | permissive | //
// global.cc
// Ximulator
//
// Created by Xin Sunny Huang on 10/30/14.
// Copyright (c) 2014 Xin Sunny Huang. All rights reserved.
//
#include "global.h"
#include "util.h"
// Some useful constant/scaler
//const double ONE_GIGA_DOUBLE = 1.0e9;
const long ONE_GIGA_LONG = 1e9;
// const long TEN_GIGA_LONG = 10 * ... |
aa47ac2aac0a3ea030c10e4db600fc1d46faf976 | f4694074d4195e151230c8a788c03f8dc4dbb9ad | ttalvitie/frivol | /test/containers/array.cpp | C++ | cpp | 1,483 | no_license | #include <boost/test/unit_test.hpp>
#include "frivol/containers/array.hpp"
using namespace frivol;
using namespace frivol::containers;
BOOST_AUTO_TEST_SUITE(array)
BOOST_AUTO_TEST_CASE(size_works) {
Array<double> array(7);
BOOST_CHECK_EQUAL(array.getSize(), 7);
}
BOOST_AUTO_TEST_CASE(simple_read_write) {
Array<... |
5b1a796b2788df769db78f5971676b9944e1f35c | 557375f0df8261958b84a7433fb6664906e5d969 | kasspip/DOGLE | /src/EngineClass/Stop.hpp | C++ | hpp | 407 | no_license | #ifndef STOP_HPP
# define STOP_HPP
# include "DOGLE.hpp"
# include "IState.hpp"
class Stop : public IState
{
public:
Stop(void);
~Stop(void);
std::string toString(void) const;
void RunState(Application & app, e_state & currentState);
private:
Stop(Stop const &src);
Stop &operator=(Stop... |
bbff6dd69a9ee633b03babddf1d4d8767afffb1d | 240ff8d9beb546d79ec057956379bafa06606039 | mchvz93/C_Programming | /Dice_Lab/dicelab.cpp | C++ | cpp | 457 | no_license | /*pick a random number from a hard range
die 1 to 6
num= rand()%6+1
- 6 is the highest number
- 1 is the lowest
soo
high - low +1
range 2000-8000
num = rand() 6001+2000
Code:*/
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
void main()
{
int d1, d2, sum;
t... |
6eee977496d48e7042421dab33cb7406ca0c63ca | f5b18debb88087979aee13baede953cb017a0e9a | hoangnq154/cocos2d-x_2_0_4_templete_for_qtcreator | /cocos2d_2.x_linux/Classes/AppDelegate.cpp | C++ | cpp | 1,339 | no_license | #include "AppDelegate.h"
#include "HelloWorldScene.h"
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
CCDirector* pDirector = CCDirector::sharedDirector();
CCEGLView* pEGLView = CCEGLView::sharedOpen... |
9ae9ae773b05f7ba1487f17653fec588a1477f55 | da7139457d00554ac31eb046331ae8d6c9b2f5dc | rgermond/CuteDAQ | /src/daq.cpp | C++ | cpp | 1,211 | no_license | //DAQ for CUTE Rev 0.1
//Author: Richard Germond
//SuperCDMS, Queen's University
//standard C++ headers
#include <iostream>
//standard C headers
#include <signal.h>
//boost headers
#include <boost/asio.hpp>
using boost::asio::ip::tcp;
//my headers
#include "daq.hpp"
//function that handles the signal interrupt
voi... |
446a48f49fec067ca2f1973285dac38200fc0f48 | 0c25025b6c38a0ca027e18f518d4eaeebdb5c953 | fauder/magnum | /src/Magnum/Platform/GlfwApplication.cpp | C++ | cpp | 39,165 | permissive | /*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020, 2021, 2022, 2023 Vladimír Vondruš <mosra@centrum.cz>
Copyright © 2016, 2018 Jonathan Hale <squareys@googlemail.com>
Copyright © 2019 Konstantinos Chatzilygeroudis <costashatz@gm... |
3713f2d047d88f916edcd269439943032f0bdf23 | 2f9442ba08a132d540d0e7c5cc5f76ea9b46b8ed | jccarvalhosa/maratona | /googlecodejam/2015/qualification/d.cpp | C++ | cpp | 523 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
int x, r, c;
int solve() {
if(x >= 7) return 0;
if(x == 6 && min(r, c) <= 3) return 0;
if(x == 5 && min(r, c) == 3 && max(r,c) == 5) return 0;
if(x == 4 && min(r, c) <= 2) return 0;
if(x >= 2*min(r,c)+1) return 0;
if(x > max(r, c)) return 0;
if(r*c ... |
f1d3e452358ef09b73ef6e0cef2f9722f93386fb | b5660d0c0bb04045178438ea6696412425008fab | DrDrake/mcore3d | /MCD/Render/TransformAnimator.cpp | C++ | cpp | 1,309 | no_license | #include "Pch.h"
#include "TransformAnimator.h"
#include "../Core/Entity/Entity.h"
#include "../Core/Math/Quaternion.h"
namespace MCD {
TransformAnimator::TransformAnimator()
: trackOffset(0), trackPerEntity(0)
{
}
void TransformAnimator::update()
{
MCD_ASSUME(trackPerEntity > 0);
if(!animation || affectingEntit... |
6d3a377b3236288d57b808e34f91515d042f4105 | 96c73ea2456850cfee1a3bc24118934ec2d6e9a6 | playbar/nstest | /src/flash/AVMSWF/api/flash/display/AS3Graphics.cpp | C++ | cpp | 26,435 | no_license | #include "StdAfxflash.h"
#include "sobject.h"
#include "sdisplay.h"
#include "XDrawObj.h"
#include "ShellCore.h"
#include "splayer.h"
using namespace avmplus;
#include "AS3DisplayObject.h"
#include "AS3Graphics.h"
#include "AS3BitmapData.h"
#include "AS3Matrix.h"
#include "avm2.h"
namespace avmshell{
Gra... |
bcf7fe7de2fa39c17402299b480b2d10906211a7 | 99e2247efb3b6a9a19391ad86a1377a99ed93adf | 111pontes/ydk-cpp | /cisco-ios-xr/ydk/models/Cisco_IOS_XR_rgmgr_cfg.hpp | C++ | hpp | 14,643 | permissive | #ifndef _CISCO_IOS_XR_RGMGR_CFG_
#define _CISCO_IOS_XR_RGMGR_CFG_
#include <memory>
#include <vector>
#include <string>
#include "ydk/types.hpp"
#include "ydk/errors.hpp"
namespace ydk {
namespace Cisco_IOS_XR_rgmgr_cfg {
class RedundancyGroupManager : public Entity
{
public:
RedundancyGroupManager();
... |
4a5f08ae07c370d51b3816aced30c977fbc5ba63 | d298b5c36cd27b2281303c22f8e2f20c9c417226 | DhirajWishal/EngineDevKit | /Modules/Maths/Source/Vector/Vector4.cpp | C++ | cpp | 5,131 | permissive | // Copyright 2020 Dhiraj Wishal
// SPDX-License-Identifier: Apache-2.0
#include "Maths/Vector/Vector4.h"
#include "ErrorHandler/Logger.h"
#include "Memory/Functions.h"
#include "Maths/IncludeSIMD.h"
#include "Core/Types/Utilities.h"
namespace EDK
{
namespace Maths
{
Vector4::Vector4(std::initializer_list<float> l... |
889881d1112b9fdd8d3c25b9113592e0cab35f8a | 17eb19c13bd213077d896897255e400219fed6e3 | giulioz/DemoEffects | /ascii.cc | C++ | cc | 848 | no_license | #include "asciiBuffer.hh"
#include <cmath>
#include <ncurses.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#define WIDTH 120
#define HEIGHT 50
const char *asciiLuminance = " .:-=+*#%@";
#define getLumAscii(l) (asciiLuminance[(int)floor(l * 10)])
int main() {
auto wnd = ASCIIBuffer... |
f4ff38bf6b8a55eba754de0c378747b0a91f87c2 | 9fdf099137d56b90906ef465e14242f712efae31 | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/shell/browseui/explore2.cpp | C++ | cpp | 6,741 | no_license | #include "priv.h"
#ifndef UNIX
#include "sccls.h"
#include "explore2.h"
#include <iethread.h>
#include "resource.h"
#include "itbar.h"
#include "mluisupp.h"
#define DM_FOCUS DM_TRACE
#define SUPERCLASS CSHELLBROWSER
TCHAR const c_szSettings[] = TEXT("Settings");
TCHAR const c_szCabinetExpView[] = TEXT("ExpV... |
1ad167c3e10669088ef422b68cc0299e7aee3858 | 8bd020456c07ef5efdb818e67ac5119cbaeb6dc1 | Lincest/library | /library/dele.cpp | C++ | cpp | 961 | no_license | #include "dele.h"
#include "ui_dele.h"
#include<QMessageBox>
#include<QSqlQueryModel>
#pragma execution_character_set("utf-8")//设置中文= =
dele::dele(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::dele)
{
ui->setupUi(this);
}
dele::~dele()
{
delete ui;
}
void dele::on_pushButton_exit_clicked()
{
... |
a45c5d83ccb32817aeaec20de0e66fdb3c76dc6e | 96954095ba3c9007f7cf7acd329b9bd58da9be5e | artisdom/cpp_design_patterns_modern | /ch02_builder_groovy.cpp | C++ | cpp | 762 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
struct Tag
{
string name;
string text;
vector<Tag> children;
vector<std::pair<string, string>> attributes;
friend ostream& operator << (ostream& os, const Tag& tag) {
}
//protected:
Tag(const string& name, strin... |
dcc98e1a22e1ff186d47b6e3bbf2afa94c2595b5 | 8f81aff5f90749f030d59f4c13c69eaaea9709f1 | sarub0b0/hashmot-deltahq | /hashmot/source/kdtree/kdtree_index.cc | C++ | cc | 10,621 | permissive | // MIT License
// Copyright (c) 2019 kosay
// 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, pu... |
9b2b5a1fd64451fc1aa5adb5396055c9c5ad00c3 | a021b4b6f41d8e9be621e9957c6f0b7a4f6bf9b6 | aurone/spellbook_ros | /src/memory/mempool.cpp | C++ | cpp | 238 | no_license | #include <spellbook/memory/mempool.h>
namespace au
{
mempool::mempool() :
m_buff(nullptr),
m_num_bytes(0)
{
}
mempool::mempool(void* buff, size_t num_bytes) :
m_buff(buff),
m_num_bytes(num_bytes)
{
}
} // namespace au
|
9d13644cccd7a01b47f8abf35b2152cfa970badd | f1789218820c9d56b3cf45b8e5d2a827c8020ba5 | jack89730/Student-Management | /sortdialog.cpp | C++ | cpp | 5,809 | no_license | #include "stu.h"
#include "sortdialog.h"
#include "ui_sortdialog.h"
sortDialog::sortDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::sortDialog)
{
ui->setupUi(this);
this->setWindowTitle("学生课程排序");
//设置窗口标题
}
sortDialog::~sortDialog()
{
delete ui;
}
//点击按综合成绩升序的槽函数
void sortDialog::on_zo... |
63a99692da5f24346610dcd6e839b4c22874cdc1 | 90b8464ea4fbeaa1d128b5221eb228afd2cc16b5 | JacekDanecki/compute-runtime | /opencl/source/tracing/tracing_api.cpp | C++ | cpp | 6,340 | permissive | /*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/tracing/tracing_api.h"
#include "opencl/source/tracing/tracing_handle.h"
#include "opencl/source/tracing/tracing_notify.h"
namespace HostSideTracing {
// [XYZZ..Z] - { X - enabled/disabled bit, Y - lock... |
21a4f83e3f668c86e2b79f5af6de82c7869277de | 0c555c42f13f4db5bcb48a619c5cf95c0d49c176 | XistarCoin/xistar-source | /src/compat/glibc_sanity.cpp | C++ | cpp | 1,846 | permissive | // Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2017 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/xistar-config.h"
#endif
#include ... |
54dc17fafcbaa7c02455db426cc2d7e2882f81ad | 9ea77abb428150658130b2f1e53e170e50cd20bb | novaquark/aws-sdk-cpp | /aws-cpp-sdk-ds/source/model/ShareDirectoryResult.cpp | C++ | cpp | 1,432 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
c85e8956693fdf9c6b4d8e853b9bcffc35e34bf7 | 3a2f43c6e85d1ffa0068f0906dae2a2b42798247 | bu1th4nh/Online_Judge_Solutions | /SPOJ/SPOJ_KMIN/main.cpp | C++ | cpp | 1,994 | no_license | //Libraries and namespaces
//#include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#include <utility>
using name... |
65e38143d135fc2e51359c99304b540071c0df05 | 22bc903d6b516be68129aea972e66d8d13ba05d4 | mrdrivingduck/leet-code | /190.ReverseBits.cpp | C++ | cpp | 2,440 | permissive | /**
* @author Mr Dk.
* @version 2021/03/29
*/
/*
Reverse bits of a given 32 bits unsigned integer.
Note:
Note that in some languages such as Java, there is no unsigned
integer type. In this case, both input and output will be given
as a signed integer type. They should not affect yo... |
605af84817e9141775310ca3ca2959ebd24f7747 | 7ba93e121007ba62d519e39a526d04c8a2e8dee5 | ofxyz/ofxMicroUI | /MicroUISimple/src/ofApp.cpp | C++ | cpp | 609 | no_license | #include "ofApp.h"
void ofApp::setup(){
m.createFromText("m.txt");
m.load("preset.xml");
}
void ofApp::update(){ }
void ofApp::draw(){
ofBackground(40);
for (int a=1; a<4; a++) {
string id = ofToString(a);
if (m.pBool["circle" + id]) {
ofSetColor(
m.pFloat["r" + id],
m.pFloat["g" + id],
m.pFlo... |
344afd638582f42e925d694b09a17a1eaf7e70b2 | 6eda3389bf3b599699a3ae268086a894e563469c | wagoodman/origin | /vendor/github.com/google/certificate-transparency/cpp/client/client.cc | C++ | cc | 2,308 | permissive | #include "client/client.h"
#include <arpa/inet.h>
#include <glog/logging.h>
#include <netinet/in.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/socket.h>
#include <unistd.h>
#ifdef __MACH__
// does not exist on MacOS
#define MSG_NOSIGNAL 0
#endif
using std::string;
Client::Client(const string& server, uin... |
87d3242381c4af80efa74e53bad423ded0417d22 | f94739c5974dc5aec1dc314cc8b4450b0ac5ce68 | kyeonglinSong/algorithm_study | /C++/6603_lotto.cpp | C++ | cpp | 1,007 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n;
vector<int> temp;
void lotto(vector<bool> check, vector<int>& number, int start, int end)
{
if (end == 6)
{
sort(temp.begin(), temp.end());
for(int i=0 ; i<6 ; i++)
cout << temp[i] << " ";
... |
87125c39871a29917f1dadb7ba785bff103bd624 | 1fe2dbe92c1f6a113360d6fb054f3041f9fb4ed8 | kalyankondapally/chromiumos-platform2 | /power_manager/powerd/policy/input_event_handler.cc | C++ | cc | 9,876 | permissive | // Copyright (c) 2012 The Chromium OS 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 "power_manager/powerd/policy/input_event_handler.h"
#include <utility>
#include <base/logging.h>
#include <chromeos/dbus/service_constan... |
6494915854425b059090121eb1fc4e9aaca7f2f7 | d4b770d148aaa482e157b301c6fb87047d4853da | yhuai/SS-DB-MySQL | /groupBatchImpl.cpp | C++ | cpp | 4,345 | no_license | #include <cmath>
#include <algorithm>
#include <iostream>
#include <sstream>
#include "groupBatchImpl.h"
int GroupBatchImpl::calculateDistance(Observ &o1, Observ &o2)
{
int dX = o1.centroidX - o2.centroidX;
int dY = o1.centroidY - o2.centroidY;
int distance = sqrt(dX*dX + dY*dY);
return distance;
}
st... |
7345261acb365f465de42087d0de64c5f3ba24a1 | f591f74a0aa962057a27470e6c5ee5a9ae6b9854 | l-paz91/principles-practice | /Chapter 9/Exercise 5/main.cpp | C++ | cpp | 1,502 | no_license | // -----------------------------------------------------------------------------
//
// C9 - Exercise 5
//
// I struggled with this because work has me constantly thinking about data now
// instead of objects. Trying to just imagine 'a book' and the operations it may
// need proved more difficult than thinking about wh... |
882f308412dd5794e683341a089abcedd32ebe70 | 7ac701851aaf3aa0458057f718f398c1f6a78075 | MeineZ/Shadows-playground | /Libraries/D3DX12AffinityLayer/UWP/CD3DX12AffinityObject.cpp | C++ | cpp | 4,269 | permissive | //*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PA... |
3bc90e9ea0ec82bd4e7100476a21ba5670780b09 | 1f766fc61e209d36ee55a318399e55f9e7ca6e3a | mave89/CPlusPlus_Random | /LeetCode/Trees/treeTiltSum.cpp | C++ | cpp | 1,229 | no_license | // https://leetcode.com/contest/leetcode-weekly-contest-29/problems/binary-tree-tilt/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
// BFS
... |
538be4fa7ec58b4ad0f2cea45a4731cea48e173a | 920c48d1c562d55ea19e8cdb310c0a8e7c82c2eb | LeonardoFassini/Competitive-Programming | /UVA/11799-TIMMY.cpp | C++ | cpp | 337 | no_license | #include <cstdio>
int main(void){
int n, s, maior;
scanf("%d\n", &n);
getchar();
for(int i = 1; i <= n; i++){
maior = -1;
scanf("%d", &s);
if(s > maior) maior = s;
while(getchar() != '\n'){
scanf("%d", &s);
if(s > maior) maior = s;
}
printf("Case %d: %d\n", i, maior);
... |
6aafbd2f7cba8968cdd67a273668c073acb2dcf3 | a6bdd7b16cb89110d50db540517b27b32dff7b66 | couchbasedeps/folly | /folly/io/async/test/AsyncUDPSocketGSOGROTest.cpp | C++ | cpp | 16,097 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
38e9864f338779ce9ca7e8639e39d76f7ad0ade2 | 0a2b7862514d7b93fc0a00b817442cb2d50bfdb8 | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/boost/geometry/algorithms/detail/overlay/overlay.hpp | C++ | hpp | 15,532 | permissive | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2013-2017 Adam Wulkiewicz, Lodz, Poland
// This file was modified by Oracle on 2015, 2017.
// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
// Contribut... |
c111e4b7c563131580be07563a3abccbe59888ff | 7b99ddab28d444432ef8dcb5c5a80d8051ac2998 | JulianGong/TradingTechnology | /quotapi/BCESQuotApiImp.cpp | C++ | cpp | 4,773 | no_license | #include "BCESQuotApiImp.h"
#include <string>
#include <boost/program_options.hpp>
#include <iostream>
#include <fstream>
#include <stdarg.h>
#include <boost/asio.hpp>
#include "ServerConnector.h"
#include <boost/thread/thread.hpp>
//LOGFP* lp=NULL;
#define TCP_SND_SIZ 1024*1024*10 // Tcp Send Buffer Size 10MB
#def... |
ca96cc7771305f567479adf9fc1e6293bffba781 | 516d2c18a910b2b14879e515205c3eaea66e248c | SymbianSource/oss.FCL.sf.os.persistentdata | /persistentstorage/sql/TEST/t_sqlsecurity4.cpp | C++ | cpp | 14,388 | no_license | // Copyright (c) 2006-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/e... |
93152e65d8ce73bae3fe86c46b4869d86a996b07 | 9ce42cc420ff175780a34254d320ad0eb32f1ba8 | ExternalRepositories/libfly | /fly/coders/coder.cpp | C++ | cpp | 4,778 | permissive | #include "fly/coders/coder.hpp"
#include "fly/logger/logger.hpp"
#include "fly/types/bit_stream/bit_stream_reader.hpp"
#include "fly/types/bit_stream/bit_stream_writer.hpp"
#include <chrono>
#include <fstream>
#include <sstream>
namespace fly::coders {
namespace {
constexpr const std::ios::openmode s_input_mod... |
8ad9f9da172a6e33a1a884bccdf02dbc57c55406 | 052347c104adf391adcf9a5f5284e487e8bea920 | Farrius/cp | /harbour/module_4/lca/gen.cpp | C++ | cpp | 221 | no_license | #include <bits/stdc++.h>
using namespace std;
int main () {
freopen("in", "w", stdout);
int n = 3e4;
cout << n << '\n';
for (int i = 0; i <= n; i++) {
cout << i << ' ';
}
cout << '\n';
}
|
dd6d3d36527c3a298dbcadb722e89abd7431b1a6 | 0f2880468a2957556720d4162a358079140760ec | pavelborisov/coderacing_soldatenko | /CodeRacing/RemoteProcessClient.cpp | C++ | cpp | 29,647 | no_license | #include "RemoteProcessClient.h"
#include <algorithm>
#include <cstdlib>
using namespace model;
using namespace std;
const bool LITTLE_ENDIAN_BYTE_ORDER = true;
const int INTEGER_SIZE_BYTES = sizeof(int);
const int LONG_SIZE_BYTES = sizeof(long long);
RemoteProcessClient::RemoteProcessClient(string host, int port)
... |
66a72b24286e03bbec00caabd87bf5d832d0cdee | 402001b242258149a2bb3a153110b643278574c4 | KernelPanic-OpenSource/Win2K3_NT_admin | /activec/locparser/dllentry.cpp | C++ | cpp | 6,130 | no_license | //------------------------------------------------------------------------------
//
// File: dllentry.cpp
// Copyright (C) 1995-1997 Microsoft Corporation
// All rights reserved.
//
// Purpose:
// Defines the initialization routines for the DLL.
//
// This file needs minor changes, as marked by TODO comments. Howeve... |
1d2a5219dfa1bee970f419a268078d2137d47b35 | d9612094b98726e84a54a521cebd1048f1548f33 | juvenz/ydk-cpp | /cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_fib_common_cfg.cpp | C++ | cpp | 18,542 | permissive |
#include <sstream>
#include <iostream>
#include <ydk/entity_util.hpp>
#include "bundle_info.hpp"
#include "generated_entity_lookup.hpp"
#include "Cisco_IOS_XR_fib_common_cfg.hpp"
using namespace ydk;
namespace cisco_ios_xr {
namespace Cisco_IOS_XR_fib_common_cfg {
Fib::Fib()
:
auto_hash_recover{YType::boole... |
f50c4296fbf45e073a0e657f5ceb23a9718c8d76 | e4a64a3fe4e831ea82cc5ff3a9100a807991e8e8 | LostKnowledge33/practice | /백준/Bronze/3003. 킹, 퀸, 룩, 비숍, 나이트, 폰/킹, 퀸, 룩, 비숍, 나이트, 폰.cc | C++ | cc | 232 | no_license | #include <iostream>
using namespace std;
int main()
{
int pieces[6] = { 1, 1, 2, 2, 2, 8 };
for (int i = 0; i < 6; i++)
{
int input = 0;
cin >> input;
cout << pieces[i] - input << " ";
}
return 0;
} |
7a89bdb5fb0ea898ad16b4a07fcbd4db144d919b | 2f2058d64c455d4f42d5b1823b0a988b6a7a8e5e | labmec/neopz | /Save/TPZPersistenceManager.cpp | C++ | cpp | 16,675 | no_license | #include "TPZPersistenceManager.h"
#include <stddef.h> // for NULL
#include "TPZBFileStream.h" // for TPZBFileStream
#include "TPZFileStream.h" // for TPZFileStream
#include "TPZGeneralFStream.h" // for TPZGeneralFStream
#include "TPZSavable.h" // for TPZSavable
#include "pzerror.h" //... |
6a6928312524fbedbdb6982c5098270d38f2fd9e | 70643b2a3124bd1130da053be9ca5eecc5b0f58d | Domocracy/dmc_http | /src/http/httpServer.cpp | C++ | cpp | 3,894 | no_license | //----------------------------------------------------------------------------------------------------------------------
// Project: Domocracy, dmcLib
// Author: Carmelo J. Fdez-AgŁera Tortosa (a.k.a. Technik)
// Date: 2015-Jan-10
//---------------------------------------------------------------------------------------... |
e27371ecfd191126afb9286c30f425274a0b29b9 | a19d4f6a4d843a86240edea8f0aea94860e75983 | strauzen/cpp_primer | /src/ch01/144_119_1.cpp | C++ | cpp | 473 | no_license | /**
* Excersize 1.9: Write a program that uses a while to sum the numbers from 50 to 100.
**/
#include <iostream>
int main()
{
int v1 = 100, v2 = 50, sum = 0, i = 0, j = 0;
if (v1 >= v2)
{
i = v2;
j = v1;
}
else
{
i = v1;
j = v2;
}
while (i <= j)
... |
13212cdc7e8b51d4204407a784f9973198dfc479 | 1c288ff5baddc406202fb358ea9189d25d10df07 | dp180662/Coding-projects-for-College | /Peters ch 17 Assignment.cpp | C++ | cpp | 3,309 | no_license | // Dustin Peters
// ch 17 assignment
// 4/15/17
#include<iostream>
#include<string>
#pragma warning(disable: 4996);
using namespace std;
struct list {
struct list *prev;
char data;
struct list *next;
} *node = NULL, *first = NULL, *last = NULL, *node1 = NULL, *node2 = NULL;
class linkedlist {
pub... |
a033800160f7937b8d3a6e81fa2d3006fa949bdb | f878bb9a290cc8259ac6bc746773a129ef0ee457 | lai3d/ThisIsASoftRenderer | /ThisIsASoftRenderer/Editor/XTP/Source/DockingPane/XTPDockingPaneLayout.cpp | C++ | cpp | 26,860 | no_license | // XTPDockingPaneLayout.cpp : implementation of the CXTPDockingPaneLayout class.
//
// This file is a part of the XTREME DOCKINGPANE MFC class library.
// (c)1998-2011 Codejock Software, All Rights Reserved.
//
// THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
// RE-DISTRIBUTED BY ANY MEANS WHAT... |
3fdddd0408f75ea7f9a9f6c6abc86350405c6da1 | 64e09a171ba3cd9ffa06932023a0a420d8a1dd60 | DRG-Modding/Header-Dumps | /Current/AIC_FriendlyParasite.hpp | C++ | hpp | 297 | no_license | #ifndef UE4SS_SDK_AIC_FriendlyParasite_HPP
#define UE4SS_SDK_AIC_FriendlyParasite_HPP
class AAIC_FriendlyParasite_C : public AFSDAIController
{
FPointerToUberGraphFrame UberGraphFrame;
void ReceiveBeginPlay();
void ExecuteUbergraph_AIC_FriendlyParasite(int32 EntryPoint);
};
#endif
|
c173290b7fa15fb71931c8d4cc4e68da02563ddb | 18c3d1c5b3f321ea3cdac69cf0c2098b9e040e23 | pratham-0094/100DaysOfCode | /Day-19/Friend_Class.cpp | C++ | cpp | 1,344 | no_license | #include <iostream>
using namespace std;
// Forward declaration
class Complex;
class Calculator
{
public:
int add(int a, int b)
{
return (a + b);
}
int sumRealComplex(Complex, Complex);
int sumCompComplex(Complex, Complex);
};
class Complex
{
int a, b;
// I... |
6500ab756c9ff4017f7f0d12407d8e1946816fdb | e0f9acf0032fcb79b5883b2e75f21c86675473d5 | swift-embedded/swift | /lib/IRGen/GenClass.cpp | C++ | cpp | 95,382 | permissive | //===--- GenClass.cpp - Swift IR Generation For 'class' Types -------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
7cf278c800f97543450bf5148ab89138782e50a7 | 9eb69b4aa2aeee91133fe22f0e6b9de372edd212 | arichardson/juliet-test-suite-c | /testcases/CWE78_OS_Command_Injection/s04/CWE78_OS_Command_Injection__char_file_w32_spawnvp_72a.cpp | C++ | cpp | 3,895 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__char_file_w32_spawnvp_72a.cpp
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-72a.tmpl.cpp
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: file Read input from a file
*... |
ee7628790c5a2ece8be0c17d1e41d7efdf7e144e | 47ac335972eb8d18b4bd39a794fb1763ef778033 | Aaditya-Singh78/Competitive-Programming-June-Course- | /Tanweer/New Array and String Questions/Majority Element/solution.cpp | C++ | cpp | 334 | no_license | class Solution {
public:
int majorityElement(vector<int>& nums)
{
map<int,int> mp;
for(int i = 0 ; i<nums.size() ; i++)
{
mp[nums[i]]++;
if(mp[nums[i]] >= (int((nums.size())/2)+1))
{
return nums[i];
}
}
retu... |
f5544e7e1d677837669b83fe1c7581f154a9f282 | cbac88a363119acd4c63e3f4ff698ea4c2bd2ed0 | order/lcp-research | /cdiscrete/misc.cpp | C++ | cpp | 13,243 | no_license | #include <iostream>
#include <assert.h>
#include "misc.h"
#include <wordexp.h>
#include <vector>
#include <boost/math/special_functions/sign.hpp>
using namespace std;
using namespace arma;
double time_delta(const clock_t & start){
return (clock() - start) / (double)(CLOCKS_PER_SEC);
}
void print_shape(const ... |
f00c00597d3458e96e8ddea57e3f665cf2c5601b | 6cb069adafe9d99741ff6818956c7dcda67f36d4 | dhivyadharshin/pytorch | /aten/src/ATen/native/SobolEngineOps.cpp | C++ | cpp | 7,120 | permissive | #include <ATen/ATen.h>
#include <ATen/Dispatch.h>
#include <ATen/NativeFunctions.h>
#include <ATen/native/SobolEngineOpsUtils.h>
#include <vector>
namespace at {
namespace native {
using namespace sobol_utils;
/// This is the core function to draw samples from a `SobolEngine` given
/// its state variables (`sobols... |
5d99650cf1815fa6bb5b345ca0efcd7aa0171e1b | c170c03d5c11d201a895f608cc91a1abe0042f4f | weidezhang/ComputerVision | /assignment2/src/test3.cpp | C++ | cpp | 754 | no_license |
#include "project2.hpp"
#include "challenge.hpp"
string imagefile1 = "../Picture1.png";
string imagefile2 = "../Picture2.png";
string title = "window";
Scalar green = {0,255, 0};
Scalar red = {0, 0, 255};
//These are for project 2
vector<int> input1 = {536,137,563,131,582,126,609,118,632,112,658,107,540,176,563,171,5... |
6a95756a208b6e7fd00d1766f7625d9838fbdfd5 | 971fbff9dfe43c3f12ccc0c452ade363366abb14 | ziggysmalls/LotusEngine | /SceneRegistrationBroker.cpp | C++ | cpp | 477 | no_license | #include "SceneRegistrationBroker.h"
void SceneRegistrationBroker::addCommand(CommandBase* cmd)
{
lstCommands.push_back(cmd);
}
void SceneRegistrationBroker::ExecuteCommands()
{
for (CommandList::const_iterator it = lstCommands.begin(); it != lstCommands.end(); ++it)
{
CommandBase* c = *it;
c->E... |
92c429d82652a629514b48e18bb221bdf0b86317 | 13070bcf22fb7bd81037541ea2cb41519ae60f66 | wxxweb/w2x | /src/w2x_flash/wnd_flash.cpp | C++ | cpp | 11,514 | no_license | /*****************************************************************************
* 文件: wnd_flash.cpp
* 描述: 参见 wnd_flash.h
* 作者: wu.xiongxing
* 邮箱: wxxweb@gmail.com
* 创建: 2014-02-17
* 修改: 2014-04-19
*****************************************************************************/
#include "stdafx.h"
#include "w... |
3255ada2eb14be84482435c871a878e9fcb4b12c | 4124cfbddf9b069a93530006d28f3d4fb2f7ea46 | pytorch/pytorch | /aten/src/ATen/native/transformers/transformer.cpp | C++ | cpp | 3,829 | permissive | #include <ATen/ATen.h>
#include <ATen/Dispatch.h>
#include <ATen/NativeFunctions.h>
#include <ATen/NestedTensorImpl.h>
#include <c10/util/Exception.h>
#include <torch/library.h>
#include <ATen/native/nested/NestedTensorTransformerFunctions.h>
namespace at {
namespace native {
namespace {
Tensor linear_for_ffn(
... |
d92792f58eeb0f35f5d00a0cb452eea3b86f86b0 | d7169a3ead5a994b628706e1760d55638d7249fe | SilverIce/JContainers | /dep/skse/skse/NiTypes.cpp | C++ | cpp | 3,462 | permissive | #include "NiTypes.h"
NiPoint3::NiPoint3()
{
x = 0.0f;
y = 0.0f;
z = 0.0f;
}
NiPoint3 NiPoint3::operator- () const
{
return NiPoint3(-x, -y, -z);
}
NiPoint3 NiPoint3::operator+ (const NiPoint3& pt) const
{
return NiPoint3(x + pt.x, y + pt.y, z + pt.z);
}
NiPoint3 NiPoint3::operator- (const NiPoint3& pt) const
{... |
efd5201f5db34015bda84454e20d019ddf9a0642 | 564179833469c3ed3a90cd914990c7f017065caa | sneumann/mzR-playground | /src/random_access_gzFile.cpp | C++ | cpp | 5,653 | no_license | // random_access_gzFile.cpp
// presents C-style calls based on an ifstream-derived C++ class
//
// like gzio.c from the zlib distro,
// but for dealing with reading >2GB files in win32, and efficient random access.
// Copyright (C) Insilicos LLC 2008, ALl Rights Reserved.
// For conditions of distribution and use, see ... |
d520f5f5c34b690b6150f9fd957e921402a2c8ed | d490e13156f48b069400ac38389911051ac67606 | rehankhan0/gene-code | /LAb 3 1711104/lab3_q45.cpp | C++ | cpp | 391 | no_license | #include <iostream>
using namespace std;
int main() {
int num1, num2, lim, HCF=1;
cout<<"\nProgram to find HCF of two numbers.";
cout<<"\nENTER THE NUMBERS: ";
cin>>num1>>num2;
if(num1>num2)
lim=num2;
else
lim=num1;
for(int i=1;i<=lim;i++)
{
if(num1%i==0 && num2%i==0)
{
HCF=i;
}
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.