lang
stringclasses 10
values | seed
stringlengths 5
2.12k
|
---|---|
cpp |
VPHELPER(VP_X_PARK_POS, &mks_park_pos.x, ScreenHandler.GetParkPos_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Y_PARK_POS, &mks_park_pos.y, ScreenHandler.GetParkPos_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Z_PARK_POS, &mks_park_pos.z, ScreenHandler.GetParkPos_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
#if ENABLED(PREVENT_COLD_EXTRUSION)
VPHELPER(VP_MIN_EX_T, &thermalManager.extrude_min_temp, ScreenHandler.HandleGetExMinTemp_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
#endif
#if ENABLED(SENSORLESS_HOMING) // TMC SENSORLESS Setting
#if AXIS_HAS_STEALTHCHOP(X)
VPHELPER(VP_TMC_X_STEP, &tmc_step.x, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendTMCStepValue),
#endif |
cpp | #include "Parser.hpp"
void Run_crauler(int argc, char* argv[]) {
prepare_command_line(argc, argv);
printParametrs();
Downloader d(parametrs.downloader_threads);
Parser p(parametrs.parser_threads);
d.downloading(parametrs.url, parametrs.depth, p);
} |
cpp | }
for (auto&& requirement : command->GetRequirements()) {
requirement->SetCurrentCommand(nullptr);
}
command->Removed();
}
void Scheduler::Impl::ProcessCommandAddition(Command* command) { |
cpp |
//---------------------------------------------------------------------------
#pragma package(smart_init)
namespace Reinit
{
//-- type declarations -------------------------------------------------------
//-- var, const, procedure ---------------------------------------------------
extern PACKAGE int __fastcall LoadNewResourceModule(unsigned Locale)
{
}
|
cpp | if (m_RawOutput)
{
m_Result << "Current waitsnc setting: " << (thisAgent->waitsnc ? "enabled" : "disabled");
}
else
{
AppendArgTagFast(sml_Names::kParamWaitSNC, sml_Names::kTypeBoolean, thisAgent->waitsnc ? sml_Names::kTrue : sml_Names::kFalse);
}
return true;
}
thisAgent->waitsnc = *pSetting;
return true;
} |
cpp | dropdown->AddItem(getItem("140", 140));
dropdown->AddItem(getItem("144", 144));
switch (GetSubsystem<Options>()->GetMaxFps())
{
case 200:
case 0:
dropdown->SetSelection(0);
break;
case 30:
dropdown->SetSelection(1);
break;
case 40:
dropdown->SetSelection(2);
break; |
cpp | int main ()
{
float a, b, c;
while (a != 0){
float b = 1.60934;
float c = 0;
cout << "Berechnungsprogramm Meilen in Kilometer\n";
cout << "Eingabe Meilen :\n";
cin >> a;
c = a * b;
|
cpp | #define ll long long int
#define ld long double
int main(){
ll t;
cin>>t; |
cpp | struct Message
{
virtual ~Message() = default;
explicit Message(unsigned short id) : Message(id, 0U) {}
explicit Message(unsigned short id, unsigned short family) : id(id), family(family) {}
// Computes the unique identifier when requested
unsigned int uid() const {
static int bits = sizeof(unsigned short) * 8;
return family << bits | id;
}
|
cpp | }
Element::Content::Content()
{
m_elements.reset(::new Elements);
} |
cpp | * @param msg_id The id of the message
* @return std::string The message
*/
std::string get_message(const uint msg_id) {
// If the id we search is smaller than the oldest message from the
// queue, it means we can find it in the file
std::string first_msg = messages.front();
if (get_message_id(first_msg) > msg_id) {
std::ifstream in(DATABASE_FOLDER + name);
|
cpp | #include <iostream>
using namespace std;
int main(){
try{
string var = "hello";
if (var >= "world"){
cout << "your code is daijobou"; |
cpp |
int main(){
int n1, n2;
int divisores;
cout << "Introduzca dos números: ";
cin >> n1 >> n2;
divisores = divisoresMenores(n1, n2);
|
cpp |
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, |
cpp | MethodBinder::bind_method(D_METHOD("get_drive"), &AudioEffectDistortion::get_drive);
MethodBinder::bind_method(D_METHOD("set_post_gain", {"post_gain"}), &AudioEffectDistortion::set_post_gain);
MethodBinder::bind_method(D_METHOD("get_post_gain"), &AudioEffectDistortion::get_post_gain);
ADD_PROPERTY(PropertyInfo(VariantType::INT, "mode", PropertyHint::Enum, "Clip,ATan,LoFi,Overdrive,WaveShape"), "set_mode", "get_mode");
ADD_PROPERTY(PropertyInfo(VariantType::FLOAT, "pre_gain", PropertyHint::Range, "-60,60,0.01"), "set_pre_gain", "get_pre_gain"); |
cpp | m_Types[typeIndex].inner = &m_Types[(size_t)typ.ops[0]];
m_Types[typeIndex].addrSpace = Type::PointerAddrSpace(typ.ops[1]);
typeIndex++;
}
else if(IS_KNOWN(typ.id, TypeRecord::OPAQUE))
{
// pretend opaque types are empty structs
m_Types[typeIndex].type = Type::Struct;
typeIndex++;
}
else if(IS_KNOWN(typ.id, TypeRecord::STRUCT_NAME))
{ |
cpp | const int cols = Load<int>(fin);
const int nonzeros_num = Load<int>(fin);
SparseMatrixElements nonzeros(nonzeros_num);
for (int i = 0; i < nonzeros_num; ++i) {
const int row = Load<int>(fin);
const int col = Load<int>(fin);
const real value = Load<real>(fin);
nonzeros[i] = Eigen::Triplet<real>(row, col, value); |
cpp | //
// Copyright (c) 2017, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// |
cpp | if (!foundNode)
previous = last;
else if (!next)
next = last;
return false;
});
if (!next)
next = first; |
cpp | {
template<class Archive, typename T>
void serialize(Archive& archive, Vector3<T>&vec)
{
archive(vec.x, vec.y, vec.z); |
cpp | if (!catcher.GetNextResult())
FAIL() << catcher.message();
}
} // namespace extensions
|
cpp | uint64_t ntp_client::roundtrip_delay(array<ntp_timestamp_format_t,4> tstamps){
static moving_average<uint64_t,11> ma;//~3min
static median_filter<uint64_t,5> mf;
Math::OverflowSafe::ovf_save ofs; |
cpp | task_->GetLogin(user, password);
return true;
}
bool ChromeosRPCTaskDBusAdaptor::notify(brillo::ErrorPtr* /*error*/,
const string& reason,
const map<string, string>& dict) {
SLOG(this, 2) << __func__ << ": " << reason;
task_->Notify(reason, dict);
return true;
}
} // namespace shill |
cpp | {
int err = GIF_OK;
m_Gif = DGifOpen(m_Source, gifRead, &err);
if( err != GIF_OK ) {
return false;
} |
cpp | 0x2bfa6547, 0xc4ca0e5e, 0xf076c584, 0x1f46ae9d, 0x990f5230, 0x763f3929,
0x4283f2f3, 0xadb399ea, 0x1c08b7d6, 0xf338dccf, 0xc7841715, 0x28b47c0c,
0xaefd80a1, 0x41cdebb8, 0x75712062, 0x9a414b7b, 0x7c0eafc9, 0x933ec4d0,
0xa7820f0a, 0x48b26413, 0xcefb98be, 0x21cbf3a7, 0x1577387d, 0xfa475364,
0xdc0487e8, 0x3334ecf1, 0x0788272b, 0xe8b84c32, 0x6ef1b09f, 0x81c1db86,
0xb57d105c, 0x5a4d7b45, 0xbc029ff7, 0x5332f4ee, 0x678e3f34, 0x88be542d,
0x0ef7a880, 0xe1c7c399, 0xd57b0843, 0x3a4b635a, 0x99fca15b, 0x76ccca42,
0x42700198, 0xad406a81, 0x2b09962c, 0xc439fd35, 0xf08536ef, 0x1fb55df6,
0xf9fab944, 0x16cad25d, 0x22761987, 0xcd46729e, 0x4b0f8e33, 0xa43fe52a,
0x90832ef0, 0x7fb345e9, 0x59f09165, 0xb6c0fa7c, 0x827c31a6, 0x6d4c5abf,
0xeb05a612, 0x0435cd0b, 0x308906d1, 0xdfb96dc8, 0x39f6897a, 0xd6c6e263,
0xe27a29b9, 0x0d4a42a0, 0x8b03be0d, 0x6433d514, 0x508f1ece, 0xbfbf75d7,
0x120cec3d, 0xfd3c8724, 0xc9804cfe, 0x26b027e7, 0xa0f9db4a, 0x4fc9b053,
0x7b757b89, 0x94451090, 0x720af422, 0x9d3a9f3b, 0xa98654e1, 0x46b63ff8, |
cpp | bool f[MAXL];
priority_queue<long, vector<long>, greater_equal<long>> solve;
long last = 0;
long penalty = 0;
int main() {
int n, k; |
cpp |
#include "test_macros.h"
TEST_SUITE(directory_entry_obs_testsuite)
TEST_CASE(signatures) {
using namespace fs;
{
const fs::directory_entry e = {};
std::error_code ec; |
cpp | *********************************************************************/
#include <BladePCH.h>
#include <parallel/ParaStateDef.h>
namespace Blade |
cpp |
namespace net {
P256KeyExchange::P256KeyExchange(EC_KEY* private_key, const uint8* public_key)
: private_key_(private_key) {
memcpy(public_key_, public_key, sizeof(public_key_));
}
P256KeyExchange::~P256KeyExchange() {}
|
cpp |
// Test the elasticsearch recordable object
TEST(ElasticsearchLogsExporterTests, RecordableCreation)
{
// Create an elasticsearch exporter
auto exporter =
std::unique_ptr<sdklogs::LogExporter>(new logs_exporter::ElasticsearchLogExporter); |
cpp | #if !defined(USE_ADPVM)
void function_minimizer::pvm_slave_mcmc_routine(void){}
#else
void function_minimizer::pvm_slave_mcmc_routine(void)
{
int nvar=initial_params::nvarcalc();
do
{
int iflag=get_int_from_master();
if (!iflag) break; |
cpp | #include "mux.h"
|
cpp | #include "llvm/IR/Function.h"
#include "llvm/IR/InstrTypes.h"
#include <llvm/IR/InstVisitor.h>
#include "llvm/IR/Instruction.h"
#include <llvm/PassRegistry.h>
#include "common/LLVMWarningsPop.hpp" |
cpp | {"\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1","DOC"},
{"%PDF","PDF"},{"\xFF\xFE\x00\x00","32 Bit UTF encoded Text"},
{"\x52\x61\x72\x21\x1A\x07","RAR"},{"BZh","Bzip"},
{"\x50\x4B\x03\x04\x14\x00\x08\x00\x08\x00","Java ByteCode"},{"\xFF\xD8","Jpeg"}};
QString searchString = QString::fromLocal8Bit( fileString, fileSize );
for (unsigned int counter = 0; counter < numSigs; counter++)
{
pb->setValue(pb->value() + (counter / numSigs * 100));
if (searchString.contains(signatureList[counter][0]))
textOutput->append("Possibly a " + signatureList[counter][1] + |
cpp | EXPECT_EQ(27, mg->get_degree(75))
;
mg->remove_vertex(35);
EXPECT_EQ(0, mg->get_degree(35))
;
EXPECT_EQ(27, mg->get_degree(75))
; |
cpp |
#include "__icalls.hpp"
#include "Resource.hpp"
namespace godot {
VisualScriptPreload::___method_bindings VisualScriptPreload::___mb = {};
|
cpp | ///////////////////////// Document::unlock_exclusive ////////////////////////
void Document::unlock_exclusive(bool changed)
{
assert((m_locked -= 1) == 0);
assert((m_exclusive -= 1) == 0);
m_lock.writerelease();
|
cpp | {
class RandomCuration : public Curation
{
public:
RandomCuration(size_t max_chain_size, Random &random);
float CalculateScore(const std::vector<Kernel *> &chain) const override;
Kernel *GetFirstNoteworthyEvent(const std::vector<Kernel *> &chain) const override;
Kernel *GetSecondNoteworthyEvent(const std::vector<Kernel *> &chain) const override;
private:
|
cpp | {
// Stock impl that just logs to file
// Hook up UI logs for each platform based on platform specific UI display calls
char message[8000] = {}; |
cpp | boolean puzzle_ok(PuzzleLoadStatus status) {
return(status != NO_PUZZLE_FILE && status != PUZZLE_FILE_BAD);
};
PuzzleLoadStatus next_puzzle(boolean reset_old, boolean save_robots) {
if (next_puzzle_name()) {
last_puzzle_reset_old = reset_old;
release_puzzle_data(FALSE);
empty_counter = 0; |
cpp | pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
ne.setInputCloud(cloud);
//创建一个空的KdTree对象,并把它传递给法线估计向量
//基于给出的输入数据集,KdTree将被建立
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ> ());
ne.setSearchMethod(tree); |
cpp | * @param count The number of spacecraft contained in pos
*
* @return true on success, false on failure
*/
//-----------------------------------------------------------------------------
bool AtmosphereModel::Wind(Real *position, Real* wind, Real ep,
Integer count)
{ |
cpp | pq.push(indices(i),priorities(i));
}
}
template<class T,class COMP>
void defineChangeablePriorityQueue(const std::string & clsName){ |
cpp | ("output,f", po::value<std::string>(&outputFile)->default_value("image.hdf5"), "Output filename")
("prior,P", po::value<std::string>(),"Prior image filename")
("prior-weight,k",po::value<float>(),"Weight of the prior image")
("device",po::value<int>(&device)->default_value(0),"Number of the device to use (0 indexed)")
("TV,T",po::value<float>(&tv_weight)->default_value(0),"TV Weight ")
("subsets,n", po::value<int>(&subsets)->default_value(10), "Number of subsets to use")
("beta",po::value<float>(&beta)->default_value(1),"Step size for SART")
("gamma",po::value<float>(&gamma)->default_value(1e-1),"Relaxation Gamma")
("huber",po::value<float>(&huber)->default_value(0),"Huber value")
("use_hull",po::value<bool>(&use_hull)->default_value(true),"Estimate convex hull of object")
("use_weights",po::value<bool>(&use_weights)->default_value(false),"Use weights if available. ")
("use_non_negativity",po::value<bool>(&use_non_negativity)->default_value(true),"Use non-negativity constraint. ")
;
po::variables_map vm; |
cpp | MatrixXd m(2, 2);
m(0, 0) = 3;
m(1, 0) = 2.5;
m(0, 1) = -1;
m(1, 1) = m(1, 0) + m(0, 1);
std::cout << "Here is the matrix m:\n" << m << std::endl;
VectorXd v(2);
v(0) = 4; |
cpp | // ::color::operation::floor( result, right )
// ::color::operation::floor( result, left, right )
|
cpp | // set the backlight to a value between 0 and 255
// the backlight is driven via PWM and is gamma corrected by our
// library to give a gorgeous linear brightness range.
pico_explorer.set_backlight(100);
pico_explorer.set_pen(255, 0, 0);
while(true) {
pico_explorer.pixel(point(0, 0)); |
cpp | Vector2 t = (line->from - line->to).normalized().tangent() * line->width * 0.5;
Vector2 verts[4] = {
line->from - t,
line->from + t,
line->to + t,
line->to - t,
};
//glLineWidth(line->width);
_draw_gui_primitive(4, verts, NULL, NULL); |
cpp | _count += 1;
TimeT time = TimeT(_count) / TimeT(_steps);
this->update(time);
if (_count == _steps) { |
cpp | //------------------------------------------------------------------------------
ctkDICOMObjectModel::~ctkDICOMObjectModel()
{
}
//------------------------------------------------------------------------------
void ctkDICOMObjectModel::setFile(const QString &fileName)
{
Q_D(ctkDICOMObjectModel);
OFCondition status = d->fileFormat.loadFile( fileName.toLatin1().data());
if( !status.good() )
{
// TODO: Through an error message. |
cpp | class vvValidator* pValidator,
const wxString& sMessage
)
{
this->mcMessages.AddMessage(true, pValidator->GetLabel(), sMessage);
}
void vvValidatorMessageBoxReporter::ReportError(
class vvValidator* pValidator,
const wxString& sMessage |
cpp | /*************************************************************************/
// Retrieve two points from scalar opacity transfer function
double v1, v2;
v1 = myTransferFunction->GetScalarOpacityFunction()->GetValue(3.0);
v2 = myTransferFunction->GetScalarOpacityFunction()->GetValue(10.0);
MITK_TEST_CONDITION_REQUIRED((fabs(v1 - 0.2) < 1.0e-5) && (fabs(v2 - 1.0) < 1.0e-5),
"Retrieving values at two points from scalar opacity transfer function");
|
cpp |
{
// make an initial logger to create the first output file
auto logger = spdlog::rotating_logger_mt("logger", basename, max_size, 2, true);
for (int i = 0; i < 10; ++i)
{
logger->info("Test message {}", i);
}
// drop causes the logger destructor to be called, which is required so the
// next logger can rename the first output file.
spdlog::drop(logger->name());
}
auto logger = spdlog::rotating_logger_mt("logger", basename, max_size, 2, true); |
cpp | {
PlainOldClass poc;
Base* pb = new CoolClass;
poc.set(42); |
cpp | } else {
std::cout << "dir not exist" << std::endl;
}
EXPECT_TRUE(true);
}
/*
TEST(file, validityDetectedFinancialFiles) {
Broker::clearVector();
bool test2 = true;
std::vector<std::string> vect = {
"broker:ib account:00100001 files:48 lastdate:20181018", |
cpp | }
template <typename... Args>
operator std::function<void (Args...)>() const {
return [](Args...) { };
}
// keep clang happy: see CWG issue #253,
// http://open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#253 |
cpp | // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/widevine_cdm_constants.h"
#include "build/build_config.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
|
cpp | using namespace Esri::ArcGISRuntime;
DisplayMap::DisplayMap(QQuickItem* parent) :
QQuickItem(parent)
{
}
DisplayMap::~DisplayMap() = default;
void DisplayMap::init() |
cpp | EEPROM.commit();
}
//screen functions
void timeScreen() {
// time screen
currentCPUtime = millis()/1000;
if (currentCPUtime - timeTakenAt >= timeout) {
if (WiFi.status() != WL_CONNECTED) {
connectToWiFi();
} else if (WiFi.status() == WL_CONNECTED) {
setupLocalTime();
firstScan = false; // this is where we start caring about the EEPROM to avoid pagefault |
cpp | }
auto AuthenticationToken::setExpiresOn(
const boost::posix_time::ptime &mExpiresOn) -> void {
expires_on_ = mExpiresOn;
}
auto AuthenticationToken::Refresh() const -> void {
auto auth_token_future = stlab::async(
stlab::default_executor, Authentication::GetAccessToken, refresh_token_); |
cpp | break;
}
}
}
|
cpp | void print()
{
for (int i=0; i<5; ++i)
cout << num[i] << " ";
cout << '\n';
}
|
cpp | if(dfs()) return 1;
for( int j=L[i]; j!=i; j=L[j] ) resume(C[j]);
used[ROW[i]]=0;
}
resume(c);
return 0;
}
int exact_cover(int n,int m){ |
cpp | }
return 0;
}
c.create(w, h, elemsize, elempack, opt.blob_allocator);
if (c.empty()) |
cpp | for(const auto&val : joint_pose){
if(std::isnan(val)){
return true;
}
}
return false;
}
|
cpp |
Lagrangian1D::Lagrangian1D(bool rigid_walls):
rigid_walls_(rigid_walls) {}
double Lagrangian1D::CalcVelocity
(int i, vector<double> const& /*vp*/,
vector<Primitive> const& hv) const
{
if(i==0){
if(rigid_walls_)
return 0;
else |
cpp | current=menu;}
if(x<500)
GL::drawTexture((Util::nTRectangleSet(0,600,800,0,0,0)),Util::nTColorSet(1,1,1,1),GL::getTextureByName("legalNote"),1);
if(x>=500&&x<1000){
x-=500;
GL::drawTexture((Util::nTRectangleSet(0,600,800,0,0,0)),Util::nTColorSet(1,1,1,1-x/500),GL::getTextureByName("legalNote"),1);
} |
cpp | const char *backendStr_, const char *dtypeStr_)
: aDims{m, n}, cDims{m, n}, numLayers_(numLayers_),
asyncLaunchSize_(asyncLaunchSize_), numCores_(numCores_),
backendStr_(backendStr_), dtypeStr_(dtypeStr_) {}
void setup() override {
// Setup host manager
std::vector<std::unique_ptr<runtime::DeviceConfig>> configs; |
cpp | {
for(size_t ii = 0; ii < vec.size(); ii = ii + 1)
{
vec[ii] = ii;
}
return vec;
}
int main()
{
|
cpp | m_singleton->getTrackerTrackPropagator() : m_singleton->getTrackPropagator();
TEveRecTrack t;
t.fBeta = 1;
t.fP = TEveVector( iData.px(), iData.py(), iData.pz() );
t.fV = TEveVector( iData.vertex().x(), iData.vertex().y(), iData.vertex().z() );
t.fSign = iData.charge();
TEveTrack *trk = new TEveTrack( &t, propagator );
trk->MakeTrack();
return trk;
}
//______________________________________________________________________________
TEveStraightLineSet * |
cpp | #include <string>
#include <set>
#include <ngraph/node.hpp>
#include <ngraph/variant.hpp>
#include <openvino/core/rtti.hpp>
#include <ngraph/attribute_visitor.hpp> |
cpp | unsigned getFeatures() const override {
return Broker::Feature_Metadata;
}
};
} // end anonymous namespace
extern "C" ::llvm::mcad::BrokerPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
mcadGetBrokerPluginInfo() {
return {
LLVM_MCAD_BROKER_PLUGIN_API_VERSION, "TracerBroker", "v0.1", |
cpp | str::stream() << "Error converting UTF-8 string: " << u_errorName(error),
U_SUCCESS(error));
ret.resize(len);
return ret;
}
std::string toUTF8() const {
UErrorCode error = U_ZERO_ERROR; |
cpp | const int height= 512;
std::unique_ptr<Matrix> char_img = Matrix::makeMatrix(Dimension{.rows = height, .cols = width}, 1);
std::unique_ptr<Matrix> clone = char_img->clone();
int num_tiles = width/tile_width;
// 3x3 kernel to 13x13
for(int pad_size = 1; pad_size < 7; pad_size++) {
clone->reorder_with_padding(tile_width, pad_size, true);
EXPECT_EQ (clone->alloc_size, height*( (num_tiles-1)*(tile_width+pad_size) + tile_width)); |
cpp | // Date: 17/1/2010
// ---------------------------------------------------------------------------
bool apComputeContextDeletedEvent::writeSelfIntoChannel(osChannel& ipcChannel) const
{
// Write the OpenGL Server context id:
ipcChannel << _contextId;
// Call my parent class's version of this function:
bool retVal = apEvent::writeSelfIntoChannel(ipcChannel);
|
cpp | Luau::SourceModule* sm = frontend.getSourceModule(name);
Luau::ModulePtr m = frontend.moduleResolver.getModule(name);
Luau::attachTypeData(*sm, *m);
|
cpp | {
init_put_area();
}
if (!traits_type::eq_int_type(c, traits_type::eof())) {
if (output_buffered()) { |
cpp | My_ds_full_cell> My_tds; \
test<My_tds>(DIM, string("mirror&dynamic")+string(#DIM)) ;}
*/
template< int D >
void go(int N)
{
typedef CGAL::Epick_d<CGAL::Dimension_tag<D> > K;
//typedef CGAL::Epick_d<CGAL::Dynamic_dimension_tag> K;
typedef CGAL::Triangulation<K> Triangulation;
test<Triangulation>(D, "static", N); |
cpp | #pragma once
#include <mbgl/util/feature.hpp>
namespace mbgl {
namespace style {
template <class T>
class IdentityStops {
public:
optional<T> evaluate(const Value&) const;
|
cpp | RealImage output;
RealImage gradX;
RealImage gradY;
RealImage gradZ;
double voxelx, voxely, voxelz;
double dx, dy, dz; |
cpp |
void TooltipWindow::setMillisecondsBeforeTipAppears (const int newTimeMs) noexcept
{
millisecondsBeforeTipAppears = newTimeMs;
}
void TooltipWindow::paint (Graphics& g)
{
getLookAndFeel().drawTooltip (g, tipShowing, getWidth(), getHeight());
}
void TooltipWindow::mouseEnter (const MouseEvent&)
{
|
cpp | public:
int getMinimum(int nextCost, int prevCost, string start, string goal) {
int n = start.size();
for (int i=0; i<n; ++i) {
for (int j=0; j<n; ++j) {
if (i!=j && intersects(start[i], goal[i], start[j], goal[j])) {
return -1;
} |
cpp | std::string emission_idx_str;
if (state_idx < hmm.states.size()-1) {
std::ostringstream ss;
ss << hmm.states[state_idx+1].model;
emission_idx_str = ss.str();
} else { // Last state, no emission from this triphone
emission_idx_str = ",";
}
fprintf(fstout, "T %d %d %s , %.6f\n", last_state_idx-1, last_state_idx, emission_idx_str.c_str(),
trans.log_prob /*pow(10, trans.log_prob)*/); |
cpp | caffe_copy(count, top_diff, bottom_diff);
} else {
caffe_cpu_scale(count, coeffs_[i], top_diff, bottom_diff);
}
break;
case EltwiseParameter_EltwiseOp_MAX:
mask = max_idx_.cpu_data(); |
cpp |
private:
friend class FuncTable;
// other funcs
void _plusRef(){++_refs;}
int _minusRef(){return --_refs;}
private: |
cpp | if (transformation_context->GetFactManager()->IdIsIrrelevant(
message_.fresh_id())) {
return;
}
// Add synonym facts relating the defined elements of the shuffle result to
// the vector components that they come from.
for (uint32_t component_index = 0;
component_index < static_cast<uint32_t>(message_.component_size());
component_index++) {
uint32_t component = message_.component(component_index); |
cpp | opt._listsFlag= false;
opt._wsListFlag= false;
if (opt._default_lef_rules) { // minWidth, minSpacing, minThickness, pitch multiplied by grid_list
// user sets default_flag and grid_list multipliers
if (in_args->grid_list()==NULL) {
opt._gridTable.add(1.0);
}
else {
parser.mkWords(in_args->grid_list());
parser.getDoubleArray(&opt._gridTable, 0);
}
opt._listsFlag= true;
}
else if (opt._nondefault_lef_rules) { |
cpp | * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
* AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
* WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
* INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
* DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
* PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF |
cpp | }tr[N << 2];
void push_up(Node &root, Node &left, Node &right)
{
root.sum = left.sum + right.sum;
int mid_max = left.suf_max + right.pre_max;
int left_max = left.t_max; |
cpp | layoutParameters.isLastNewParagraph = TextAbstraction::IsNewParagraph( *( utf32Characters.Begin() + ( numberOfCharacters - 1u ) ) );
// The initial glyph and the number of glyphs to layout.
layoutParameters.startGlyphIndex = 0u;
layoutParameters.numberOfGlyphs = numberOfGlyphs;
layoutParameters.startLineIndex = 0u;
layoutParameters.estimatedNumberOfLines = logicalModel->mParagraphInfo.Count(); |
cpp | boost::thread reader(simple_reading_thread(rw_mutex,finish_mutex,unblocked_mutex,unblocked_count));
boost::thread::sleep(delay(1));
CHECK_LOCKED_VALUE_EQUAL(unblocked_mutex,unblocked_count,1u);
boost::system_time const start=boost::get_system_time();
boost::system_time const timeout=start+boost::posix_time::milliseconds(500);
boost::posix_time::milliseconds const timeout_resolution(50);
bool timed_lock_succeeded=rw_mutex.timed_lock_shared(timeout);
BOOST_CHECK(boost::get_system_time()<timeout);
BOOST_CHECK(timed_lock_succeeded);
if(timed_lock_succeeded)
{
rw_mutex.unlock_shared();
|
cpp | TEST_F(FtpDirectoryListingParserNetwareTest, Bad) {
const char* bad_cases[] = {
" foo",
"garbage",
"d [] ftpadmin 512 Jan 29 2004 pub", |
cpp | voxomap::updateSide(it, it.node->findRelativeVoxel(x + 1, y, z), SideEnum::XPOS, SideEnum::XNEG);
voxomap::updateSide(it, it.node->findRelativeVoxel(x, y - 1, z), SideEnum::YNEG, SideEnum::YPOS);
voxomap::updateSide(it, it.node->findRelativeVoxel(x, y + 1, z), SideEnum::YPOS, SideEnum::YNEG);
voxomap::updateSide(it, it.node->findRelativeVoxel(x, y, z - 1), SideEnum::ZNEG, SideEnum::ZPOS);
voxomap::updateSide(it, it.node->findRelativeVoxel(x, y, z + 1), SideEnum::ZPOS, SideEnum::ZNEG);
}
} |
cpp |
QSharedMemoryPrivate::QSharedMemoryPrivate()
: QObjectPrivate(), memory(0), size(0), error(QSharedMemory::NoError),
#ifndef QT_NO_SYSTEMSEMAPHORE
systemSemaphore(QString()), lockedByMe(false),
#endif
unix_key(0)
{
}
void QSharedMemoryPrivate::setErrorString(const QString &function)
{
Q_UNUSED(function); |
cpp | tempo1 = magma_sync_wtime( queue );
magma_z_vtransfer(b_h, &b, Magma_CPU, Magma_DEV, queue);
tempo2 = magma_sync_wtime( queue );
t_transfer += tempo2-tempo1;
|
cpp | // pas directement inclus par des fichiers '.cc' pour s'assurer que
// les symboles externes sont bien définis.
#include "arccore/message_passing/MessagePassingGlobal.h"
#include "arccore/message_passing/ITypeDispatcher.h"
#include "arccore/message_passing/Dispatchers.h"
#include "arccore/message_passing/IMessagePassingMng.h"
#include "arccore/message_passing/IRequestList.h"
#include "arccore/message_passing/ISerializeMessageList.h"
#include "arccore/message_passing/ISerializeDispatcher.h"
#include "arccore/message_passing/IProfiler.h"
|
cpp | * "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,
* software distributed under the License is distributed on an |
cpp | }
this->Interpreter->ReleaseControl();
this->MultilineStatement = false;
}
~pqImplementation()
{
this->VTKConnect->Disconnect();
this->VTKConnect->Delete();
this->destroyInterpretor();
}
void destroyInterpretor() |
cpp |
#include "common/engine/system/fixedstring.hpp"
//////////////////////////////////////////////////////
// DEFINES
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
// FORWARD DECLARATION
//////////////////////////////////////////////////////
//////////////////////////////////////////////////////
// CLASSES
//////////////////////////////////////////////////////
|
cpp | #include <os/open.hxx>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.