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 |
|---|---|---|---|---|---|---|---|---|
6db77294f1839455463511cd3ea1d78c866a99cd | 9b5bc1caaaf52a99dbf5d850b74effa0d3850d87 | PrayStarJirachi/Exercise-Code | /Codeforces-Code/Codeforces Mixed/587C.cpp | C++ | cpp | 3,043 | permissive | #include <cstdio>
#include <vector>
#include <algorithm>
const int MAXN = 100001;
const int MAXM = 200001;
const int Maxlog = 20;
struct Node{
int l, r, d;
}t[MAXN * 40];
struct Edge{
int node, next;
}e[MAXM];
int n, m, q, tot, size, h[MAXN], f[MAXN][21], d[MAXN], b[MAXN], rt[MAXN];
std::vector<int> l[MAXN];
voi... |
92a6da4dfaaa1167cfcbdc998f4461d9fc2767ef | edeae057492baee314b9a3fb7324dea0a832f84f | bathepawan/chromium | /chrome/browser/ui/page_info/page_info_unittest.cc | C++ | cc | 64,491 | 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 "chrome/browser/ui/page_info/page_info.h"
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include ... |
3b6f8635b126622480bbf22b264b17c747868058 | 0539652d6754142a76f9db7d58227679547f505b | lingyfh/chromium | /chrome/browser/previews/previews_lite_page_navigation_throttle.cc | C++ | cc | 29,706 | 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/previews/previews_lite_page_navigation_throttle.h"
#include <stdint.h>
#include <string>
#include <unordered_set>
#include <vect... |
2dc66c1e8c57950cd6b66e36b360298a54d2d37f | 56a51a2e26e6ad9cbf6398236f4fcf41594900f5 | pawanjenu/compitative-programming | /new_format/leetcode/nin/solution.cpp | C++ | cpp | 1,210 | no_license | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define ll long long
#define li long int
#define ld long double
#define vi vector<int>
#define vs vector<string>
#define vll vector<long long>
#define vl vector<long>
#define vlli vector<long long int>
#define pii pair<int, int>
#define plli pair... |
8ec44ca7b9fd2994f7c3a372b1a431ab51353f61 | fa980f8fddf022a9e30d096912a7159c7cd7a109 | akshaymarch7/chromium | /services/device/generic_sensor/platform_sensor_reader_winrt.cc | C++ | cc | 26,964 | permissive | // Copyright 2019 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 "services/device/generic_sensor/platform_sensor_reader_winrt.h"
#include <cmath>
#include "base/numerics/math_constants.h"
#include "base/win/c... |
c453e9cc25d103f0b31130453548cada9d8ed6db | 66bda85b2f690baa741a1d318f5730a2cceb68e7 | ikaee/bfr-attendant | /facerecognitionlibrary/jni-build/jni/include/tensorflow/core/platform/hadoop/hadoop_file_system.cc | C++ | cc | 16,476 | permissive | /* Copyright 2016 The TensorFlow 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 a... |
694ce07d198f1b73b5941ace14e33dfe515b2f38 | f615ed93c6a238263f8975c11d4223cdb98021c6 | nougat-k/SPT-Cocos | /Classes/AppDelegate.cpp | C++ | cpp | 1,927 | no_license | #include "AppDelegate.h"
#include "HelloWorldScene.h"
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
//if you want a different context,just modify the value of glContextAttrs
//it will takes effect on all platforms
void AppDelegate::initGLContextAttrs()
{
//set OpenGL context attr... |
2d5d2c613600a97d045da39aad4a8235dfcb6058 | 83872778c3c3e2ebc02aea15efebd96a8f0a320a | TencentCloud/tencentcloud-sdk-cpp | /waf/src/v20180125/model/ModifyBotStatusRequest.cpp | C++ | cpp | 5,032 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
864db50b01705f806de6b92760836b032f58b104 | 2bb681ad75a24e01be46771eda5761fb8e6b2d3a | InnocentCode/sfml-radar | /src/models/game.cpp | C++ | cpp | 19,545 | no_license | #include "game.hpp"
Game::Game(std::shared_ptr <Settings> s, std::shared_ptr <Atis> a) : settings(s), atis(a) {
#ifdef DEBUG
std::clog << "Game::game()" << std::endl;
#endif
this->duration = 0;
this->selected = NULL;
this->loaded = false;
this->level = -1;
this->pop_holdings = -1;
this->separation_err... |
edd3ebccbabecafba35089c7ee100d54510017c7 | c798302856a7833082c82b24e4fa4a9c2bd6d0fe | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-appfabric/source/model/Ingestion.cpp | C++ | cpp | 3,362 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/appfabric/model/Ingestion.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace... |
8626c99300293274ab619972014698fe8b374af4 | 167bee558a88d0c3b675e7e99966f6a7a98ef361 | fanyer/cef | /libcef_dll/libcef_dll.cc | C++ | cc | 42,149 | permissive | // Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translato... |
9dcbbdd93ab7ffee4866539ba420b17e0d2920c8 | e53e0627c9f0a9585964014c22e25433bef335e0 | jwcpp/jwEngine | /src/script/Lua_NetServer.cpp | C++ | cpp | 2,166 | no_license | #include <string>
#include "sol/sol.hpp"
#include "NetEvent.h"
#include "NetClient.h"
#include "NetServer.h"
#include "NetPacket.h"
#include "NetConnect.h"
#include "EventLoop.h"
class Lua_NetServer : public NetServer, public NetEvent
{
public:
Lua_NetServer() :
NetServer(EventLoop::Instance(), this)
{
}
prote... |
1aa60b86e569ed6fbc2fd5a7c2c9967ae6a396ed | 37fe177ec8ee41455aa58e1909c3dfd8ac93c4bc | sleepy9090/hardwareanalyzer | /hardwareanalyzer.cpp | C++ | cpp | 50,609 | permissive | #include <iostream>
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "user32.lib")
#include <VersionHelpers.h>
/*
* author: Shawn M. Crawford 2018+
*
* Get Windows hardware and software information.
* This version requires Windows 2000 or newer OS (for now).
*
*/
using namespace std;
typedef BOOL (... |
6b7f11ea7c1a67588c8081bc5895c552eb2f05ef | 24249b0a1faf86f7811096956caf96a35b955942 | bingbin83/DDGI-1 | /Framework/Source/Effects/ToneMapping/ToneMapping.cpp | C++ | cpp | 11,882 | no_license | /***************************************************************************
# Copyright (c) 2015, NVIDIA CORPORATION. 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... |
6039401d18a90b19c83ed74bbee39f07c4535547 | d9fdd062198f80ef7c09b834f6154508a5fb0ca7 | sysfce2/rtype | /client/src/game/components/TextComponent.cpp | C++ | cpp | 1,177 | no_license | /*
** EPITECH PROJECT, 2020
** B-CPP-501-BDX-5-1-rtype-albert.corson
** File description:
** TextComponent
*/
#include "TextComponent.hpp"
#include "engine/core/AssetLoader.hpp"
namespace rtype::client {
TextComponent::TextComponent(std::string string, std::shared_ptr<sf::Font> font, int size)
: string ... |
b8346a888ec93321d8d8cc03b2092a7e3d45f5d2 | 5bfb9d49d1655dbe268d2b72cc34a8176e8039fc | jjwilke/sst-elements | /src/sst/elements/scheduler/allocators/NearestAllocator.cc | C++ | cc | 11,372 | permissive | // Copyright 2009-2019 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2019, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONTRIBUTORS.TXT in the top level directo... |
4cf0197a94b8f08d18cc234e61a69ee178a97dad | 0318679696066b7bb3a0872061e8ea7964ebec0b | Duy-Phuong/OOP | /LI THUYET/Demo_Game03/bai 4/RapThuong.cpp | C++ | cpp | 715 | no_license | #include "RapThuong.h"
float CRapThuong::TinhTienVe(int m)
{
int t = 0;
CRap::TimGheTrungTam();
if (SoHangGhe % 2 == 0)
{
if (m <= GheTrungTam[0])
{
t = GiaVe - (5000 * (GheTrungTam[0] - m));
}
else//if (m >= GheTrungTam[1])
{
t = GiaVe - (5000 * (m - GheTrungTam[1]));
}
}
else
{
if (m <= G... |
8c7eaeddb0448349525c3b68f4a61d3206e9326d | f54487b0904210bf75d7ed8fc71e46597c58ed9c | adamjer/Vulkan | /examples/triangle/triangle.cpp | C++ | cpp | 58,135 | permissive | /*
* Vulkan Example - Basic indexed triangle rendering
*
* Note:
* This is a "pedal to the metal" example to show off how to get Vulkan up an displaying something
* Contrary to the other examples, this one won't make use of helper functions or initializers
* Except in a few cases (swap chain setup e.g.)
*
* Copyright (... |
74f2d8de3194906d9ed997401b8ddbc9800834f8 | d6a0a3681bf0ab3cfd1d01a941c0ed6237e15cf3 | nsxz/RProtect | /src/gui/RProtect/QueryStatus.cpp | C++ | cpp | 1,586 | no_license | #include "Common.h"
#include "QueryStatus.h"
BOOL IsMonOn(ULONG ulCrimeType) {
USER_MAJOR_PROTECTED_INFO UsrMjProInfo;
UsrMjProInfo.ulCrimeType = ulCrimeType;
UsrMjProInfo.ulIsProtected = (ULONG)FALSE;
DWORD dwRet;
BOOL bRet = DeviceIoControl(
g_hDev,
IOCTL_GET_MAJOR_PROTECTED_INFO,
&UsrMjProInfo,
si... |
099356aefb71a8d92f00042d25f7456e40bd8d8e | cc3d3d5084cecb69892111c9f69cf2b6ccaa2e87 | fiberburguer/PRO1---FIB | /P6. P84735 Smallest multiple.cc | C++ | cc | 202 | no_license | #include <iostream>
using namespace std;
int main() {
int a,b,n=1;
while (cin>>a>>b) {
if (a%b!=0) a=((a/b)+1)*b;
cout<<"#"<<n<<" : "<<a<<endl;
n++;
}
} |
b72d8d421006ddd6b55ffed451a53e91a3a42494 | 9e5f3daa0dff123298be95482142e8e2986be51d | tingyingwu2010/Airline-Software-Project | /Project Files/main.cpp | C++ | cpp | 2,030 | no_license | /*
==================================================================
Name : Airline Management Program
Instructor : David Keathly
Email : DanielBates2@my.unt.edu
Author : Daniel Bates
Version : 3.12
Description : Airline management software, designed to keep track
of 3 classes through ... |
0187581817f4418e732d73590976ef70cf20b3af | 2f8f88717a5c757a44b2f043a5d0399d0e99c37e | Jereq/PongOut | /client/src/Sound/Sound.cpp | C++ | cpp | 624 | no_license | #include "Sound.h"
#include <fmod.hpp>
Sound::Sound(Sound& _other)
: volume(_other.volume),
resourceName(_other.resourceName),
type(_other.type),
sound(_other.sound)
{
_other.sound = nullptr;
}
Sound::Sound(Sound &&_other)
: volume(_other.volume),
resourceName(_other.resourceName),
type(_other.type),
sound(_o... |
1609e9801a32a824c7be47c7021c00ec2510ee99 | 319dd65aec8d69f099550b3e047e709ce4e33de9 | daspers/CP | /FacebookHackerCup/2021/Qualification/C1.cpp | C++ | cpp | 2,219 | no_license | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define INF 2000000000000000000LL
#define EPS 1e-9
#define debug(a) cerr<<#a<<"="<<(a)<<"\n"
#define debug2(a, b) cerr<<#a<<"="<<(a)<<" ";debug(b)
#define debug3(a, b, c) cerr<<#a<<"="<<(a)<<" ";... |
5e36059ef099eef25a2e9ee0354f4b773821d59f | 10abbb2b5b0f582c3e8c2ae98dc88eb5c4b6e199 | aorura/mozc-1 | /src/converter/converter_mock.cc | C++ | cc | 25,701 | permissive | // Copyright 2010-2014, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of condit... |
024a6c81dd5e04e5d183217c745cc33cc7024c07 | 3cf023f81748ad2104cb2a21edb93dd7261a8303 | freitagbr/cryptopals | /cryptopals/hex.hpp | C++ | hpp | 2,026 | permissive | // Copyright (c) 2018 Brandon Freitag <freitagbr@gmail.com>
#ifndef CRYPTOPALS_HEX_HPP_
#define CRYPTOPALS_HEX_HPP_
#include <string>
namespace cryptopals {
namespace hex {
static const unsigned char encode_table[16] = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
};
sta... |
89160e02a9a6274d6068a2e210016f42f7f49caa | dbcb5f07dba458e7eaec4a658516687b388e305f | BUAAZYF/POJ | /3368/3368.cpp | C++ | cpp | 1,804 | no_license | #include <cstdio>
using namespace std;
const int MAX = 100005;
int inline max(int a, int b) {
return a >= b ? a : b;
}
int inline min(int a, int b) {
return a <= b ? a : b;
}
int n, q, A, B, a[MAX], preidx[MAX], postidx[MAX], t[MAX * 4];
void build(int a[], int v, int tl, int tr) {
if (tl == tr) t[v] ... |
b3c9df21dbd0b59ed3d3dd6f3a37866c71248126 | 9856026f1104b20a484fcd1c65554281d31c5ea2 | junk13/ArpPoisonning | /main.cpp | C++ | cpp | 1,931 | no_license | /*!
* \file main.cpp
* \brief Program's entry point.
* \author Jeremy ZYRA
*/
#include <iostream>
#include <pcap.h>
#include <unistd.h>
#include "ArpSpoofing.hpp"
using namespace std;
/*!
* \brief Function for print usage.
*/
void printUsage(char *name) {
cout << "NAME" << endl;
cout << "\tArpPoisonning" << ... |
5be28fb4972944df997c9821a3386410dda8d39c | 89b17678cb9c3ff534b9dd0a230c4aa8a444904c | violetForeden/chromium | /content/test/navigation_simulator_impl.cc | C++ | cc | 59,235 | 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 "content/test/navigation_simulator_impl.h"
#include <utility>
#include "base/bind.h"
#include "base/debug/stack_trace.h"
#include "base/memory/p... |
6ec5ad1afb30ea20b42b5822135e8395679ee9a3 | 701a59df8fc48addf30f3b546357b889645dbd5a | TU-Clausthal-Rendering/Mufflon | /src/core/scene/materials/material_sampling.hpp | C++ | hpp | 9,884 | permissive | #pragma once
#include "material_definitions.hpp"
#include "medium.hpp"
#include "core/export/core_api.h"
#include "core/scene/types.hpp"
#include "util/log.hpp"
#include "util/assert.hpp"
#include "microfacet_base.hpp"
#include "lambert.hpp"
#include "oren_nayar.hpp"
#include "emissive.hpp"
#include "blend.hpp"
#incl... |
8ddb06f22ef52cadbd5f9ea7b95866c6cc821707 | 2fa6d527609ba2a20c5ae3da3b51126b3afa7904 | jeb2239/PongNet | /Ball.cpp | C++ | cpp | 3,088 | permissive | #include "Ball.hpp"
#include "Constants.hpp"
#include "Player.hpp"
#include "State_generated.h"
namespace Pong::Net {
Ball::Ball() :
vx((rand() % 2 == 0) ? BALL_INIT_SPEED : -1 * BALL_INIT_SPEED),
vy(-0.5f),
speed(BALL_INIT_SPEED),
mBall((SCREEN_WIDTH / 2), (SCREEN_H... |
044d3329fd1ce32f015fe47e905d0fcbb1c2a84c | ad844c28d869f237bc78f26bfb4343a16111475a | 5GApp/nebula | /src/graph/test/DeleteEdgesTest.cpp | C++ | cpp | 10,470 | permissive | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "graph/test/TestEnv.h"
#include "graph/test/TestBase.h"
#include "meta/test/TestUtils.h"... |
97148a215d6a50014033e6e7a9f5bd46f0c8af97 | cd8a114e7f158ba6936fdbbb0b1ca9081955e58c | cha63506/chromium-44 | /chrome/browser/ui/toolbar/wrench_menu_model.cc | C++ | cc | 18,224 | permissive | // Copyright (c) 2010 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/toolbar/wrench_menu_model.h"
#include <algorithm>
#include <cmath>
#include "app/l10n_util.h"
#include "app/menus/button... |
f1611fbf6ec6834026b1ca401e7ceb84227107e8 | fbeeff3ca793be991eb3f4d07814f1d46bfe8356 | Danheim89/libcoin | /tests/unit_tests/test_format_utils.cpp | C++ | cpp | 8,819 | no_license | // Copyright (c) 2012-2013 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "gtest/gtest.h"
extern "C"
{
#include "crypto/random.h"
}
#include "common/util.h"
#include "currency_core/cur... |
248f4bd63b721409ca57f3b5671da90953a298d6 | e1c9f88fa95be316668b59d7968cb58cfecd290f | aydar-sheffield/Chaste | /lung/src/common/LungTools.hpp | C++ | hpp | 1,857 | permissive | /*
Copyright (c) 2005-2019, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
da75c933d56398cf3ae351740852359ee437b464 | 5986456aa0f6d34fb0031393a5b2faf34fc12fbf | metux/chromium-suckless | /device/media_transfer_protocol/media_transfer_protocol_manager.cc | C++ | cc | 27,571 | 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 "device/media_transfer_protocol/media_transfer_protocol_manager.h"
#include <algorithm>
#include <map>
#include <memory>
#include <queue>
#i... |
12c1e579c259c4f3030722507080a946f7c45dd4 | 061a7cb986fd7b0ba85eda080856da2cf87aaaed | jatin69/mca201-DS | /assignment-1/1-stack_growth.cpp | C++ | cpp | 781 | permissive | /*
* Author : Jatin Rohilla
* Date : 15/03/2018
*
* Editor : Dev c++ 5.11
* Compiler : g++ 5.1.0
* flags : -std=c++11
*
* Question : Does the stack grow upward or downward.
* Solution : Output of the below program is :
*
* Address of a1 : 0x72fe1c
* Address of b1 : 0x72fe18
* Address of a2 : 0x72fdd... |
02ab095d64eb1f0543167d6f16256ed4cacc482c | 1c044d7b59cfc60d289717f800da20e54cb5263f | LandReagan/GameOfLife | /include/utils_debug.hpp | C++ | hpp | 419 | no_license | //
// Created by landry on 01/09/2019.
//
#ifndef GAMEOFLIFE_UTILS_DEBUG_HPP
#define GAMEOFLIFE_UTILS_DEBUG_HPP
#include <string>
#include <iostream>
#include "GolWindow.hpp"
namespace gol {
std::string
describe_window(const GolWindow& window) {
std::cout << "GolWindow at x:" << window.getPosition().x << " y:" ... |
000c932f6bec3034076c5c2ded5adfa43f63ea96 | f0d15a4b4121176cd90c79aa7aeb63c623419e53 | ulliwy/cpp_piscine | /d04/ex01/SuperMutant.cpp | C++ | cpp | 1,493 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* SuperMutant.cpp :+: :+: :+: ... |
53ba2452d4c2e576113e1f00c4b94b47e791d0f1 | 9a72b0d0997889691bc9fe38b2735ef18968c815 | Siwan-min/CPP_Language | /Chapter05/05-3-ReturnObjCopycon.cpp | C++ | cpp | 569 | no_license | #include <iostream>
using namespace std;
class SoSimple
{
private:
int num;
public:
SoSimple(int n) : num(n)
{ }
SoSimple(const SoSimple& copy) : num(copy.num)
{
cout<<"Called SoSimple(const SoSimple& Copy)"<<endl;
}
SoSimple& AddNum(int n)
{
num+=n;
return *this;
}
void ShowData()
{
... |
e7f0ed0c0ac49ad379dba0c2f6c19c6e8721aae4 | f85b10151a4c7b710ebe9c40cc3a981fd1dad53f | andyLaurito92/haikunet | /debug/atomics/vector/index_selector.cpp | C++ | cpp | 1,301 | permissive | #include "index_selector.h"
void index_selector::init(double t,...) {
//The 'parameters' variable contains the parameters transferred from the editor.
va_list parameters;
va_start(parameters,t);
//To get a parameter: %Name% = va_arg(parameters,%Type%)
//where:
// %Name% is the parameter name
// %Type% is the param... |
4eeb0df22bfb9f08bca156ee9ab1b97e8f67c421 | 9bc7e86cb050c90bddfda076cf0e6fef1671edbc | dostos/MNN | /source/core/ConvolutionCommon.cpp | C++ | cpp | 15,850 | permissive | //
// ConvolutionCommon.cpp
// MNN
//
// Created by MNN on b'2020/03/02'.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include "half.hpp"
#include <math.h>
#include "ConvolutionCommon.hpp"
namespace MNN {
static inline void *MNNMemoryAllocAlignZeroAlign(size_t size) {
return MNNMemoryCallocAlign(size... |
7c40ab7878a3bff2ae9e0d88c6214d7b6d9531f6 | a48185b38c65aa82ca77abbc94469f6b4a6175c3 | veinyyxy/IDP_OLD2 | /EarthquakeDataProvider/On_MECA7_Draw.cpp | C++ | cpp | 872 | no_license | #include <osg/Billboard>
#include <osg/ShapeDrawable>
#include <osg/Shape>
#include <osg/PositionAttitudeTransform>
#include <osg/MatrixTransform>
#include <osgUtil/UpdateVisitor>
#include <osgUtil/CullVisitor>
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
#include <QtCore/QTextStream>
#include <QtCore/Q... |
4490c71bf2e3de77c4a1484a7e710674656dd14c | a87c529c8ae5a1e4d87374bb60496fbb05fe8d10 | ghkdtlsgus/2DAPI | /170310_winAPI/Maptool.cpp | C++ | cpp | 10,303 | no_license | #include "stdafx.h"
#include "Maptool.h"
HRESULT Maptool::init()
{
// Screen m_x
m_Screen_X = 0.0f;
m_Screen_Y = 0.0f;
check_isdata = 0;
// RC 값 초기화
Rc[0] = { 0,0,1100,700 }, Rc[1] = { 1120,0,1450,700 }, Rc[2] = { 1120, 0, 1180, 25 }, Rc[3] = { 1180,0,1240,25 } ,Rc[4] = {10,710,110,760};
Rc[5] = { 130,710,... |
22ca13f389044dae2cb007995fc0bc66d0c2071e | 719f3420617ea031bd5788fa3578d920ccff608e | backintown/osu-cs165 | /week9/postfixEval.cpp | C++ | cpp | 1,843 | no_license | /*****************************
** Date: 5/30/2018
** Author: Alex Cheng
** Description:
This program takes in a c-string of numbers and operators and calculates the
result using postfix evaluation.
******************************/
#include <cstring>
#include <iostream>
#include <stack>
using std::atof;
using std:... |
b9bff24aa2eb3addb3f941a50dc8e2d400ab64a3 | e12a6d1baf9703ce86e29193d6b7f3072b9ed7ec | prithvikumar03/dev-challenge-Master-Mind-Game | /ProjMasterMind/src/src.com.mastermind/SeqComparator.cpp | C++ | cpp | 1,348 | no_license | /*
* SeqComparator.cpp
*
* Created on: Sep 4, 2016
* Author: root
*/
#include "SeqComparator.h"
#include <iostream>
namespace std {
SeqComparator::SeqComparator() {
// TODO Auto-generated constructor stub
}
SeqComparator::~SeqComparator() {
// TODO Auto-generated destructor stub
}
std::string SeqCom... |
eb37169e9ab2c0c3a5064b1a966aadda55821d93 | 03bde3589bbd86797e638ea23cef97d7e6c6a2f4 | freddiejbawden/hot-wheels | /include/fontmanager/fontmanager.hpp | C++ | hpp | 541 | no_license | #pragma once
#ifndef FONTMANAGER
#define FONTMANAGER
#include <SDL_ttf.h>
#include <string>
#include <unordered_map>
class FontManager {
public:
static int DEFAULT_TEXTSIZE;
static FontManager* getInstance();
int getWidthOfText(std::string font,int size, std::string text);
int getHeightOfText(std::st... |
f337dab5da60d2b820804744e26c6f93717aab67 | 59caaa0e862bc8242387c12113a887cd732e6cee | randyli/google-input-tools | /client/imm/test_main.cc | C++ | cc | 1,413 | permissive | /*
Copyright 2014 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... |
cd6c20943bec2a534a012fc99b83bbfe3a285281 | 246bc6b08cafcfd720e3bb2388f0ed75646c1d61 | ho1to/bitcoinx-bitcore | /src/rpc/blockchain.cpp | C++ | cpp | 77,464 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpc/blockchain.h"
#include "amount.h"
#include "base58.h"
#include "chain.h... |
a353cc460873abccccd7d578d6e87f598a2bf29a | 0ed881eeae0aee52921ccf02765a02d373643d46 | iamvickynguyen/Kattis-Solutions | /islandhopping.cpp | C++ | cpp | 1,788 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef priority_queue<int, vector<int>, greater<int>> minpq;
typedef unordered_set<int> usi;
typedef unordered_map<int, vi> ivi;
typedef unordered_map<int, int> ii;
#... |
d0d315fca1491da0bdfb4b90bec5d21d506f5542 | cf3c19b88b2d54e93da11aef393afc3310c1d8d7 | pindaroli/hhvm | /hphp/runtime/vm/jit/code-gen-helpers-arm.cpp | C++ | cpp | 7,471 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
+---------... |
e4a71f123e3c2e306794eff8e7bbfbe1b1eb05b9 | 03a6ca83a909143c3dd9987fa8130858f357e668 | Emecy2a/Projet-Deep-Learning-Doom | /vizdoom/src/vizdoom/src/p_sight.cpp | C++ | cpp | 18,421 | permissive | //**************************************************************************
//**
//** p_sight.cpp : Heretic 2 : Raven Software, Corp.
//**
//** $RCSfile: p_sight.c,v $
//** $Revision: 1.1 $
//** $Date: 95/05/11 00:22:50 $
//** $Author: bgokey $
//**
//*******************************************************************... |
00bc22e20283229c148326ad212b730a92657d65 | 6feaeff12bf8e0d76de9e19d92e97d18d4ce3f84 | jenhaoyang/dart | /dart/collision/ode/OdeCollisionDetector.cpp | C++ | cpp | 9,770 | permissive | /*
* Copyright (c) 2017, Graphics Lab, Georgia Tech Research Corporation
* Copyright (c) 2017, Personal Robotics Lab, Carnegie Mellon University
* All rights reserved.
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, with or
* without mod... |
0fe2ba9bffa2036ccdb7527e00339f7c598dd389 | 90e29e77799ea39cd56d56823586cbbba9a77709 | zegit20/ExpressionEvaluator | /My_Calc.cpp | C++ | cpp | 7,019 | no_license | #include <iostream>
#include <stack>
using namespace std;
bool evalute(const char* expression, int& result);
bool calculate_expression(int operand1, int operand2, char operator1, int& result);
int main()
{
char* exp = new char[51];
char ch;
int result1;
bool repeat_flag = true;
std::cout <<... |
7d1bbbb204eaa25d4491e432e406b2603381d980 | 207ad2a0acdb5305522a41381e43ffd82968fe32 | diasurgical/scalpel | /psx/_dump_/40/_dump_c_src_/diabpsx/psxsrc/fmv.cpp | C++ | cpp | 7,362 | permissive | // C:\diabpsx\PSXSRC\FMV.CPP
#include "types.h"
// address: 0x801518E4
// line start: 295
// line end: 301
void _cd_seek(int sec) {
// address: 0xFFFFFFE0
// size: 0x18
auto struct CdlFILE RetFile;
}
// address: 0x8015191C
// line start: 315
// line end: 324
void init_cdstream(int chunksize, unsigned char *b... |
98d691166f69a625e4178b01393c39d867f41aec | 3731dc673806f6cf28a99ad88e836e8a94756669 | elirex/uva | /problems/UVa10611_ThePlayboyChimp.cpp | C++ | cpp | 1,536 | no_license | /*
* UVa 10611 The Playboy Chimp
* Author: Elirex (Wang Sheng-Yuan)
* Date: 2015-11-10
*/
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
vector<unsigned int> lady;
int mid;
void binarySearch(unsigned int key, int length) {
int low = 0;
int high = length -1;
uns... |
96ace0f2231decc4b6f9d1a4bfd5f5997083d248 | 2f01696846e45aa6153d64b9495d4784013e247d | benbucksch/AppWare | /Internet AppWare Source Code/AW16_2/OBJECTS/SCALE/VISCALE.CPP | C++ | cpp | 23,555 | no_license | /*//////////////////////////////////////////////////////////////
//
// Copyright 1993, Novell, Inc. All rights reserved
//
// THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL,
// PROPRIETARY, AND TRADE SECRET INFORMATION OF NOVELL, INC.
// ACCESS TO THIS WORK IS RESTRICTED TO (I) NO... |
6ae04aea1f16dc1c90a4f2953cf6f28f2af7de07 | 8190c0ae2117f45d8eb332eef685ef38cf29362f | liang0/chromium | /ui/aura/window_unittest.cc | C++ | cc | 127,420 | 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 "ui/aura/window.h"
#include <limits.h>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/compiler_sp... |
4a4e061c7c2c7f911321c2d3dad7edcb399c58d6 | be96f34c84bcbb47377e2c350c274d556071e755 | Vovan-S/SmoothsortCPU | /simulator/src/main.cpp | C++ | cpp | 205 | no_license | #include "simulator.h"
#include <QApplication>
int main(int argc, char *argv[])
{
qDebug("started");
QApplication a(argc, argv);
Simulator w;
w.show();
return a.exec();
}
|
d082254464213ab6a54be9758859c4781850b38c | 391f6f23149fa1b30955e51e71559a383208f80b | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/inetcore/outlookexpress/mailnews/bactrl/baui.cpp | C++ | cpp | 90,674 | no_license | // baui.cpp : Implementation of CMsgrAb
// Messenger integration to OE
// Created 04/20/98 by YST
#include "pch.hxx"
#include "bactrl.h"
#include "baprop.h"
#include "baui.h"
#include "mimeutil.h"
#include "menuutil.h"
#include "fldbar.h"
#include "bllist.h"
#include "inpobj.h"
#include "note.h"
#include "dllmain.h"
#... |
d8e45761bef8f06b1945423bb7fd911b48861af6 | 35c8d8748dda662e0f9e05a58679c702ad6c05bd | alldatacenter/alldata | /olap/ByConity/src/Functions/formatDateTime.cpp | C++ | cpp | 31,132 | permissive | /*
* Copyright 2016-2023 ClickHouse, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... |
5aadf12b0daa40059eb615aaf9148d962001c7bd | 47a0bd264ab4a40d0a1ce16dfcc1227cce95c3a8 | craftycodie/ElDorito-Headhunter | /ElDorito/Source/CommandMap.cpp | C++ | cpp | 13,901 | no_license | #include "CommandMap.hpp"
#include <algorithm>
#include <sstream>
#include "ElDorito.hpp"
#include "Blam\BlamNetwork.hpp"
namespace Modules
{
Command::Command() : UpdateEvent(0), ValueInt(0), ValueFloat(0.f), DefaultValueInt(0), DefaultValueFloat(0.f), ValueIntMin(0), ValueIntMax(0), ValueFloatMin(0.f), ValueFloatMa... |
2a671579fee5ffdfb27bc3b967d1658bcf8f2208 | 66085353f65e14d6ac6946b7d360016482e49c76 | departed-trailblazer/swift | /lib/Sema/DerivedConformanceCodable.cpp | C++ | cpp | 84,424 | permissive | //===--- DerivedConformanceCodable.cpp - Derived Codable ------------------===//
//
// 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... |
6c5514192777d5351d9976d2b9f869c7fd00bf6f | 7e6f99e72c93a6461f52367174ee16ebaac9d9ca | denley-docker/boost_test | /src/serial_port.cpp | C++ | cpp | 3,515 | permissive | #include "serial_port.h"
#include "serial_helper.h"
#include "log/log.h"
#include <cassert>
#include <vector>
#include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/bind.hpp>
using namespace boost::asio;
class SerialPortTimer
{
public:
SerialPortTimer(io_service& io, SerialPort* serialPort, unsigned i... |
6d8b96e410a77622a43e591c384179b79cd4bb0c | aba813870c2763d247e7762625cd6558fd70a7ba | mlange05/atlas | /src/atlas/grid/Grid.cc | C++ | cc | 4,414 | permissive | /*
* (C) Copyright 2013 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergo... |
73ba517459f63a960e2a38e61228eb54317319df | 9fb6bade28bda8c5ce89ece33aac668f5516e242 | georgesuarez/CSE-460 | /Labs/Lab6/pthreads_demo.cpp | C++ | cpp | 1,178 | no_license | // pthreads_demo.cpp
#include <pthread.h>
#include <stdio.h>
using namespace std;
//The thread
void *runner ( void *data )
{
char *tname = ( char * )data;
printf("I am %s\n", tname );
pthread_exit ( 0 );
}
void *runner2 ( void *data )
{
char *tname = (char *)data;
printf("This is a different thread which... |
27a0d3528bbb229a658914ae2283379dc0270fcd | 8b4b92a0f7b8d31d89af6b39ca3cbf6a0551a86c | jgbyrne/serenity | /Services/ProtocolServer/main.cpp | C++ | cpp | 2,756 | permissive | /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright noti... |
680a964cc10c553d30b1ee3ed508b3011925aab9 | 5e36a1f5abab10ab53a5627134fb203971e3d9a8 | tomasalonso/TP3-AyED3 | /codigo/extras.cpp | C++ | cpp | 973 | no_license | #include "extras.hpp"
#include "Movimiento.hpp"
#include <iostream>
// Combinaciones posibles de vector de vectores
template<typename T>
vector<vector<T> > combinar(vector<vector<T> > &vs) {
vector<vector<T> > res;
if (vs.empty()) {
return res;
}
if (vs.size() == 1) {
res.resize(vs[0]... |
56f28d5d3741d5c61aae49fe89dc33f866dc0802 | 2be5b0807d94225d4444bc0877480722078950c9 | vishnu0503/Interview_Programms | /Amstrong.cpp | C++ | cpp | 337 | no_license | #include<stdio.h>
int main()
{
int n,i,sum=0,temp,remainder;
printf("Enter a number :");
scanf("%d",&n);
temp=n;
while(n!=0)
{
remainder=n%10;
sum=sum+(remainder*remainder*remainder);
n=n/10;
}
if(sum==temp)
printf("%d is a Amstrong number",temp);
else
printf("%d is not a Amstrong numbe... |
a0258ff951b26a97aac48252b9a6c1cc3301080a | f84aefbd0409dbfc3620633300acac298797bceb | kungfu-monkey/Supernova | /Supernova/projects/devices/pcb/device_pcb_napoli_051D.cpp | C++ | cpp | 19,076 | no_license | //<MStar Software>
//******************************************************************************
// MStar Software
// Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
// All software, firmware and related documentation herein ("MStar Software") are
// intellectual property of MStar Semiconduc... |
f691ad2458461a66411a1ba6d8ff9622666e1df0 | fc46159a000d9a046218fa45a880d4d9d2cf41d0 | El-Pistoleo/lab2 | /lab2/lab2/CreationDechetTraiteNonRecyclable.cpp | C++ | cpp | 476 | no_license | #include "CreationDechetTraiteNonRecyclable.h"
CreationDechetTraiteNonRecyclable::CreationDechetTraiteNonRecyclable(UsineTraitement* usineTraitement)
{
Compteur::ajouterConstructeur();
this->usineTraitement = usineTraitement;
}
CreationDechetTraiteNonRecyclable::~CreationDechetTraiteNonRecyclable()
{
Compteur::... |
0128017bd048b57f249b06b5013b7952b83b3e0b | ac43ffa49e916f4eae6d038b8010a68d4cbfab86 | auroraleso/spectroscopy-lab | /Camera di Bragg/Root programs_Bragg/fitParab.cc | C++ | cc | 4,353 | no_license |
#include <iostream>
#include "TROOT.h"
#include "TMath.h"
#include "TStyle.h"
#include "TCanvas.h"
#include "TF1.h"
#include "TGraphErrors.h"
#include "TFitResult.h"
#include "TMatrixDSym.h"
/* ------- come usarmi --------
nel file metti Q, Vout, 0, errVout
-------... |
4547131603ed39876a98a70a05f53d0c3195c42a | 5684b287a6862b9b6239857b2960121615e5fe1b | Mohim-Singla/Data-Structures | /Disjoint Sets/Disjoint_sets(Union).cpp | C++ | cpp | 1,007 | no_license | #include <bits/stdc++.h>
using namespace std;
int find(int arr[], int i)
{
if (arr[i]==-1)
{
return i;
}
return find(arr, arr[i]);
}
void union_fun(int arr[], int first, int second)
{
int abs_par1=find(arr, first);
int abs_par2=find(arr, second);
if (abs_par1==abs_par2)
{
... |
30673ada65ade5a2c0059b12bf4cf659e1f60fd7 | f1f382b802e8cdf9ce0089b15e968d316ad5d257 | probins96/CMSC240-Final | /IntSection.cpp | C++ | cpp | 1,340 | no_license | #ifndef __INTSECTION_CPP__
#define __INTSECTION_CPP__
#include "Lane.h"
IntSection::IntSection(const IntSection& sec) : Section(sec) // const copy constructor
{
traf = sec.traf;
out = sec.out;
back = sec.back;
}
IntSection::IntSection(TrafficLight& tl, Lane::Direction dir, int i) : Section(dir, i) // constructor
... |
04ff1fb0326092a131a86f0f6b194ab7afa406dd | 129d5b59b94906975a17d876df010f51514429e4 | pixowl/cocos2d-x-pxengine | /cocos/scripting/javascript/bindings/js_manual_conversions.cpp | C++ | cpp | 69,164 | no_license | //
// Created by Rohan Kuruvilla
// Copyright (c) 2012 Zynga Inc. All rights reserved.
//
#include "ScriptingCore.h"
#include "js_bindings_config.h"
#include "js_manual_conversions.h"
#include "cocos2d_specifics.hpp"
USING_NS_CC;
// JSStringWrapper
JSStringWrapper::JSStringWrapper()
: _buffer(nullptr)
{
}
JSStrin... |
7c55cc896a2786140139184d442ca19ed5a68035 | 8f6eeafb168e0b5b2df8ec7fb33bf225b8f8623f | alexagra/ioarduino | /IOardu.cpp | C++ | cpp | 1,186 | no_license | #include "IOardu.h"
#include "Arduino.h"
Input::Input(int pin)
{
pinIn = pin;
pinMode(pinIn, INPUT);
}
Output::Output(int pin)
{
pinOut = pin;
pinMode(pinOut, OUTPUT);
}
int Input::read()
{
value = digitalRead(pinIn);
return value;
}
int Input::readAN()
{
value = analogRead... |
052bc0fe4d870bfc43e081e7fc00583a60e99cda | 5e46dab654f392e08aff88f2a0deaa13b95452d3 | Youngermaster/Learning-Programming-Languages | /C++/Programación ATS/ProblemaCondicionalesATS5.cpp | C++ | cpp | 689 | permissive | /*
* Quinto problema de condicionales con ATS
*
* Juan Manuel Young Hoyos
*
* Escriba un programa que haga lo siguiente:
*
* Escriba un programa que lea un caracter y diga si es mayuscula y minuscula.
*
*/
#include <iostream>
using namespace std;
int main()
{
char letra;
cout << "Septimo problema de condicion... |
a8e422fd639b63253529c080d2fa36df1eb10c58 | 52699e76fd3f7c750dfa91d74f7239158de989af | tonydurham01/v8 | /src/x64/macro-assembler-x64.cc | C++ | cc | 148,262 | permissive | // Copyright 2012 the V8 project authors. 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 must retain the above copyright
// notice, this list of ... |
7075fbae7832bea6058f5bc14dc647a981ff6539 | 27f8b6f75644a083ffc289f09cab414019b01afe | 00riddle00/BSc1-ProgrammingCpp | /ex5/task_2/tauto.cpp | C++ | cpp | 2,139 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "automobilis.h"
using namespace std;
Automobilis automobilis01("Toyota", "Avensis", 1.8, 2000, 2500);
int main(int argc, char *argv[]) {
string separator = "-------------------------\n";
const size_t size = 3;
automobili... |
28cfd7056df456e77539612d2b53ce5ae36a4f34 | 57e8859c5ba79e029437487373a21e84f66423f5 | gokulp01/webots | /src/wren/StaticMesh.cpp | C++ | cpp | 75,799 | permissive | // Copyright 1996-2020 Cyberbotics Ltd.
//
// 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 agr... |
4ef64bdc09e487b9b25fc2d1d36be67c493e460e | e882fe840627cffd43c0dd5f6aaf469dd11b6516 | fangzhouxie/spring2020_15618_project | /instrument.cpp | C++ | cpp | 2,289 | no_license | /* Adapted from https://github.com/cmu15418/asst3-s20/blob/master/code/instrument.cpp
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if OMP
#include <omp.h>
#endif
#include "cycletimer.hpp"
#include "instrument.hpp"
#define MAX_THREAD 64
/* Instrument different sections of program */
static const ... |
98b02de8ebd275a23313c1a1c0149103912a7b63 | 5ffb4f2c4c9ee977c499d0b1468aac5a68f6a9a4 | shoufei403/navigation_learning | /navigation_tutorials/simple_navigation_goals_tutorial/src/simple_navigation_goals.cpp | C++ | cpp | 3,181 | no_license | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following cond... |
4960ec263a0591fd13321e6b33b290cf25d754a4 | 7f83ee44f7ba28fc6d0a7b0f9a10e7fd832b67ac | ZYQ634455388/Network-capture | /code/capture.cpp | C++ | cpp | 12,821 | no_license | #include "capture.h"
#include <QDebug>
#include <QString>
Capture::Capture(){
this->isDome = false;
}
bool Capture::setPointer(pcap_t *pointer){
this->pointer = pointer;
if(pointer)
return true;
else return false;
}
void Capture::setFlag(){
this->isDome = true;
}
void ... |
30940b9b1db2a85f49706b02684515b46fd0dee2 | 3baca714cd0d31707740d36a52b579c72de59914 | zwcih/kaldi-ctc | /src/nnetbin/rbm-train-cd1-frmshuff.cc | C++ | cc | 9,922 | permissive | // nnetbin/rbm-train-cd1-frmshuff.cc
// Copyright 2012-2013 Brno University of Technology (Author: Karel Vesely)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
... |
aa40b29c900eb741257d3818476e705dba6410eb | 96c72fc9e6eea75fb772b8e9a521eb24f84437d0 | MiguelJG/cppassignments | /practica6/DNI.cpp | C++ | cpp | 499 | no_license | #include "DNI.h"
DNI::DNI(void){
key_ = rand() % 100000000;
}
int DNI::get_key(void) const{
return key_;
}
// conversion de DNI a unsigned long -> type-cast operator
DNI::operator unsigned long() const{
return (unsigned long)key_;
}
int DNI::operator<(const DNI& M){
comp_++;
unsigned long a ... |
847874762663e37f30fffc42599132f87a9a090d | 170dcfe79b49dd57e4a415d2dbd14f654371f260 | kainino0x/deqp | /modules/glshared/glsShaderLibraryCase.cpp | C++ | cpp | 49,489 | permissive | /*-------------------------------------------------------------------------
* drawElements Quality Program OpenGL (ES) Module
* -----------------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use ... |
34784c61b9823405d77fd6aebddc97470a335dad | eaa7870130b2278804fc5d2b85b115bdaf76f704 | sto0pkid/AutoNomic | /cppout.cpp | C++ | cpp | 47,516 | no_license | //#define CPPOUT
//#define simple_cppout
//simple_cppout is partially working
//stoopkid doesn't compile
//unrolled doesn't compile
//ultimate doesn't compile
#ifdef CPPOUT
#define CPPOUT2
fstream out;
#ifdef simple_cppout
/*
first, simple and naive cppout.
body becomes nested whiles calling predxxx ... |
21bd0e98a4d27277d5c4c28f9753b5f98e1f0f7c | 29cc8dc071ab622cccea4775f7c4d5963bbb988d | ttohin/jevo-viewer | /Classes/UIConfig.cpp | C++ | cpp | 630 | no_license |
#include "UIConfig.h"
namespace jevo
{
namespace graphic
{
const float kTileFrameSize = 32.f;
const int kSpritePosition = 32;
const double kSpriteScale = 28;
const float kViewportMargin = 00.f;
const int kSegmentSize = 50;
const bool kAnimated = true;
const bool kRedrawEachUpdate = fa... |
8fe3ebc7aff716e96d33f2bca1463c5cc628c7b5 | 5e55ab587a6a6c9bfb62e4501ab086dcd1702f6b | yenluu2506/Lap-Trinh-C- | /bai9.cpp | C++ | cpp | 239 | no_license | //Bai 9: Tinh T(n) = 1 x 2 x 3…x N
#include<stdio.h>
#include<math.h>
int main(){
int n;
float s=1;
printf("Nhap n: ");
scanf("%d", &n);
for(int i=1; i<=n; i++){
s=s*i;
}
printf("Tong s la: %.2f", s);
return 0;
}
|
0e141319510305e4cf1ff813b418abcb403cbaf2 | b2c2ebaa4eefadec0ea0769c24064c87e0aa6904 | l3vi-7/Programming | /Coursera/Data Structures/week4_binary_search_trees/3_is_bst_advanced/is_bst_hard.cpp | C++ | cpp | 1,515 | no_license | #include <algorithm>
#include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define ll long long int
using std::cin;
using std::cout;
using std::endl;
using std::vector;
struct Node {
ll key;
ll left;
ll right;
Node() : key(ULLONG_MAX), left(-1), right(-1) {}
Node(ll key_, ll left_, ll right_) : ke... |
f35b9dc634ccffe36ac6ed3ef7720a7795e9b57b | 6b872eb8dc4a2533a66b2bd1e70cd8e2d256fd29 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function13729/function13729_schedule_18/function13729_schedule_18_wrapper.cpp | C++ | cpp | 858 | no_license | #include "Halide.h"
#include "function13729_schedule_18_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){Halide::Buffer<int32_t> buf0(1024, 256, 256);
init_buffer(buf0, (int32_t)0);
... |
9b6f76c15288838c826c43aa540259691ecdb200 | dd9deec13c7d3e104ef9bbe4c25e804bc252e544 | DahamChoi/Programmers | /가장 긴 팰린드롬/가장 긴 팰린드롬.cpp | C++ | cpp | 538 | no_license | #include <iostream>
#include <string>
#include <iostream>
using namespace std;
int solution(string s)
{
int answer = 0;
for (int i = 0; i < s.length() - answer; i++) {
for (int j = s.length() - 1; j >= i; j--) {
int left = i, right = j;
while (left + 1 < right - 1 && s[left] =... |
cb09ca725abba9df746a16c24adcfa97bec49777 | 2d70a0cafac33ca7eeb43884d45f40a9689a1709 | lydrainbowcat/tedukuri | /配套光盘/正文包含的程序片段/0x32 factor.cpp | C++ | cpp | 1,964 | no_license | // 试除法求N的约数集合
int factor[1600], m = 0;
for (int i = 1; i*i <= n; i++) {
if (n % i == 0) {
factor[++m] = i;
if (i != n/i) factor[++m] = n/i;
}
}
for (int i = 1; i <= m; i++)
cout << factor[i] <<endl;
// 倍数法求1~N每个数的约数集合
vector<int> factor[500010];
for (int i = 1; i <= n; i++)
... |
25eebf2fa54b9f0237c5cbbf30d6d0ab3e6ce6ab | d453150701d18d2deebad3dec5712f9e1ada2a9c | dvdkouril/nishikigoi | /src/scenes/FluidsFunScene.cpp | C++ | cpp | 1,394 | no_license | //
// FluidsFunScene.cpp
// nishikigoi
//
// Created by David Kouril on 19/05/2018.
//
#include "FluidsFunScene.hpp"
#include "MeshObject.hpp"
#include "FBXLoader.hpp"
void FluidsFunScene::init()
{
//~ Load object geometries, skeletons, and animations from FBX file
std::vector<MeshObject*> objects = FBXLo... |
f2a49a0af0e591b6e0b7bb746ba787b58e084cfe | df65db381e370878707ed1a4d2d49df414079f8f | michaelanis14/Merply | /View/mainform.cpp | C++ | cpp | 7,468 | no_license | /**************************************************************************
** File: MainForm.cpp
** Created on: Wed Feb 18 2015
** Author: Michael Bishara
** Copyright (C) 2015 Merply - Michael Bishara e.U.
**************************************************************************/
#include "mainform.h"
#include "ma... |
1184851c961edd61aa8d68dea96c7b21470cf495 | efcba7588f90bf12a1ae6545b5776b6412291205 | IntelLabs/pmgd | /test/setproperty.cc | C++ | cc | 5,584 | permissive | /**
* @file setproperty.cc
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017 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 ... |
ff6072868510a512df2b2b4d958e588722fe48c8 | 50eda02da0a9877c4e2992d10fa54ee6cf96ca56 | Peter408/webServer | /http/responses/Response_Created.cpp | C++ | cpp | 500 | permissive | #include "Response_Created.hpp"
#include <iostream>
Response_Created::Response_Created(Resource& RESOURCE) : Response(RESOURCE) {
code = 201;
reasonPhrase = "Created";
}
void Response_Created::send(std::ostream& os) {
std::cout << "creating file..." << std::endl;
std::ofstream file;
f... |
4676cb9825beba933db50265881b5a874003f55f | 107356f2a33df96795deab530a489361afe464e6 | stellariz/FIT-BasicOOP | /Lab_3/World.cpp | C++ | cpp | 731 | no_license | #include "World.h"
World::World(sf::Texture* texture) {
initWorld(texture);
}
void World::initWorld(sf::Texture* texture) {
backgroundSpeed = 30.f;
texture->setSmooth(false);
texture->setRepeated(true);
bgSize.x = texture->getSize().x;
bgSize.y = texture->getSize().y;
bgY = 0.f;
worl... |
de2d30e6ddfe39d1f0c0b23d29f388f2011790b8 | b31e721afda9e505f6154f209fa1babe986385c2 | Dreian/qlatp | /sat/src/parser.cpp | C++ | cpp | 2,563 | permissive | // parser.cpp
// Implementation of a parser for SATLIB input files.
#include <cassert>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iostream>
#include <set>
#include <string>
#include <utility>
#include "resolution.h"
#ifndef DEBUG
#define DEBUG 0
#endif
#define debug_write(obj) \
if (DEBUG) ... |
5cfdcafed4334c32e4fe1ef382bba46a8aa667a0 | 0a45b7f2c5f8aa41a5c3c6c66a414105331061aa | Hyouka21/Programas-en-C | /Empleados.cpp | C++ | cpp | 5,038 | no_license | #include<iostream>
#include <string.h>//libreria string
#include <cstdlib>//libreria de atoi
using namespace std;
struct Sector{
int legajo[4];
double ventaTotal[4];
};
struct Empleados{
char nombre [20];
int legajo;
int sector;
double ventasDia[6];
double ventasTotales;
};
void mostrarDia(int a);
void mostrarSec... |
8075040df4b51143bf26528315d65a3ddedfa0a0 | 4c5b8d946b45381ec1fd0ba679b2c5404407af13 | solisoft/arangodb | /lib/V8/v8-conv.cpp | C++ | cpp | 4,408 | permissive | ////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2021 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.