text stringlengths 54 60.6k |
|---|
<commit_before>/**
* This file contains functions to create and save a png file
*/
#include "png.h"
#ifndef Z_BEST_SPEED
#define Z_BEST_SPEED 6
#endif
namespace PNG {
PNG::PNG(const std::filesystem::path &file) : file(file), imageHandle(nullptr) {
set_type(UNKNOWN);
_line = _height = _width = _padding = 0;
... |
<commit_before>/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: pageproperties.cxx,v $
*
* $Revision: 1.5 $
*
* last change: $Author: rt $ $Date: 2005-09-09 00:15:40 $
*
* The Contents of this file are... |
<commit_before><commit_msg>ww8: warning C4701: potentially uninitialized local variable<commit_after><|endoftext|> |
<commit_before>#include "scenetree.h"
#include <game/gameserver.h>
#include <game/digitanks/digitanksgame.h>
#include "digitankswindow.h"
#include "hud.h"
#include <renderer\renderer.h>
#include <game/digitanks/dt_camera.h>
#include "instructor.h"
CSceneTree::CSceneTree()
: CTree(CRenderer::LoadTextureIntoGL(L"textu... |
<commit_before>/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <[email protected]>
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 r... |
<commit_before>#include "acmacs-base/argv.hh"
#include "acmacs-base/guile.hh"
#include "acmacs-chart-2/chart-modify.hh"
#include "acmacs-chart-2/factory-import.hh"
// ----------------------------------------------------------------------
using namespace acmacs::argv;
struct Options : public argv
{
Options(int a_a... |
<commit_before>#pragma once
#include <cmath>
#include <limits>
#include <iostream>
#include "acmacs-base/float.hh"
#include "acmacs-base/to-string.hh"
// ----------------------------------------------------------------------
namespace acmacs::detail
{
template <char Tag> class SizeScale
{
public:
... |
<commit_before>#include <iostream>
#include <cstdlib>
#include "min_max_heap.h"
#include "min_max_heap_test.h"
using namespace std;
void min_max_heap_test()
{
const int num_experiments = 500;
min_max_heap my_min_max_heap(num_experiments);
int data[num_experiments];
for (int i = 0; i < num_experiments;... |
<commit_before>#include<iostream>
#include<iomanip>
using namespace std;
struct Trabajadores{
string nombre;
float salario;
}T[20];
int main(){
}
<commit_msg>Agregando<commit_after>#include<iostream>
#include<iomanip>
using namespace std;
/*
Variables
Son 20 Empleados
Leer a Cada uno
Nombre, Horas de Trabajo, ... |
<commit_before>//---------------------------------------------------------------------------//
/*
Copyright (c) 2012, Stuart R. Slattery
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
*: Re... |
<commit_before>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* complia... |
<commit_before>
// =-=-=-=-=-=-=-
#include "apiHeaderAll.hpp"
#include "msParam.hpp"
#include "reGlobalsExtern.hpp"
#include "irods_ms_plugin.hpp"
// =-=-=-=-=-=-=-
// STL Includes
#include <string>
#include <iostream>
// =-=-=-=-=-=-=-
// cURL Includes
#include <curl/curl.h>
#include <curl/easy.h>
typedef struc... |
<commit_before><commit_msg>CloseSuperfluousFiles shouldn't close the directory it's reading from<commit_after><|endoftext|> |
<commit_before>#include <iostream>
#include "game.hpp"
#include <SDL2/SDL.h>
#include <thread>
#include <chrono>
#include <atomic>
#ifdef _OPENMP
#include <omp.h>
#endif
// TODO: reorder header includes (std first)
// TODO: fix formatting
using namespace std::chrono;
milliseconds last_frame_time;
Scal last_frame_... |
<commit_before>#include <GarrysMod/Lua/Interface.h>
#include <lua.hpp>
extern "C" int luaopen_ssl_core( lua_State *state );
extern "C" int luaopen_ssl_context( lua_State *state );
extern "C" int luaopen_ssl_x509( lua_State *state );
GMOD_MODULE_OPEN( )
{
if( luaopen_ssl_core( LUA->state ) == 1 )
{
lua_replace( LU... |
<commit_before>#include <3ds.h>
#include <stdio.h>
void shutdown3DS()
{
Handle ptmSysmHandle = 0;
Result result = srvGetServiceHandle(&ptmSysmHandle, "ns:s");
if (result != 0)
return;
// http://3dbrew.org/wiki/NSS:ShutdownAsync
u32 *commandBuffer = getThreadCommandBuffer();
commandBuffer[0] = 0x... |
<commit_before>#include <ctrcommon/app.hpp>
#include <ctrcommon/gpu.hpp>
#include <ctrcommon/input.hpp>
#include <ctrcommon/nor.hpp>
#include <ctrcommon/platform.hpp>
#include <ctrcommon/ui.hpp>
#include "rop.h"
#include <sys/errno.h>
#include <stdio.h>
#include <string.h>
#include <sstream>
#include <... |
<commit_before>#include "CLIParser.h"
namespace ros2_components
{
CLIParser::CLIParser(char *argv[], int argc, std::string _programDescription)
{
for(int i=0; i < argc;i++)
{
this->arguments.push_back(std::string(argv[i]));
}
//0 arg is the program name
this->baseVerb = std::make_shared<C... |
<commit_before>#include <QApplication>
#include "mainwindow.h"
#include <QtWidgets>
#include <QWebFrame>
#include <QWebInspector>
/*
* Utility:
* ./exectuable pageAddress width height decoration (BOTTOM_MOST)
*
* - pageAddress: the html file path or url
* - width: integer that represent the width of ... |
<commit_before>/*
* Copyright (c) 2012, Willow Garage, 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
* ... |
<commit_before>#include "disassembler.h"
#include "util.h"
#include "symtab.h"
using namespace std;
enum ByteTypeGuess {
UNINITIALIZED,
UNKNOWN,
CHAR_DATA,
UNINITIALIZED_CHAR_DATA,
WORD_DATA,
UNINITIALIZED_WORD_DATA,
CODE,
};
struct program {
ByteTypeGuess byte_type_guess[65536];
char memory[65536];
bool i... |
<commit_before>#include <gobject-introspection-1.0/girepository.h>
#include <node.h>
#include <nan.h>
#include "async_call_environment.h"
#include "boxed.h"
#include "debug.h"
#include "function.h"
#include "gi.h"
#include "gobject.h"
#include "loop.h"
#include "macros.h"
#include "type.h"
#include "util.h"
#include "... |
<commit_before>/******************************************************************************
* _ _____ __________ *
* | | / / _ | / __/_ __/ Visibility *
* | |/ / __ |_\ \ / / Across ... |
<commit_before>#include "disassembler.h"
#include "util.h"
#include "symtab.h"
#include <vector>
#include <cctype>
using namespace std;
enum ByteTypeGuess {
UNINITIALIZED,
UNKNOWN,
CHAR_DATA,
UNINITIALIZED_CHAR_DATA,
WORD_DATA,
UNINITIALIZED_WORD_DATA,
CODE,
};
struct program {
ByteTypeGuess byte_type_guess... |
<commit_before>#include <iostream>
using namespace std;
class Message {
int myId;
public:
operator int() { return myId; }
Message(int id) : myId(id) {}
/*
equalTo - the Message Obect determines its equality with another message object. This may well be an == operator
*/
bool equalTo(int id) {
r... |
<commit_before>/*************************************************************************
*
* $RCSfile: flt_reghelper.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2004-08-02 15:25:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following ... |
<commit_before>/*************************************************************************
*
* $RCSfile: browserids.hxx,v $
*
* $Revision: 1.33 $
*
* last change: $Author: hr $ $Date: 2004-08-02 15:55:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following li... |
<commit_before>#include <cassert>
#include <ostream>
#include <exception>
#include "vm.hh"
#include "env.hh"
#include "printer.hh"
#include "zs_memory.hh"
VM vm;
VM::VM() : code(), stack(),
return_value(1, {}),
extent(),
symtable(),
frame(nullptr),
exception_han... |
<commit_before>#include "CppLINQ.h"
#include <iostream>
#include <string>
int main()
{
using namespace LL;
struct PetOwner
{
PetOwner() = default;
PetOwner(const std::string &name, const std::vector<std::string> &pets, const std::vector<int> &num)
:name_(name), pets_(pets), num_(num) {};
std::string name_;... |
<commit_before>/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gm.h"
#include "SkCanvas.h"
#include "SkPath.h"
#include "SkGradientShader.h"
#include "SkTypeface.h"
static SkShader* make_heatGradient(const SkPoin... |
<commit_before>#include "TolonSpellCheck.h"
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
void util_begin_test(char* szPreamble);
void util_end_test(bool bResult);
void util_is_expected(tsc_result r, bool& bSetFalseIfFailed);
void util_is_failure(char* szT... |
<commit_before>/*************************************************************************
*
* $RCSfile: fumeasur.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: obo $ $Date: 2004-01-20 11:05:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following lice... |
<commit_before>/******************************************************************************
* SOFA, Simulation Open-Framework Architecture, version 1.0 beta 3 *
* (c) 2006-2008 MGH, INRIA, USTL, UJF, CNRS *
* ... |
<commit_before>/*************************************************************************
*
* $RCSfile: drviewsg.cxx,v $
*
* $Revision: 1.5 $
*
* last change: $Author: ka $ $Date: 2002-08-09 09:14:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licen... |
<commit_before>/*
* ArcScript Scripts for Arcemu MMORPG Server
* Copyright (C) 2008 Arcemu Team
* Copyright (C) 2007 Moon++ <http://www.moonplusplus.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 Sof... |
<commit_before>#include <Render/ProgramResources/Factory/ProgramResourcesFactory.hh>
#include <Render/ProgramResources/Types/BlockResources.hh>
#include <Render/ProgramResources/Types/UniformBlock.hh>
#include <Render/Program.hh>
#include <array>
#define LAMBDA_PROTO [this](GLint id, std::string &&name)
# define DECL... |
<commit_before>#include <algorithm>
#include <fstream>
#include <ctime>
#include <set>
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <Windows.h>
#else
# include <sys/stat.h>
#endif
#include "CLogger.hpp"
#include "CSampConfigReader.hpp"
#include "crashhandler.hpp"
#include "amx/amx2.h"
#include <fmt/format.... |
<commit_before>////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
// distribute this file in accordance with the terms of the
// license agreement accompa... |
<commit_before>////////////////////////////////////////////////////////////
//
// DAGON - An Adventure Game Engine
// Copyright (c) 2012 Senscape s.r.l.
// All rights reserved.
//
// NOTICE: Senscape permits you to use, modify, and
// distribute this file in accordance with the terms of the
// license agreement accompa... |
<commit_before>#include "GameController.hpp"
#include "Game.hpp"
#include "../GameLogic/FourInALine/Game.hpp"
#include "../GameLogic/FourInALine/AAI.hpp"
#include "../Highscore/database.h"
#include "../../app/FourInALine.hpp"
#include <QDebug>
#include <QTimer>
namespace Game
{
/**
* Creates a new game controller.
... |
<commit_before>#include "Context.h"
#include "Timing.h"
using namespace esp;
static ESP_TLS_DECL ThreadContext* _thread_context = nullptr;
static ProfileContext* _context = nullptr;
void ThreadContext::Zone(const char *zoneName)
{
ProfileEvent *ev = profileIntervalStack.Push();
ev->eventType = EV_ZONE_INTERVAL;
ev... |
<commit_before>//=======================================================================
// Copyright Baptiste Wicht 2011.
// 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)
//======================================... |
<commit_before>//////////////////////////////////////////////////////////////////////////////
// NoLifeClient - Part of the NoLifeStory project //
// Copyright © 2013 Peter Atashian //
// ... |
<commit_before>/**
* @file Decoder.cpp
* @copyright (c) 2014 by Petr Zemek ([email protected]) and contributors
* @license BSD, see the @c LICENSE file for more details
* @brief Implementation of the Decoder class.
*/
#include "Decoder.h"
#include <cassert>
#include <regex>
#include <sstream>
#include "BIn... |
<commit_before>/* --
* Copyright (C) 2013, George Makrydakis <[email protected]>
*
* This file is part of odreex.
*
* odreex 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 L... |
<commit_before>#include "foo_musicbrainz.h"
static const GUID guid_cfg_short_date = { 0x18734618, 0x7920, 0x4d24, { 0x84, 0xa1, 0xb9, 0xd6, 0x6e, 0xd8, 0x25, 0xbc } };
cfg_bool cfg_short_date(guid_cfg_short_date, false);
static const GUID guid_cfg_no_feat = { 0x98f9ce46, 0xe0c5, 0x48f4, { 0xa6, 0x3e, 0x19, 0x34,... |
<commit_before>/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the ... |
<commit_before>/*
* (In)Visibible Entities List Adjuster
* Copyright (c) 2014 ThirteenAG <[email protected]>
* Licensed under the MIT License (http://opensource.org/licenses/MIT)
*/
#include "LimitAdjuster.h"
std::vector<char> aInVisibleEntityPtrs;
std::vector<char> aVisibleEntityPtrs;
class InVisibleEntityPtrsIII ... |
<commit_before>#define FASTLED_INTERNAL
#include "FastLED.h"
#if defined(__SAM3X8E__)
volatile uint32_t fuckit;
#endif
FASTLED_NAMESPACE_BEGIN
void *pSmartMatrix = NULL;
CFastLED FastLED;
CLEDController *CLEDController::m_pHead = NULL;
CLEDController *CLEDController::m_pTail = NULL;
static uint32_t lastshow = 0;
... |
<commit_before>#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>
#include <string>
using namespace std;
int main()
{
while(cin)
{
string path;
getline(cin, path);
cv::Mat input = cv::imread(path+".jpg");
cv::Mat hsv_filtered15;//画像の初期化
cv::Mat hsv_filtere... |
<commit_before><?hh //strict
namespace hhpack\migrate;
use hhpack\publisher\Message;
final class MigrationLoadedEvent implements Message
{
public function __construct(
private ImmVector<Migration> $migrations
)
{
}
public function queries(): ImmVector<string>
{
return $this-... |
<commit_before>/*
Copyright 2012 <copyright holder> <email>
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 b... |
<commit_before>#ifndef __RMOL_RMOL_TYPES_HPP
#define __RMOL_RMOL_TYPES_HPP
// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
// STL
#include <vector>
#include <list>
// Boost
#include <boost/shared_ptr.h... |
<commit_before>#include <stdio.h>
#include <stdint.h>
#include <time.h>
#include <v8.h>
#include <node.h>
#include "nan.h"
using namespace node;
using namespace v8;
class Time {
public:
static void Init(Handle<Object> target) {
NanScope();
// time(3)
NODE_SET_METHOD(target, "time", Time_);
//... |
<commit_before>/*
** Copyright (C) - Triton
**
** This program is under the terms of the LGPLv3 License.
*/
#include <SymbolicEngine.h>
#include <Registers.h>
SymbolicEngine::SymbolicEngine() {
/* Init all symbolic registers/flags to UNSET (init state) */
for (uint64 i = 0; i < ID_LAST_ITEM; i++)
this->... |
<commit_before>// Copyright (c) 2009-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.
//
// File contains modifications by: The Gulden developers
// All ... |
<commit_before>/**
Copyright (c) 2016, Philip Deegan.
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 conditions... |
<commit_before>#include <uri.hpp>
#include <iostream>
using namespace uri;
///////////////////////////////////////////////////////////////////////////////
const URI::Span_t URI::zero_span_;
URI::URI(const std::string&& data) :
uri_str_ {std::forward<const std::string>(data)}
{
init_spans();
}
URI::URI(const cha... |
<commit_before>/*
* This program is just for personal experiments here on AVR features and C++ stuff
* This one is a proof of concept on I2C asynchronous handling specificaloly for
* ATtiny architecture.
* As a matter of fact, ATtiny USI feature is not very well suited for asynchronous
* I2C handling as I2C maste... |
<commit_before>// Message.cpp
// Implements the Message class.
#include "Message.h"
#include "CycException.h"
#include "Communicator.h"
#include "FacilityModel.h"
#include "MarketModel.h"
#include "InstModel.h"
#include "GenericResource.h"
#include "Logger.h"
#include "BookKeeper.h"
#include <iostream>
// initializ... |
<commit_before>//===- GdbIndex.cpp -------------------------------------------------------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------... |
<commit_before>#include "Input.h"
#include <SDL/SDL.h>
#include <SDL/SDL_OpenGL.h>
#include <queue>
namespace Input
{
namespace Internal
{
std::string MapKey ( SDLKey k )
{
switch (k)
{
#define KEYCASE(sym, string) case SDLK_ ## sym: return string
#define DIRECTCASE(sym) KEYCASE(sym, #sym)
DIRECTCASE(a);
DIR... |
<commit_before>#include <future>
#include <iostream>
#include <cassert>
#include <csignal>
#include <unistd.h>
#include <capnp/message.h>
#include <capnp/serialize-packed.h>
#include "json11.hpp"
#include "cereal/gen/cpp/log.capnp.h"
#include "common/swaglog.h"
#include "common/messaging.h"
#include "common/params.... |
<commit_before>// Test for direct coverage writing with dlopen.
// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %T/libcoverage_direct_test_1.so -fPIC
// RUN: %clangxx_asan -fsanitize-coverage=1 -DSO_DIR=\"%T\" %s %libdl -o %t
// RUN: rm -rf %T/coverage-direct
// RUN: mkdir -p %T/coverage-direct/nor... |
<commit_before>/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2014 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
... |
<commit_before>#include "FPSRoleLocal.h"
#include "Creature.h"
#include "Engine.h"
#include "Input.h"
#include "App.h"
#include "ObjectMeshSkinned.h"
#include "ActorBase.h"
#include "Visualizer.h"
#include "game.h"
#include "RayControl.h"
#include "Common.h"
#include "ControlsApp.h"
CFPSRoleLocal::CFPSRoleLocal(void)
... |
<commit_before>/*-
* Copyright (c) 2016 Frederic Culot <[email protected]>
* 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 copyri... |
<commit_before>/**********************************************************************/
/* Copyright 2014 RCF */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may no... |
<commit_before>/* FILE INFORMATION
File: iq.cpp
Authors: Matthew Cole <[email protected]>
Brian Gracin <[email protected]>
Description: Contains the IQ class, which simulates the operation of a Instruction Queue.
*/
#include <iostream>
#include "iq.h"
IQ::IQ(){
this->initialize();
}
IQ::~IQ... |
<commit_before>/**
* Copyright © 2019 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
<commit_before>/* Copyright 2014 Peter Goodman, all rights reserved. */
#define GRANARY_INTERNAL
#include "granary/base/base.h"
#include "granary/driver/xed2-intel64/xed.h"
#include "granary/register/register.h"
#include "granary/breakpoint.h"
namespace granary {
// See `http://sandpile.org/x86/gpr.htm` for more de... |
<commit_before>// fluxbox-remote.cc
// Copyright (c) 2007 Fluxbox Team (fluxgen at fluxbox dot org)
//
// 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 withou... |
<commit_before>#pragma warning(disable:4996)
#include "stdafx.h"
#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlmisc.h>
#include <atlsplit.h>
#include <atlctrlx.h>
#include "MainFrame.h"
#include "SplashWnd.h"
CAppModule _Module;
int Run(LPTSTR lpstrCmdLine=NULL,int nCmdS... |
<commit_before>/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one ... |
<commit_before>/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: shutdowniconw32.cxx,v $
* $Revision: 1.48... |
<commit_before>/******************************************************************************
* Copyright 2017 The Apollo 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 ... |
<commit_before>#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// L EEEEEE EEEE OOOO
// L E E O O
// L EEEE E EEE O O
// L E E E O O LEGO Power Function... |
<commit_before>#include "ircmanager.h"
#include "QJsonArray"
#include "QJsonDocument"
#include "QJsonObject"
#include "QNetworkReply"
#include "asyncexec.h"
#include "channel.h"
#include "future"
#include "irccommand.h"
#include "ircconnection.h"
#include "qnetworkrequest.h"
Account *IrcManager::account = const_cast<A... |
<commit_before>/*
* Copyright 2010 Martin Hebnes Pedersen, martinhpedersen @ "google mail"
* All rights reserved. Distributed under the terms of the MIT License.
*/
#include "HTGTweetItem.h"
HTGTweetItem::HTGTweetItem(HTTweet *theTweet) : BListItem() {
this->theTweet = theTweet;
textView = NULL;
}
int HTGTwee... |
<commit_before>#include <stdio.h>
#include <stdlib.h>
#include "App.h"
#include <Directory.h>
#include <NodeMonitor.h>
#include <Entry.h>
#include <Path.h>
#include <String.h>
#include <File.h>
/*
* Runs a command in the terminal, given the string you'd type
*/
BString*
run_script(const char *cmd)
{
char buf[BUFSIZ... |
<commit_before>// Copyright [2015] Takashi Ogura<[email protected]>
#include "cv_camera/capture.h"
#include <sstream>
#include <string>
namespace cv_camera
{
namespace enc = sensor_msgs::image_encodings;
Capture::Capture(ros::NodeHandle &node, const std::string &topic_name,
int32_t buffer_size, con... |
<commit_before>#include "types.h"
#include "kernel.hh"
#include "amd64.h"
#include "spinlock.h"
#include "condvar.h"
#include "proc.hh"
#include "cpu.hh"
#include "sched.hh"
#include "percpu.hh"
// XXX(sbw) these should be padded out
struct idle : public pad {
struct proc *cur;
struct proc *heir;
SLIST_HEAD(zomb... |
<commit_before>#include "types.h"
#include "mmu.h"
#include "kernel.hh"
#include "spinlock.h"
#include "condvar.h"
#include "queue.h"
#include "proc.hh"
#include "fs.h"
#include "file.hh"
#include "cpu.hh"
#define PIPESIZE 512
struct pipe {
struct spinlock lock;
struct condvar cv;
int flag; // Ordered?
... |
<commit_before>#include "types.h"
#include "mmu.h"
#include "kernel.hh"
#include "spinlock.h"
#include "condvar.h"
#include "queue.h"
#include "proc.hh"
#include "fs.h"
#include "file.hh"
#include "cpu.hh"
#include "ilist.hh"
#include "uk/unistd.h"
#include "rnd.hh"
#define PIPESIZE 512
struct pipe {
virtual ~pipe(... |
<commit_before>// Copyright 2019 Global Phasing Ltd.
//
// convert SF-mmCIF to MTZ
#include <algorithm>
#include <cstdlib> // for exit
#include <stdio.h>
#ifndef GEMMI_ALL_IN_ONE
# define GEMMI_WRITE_IMPLEMENTATION 1
#endif
#include <gemmi/atox.hpp> // for read_word
#include <gemmi/fileutil.hpp> // for ... |
<commit_before>#include "circles.h"
using namespace cv;
circleFinder::circleFinder(int in_var)
{
my_pri_val = in_var;
my_pub_val = in_var;
}
int circleFinder::getVal()
{
return my_pri_val;
}
<commit_msg>notes<commit_after>#include "circles.h"
using namespace cv;
/*
The class circleFinder is the visual front ... |
<commit_before>// Time: O(2 * (1 + (9/49) + (9/49)^2 + ...)) = O(2/(1-(9/49)) = O(2.45)
// Space: O(1)
// The rand7() API is already defined for you.
// int rand7();
// @return a random integer in the range 1 to 7
class Solution {
public:
int rand10() {
while (true) {
int x = (rand7() - 1) * ... |
<commit_before>//
// Copyright (c) 2009, Markus Rickert
// 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... |
<commit_before>#ifndef MP_INTRUSIVEPTR_HPP
#define MP_INTRUSIVEPTR_HPP
#include <boost/atomic.hpp>
// boost::intrusive_ptr but safe/atomic
template<typename T>
struct IntrusivePtr {
boost::atomic<T*> ptr;
IntrusivePtr(T* _p = NULL) : ptr(NULL) {
if(_p) {
intrusive_ptr_add_ref(_p);
ptr = _p;
}
}
Intru... |
<commit_before>// @(#)root/rootx:$Name: $:$Id: rootx.cxx,v 1.18 2005/09/04 09:13:27 brun Exp $
// Author: Fons Rademakers 19/02/98
//////////////////////////////////////////////////////////////////////////
// //
// Rootx ... |
<commit_before>
#ifndef __CLIENT_HPP__
#define __CLIENT_HPP__
#include <pthread.h>
#include "protocol.hpp"
#include "sqlite_protocol.hpp"
#include <stdint.h>
#include "assert.h"
#define update_salt 6830
using namespace std;
/* Information shared between clients */
struct shared_t {
public:
shared_t(config_t *_c... |
<commit_before>/**
* @file
*/
#pragma once
#include "bi/io/indentable_ostream.hpp"
namespace bi {
/**
* C++ code generator.
*
* @ingroup compiler_io
*/
class CppBaseGenerator: public indentable_ostream {
public:
CppBaseGenerator(std::ostream& base, const int level = 0,
const bool header = false);
usi... |
<commit_before>#include "L6470Stepper.h"
L6470Stepper::L6470Stepper(int pinCS, int nDaisyChain, int* motorSteps)
: SPIDaisyChain(pinCS, nDaisyChain)
{
_spiData = new L6470SpiData(nDaisyChain);
_motor = new L6470MotorData[nDaisyChain];
_readData = new uint32_t[nDaisyChain];
for (size_t i = 0; i < nDaisyChain; i++... |
<commit_before>#include <ros/ros.h>
//ROS libraries
#include <tf/transform_datatypes.h>
//ROS messages
#include <std_msgs/Float32.h>
#include <std_msgs/String.h>
#include <geometry_msgs/Quaternion.h>
#include <geometry_msgs/QuaternionStamped.h>
#include <geometry_msgs/Twist.h>
#include <nav_msgs/Odometry.h>
#include ... |
<commit_before>class Solution {
public:
vector<int> intersect(vector<int>& nums1, vector<int>& nums2) {
std::unordered_map<int, int> m1, m2;
for (const auto &num : nums1) {
auto iter = m1.find(num);
if (iter == m1.end()) {
m1.emplace(num, 1);
} els... |
<commit_before>/*
Copyright (c) 2019 Anon authors, see AUTHORS file.
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... |
<commit_before>/**
* @license
* Copyright 2018 Google Inc. 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
*
* Unles... |
<commit_before>
#include <node.h>
#include <node_buffer.h>
#include "database.h"
namespace bangdown {
static v8::Persistent<v8::FunctionTemplate> database_constructor;
Database::Database (char* name) : name(name) {
db = NULL;
};
Database::~Database () {
if (db != NULL)
db->closedatabase();
delete db;
... |
<commit_before>// Copyright 2012 Google Inc. 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 require... |
<commit_before>/**
* Copyright (c) Jason White
*
* MIT License
*/
#include <dirent.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <algorithm>
#include <utility>
#include "dircache.h"
#include "glob.h"
#include "path.h"
#include "deps.h"
using path::Path;
bool operator<(const DirEntry& a, const DirEntry& ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.