commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
911b52bb445358bbc5b574e0d919dba9acd38408 | SettingsUI/SettingsSheet.cpp | SettingsUI/SettingsSheet.cpp | #include "stdafx.h"
#include "SettingsUI.h"
#include "SettingsSheet.h"
IMPLEMENT_DYNAMIC(SettingsSheet, CPropertySheet)
SettingsSheet::SettingsSheet(
UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) :
CPropertySheet(nIDCaption, pParentWnd, iSelectPage) {
}
SettingsSheet::SettingsSheet(LPCTSTR pszCaption, CW... | #include "stdafx.h"
#include "SettingsUI.h"
#include "SettingsSheet.h"
IMPLEMENT_DYNAMIC(SettingsSheet, CPropertySheet)
SettingsSheet::SettingsSheet(
UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) :
CPropertySheet(nIDCaption, pParentWnd, iSelectPage) {
}
SettingsSheet::SettingsSheet(LPCTSTR pszCaption, CW... | Raise window to foreground if another instance was launched | Raise window to foreground if another instance was launched
| C++ | bsd-2-clause | Soulflare3/3RVX,malensek/3RVX,malensek/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX |
fc56a13a6bc11aada6637148061e1967c5a7fc06 | src/Server.cpp | src/Server.cpp | #include "Server.h"
#include "WebPage.h"
#include "Connection.h"
#include <QTcpServer>
Server::Server(QObject *parent, bool ignoreSslErrors) : QObject(parent) {
m_tcp_server = new QTcpServer(this);
m_page = new WebPage(this);
m_page->setIgnoreSslErrors(ignoreSslErrors);
}
bool Server::start() {
connect(m_tcp... | #include "Server.h"
#include "WebPage.h"
#include "Connection.h"
#include <QTcpServer>
Server::Server(QObject *parent, bool ignoreSslErrors) : QObject(parent) {
m_tcp_server = new QTcpServer(this);
m_page = new WebPage(this);
m_page->setIgnoreSslErrors(ignoreSslErrors);
}
bool Server::start() {
connect(m_tcp... | Make the server bind to localhost. We don't really want to expose it to the world, and it pops up firewall warnings if you have an app aware firewall enabled (e.g. OSX firewall). | Make the server bind to localhost. We don't really want to expose it to the world, and it pops up firewall warnings if you have an app aware firewall enabled (e.g. OSX firewall).
| C++ | mit | thoughtbot/capybara-webkit,mhoran/capybara-webkit,tasboa/capybara-webkit,msbit/capybara-webkit,jorihardman/capybara-webkit,cognetoapps/capybara-webkit,tasboa/capybara-webkit,shopkeep/capybara-webkit,nritholtz/capybara-webkit,shopkeep/capybara-webkit,betelgeuse/capybara-webkit,marcisme/capybara-webkit,mhoran/capybara-we... |
c787c6300e694789f9c2e4164d79538690e2c078 | src/body_angle_visualizer_node.cpp | src/body_angle_visualizer_node.cpp | #include <cmath>
#include <ros/ros.h>
#include <geometry_msgs/TransformStamped.h>
#include <rviz_visual_tools/rviz_visual_tools.h>
#include <tf2_eigen/tf2_eigen.h>
#include <tf2_ros/transform_listener.h>
#include <Eigen/Geometry>
int main(int argc, char** argv)
{
ros::init(argc, argv, "body_angle_visualizer");
r... | #include <cmath>
#include <ros/ros.h>
#include <rviz_visual_tools/rviz_visual_tools.h>
#include <tf2_eigen/tf2_eigen.h>
#include <tf2_ros/transform_listener.h>
#include <Eigen/Geometry>
int main(int argc, char** argv)
{
ros::init(argc, argv, "body_angle_visualizer");
ros::NodeHandle n {};
ros::Rate r {5};
tf... | Update view for angle arrow | Update view for angle arrow
| C++ | bsd-3-clause | forno/body_angle_visualizer |
02bc78cce19c5839a70456410c98f91b8690cdce | GraphicsToolkit/src/ImageData.cpp | GraphicsToolkit/src/ImageData.cpp | #include "ImageData.h"
#include <OpenGL/gl3.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
#define STB_IMAGE_IMPLEMENTATION
#define STBI_ONLY_PNG
#include "stb/stb_i... | #include "ImageData.h"
#include <OpenGL/gl3.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
#define STB_IMAGE_IMPLEMENTATION
#define STBI_ONLY_PNG
#include "stb/stb_i... | Change image data components detection | Change image data components detection
| C++ | mit | aleksigron/graphics-toolkit,aleksigron/kokko,aleksigron/graphics-toolkit,aleksigron/kokko |
8907c84dba275c70d44896e868d4e2db6ed76d20 | src/runtime/windows_get_symbol.cpp | src/runtime/windows_get_symbol.cpp | #include "runtime_internal.h"
#ifdef BITS_64
#define WIN32API
#else
#define WIN32API __stdcall
#endif
extern "C" {
WIN32API void *LoadLibrary(const char *);
WIN32API void *GetProcAddress(void *, const char *);
WEAK void *halide_get_symbol(const char *name) {
return GetProcAddress(NULL, name);
}
WEAK void *hali... | #include "runtime_internal.h"
#ifdef BITS_64
#define WIN32API
#else
#define WIN32API __stdcall
#endif
extern "C" {
WIN32API void *LoadLibraryA(const char *);
WIN32API void *GetProcAddress(void *, const char *);
WEAK void *halide_get_symbol(const char *name) {
return GetProcAddress(NULL, name);
}
WEAK void *hal... | Fix missing LoadLibrary symbol on windows. | Fix missing LoadLibrary symbol on windows.
Former-commit-id: 43619e309e8a912aaf57011937121c77d2b5c16a | C++ | mit | darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide |
797dd54718d7cd7e76736dfeb434f3ff4dc748e8 | Base/voView.cpp | Base/voView.cpp |
// Qt includes
#include <QLabel>
#include <QVBoxLayout>
// Visomics includes
#include "voView.h"
// VTK includes
#include <vtkDataObject.h>
//----------------------------------------------------------------------------
class voViewPrivate
{
public:
};
// ------------------------------------------------------------... |
// Qt includes
#include <QLabel>
#include <QVBoxLayout>
// Visomics includes
#include "voView.h"
// VTK includes
#include <vtkDataObject.h>
//----------------------------------------------------------------------------
class voViewPrivate
{
public:
};
// ------------------------------------------------------------... | Set size policy associated with view description label | Set size policy associated with view description label
* Doing so will ensure the label doesn't expand.
| C++ | apache-2.0 | arborworkflows/Visomics,Visomics/Visomics,arborworkflows/Visomics,Visomics/Visomics,arborworkflows/Visomics,arborworkflows/Visomics,Visomics/Visomics,arborworkflows/Visomics,Visomics/Visomics,Visomics/Visomics,arborworkflows/Visomics,Visomics/Visomics |
7790ec4a17e8236bfe8f3cf3bf43bec377bcc5bb | test/build/android/jni/codec_unittest.cpp | test/build/android/jni/codec_unittest.cpp | #include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <jni.h>
#include <android/log.h>
#define LOG_TAG "codec_unittest"
#define LOGI(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
int CodecUtMain(int argc, char** argv);
extern "C"
JNIEXPORT void JNICALL Java_com_cisco_codec_unittest_M... | #include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <jni.h>
#include <android/log.h>
#define LOG_TAG "codec_unittest"
#define LOGI(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
int CodecUtMain(int argc, char** argv);
extern "C"
JNIEXPORT void JNICALL Java_com_cisco_codec_unittest_M... | Use a correct format string in the unittest JNI wrapper | Use a correct format string in the unittest JNI wrapper
| C++ | bsd-2-clause | fstd/openh264,mazalet/losslessh264,hanchl/losslessh264,eastlhu/losslessh264,mcanthony/openh264,yskeem/openh264,alihalabyah/losslessh264,joncampbell123/losslessh264,zhimeihetx/openh264,xiangshuai/losslessh264,alihalabyah/losslessh264,lucas-ez/openh264,mcanthony/openh264,rammybt/openh264,hioop/losslessh264,hioop/lossless... |
f6f8973e1e219a50d042f28e8f02deccf4428e57 | src/rpg_event.cpp | src/rpg_event.cpp | /////////////////////////////////////////////////////////////////////////////
// This file is part of EasyRPG.
//
// EasyRPG 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, o... | /////////////////////////////////////////////////////////////////////////////
// This file is part of EasyRPG.
//
// EasyRPG 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, o... | Reset hero graphic on map change (if it was changed by a move event). Fix RPG::Event default value for y. Minor cleanups. | Reset hero graphic on map change (if it was changed by a move event).
Fix RPG::Event default value for y.
Minor cleanups.
| C++ | mit | Zegeri/liblcf,fdelapena/easyrpg-liblcf,carstene1ns/easyrpg-liblcf,glynnc/liblcf,Ghabry/easyrpg-liblcf,Ghabry/easyrpg-liblcf,glynnc/liblcf,EasyRPG/liblcf,carstene1ns/easyrpg-liblcf,fdelapena/easyrpg-liblcf,EasyRPG/liblcf,EasyRPG/liblcf,Zegeri/liblcf,Zegeri/liblcf,EasyRPG/liblcf,glynnc/liblcf,carstene1ns/easyrpg-liblcf,G... |
d20624de2066946674504ff44e7366e14c916fa9 | common/misc/clock_converter.cc | common/misc/clock_converter.cc | #include <cmath>
#include "clock_converter.h"
#include "log.h"
UInt64 convertCycleCount(UInt64 cycle_count, volatile float from_frequency, volatile float to_frequency)
{
UInt64 converted_cycle_count = (UInt64) ceil(((float) cycle_count) * (to_frequency / from_frequency));
LOG_PRINT("convertCycleCount(%llu): fr... | #include <cmath>
#include "clock_converter.h"
#include "log.h"
UInt64 convertCycleCount(UInt64 cycle_count, volatile float from_frequency, volatile float to_frequency)
{
UInt64 converted_cycle_count = (UInt64) ceil(((double) cycle_count) * (to_frequency / from_frequency));
LOG_PRINT("convertCycleCount(%llu): f... | Revert "[dynamic frequency scaling] Fixed the bug on the convertCycleCount function." | Revert "[dynamic frequency scaling] Fixed the bug on the convertCycleCount function."
This reverts commit 46a484a5e4288f7da92e6f789687d2d141fbcf15.
| C++ | mit | nkawahara/Graphite,mit-carbon/Graphite,8l/Graphite,fhijaz/Graphite,nkawahara/Graphite,victorisildur/Graphite,mit-carbon/Graphite,nkawahara/Graphite,8l/Graphite,8l/Graphite,nkawahara/Graphite,fhijaz/Graphite,mit-carbon/Graphite,victorisildur/Graphite,victorisildur/Graphite,8l/Graphite,mit-carbon/Graphite,victorisildur/G... |
cced9d445e6aeef6a09871bb63d88cab1ba0ee20 | src/test/miner_tests.cpp | src/test/miner_tests.cpp | #include <boost/test/unit_test.hpp>
#include "../uint256.h"
extern void SHA256Transform(void* pstate, void* pinput, const void* pinit);
BOOST_AUTO_TEST_SUITE(miner_tests)
BOOST_AUTO_TEST_CASE(sha256transform_equality)
{
unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e52... | #include <boost/test/unit_test.hpp>
#include "../uint256.h"
extern void SHA256Transform(void* pstate, void* pinput, const void* pinit);
BOOST_AUTO_TEST_SUITE(miner_tests)
BOOST_AUTO_TEST_CASE(sha256transform_equality)
{
unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e52... | Fix miner_test unit test bug | Fix miner_test unit test bug
| C++ | mit | Earlz/dobbscoin-source,Infernoman/crowncoin,domob1812/crowncoin,Earlz/dobbscoin-source,domob1812/crowncoin,Earlz/dobbscoin-source,Infernoman/crowncoin,Infernoman/crowncoin,wiggi/fairbrix-0.6.3,domob1812/crowncoin,syscoin/syscoin,dobbscoin/dobbscoin-source,dobbscoin/dobbscoin-source,Crowndev/crowncoin,syscoin/syscoin,sy... |
2cc8f702cab2b3ab78467ff05223d2920f8ece23 | unittests/Support/TimerTest.cpp | unittests/Support/TimerTest.cpp | //===- unittests/TimerTest.cpp - Timer tests ------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- unittests/TimerTest.cpp - Timer tests ------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Use Support/Thread.h instead of <thread> to fix the Windows build | [unittest] Use Support/Thread.h instead of <thread> to fix the Windows build
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@256290 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers... |
de19ea0a71cb6082fe9311694a27e8f0cc2f972a | tests/test_recursive.cpp | tests/test_recursive.cpp | #include <iostream>
#include <stdexcept>
#include <type_traits>
#include "fsm.h"
class state_machine: public fsmlite::fsm<state_machine> {
friend class fsm; // base class needs access to transition_table
public:
enum states { Init, Exit };
private:
void process(const int& event) {
std::cout << "... | #include <iostream>
#include <stdexcept>
#include <type_traits>
#include "fsm.h"
class state_machine: public fsmlite::fsm<state_machine> {
friend class fsm; // base class needs access to transition_table
public:
enum states { Init, Exit };
private:
void process(const int& event) {
std::cout << "... | Exclude skipped lines from coverage. | Exclude skipped lines from coverage.
| C++ | mit | tkem/fsmlite,tkem/fsmlite |
bc88a3b811a002345003c44036d3101bb232c2d6 | test/visual_tests.cc | test/visual_tests.cc | #include "catch.hpp"
#include "visual.hh"
#include "configuration.hh"
using namespace vick;
TEST_CASE("to_visual")
{
std::string first("assert"), second("\tblah");
for (int i = 0; i < first.size(); i++)
REQUIRE(i == to_visual(first, i));
for (int i = 0; i < second.size(); i++)
REQUIRE(TAB... | #include "catch.hpp"
#include "visual.hh"
#include "configuration.hh"
using namespace vick;
TEST_CASE("to_visual")
{
std::string first("assert"), second("\tblah");
for (size_t i = 0; i < first.size(); i++)
REQUIRE(i == to_visual(first, i));
for (size_t i = 0; i < second.size(); i++)
REQUI... | Use `size_t` when needed instead of just `int` | Use `size_t` when needed instead of just `int`
| C++ | mpl-2.0 | czipperz/vick,czipperz/vick |
250a86dc4041f75488d78653d9566b348e1b70c9 | src/searchclient/dlgfilters.cpp | src/searchclient/dlgfilters.cpp | #include "dlgfilters.h"
#include "filterwidget.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
DlgFilters::DlgFilters(const QList<QPair<bool,QString> >& filters,
QWidget *parent)
: QDialog(parent, Qt::Dialog) {
setWindowTitle(tr("strigiclient - Edit filters"));
fi... | #include "dlgfilters.h"
#include "filterwidget.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
#include <QLabel>
DlgFilters::DlgFilters(const QList<QPair<bool,QString> >& filters,
QWidget *parent)
: QDialog(parent, Qt::Dialog) {
setWindowTitle(tr("strigiclient - Edit ... | Add small explanation to the filter dialog. | Add small explanation to the filter dialog.
svn path=/trunk/playground/base/strigi/; revision=609264
| C++ | lgpl-2.1 | KDE/strigi |
57aa5076f7e12bd594bbecb9061b28325502a52e | src/test/main_tests.cpp | src/test/main_tests.cpp | #include "core.h"
#include "main.h"
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(main_tests)
BOOST_AUTO_TEST_CASE(subsidy_limit_test)
{
uint64_t nSum = 0;
for (int nHeight = 0; nHeight < 7000000; nHeight += 1000) {
uint64_t nSubsidy = GetBlockValue(nHeight, 0);
BOOST_CHECK(nSubsi... | #include "core.h"
#include "main.h"
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(main_tests)
BOOST_AUTO_TEST_CASE(subsidy_limit_test)
{
uint64_t nSum = 0;
for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
uint64_t nSubsidy = GetBlockValue(nHeight, 0);
BOOST_CHECK(nSubs... | Edit subsidy_limit_test to account for BIP42 | Edit subsidy_limit_test to account for BIP42
Because no one wants 4 gold mines being discovered every mibillenium. | C++ | mit | syscoin/syscoin,Infernoman/crowncoin,Infernoman/crowncoin,syscoin/syscoin,Infernoman/crowncoin,Crowndev/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,Crowndev/crowncoin,syscoin/syscoin,Crowndev/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,syscoin/syscoin,Infernoman/crowncoin,syscoin/syscoin,syscoin/syscoin,C... |
f87faa002c5e09c92ae2dbe468a10a907d0ac98e | OrionUO/DateTimeStamp.cpp | OrionUO/DateTimeStamp.cpp | // This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/***********************************************************************************
**
** DateTimeStamp.cpp
**
** Copyright (C) September 2017 Hotride
**
*****... | // This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/***********************************************************************************
**
** DateTimeStamp.cpp
**
** Copyright (C) September 2017 Hotride
**
*****... | Fix compilation error with C++11 compliant compiler (user-defined literals) | Fix compilation error with C++11 compliant compiler (user-defined literals)
| C++ | mit | Hotride/OrionUO,Hotride/OrionUO,Hotride/OrionUO |
6f2b1d21ee895ec1d9060a24ae8731a7ee9f94b5 | GPTP/src/hooks/tech_target_check_inject.cpp | GPTP/src/hooks/tech_target_check_inject.cpp | //Injector source file for the Tech Target Check hook module.
#include "tech_target_check.h"
#include <hook_tools.h>
namespace {
const u32 Func_GetTechUseErrorMessage = 0x00491E80;
void __declspec(naked) getTechUseErrorMessageWrapper() {
static CUnit *target;
static u8 castingPlayer;
static u16 tech... | //Injector source file for the Tech Target Check hook module.
#include "tech_target_check.h"
#include <hook_tools.h>
namespace {
const u32 Func_GetTechUseErrorMessage = 0x00491E80;
void __declspec(naked) getTechUseErrorMessageWrapper() {
static CUnit *target;
static u8 castingPlayer;
static u16 tech... | Fix bug in Tech Target Check hook module. | Fix bug in Tech Target Check hook module. | C++ | isc | xboi209/general-plugin-template-project,SCMapsAndMods/general-plugin-template-project,xboi209/general-plugin-template-project,SCMapsAndMods/general-plugin-template-project |
d1bcf59c9df22076d3e910fb7640707a5806ff48 | test/C++Frontend/2003-11-04-ArrayConstructors.cpp | test/C++Frontend/2003-11-04-ArrayConstructors.cpp |
struct Foo {
Foo(int);
};
void foo() {
struct {
Foo name;
} Int[] = { 1 };
}
|
struct Foo {
Foo(int);
~Foo();
};
void foo() {
struct {
Foo name;
} Int[] = { 1 };
}
| Add a dtor to ensure that they are called the right number of times. | Add a dtor to ensure that they are called the right number of times.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@9721 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,ch... |
86e59fd223487f697d1e193838118ab4154ef3da | settings.cpp | settings.cpp | #include "settings.h"
int N_POLY_POINTS = 4;
int N_COLOR_VAR = 5;
int N_POS_VAR = 5;
int SHAPE_OPT_FREQ = 25;
int GUI_REFRESH_RATE = 1;
int AUTOFOCUS_RES = 2;
int FOCUS_LEFT=0, FOCUS_RIGHT=100, FOCUS_TOP=0, FOCUS_BOTTOM=100;
| #include "settings.h"
int N_POLY_POINTS = 4;
int N_COLOR_VAR = 5;
int N_POS_VAR = 5;
int SHAPE_OPT_FREQ = 0;
int GUI_REFRESH_RATE = 1;
int AUTOFOCUS_RES = 2;
int FOCUS_LEFT=0, FOCUS_RIGHT=100, FOCUS_TOP=0, FOCUS_BOTTOM=100;
| Disable random shape optimizations by default | Disable random shape optimizations by default
Since it's not very effective. It only works well when adding a new
poly.
| C++ | mit | tux3/Evolve,tux3/Evolve |
42cb1ee016050c161f6d8e9d166170dd377d20ce | src/gamelib/components/update/CameraTracker.cpp | src/gamelib/components/update/CameraTracker.cpp | #include "gamelib/components/update/CameraTracker.hpp"
#include "gamelib/core/rendering/CameraSystem.hpp"
#include "gamelib/core/ecs/Entity.hpp"
namespace gamelib
{
CameraTracker::CameraTracker() :
UpdateComponent(1, UpdateHookType::PostPostFrame),
camera(0),
shakerad(5),
_shake(fal... | #include "gamelib/components/update/CameraTracker.hpp"
#include "gamelib/core/rendering/CameraSystem.hpp"
#include "gamelib/core/ecs/Entity.hpp"
namespace gamelib
{
CameraTracker::CameraTracker() :
UpdateComponent(1, UpdateHookType::PostPostFrame),
camera(0),
shakerad(5),
_shake(fal... | Use entity position rather than bbox center | Use entity position rather than bbox center
Prevents camera jumping when the player size changes.
| C++ | mit | mall0c/TileEngine,mall0c/GameLib |
aeafe6f957899d0afa2bba12972873b50599d9ef | examples/echo_robot_state.cpp | examples/echo_robot_state.cpp | #include <franka/robot.h>
#include <iostream>
int main(int argc, char** argv) {
if (argc != 2) {
std::cerr << "Usage: ./echo_robot_state <robot-hostname>" << std::endl;
return -1;
}
try {
franka::Robot robot(argv[1]);
size_t count = 0;
robot.read([&count](const franka::RobotState& robot_sta... | #include <franka/robot.h>
#include <iostream>
int main(int argc, char** argv) {
if (argc != 2) {
std::cerr << "Usage: ./echo_robot_state <robot-hostname>" << std::endl;
return -1;
}
try {
franka::Robot robot(argv[1]);
size_t count = 0;
robot.read([&count](const franka::RobotState& robot_sta... | Add comment regarding use of std::cout. | examples: Add comment regarding use of std::cout.
| C++ | apache-2.0 | frankaemika/libfranka,frankaemika/libfranka,frankaemika/libfranka |
1006444eeda44747095c0bc561aefda68c3cfacd | src/Math.cpp | src/Math.cpp | // Standard headers
#include <cmath>
#include <iostream>
// Libraries
#include "Math.hpp"
const double PI = 3.141592653589793238462643;
unsigned long int factorial (unsigned long int n) {
return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n;
}
double fixRadians_impl(double radians) {
if (radians > 2*PI)
ret... | // Standard headers
#include <cmath>
#include <iostream>
// Libraries
#include "Math.hpp"
const double PI = 3.141592653589793238462643;
// Alias
using mpz = unsigned long int;
using mpf = double;
mpz factorial (mpz n) {
return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n;
}
mpf fixRadians_impl(mpf radians) {
... | Create alias for integer and floating point type | Create alias for integer and floating point type
| C++ | apache-2.0 | renatocf/MAC0438-EP2,renatocf/MAC0438-EP2 |
4814747692401624fbbbe43bed6f799f183fa26a | src/parser/main.cpp | src/parser/main.cpp | #include "GlobalContext.hpp"
#include "ast/SourceFile.hpp"
#include "parser/SpiritParser.hpp"
int main(int argc, char* args[])
{
const std::vector<std::string> argv(args+1, args+argc);
using namespace eddic;
using namespace eddic::parser;
for (int i=0; i<5; i++)
for (auto& fname : argv)
... | #include "GlobalContext.hpp"
#include "ast/SourceFile.hpp"
#include "parser/SpiritParser.hpp"
int main(int argc, char* args[])
{
const std::vector<std::string> argv(args+1, args+argc);
using namespace eddic;
using namespace eddic::parser;
for (int i=0; i<100; i++)
for (auto& fname : argv)
... | Update the number of iterations | Update the number of iterations
| C++ | mit | vogelsgesang/eddic,wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic |
8149ec50d06af29008f7a002ae5ae45bda46e9e7 | src/jage.cpp | src/jage.cpp | /*
* Justin's Awesome Game Engine
* or *
* Just Another Game Engine
*
* Copyright 2016 Justin White
*
* See included LICENSE file for distribution and reuse.
*/
#include <cstdio>
#include <Engine.hpp>
int main(const int argc, const char** argv) {
std::cout << "Start" << std::endl;;
Engine theGame(argc... | /*
* Justin's Awesome Game Engine
* or *
* Just Another Game Engine
*
* Copyright 2016 Justin White
*
* See included LICENSE file for distribution and reuse.
*/
#include <Engine.hpp>
static std::unique_ptr<Engine> theGame;
int success(const std::string& msg);
int fail(const std::string& msg);
int main(const ... | Reorganize main() for clarity and modern C++-ness. | Reorganize main() for clarity and modern C++-ness.
| C++ | bsd-3-clause | just6979/SpaceFight |
122b63a83716cf2ef440f9343bc12f142f4cd5d8 | src/main.cpp | src/main.cpp | #include <iostream>
#include "Board.h"
#include "Renderer.h"
int main(int argc, char** argv)
{
Board board(10, 10, 2);
Renderer renderer;
if(renderer.init() != 0)
{
renderer.quit();
return 1;
}
for(int i = 0; i < 5; ++i)
{
renderer.render();
SDL_Delay(1000);
}
renderer.quit();
return 0;
} | #include <iostream>
#include "Board.h"
#include "Renderer.h"
int main(int argc, char** argv)
{
Board board(10, 10, 2);
Renderer renderer;
if(renderer.init() != 0)
{
renderer.quit();
return 1;
}
bool running = true;
SDL_Event event;
while(running)
{
while(SDL_PollEvent(&event))
{
// Close window
... | Add simple event handling to quit | Add simple event handling to quit
| C++ | mit | SingingTree/MineSweeperlike |
8f5499ac1aa320ed31c157a987f3b4887a3d999f | example/example.cpp | example/example.cpp | #include "../src/vault.h"
#include <fstream>
#include <iostream>
namespace
{
// Copy example/credentials.txt.example to example/credentials.txt and
// put your username and then password on the next line.
std::pair<std::string, std::string> read_credentials()
{
std::ifstream f("example/credentials.txt");
if... | #include "../src/vault.h"
#include <fstream>
#include <iostream>
namespace
{
// Copy example/credentials.txt.example to example/credentials.txt and
// put your username and then password on the next line.
std::pair<std::string, std::string> read_credentials()
{
std::string username;
std::string password;
... | Read credentials from the keyboard if the file is not found | Read credentials from the keyboard if the file is not found
| C++ | mit | detunized/lastpass-cpp |
d06670ec139e22ba0adf59462d61e6fca450cdc2 | InternalCommands.cc | InternalCommands.cc | #include "InternalCommands.h"
#include "Environment.h"
#include "Feeder.h"
#include <iostream>
using namespace std;
int InternalCommands::exec(int argc, char const** argv,Environment *e,Feeder *f)
{
if(strncmp(argv[0],"echo",4) == 0){
exit( echo(argc,argv) );
}else if(strncmp(argv[0],"pid",3) == 0){
exit( pid(ar... | #include "InternalCommands.h"
#include "Environment.h"
#include "Feeder.h"
#include <iostream>
#include <string.h>
using namespace std;
int InternalCommands::exec(int argc, char const** argv,Environment *e,Feeder *f)
{
if(strncmp(argv[0],"echo",4) == 0){
exit( echo(argc,argv) );
}else if(strncmp(argv[0],"pid",3) =... | Add a header file for linux | Add a header file for linux
| C++ | mit | ryuichiueda/GlueLang,ryuichiueda/GlueLang,ryuichiueda/GlueLang |
73e11ddc10f9839e267a72bd5a4153ed5b3eb052 | test/SemaCXX/attr-on-explicit-template-instantiation.cpp | test/SemaCXX/attr-on-explicit-template-instantiation.cpp | // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
// PR39118
// Make sure that attributes are properly applied to explicit template
// instantiations.
#define HIDDEN __attribute__((__visibility__("hidden")))
#define VISIBLE __attribute__((__visibility__("default")))
namespace ns HIDDEN {
struct A { };
tem... | // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
// PR39118
// Make sure that attributes are properly applied to explicit template
// instantiations.
#define HIDDEN __attribute__((__visibility__("hidden")))
#define VISIBLE __attribute__((__visibility__("default")))
namespace ns H... | Fix failing attribute test on Windows | [clang] Fix failing attribute test on Windows
The test added in r344146 was failing because the ABI on Windows is
different, and that test includes ABI-specific details. The test now
harcodes which ABI to use so we can rely on those details.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@344159 91177308-0d34-04... | C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
2e0ebef8bcf447f5e94cf8d957f00180f416644e | python/python/Cpp/PythonParserBase.cpp | python/python/Cpp/PythonParserBase.cpp | #include "PythonParserBase.h"
using namespace antlr4;
PythonParserBase::PythonParserBase(antlr4::TokenStream *input) : Parser(input)
{
}
bool PythonParserBase::CheckVersion(int version)
{
return Version == PythonVersion::Autodetect || version == (int) Version;
}
void PythonParserBase::SetVersion(int requiredVersio... | #include "PythonParserBase.h"
using namespace antlr4;
PythonParserBase::PythonParserBase(antlr4::TokenStream *input) : Parser(input)
{
Version = PythonVersion::Autodetect;
}
bool PythonParserBase::CheckVersion(int version)
{
return Version == PythonVersion::Autodetect || version == (int) Version;
}
void PythonPar... | Fix bug in Cpp parser base class initialization. Regression tests all pass now. | Fix bug in Cpp parser base class initialization. Regression tests all pass now.
| C++ | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
00d9a944af2ac00e92e294c9893c83dd75450f46 | src/typeinfo.cpp | src/typeinfo.cpp | //===------------------------- typeinfo.cpp -------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | //===------------------------- typeinfo.cpp -------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... | Fix yet another Apple buildit bug | Fix yet another Apple buildit bug
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@294732 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
eef5b803b6eee727e153396269a7738db30fec79 | test/CoverageMapping/abspath.cpp | test/CoverageMapping/abspath.cpp | // RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name abspath.cpp %S/Inputs/../abspath.cpp -o - | FileCheck -check-prefix=RMDOTS %s
// RMDOTS: @__llvm_coverage_mapping = {{.*}}"\01
// RMDOTS-NOT: Inputs
// RMDOTS: "
// RUN: mkdir -p %t/test && cd %t/test
// RUN: echo "void f1() {... | // RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name abspath.cpp %S/Inputs/../abspath.cpp -o - | FileCheck -check-prefix=RMDOTS %s
// RMDOTS: @__llvm_coverage_mapping = {{.*}}"\01
// RMDOTS-NOT: Inputs
// RMDOTS: "
// RUN: mkdir -p %t/test && cd %t/test
// RUN: echo "void f1() {... | Fix one more clang test which didn't have \5C in it | Fix one more clang test which didn't have \5C in it
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@374418 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
23d96e03012f54eac3d0bfb28b37aaad64e44694 | vector_saxpy.cpp | vector_saxpy.cpp | #include <algorithm>
#include <cassert>
#include <iostream>
#include <agency/execution_policy.hpp>
int main()
{
using namespace agency;
size_t n = 1 << 16;
std::vector<float> x(n, 1), y(n, 2), z(n);
float a = 13.;
bulk_invoke(vec(n), [&](vector_agent &self)
{
int i = self.index();
z[i] = a * x[i]... | #include <algorithm>
#include <cassert>
#include <iostream>
#include <agency/execution_policy.hpp>
int main()
{
using namespace agency;
size_t n = 1 << 16;
std::vector<float> x(n, 1), y(n, 2), z(n);
float a = 13.;
bulk_invoke(vec(n), [&](vector_agent &self)
{
auto i = self.index();
z[i] = a * x[i... | Use auto when grabbing the agent's index, otherwise we don't get vectorization | Use auto when grabbing the agent's index, otherwise we don't get vectorization
| C++ | bsd-3-clause | egaburov/agency,egaburov/agency |
4b5867151360241d36259c75b035ed7978534221 | EiTOS/main.cpp | EiTOS/main.cpp | #include <avr/io.h>
#include <util/delay.h>
#include <OS.hpp>
#include <avr/interrupt.h>
#include "drivers/serial.hpp"
Serial serial;
mutex muteks_01;
void Task1() {
while (1) {
static uint8_t i = 0;
PORTB ^= (1 << PB2);
_delay_ms(50);
serial.printf("Test %d\r\n", i);
i++;... | #include <avr/io.h>
#include <util/delay.h>
#include <OS.hpp>
#include <avr/interrupt.h>
#include "drivers/serial.hpp"
Serial serial;
mutex muteks_01;
void Task1() {
while (1) {
static uint8_t i = 0;
PORTB ^= (1 << PB2);
_delay_ms(50);
serial.printf("Test %d\r\n", i);
i++;... | Test what happen if task ends | Test what happen if task ends
| C++ | apache-2.0 | eitos/RTOS,eitos/RTOS |
d51eff1b7977ff06506d1afe30d8f6f3f10e53db | stl_test/tmpfs_test.cpp | stl_test/tmpfs_test.cpp |
#include <cstdio>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
int main() {
int fd = open("/tmp/bwtree.tmp", O_RDWR | O_TRUNC | O_CREAT);
if(fd == -1) {
printf("open() returned -1\n");
return -1;
}
int ret = ftruncate(fd, (0x1L << ... |
#include <cstdio>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/mman.h>
int main() {
/*
int fd = open("/tmp/bwtree.tmp", O_RDWR | O_TRUNC | O_CREAT);
if(fd == -1) {
printf("open() returned -1\n");
return -1;
}
int ret... | Test mmap() for large chunk of memory | Test mmap() for large chunk of memory
| C++ | apache-2.0 | wangziqi2013/BwTree,wangziqi2013/BwTree,wangziqi2013/BwTree |
b54c5cb6edf85346c55dbd2dda700f684fe8e7bc | server/src/main.cpp | server/src/main.cpp | //
// Created by samueli on 2017-10-02.
//
#include "ins_service.hpp"
#include <signal.h>
volatile sig_atomic_t is_server_running = 1;
void kill_server(int sig)
{
is_server_running = 0;
}
int main(int argc, char* argv[])
{
spdlog::set_level(spdlog::level::debug);
Pistache::Port port(9080);
int ... | //
// Created by samueli on 2017-10-02.
//
#include "ins_service.hpp"
#include <csignal>
volatile sig_atomic_t is_server_running = 1;
void kill_server(int sig)
{
is_server_running = 0;
}
int main(int argc, char* argv[])
{
spdlog::set_level(spdlog::level::debug);
Pistache::Port port(9080);
int ... | Use std::signal and csignal header | Use std::signal and csignal header
* Fixes #85
| C++ | apache-2.0 | platisd/indoor-navigation-system,platisd/indoor-navigation-system,platisd/indoor-navigation-system,platisd/indoor-navigation-system |
b6b59e5c0829cd07bb638da41c360f78220467cd | src/engine/hint.cpp | src/engine/hint.cpp | #include "engine/hint.hpp"
#include "engine/base64.hpp"
#include "engine/datafacade/datafacade_base.hpp"
#include <boost/assert.hpp>
namespace osrm
{
namespace engine
{
bool Hint::IsValid(const util::Coordinate new_input_coordinates,
const datafacade::BaseDataFacade &facade) const
{
auto is_sa... | #include "engine/hint.hpp"
#include "engine/base64.hpp"
#include "engine/datafacade/datafacade_base.hpp"
#include <boost/assert.hpp>
#include <iterator>
#include <algorithm>
namespace osrm
{
namespace engine
{
bool Hint::IsValid(const util::Coordinate new_input_coordinates,
const datafacade::Base... | Make Hint encoding safe for passing them as GET parameter in URLs | Make Hint encoding safe for passing them as GET parameter in URLs
Thanks @TheMarex for flagging this!
| C++ | bsd-2-clause | felixguendling/osrm-backend,duizendnegen/osrm-backend,raymond0/osrm-backend,KnockSoftware/osrm-backend,raymond0/osrm-backend,beemogmbh/osrm-backend,Project-OSRM/osrm-backend,hydrays/osrm-backend,bjtaylor1/osrm-backend,felixguendling/osrm-backend,frodrigo/osrm-backend,yuryleb/osrm-backend,yuryleb/osrm-backend,KnockSoftw... |
c446ef6399f28f51da2951fc9e504b84cfd903cb | ouzel/Camera.cpp | ouzel/Camera.cpp | // Copyright (C) 2015 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "Camera.h"
namespace ouzel
{
Camera::Camera()
{
}
Camera::~Camera()
{
}
void Camera::setZoom(float zoom)
{
_zoom = zoom;
if (_zoom < 0.1f)
{
... | // Copyright (C) 2015 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "Camera.h"
namespace ouzel
{
Camera::Camera()
{
}
Camera::~Camera()
{
}
void Camera::setZoom(float zoom)
{
_zoom = zoom;
if (_zoom < 0.1f)
{
... | Mark camera transform not dirty after update | Mark camera transform not dirty after update
| C++ | unlicense | elnormous/ouzel,elvman/ouzel,Hotspotmar/ouzel,elnormous/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel,elvman/ouzel,elnormous/ouzel |
c153aa9550e326b89b3f8439f7e617c344cb78f1 | example/px500.cpp | example/px500.cpp | #include "px500.h"
Px500::Px500(QObject *parent)
: ServerBase(parent)
{
}
const QString Px500::serverBaseUrl() const
{
return QStringLiteral("https://api.500px.com/v1");
}
const Parameters Px500::requestHeaders() const
{
const QHash<QString, QString> headers = QHash<QString, QString> {
// {"Auth... | #include "px500.h"
Px500::Px500(QObject *parent)
: ServerBase(parent)
{
}
const QString Px500::serverBaseUrl() const
{
return QStringLiteral("https://api.500px.com/v1");
}
const Parameters Px500::requestHeaders() const
{
const QHash<QString, QString> headers = QHash<QString, QString> {
// {"Auth... | Raise the 500px photos rpp to 10 | Raise the 500px photos rpp to 10
| C++ | lgpl-2.1 | mck182/RESTQtful,mck182/RESTQtful |
ead22261c29c310ed083676ef65b27766abbd93e | src/stm32f4/hwdep_init.cpp | src/stm32f4/hwdep_init.cpp | #include <mbed.h>
extern void setup();
extern void loop();
void setIrqPriorities() {
NVIC_SetPriority(UART5_IRQn, 1);
NVIC_SetPriority(TIM5_IRQn, 2);
NVIC_SetPriority(TIM4_IRQn, 3);
}
int main() {
setIrqPriorities();
setup();
for (;;) {
loop();
}
}
| #include <mbed.h>
extern void setup();
extern void loop();
void setIrqPriorities() {
}
int main() {
setIrqPriorities();
setup();
for (;;) {
loop();
}
}
| Remove unnecessary IRQ priority settings | Remove unnecessary IRQ priority settings
| C++ | mit | NewJapanRadio/NJU9103_eva_mcu,NewJapanRadio/NJU9103_eva_mcu |
62e85be21e3b9dcb2daa267f935bffe9520611c7 | src/SocketHandler.cpp | src/SocketHandler.cpp | #include "SocketHandler.hpp"
namespace et {
void SocketHandler::readAll(int fd, void* buf, size_t count) {
size_t pos = 0;
while (pos < count) {
ssize_t bytesRead = read(fd, ((char*)buf) + pos, count - pos);
if (bytesRead < 0) {
if (errno == EAGAIN ||
errno == EWOULDBLOCK) {
// This... | #include "SocketHandler.hpp"
namespace et {
void SocketHandler::readAll(int fd, void* buf, size_t count) {
size_t pos = 0;
while (pos < count) {
ssize_t bytesRead = read(fd, ((char*)buf) + pos, count - pos);
if (bytesRead < 0) {
if (errno == EAGAIN ||
errno == EWOULDBLOCK) {
// This... | Fix bug where EAGAIN and EWOULDBLOCK can cause data corruption. | Fix bug where EAGAIN and EWOULDBLOCK can cause data corruption.
| C++ | apache-2.0 | MisterTea/EternalTCP,MisterTea/EternalTCP,MisterTea/EternalTCP |
5c265d6fd3537c99304b153fc49066db3be46d46 | src/gpu/GrCacheID.cpp | src/gpu/GrCacheID.cpp | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrTypes.h"
#include "SkThread.h" // for sk_atomic_inc
// This used to be a global scope, but we got a warning about unused variable
// so we moved it into her... | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrTypes.h"
#include "SkThread.h" // for sk_atomic_inc
// Well, the dummy_ "fix" caused a warning on windows, so hiding all of it
// until we can find a univer... | Revert r7595 due to housekeeper warning-as-error. | Revert r7595 due to housekeeper warning-as-error.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@7596 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | geekboxzone/lollipop_external_chromium_org_third_party_skia,byterom/android_external_skia,OptiPop/external_chromium_org_third_party_skia,ominux/skia,shahrzadmn/skia,Fusion-Rom/external_chromium_org_third_party_skia,HealthyHoney/temasek_SKIA,SlimSaber/android_external_skia,TeamBliss-LP/android_external_skia,suyouxin/and... |
9db7fffe048c6647803149ae4866eadfb1d6c6a1 | src/apps/marble-maps/main.cpp | src/apps/marble-maps/main.cpp | //
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2015 Gábor Péterffy <peterffy95@gmail.com>
//
#include <QApplication>
#include <QQ... | //
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2015 Gábor Péterffy <peterffy95@gmail.com>
//
#include <QApplication>
#include <QQ... | Set small screen + high resolution profile on Android. | Set small screen + high resolution profile on Android.
| C++ | lgpl-2.1 | tzapzoor/marble,tzapzoor/marble,tzapzoor/marble,tzapzoor/marble,tzapzoor/marble,tzapzoor/marble,tzapzoor/marble,tzapzoor/marble |
b6495cbbe1f9f6b50e35b088c096c026164cccf4 | src/redis-pipeline.cc | src/redis-pipeline.cc | #include "hiredis/hiredis.h"
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int
main (int argc, const char** argv)
{
auto context = redisConnect("127.0.0.1", 6379);
// auto context = redisConnectUnix("/tmp/redis.sock");
if (context != NULL && context->err) {
... | #include "hiredis/hiredis.h"
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int
main (int argc, const char** argv)
{
auto context = redisConnect("127.0.0.1", 6379);
// auto context = redisConnectUnix("/tmp/redis.sock");
if (context != NULL && context->err) {
... | Fix handling of replies to show the number of words at the end. | Fix handling of replies to show the number of words at the end.
| C++ | mit | saucisson/dd-words,saucisson/dd-words |
e1045e9422270636988456b6cfdb4037d82ffe84 | src/core/example_group.cc | src/core/example_group.cc | #include <functional>
#include <stack>
#include <string>
#include <ccspec/core/example_group.h>
namespace ccspec {
namespace core {
using std::function;
using std::stack;
using std::string;
stack<ExampleGroup*> groups_being_defined;
// Public methods.
ExampleGroup::~ExampleGroup() {
for (auto it = children_.be... | #include <functional>
#include <stack>
#include <string>
#include <ccspec/core/example_group.h>
namespace ccspec {
namespace core {
using std::function;
using std::stack;
using std::string;
stack<ExampleGroup*> groups_being_defined;
// Public methods.
ExampleGroup::~ExampleGroup() {
for (auto& child : children... | Use c++11 syntax for succinct iterator syntax | Use c++11 syntax for succinct iterator syntax
| C++ | mit | michaelachrisco/ccspec,tempbottle/ccspec,zhangsu/ccspec,zhangsu/ccspec,zhangsu/ccspec,tempbottle/ccspec,michaelachrisco/ccspec,michaelachrisco/ccspec,tempbottle/ccspec |
cbb97830d749f617231c5304ed31788c82eff1ec | tests/test_case.cc | tests/test_case.cc | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/tests/test_case.h"
#include <sstream>
std::string TestCase::MakeFailureMessage(const char* file,
... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/tests/test_case.h"
#include <sstream>
std::string TestCase::MakeFailureMessage(const char* file,
... | Fix the Chrome Linux build by working around a compiler bug. | Fix the Chrome Linux build by working around a compiler bug.
TEST=none
BUG=none | C++ | bsd-3-clause | Gitzk/ppapi,Iwan12/ppapi,macressler/ppapi,johnnnylm/ppapi,johnnnylm/ppapi,Gitzk/ppapi,kaijajan/ppapi,lio972/ppapi,humanai/ppapi,LinRaise/ppapi,jmnjmn/ppapi,iofcas/ppapi,Iwan12/ppapi,jmnjmn/ppapi,thecocce/ppapi,kaijajan/ppapi,kaijajan/ppapi,johnnnylm/ppapi,Gitzk/ppapi,jmnjmn/ppapi,thecocce/ppapi,macressler/ppapi,humanai... |
0a60702e1a2688b4f7143a1fe61e27cad88bfb4a | src/eeprom.cpp | src/eeprom.cpp | #include "ics3/eeprom.hpp"
#include "ics3/eepparam.hpp"
#include "ics3/ics3.hpp"
#include <stdexcept>
ics::EepParam ics::Eeprom::get(EepParam param) const {
try {
param.read(data);
} catch (...) {
throw std::runtime_error {"Fail data: non initialize EEPROM by ICS"};
}
return param;
}
void ics::Eepro... | #include "ics3/eeprom.hpp"
#include "ics3/eepparam.hpp"
#include <stdexcept>
ics::EepParam ics::Eeprom::get(EepParam param) const {
param.read(data);
return param;
}
void ics::Eeprom::set(const EepParam& param) noexcept {
param.write(data);
}
void ics::Eeprom::copyTo(std::vector<unsigned char>& dest) const n... | Remove check invalid self; it only created ICS3 | Remove check invalid self; it only created ICS3
| C++ | bsd-2-clause | forno/libics3,forno/libics3 |
80a9f7b50ec56d2810653a9f8430810be7b977ef | Kernel/stage1.cpp | Kernel/stage1.cpp | #ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
extern "C" void KMain() {
__asm {
mov ah, 0h
int 010h
}
}
| #ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
static struct {
char size;
char res;
short transferSize;
int dest;
long source;
} LBAPacket = {0x10, 0, 0, 0, 0};
inline void PrintChar(char c) {
__asm {
mov AH, 0x0A;
mov AL, c;
mov CX, 1;
int 0x10;
}
}
inlin... | Implement util functions to read stage2 | Implement util functions to read stage2
| C++ | mit | Sebmaster/bootloader-game |
f9470a30623dab95050c32e10576d706b13675dd | test/tsan/ignore_lib0.cc | test/tsan/ignore_lib0.cc | // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib0.so
// RUN: %clangxx_tsan -O1 %s -L%T -lignore_lib0 -o %t
// RUN: echo running w/o suppressions:
// RUN: LD_LIBRARY_PATH=%T not %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP
// RUN: echo running with suppressions:
// RUN: LD_... | // RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %T/libignore_lib0.so
// RUN: %clangxx_tsan -O1 %s -L%T -lignore_lib0 -o %t
// RUN: echo running w/o suppressions:
// RUN: LD_LIBRARY_PATH=%T${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} not %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP
// RUN: echo r... | Make this test more portable | [TSan] Make this test more portable
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@205300 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
be1bc412b07d61883c6bd7524f1ec259c3a95df5 | commands/extract.cpp | commands/extract.cpp | #include "extract.hpp"
#include "../huffman/decompress.hpp"
#include<fstream>
#include<vector>
#include<experimental/filesystem>
void extract(const char* in_file, const char* out_dir) {
std::ifstream in(in_file);
extract(in, out_dir);
}
void extract(std::istream& in_stream, const char* out_dir) {
std::istreambuf_... | #include "extract.hpp"
#include "../huffman/decompress.hpp"
#include<fstream>
#include<vector>
#include<experimental/filesystem>
namespace fs = std::experimental::filesystem;
void extract(const char* in_file, const char* out_dir) {
std::ifstream in(in_file);
extract(in, out_dir);
}
void extract(std::istream& in_s... | Use filesystem library path concatenation | Use filesystem library path concatenation
| C++ | mit | cuklev/huffman-archiver-cpp,StanislavNikolov/huffman-archiver-cpp |
f2eef6ad6287e62c570ca68c7408de8e06876a5d | tests/algoritm_tests.cpp | tests/algoritm_tests.cpp | #include <algorithm>
#include <gtest/gtest.h>
TEST(array, sorting) {
int foo[3] = {1, 3, 2};
std::sort(foo, foo + 3);
EXPECT_EQ(1, foo[0]);
EXPECT_EQ(2, foo[1]);
EXPECT_EQ(3, foo[2]);
}
TEST(swap, test1) {
int a = 1;
int b = 2;
std::swap(a, b);
EXPECT_EQ(2, a);
EXPECT_EQ(1,... | #include <algorithm>
#include <gtest/gtest.h>
TEST(array, sorting) {
int foo[3] = {1, 3, 2};
std::sort(foo, foo + 3);
EXPECT_EQ(1, foo[0]);
EXPECT_EQ(2, foo[1]);
EXPECT_EQ(3, foo[2]);
}
TEST(swap, test1) {
int a = 1;
int b = 2;
std::swap(a, b);
EXPECT_EQ(2, a);
EXPECT_EQ(1,... | Add a std::string reverse test | Add a std::string reverse test
| C++ | bsd-3-clause | tsmsogn/cpp_getting_started |
958809cc0dfdbe289339a913c586f64a6fe8d0d3 | test/WordDecoder_test.cpp | test/WordDecoder_test.cpp | #include <catch.hpp>
#include "WordDecoder.hpp"
namespace {
using namespace Core8;
TEST_CASE("Decode X from pattern vXvv", "[decoder]") {
REQUIRE(WordDecoder::readX(0x0F00) == 0XF);
REQUIRE(WordDecoder::readX(0xF0FF) == 0X0);
}
TEST_CASE("Decode Y from pattern vvYv", "[decoder]") {
REQUIRE(WordDecoder::readY... | #include <catch.hpp>
#include "WordDecoder.hpp"
namespace {
TEST_CASE("Decode X from pattern vXvv", "[decoder]") {
REQUIRE(Core8::WordDecoder::readX(0x0F00) == 0XF);
REQUIRE(Core8::WordDecoder::readX(0xF0FF) == 0X0);
}
TEST_CASE("Decode Y from pattern vvYv", "[decoder]") {
REQUIRE(Core8::WordDecoder::readY(0x... | Refactor word decoder unit tests | Refactor word decoder unit tests
| C++ | mit | benvenutti/core8,benvenutti/core8 |
dd41ddd2917f64967f1a119c6e4d0a5674f6e2ed | src/ui/qclosabletabwidget.cpp | src/ui/qclosabletabwidget.cpp | #include <QTabBar>
#include "qclosabletabwidget.h"
QClosableTabWidget::QClosableTabWidget(QWidget *parent)
: QTabWidget(parent)
{
tabBar()->installEventFilter(this);
}
bool QClosableTabWidget::eventFilter(QObject *o, QEvent *e)
{
if (o == tabBar() && e->type() == QEvent::MouseButtonPress)
{
QMouseEvent *mouseE... | #include <QTabBar>
#include "qclosabletabwidget.h"
QClosableTabWidget::QClosableTabWidget(QWidget *parent)
: QTabWidget(parent)
{
tabBar()->installEventFilter(this);
}
bool QClosableTabWidget::eventFilter(QObject *o, QEvent *e)
{
if (o == tabBar() && e->type() == QEvent::MouseButtonPress)
{
QMouseEvent *mouseE... | Disable middle click close for unclosable tabs | Disable middle click close for unclosable tabs
| C++ | apache-2.0 | YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber |
b4ef97994abc69368de9ed85c13507628d4cf803 | gpu/src/GrGLUtil.cpp | gpu/src/GrGLUtil.cpp |
/*
* 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 "GrGLConfig.h"
#include "GrGLInterface.h"
void GrGLClearErr(const GrGLInterface* gl) {
while (GR_GL_NO_ERROR != gl->fGetError()) {}
}
void GrGLCheckErr(const ... |
/*
* 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 "GrGLConfig.h"
#include "GrGLInterface.h"
void GrGLClearErr(const GrGLInterface* gl) {
while (GR_GL_NO_ERROR != gl->fGetError()) {}
}
void GrGLCheckErr(const ... | Fix gl error debug print. | Fix gl error debug print.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2356 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | metajack/skia,metajack/skia,mrobinson/skia,Cue/skia,metajack/skia,metajack/skia,mrobinson/skia,Cue/skia,mrobinson/skia,Cue/skia,mrobinson/skia,Cue/skia,mrobinson/skia |
cd428b9b05f443d88b6395ec677c806a06872ad6 | template/cc/template.cc | template/cc/template.cc | # include <algorithm>
# include <iostream>
# include <iterator>
# include <vector>
# include <string>
# include <queue>
# include <stack>
# include <cmath>
# include <set>
using namespace std;
int main() {
return 0;
}
| # include <cmath>
# include <iostream>
# include <queue>
# include <set>
# include <stack>
# include <string>
# include <vector>
using namespace std;
int main() {
return 0;
}
| Remove some headers which are not frequently used | Remove some headers which are not frequently used
| C++ | mit | himkt/.dotfiles,himkt/.dotfiles,himkt/.dotfiles,himkt/.dotfiles |
05acd587cf382aebdc2e09e5731a4c05126114f3 | chapter4/InputHandler.cpp | chapter4/InputHandler.cpp | #include<iostream>
#include"InputHandler.h"
#include"Game.h"
InputHandler *InputHandler::instance = 0;
void InputHandler::initialiseJoysticks()
{
if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) {
SDL_InitSubSystem(SDL_INIT_JOYSTICK);
}
if (SDL_NumJoysticks() > 0) {
joysticksInitialised = false;
... | #include<iostream>
#include"InputHandler.h"
#include"Game.h"
InputHandler *InputHandler::instance = 0;
void InputHandler::initialiseJoysticks()
{
if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) {
SDL_InitSubSystem(SDL_INIT_JOYSTICK);
}
if (SDL_NumJoysticks() <= 0) {
joysticksInitialised = false;... | Fix if condition from initialization of joysticks. | Fix if condition from initialization of joysticks.
| C++ | bsd-2-clause | caiotava/SDLBook |
87419c82727ac16a636d56842649852874c742f0 | test/SemaTemplate/lambda-capture-pack.cpp | test/SemaTemplate/lambda-capture-pack.cpp | // RUN: %clang_cc1 -std=c++2a -verify %s
// expected-no-diagnostics
template<typename ...T, typename ...Lambda> void check_sizes(Lambda ...L) {
static_assert(((sizeof(T) == sizeof(Lambda)) && ...));
}
template<typename ...T> void f(T ...v) {
// Pack expansion of lambdas: each lambda captures only one pack element... | // RUN: %clang_cc1 -std=c++2a -verify %s
template<typename ...T, typename ...Lambda> void check_sizes(Lambda ...L) {
static_assert(((sizeof(T) == sizeof(Lambda)) && ...));
}
template<typename ...T> void f(T ...v) {
// Pack expansion of lambdas: each lambda captures only one pack element.
check_sizes<T...>([=] {... | Add regression test for PR41576 (which is already fixed in trunk, perhaps by r361300). | Add regression test for PR41576 (which is already fixed in trunk,
perhaps by r361300).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@364340 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang |
6047c0e29962dd294eee0a54975cea3b1361fe94 | src/common/utils.cpp | src/common/utils.cpp | #include "edge_common.h"
v8::Local<Value> throwV8Exception(v8::Local<Value> exception)
{
Nan::EscapableHandleScope scope;
Nan::ThrowError(exception);
return scope.Escape(exception);
}
v8::Local<Value> throwV8Exception(const char* format, ...)
{
va_list args;
va_start(args, format);
size_t size = vsnpr... | #include "edge_common.h"
v8::Local<Value> throwV8Exception(v8::Local<Value> exception)
{
Nan::EscapableHandleScope scope;
Nan::ThrowError(exception);
return scope.Escape(exception);
}
v8::Local<Value> throwV8Exception(const char* format, ...)
{
va_list args;
va_start(args, format);
size_t size = vsnpr... | Fix for issue that would cause an occasional segmentation fault on Linux if already in an error state in throwV8Exception. va_list must be reinitialized after each use. | Fix for issue that would cause an occasional segmentation fault on Linux if already in an error state in throwV8Exception. va_list must be reinitialized after each use.
| C++ | apache-2.0 | agracio/edge-js,agracio/edge-js,agracio/edge-js,agracio/edge-js,agracio/edge-js,agracio/edge-js |
7344585d38d0ee6c90de55e1091628a1c4116dcc | src/forgetthread.cpp | src/forgetthread.cpp | #include "forgetthread.h"
void ForgetThread::launch(){
//Aliases
transactionHistory = transactionHistoryPtr[thread];
tupleContent = tupleContentPtr[thread];
mutexForget.lock();
while(true){
//Waits for the signal from main thread
processingForgetThreadsNb++;
conditionForget... | #include "forgetthread.h"
void ForgetThread::launch(){
//Aliases
transactionHistory = transactionHistoryPtr[thread];
tupleContent = tupleContentPtr[thread];
mutexForget.lock();
while(true){
//Waits for the signal from main thread
processingForgetThreadsNb++;
conditionForget... | Remove entry from map if vector<Tuple> empty in ForgetThread::processForget() | Remove entry from map if vector<Tuple> empty in ForgetThread::processForget()
| C++ | mit | tiennot/sigmod,tiennot/sigmod |
9709d7c0d15f61f6df20c6614476ed725da9b5bc | src/floaxietest.cpp | src/floaxietest.cpp | #include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
| #if __cplusplus >= 201402L
#include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
#endif
| Fix building for pre-C++14 standards | Fix building for pre-C++14 standards
Skip `floaxie` test in this case, as it requires at least C++14.
| C++ | mit | miloyip/dtoa-benchmark,miloyip/dtoa-benchmark,miloyip/dtoa-benchmark,miloyip/dtoa-benchmark,miloyip/dtoa-benchmark |
617113c1d237b6149eb2078747e0bae9f7a06b64 | be/src/sparrow/state-store-main.cc | be/src/sparrow/state-store-main.cc | // Copyright (c) 2012 Cloudera, Inc. All rights reserved.
//
// This file contains the main() function for the state store process,
// which exports the Thrift service StateStoreService.
#include <glog/logging.h>
#include <gflags/gflags.h>
#include "sparrow/state-store-service.h"
#include "util/cpu-info.h"
DEFINE_in... | // Copyright (c) 2012 Cloudera, Inc. All rights reserved.
//
// This file contains the main() function for the state store process,
// which exports the Thrift service StateStoreService.
#include <glog/logging.h>
#include <gflags/gflags.h>
#include <iostream>
#include "common/status.h"
#include "sparrow/state-store-s... | Allow configuraiton of state-store log dir / name. Also add debug webserver to state-store. | IMP-241: Allow configuraiton of state-store log dir / name. Also add debug webserver to state-store.
| C++ | apache-2.0 | michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala |
b276ae1a948ab393aa6dc88baa993a1922ab5f10 | ReQL-ast-test.cpp | ReQL-ast-test.cpp | #include "ReQL-ast-test.hpp"
class BlankTest : public ASTTest {
public:
BlankTest() : ASTTest() {
}
void setup() {
setName("BlankTest");
}
void run() {
}
void cleanup() {
}
};
void ASTTest::setup() {
setName("ASTTest");
addTest(BlankTest());
}
| #include "ReQL-ast-test.hpp"
using namespace ReQL;
class BlankTest : public ASTTest {
public:
BlankTest() : ASTTest() {
}
void setup();
void cleanup() {
conn.close();
}
Connection conn;
};
class TableTermTest : public BlankTest {
public:
TableTermTest() : BlankTest() {};
void run() {
tabl... | Add test to retrieve a table from database. | Add test to retrieve a table from database.
| C++ | apache-2.0 | grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core,grandquista/ReQL-Core |
37aa8a56dc4cc0f38b60f800334b0631a0f8d157 | karum/inOrderRec.cpp | karum/inOrderRec.cpp | #include<iostream>
using namespace std;
class node{
public:
int data;
node *left, *right;
node(){}
node(int d) {
data=d;
left=NULL;
right=NULL;
}
node *insertNode(node *root, int d) {
if(!root)
return new node(d);
else if(d <= root->data)
root->left=insertNode(root->left,d);
... | #include<iostream>
using namespace std;
class node{
public:
int data;
node *left, *right;
node(){}
node(int d) {
data=d;
left=NULL;
right=NULL;
}
node *insertNode(node *root, int d) {
if(!root)
return new node(d);
if(d <= root->data)
root->left=insertNode(root->left,d);
else
... | Fix reference to unavailable nodes | Fix reference to unavailable nodes
| C++ | mit | shivan1b/codes |
5237f5a91e425263ab5c6e264588f368adf816b3 | test/Tests.cpp | test/Tests.cpp | #include "gtest/gtest.h"
#include "IMediaLibrary.h"
TEST( MediaLibary, Init )
{
IMediaLibrary* ml = MediaLibraryFactory::create();
ASSERT_TRUE( ml->initialize( "test.db" ) );
}
| #include "gtest/gtest.h"
#include "IMediaLibrary.h"
class MLTest : public testing::Test
{
public:
static IMediaLibrary* ml;
protected:
virtual void SetUp()
{
ml = MediaLibraryFactory::create();
bool res = ml->initialize( "test.db" );
ASSERT_TRUE( re... | Clear database between each test & add a test for file insertion | Clear database between each test & add a test for file insertion
| C++ | lgpl-2.1 | chouquette/medialibrary,chouquette/medialibrary,chouquette/medialibrary,chouquette/medialibrary |
cb50012374f34d97f49733e595d8f8554737ce27 | src/yarrar/dataprovider/WebcamDataProvider.cpp | src/yarrar/dataprovider/WebcamDataProvider.cpp | #include "WebcamDataProvider.h"
namespace yarrar
{
WebcamDataProvider::WebcamDataProvider(const json11::Json& config)
: DataProvider(config)
, m_videoCapture(0)
, m_dp({})
{
if(!m_videoCapture.isOpened())
{
throw std::runtime_error("cant open video");
}
}
const LockableData<Datapoint... | #include "WebcamDataProvider.h"
namespace yarrar
{
WebcamDataProvider::WebcamDataProvider(const json11::Json& config)
: DataProvider(config)
, m_videoCapture(0)
, m_dp({})
{
if(!m_videoCapture.isOpened())
{
throw std::runtime_error("cant open video");
}
}
const LockableData<Datapoint... | Use cv::VideoCapture properties to get width and height. | Use cv::VideoCapture properties to get width and height.
| C++ | mit | ndob/yarrar,ndob/yarrar,ndob/yarrar,ndob/yarrar |
07a71cbc415023afe2a8861f60664a7296a99f6e | DNAnalyzer/DNAnalyzerServerTest/DictionnaireTest.cpp | DNAnalyzer/DNAnalyzerServerTest/DictionnaireTest.cpp | #include "stdafx.h"
#include "CppUnitTest.h"
#include "../DNAnalyzerServer/Dictionnaire.h"
#include <exception>
#include <cstring>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace DNAnalyzerServerTest
{
TEST_CLASS(DictionnaireTest)
{
public:
//ObtenirInstance
TEST_METHOD(ObtenirInstance... | #include "stdafx.h"
#include "CppUnitTest.h"
#include "../DNAnalyzerServer/Dictionnaire.h"
#include <exception>
#include <cstring>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace DNAnalyzerServerTest
{
TEST_CLASS(DictionnaireTest)
{
public:
};
} | Revert "Ajout de 2 methode de test Dictionnaire (reste incomplet)" | Revert "Ajout de 2 methode de test Dictionnaire (reste incomplet)"
This reverts commit 5dc69e06be3c3ffd37437c1853df0078b95e0ca0.
| C++ | mit | benjaminchazelle/DNAnalyzer,benjaminchazelle/DNAnalyzer,benjaminchazelle/DNAnalyzer |
f7decd5d134e4a49d7675228dd38a3d92527f1ff | apps/pe/main.cpp | apps/pe/main.cpp | #include <iostream>
using std::cout;
using std::endl;
#include "problems/Factory.h"
#include "util/Timer.h"
using util::Timer;
int main(int argc, char **argv) {
auto problem = problems::Factory::create(1);
Timer t;
t.start();
problem->solve();
t.stop();
cout << problem->answer() << endl;
cout << "Ti... | #include <iostream>
using std::cerr;
using std::cout;
using std::endl;
#include <stdexcept>
using std::exception;
using std::out_of_range;
#include <string>
using std::stoul;
#include "problems/Factory.h"
#include "util/Timer.h"
using util::Timer;
void all_problems();
void one_problem(const unsigned long problem);
i... | Make apps/pe accept problem number as argument | Make apps/pe accept problem number as argument
| C++ | mit | wtmitchell/challenge_problems,wtmitchell/challenge_problems,wtmitchell/challenge_problems |
739b903d8e5444d8dc19361fb1057f6821382c37 | notebooktree.cpp | notebooktree.cpp | #include "notebooktree.h"
#include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
}
void NotebookTree::addNotebook(Notebook& notebook)
{
TreeNotebookItem* treeItem = new Tree... | #include "notebooktree.h"
#include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
#include <QHeaderView>
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
this->header()->hide();
}
void NotebookTree::addNotebook(Notebook& n... | Remove header from notebook tree | Remove header from notebook tree
| C++ | mit | jslick/PepperNote,jslick/PepperNote |
70dd76102571dbb3e92c9075e7b39a90204b7701 | lingo/utility.cpp | lingo/utility.cpp | // Copyright (c) 2015 Andrew Sutton
// All rights reserved
#include "lingo/utility.hpp"
#include <cstdlib>
#include <cxxabi.h>
namespace lingo
{
String
type_str(std::type_info const& t)
{
std::size_t n = 0;
char* buf = abi::__cxa_demangle(t.name(), nullptr, &n, 0);
String result(buf, n);
std::free(buf);
r... | // Copyright (c) 2015 Andrew Sutton
// All rights reserved
#include "lingo/utility.hpp"
#include <cstdlib>
#include <cxxabi.h>
#include <iostream>
namespace lingo
{
String
type_str(std::type_info const& t)
{
std::size_t n = 0;
char* buf = abi::__cxa_demangle(t.name(), nullptr, &n, 0);
String result(buf);
st... | Fix bug in name demangling. | Fix bug in name demangling.
| C++ | mit | asutton/lingo,th58/lingo,Jenny-fa/lingo |
026594e269c6bf30e4d69103717d969fc0b3531d | src/qt/test/test_main.cpp | src/qt/test/test_main.cpp | #include <QTest>
#include <QObject>
#include "uritests.h"
// This is all you need to run all the tests
int main(int argc, char *argv[])
{
URITests test1;
QTest::qExec(&test1);
}
| #include <QTest>
#include <QObject>
#include "uritests.h"
// This is all you need to run all the tests
int main(int argc, char *argv[])
{
bool fInvalid = false;
URITests test1;
if (QTest::qExec(&test1) != 0)
fInvalid = true;
return fInvalid;
}
| Return !0 when qt tests fail. | Return !0 when qt tests fail.
| C++ | mit | habibmasuro/bitcoin,bitshares/bitshares-pts,ddombrowsky/radioshares,apoelstra/bitcoin,Bitcoinsulting/bitcoinxt,sipa/bitcoin,OmniLayer/omnicore,stevemyers/bitcoinxt,gcc64/bitcoin,marscoin/marscoin,blocktrail/bitcoin,marlengit/hardfork_prototype_1_mvf-bu,instagibbs/bitcoin,cmgustavo/bitcoin,ripper234/bitcoin,Richcoin-Pro... |
b49cc223872a11892588a698713a6d28aa18b2d0 | 3RVX/OSD/EjectOSD.cpp | 3RVX/OSD/EjectOSD.cpp | #include "EjectOSD.h"
#include <Dbt.h>
#include "..\Monitor.h"
#include "..\Skin.h"
EjectOSD::EjectOSD() :
OSD(L"3RVX-EjectDispatcher") {
_mWnd = new MeterWnd(L"3RVX-EjectOSD", L"3RVX-EjectOSD");
Skin *skin = _settings.CurrentSkin();
Gdiplus::Bitmap *bg = skin->OSDBgImg("eject");
_mWnd->BackgroundIm... | #include "EjectOSD.h"
#include <Dbt.h>
#include "..\Monitor.h"
#include "..\Skin.h"
EjectOSD::EjectOSD() :
OSD(L"3RVX-EjectDispatcher") {
_mWnd = new MeterWnd(L"3RVX-EjectOSD", L"3RVX-EjectOSD");
Skin *skin = _settings.CurrentSkin();
if (skin->HasOSD("eject") == false) {
return;
}
Gdip... | Make sure skin has OSD before initializing it | Make sure skin has OSD before initializing it
| C++ | bsd-2-clause | Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX,Soulflare3/3RVX |
0685f73e9b29b58a2083ac02100753b8e14dc39f | tests/dbus/do-nothing.cpp | tests/dbus/do-nothing.cpp | #include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QTimer>
#include <QtDBus/QtDBus>
#include <QtTest/QtTest>
#include <tests/lib/test.h>
class TestDoNothing : public Test
{
Q_OBJECT
public:
TestDoNothing(QObject *parent = 0)
: Test(parent)
{ }
private slots:
void ... | #include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
#include <QtCore/QTimer>
#include <QtDBus/QtDBus>
#include <QtTest/QtTest>
#include <tests/lib/test.h>
class TestDoNothing : public Test
{
Q_OBJECT
public:
TestDoNothing(QObject *parent = 0)
: Test(parent)
{ }
private Q_SLOTS:
voi... | Fix build error, forgot to replace a "slots" to "Q_SLOTS" | Fix build error, forgot to replace a "slots" to "Q_SLOTS"
| C++ | lgpl-2.1 | tiagosh/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt,detrout/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt4,tiagosh/telepathy-qt,TelepathyQt/telepathy-qt,special/telepathy-qt-upstream,TelepathyQt/telepathy-qt,freedesktop-unofficial-mirror/telepathy__telepathy-qt,TelepathyIM/te... |
f73cf9884bbb2b75b0ed402e4391bcce4dd6fb9c | courgette/crc.cc | courgette/crc.cc | // Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Calculate Crc by calling CRC method in LZMA SDK
#include "courgette/crc.h"
extern "C" {
#include "third_party/lzma_sdk/7zCrc.h"
}
namespace cour... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "courgette/crc.h"
#ifdef COURGETTE_USE_CRC_LIB
# include "zlib.h"
#else
extern "C" {
# include "third_party/lzma_sdk/7zCrc.h"
}
#endif
#i... | Use a different define to decide which CRC library to use. | Use a different define to decide which CRC library to use.
Change 8569018 used a #ifdef to conditionally decide which external
library to use for Crc calculation. It used OS_CHROMIUMOS to tell
if the build was targetted at Chromium OS.
However, it broke Chromium OS builds of the full Chromium tree in
some cases (heap... | C++ | bsd-3-clause | Chilledheart/chromium,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,markYoungH/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrom... |
a9113f7765946e32e5bd1098cc56c17accde8a60 | test/Modules/pr28438.cpp | test/Modules/pr28438.cpp | // RUN: rm -rf %t
// RUN: %clang_cc1 -fsyntax-only -verify %s -fmodules -fmodules-cache-path=%t -I%S/Inputs/PR28438 -fimplicit-module-maps
#include "a.h"
#include "b2.h"
#pragma clang __debug macro FOO
FOO // xpected-no-diagnostics
| // RUN: rm -rf %t
// RUN: %clang_cc1 -fsyntax-only -verify %s -fmodules -fmodules-cache-path=%t -I%S/Inputs/PR28438 -fimplicit-module-maps
#include "a.h"
#include "b2.h"
FOO // expected-no-diagnostics
| Remove debugging aids from this test and fix its expectations. | Remove debugging aids from this test and fix its expectations.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@279034 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... |
c3b58d78a7e3b31079d72983da31fa8d3a0dc155 | ImageReconstruction/main.cpp | ImageReconstruction/main.cpp | /**
* @copyright Copyright 2017 The J-PET Framework 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 find a copy of the License in the LICENCE file.
*
* Unless required by applicable law... | /**
* @copyright Copyright 2017 The J-PET Framework 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 find a copy of the License in the LICENCE file.
*
* Unless required by applicable law... | Fix class name for SinogramCreatorMC | Fix class name for SinogramCreatorMC
| C++ | apache-2.0 | JPETTomography/j-pet-framework-examples,JPETTomography/j-pet-framework-examples,JPETTomography/j-pet-framework-examples,JPETTomography/j-pet-framework-examples |
f0c7295d272f383e04b4f418385106269683cb2a | test/fuzz/fuzzer.cc | test/fuzz/fuzzer.cc | #include <string.h>
#include "tree_sitter/runtime.h"
void test_log(void *payload, TSLogType type, const char *string) { }
TSLogger logger = {
.log = test_log,
};
extern "C" const TSLanguage *TS_LANG();
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
const char *str = reinterpret_cast<c... | #include <string.h>
#include "tree_sitter/runtime.h"
void test_log(void *payload, TSLogType type, const char *string) { }
TSLogger logger = {
.log = test_log,
};
extern "C" const TSLanguage *TS_LANG();
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
const char *str = reinterpret_cast<c... | Update fuzz driver to use new API | Update fuzz driver to use new API
| C++ | mit | tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter |
d40a92f3ad086b71d0df4bca5a2d615c8b8cb380 | Podrios.cpp | Podrios.cpp | /*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Show Message." << endl;
return 0;
}
| /*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
cout << "Show Message." << endl;
system("pause");
return 0;
} | Add system command for holding command console | Add system command for holding command console
| C++ | apache-2.0 | NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP |
a81874a595aad2fa955342e3c8e47ba5cbf0e441 | ui/base/ui_base_switches_util.cc | ui/base/ui_base_switches_util.cc | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/base/ui_base_switches_util.h"
#include "base/command_line.h"
#include "ui/base/ui_base_switches.h"
namespace switches {
bool IsTouchDr... | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/base/ui_base_switches_util.h"
#include "base/command_line.h"
#include "ui/base/ui_base_switches.h"
namespace switches {
bool IsTouchDr... | Enable the new dialog style by default; etc. | Enable the new dialog style by default; etc.
Enables the new dialog and button styles by default.
Please file any appearance/behavior issues against msw/wittman.
(disable: about:flags "New Dialog Style" or --disable-new-dialog-style)
Mike Wittman and I are mid-audit of Win/CrOS dialogs, expect some glitches:
- Some d... | C++ | bsd-3-clause | krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,hgl888/chromi... |
00b0cc5cc0df855a4bde40f674f9c6ac5d60d7d4 | test/correctness/chunk.cpp | test/correctness/chunk.cpp | #include <stdio.h>
#include <Halide.h>
using namespace Halide;
int main(int argc, char **argv) {
Var x, y;
Var xo, xi, yo, yi;
Func f, g;
printf("Defining function...\n");
f(x, y) = cast<float>(x);
g(x, y) = f(x+1, y) + f(x-1, y);
Target target = get_jit_target_from_environment();
... | #include <stdio.h>
#include <Halide.h>
using namespace Halide;
int main(int argc, char **argv) {
Var x, y;
Var xo, xi, yo, yi;
Func f, g;
printf("Defining function...\n");
f(x, y) = cast<float>(x);
g(x, y) = f(x+1, y) + f(x-1, y);
Target target = get_jit_target_from_environment();
... | Disable shared memory test for OpenCL until bugginess is resolved. | Disable shared memory test for OpenCL until bugginess is resolved.
Former-commit-id: a9b27252698ffb23d91dd013ca3470237f2b3f69 | C++ | mit | darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide |
86b112bfa96f8e2b1771f708c3f4aabc4a0b1e94 | libeve-api-proxy/source/Error.cpp | libeve-api-proxy/source/Error.cpp | #include "Precompiled.hpp"
#include "Error.hpp"
#include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
}
#ifdef _WIN32
std::string win_error_string(int... | #include "Precompiled.hpp"
#include "Error.hpp"
#include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
#ifdef _WIN32
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
#else
return strerror_r(err, buf... | Use strerror_r instead of strerror_s for GCC/Linux | Use strerror_r instead of strerror_s for GCC/Linux
| C++ | mit | SyncViews/eve-api-proxy |
cfc7ce9af0abfb908d4a0fb8c49060ef04935f9f | src/apps/possumwood/properties.cpp | src/apps/possumwood/properties.cpp | #include "properties.h"
#include <QHeaderView>
Properties::Properties(QWidget* parent) : QTreeWidget(parent) {
setRootIsDecorated(false);
headerItem()->setText(0, "item");
headerItem()->setText(1, "value");
headerItem()->setFirstColumnSpanned(false);
header()->setStretchLastSection(true);
}
void Properties::sh... | #include "properties.h"
#include <QHeaderView>
Properties::Properties(QWidget* parent) : QTreeWidget(parent) {
setRootIsDecorated(false);
headerItem()->setText(0, "item");
headerItem()->setText(1, "value");
headerItem()->setFirstColumnSpanned(false);
header()->setStretchLastSection(true);
}
void Properties::sh... | Add an item per port of each selected node | Add an item per port of each selected node
| C++ | mit | martin-pr/possumwood,martin-pr/possumwood,martin-pr/possumwood,martin-pr/possumwood |
fcc8f763c1cd486da1a80176996a342245288d35 | src/libstate/engine/openssl/eng_ossl.cpp | src/libstate/engine/openssl/eng_ossl.cpp |
#include <openssl/eng_ossl.h>
/**
* Look for an OpenSSL-suported stream cipher (ARC4)
*/
StreamCipher*
OpenSSL_Engine::find_stream_cipher(const std::string& algo_spec) const
{
SCAN_Name request(algo_spec);
if(request.algo_name() == "ARC4")
return new ARC4_OpenSSL(request.argument_as_u32bit(0, 0));
... | /**
OpenSSL Engine
(C) 2008 Jack Lloyd
*/
#include <botan/eng_ossl.h>
namespace Botan {
/**
* Look for an OpenSSL-suported stream cipher (ARC4)
*/
StreamCipher*
OpenSSL_Engine::find_stream_cipher(const std::string& algo_spec) const
{
SCAN_Name request(algo_spec);
if(request.algo_name() == "ARC4")
ret... | Fix include, add namespace and copyright | Fix include, add namespace and copyright
| C++ | bsd-2-clause | Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randomb... |
8e56cd17bc6d04ce4a1f08418d00c65e28160cd3 | test/CodeGenCXX/debug-info-namespace.cpp | test/CodeGenCXX/debug-info-namespace.cpp | // RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
namespace A {
int i;
}
// CHECK: [[FILE:![0-9]*]] = {{.*}} ; [ DW_TAG_file_type ] [{{.*}}/test/CodeGenCXX/debug-info-namespace.cpp]
// CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_variable ] [i]
// CHECK: [[NS]] = {{... | // RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
namespace A {
#line 1 "foo.cpp"
namespace B {
int i;
}
}
// CHECK: [[FILE:![0-9]*]] = {{.*}} ; [ DW_TAG_file_type ] [{{.*}}/test/CodeGenCXX/debug-info-namespace.cpp]
// CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_va... | Enhance debug info namespace test to check for context/scope reference | Enhance debug info namespace test to check for context/scope reference
The #line directive is mostly for backend testing (keeping these files matching
should simplify maintenance somewhat) though the corresponding backend test
improvement/update doesn't verify the file information directly just yet.
Coming in a later ... | C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... |
fe7c534cd655120e97445d13aea6ece67a080af8 | bono/native/util.glfw.cpp | bono/native/util.glfw.cpp | #include <ctime>
class util {
public:
int static GetTimestamp() {
return std::time(0);
}
void static OpenUrl(String url) {
system("open " + url);
}
};
| #include <ctime>
class util {
public:
int static GetTimestamp() {
return std::time(0);
}
void static OpenUrl(const String url) {
String cmd("open ");
cmd += url;
system(cmd.ToCString<char>());
}
};
| Fix the native part of Util.OpenUrl | GLFW: Fix the native part of Util.OpenUrl
| C++ | apache-2.0 | michaelcontento/bono,michaelcontento/bono,michaelcontento/bono |
96119e22495c85b194d2a3020d50601312bd9a96 | main.cpp | main.cpp | #include "main.h"
#include "EventHandler.h"
#include "PythonModule.h"
extern "C" EXPORT unsigned int VcmpPluginInit(PluginFuncs* pluginFunctions, PluginCallbacks* pluginCallbacks, PluginInfo* pluginInfo)
{
pluginInfo->pluginVersion = 0x103;
pluginInfo->apiMajorVersion = PLUGIN_API_MAJOR;
pluginInfo->apiMinorVersion... | #include "main.h"
#include "EventHandler.h"
#include "PythonModule.h"
extern "C" EXPORT uint32_t VcmpPluginInit(PluginFuncs* pluginFunctions, PluginCallbacks* pluginCallbacks, PluginInfo* pluginInfo)
{
pluginInfo->pluginVersion = 0x103;
pluginInfo->apiMajorVersion = PLUGIN_API_MAJOR;
pluginInfo->apiMinorVersion = P... | Use uint32_t as return type. | Use uint32_t as return type.
| C++ | mit | ysc3839/vcmp-python-plugin,ysc3839/vcmp-python-plugin,ysc3839/vcmp-python-plugin |
b6c95361843cea1a16e6a1287ce247987b668b2b | main.cpp | main.cpp | #include "task_simple.h"
#include "factory_simple.h"
#include "on_tick_simple.h"
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
TaskListSimple task_list{task_stream,... | #include "task_simple.h"
#include "factory_simple.h"
#include "on_tick_simple.h"
#include <fstream>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
if ( !task_stream... | Break if task file don`t exists | Break if task file don`t exists
| C++ | mit | dvetutnev/Ecwid-Console-downloader |
cda9aedfd57db478287b6ee5625bacbb1eebd01d | main.cpp | main.cpp | //
// main.cpp
//
// Created on: 17 Mar 2015
// Author: Guotai Wang
//
// Copyright (c) 2014-2016 University College London, United Kingdom. All rights reserved.
// http://cmictig.cs.ucl.ac.uk
//
// Distributed under the BSD-3 licence. Please see the file licence.txt
//
#include <fstream>
#include <iostream>
#in... | //
// main.cpp
//
// Created on: 17 Mar 2015
// Author: Guotai Wang
//
// Copyright (c) 2014-2016 University College London, United Kingdom. All rights reserved.
// http://cmictig.cs.ucl.ac.uk
//
// Distributed under the BSD-3 licence. Please see the file licence.txt
//
#include <fstream>
#include <iostream>
#in... | Change return value to EXIT_SUCCESS | Change return value to EXIT_SUCCESS
| C++ | bsd-3-clause | gift-surg/DyBaORF |
451190e6356a50c903989eb2e4549d470958a631 | deal.II/base/source/job_identifier.cc | deal.II/base/source/job_identifier.cc | //---------------------------- job_identifier.cc ---------------------------
// $Id$
// Version: $Name$
//
// Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// to ... | //---------------------------- job_identifier.cc ---------------------------
// $Id$
// Version: $Name$
//
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// ... | Use preprocessor 'defined' instead of relying on the preprocessor doing this automatically. | Use preprocessor 'defined' instead of relying on the preprocessor doing this automatically.
git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@6971 0785d39b-7218-0410-832d-ea1e28bc413d
| C++ | lgpl-2.1 | mac-a/dealii,pesser/dealii,msteigemann/dealii,flow123d/dealii,nicolacavallini/dealii,ESeNonFossiIo/dealii,YongYang86/dealii,sairajat/dealii,sriharisundar/dealii,gpitton/dealii,lue/dealii,Arezou-gh/dealii,adamkosik/dealii,sriharisundar/dealii,spco/dealii,mtezzele/dealii,mtezzele/dealii,maieneuro/dealii,flow123d/dealii,m... |
fe4beb01974c8a57baaa957e7d1f4b5bd9ed3b63 | common/engine/keyboardprocessor/src/keyboard.cpp | common/engine/keyboardprocessor/src/keyboard.cpp | /*
Copyright: © 2018 SIL International.
Description: Internal keyboard class and adaptor class for the API.
Create Date: 2 Oct 2018
Authors: Tim Eves (TSE)
History: 7 Oct 2018 - TSE - Refactored out of km_kbp_keyboard_api.cpp
*/
#include "keyboard.hpp"
#include "json.hpp"
using namespace km::... | /*
Copyright: © 2018 SIL International.
Description: Internal keyboard class and adaptor class for the API.
Create Date: 2 Oct 2018
Authors: Tim Eves (TSE)
History: 7 Oct 2018 - TSE - Refactored out of km_kbp_keyboard_api.cpp
*/
#include "keyboard.hpp"
#include "json.hpp"
using namespace km::... | Make sure to convert path to utf8 for json output of folder name. | Make sure to convert path to utf8 for json output of folder name.
| C++ | apache-2.0 | tavultesoft/keymanweb,tavultesoft/keymanweb |
bb86f3dc0d9a5eae7641cbc0f6006775bf7f4466 | agent/src/main.cpp | agent/src/main.cpp | #include <iostream>
#include <boost/log/common.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/trivial.hpp>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
namespace expr = boost::log::expressions;
namespace keywords = boost::log::keywords;
int
main(int argc... | #include <iostream>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/log/common.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/support/date_time.hpp>
#include <boost/log/utility/setup/common_attributes.... | Add timestamp field to agent logs | Add timestamp field to agent logs
| C++ | mit | chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/pat-lms |
dd256f242b6b53cd19dcacc6d4edef4759bad407 | MultidropBusProtocol/examples/simple/slave_node/main.cpp | MultidropBusProtocol/examples/simple/slave_node/main.cpp | /*----------------------------------------*/
// Test receiving messages from master
//
// This receives a message from master (command 0x01),
// which tells it to turn an LED on or off.
//
/*----------------------------------------*/
#include <stdint.h>
#include "MultidropSlave.h"
#include "MultidropDataUart.h"
#def... | /*----------------------------------------*/
// Test receiving messages from master
//
// This receives a message from master (command 0x01),
// which tells it to turn an LED on or off.
//
/*----------------------------------------*/
#include <stdint.h>
#include "MultidropSlave.h"
#include "MultidropDataUart.h"
#def... | Add NODE_ADDRESS value to slave_node program | Add NODE_ADDRESS value to slave_node program
| C++ | mit | jgillick/AVR-Libs,jgillick/AVR-Libs |
ece9c835d59afe10c6cfae7aaf31f6e2715d9e4e | src/Watermark/View/WatermarkDataFactory.cpp | src/Watermark/View/WatermarkDataFactory.cpp | // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#include "WatermarkDataFactory.h"
namespace ExampleApp
{
namespace Watermark
{
namespace View
{
WatermarkDataFactory::WatermarkDataFactory(const std::string& appName,
con... | // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
#include "WatermarkDataFactory.h"
namespace ExampleApp
{
namespace Watermark
{
namespace View
{
WatermarkDataFactory::WatermarkDataFactory(const std::string& appName,
con... | Fix for generation of QR code when google analytics referrer token is unset. Buddy: Jonty | [MPLY-8929] Fix for generation of QR code when google analytics referrer token is unset. Buddy: Jonty
| C++ | bsd-2-clause | wrld3d/wrld-example-app,eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/w... |
20fedd66ce7a5013266f8e5c69d540d4f502e6ad | apps/pe/main.cpp | apps/pe/main.cpp | #include <iostream>
using std::cout;
using std::endl;
#include "problems/Factory.h"
#include "util/Timer.h"
using util::Timer;
int main(int argc, char **argv) {
auto problem = problems::Factory::create(1);
Timer t;
t.start();
for (int i = 0; i < 1000000; ++i)
problem->solve();
t.stop();
cout << pr... | #include <iostream>
using std::cout;
using std::endl;
#include "problems/Factory.h"
#include "util/Timer.h"
using util::Timer;
int main(int argc, char **argv) {
auto problem = problems::Factory::create(1);
Timer t;
t.start();
problem->solve();
t.stop();
cout << problem->answer() << endl;
cout << "Ti... | Make apps/pe only run a problem once | Make apps/pe only run a problem once
| C++ | mit | wtmitchell/challenge_problems,wtmitchell/challenge_problems,wtmitchell/challenge_problems |
adc4bfbb6b3ba013104bfdd6408e5a1c7ae61b85 | src/main.cc | src/main.cc | #include <iostream>
#include "cons.h"
#include "error.h"
#include "eval.h"
#include "init.h"
#include "load.h"
#include "reader.h"
#include "utils.h"
namespace
{
class Repl
{
std::istream& in_;
std::ostream& out_;
std::string prompt_ = "mclisp> ";
mclisp::Reader reader_;
public:
explicit Repl(std::ist... | #include <iostream>
#include "cons.h"
#include "error.h"
#include "eval.h"
#include "init.h"
#include "load.h"
#include "reader.h"
#include "utils.h"
namespace
{
class Repl
{
std::istream& in_;
std::ostream& out_;
std::string prompt_ = "mclisp> ";
mclisp::Reader reader_;
public:
explicit Repl(std::ist... | Print REPL output on std::cerr instead of cout. | Print REPL output on std::cerr instead of cout.
| C++ | mit | appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp |
e352a60b3b0ea4d540eef8e11b2a348dd7fce44c | src/http/requestparser.cpp | src/http/requestparser.cpp | #include "RequestParser.h"
#include <sstream>
#include <vector>
std::vector<std::string> ApiMock::RequestParser::projectToCollection(std::string const& request) {
std::vector<std::string> fromRequest;
std::string::size_type pos = 0;
std::string::size_type prev = 0;
while ((pos = request.find('\n', prev)) != std::... | #include "RequestParser.h"
#include <sstream>
#include <vector>
std::vector<std::string> ApiMock::RequestParser::projectToCollection(std::string const& request) {
const std::string CRLF = "\r\n";
std::vector<std::string> fromRequest;
std::string::size_type pos = 0;
std::string::size_type prev = 0;
while ((pos = ... | Use CRLF in requests instead of just LF | Use CRLF in requests instead of just LF
| C++ | mit | Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock |
2ece4a3755dcfbcaae7eee1aa3835f9585e3025b | src/detail/NonRandomData.cpp | src/detail/NonRandomData.cpp | #include <iostream>
#include "rapidcheck/detail/NonRandomData.h"
namespace rc {
RandomData::RandomData(const uint8_t *Data, size_t Size) {
std::cout << Data << std::endl;
// TODO: really stupid way to fill the container
const size_t size64 = Size / 8;
auto Data64 = reinterpret_cast<const uint64_t *>(Data);
... | #include <iostream>
#include "rapidcheck/detail/NonRandomData.h"
namespace rc {
RandomData::RandomData(const uint8_t *Data, size_t Size) {
// TODO: really stupid way to fill the container
const size_t size64 = Size / 8;
auto Data64 = reinterpret_cast<const uint64_t *>(Data);
for (size_t i = 0; i < size64; i++... | Address Sanitation for the win: found memory bug. | Address Sanitation for the win: found memory bug.
| C++ | bsd-2-clause | unapiedra/rapidfuzz,unapiedra/rapidfuzz,unapiedra/rapidfuzz |
c18a5a96ad1b645f0f6e801b32c887e25987249c | MirrorServer/main.cpp | MirrorServer/main.cpp | #include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
| #include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv) {
VideoCapture cap(0);
namedWindow("MyVideo", CV_WINDOW_AUTOSIZE);
int w = cap.get(CV_CAP_PROP_FRAME... | Add basic thresholding of green markers | Add basic thresholding of green markers
| C++ | mit | thijser/ARGAME,thijser/ARGAME,thijser/ARGAME |
f52a9bf79e8480c3d00607cffeb9ac94dccf1aca | examples/gpio_extint_pin_change.cpp | examples/gpio_extint_pin_change.cpp | #include "board.h"
#include <aery32/gpio.h>
#include <aery32/delay.h>
#include <aery32/intc.h>
using namespace aery;
void isrhandler_group2(void)
{
gpio_toggle_pin(LED);
delay_ms(100); /* Reduce glitch */
porta->ifrc = (1 << 0); /* Remember to clear the interrupt */
}
int main(void)
{
init_board();
/* GPIO pin... | #include "board.h"
#include <aery32/gpio.h>
#include <aery32/delay.h>
#include <aery32/intc.h>
using namespace aery;
void isrhandler_group2(void)
{
gpio_toggle_pin(LED);
delay_ms(100); /* Reduce glitches */
porta->ifrc = (1 << 0); /* Remember to clear the interrupt */
}
int main(void)
{
init_board();
/* GPIO p... | Improve comments in the external interrupt pin change example | Improve comments in the external interrupt pin change example
| C++ | bsd-3-clause | aery32/aery32,denravonska/aery32,aery32/aery32,denravonska/aery32 |
763b8dcb1339e6fd4cbb589de53843e35413bb14 | Sources/Rosetta/Tasks/SimpleTasks/ControlTask.cpp | Sources/Rosetta/Tasks/SimpleTasks/ControlTask.cpp | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Tasks/SimpleTasks/ControlTask.hpp>
#include ... | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Tasks/SimpleTasks/ControlTask.hpp>
#include ... | Add missing code that assigns new owner | fix: Add missing code that assigns new owner
| C++ | mit | Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp |
b47195e8f3aa47e51050d28c9a3e499dcbcaa01e | src/Homie/Boot/Boot.cpp | src/Homie/Boot/Boot.cpp | #include "Boot.hpp"
using namespace HomieInternals;
Boot::Boot(const char* name)
: _name(name) {
}
void Boot::setup() {
if (Interface::get().led.enabled) {
pinMode(Interface::get().led.pin, OUTPUT);
digitalWrite(Interface::get().led.pin, !Interface::get().led.on);
}
WiFi.persistent(true); // Persist... | #include "Boot.hpp"
using namespace HomieInternals;
Boot::Boot(const char* name)
: _name(name) {
}
void Boot::setup() {
if (Interface::get().led.enabled) {
pinMode(Interface::get().led.pin, OUTPUT);
digitalWrite(Interface::get().led.pin, !Interface::get().led.on);
}
WiFi.persistent(true); // Persist... | Print firmware name and version at boot | :art: Print firmware name and version at boot
| C++ | mit | marvinroger/homie-esp8266,marvinroger/homie-esp8266,euphi/homie-esp8266,euphi/homie-esp8266,euphi/homie-esp8266,euphi/homie-esp8266,marvinroger/homie-esp8266,marvinroger/homie-esp8266 |
38a0ac9a933dac0c15e35cf03e12cb6499809985 | 108.cpp | 108.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* sortedArrayToBST(vector<int>& nums) {
if(nums.size()==0) return NULL;
... | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* sortedArrayToBST(vector<int>& nums) {
if(nums.size()==0) return NULL;
... | Convert Sorted Array to Binary Search Tree | Convert Sorted Array to Binary Search Tree | C++ | mit | zfang399/LeetCode-Problems |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.