lang
stringclasses
10 values
seed
stringlengths
5
2.12k
cpp
#include "stdafx.h" #include "Constants.h" Constants::Constants() { } Constants::~Constants() { }
cpp
// cameras from durrent discovery cycle camera_list new_cameras; // completely new cameras camera_list to_add; std::mutex cam_mutex; // callback function std::function<void(std::shared_ptr<Camera>)> func = [&] (std::shared_ptr<Camera> cam) {
cpp
for (int K = gi();K--;) A[gi()] = 1; for (int K = gi();K--;) B[gi()] = 1; scanf("%s",s+1); stack <int> S; for (int i = 1;i <= M;++i) match[i] = -1; for (int i = 1;i <= M;++i) { if (s[i] == '(') S.push(i); else if (s[i] == ')') { int t = S.top(); S.pop(); match[match[t] = i] = t; }
cpp
glUseProgramStages(handle, stage->stageBits, stage->handle); } }, true); } Compile::Compile(const Compile& a_Other)
cpp
TEST_CASE("2018 Day 8 Part 2 Example work", "[2018][Day08]") { const std::vector<std::string> input = {}; Day08Puzzle puzzle{}; puzzle.setVerbose(true); puzzle.setInputLines(input);
cpp
BURGER_ALIGN(const uint8_t, Burger::Renderer::RGB6ToRGB8Table[64],16) = { 0x00,0x04,0x08,0x0C,0x10,0x14,0x18,0x1C, 0x20,0x24,0x28,0x2C,0x30,0x34,0x38,0x3C, 0x41,0x45,0x49,0x4D,0x51,0x55,0x59,0x5D, 0x61,0x65,0x69,0x6D,0x71,0x75,0x79,0x7D, 0x82,0x86,0x8A,0x8E,0x92,0x96,0x9A,0x9E, 0xA2,0xA6,0xAA,0xAE,0xB2,0xB6,0xBA,0xBE, 0xC3,0xC7,0xCB,0xCF,0xD3,0xD7,0xDB,0xDF, 0xE3,0xE7,0xEB,0xEF,0xF3,0xF7,0xFB,0xFF}; /*! ************************************
cpp
inputs, outputs, tensor_manager->requestTensors(gnode, init_context.getTensorsSpec())); return outputs; } int NetworkGraph::initialize() { int status = ML_ERROR_NONE; /** this contains the map from name to input tensors for each node */ std::unordered_map<std::string, std::vector<Var_Grad *>> input_map; /** check if the given config of node is of input node */ auto is_input_node = [](const std::shared_ptr<LayerNode> &node) -> bool { return node->getInputConnections().empty(); };
cpp
void pybind_weight(py::module& m) { { using PyClass = fst::FloatWeight; py::class_<PyClass>(m, "FloatWeight") .def(py::init<>()) .def(py::init<float>(), py::arg("f")) .def(py::init<const PyClass&>(), py::arg("weight")) .def("Value", &PyClass::Value, py::return_value_policy::reference) .def("Hash", &PyClass::Hash) .def("__eq__",
cpp
vector<int> ans; int u = n - 1; while (true) { ans.push_back(u + 1); if (u == 0) break;
cpp
return CThumbnailWndBase::PreCreateWindow(cs); } #endif // HANDLE_THUMBNAIL_WND_PAINT_WITH_DOUBLE_BUFFER void CThumbnailWnd::OnSize(UINT nType, int cx, int cy)
cpp
sample = uniformly_randomly_generate_general_float<Float>(rg_); for (unsigned int digits = 1; digits <= max_digits; ++digits) { samples_[digits].resize(number_of_digits_samples_per_digits); for (auto& sample : samples_[digits]) sample = randomly_generate_float_with_given_digits<Float>(digits, rg_); } } // { "name" : [(digits, [(sample, measured_time)])] } // Results for general samples is stored at the position digits=0 using output_type = std::unordered_map<std::string, std::array<std::vector<std::pair<Float, double>>, max_digits + 1>>; void run(std::size_t number_of_iterations, std::string_view float_name, output_type& out) {
cpp
switch (ch) { case 'P': charNum[0]++; break; case 'A': charNum[1]++; break; case 'T': charNum[2]++; break; case 'e': charNum[3]++;
cpp
void MixerAvatar::fstRequestComplete() { ResourceRequest* fstRequest = static_cast<ResourceRequest*>(QObject::sender()); QMutexLocker certifyLocker(&_avatarCertifyLock); if (_verifyState == requestingFST && fstRequest == _avatarRequest) { auto result = fstRequest->getResult(); if (result != ResourceRequest::Success) { _verifyState = error; qCDebug(avatars) << "FST request for" << fstRequest->getUrl() << "(user " << getSessionUUID() << ") failed:" << result; } else { _avatarFSTContents = fstRequest->getData(); _verifyState = receivedFST; _pendingEvent = true; } _avatarRequest = nullptr;
cpp
} #define NUMPY_NARY_FUNC_NAME int16 #define NUMPY_NARY_FUNC_SYM details::int16 #define NUMPY_NARY_EXTRA_METHOD using type = int16_t;
cpp
namespace cv { namespace detail { /** Computes the matrix for the projection onto a tilted image sensor \param tauX angular parameter rotation around x-axis \param tauY angular parameter rotation around y-axis \param matTilt if not NULL returns the matrix \f[ \vecthreethree{R_{33}(\tau_x, \tau_y)}{0}{-R_{13}((\tau_x, \tau_y)} {0}{R_{33}(\tau_x, \tau_y)}{-R_{23}(\tau_x, \tau_y)} {0}{0}{1} R(\tau_x, \tau_y) \f] where
cpp
// Try to find the best approximation of the ratio that we can. Our // approach is as follows. Figure out the number of bits to the right // we need to shift the numerator and denominator, rounding up or down // in the process, such that the result can be reduced to fit into 32 // bits. // // This approach tends to beat out a just-shift-until-it-fits approach, // as well as an always-shift-then-reduce approach, but _none_ of these // approaches always finds the best solution. // // TODO(johngro) : figure out if it is reasonable to actually compute
cpp
int MaterialIndex = register_material(Material); MaterialIndexMap.push_back(MaterialIndex); } // Covert to radians yRotation = yRotation / 180.0f * PI; // Add shapes as separate triangle meshes for (auto& Shape: Shapes)
cpp
stk.pop(); } if (!stk.empty() && stk.top().front() == '[') stk.pop(); return res;
cpp
#ifndef _AUXILIARYCLASSES_THEN_EMPLACEEXECUTEVOIDRESOLVETREJECTVOID_HPP_ #define _AUXILIARYCLASSES_THEN_EMPLACEEXECUTEVOIDRESOLVETREJECTVOID_HPP_ #include "Promise.hpp" class EmplaceExecuteVoidResolveTRejectVoid { public: EmplaceExecuteVoidResolveTRejectVoid(const EmplaceExecuteVoidResolveTRejectVoid&) = delete; EmplaceExecuteVoidResolveTRejectVoid(const EmplaceExecuteVoidResolveTRejectVoid&&) = delete;
cpp
************************************************************************/ #include<iostream> #include<cmath> using namespace std; int main(void) {
cpp
{ ++count; emit progress(); } else { break; } } else if (m_office == CWTypes::OfficeType::MicrosoftOffice)
cpp
for(int i=0 ; i<nBackgroundSpecies ; i++) { gitrInputFile2 >> maxDensity[i]; } gitrInputFile2 >> string1; for(int i=0 ; i<nBackgroundSpecies ; i++) { gitrInputFile2 >> maxTemp_eV[i]; }
cpp
// Components foePosition3dPool *mpPosition3dPool; // Graphics VkDevice mDevice{VK_NULL_HANDLE}; VmaAllocator mAllocator{VK_NULL_HANDLE}; uint32_t mMinUniformBufferOffsetAlignment{0};
cpp
int length = 0; // For now assume MAC, ROMAN, element 1 // WE can expand this in the future if it is not correct // This should be the family name. const char* name = stbtt_GetFontNameString(&ttf_face->Face.font_info, &length, STBTT_PLATFORM_ID_MAC, STBTT_MAC_EID_ROMAN, 0, 1); ROCKET_ASSERT(name); ttf_face->Face.Style = Font::STYLE_NORMAL;
cpp
} const V3& RayCastManifold::normal() const { return _normal; } const sp<RigidBody>& RayCastManifold::rigidBody() const { return _rigid_body; } }
cpp
m_stateHasBeenSet(false), m_createTimeHasBeenSet(false), m_updateTimeHasBeenSet(false), m_ownerIdHasBeenSet(false), m_ownerAliasHasBeenSet(false), m_productCodesHasBeenSet(false), m_tagsHasBeenSet(false), m_public(false), m_publicHasBeenSet(false), m_dataRetentionSupport(false), m_dataRetentionSupportHasBeenSet(false) { } FpgaImage::FpgaImage(const XmlNode& xmlNode) :
cpp
// Type namespace: NetEase.Docker namespace NetEase::Docker { // Size: 0x2C #pragma pack(push, 1) // WARNING Layout: Sequential may not be correctly taken into account! // Autogenerated type: NetEase.Docker.UploadScoreData
cpp
/// Defines type for number of colors. struct raw_number_colors : property_base< int32_t > {}; /// Defines type for colors description. struct raw_colors_description : property_base< std::string > {}; /// Defines type for raw height. struct raw_raw_height : property_base< uint16_t > {}; /// Defines type for raw width. struct raw_raw_width : property_base< uint16_t > {}; /// Defines type for visible height. struct raw_visible_height : property_base< uint16_t > {};
cpp
software_skinning = nullptr; software_skinning_flags = SoftwareSkinning::FLAG_TRANSFORM_NORMALS; } MeshInstance::~MeshInstance() { if (software_skinning) { memdelete(software_skinning);
cpp
Questions? Contact <EMAIL> */ #include <sumi/allgatherv.h> #include <sumi/transport.h> #include <sumi/communicator.h> #include <sprockit/output.h> #include <cstring> #define divide_by_2_round_up(x) \ ((x/2) + (x%2)) #define divide_by_2_round_down(x) \ (x/2)
cpp
FirstScene::FirstScene() { wyLabel* label = wyLabel::make("Welcome to WiEngine", SP(20), BOLD, WY_DEFAULT_FONT); label->setPosition(wyDevice::winWidth / 2, wyDevice::winHeight / 2); addChildLocked(label);
cpp
} void StructureScanComplexItem::setDirty(bool dirty) { if (_dirty != dirty) { _dirty = dirty; emit dirtyChanged(_dirty); } } void StructureScanComplexItem::save(QJsonArray& missionItems)
cpp
static void TearDownTestCase() { s_instance->OneTimeTearDown(); s_instance = nullptr; }; }; System::SharedPtr<::ApiExamples::ExXpsSaveOptions> ExXpsSaveOptions::s_instance; TEST_F(ExXpsSaveOptions, OutlineLevels) {
cpp
// 5. not valid json const char *json4 = "{\"pid\":\"1.1\",\"ballot\":234,\"max_replica_count\":3," "\"primary\":\"invalid address\",\"secondaries\":[\"127.0.0.1:6\"," "\"last_drops\":[],\"last_committed_decree\":157}"; dsn::blob in(json4, 0, strlen(json4)); bool result = dsn::json::json_forwarder<dsn::partition_configuration>::decode(in, pc); ASSERT_FALSE(result); // 6 app_name with ':' const char *json6 = "{\"status\":\"app_status::AS_AVAILABLE\"," "\"app_type\":\"pegasus\",\"app_name\":\"CL769:test\"," "\"app_id\":1,\"partition_count\":16,\"envs\":{}," "\"is_stateful\":1,\"max_replica_count\":3}"; result = dsn::json::json_forwarder<dsn::app_info>::decode(dsn::blob(json6, 0, strlen(json6)), info2);
cpp
::Dynamic GenericStack_obj::iterator(){ HX_GC_STACKFRAME(&_hx_pos_cc4d611fc47fcdec_178_iterator) HXDLIN( 178) return ::haxe::ds::_GenericStack::GenericStackIterator_obj::__alloc( HX_CTX ,this->head); } HX_DEFINE_DYNAMIC_FUNC0(GenericStack_obj,iterator,return )
cpp
{"use_recursive_BDD_test", (PyCFunction)PyPBConfig_Use_Recursive_BDD_Test, METH_VARARGS, "Set the use of recursive BDD test. False by default."}, {"use_real_robdds", (PyCFunction)PyPBConfig_Use_Real_Robdds, METH_VARARGS, "Set the use of real robdds. True by default."}, {"use_watch_dog_encoding_in_binary_merger", (PyCFunction)PyPBConfig_Use_Watch_Dog_Encoding_In_Binary_Merger, METH_VARARGS, "Set use watch dog encoding in binary merge. False by default."}, {NULL} /* sentinel */ }; // PyPBConfig Python type definition
cpp
} bool PortsJsonObject::nameIsSet() const { return m_nameIsSet; }
cpp
a = SHA_ROTL(b,5)+SHA_F3(c,d,e)+a+XW(n)+K2; c=SHA_ROTL(c,30) #define SHA_RND4(a,b,c,d,e,n) \ a = SHA_ROTL(b,5)+SHA_F4(c,d,e)+a+XW(n)+K3; c=SHA_ROTL(c,30) #define LOAD(n) XW(n) = SHA_HTONL(inbuf[n]) A = XH(0); B = XH(1); C = XH(2); D = XH(3);
cpp
//----------------------------------------------------------------------------- CPUTPerfTaskMarker::~CPUTPerfTaskMarker() { D3DPERF_EndEvent(); } #else // This is a bit of a hack to get the compiler not to complain about this being an empty file // during the compilation in any mode that doesn't have CPUT_GPA_INSTRUMENTATION defined #define CPUTPerfTaskMarkerNotEmpty() namespace { char CPUTPerfTaskMarkerDummy##__LINE__; } CPUTPerfTaskMarkerNotEmpty(); #endif
cpp
#define CZI_EXPRESSION_MATRIX2_STDEXCEPT_HPP // Add to the ExpressionMatrix2 namespace some names defined in namespace std. #include <stdexcept> namespace ChanZuckerberg { namespace ExpressionMatrix2 { using std::exception; using std::runtime_error; }
cpp
// Get instance field reference: public System.Int32 value__ int& dyn_value__(); }; // System.Reflection.GenericParameterAttributes #pragma pack(pop) static check_size<sizeof(GenericParameterAttributes), 0 + sizeof(int)> __System_Reflection_GenericParameterAttributesSizeCheck; static_assert(sizeof(GenericParameterAttributes) == 0x4); } #include "extern/beatsaber-hook/shared/utils/il2cpp-type-check.hpp" DEFINE_IL2CPP_ARG_TYPE(System::Reflection::GenericParameterAttributes, "System.Reflection", "GenericParameterAttributes"); #include "extern/beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
cpp
namespace usr { class base : public actx::free_actor { public: static base spawn(actx::ax_system& axs); public: // recv REPLY actx::actor_id recv_reply_from_util_test(std::string& reply);
cpp
false); AirMassFlowRate = 0.0; } Baseboard(BaseboardNum).WaterOutletTemp = WaterOutletTemp; Baseboard(BaseboardNum).AirOutletTemp = AirOutletTemp; Baseboard(BaseboardNum).Power = LoadMet; Baseboard(BaseboardNum).WaterMassFlowRate = WaterMassFlowRate; Baseboard(BaseboardNum).AirMassFlowRate = AirMassFlowRate; }
cpp
#ifndef RS232_WIN_CPP #define RS232_WIN_CPP #include "rs232.h" static int valid_baudrates[] = {110, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 128000, 256000};
cpp
m_data[0] = m_data[1] = m_data[2] = a; } template <typename T> inline Vec3<T>::Vec3(T x, T y, T z) { m_data[0] = x; m_data[1] = y; m_data[2] = z; }
cpp
auto Colon = SyntaxFactory::makeColonToken({}, Trivia::spaces(1)); auto Int = SyntaxFactory::makeTypeIdentifier("Int", {}, Trivia::spaces(1)); auto NoEllipsis = TokenSyntax::missingToken(tok::identifier, "..."); auto Equal = SyntaxFactory::makeEqualToken({}, Trivia::spaces(1));
cpp
printf("From source %d",src); for(i=1;i<=n;i++) printf("The shortest distance to %d is %d",i,d[i]); //INITIALIZE SPANNING TREE EDGES int l=0; for (int it = 1; it <= n; ++it) { if(parent[it]==it) continue;
cpp
static void g_setup_dropdown_fromlist(HWND wnd,const pfc::ptr_list_t<char> & list) { t_size n, m = list.get_count(); uSendMessage(wnd,CB_RESETCONTENT,0,0); for(n=0;n<m;n++) { uSendMessageText(wnd,CB_ADDSTRING,0,list[n]); } } void _cfg_dropdown_history_base::setup_dropdown(HWND wnd) { pfc::ptr_list_t<char> list; build_list(list); g_setup_dropdown_fromlist(wnd,list); list.free_all();
cpp
va_end( args ); return length; } // va_list is passed-by-value on Windows, so we don't need to copy it // for the two different calls. int vsnprintf( char *str, size_t size, const char *format, va_list args)
cpp
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n, k, paid, sum = 0; cin >> n >> k; vector<int> prices(n); for (int i = 0; i < n; i++) { int temp; cin >> temp;
cpp
LOG_TOPIC(DEBUG, Logger::AGENCY) << "Upgrading the agency:" << builder.toJson(); if (builder.slice().length() > 0) { generalTransaction(_agent, builder); } _upgraded = true;
cpp
// nums.push_back(3); // nums.push_back(3); // nums.push_back(4); // nums.push_back(4); // nums.push_back(4); nums.push_back(7); nums.push_back(1); nums.push_back(7); nums.push_back(7); nums.push_back(61); nums.push_back(61);
cpp
} } return calcInformationLoss(); }
cpp
{ //LayoutModule FastMultipoleEmbedder *model = new FastMultipoleEmbedder(); model->setDefaultEdgeLength(defaultEdgeLength); model->setDefaultNodeSize(defaultNodeSize);
cpp
void init () { scanf("%d", &N); for (int i = 0; i < 2; i++) for (int j = 0; j < N; j++) scanf("%d", &g[i][j]); for (int i = 0; i < N; i++) d[i] = abs(g[0][i] - g[1][i]); }
cpp
TCP::close(); } catch (...) { L_EXC("Unhandled exception in destructor"); } }
cpp
// The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked ‘Finish’ in the diagram below). // How many possible unique paths are there? // Note: A and B will be such that the resulting answer fits in a 32 bit signed integer. // Example : // Input : A = 2, B = 2 // Output : 2 // 2 possible routes : (0, 0) -> (0, 1) -> (1, 1) // OR : (0, 0) -> (1, 0) -> (1, 1)
cpp
#pragma once #include "systems/box.hpp" #include "vesicleIO/parameters.hpp"
cpp
{ setUpTestProgram(); m_service = std::make_unique<service::TestCasePropertySetter>(m_testProgram); } void setUpTestProgram() {
cpp
namespace gpu { namespace jit { struct xe_hp_systolic_gemm_t : public gpu_gemm_t { struct pd_t : public gpu_gemm_pd_t { using hint_class = void;
cpp
#include "rtMath.h" rt::Vec3 rt::CrossProduct( const rt::Vec3& vecA, const rt::Vec3& vecB ) { return rt::Vec3( vecA.y * vecB.z - vecA.z * vecB.y, vecA.z * vecB.x - vecA.x * vecB.z,
cpp
for (unsigned char i = length; i < KENLM_MAX_ORDER - 1; ++i) { words[i] = 0; backoff[i] = 0.0; } } unsigned char Length() const { return length; }
cpp
} BufferImage2D AbstractFramebuffer::read(const Range2Di& rectangle, BufferImage2D&& image, BufferUsage usage) { read(rectangle, image, usage); return std::move(image); } #endif #ifndef MAGNUM_TARGET_GLES
cpp
<gh_stars>100-1000 #pragma once #include <limits.h> #define NAT_INT_MIN LLONG_MIN #define NAT_INT_MAX LLONG_MAX namespace Natalie {
cpp
// The number of calls to 'expensive' should be the size of the // output, plus some margin from the stencil, plus a little // redundant recompute at the split boundary. int correct = (out.height() + 2 + 2) * out.width(); if (call_count != correct) { printf("number of calls to producer was %d instead of %d\n", call_count, correct); return 1; }
cpp
std::string name = "X_CR_" + std::to_string(i) + "_node_" + std::to_string(j); glp_add_cols(model, 1); glp_set_col_name(this->model, NoC->var_size, name.c_str()); glp_set_col_kind(this->model, NoC->var_size, GLP_BV); glp_set_obj_coef(this->model, NoC->var_size, 0.0); } } for (int i = 0; i < NoC->N_paths; i++) { for (int j = 0; j < NoC->N_links; j++) { NoC->var_size += 1; std::string name = "X_path_" + std::to_string(i) + "_link_" + std::to_string(j); glp_add_cols(model, 1);
cpp
while (w_it != waiting.rend() && a_it != active.end() && a_it->first < w_it->first) { { on_thread_t thread_switcher_2(a_it->second->home_thread()); if (!a_it->second->get_preempt_signal()->is_pulsed()) { preempt(a_it->second);
cpp
pixelQueue.pop(); } bool BgFifo::coordsInsideWindow(uint16_t xPos, uint16_t yPos) { // remember: the window is drawn from Wx - 7 // screen is 160 wide, 144 tall: so x is between 0..159 and y 0..143 // we have to render window if screenx >= Wx-7 and screeny >= Wy return (xPos >= ppu->getWx() - 7) && (yPos >= ppu->getWy()); }
cpp
namespace clang { namespace tidy { namespace bugprone { static const Expr *getLHSOfMulBinOp(const Expr *E) { assert(E == E->IgnoreParens() && "Already skipped all parens!"); // Is this: long r = int(x) * int(y); ?
cpp
if(m_closeTimeFilterHasBeenSet) { payload.WithObject("closeTimeFilter", m_closeTimeFilter.Jsonize()); } if(m_executionFilterHasBeenSet) {
cpp
{ } ChunkData::~ChunkData() { } uint8_t ChunkData::getBlockId(int x,int y,int z) { return mSections[y>>4].getBlockId(x,y&15,z); }
cpp
TEST_F(AuxGTest, testNumberParsingAdvancedReal) { auto helper = [](const std::string& str, double expected) { auto result = std::get<0>(Aux::Parsing::strTo<double>(str.begin(), str.end())); EXPECT_DOUBLE_EQ(result, expected); }; #define TEST_CASE_REAL(number) helper(#number, number) TEST_CASE_REAL(0);
cpp
template<> Converter::Conversion::Ptr Converter::Convert(const opset::ConvolutionBackpropData& node) { auto make = [&] (auto refFunction) { auto out_shape = node.get_shape(); ngraph::Strides in_dilation(std::vector<size_t>(node.get_input_shape(0).size() - 2)); std::fill(in_dilation.begin(), in_dilation.end(), 1); return MakeConversion(refFunction,
cpp
otherVehicleStateDynamics.lateralFluctuationMargin = otherVehicleStateDynamicsLateralFluctuationMargin; otherVehicleState.dynamics = otherVehicleStateDynamics; ::ad_rss::physics::Duration otherVehicleStateResponseTime(100.); otherVehicleStateResponseTime = ::ad_rss::physics::Duration(10.); // set to valid value within struct otherVehicleState.responseTime = otherVehicleStateResponseTime; bool otherVehicleStateHasPriority{false}; otherVehicleState.hasPriority = otherVehicleStateHasPriority; bool otherVehicleStateIsInCorrectLane{false}; otherVehicleState.isInCorrectLane = otherVehicleStateIsInCorrectLane; ::ad_rss::physics::Distance otherVehicleStateDistanceToEnterIntersection(1e6); otherVehicleState.distanceToEnterIntersection = otherVehicleStateDistanceToEnterIntersection; ::ad_rss::physics::Distance otherVehicleStateDistanceToLeaveIntersection(1e6); otherVehicleStateDistanceToLeaveIntersection = ::ad_rss::physics::Distance(1e4); // set to valid value within struct otherVehicleState.distanceToLeaveIntersection = otherVehicleStateDistanceToLeaveIntersection;
cpp
for (double b = 2; b <= 100; ++b) { result.insert (pow (a, b)); } } total = result.size ();
cpp
#include <iostream> #include <vector> using namespace std; Controler::Controler()
cpp
const char *name = "The Girl Who Played With The Dragons Nest"; const char *version = "1.2"; int main (int, char **) { Game game; return game.run(name, version);
cpp
struct EqualByWeight { template <class X> bool operator()(X const* a, X const* b) const { return a->weight() == b->weight(); } };
cpp
const char *file; struct tm *time; FILE *udata; int line; }; static signed char level; const static char *FORMAT = "[%s] %s\n"; static inline void initEvent(LogEvent *ev, FILE *udata) {
cpp
} } // namespace ContentRulesetService::ContentRulesetService( scoped_refptr<base::SequencedTaskRunner> blocking_task_runner) : ruleset_dealer_(base::MakeUnique<VerifiedRulesetDealer::Handle>( std::move(blocking_task_runner))) {
cpp
" incididunt ut labore et dolore magna aliqua. Ut enim ad minim " "veniam, quis nostrud" " exercitation ullamco laboris nisi ut aliquip ex ea commodo " "consequat. Duis aute irure" " dolor in reprehenderit in voluptate velit esse cillum dolore eu " "fugiat nulla pariatur." " Excepteur sint occaecat cupidatat non proident, sunt in culpa " "qui officia deserunt" " mollit anim id est laborum.",
cpp
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #ifdef WindCry1 freopen("C:\\Users\\LENOVO\\Desktop\\in.txt","r",stdin); #endif memset(dp,-1,sizeof dp); int T;cin>>T;for(int cas=1;cas<=T;cas++){ ll a,b;cin>>a>>b; m=f(a); change(b); ll res=dfs(bit.size()-1,0,true); cout<<"Case #"<<cas<<": "<<res<<endl;
cpp
count_frequency[query_keyword] = 1; } else { count_frequency[query_keyword] += 1; } } for (auto count_iter = count_frequency.begin();
cpp
static Policy& getPolicy() { static Policy A; return A; } } // namespace bool galois::runtime::LL::bindThreadToProcessor(int id) {
cpp
ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_PUSHED)); ctype = WebThemeControlDRTWin::IndeterminateCheckboxType; cstate = WebThemeControlDRTWin::PressedState; break; case CBS_MIXEDDISABLED: ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_INACTIVE)); ctype = WebThemeControlDRTWin::IndeterminateCheckboxType; cstate = WebThemeControlDRTWin::DisabledState; break; default:
cpp
void GpuVideoServiceHost::OnChannelClosing() { // TODO(hclam): Implement. } bool GpuVideoServiceHost::OnMessageReceived(const IPC::Message& msg) { switch (msg.type()) { case GpuVideoDecoderHostMsg_CreateVideoDecoderDone::ID: case GpuVideoDecoderHostMsg_InitializeACK::ID:
cpp
} /** * This is called by do_update() whenever the part or some ancestor has * changed values. It is a hook for derived classes to update whatever cache * they may have that depends on these. * * The return value is true if the part has changed as a result of the update, * or false otherwise.
cpp
// Vectors with 16-bit integer elements TemplateTestArrayHelper<Test_shift_l, uint16<B/2>>::run(tc, v.u16, vnum); TemplateTestArrayHelper<Test_shift_l, int16<B/2>>::run(tc, v.i16, vnum); TemplateTestArrayHelper<Test_shift_r, uint16<B/2>>::run(tc, v.u16, vnum); TemplateTestArrayHelper<Test_shift_r, int16<B/2>>::run(tc, v.i16, vnum);
cpp
#include <unordered_map> #include <assert.h> #include <queue> #include <stack> #include <numeric> #include <set> using namespace std;
cpp
const char *xmrig::HttpsClient::tlsVersion() const { return m_ready ? SSL_get_version(m_ssl) : nullptr; } void xmrig::HttpsClient::handshake() { m_ssl = SSL_new(m_ctx); assert(m_ssl != nullptr);
cpp
#include <caffe2/serialize/file_adapter.h> #include <caffe2/serialize/inline_container.h> #include <torch/csrc/jit/api/compilation_unit.h> // removed after using simple type_resolver/obj_loader #include <torch/csrc/jit/mobile/import.h> // removed after using simple type_resolver/obj_loader #include <torch/csrc/jit/mobile/model_compatibility.h> #include <torch/csrc/jit/serialization/import_read.h> #include <sstream> #include <string> #include <vector> namespace torch { namespace jit { using caffe2::serialize::FileAdapter;
cpp
// Copyright 2011 by BBN Technologies Corp. // All Rights Reserved. #include "Generic/common/leak_detection.h" #include "Generic/descriptors/discmodel/featuretypes/RareHWListFT.h" bool RareHWListFT::_initialized = false; RareHWListFT::Table* RareHWListFT::_hwList = 0;
cpp
/* pour interface_blocs : si toutes les equations ont cette interface, on l'utilise */ int interface_blocs_ok = 1; for (i = 0; i < eqs.size(); i++) interface_blocs_ok &= eqs[i]->has_interface_blocs(); std::vector<matrices_t> mats(eqs.size()); //ligne de matrices de l'equation i const std::string& nom_inco = eqs[0]->inconnue().le_nom().getString(); for (i = 0; i < eqs.size(); i++) for (j = 0; j < eqs.size(); j++) mats[i][j == i ? nom_inco : nom_inco + "_" + eqs[j]->probleme().le_nom().getString()] = &ref_cast(Matrice_Morse, Mglob.get_bloc(i, j).valeur());
cpp
// Software Guide : BeginLatex // // Types should be selected based on the pixel types required for the // input and output images. The image types are defined using the pixel // type and the dimension.
cpp
#include "td/utils/logging.h" #include "td/utils/port/thread.h" #include "td/utils/Random.h" #include "td/utils/tests.h" #include <atomic> #if !TD_THREAD_UNSUPPORTED TEST(HazardPointers, stress) { struct Node {
cpp
for (int i = 0; i < spec_.parameter_size(); ++i) { if (spec_.parameter(i).name() == name) return spec_.parameter(i).value(); } // Parameter not found, return default value. return defval; }
cpp
// // Created by caiotava on 4/15/21. // #include<SDL.h> #include "Game.h" const int FPS = 60; const int DELAY_TIME = 1000.0f / FPS; int main(int argc, char **argv) { Uint32 frameStart, frameTime; auto *game = Game::Instance();
cpp
NonConstFunctorType ncFunctor(1); MapComparator<Key, Value, NonConstFunctorType> ncComp(ncFunctor); ASSERTV(0 == da.numBytesInUse());
cpp
} }; // Writing MetadataGetter for method: GlobalNamespace::OVRLipSyncContextMorphTarget::Update // Il2CppName: Update template<> struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (GlobalNamespace::OVRLipSyncContextMorphTarget::*)()>(&GlobalNamespace::OVRLipSyncContextMorphTarget::Update)> { static const MethodInfo* get() { return ::il2cpp_utils::FindMethod(classof(GlobalNamespace::OVRLipSyncContextMorphTarget*), "Update", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{}); } }; // Writing MetadataGetter for method: GlobalNamespace::OVRLipSyncContextMorphTarget::CheckForKeys
cpp
namespace Aws { namespace S3 { namespace Model { GlacierJobParameters::GlacierJobParameters() : m_tier(Tier::NOT_SET), m_tierHasBeenSet(false) { } GlacierJobParameters::GlacierJobParameters(const XmlNode& xmlNode) :