text string | size int64 | token_count int64 |
|---|---|---|
/*
* EncodeOutput.cpp
* Trogdor6
*
* Created by Paul Hansen on 3/23/11.
* Copyright 2011 Stanford University. All rights reserved.
*
* This file is covered by the MIT license. See LICENSE.txt.
*/
#include "EncodeOutput.h"
#include "SimulationDescription.h"
#include "VoxelizedPartition.h"
#include "opera... | 9,638 | 3,049 |
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
string str;
cin>>str;
int n = str.length();
int part1freq[26] ={0};
int part2freq[26]={0};
for(int i=0;i<n/2;i++)
{
part1fre... | 746 | 327 |
#include "aikido/planner/PlanningResult.hpp"
#include "aikido/planner/SnapPlanner.hpp"
#include "aikido/planner/TrajectoryPostProcessor.hpp"
#include "aikido/planner/World.hpp"
#include "aikido/planner/ompl/BackwardCompatibility.hpp"
#include "aikido/planner/ompl/CRRT.hpp"
#include "aikido/planner/ompl/CRRTConnect.hpp"... | 773 | 316 |
/*
* AudioDefs.h - Definitions for audio I/O
*
* Copyright 1995-2012 The MathWorks, Inc.
*/
#ifndef AUDIODEFS_H
#define AUDIODEFS_H
/* these follow Simulink data types, in simstruc_types.h */
typedef enum
{
AudioDataType_Double = 0, /* double */
AudioDataType_Single, /* float */... | 2,747 | 910 |
#include "internal/logger.hpp"
#include <iostream>
#include <fstream>
#include <iomanip>
#include <chrono>
#include <ctime>
// by default turn on both file and console
// logging behaviors.
#ifndef LIBKEEN_LOG_TO_CONSOLE
# define LIBKEEN_LOG_TO_CONSOLE 1
#endif
#ifndef LIBKEEN_LOG_TO_LOGFILE
# define LIBKEEN_LO... | 2,942 | 1,078 |
#include "AudioManager.h"
CAudioManager::CAudioManager() {
}
CAudioManager::~CAudioManager() {
}
CAudioManager& CAudioManager::Singleton(void) {
static CAudioManager obj;
return obj;
}
void CAudioManager::Play(SoundBufferKey key) {
auto temp = SoundBufferAsset(key);
auto it = std::find(m_pSounds.be... | 4,297 | 1,600 |
//5
// 1 2 0 7 2
//o/p-> 1,3,3,10,12,2,2,9,11,0,7,9,7,9,2,
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
int currsum=0;
for (int i = 0; i < n; i++)
{
currs... | 472 | 231 |
#include <raykernel.h>
#include <exception>
#include <video/VideoStream.h>
#include <processes/processes.h>
#include <ipc/ipc.h>
#include <sstream>
using namespace Kernel;
using namespace Kernel::IPC;
using namespace Kernel::Processes;
/**
* TestFunction used as callback
*/
int TestFunction(int arg2, float arg3)
{
... | 1,689 | 634 |
/***************************************************
Problem: 2783 - Robots
ACM ICPC - North America - Mid Central - 2003/2004
Solved by Andrey Grigorov
***************************************************/
#include <stdio.h>
#include <vector>
#include <queue>
using namespace std;
typedef struct{
int ... | 1,540 | 541 |
#include "grid.h"
void Grid::binarize(ConstVecRef<float> row, VecRef<uint8_t> dst) const {
for (int64_t f = 0; f < features_.size(); ++f) {
dst[f] = computeBin(row[origFeatureIndex(f)], borders_[f]);
}
}
void Grid::binarize(const Vec& x, Buffer<uint8_t>& to) const {
assert(x.device().deviceType()... | 517 | 193 |
#include <cstdio>
using namespace std;
typedef long long ll;
const ll p=10000007;
ll n,f[107][107],t[107];
ll qpow(ll x,ll y){
ll ans=1;
while(y){
if(y&1) ans=ans*x%p;
x=x*x%p; y>>=1;
}
return ans;
}
ll dp(int n,int m){
if(m>n||!n||m<0) return 0;
if(f[n][m]) return f[n][m];
if(n==m||!m) retur... | 699 | 431 |
#include <bits/stdc++.h>
int main(){
std::deque<int> d1;
std::deque<int> d2(5, 10);
std::deque<int> d3(d2);
std::deque<int> d4(d2.begin(), d2.end());
int arr[] = {1,2,3,4,5};
std::deque<int> d5(arr, arr+5);
for(auto &el : d5){
std::cout<<el<<" ";
}
if(d5.empty()){
std::cout<<"Oh No";
}
d1.push_back(10)... | 389 | 222 |
/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
bind.c send a bind to an LDAP server
Abstract:
This module implements the LDAP ldap_bind API.
Author:
Andy Herron (andyhe) 08-May-1996
Anoop Anantha (AnoopA) 24-Jun-1998
Revision History:
--*/
... | 54,704 | 15,649 |
#include <Python.h>
#include "crappy.h"
extern "C" {
#include "crappy_impl.h"
static char crappy_doc[] = "Docstring for crappy.";
#if PY_VERSION_HEX >= 0x03000000
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT,
"crappy",
NULL,
-1,
crappy_methods,
NULL,
NULL,
NULL,
... | 686 | 276 |
#include "jz28.h"
using namespace std;
bool Jz28::IsMirror(TreeNode* left, TreeNode* right)
{
if(left == nullptr && right == nullptr) return true;
else if (left == nullptr || right == nullptr || left->val != right->val) return false; // 迭代终止条件, 遍历完至少一颗树, 或者发现两颗树不是镜像.
return IsMirror(left->right, right->l... | 509 | 239 |
//
// Copyright (c) 2008-2021 the Urho3D project.
//
// 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, m... | 19,834 | 6,616 |
// Copyright 2022 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... | 9,288 | 2,854 |
#include <bits/stdc++.h>
using namespace std;
typedef struct node
{
int data;
string s;
string t;
struct node *next;
}*linkList;
void init(linkList &l)
{
int d;
while(cin>>d)
{
linkList tempNode = (linkList)malloc(sizeof(struct node));
tempNode->data = d;
tempNode->next = l;
l = tempNode;
}
}
void p... | 514 | 234 |
/* Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the Apache License Version 2.0.
* You may not use this file except in compliance with the License.
*
* This program is distributed in the hope ... | 12,610 | 3,947 |
#pragma once
#include "Effect.hpp"
namespace fw
{
class BasicEffect:
public EffectBase
{
public:
BasicEffect();
virtual ~BasicEffect();
void create();
virtual void destroy();
virtual void begin();
virtual void end();
protected:
void createShaders();
};
}
| 292 | 88 |
// igui_BuildButton.cpp // \author Logan Jones
///////////////////////// \date 4/25/2002
/// \file
/// \brief ...
/////////////////////////////////////////////////////////////////////
#include "igui.h"
#include "igui_BuildButton.h"
#include "game.h"
#include... | 4,319 | 1,227 |
#ifndef AUDIO_COMPONENT_HPP
#define AUDIO_COMPONENT_HPP
#include "Component.h"
#include <string>
#include "SoundPlayer.hpp"
class AudioComponent : public Component
{
public:
AudioComponent(const SoundID& soundID);
~AudioComponent();
virtual void update(float elapsedTime) override;
void playAudio(bo... | 471 | 172 |
/*
fuzzylite (R), a fuzzy logic control library in C++.
Copyright (C) 2010-2017 FuzzyLite Limited. All rights reserved.
Author: Juan Rada-Vilela, Ph.D. <jcrada@fuzzylite.com>
This file is part of fuzzylite.
fuzzylite is free software: you can redistribute it and/or modify it under
the terms of the FuzzyLite Lic... | 18,825 | 4,981 |
#include <QString>
#include <QStringList>
#include <QFileInfo>
#include "program_option.hpp"
#include "libs/dsi/image_model.hpp"
QStringList search_files(QString dir,QString filter);
std::string quality_check_src_files(QString dir)
{
std::ostringstream out;
QStringList filenames = search_files(dir,"*.src.gz"... | 2,075 | 729 |
#pragma once
#include "types.hpp"
#include <fmt/core.h>
#include <fmt/ranges.h>
#include <algorithm>
#include <iterator>
namespace data {
class prefix_splitter_t {
public:
prefix_splitter_t(const std::vector<record_decl_t>& records = {}, std::vector<std::string> trivial_types = {});
void add_record(record_de... | 1,193 | 402 |
#ifndef _SHADERTOY_PRE_HPP_
#define _SHADERTOY_PRE_HPP_
#include "shadertoy/shadertoy_export.h"
/// Base namespace for libshadertoy
namespace shadertoy
{
/// Definition of rendering buffers
namespace buffers
{
struct buffer_output;
class basic_buffer;
class program_buffer;
class toy_buffer;
}
/// Shader... | 2,058 | 768 |
/**
* https://blog.csdn.net/Zhanganliu/article/details/79927310
*
*/ | 71 | 36 |
// (C) 2017-2021 by folkert van heusden, released under Apache License v2.0
#include "config.h"
#include <unistd.h>
#include "target_new_source.h"
#include "error.h"
#include "exec.h"
#include "log.h"
#include "picio.h"
#include "utils.h"
#include "controls.h"
#include "source.h"
#include "view.h"
#include "filter.h"
... | 3,048 | 1,429 |
#include "yolox_obb.h"
#include <fstream>
#include <iostream>
#include <sstream>
#include <numeric>
#include <chrono>
#include <vector>
#include <dirent.h>
#include <exception>
#include <opencv2/opencv.hpp>
// #include <xtensor/xarray.hpp>
const char * input_blob_name = "input_0";
const char * output_blob_name = "outp... | 18,988 | 6,502 |
#include "stdafx.h"
#include "metaballs.h"
using namespace std;
using namespace glm;
namespace asdf
{
namespace projector_fun
{
metaballs_t::metaballs_t()
{
balls.reserve(5);
balls.push_back(metaball_t{vec3{0.0f, 0.0f, 0.0f}, 50.0f});
balls.push_back(metaball_t{vec3{-100.0f, 100.0f, 0... | 4,044 | 1,477 |
#include "stdafx.h"
#include "XML_XSL.h"
#include "SRegistryAccess.hpp"
#include "SHResult.hpp"
#include "LogEvent.h"
#include "SLogError.h"
#include "SXML_Print.h"
#include "RemoveAllCharactersInFile.h"
#include "SDelayedDeleteFile.h"
//------------------------------------------------------------------------
SXML_... | 6,349 | 1,867 |
#ifndef debug_hh_INCLUDED
#define debug_hh_INCLUDED
#include "string.hh"
namespace Kakoune
{
void write_debug(const String& str);
}
#endif // debug_hh_INCLUDED
| 165 | 74 |
#include <stdio.h>
int calculo(int anos, int meses, int dias, int result)
{
result = (365 * anos) + (30 * meses) + dias;}
int main()
{
int anos, meses, dias, result,a;
printf("digite sua idade em anos meses e dias");
scanf("%d %d %d", &anos, &meses, &dias);
a = calculo(anos, meses, dias, result);
printf(... | 367 | 155 |
#include "MoveInformation.h"
bool MoveInformation::ParseMove(std::string inTcpMove)
{
if (inTcpMove.size() > 20)
{
//"Invalid inTcpMove string is exceeded the maximal allowed length"
return false;
}
size_t indexOfFirstSemicolon = inTcpMove.find_first_of(";");
_cardName=inTcpMove.substr(0, indexOfFirstSemicol... | 787 | 295 |
#include "utils/dll.hpp"
#ifdef OS_WINDOWS
# include "utils/system.hpp"
#endif
namespace utils {
dll::~dll() {
if (m_handle == nullptr) {
return;
}
#if defined OS_WINDOWS
FreeLibrary(m_handle);
#elif defined OS_LINUX
dlclose(m_handle);
#endif
}
dll::operator bool() const {
return m_handle != nullptr;
}
std... | 930 | 381 |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
vector<int> nodesBetw... | 1,276 | 403 |
/*
* OnlineID.h
*
* Created on: Feb 11, 2018
* Author: Romeo Orsolino
*/
#ifndef RVIZPOLYGONSTOOLS_H_
#define RVIZPOLYGONSTOOLS_H_
#include <locomotion_viewer/ThreeDim.h>
#include <Eigen/Dense>
#include <iostream>
#include <string>
#include <chrono>
namespace locomotion_viewer{
using legs_colors ... | 918 | 357 |
#include "gb_cairo_lines.h"
#include "gb_cairo_box_alpha.h"
#include "gb_cairo_box_gradient.h"
#include "gb_cairo_memmove.h"
int main(int argc, char **argv)
{
GBCairoLineBenchmark gb_cairo_line;
gb_cairo_line.init();
gb_cairo_line.app_state.load_data("../../data/gb_lines.data");
gb_cairo_line.render();... | 919 | 386 |
#include "./sampler.hpp"
#include "./gl-check.hpp"
#include "../utility/logger.hpp"
namespace {
constexpr sint_t kWorkingUnit = GL_TEXTURE4;
constexpr sint_t kMipMapTexs = 4;
constexpr sint_t kTotalTexs = 80;
constexpr sint_t kDimensions = 256;
constexpr sint_t kTotalAtlas = 5;
}
sint_t sampler_t::get_work... | 4,850 | 2,231 |
#pragma once
#include <boost/asio/executor_work_guard.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/use_future.hpp>
#include <spdlog/logger.h>
#include <memory>
#include <thread>
#include <stdexcept>
namespace malloy::detail
{
/**
* Controller configuration.
*/
struct controller_co... | 2,668 | 788 |
#include <iostream>
#include "binary_tree.cpp"
#include "traverse.cpp"
using namespace std;
int main()
{
// create a tree object
binaryTree tree = binaryTree();
// insert 10, 20, 30, 40, 50, 60
cout << "\nAfter adding 10...";
tree.insert_element(10);
tree.print_tree();
cout << "\nAfter... | 1,259 | 452 |
#include "widthhintlabel.h"
#include <gsl/gsl_util>
WidthHintLabel::WidthHintLabel(QWidget* parent) : QLabel(parent) {
initPixmaps();
setAlignment(Qt::AlignCenter);
setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
auto&& pixmap = m_pixmaps[static_cast<int>(State::Neutral)];
setMinim... | 2,113 | 827 |
#include "Cubemap.h"
#include <iostream>
#include "stb/stb_image.h"
Cubemap::Cubemap(std::vector<std::string> paths)
{
glGenTextures(1, &m_GLID);
glBindTexture(GL_TEXTURE_CUBE_MAP, m_GLID);
int width, height, nrChannels;
for (unsigned int i = 0; i < paths.size(); i++) {
unsigned char* data = stbi_load(paths... | 1,134 | 552 |
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... | 1,206 | 420 |
//
// created by Vlad Savchuk on 11/12/2020.
//
#include <cmath>
#include <ModularArithmetic.h>
#include <NoSpecifiedEllipticCurveException.h>
#include "Point.h"
Point::Point(long long x, long long y) {
this->name = "P";
this->x = x;
this->y = y;
this->ellipticCurve = nullptr;
}
Point::Point(std::str... | 2,744 | 1,073 |
#pragma once
#include "i_global_vars.hpp"
#include "../../misc/valve/client_class.hpp"
#include "../../misc/valve/i_app_system.hpp"
class i_base_client_dll
{
public:
virtual int connect(createinterfacefn app_system_factory, i_global_vars_base *p_globals) = 0;
virtual int disconnect(void) = ... | 757 | 256 |
#include "gmLogicCvBase.hpp"
namespace gm
{
namespace Logic
{
namespace Cv
{
Base::Base(const QString& name) : Logic::Base("cv", name)
{
log_trace(Log::New);
this->setRunnable(true);
this->setUseTimer(true);
}
... | 441 | 129 |
// UDP Client Server -- send/receive UDP packets
// Copyright (C) 2013 Made to Order Software Corp.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, o... | 2,363 | 755 |
#pragma once
#include "common/Resource.h"
#include "graphic/vk_render/resource/VkMesh.hpp"
#include "stl/CreviceSharedPtr.h"
struct VkMeshRes {
RID rid;
crevice::SharedPtr<VkMesh> mesh;
};
| 195 | 83 |
/*************************************************************************
*
* Copyright (c) 2016 The Qt Company
* All rights reserved.
*
* See the LICENSE.txt file shipped along with this file for the license.
*
*************************************************************************/
#include <QtGui>
#includ... | 3,458 | 1,350 |
#pragma once
#include <string>
#include <vector>
#include "utils/assert.hh"
#include "utils/scoped.hh"
#include "ir/ops.hh"
#include "utils/symbol.hh"
#include "utils/ref.hh"
#define DEFAULT_SIZE (42)
namespace mach
{
struct target;
}
namespace types
{
enum class type { INT, STRING, VOID, INVALID };
enum class sign... | 7,687 | 2,732 |
/*
* LexParser.h
* Test of OPG Parser.
* Copyright (c) zx5. All rights reserved.
*/
#define CATCH_CONFIG_MAIN
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include "../OPG.h"
#include "../../../include/catch.hpp"
using namespace std;
using namespace Compiler;
const string TEST_FIL... | 1,208 | 460 |
class Solution {
public:
int XXX(string s) {
stringstream it(s);
string tmp;
while (it >> tmp) {
}
return tmp.size();
}
};
| 186 | 58 |
/*
Copyright ©1994-1996, Juri Munkki
All rights reserved.
File: CBasicSound.c
Created: Friday, December 23, 1994, 10:57
Modified: Tuesday, September 3, 1996, 21:27
*/
#include "CBasicSound.h"
#include "CSoundHub.h"
#include "CSoundMixer.h"
#include <assert.h>
void CBasicSound::Release() {
i... | 10,370 | 3,634 |
#include "config.hpp"
#include <iostream>
#include <stdexcept>
#include <spdlog/spdlog.h>
#include <glad/glad.h>
#include "vfs.hpp"
#include "shader.hpp"
namespace ORCore
{
static std::shared_ptr<spdlog::logger> logger;
static int _programCount = 0;
Shader::Shader(ShaderInfo _info): info(_info)
{
... | 5,408 | 1,804 |
// Author: Jin Qing (http://blog.csdn.net/jq0123)
#ifndef RPCZ_REQUEST_HANDLER_PTR_H
#define RPCZ_REQUEST_HANDLER_PTR_H
#include <boost/shared_ptr.hpp>
namespace rpcz {
class request_handler;
typedef boost::shared_ptr<request_handler> request_handler_ptr;
} // namespace rpcz
#endif // RPCZ_REQUEST_HANDLER_PTR_H... | 321 | 140 |
#include "Common.hh"
#include "static-data.hh"
namespace emlsp::rpc::lsp::data {
#if 0
std::string const initialization_message =
R"({
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"trace": "on",
"locale": "en_US.UTF8",
"clientInfo": ... | 719 | 245 |
// Mono Native Fixture
// Assembly: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// Namespace: System
// Name: OverflowException
// C++ Typed Name: mscorlib::System::OverflowException
#include <gtest/gtest.h>
#include <mscorlib/System/mscorlib_System_OverflowException.h>
#include <mscor... | 3,642 | 1,428 |
#pragma once
#include "Statement.hh"
// @TODO: Derive from something else
class Decl : public Statement {
MAKE_NONMOVABLE(Decl)
MAKE_NONCOPYABLE(Decl)
AST_NODE_NAME(Decl)
protected:
Decl() = default;
}; | 223 | 89 |
#pragma once
#include "../__common.hpp"
namespace vs
{
namespace util
{
template<typename type>
void print_arg(const type& arg)
{
std::cout << arg;
}
template<>
void print_arg(const bool& arg)
{
std::cout << termcolor::bold << termcolor::yellow
<< (arg ? "true" : "false") << termcolor::reset;
}
... | 746 | 250 |
#if !defined(SIP0X_PARSER_TOKENSIPMESSAGEHEADER_FROM_HPP__)
#define SIP0X_PARSER_TOKENSIPMESSAGEHEADER_FROM_HPP__
#include "parser/tokens/TokenAbstract.hpp"
#include "parser/tokens/Operators.hpp"
#include "parser/tokens/TokenRegex.hpp"
#include "parser/tokens/TokenNameAddr.hpp"
#include "parser/tokens/TokenGenericPar... | 1,464 | 499 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <iostream>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <syslog.h>
#include <QtCore>
#include <QFile>
#include <QString>
#include "websocketser... | 1,298 | 446 |
#include <iostream>
using namespace std;
int a[10], used[22][22][22];
void solve() {
for (int i = 1; i <= 3; i++) {
scanf("%d", &a[i]);
}
sort(a + 1, a + 4);
memset(used, 0, sizeof(used));
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= 3; j++) {
for (int k = 1; k <... | 773 | 317 |
/*******************************************************************
** This code is part of Breakout.
**
** Breakout is free software: you can redistribute it and/or modify
** it under the terms of the CC BY 4.0 license as published by
** Creative Commons, either version 4 of the License, or (at your
** option) any la... | 3,494 | 1,216 |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/any_test.proto
#include "google/protobuf/any_test.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protob... | 18,389 | 7,072 |
#include "node.hpp"
#include "peer_conn.hpp"
#include "endpoint.hpp"
#include "../lib/net_handler.hpp"
#include "../lib/net_client.hpp"
#include <cassert>
#include <iostream>
using namespace sample;
using namespace std;
NodeApp::PeerCandidateInfo::PeerCandidateInfo(std::string host_in, int port_in, int toTry_in) :
... | 11,501 | 3,720 |
//递归解法:
class Solution {
public:
void prebintree(TreeNode * root,vector<int> &res){//记得传地址而不是传值&res
if(root == nullptr) {
return;
}
res.push_back(root->val);
prebintree(root->left,res);
prebintree(root->right,res);
return;
}
vector<int> preorderTr... | 965 | 345 |
#include "channel/BufferWrapper.hpp"
using elrond::channel::BufferWrapper;
/* ****************************************************************************
************** elrond::channel::BufferWrapper Implementation ***************
****************************************************************************/... | 436 | 101 |
// *****************************************************************************
//
// Declaration of ThreadMonitor class
//
// Module: GSRoot
// Namespace: GS
// Contact person: SN
//
// *****************************************************************************
#ifndef GS_THREADMONITOR_HPP
#define GS_THREADMON... | 5,112 | 1,175 |
/*
* Copyright (c) 2011-2014, Intel 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:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of... | 8,270 | 2,433 |
/*
morda - GUI framework
Copyright (C) 2012-2021 Ivan Gagis <igagis@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version... | 1,553 | 494 |
/*
ID: <ID HERE>
LANG: C++11
TASK: beads
*/
#include <fstream>
#include <string>
using namespace std;
template <typename iterator>
int get_stretch(iterator begin, iterator end) {
auto iter = begin;
auto current_type = *iter;
while (iter++ != end) {
if (*iter == 'w') continue;
if (current_type == 'w') current_... | 936 | 364 |
extern void HideMenuEnv();
extern void HideGameEnv(); | 54 | 18 |
#ifndef __MASK_SKIN_HPP_
#define __MASK_SKIN_HPP_
#include "core/SSkin.h"
//************************************
// 这个是 mask 遮罩 皮肤 头像 在skin.xml 里配置 需要 3个值
// src 和 imglist 一样
// mask_a 设置透明值 的rgb a // .a=3 .r=0 .g=1 .b=2
// mask 设置遮罩 图片
// <masklist name="default" src="image:default" mask_a="1" mask="image:ma... | 3,525 | 1,822 |
//SelectionManager.h
#include "ApplicationKit.h"
#include "SelectionManager.h"
#include <algorithm>
using namespace VCF;
using namespace VCFBuilder;
SelectionManager SelectionManager::selectionMgrInstance;
SelectionManager::SelectionManager()
{
init();
}
SelectionManager::~SelectionManager()
{
m_schedul... | 2,679 | 890 |
// Copyright Daniel Wallin 2006.
// Copyright Cromwell D. Enage 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)
#ifndef BOOST_DEDUCED_060920_HPP
#define BOOST_DEDUCED_060920_HPP
#include <boost/parameter/... | 3,519 | 1,270 |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int d1, m1, y1;
int d2, m2, y2;
istream_iterator<int> iter(cin);
d1 = *i... | 842 | 331 |
#include "classeA.hpp"
classeA::classeA()
{
A1 = 0;
A2 = 0;
}
classeA::~classeA(){}
void classeA::MA1()
{
std::cout << "Metodo MA1" << std::endl;
}
void classeA::MA2()
{
std::cout << "Metodo MA2" << std::endl;
}
void classeA::MA3()
{
std::cout << "Alteração a classe A part... | 552 | 253 |
#include "logger.hpp"
int main(int argc, char *argv[])
{
Log::Err("el sitstema ",1," Funciona");
Log::Inf();
Log::Warn();
return 0;
}
| 152 | 63 |
/**
* \file PnlWznmOpxDetail_evals.cpp
* job handler for job PnlWznmOpxDetail (implementation of availability/activation evaluation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 28 Nov 2020
*/
// IP header --- ABOVE
using namespace std;
usi... | 5,737 | 2,859 |
#include "YAIK_functions.h"
// memset, memcpy
#include <memory.h>
/*
-----------------------------------------------------------------------------
2. Decompression technique for Alpha
-----------------------------------------------------------------------------
*/
bool CheckInBound2D(YAIK_Instance* pCtx,... | 13,531 | 6,763 |
#include "huaweicloud/evs/v2/model/SnapshotDetails.h"
namespace HuaweiCloud {
namespace Sdk {
namespace Evs {
namespace V2 {
namespace Model {
SnapshotDetails::SnapshotDetails()
{
id_ = "";
idIsSet_ = false;
status_ = "";
statusIsSet_ = false;
name_ = "";
nameIsSet_ = false;
descripti... | 10,777 | 3,421 |
// MFCMyProcCtlUIDlg.cpp: 实现文件
//
#include "pch.h"
#include "framework.h"
#include "MFCMyProcCtlUI.h"
#include "MFCMyProcCtlUIDlg.h"
#include "afxdialogex.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#include <TlHelp32.h>
using namespace std;
CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
{
}
void CAboutDlg::... | 8,215 | 4,094 |
#include<stdio.h>
#include<omp.h>
int main() {
double sum = 0.0;
int n = 10000;
#pragma omp target teams distribute parallel for map(tofrom:sum)
for(int i = 0; i < n; i++) {
#pragma omp atomic hint(AMD_safe_fp_atomics)
sum+=1.0;
}
int err = 0;
if (sum != (double) n) {
printf("Error with sa... | 721 | 311 |
#include <cstdlib>
#include <iostream>
using namespace std;
class Complex
{
float re,im;
public: void f();
};
/* pentru orice clasa compilatorul asigura implicit
- un constructor de initializare -fara parametrii,
- un constructor de copiere
- un operator d... | 2,491 | 841 |
/* Public Domain Curses */
#include "Qurses/curspriv.h"
RCSID("$Id: util.c,v 1.71 2008/07/13 16:08:18 wmcbrine Exp $")
/*man-start**************************************************************
Name: util
Synopsis:
char *unctrl(chtype c);
v... | 8,688 | 2,976 |
#pragma once
#include <atomic>
#include "../../cpu.hpp" // cacheline_size
#include "../../range.hpp"
#include "../auxiliary/tagged.hpp" // TaggedData
#include "io_descriptors.hpp" // core::{queue_reader, queue_writer}
#include <vector>
template <typename T, typename size_type=unsigned>
class spsc_queue {
frie... | 3,945 | 1,320 |
/*
* Copyright 2005-2006, Hajo Kirchhoff - Lit Window Productions, http://www.litwindow.com
* This file is part of the Lit Window ODBC Library. All use of this material - copying
* in full or part, including in other works, using in non-profit or for-profit work
* and other uses - is governed by the licence contained ... | 29,505 | 12,794 |
/*You are required to complete the function below*/
bool findTriplets(int *const a, const int n)
{
sort(a, a + n);
for (auto i = 0; i != n; ++i) {
const auto target = -a[i];
for (auto j = 0, k = n - 1; j < k; ) {
const auto cur = a[j] + a[k];
if... | 560 | 186 |
// Example.cpp - An example of the Particle System API in OpenGL
//
// Copyright 1999-2006, 2022 by David K. McAllister
#include "Particle/pAPI.h"
using namespace PAPI;
// OpenGL
#include "GL/glew.h"
// This needs to come after GLEW
#include "GL/freeglut.h"
// For C++17 execution policy to get parallelism of partic... | 3,792 | 1,626 |
////////////////////////////////////////////////////////////////////////////
//
// This file is part of RTIMULib
//
// Copyright (c) 2014-2015, richards-tech
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to... | 6,908 | 2,685 |
/*
* File: cql_uuid_t.hpp
* Author: mc
*
* Created on September 26, 2013, 12:35 PM
*/
#ifndef CQL_UUID_HPP_
#define CQL_UUID_HPP_
#include <functional>
namespace cql {
class cql_uuid_t;
}
namespace std {
// template<>
// struct hash<cql::cql_uuid_t>;
}
namespace cql {
class cql_uuid_t {
public:... | 1,281 | 483 |
#include "DataExchangerP.h"
namespace fvmsolver {
DataExchangerP::DataExchangerP(uPtrDataPort spData) :
spData_(std::move(spData)),
data_(*spData_) {
}
void DataExchangerP::assignCurrentCellValues(size_t step) {
size_t numUw_ = data_.getNum... | 641 | 270 |
#include "yphysres.h"
#include "ycolshape.hpp"
#include "pmem.hpp"
struct ycolshapes_t {
int count;
ycolshape_t *pool;
};
static ycolshapes_t g_ycolshapes;
int ycolshape_init(int count) {
size_t size_max, align_max;
ycolshape_t *cs;
#define FIND_SIZES(t) \
if (sizeof(t) > size_max) size_... | 5,192 | 2,066 |
#include "stdafx.h"
#include "ImagingException.h"
#include "Tools.h"
using namespace std;
using namespace Tools;
ImagingException::ImagingException(HRESULT result)
: error (::GetLastError())
, result (result)
{
DWORD flags (FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_FROM_HMODULE|FORMAT_MESSAGE_IGNO... | 782 | 298 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int vis[200];
int main()
{
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
std::ios_base::sync_with_stdio(false);
cin.tie(0);
int k;
string s;
cin>>s>>k;
if(k>s.size()) co... | 571 | 247 |
#include <gpio.h>
#include <textio.h>
#include <usart.h>
#include <hardware/tm1637.h>
#include <button.h>
static const pin_t LED = PA5;
static const pin_t PROBE = PA8;
static const int SERIAL_USART = 2;
static const pin_t SERIAL_TX = PA2;
static const pin_t SERIAL_RX = P... | 1,385 | 607 |
/*!
* Copyright (c) 2019 by Contributors if not otherwise specified
* \file random_file_order_sampler.cc
* \brief Randomly shuffle file order but not internal frame order
*/
#include "random_sampler.h"
#include <algorithm>
#include <dmlc/logging.h>
namespace decord {
namespace sampler {
RandomSampler::RandomS... | 2,269 | 788 |
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2022 Jai Bellare
* See <https://opensource.org/licenses/MIT/> or LICENSE.md
* Project homepage: https://github.com/strangeQuark1041/samarium
*/
#include "Spring.hpp"
namespace sm
{
[[nodiscard]] auto Spring::length() const noexcept -> f64 { return math::distance(... | 695 | 262 |
class Solution {
public:
int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid)
{
int m = obstacleGrid.size();
int n = obstacleGrid[0].size();
vector<vector<unsigned int>> dp(m, vector<unsigned int> (n,0));
if(obstacleGrid[0][0] == 1)
retur... | 948 | 368 |