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 |
|---|---|---|---|---|---|---|---|---|---|
601374aefb949467431fb137ad2ce0a3d508e84e | modules/common/time/time_test.cc | modules/common/time/time_test.cc | /******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
... | /******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
... | Test SetNow in nano seconds. | Common: Test SetNow in nano seconds.
| C++ | apache-2.0 | ycool/apollo,ApolloAuto/apollo,jinghaomiao/apollo,ycool/apollo,jinghaomiao/apollo,ycool/apollo,xiaoxq/apollo,xiaoxq/apollo,jinghaomiao/apollo,xiaoxq/apollo,xiaoxq/apollo,jinghaomiao/apollo,ycool/apollo,jinghaomiao/apollo,ApolloAuto/apollo,ApolloAuto/apollo,ycool/apollo,xiaoxq/apollo,ApolloAuto/apollo,xiaoxq/apollo,Apol... |
6b6bd10d3025b978b8c345926db4b84cd916dee3 | test/CodeGenCXX/debug-info-method.cpp | test/CodeGenCXX/debug-info-method.cpp | // RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o - | FileCheck %s
// CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}}, i32 258
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
union {
int a;
float b;
} u;
class A {
protected:
void foo(int, A, decltype... | // RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o - | FileCheck %s
// CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}} [protected]
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
// CHECK: ""{{.*}}DW_TAG_arg_variable
union {
int a;
float b;
} u;
class A {
protected:
void foo(int, A, declt... | Make checking for 'protected' access in debug info more legible. | Make checking for 'protected' access in debug info more legible.
Based on code review feedback for r171604 from Chandler Carruth &
Eric Christopher. Enabled by improvements to LLVM made in r171636.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@171637 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
35885152f286724e64daac8ade93889cb56a1067 | Modules/VtkShaders/mitkVtkShaderProgram.cpp | Modules/VtkShaders/mitkVtkShaderProgram.cpp | /*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... | /*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... | Initialize shader program member to with NULL. | Initialize shader program member to with NULL.
| C++ | bsd-3-clause | MITK/MITK,MITK/MITK,fmilano/mitk,RabadanLab/MITKats,RabadanLab/MITKats,MITK/MITK,lsanzdiaz/MITK-BiiG,RabadanLab/MITKats,fmilano/mitk,lsanzdiaz/MITK-BiiG,NifTK/MITK,iwegner/MITK,danielknorr/MITK,lsanzdiaz/MITK-BiiG,NifTK/MITK,lsanzdiaz/MITK-BiiG,lsanzdiaz/MITK-BiiG,danielknorr/MITK,fmilano/mitk,danielknorr/MITK,RabadanL... |
f2dd96fbbc3a5bb12f4466b899fde10c9c372d34 | modules/sksg/src/SkSGImage.cpp | modules/sksg/src/SkSGImage.cpp | /*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkSGImage.h"
#include "SkCanvas.h"
#include "SkImage.h"
namespace sksg {
Image::Image(sk_sp<SkImage> image) : fImage(std::move(image)) {}
void Image::onRender(Sk... | /*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkSGImage.h"
#include "SkCanvas.h"
#include "SkImage.h"
namespace sksg {
Image::Image(sk_sp<SkImage> image) : fImage(std::move(image)) {}
void Image::onRender(Sk... | Fix image filter quality handling | [sksg] Fix image filter quality handling
TBR=
Change-Id: I06bd30650f1a9d70225b3e3374313f672dae3a8d
Reviewed-on: https://skia-review.googlesource.com/144343
Reviewed-by: Florin Malita <a8262bf13ea8c26821e91ea9bca6740a77c96dcd@chromium.org>
Commit-Queue: Florin Malita <a8262bf13ea8c26821e91ea9bca6740a77c96dcd@chromium.... | C++ | bsd-3-clause | Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mir... |
4e62268d1ca28c5dee8ffad345e1ce4dec9811e3 | document.cpp | document.cpp | #include "document.hpp"
Document::Document(const std::string & filename) : _filename(filename) {}
Document::~Document() {}
std::string Document::filename(void) const {
return _filename;
}
void Document::append_paragraph(Paragraph * p) {
_paragraph.push_back(p);
}
size_t Document::size(void) const {
return _para... | #include "document.hpp"
Document::Document(const std::string & filename) : _filename(filename) {}
Document::~Document() {}
std::string Document::filename(void) const {
return _filename;
}
void Document::append_paragraph(Paragraph * p) {
if (p and p->size()) {
_paragraph.push_back(p);
}
}
size_t Document::size... | Check the paragraph for its existence and size | Check the paragraph for its existence and size
| C++ | mit | dopsi/mdl |
1610d430bead10168bc2c16fea5883463470481a | lib/CodeGen/GCMetadataPrinter.cpp | lib/CodeGen/GCMetadataPrinter.cpp | //===-- GCMetadataPrinter.cpp - Garbage collection infrastructure ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- GCMetadataPrinter.cpp - Garbage collection infrastructure ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Remove pointless forward declaration, MSVC got confused by this. | Remove pointless forward declaration, MSVC got confused by this.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98519 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,G... |
9d3c1dbe68798d32327b0a910c9c3921d90a790d | examples/cc110x/receiver.cpp | examples/cc110x/receiver.cpp | #include "common.h"
uint8_t packet[64];
int main(void)
{
DCO::init();
ACLK::init();
SMCLK::init();
MCLK::init();
WDT::init();
WDT::enable_irq();
PORT1::init();
PORT2::init();
LED_RED::set_high();
#ifndef __MSP430_HAS_USCI__
TIMER::init();
#endif
UART::init();
printf<UART>("CC110X example start.\n");
SP... | #include "common.h"
uint8_t packet[64];
int main(void)
{
DCO::init();
ACLK::init();
SMCLK::init();
MCLK::init();
WDT::init();
WDT::enable_irq();
PORT1::init();
PORT2::init();
LED_RED::set_high();
#ifndef __MSP430_HAS_USCI__
TIMER::init();
#endif
UART::init();
printf<UART>("CC110X example start.\n");
SP... | Fix CC1101 example to start RX and use timeouts | Fix CC1101 example to start RX and use timeouts
| C++ | mit | ekoeppen/msp430-template-library,ekoeppen/msp430-template-library |
a7e6bad1cd55a6cedce00da371065bea2d952a72 | src/libraries/StateMachineLib/YarpStateDirector.cpp | src/libraries/StateMachineLib/YarpStateDirector.cpp | #include "YarpStateDirector.hpp"
const int rd::YarpStateDirector::DEFAULT_RATE_MS = 100;
rd::YarpStateDirector::YarpStateDirector(rd::State *state) : StateDirector(state), RateThread(DEFAULT_RATE_MS)
{
}
bool rd::YarpStateDirector::Start()
{
RD_DEBUG("Starting StateDirector for id %s\n", state->getStateId().c_... | #include "YarpStateDirector.hpp"
const int rd::YarpStateDirector::DEFAULT_RATE_MS = 100;
rd::YarpStateDirector::YarpStateDirector(rd::State *state) : StateDirector(state), RateThread(DEFAULT_RATE_MS)
{
}
bool rd::YarpStateDirector::Start()
{
RD_DEBUG("Starting StateDirector for id %s\n", state->getStateId().c_... | Check loop return value to stop the FSM if false | Check loop return value to stop the FSM if false
| C++ | lgpl-2.1 | asrob-uc3m/robotDevastation,asrob-uc3m/robotDevastation |
f8b23ceb948bcfd0b16ca4d556271465f486190d | webkit/port/plugins/chromium/PluginDataChromium.cpp | webkit/port/plugins/chromium/PluginDataChromium.cpp | // Copyright (c) 2008 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 "config.h"
#include "PluginData.h"
#include "PluginInfoStore.h"
#undef LOG
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webkit... | // Copyright (c) 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of condi... | Fix plugin data refreshing to work again. | Fix plugin data refreshing to work again.
R=ojan
Review URL: http://codereview.chromium.org/9767
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@5216 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,yitian1... |
11227eb1a760612ff7e6aa4ebc159bea5490aae0 | runtime/Updater/Daemon.cpp | runtime/Updater/Daemon.cpp | #include <cstdio>
#include <cstdlib>
#include <signal.h>
#include <unistd.h>
#include "Updater.h"
static int DaemonPID = -1;
int RunDaemon(void *Arg) {
while (1) {
printf("daemon is running...\n");
sleep(1);
}
return 0;
}
int StartDaemon() {
static const int ChildStackSize = 1024 * 1024;
char *Child... | #include <cstdio>
#include <cstdlib>
#include <signal.h>
#include <unistd.h>
#include <sys/prctl.h>
#include "Updater.h"
static int DaemonPID = -1;
int RunDaemon(void *Arg) {
if (prctl(PR_SET_NAME, "loom-daemon", 0, 0, 0) == -1) {
perror("prctl");
}
while (1) {
fprintf(stderr, "daemon is running...\n")... | Change the process name to loom-daemon | Change the process name to loom-daemon
| C++ | bsd-3-clause | wujingyue/loom,wujingyue/loom,wujingyue/loom |
3ec82f3291aceae9b4219f31311691092463741b | src/backend/concurrency/transaction_manager_factory.cpp | src/backend/concurrency/transaction_manager_factory.cpp | //===----------------------------------------------------------------------===//
//
// Peloton
//
// transaction_manager_factory.h
//
// Identification: src/backend/concurrency/transaction_manager_factory.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===----------... | //===----------------------------------------------------------------------===//
//
// Peloton
//
// transaction_manager_factory.h
//
// Identification: src/backend/concurrency/transaction_manager_factory.h
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===----------... | Change default txn manager to occ | Change default txn manager to occ
| C++ | apache-2.0 | amaliujia/CMUDB-peloton,amaliujia/CMUDB-peloton,ranxian/peloton,amaliujia/CMUDB-peloton,larryxiao/peloton,larryxiao/peloton,ranxian/peloton,larryxiao/peloton,amaliujia/CMUDB-peloton,larryxiao/peloton,larryxiao/peloton,amaliujia/CMUDB-peloton,amaliujia/CMUDB-peloton,ranxian/peloton,amaliujia/CMUDB-peloton,ranxian/peloto... |
9a287fd661bcd7ade1753a5fb8b171408fb9ec08 | src/platform/posix.cpp | src/platform/posix.cpp | #include "platform.hpp"
#ifndef WIN32
namespace Mirb
{
namespace Platform
{
std::string BenchmarkResult::format()
{
std::stringstream result;
result << ((double)time / 1000) << " ms";
return result.str();
}
void *allocate_region(size_t bytes)
{
void *result = mmap(0, bytes, PROT_READ | PROT... | #include "platform.hpp"
#include "../collector.hpp"
#include <signal.h>
#ifndef WIN32
namespace Mirb
{
namespace Platform
{
std::string BenchmarkResult::format()
{
std::stringstream result;
result << ((double)time / 1000) << " ms";
return result.str();
}
void *allocate_region(size_t bytes)
{
... | Interrupt signal handler for POSIX. | Interrupt signal handler for POSIX.
| C++ | bsd-3-clause | Zoxc/mirb,Zoxc/mirb |
4653d37a3bbbd1bec02b18f712df271e343cce88 | tensorflow/compiler/xla/tests/xla_internal_test_main.cc | tensorflow/compiler/xla/tests/xla_internal_test_main.cc | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Change type to appease GPU builds. | [XLA] Change type to appease GPU builds.
PiperOrigin-RevId: 163384927
| C++ | apache-2.0 | freedomtan/tensorflow,annarev/tensorflow,Mazecreator/tensorflow,jostep/tensorflow,nburn42/tensorflow,Bismarrck/tensorflow,zasdfgbnm/tensorflow,davidzchen/tensorflow,tornadozou/tensorflow,arborh/tensorflow,meteorcloudy/tensorflow,with-git/tensorflow,ychfan/tensorflow,petewarden/tensorflow,karllessard/tensorflow,raymondx... |
4913ea46f359587488aacc010147a2fbf3a67db7 | test/value_shell_copy_ctor.cpp | test/value_shell_copy_ctor.cpp | /*
* This file is part of Peli - universal JSON interaction library
* Copyright (C) 2014 Alexey Chernov <4ernov@gmail.com>
*
* Peli is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versi... | /*
* This file is part of Peli - universal JSON interaction library
* Copyright (C) 2014 Alexey Chernov <4ernov@gmail.com>
*
* Peli is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versi... | Copy constructor test minor fixes | Copy constructor test minor fixes
| C++ | apache-2.0 | aclex/peli |
723dbb96c03d92cdd7e01b9712f267f4802938e6 | test/unit/corners_test.cc | test/unit/corners_test.cc | // An empty test as a placeholder
#include "gtest/gtest.h"
#include <opencv2/core.hpp>
using namespace cv;
#include "AprilTags/Corners.h"
#include "AprilTags/TagFamily.h"
#include "AprilTags/Tag36h11.h"
using namespace AprilTags;
TEST( CornersTest, MakeTagMat ) {
const int WhichTag = 34;
const TagCodes &code( A... | // An empty test as a placeholder
#include "gtest/gtest.h"
#include <opencv2/core.hpp>
using namespace cv;
#include "AprilTags/Corners.h"
#include "AprilTags/TagFamily.h"
#include "AprilTags/Tag36h11.h"
using namespace AprilTags;
TEST( CornersTest, MakeTagMat ) {
const int WhichTag = 34;
const TagCodes &code( A... | Scale tag by 255 when saving sample image. | Scale tag by 255 when saving sample image.
| C++ | lgpl-2.1 | amarburg/apriltags,amarburg/apriltags,amarburg/apriltags,amarburg/apriltags,amarburg/apriltags |
50c859ea82a339747a8b531a21e6084bdf3b3111 | test/Parser/cxx-member-crash.cpp | test/Parser/cxx-member-crash.cpp | // RUN: %clang_cc1 -fsyntax-only %s 2>&1|FileCheck %s
// <rdar://problem/9221993>
// We only care to chek whether the compiler crashes; the actual
// diagnostics are uninteresting.
// CHECK: 8 errors generated.
template<class _CharT> struct char_traits;
template<typename _CharT, typename _Traits = char_traits<_Ch... | // RUN: %clang_cc1 -fsyntax-only %s 2>&1|FileCheck %s
// <rdar://problem/9221993>
// We only care to check whether the compiler crashes; the actual
// diagnostics are uninteresting.
// CHECK: 8 errors generated.
template<class _CharT> struct char_traits;
template<typename _CharT, typename _Traits = char_traits<_C... | Fix a typo (chek => check) | Fix a typo (chek => check)
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@183223 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
13df018d38eab02c3dba208d82a77d1739c901c0 | tasks/week3-t9/main.cpp | tasks/week3-t9/main.cpp | /*
Author: vpetrigo
Task:
0.
,
, ,
.
,
0 ( 0 , ).
.
Sample Input 1:
4
4
2
3
0
Sample Output 1:
4
Sample Input 2:
2
1
0
Sample Output 2:
1
*/
#include <iostream>
using namespace std;
int main() {
int n;
int max = -1;
int s_max = -1;
while (cin >> n... | /*
Author: vpetrigo
Task:
0.
,
, ,
.
,
0 ( 0 , ).
.
Sample Input 1:
4
4
2
3
0
Sample Output 1:
4
Sample Input 2:
2
1
0
Sample Output 2:
1
*/
#include <iostream>
using namespace std;
int main() {
int n;
int max = -1;
int s_max = -1;
while (cin >> n... | Revert "Solution for week 3, task 9" | Revert "Solution for week 3, task 9"
This reverts commit 0c5d4740962fa5deb57512e11203fbdff9bb4cb6.
| C++ | mit | vpetrigo/yandex-course |
afefe065d2446f2d53207e69995c6e7f9bc17455 | test/cagey/window/WindowTest.cc | test/cagey/window/WindowTest.cc | ////////////////////////////////////////////////////////////////////////////////
//
// cagey-engine - Toy 3D Engine
// Copyright (c) 2014 Kyle Girard <theycallmecoach@gmail.com>
//
// The MIT License (MIT)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associa... | ////////////////////////////////////////////////////////////////////////////////
//
// cagey-engine - Toy 3D Engine
// Copyright (c) 2014 Kyle Girard <theycallmecoach@gmail.com>
//
// The MIT License (MIT)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associa... | Use fancy chrono_literals with a this_thread::sleep | Use fancy chrono_literals with a this_thread::sleep
| C++ | mit | theycallmecoach/cagey-engine |
b20d2bc2a6ab8c5c6bc030d179ed98e85866813c | chrome/renderer/renderer_main_platform_delegate_linux.cc | chrome/renderer/renderer_main_platform_delegate_linux.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.
#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a sandbox ... | // 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.
#include "chrome/renderer/renderer_main_platform_delegate.h"
#include "base/debug_util.h"
// This is a no op class because we do not have a sandbox ... | Call setlocale(LC_ALL, "") in a renderer process for subsequent calls to SysNativeMBToWide and WideToSysNativeMB (that use mbstowcs and wcstombs) to work correctly. | Call setlocale(LC_ALL, "") in a renderer process for subsequent calls to
SysNativeMBToWide and WideToSysNativeMB (that use mbstowcs and wcstombs) to
work correctly.
This is a clone of http://codereview.chromium.org/155913
BUG=16860 (http://crbug.com/16860 )
TEST=Run Chrome with LC_ALL=en_US.UTF-8 and try to upload a ... | C++ | bsd-3-clause | Jonekee/chromium.src,Just-D/chromium-1,ltilve/chromium,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,zcbenz/cefode-chromium,markYoungH/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/c... |
9c3bdd9398db7a60247cd4aa27b7c63800734deb | tests/ws_echo_server.cc | tests/ws_echo_server.cc | #include <silicon/api.hh>
#include <silicon/remote_api.hh>
#include <silicon/backends/websocketpp.hh>
#include "symbols.hh"
using namespace s;
int main(int argc, char* argv[])
{
using namespace sl;
auto rclient = make_wspp_remote_api(_echo(_text));
auto server_api = make_api(_echo(_text) = [rclient] (auto p, w... | #include <silicon/api.hh>
#include <silicon/remote_api.hh>
#include <silicon/backends/websocketpp.hh>
#include "symbols.hh"
using namespace s;
int main(int argc, char* argv[])
{
using namespace sl;
auto rclient = make_wspp_remote_client(_echo(_text));
auto server_api = make_api(_echo(_text) = [rclient] (auto p... | Fix websocket echo test compilation. | Fix websocket echo test compilation.
| C++ | mit | matt-42/silicon,matt-42/silicon,byzhang/silicon,matt-42/silicon,gale320/silicon,byzhang/silicon,gale320/silicon,byzhang/silicon,gale320/silicon |
0bef14bc449bd000c5c507692f4aefdeeb860fa2 | include/dota2api/details.cpp | include/dota2api/details.cpp | #include "details.hpp"
#include "json/json.h"
dota2::DetailsRequest &dota2::DetailsRequest::id(MatchID id)
{
query.insert({"match_id", std::to_string(id)});
return *this;
}
dota2::Details::Details(const Json::Value &json)
{
matchID = json["result"]["match_id"].asInt();
startTime = timePoint(json["resu... | #include "details.hpp"
#include "json/json.h"
dota2::DetailsRequest &dota2::DetailsRequest::id(MatchID id)
{
query.insert({"match_id", std::to_string(id)});
return *this;
}
dota2::Details::Details(const Json::Value &json)
{
const auto& result = json["result"];
matchID = result["match_id"].asInt();
... | Save json lookup in variable | Save json lookup in variable
| C++ | apache-2.0 | UnrealQuester/dota2Cmd |
90a1e9340cd75b5c06acbc4a30f05cb1665b0a34 | plugin/contacts.cpp | plugin/contacts.cpp | /*
* Copyright 2011 Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*/
#include <QtDeclarative/QDeclarativeEngine>
#include <QDeclarativeContext>
#include... | /*
* Copyright 2011 Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*/
#include <QtDeclarative/QDeclarativeEngine>
#include <QDeclarativeContext>
#include... | Fix version number of libContacts plugin | Fix version number of libContacts plugin
Version number was incoherent between the library and the .qml files.
Without this fix the imports in .qml files fail when Qt 4.8 is in use.
| C++ | apache-2.0 | nemomobile/qmlcontacts,meego-tablet-ux/meego-app-contacts,meego-tablet-ux/meego-app-contacts,nemomobile/qmlcontacts |
84a62c5342c6cc240cbc7e29c12b00d376aebf5c | src/sync_prompt.cc | src/sync_prompt.cc | #include <node.h>
#include <v8.h>
#include <iostream>
#include <string>
using namespace v8;
using namespace std;
Handle<Value> Prompt(const Arguments& args) {
HandleScope scope;
string retval;
cin >> retval;
return scope.Close(String::New(retval.c_str()));
}
void init(Handle<Object> exports) {
exports->Set... | #include <node.h>
#include <v8.h>
#include <iostream>
#include <string>
using namespace v8;
using namespace std;
Handle<Value> Prompt(const Arguments& args) {
HandleScope scope;
string retval;
getline(cin, retval);
return scope.Close(String::New(retval.c_str()));
}
void init(Handle<Object> exports) {
expor... | Use getline so program doesn't break functionality in javascript with multiple word inputs | Use getline so program doesn't break functionality in javascript with multiple word inputs
| C++ | mit | shovon/sync-prompt,shovon/sync-prompt,shovon/sync-prompt |
dc65f62564cf85759a61a375c36bb5e529435b7a | 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, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// ... | //---------------------------- 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 an alternate string if DEBUG isn't set. | Use an alternate string if DEBUG isn't set.
git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@9931 0785d39b-7218-0410-832d-ea1e28bc413d
| C++ | lgpl-2.1 | kalj/dealii,maieneuro/dealii,angelrca/dealii,JaeryunYim/dealii,johntfoster/dealii,mac-a/dealii,nicolacavallini/dealii,shakirbsm/dealii,gpitton/dealii,rrgrove6/dealii,shakirbsm/dealii,johntfoster/dealii,EGP-CIG-REU/dealii,JaeryunYim/dealii,flow123d/dealii,lpolster/dealii,shakirbsm/dealii,sriharisundar/dealii,gpitton/dea... |
05169b112c280bbe6d4066add8961c9245f3b97c | chapter16/chapter16_ex10.cpp | chapter16/chapter16_ex10.cpp | // Chapter 16, exercise 10: function grapher: user can choose among a set of
// functions (e.g., sin() and log(), provide parameters for those functions and
// then graph them
#include "Simple_window.h"
#include "Graph.h"
int main()
try {
Point tl(400,150);
Fgraph_window fwin(tl,800,605,"Function Grapher");
... | // Chapter 16, exercise 10: function grapher: user can choose among a set of
// functions (e.g., sin() and log(), provide parameters for those functions and
// then graph them
#include "../lib_files/Simple_window.h"
#include "../lib_files/Graph.h"
int main()
try {
Point tl(400,150);
Fgraph_window fwin(tl,800,... | Update Chapter 16, exercise 10 | Update Chapter 16, exercise 10
| C++ | mit | bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp |
1e1d2639a45788c521e9476987031db6e5b65650 | test/CodeGenCXX/merge-functions.cpp | test/CodeGenCXX/merge-functions.cpp | // REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O1 -fmerge-functions -emit-llvm -o - -x c++ < %s | FileCheck %s
// Basic functionality test. Function merging doesn't kick in on functions that
// are too simple.
struct A {
virtual int f(int x, int *p) { return x ? *p : 1; }
virtu... | // REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O1 -fmerge-functions -emit-llvm -o - -x c++ < %s | FileCheck %s -implicit-check-not=_ZN1A1gEiPi
// Basic functionality test. Function merging doesn't kick in on functions that
// are too simple.
struct A {
virtual int f(int x, int *p... | Update clang test for r350939 | [MergeFunc] Update clang test for r350939
In r350939, the MergeFunc pass learned to erase duplicate functions
which are discardable if unused.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@350952 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
a0095f603c341947012c971092c70b8c532fdf19 | test/unit/test_iterators.cpp | test/unit/test_iterators.cpp |
#include <test.hpp>
TEST_CASE("default constructed varint_iterators are equal") {
protozero::const_varint_iterator<uint32_t> a{};
protozero::const_varint_iterator<uint32_t> b{};
protozero::iterator_range<protozero::const_varint_iterator<uint32_t>> r{};
REQUIRE(a == a);
REQUIRE(a == b);
REQUI... |
#include <test.hpp>
TEST_CASE("default constructed varint_iterators are equal") {
protozero::const_varint_iterator<uint32_t> a{};
protozero::const_varint_iterator<uint32_t> b{};
protozero::iterator_range<protozero::const_varint_iterator<uint32_t>> r{};
REQUIRE(a == a);
REQUIRE(a == b);
REQUI... | Test code must call functions that it wants to test. | Test code must call functions that it wants to test.
| C++ | bsd-2-clause | mapbox/pbf.hpp,mapbox/pbf.hpp,mapbox/pbf.hpp |
5164c7fbfbbf7246f7045b9a7119cd1d7a6c2684 | linkedlist/1290.cc | linkedlist/1290.cc | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
int getDecimalValue(L... | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
int getDecimalValue(L... | Convert Binary Number in a Linked List to Integer | Convert Binary Number in a Linked List to Integer
| C++ | apache-2.0 | MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode |
4c047435f845bf1686f994bd958fdb37fa9f82bf | source/gloperate/source/gloperate.cpp | source/gloperate/source/gloperate.cpp |
#include <gloperate/gloperate.h>
#include <cpplocate/cpplocate.h>
namespace
{
std::string determineDataPath()
{
std::string path = cpplocate::locatePath("data/gloperate", "share/gloperate", reinterpret_cast<void *>(&gloperate::dataPath));
if (path.empty()) path = "./data";
else path = path... |
#include <gloperate/gloperate.h>
#include <cppassist/fs/FilePath.h>
#include <cpplocate/cpplocate.h>
namespace
{
std::string determineDataPath()
{
std::string path = cpplocate::locatePath("data/gloperate", "share/gloperate", reinterpret_cast<void *>(&gloperate::dataPath));
if (path.empty()) path = "./data... | Use cppassist to determine path | Use cppassist to determine path
| C++ | mit | hpicgs/gloperate,cginternals/gloperate,cginternals/gloperate,cginternals/gloperate,j-o/gloperate,hpicgs/gloperate,hpicgs/gloperate,j-o/gloperate,hpicgs/gloperate,j-o/gloperate,cginternals/gloperate,j-o/gloperate,hpicgs/gloperate |
a451f742be414b7375e383968a9a47153da51447 | skia/sgl/SkTypeface_fake.cpp | skia/sgl/SkTypeface_fake.cpp | #include "SkTypeface.h"
// ===== Begin Chrome-specific definitions =====
uint32_t SkTypeface::UniqueID(const SkTypeface* face)
{
return NULL;
}
void SkTypeface::serialize(SkWStream* stream) const {
}
SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
return NULL;
}
// ===== End Chrome-specific definitio... | #include "SkTypeface.h"
// ===== Begin Chrome-specific definitions =====
uint32_t SkTypeface::UniqueID(const SkTypeface* face)
{
return 0;
}
void SkTypeface::serialize(SkWStream* stream) const {
}
SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
return NULL;
}
// ===== End Chrome-specific definitions ... | Return 0 instead of NULL for a non-pointer type. Eliminates a warning in GCC. | Return 0 instead of NULL for a non-pointer type. Eliminates a warning in GCC.
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@981 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C++ | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
72e0d559b8cbeab14285a12fc532c20dca4b538a | src/core/lib/surface/init_unsecure.cc | src/core/lib/surface/init_unsecure.cc | /*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Add log for insecure buils | Add log for insecure buils
| C++ | apache-2.0 | donnadionne/grpc,stanley-cheung/grpc,stanley-cheung/grpc,ejona86/grpc,ctiller/grpc,stanley-cheung/grpc,vjpai/grpc,grpc/grpc,ctiller/grpc,grpc/grpc,jtattermusch/grpc,grpc/grpc,vjpai/grpc,vjpai/grpc,ctiller/grpc,nicolasnoble/grpc,ejona86/grpc,stanley-cheung/grpc,grpc/grpc,jtattermusch/grpc,jtattermusch/grpc,jtattermusch/... |
0fe17f4ffc08fac74b7ae2b20040bb6397476473 | excercise04/sort/quick/type_b.cpp | excercise04/sort/quick/type_b.cpp | #include "../quick.hpp"
#include "../swap.hpp"
void quick(int *data, const int size_of_data)
{
return quick(data, 0, size_of_data - 1);
}
void quick(int *data, const int start, const int end)
{
int size = end - start + 1;
if(start >= end) return; /* Base case */
/* Conquer */
int pivot = partiti... | #include "../quick.hpp"
#include "../swap.hpp"
void quick(int *data, const int size_of_data)
{
return quick(data, 0, size_of_data - 1);
}
void quick(int *data, const int start, const int end)
{
int size = end - start + 1;
if(start >= end) return; /* Base case */
/* Conquer */
int pivot = partiti... | Change partition() to return pivot instead of pe | Change partition() to return pivot instead of pe
| C++ | mit | kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016 |
bd94a6f11cdbd1661f6ac6fe362e655d618cc14c | src/OI.cpp | src/OI.cpp | #include "OI.h"
#include "RobotMap.h"
#include "Commands/ElevatorUpCommand.h"
#include "Commands/ElevatorDownCommand.h"
OI::OI() : joystick(JOYSTICK)
{
// Process operator interface input here.
}
| #include "OI.h"
#include "RobotMap.h"
OI::OI() : joystick(JOYSTICK)
{
// Process operator interface input here.
}
| Remove Elevatorup/down command from oi | Remove Elevatorup/down command from oi | C++ | epl-1.0 | tokyotechnicalsamurai/shougun |
85118482f6d01323c4a2061f33ce9ad046acb8d1 | source/core/search-manager/NOTDocumentIterator.cpp | source/core/search-manager/NOTDocumentIterator.cpp | #include "NOTDocumentIterator.h"
using namespace sf1r;
using namespace std;
NOTDocumentIterator::NOTDocumentIterator()
{
setNot(true);
}
NOTDocumentIterator::~NOTDocumentIterator()
{
}
void NOTDocumentIterator::add(DocumentIterator* pDocIterator)
{
docIteratorList_.push_back(pDocIterator);
}... | #include "NOTDocumentIterator.h"
using namespace sf1r;
using namespace std;
NOTDocumentIterator::NOTDocumentIterator()
{
}
NOTDocumentIterator::~NOTDocumentIterator()
{
}
void NOTDocumentIterator::add(DocumentIterator* pDocIterator)
{
docIteratorList_.push_back(pDocIterator);
}
bool NOTDocume... | Revert "small fix to make notQuery working proper" | Revert "small fix to make notQuery working proper"
This reverts commit 494a230b4e9eaab4e3b197bc6706ead2f5c0b44c.
| C++ | apache-2.0 | izenecloud/sf1r-lite,izenecloud/sf1r-ad-delivery,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,pombredanne/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-lite,izenecloud/sf1r-lite,pombredanne/sf1r-lite,izenecloud/sf1r-ad-delivery,izenecloud/sf1r-lite,izenecloud/sf1... |
7f3df4150c9bfa2e5de07220cea19f9c84d4db52 | lib/VMCore/ModuleProvider.cpp | lib/VMCore/ModuleProvider.cpp | //===-- ModuleProvider.cpp - Base implementation for module providers -----===//
//
// Minimal implementation of the abstract interface for providing a module.
//
//===----------------------------------------------------------------------===//
#include "llvm/ModuleProvider.h"
#include "llvm/Module.h"
/// ctor - alway... | //===-- ModuleProvider.cpp - Base implementation for module providers -----===//
//
// Minimal implementation of the abstract interface for providing a module.
//
//===----------------------------------------------------------------------===//
#include "llvm/ModuleProvider.h"
#include "llvm/Module.h"
/// ctor - alway... | Return the Module that we just materialized. | Return the Module that we just materialized.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@9201 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swif... |
93ee0c81c14351307595887a4f2f7398b4dc6e54 | examples/test29.cpp | examples/test29.cpp | #include "tclap/CmdLine.h"
#include <vector>
#include <string>
using namespace TCLAP;
using namespace std;
// https://sourceforge.net/p/tclap/bugs/30/
int main(int argc, char** argv) {
CmdLine cmd("test empty argv");
std::vector<string> args;
cmd.parse(args);
}
| #include "tclap/CmdLine.h"
#include <vector>
#include <string>
using namespace TCLAP;
using namespace std;
// https://sourceforge.net/p/tclap/bugs/30/
int main() {
CmdLine cmd("test empty argv");
std::vector<string> args;
cmd.parse(args);
}
| Remove unused arguments from test (fix warnings). | Remove unused arguments from test (fix warnings).
| C++ | mit | mirror/tclap,mirror/tclap,mirror/tclap,mirror/tclap |
893ccd3739b1b23a2b4c30637364477b9b650479 | cpp/challenge-1.cpp | cpp/challenge-1.cpp | #include <iostream>
#include <string>
#include "MatasanoConverter.h"
using namespace std;
int main() {
string hexInput("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d");
string testString = ("SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t");
string... | #include <iostream>
#include <string>
#include "MatasanoConverter.h"
using namespace std;
int main() {
string hexInput("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d");
string testString = ("SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t");
string... | Update to use new getStringOutput function of MatasanoConverter. Add line break after test pass message | Update to use new getStringOutput function of MatasanoConverter. Add line break after test pass message
| C++ | mit | TheLunchtimeAttack/matasano-challenges,samscott89/matasano-challenges,TheLunchtimeAttack/matasano-challenges,samscott89/matasano-challenges |
ab1138d45a8371e34065aa37de2469c755409b4d | Platform.cpp | Platform.cpp | #include "Platform.h"
#include <stdio.h>
void testRDTSC ( void )
{
int64_t temp = rdtsc();
printf("%d",(int)temp);
}
#if defined(_MSC_VER)
#include <windows.h>
void SetAffinity ( int cpu )
{
SetProcessAffinityMask(GetCurrentProcess(),cpu);
SetThreadPriority(GetCurrentThread(), THREAD_PRI... | #include "Platform.h"
#include <stdio.h>
void testRDTSC ( void )
{
int64_t temp = rdtsc();
printf("%d",(int)temp);
}
#if defined(_MSC_VER)
#include <windows.h>
void SetAffinity ( int cpu )
{
SetProcessAffinityMask(GetCurrentProcess(),cpu);
SetThreadPriority(GetCurrentThread(), THREAD_PRI... | Add CPU affinity to gcc build | Add CPU affinity to gcc build
| C++ | mit | dave77/smhasher,dave77/smhasher |
74d40e33497ce8b7454e89af3345fd16491db674 | chrome/browser/extensions/extension_infobar_apitest.cc | chrome/browser/extensions/extension_infobar_apitest.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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined(TOOLKI... | // 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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined(TOOLKI... | Mark a test as flaky on ChromeOS. | Mark a test as flaky on ChromeOS.
BUG=40141
TEST=None
Review URL: http://codereview.chromium.org/1575015
git-svn-id: http://src.chromium.org/svn/trunk/src@43384 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 249469713d75090125b318f6101a8e42cba15b00 | C++ | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
70bb2ffbf32aebd4e27fdf64c8034021513d4ad5 | src/main.cpp | src/main.cpp | // Windy - main.cpp
// Copyright (c) 2015 Arkadiusz Bokowy
//
// This file is a part of Windy.
//
// This projected is licensed under the terms of the MIT license.
#include "Application.h"
int main(int argc, char *argv[]) {
Application app(argc, argv);
return app.exec();
}
| // Windy - main.cpp
// Copyright (c) 2015 Arkadiusz Bokowy
//
// This file is a part of Windy.
//
// This projected is licensed under the terms of the MIT license.
#include "Application.h"
#if defined(Q_OS_WIN) && !defined(_DLL)
// This sections allows static build on the Windows platform using MSVC++
// compiler. Du... | Allow static build on Windows | Allow static build on Windows
| C++ | mit | Arkq/windy,Arkq/windy |
6f9e5368c1906e6606c38b1828a0e9f6f7b689e5 | src/motor/esra_payload_motor_mapper.cpp | src/motor/esra_payload_motor_mapper.cpp | #include "motor/esra_payload_motor_mapper.hpp"
#include <array>
#include <cstddef>
#include "protocol/messages.hpp"
EsraPayloadMotorMapper::EsraPayloadMotorMapper(PWMDeviceGroup<1>& motors, Communicator& communicator)
: motors(motors),
throttleStream(communicator, 5) {
}
void EsraPayloadMotorMapper::run(bool ... | #include "motor/esra_payload_motor_mapper.hpp"
#include <array>
#include <cstddef>
#include "protocol/messages.hpp"
EsraPayloadMotorMapper::EsraPayloadMotorMapper(PWMDeviceGroup<1>& motors, Communicator& communicator)
: motors(motors),
throttleStream(communicator, 5) {
}
void EsraPayloadMotorMapper::run(bool ... | Set unused throttle message fields to zero. | Set unused throttle message fields to zero.
| C++ | mit | OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control |
ee441f8911d94ca2b537248b6585eeea1702a205 | src/ogvr/Client/CreateContext.cpp | src/ogvr/Client/CreateContext.cpp | /** @file
@brief Implementation
@date 2014
@author
Ryan Pavlik
<ryan@sensics.com>
<http://sensics.com>
*/
// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)
// Internal Includes
#include <ogvr/Clie... | /** @file
@brief Implementation
@date 2014
@author
Ryan Pavlik
<ryan@sensics.com>
<http://sensics.com>
*/
// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)
// Internal Includes
#include <ogvr/Clie... | Fix build - missing header. | Fix build - missing header.
| C++ | apache-2.0 | godbyk/OSVR-Core,leemichaelRazer/OSVR-Core,d235j/OSVR-Core,Armada651/OSVR-Core,d235j/OSVR-Core,feilen/OSVR-Core,OSVR/OSVR-Core,d235j/OSVR-Core,d235j/OSVR-Core,d235j/OSVR-Core,godbyk/OSVR-Core,leemichaelRazer/OSVR-Core,OSVR/OSVR-Core,Armada651/OSVR-Core,feilen/OSVR-Core,leemichaelRazer/OSVR-Core,OSVR/OSVR-Core,Armada651... |
5b48afb674cd41cbbf6b924b1c5c5a2b77370584 | sdk-remote/src/tests/checkfiles/removecallbacks.cc | sdk-remote/src/tests/checkfiles/removecallbacks.cc | #include <bin/tests.hh>
BEGIN_TEST(removecallbacks, client, )
client.setCallback(&dump, "error"); // ping
urbi::UCallbackID i1 = client.setCallback(&dump, "output");
urbi::UCallbackID i2 = client.setCallback(&dump, "output");
SEND("output << 1;");
//= D output 1
//= D output 1
dumpSem--;
dumpSem--;
SEND("error << 1;")... | #include <bin/tests.hh>
BEGIN_TEST(removecallbacks, client, )
client.setCallback(&dump, "error"); // ping
urbi::UCallbackID i1 = client.setCallback(&dump, "output");
urbi::UCallbackID i2 = client.setCallback(&dump, "output");
SEND("output << 1;");
//= D output 1
//= D output 1
dumpSem--;
dumpSem--;
SEND("error << 2;")... | Make tests outcome easier to check. | Make tests outcome easier to check.
* src/tests/checkfiles/removecallbacks.cc: Use different numbers.
| C++ | bsd-3-clause | aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi |
82052788255d5569649fb2ed8d148ae59533fdb1 | lightControler/src/MessageQueue.cpp | lightControler/src/MessageQueue.cpp | #include "MessageQueue.h"
#include <vector>
MessageQueue::MessageQueue(std::string identifier, std::string serverAddr, unsigned int serverPort, std::function<void(std::string) > onMessage)
: identifier(identifier), mqConnection(&mqHandler, "amqp://" + serverAddr + ":" + std::to_string(serverPort)),
channel(&mqConnect... | #include "MessageQueue.h"
#include <vector>
MessageQueue::MessageQueue(std::string identifier, std::string serverAddr, unsigned int serverPort, std::function<void(std::string) > onMessage)
: identifier(identifier), mqConnection(&mqHandler, "amqp://" + serverAddr + ":" + std::to_string(serverPort)),
channel(&mqConnect... | Delete messages from rabbitmq once received | Delete messages from rabbitmq once received | C++ | mit | Justewi/CentralTrafficLightManagement,Justewi/CentralTrafficLightManagement,Justewi/CentralTrafficLightManagement,Justewi/CentralTrafficLightManagement |
b1d65b968db3cf30ed3d8a3d6618e227f5377901 | src/main.cpp | src/main.cpp | #include <functional>
#include <iostream>
#include <spdlog/spdlog.h>
#include <docopt/docopt.h>
#include <iostream>
static constexpr auto USAGE =
R"(Naval Fate.
Usage:
naval_fate ship new <name>...
naval_fate ship <name> move <x> <y> [--speed=<kn>]
naval_fate ship shoot <x> <y>... | #include <functional>
#include <iostream>
#include <spdlog/spdlog.h>
#include <docopt/docopt.h>
static constexpr auto USAGE =
R"(Naval Fate.
Usage:
naval_fate ship new <name>...
naval_fate ship <name> move <x> <y> [--speed=<kn>]
naval_fate ship shoot <x> <y>
naval_fate m... | Remove duplicate header in template source file | Remove duplicate header in template source file
| C++ | unlicense | lefticus/cpp_starter_project |
aad50b83a76618768f9232c21b4c9f4401c13c51 | chrome/common/default_plugin.cc | chrome/common/default_plugin.cc | // 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 "chrome/common/default_plugin.h"
#include "chrome/default_plugin/plugin_main.h"
#include "webkit/plugins/npapi/plugin_list.h"
namespace chr... | // 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 "chrome/common/default_plugin.h"
#include "chrome/default_plugin/plugin_main.h"
#include "webkit/plugins/npapi/plugin_list.h"
namespace chr... | Disable the default plugin for aura | Disable the default plugin for aura
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8143024
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@104154 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | hujiajie/pa-chromium,Just-D/chromium-1,keishi/chromium,dednal/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,robclark/chromium,zcbenz/cefode-chromium,keishi/chromium,hgl888/chromium-crosswalk,Jonekee/chromium.src,m... |
aeea26d29796788d1984d2b514944497db50f9b6 | tests/src/experimental/tests_tmp.cpp | tests/src/experimental/tests_tmp.cpp | #include <mart-common/experimental/tmp.h> | #include <mart-common/experimental/tmp.h>
#include <tuple>
namespace {
constexpr auto v_list1 = mart::tmp::value_list<int, 1, 2, 3, 4, 5>{};
constexpr auto v_list2 = mart::tmp::value_list<char, 'H', 'e', 'l', 'l', 'o'>{};
static_assert( mart::tmp::get_Nth_element( 2, v_list1 ) == 3 );
template<int First, char Secon... | Add a compilation test for mart::tmp::cartesian_value_product | [Test] Add a compilation test for mart::tmp::cartesian_value_product
| C++ | mit | tum-ei-rcs/mart-common,tum-ei-rcs/mart-common |
e4d46c35a05efde6e46b98022d13b4b5384323cb | content/shell/webkit_test_platform_support_android.cc | content/shell/webkit_test_platform_support_android.cc | // Copyright (c) 2012 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 "content/shell/webkit_test_platform_support.h"
namespace content {
bool CheckLayoutSystemDeps() {
return true;
}
bool WebKitTestPlatform... | // Copyright (c) 2012 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 "content/shell/webkit_test_platform_support.h"
#include "third_party/skia/include/ports/SkTypeface_android.h"
namespace {
// The root dire... | Load the correct fonts and reset hinting for Android layout tests | content_shell: Load the correct fonts and reset hinting for Android layout tests
This fixes most of the text differences in layout tests, because Android's
default serif font is much wider than the one used on Linux. Load the
right font configuration files through Skia and set up WebKit to use
normal font hinting.
BU... | C++ | bsd-3-clause | crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,Fireblend/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,jaruba/ch... |
f38f9c7d6c8fd8f59d748a6a2561952c130d9685 | src/main.cpp | src/main.cpp | #include "HumbugWindow.h"
#include "HumbugApplication.h"
#include "Config.h"
#ifdef Q_OS_MAC
#include "mac/Setup.h"
#endif
int main(int argc, char *argv[])
{
HumbugApplication a(argc, argv);
a.setApplicationName("Humbug");
a.setApplicationVersion(HUMBUG_VERSION_STRING);
QCoreApplication::setOrganizat... | #include "HumbugWindow.h"
#include "HumbugApplication.h"
#include "Config.h"
#ifdef Q_OS_MAC
#include "mac/Setup.h"
#endif
int main(int argc, char *argv[])
{
HumbugApplication a(argc, argv);
a.setApplicationName("Humbug");
a.setApplicationVersion(HUMBUG_VERSION_STRING);
QCoreApplication::setOrganizat... | Use a more specific application name for use in UA discrimination | Use a more specific application name for use in UA discrimination
| C++ | apache-2.0 | zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop |
d4425f1c8039eeac53fd03627063654072316c08 | examples/stack.cpp | examples/stack.cpp | #include <lua.hpp>
#include <luwra.hpp>
#include <iostream>
using namespace luwra;
static
double sum3(int a, int b, double c) {
return (a + b) * c;
}
int main() {
lua_State* state = luaL_newstate();
luaL_openlibs(state);
// Build stack
lua_pushinteger(state, 13);
lua_pushinteger(state, 37);
lua_pushnumber(s... | #include <lua.hpp>
#include <luwra.hpp>
#include <iostream>
using namespace luwra;
static
double sum3(int a, int b, double c) {
return (a + b) * c;
}
int main() {
lua_State* state = luaL_newstate();
luaL_openlibs(state);
// Build stack
lua_pushinteger(state, 13);
lua_pushinteger(state, 37);
lua_pushnumber(s... | Add note about negative indexes when using Apply | examples: Add note about negative indexes when using Apply
| C++ | bsd-3-clause | vapourismo/luwra |
13e294a2a5c7041eb4833f744a7dbf5f371584c4 | io/example/read-sink1/read-sink1.cc | io/example/read-sink1/read-sink1.cc | #include <unistd.h>
#include <event/event_callback.h>
#include <event/event_main.h>
#include <io/stream_handle.h>
class Sink {
LogHandle log_;
StreamHandle fd_;
Action *action_;
public:
Sink(int fd)
: log_("/sink"),
fd_(fd),
action_(NULL)
{
EventCallback *cb = callback(this, &Sink::read_complete);
a... | #include <unistd.h>
#include <event/callback_handler.h>
#include <event/event_callback.h>
#include <event/event_handler.h>
#include <event/event_main.h>
#include <io/stream_handle.h>
class Sink {
LogHandle log_;
StreamHandle fd_;
CallbackHandler close_handler_;
EventHandler read_handler_;
public:
Sink(int fd)
... | Convert to use Handlers. Could be simpler. | Convert to use Handlers. Could be simpler.
| C++ | bsd-2-clause | wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy |
82269bf238bd29d6d525f0441185339fd6c17677 | base/android/sys_utils.cc | base/android/sys_utils.cc | // Copyright 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 "base/android/sys_utils.h"
#include "base/sys_info.h"
#include "jni/SysUtils_jni.h"
// Any device that reports a physical RAM size less than th... | // Copyright 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 "base/android/sys_utils.h"
#include "base/android/build_info.h"
#include "base/sys_info.h"
#include "jni/SysUtils_jni.h"
// Any device that rep... | Disable low memory device check for JB and lower | Disable low memory device check for JB and lower
Only switch to low memory device states for higher than JB.
BUG=310842
NOTRY=true
Review URL: https://codereview.chromium.org/38113005
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@230873 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | chuan9/chromium-crosswalk,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,Jonekee/chromium.src,krieger-od/nw... |
f40d61463f43e3a69aff84a29adaa436add35300 | cirkit_unit03_driver/src/third_robot_driver_node.cpp | cirkit_unit03_driver/src/third_robot_driver_node.cpp | /******************************************************
* This is CIR-KIT 3rd robot control driver.
* Author : Arita Yuta(Kyutech)
******************************************************/
#include <ros/ros.h>
#include <geometry_msgs/Twist.h> // cmd_vel
#include <nav_msgs/Odometry.h> // odom
#include <tf/transform... | /******************************************************
* This is CIR-KIT 3rd robot control driver.
* Author : Arita Yuta(Kyutech)
******************************************************/
#include "third_robot_driver.hpp"
int main(int argc, char** argv)
{
ros::init(argc, argv, "Third_robot_driver_node");
ROS_INF... | Remove unnecessary dependency on ~~driver_node.cpp | Remove unnecessary dependency on ~~driver_node.cpp
| C++ | bsd-3-clause | CIR-KIT-Unit03/cirkit_unit03_robot,CIR-KIT-Unit03/cirkit_unit03_robot |
7bb76a4d7de5e32b32c1d46c13ed4d0e4edf4de0 | Day11/Day11.cpp | Day11/Day11.cpp | // Day11.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "Password.h"
int main()
{
Password<8> SantasPassword(std::string("hepxcrrq"));
std::cout << SantasPassword << std::endl;
++SantasPassword;
std::cout << SantasPassword << std::endl;
system("pause");
retur... | // Day11.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "Password.h"
int main()
{
Password<8> SantasPassword(std::string("hepxcrrq"));
std::cout << SantasPassword << std::endl;
++SantasPassword;
std::cout << SantasPassword << std::endl;
++SantasPassword;
std::co... | Add solution for Day 11 part two | Add solution for Day 11 part two
| C++ | mit | jloehr/AdventOfCode,jloehr/AdventOfCode,jloehr/AdventOfCode |
549c3bacf595f47e5346806f381e4e099417fd0d | src/tibb/TableView/BasicListItem.cpp | src/tibb/TableView/BasicListItem.cpp | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "BasicListItem.h"
using namespace bb::cascades;
BasicListItem::BasicListIte... | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "BasicListItem.h"
using namespace bb::cascades;
BasicListItem::BasicListIte... | Fix segfault when bad data pointer is set. | Fix segfault when bad data pointer is set.
| C++ | apache-2.0 | appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry,appcelerator/titanium_mobile_blackberry |
55afeaf86051259d2c688090bdd011348a5969a0 | src/parameter.cpp | src/parameter.cpp | #include "ics3/parameter.hpp"
ics::Parameter ics::Parameter::stretch() noexcept {
static const Parameter STRETCH(0x01, 1, 127);
return STRETCH;
}
ics::Parameter ics::Parameter::speed() noexcept {
static const Parameter SPEED(0x02, 1, 127);
return SPEED;
}
ics::Parameter ics::Parameter::current() noexcept {
... | #include "ics3/parameter.hpp"
ics::Parameter ics::Parameter::stretch() noexcept {
static const Parameter STRETCH(0x01, 1, 127);
return STRETCH;
}
ics::Parameter ics::Parameter::speed() noexcept {
static const Parameter SPEED(0x02, 1, 127);
return SPEED;
}
ics::Parameter ics::Parameter::current() noexcept {
... | Update Parameter for init data to impossible | Update Parameter for init data to impossible
| C++ | bsd-2-clause | forno/libics3,forno/libics3 |
a08f68522457785852def45fa798c35e35e11951 | rpu/tests/display/testDisplay.cpp | rpu/tests/display/testDisplay.cpp |
#include <LCDDisplay.h>
int main(int argc, char **argv)
{
std::cout << "testing display";
LCDDisplay *display = new Display();
display->refresh();
display->setMenuString("test string");
display->refresh();
display->setMenuString("new string");
display->setTrackInfoString("track string");
display->refresh... |
#include <stdio.h>
#include <LCDDisplay.h>
int main(int argc, char **argv)
{
printf("testing display");
LCDDisplay *display = new LCDDisplay();
display->refresh();
display->setMenuString("test string");
display->refresh();
display->setMenuString("new string");
display->setTrackInfoString("track string");
... | Fix creating new object of incomplete type | Fix creating new object of incomplete type
Display should never be instantiated, as ::refresh() is pure virtual.
| C++ | mit | james-johns/XNOR-ESD,james-johns/XNOR-ESD,james-johns/XNOR-ESD,james-johns/XNOR-ESD,james-johns/XNOR-ESD |
8013b1fc7939e3fabb87586e54c0711af2e6bdee | chrome/browser/in_process_webkit/webkit_thread_unittest.cc | chrome/browser/in_process_webkit/webkit_thread_unittest.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.
#include "chrome/browser/in_process_webkit/webkit_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(WebKitThreadTest, ExposedInChromeThre... | // 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.
#include "chrome/browser/in_process_webkit/webkit_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(WebKitThreadTest, DISABLED_ExposedInC... | Disable WebKitThreadTest.ExposedInChromeThread, due to subsequent assert. | Disable WebKitThreadTest.ExposedInChromeThread, due to subsequent assert.
BUG=46087
TEST=see bug
TBR=evan
Review URL: http://codereview.chromium.org/2777001
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@49174 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | adobe/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,Crystalnix/ho... |
f7c27dcb0857639c546f7bc6dd454e0554ecbd7b | src/SearchInRotatedSortedArray.cpp | src/SearchInRotatedSortedArray.cpp | #include "SearchInRotatedSortedArray.hpp"
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
int p = 0;
while (p + 1 < nums.size() && nums[p] < nums[p + 1])
p++;
if (p + 1 == nums.size())
return partialSearch(nums, 0, nums.size() - 1, target);
if (... | #include "SearchInRotatedSortedArray.hpp"
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
return partialSearch(nums, 0, nums.size() - 1, target);
}
int SearchInRotatedSortedArray::partialSearch(vector<int>& nums, int p, int q, int target)
{
if (p > q) return... | Update Problem 33. Search in Rotated Sorted Array | Update Problem 33. Search in Rotated Sorted Array
| C++ | mit | yanzhe-chen/leetcode |
1ba8cc9cb787122c32927c36e13b197dcd8b6e28 | src/swganh_core/badge/badge_region.cc | src/swganh_core/badge/badge_region.cc | // This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include <swganh_core/badge/badge_region.h>
#include <swganh_core/connection/connection_client_interface.h>
#include <swganh_core/messages/chat_system_message.h>
#include <swganh_core/message... | // This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include <swganh_core/badge/badge_region.h>
#include <swganh_core/connection/connection_client_interface.h>
#include <swganh_core/messages/chat_system_message.h>
#include <swganh_core/message... | Check if collider or one of it's inner objects has a controller to award a badge. | Check if collider or one of it's inner objects has a controller to award a badge.
| C++ | mit | anhstudios/swganh,anhstudios/swganh,anhstudios/swganh |
40d074a3d46d01089119e1151b4cb27587a5d5c8 | chrome/browser/extensions/extension_websocket_apitest.cc | chrome/browser/extensions/extension_websocket_apitest.cc | // Copyright (c) 2012 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 "base/logging.h"
#include "base/path_service.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_paths... | // Copyright (c) 2012 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 "base/logging.h"
#include "base/path_service.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_paths... | Disable ExtensionApiTest.WebSocket instead of marked as FAILS_ | Disable ExtensionApiTest.WebSocket instead of marked as FAILS_
BUG=111165
TEST=none
TBR=hbono@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9117027
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@118821 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,adobe/chromi... |
9156c915ab774742609fb522175d70768e053d7f | WordPerfectIndexer/dllmain.cpp | WordPerfectIndexer/dllmain.cpp | // dllmain.cpp : Implementation of DllMain.
#include "stdafx.h"
#include "resource.h"
#include "WordPerfectIndexer_i.h"
#include "dllmain.h"
CWordPerfectIndexerModule _AtlModule;
// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
hInstance;
return _AtlModule... | // dllmain.cpp : Implementation of DllMain.
#include "stdafx.h"
#include "resource.h"
#include "WordPerfectIndexer_i.h"
#include "dllmain.h"
CWordPerfectIndexerModule _AtlModule;
HINSTANCE _AtlModuleInstance;
// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
... | Make DllMain hang onto the HINSTANCE passed to it | Make DllMain hang onto the HINSTANCE passed to it
| C++ | mpl-2.0 | SunburstApps/WordPerfectIndexer,SunburstApps/WordPerfectIndexer |
04e7695a5c35fca30096bd0da90b605f70493053 | mszparse.cc | mszparse.cc | #include <iostream>
#include <zlib.h>
#include <string>
#include "mszreader.h"
using namespace std;
using namespace iomsz;
int main( int argc, char* argv[] ) {
if ( argc <= 1 ) exit(-1);
unsigned int nbSolvers, nbFeatures, nbInstances, timeOut;
string* solversNames, *featuresNames, *instancesNames;
double** ... | #include <iostream>
#include <zlib.h>
#include <string>
#include "mszreader.hh"
using namespace std;
using namespace iomsz;
int main( int argc, char* argv[] ) {
if ( argc <= 1 ) exit(-1);
unsigned int nbSolvers, nbFeatures, nbInstances, timeOut;
string* solversNames, *featuresNames, *instancesNames;
double**... | Make header include compat with std. | Make header include compat with std.
| C++ | mit | pmatos/maxsatzilla,pmatos/maxsatzilla,pmatos/maxsatzilla,pmatos/maxsatzilla,pmatos/maxsatzilla |
1b0a4f7e355790517ba6ac57e57cd1b0b02fc40e | chrome/browser/extensions/extension_infobar_apitest.cc | chrome/browser/extensions/extension_infobar_apitest.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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined(TOOLKI... | // 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 "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
#if defined(TOOLKI... | Revert 64157 - Marking ExtensionApiTest.Infobars as FAILS until 10.5 issue is resolved. Reverting in order to create a proper CL for it. BUG=60990 | Revert 64157 - Marking ExtensionApiTest.Infobars as FAILS until 10.5 issue is resolved.
Reverting in order to create a proper CL for it.
BUG=60990
TBR=vangelis@chromium.org
Review URL: http://codereview.chromium.org/4200006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@64161 0039d316-1c4b-4281-b951-d872f2087c9... | C++ | bsd-3-clause | ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-... |
2558567ee86ebd092ba5bd059b394c3ba2b888e0 | chrome/browser/extensions/extension_storage_apitest.cc | chrome/browser/extensions/extension_storage_apitest.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.
#include "chrome/browser/extensions/extension_apitest.h"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Storage) {
ASSERT_TRUE(RunExtensionTest("storage"... | // 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.
#include "chrome/browser/extensions/extension_apitest.h"
// This test is disabled. See bug 25746
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_St... | Disable ExtensionApiTest.Storage because it crashes the browser_tests too. | Disable ExtensionApiTest.Storage because it crashes the browser_tests too.
BUG:25746
Review URL: http://codereview.chromium.org/328024
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@30021 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | yitian134/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,Crys... |
bbb832f72a7ca540fad173b78ca709b82f31fdf0 | compiler/main/version.cpp | compiler/main/version.cpp | /*
* Copyright 2004-2014 Cray Inc.
* Other additional copyright holders may be indicated within.
*
* The entirety of this work is licensed under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
*
* You may obtain a copy of the License at
* ... | /*
* Copyright 2004-2014 Cray Inc.
* Other additional copyright holders may be indicated within.
*
* The entirety of this work is licensed under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
*
* You may obtain a copy of the License at
* ... | Revert "Fix boolean expectation from strcmp." | Revert "Fix boolean expectation from strcmp."
This reverts commit c9a687d927e07aad1eab655ee271e00cb93adbd7.
| C++ | apache-2.0 | CoryMcCartan/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,chizarlicious/chapel,chizarlicious/chapel,hildeth/chapel,chizarlicious/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,chizarlicious/chapel,hildeth/chapel,CoryMcCartan/chapel,hildeth/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel... |
2631bec4135a66d39ab60ea53c5d2c1e01f70670 | src/client_main.cpp | src/client_main.cpp | #include <memory>
#include "client/event_system.h"
#include "client/client_interface.h"
#include "events/connection_receiver.h"
#include "events/hub.h"
int main( int argc, char** argv )
{
auto connection = std::make_shared < events::Connection_receiver > ( "localhost", 31005 );
events::Hub::get_filter ( "Send... | #include <memory>
#include <iostream>
#include <cstring>
#include "client/event_system.h"
#include "client/client_interface.h"
#include "client/events/events.h"
#include "events/connection_receiver.h"
#include "events/hub.h"
bool parse_args ( int argc, char** argv )
{
if ( argc > 1 )
{
if ( ( !strcmp ... | Implement adding of torrents over the commandline | Implement adding of torrents over the commandline
| C++ | mit | froozen/s-torrent,froozen/s-torrent,froozen/s-torrent |
f9e17f6aedbe3438ce19fec79c25d0e940e29d5b | src/tests/logger_test.cpp | src/tests/logger_test.cpp | #include <boost/timer/timer.hpp>
#include <iostream>
#include <string>
#include <vector>
#include "common/logging.h"
// small test program for playing around with spdlog formatting of messages
std::shared_ptr<spdlog::logger> stderrLogger(
const std::string& name,
const std::string& pattern,
const std::vec... | #include <boost/timer/timer.hpp>
#include <iostream>
#include <string>
#include <vector>
#include "common/logging.h"
// small test program for playing around with spdlog formatting of messages
std::shared_ptr<spdlog::logger> stderrLoggerTest(
const std::string& name,
const std::string& pattern,
const std:... | Fix compilation error in logger test | Fix compilation error in logger test
| C++ | mit | marian-nmt/marian-train,amunmt/marian,emjotde/amunn,emjotde/amunmt,marian-nmt/marian-train,amunmt/marian,emjotde/amunn,emjotde/amunmt,amunmt/marian,emjotde/amunn,emjotde/Marian,emjotde/amunn,marian-nmt/marian-train,emjotde/Marian,emjotde/amunmt,marian-nmt/marian-train,emjotde/amunmt,marian-nmt/marian-train |
84c52272719cb87d035102313ddaeffecec54dd9 | src/controllers/dashboardcontroller.cpp | src/controllers/dashboardcontroller.cpp | #include "dashboardcontroller.h"
#include "serialization/result.h"
ApiMock::ResponseData ApiMock::DashboardController::get(RequestData request) {
auto result = Html("<h1>Hello, world</h1>\n<p>This is an HTML result</p>");
return createResponse(HTTP_OK, &result);
} | #include "dashboardcontroller.h"
#include "serialization/result.h"
#include <fstream>
ApiMock::ResponseData ApiMock::DashboardController::get(RequestData request) {
// TODO: This is temporary, just to try the concept out. But really: files shouldn't be loaded like this:
std::ifstream dashboard("www/dashboard.html");... | Read the dashboard file and return the content | Read the dashboard file and return the content
For now. This is an ugly solution that I'll have to do more
with. But it'll do for now.
| C++ | mit | Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock |
ae285e982ceb532c3cd348ec2723d790b7c7e6b8 | src/RMain.cpp | src/RMain.cpp | #include "RMain.h"
#include "RGlobal.h"
#include "RThread.h"
#include "REventLoop.h"
#include "RCoreApplication.h"
#include "RSpinLocker.h"
static volatile RThread *sMainThread = NULL;
RThread *
rGetMainThread()
{
return (RThread *)sMainThread;
}
void
setup()
{
}
void
loop()
{
// Do nothing, we must not do time ... | #include "RMain.h"
#include "RGlobal.h"
#include "RThread.h"
#include "REventLoop.h"
#include "RCoreApplication.h"
#include "RSpinLocker.h"
static volatile RThread *sMainThread = NULL;
RThread *
rGetMainThread()
{
return (RThread *)sMainThread;
}
void
setup()
{
}
void
loop()
{
// Do nothing, we must not do time ... | Disable FreeRTOS task priority settings in Non-OS mode | Disable FreeRTOS task priority settings in Non-OS mode
| C++ | mit | starofrainnight/ArduinoRabirdToolkit,starofrainnight/ArduinoRabirdToolkit,starofrainnight/ArduinoRabirdTookit |
849a256df5f387ad24625404a87808782cfcae6c | src/pi_legendre.cpp | src/pi_legendre.cpp | ///
/// @file pi_legendre.cpp
///
/// Copyright (C) 2017 Kim Walisch, <kim.walisch@gmail.com>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///
#include <primecount.hpp>
#include <primecount-internal.hpp>
#include <imath.hpp>
#include <stdint.h>
namespa... | ///
/// @file pi_legendre.cpp
///
/// Copyright (C) 2018 Kim Walisch, <kim.walisch@gmail.com>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///
#include <primecount.hpp>
#include <primecount-internal.hpp>
#include <isqrt.hpp>
#include <stdint.h>
namespa... | Include isqrt.hpp instead of imath.hpp | Include isqrt.hpp instead of imath.hpp | C++ | bsd-2-clause | kimwalisch/primecount,kimwalisch/primecount,kimwalisch/primecount |
93f9fa12954a5167090dbc3bce572c0a56d2870e | src/main.cpp | src/main.cpp | #include <QtGui/QGuiApplication>
#include <QQmlContext>
#include <QStateMachine>
#include <memory>
#include "./window.h"
#include "./demo_scene.h"
#include "./input/invoke_manager.h"
#include "./input/signal_manager.h"
#include "./input/scxml_importer.h"
int main(int argc, char **argv)
{
QGuiApplication application(... | #include <QtGui/QGuiApplication>
#include <QQmlContext>
#include <QStateMachine>
#include <QDebug>
#include <memory>
#include "./window.h"
#include "./demo_scene.h"
#include "./input/invoke_manager.h"
#include "./input/signal_manager.h"
#include "./input/scxml_importer.h"
int main(int argc, char **argv)
{
qputenv("Q... | Change formatting of logs. Add time and thread id. | Change formatting of logs. Add time and thread id.
| C++ | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
1d6bf40f7b7665dade677f65ff09621f6b59eee0 | examples/project_template/logger.cpp | examples/project_template/logger.cpp | #include "logger.h"
// Keep it simple for now
#include <iostream>
void error_logger(luna::log_level level, const std::string &message)
{
switch (level)
{
case luna::log_level::DEBUG:
// std::cerr << "[ DEBUG] " << message << std::endl;
break;
case luna::log_level::INFO:... | #include "logger.h"
// Keep it simple for now
#include <iostream>
void error_logger(luna::log_level level, const std::string &message)
{
switch (level)
{
case luna::log_level::DEBUG:
std::cerr << "[ DEBUG] " << message << std::endl;
break;
case luna::log_level::INFO:
... | Add debug logging for example code. | Add debug logging for example code.
| C++ | mit | DEGoodmanWilson/luna,DEGoodmanWilson/luna,DEGoodmanWilson/luna,DEGoodmanWilson/luna,DEGoodmanWilson/luna,DEGoodmanWilson/luna,DEGoodmanWilson/luna |
8ece123ebd875a39e1fcad7d44e3e2d30383f942 | test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp | test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp | // RUN: %llvmgcc -g -S -O2 %s -o %t
// RUN: grep "i1 false, i1 true. . . DW_TAG_subprogram" %t | count 2
class foo {
public:
int bar(int x);
static int baz(int x);
};
int foo::bar(int x) {
return x*4 + 1;
}
int foo::baz(int x) {
return x*4 + 1;
}
| // RUN: %llvmgcc -g -S -O2 %s -o - | FileCheck %s
class foo {
public:
int bar(int x);
static int baz(int x);
};
int foo::bar(int x) {
// CHECK: {{i1 false, i1 true(, i[0-9]+ [^\}]+[}]|[}]) ; \[ DW_TAG_subprogram \]}}
return x*4 + 1;
}
int foo::baz(int x) {
// CHECK: {{i1 false, i1 true(, i[0-9]+ ... | Tweak test for debug/metadata change, update to FileCheck. Radar 7424645. | Tweak test for debug/metadata change, update to FileCheck. Radar 7424645.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@105559 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOp... |
04d0827ce598578a3cd298f2834352198b5c3285 | test/SemaCXX/warn-missing-variable-declarations.cpp | test/SemaCXX/warn-missing-variable-declarations.cpp | // RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s
// Variable declarations that should trigger a warning.
int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
int vbad2 = 10; // expected-warning{{no previous extern declaration for non-static var... | // RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s
// Variable declarations that should trigger a warning.
int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
int vbad2 = 10; // expected-warning{{no previous extern declaration for non-static var... | Extend the tests for -Wmissing-variable-declarations. | Extend the tests for -Wmissing-variable-declarations.
We shouldn't throw a warning when the static keyword is not present in
an anonymous namespace, just like we do for -Wmissing-prototypes.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@290443 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
e09d99c40712302996913026f0a2cf07ba71cf8a | src/Engine/Physics/GlmConversion.cpp | src/Engine/Physics/GlmConversion.cpp | #include "GlmConversion.hpp"
namespace Physics {
btVector3 glmToBt(glm::vec3 const& vec) {
return btVector3(vec.x, vec.y, vec.z);
}
glm::vec3 btToGlm(btVector3 const& vec) {
return glm::vec3(vec.getX(), vec.getY(), vec.getZ());
}
glm::quat btToGlm(btQuaternion const& quat) {
... | #include "GlmConversion.hpp"
namespace Physics {
btVector3 glmToBt(glm::vec3 const& vec) {
return btVector3(vec.x, vec.y, vec.z);
}
glm::vec3 btToGlm(btVector3 const& vec) {
return glm::vec3(vec.getX(), vec.getY(), vec.getZ());
}
glm::quat btToGlm(btQuaternion const& quat) {
... | Fix error when converting Bullet quaternion to GLM quaternion. | Fix error when converting Bullet quaternion to GLM quaternion.
| C++ | mit | Chainsawkitten/LargeGameProjectEngine,Chainsawkitten/LargeGameProjectEngine |
5b7ba53480dd4dedfdefcd4b861b36d960424613 | browser/browser.cpp | browser/browser.cpp | // Copyright (c) 2011 Hewlett-Packard Development Company, L.P. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <QUrl>
#include <QWebView>
#include "browser.h"
Browser::Browser(QWidget *parent)
: QMainWindow(parent)
{
setup... | // Copyright (c) 2011 Hewlett-Packard Development Company, L.P. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <QUrl>
#include <QWebView>
#include "browser.h"
Browser::Browser(QWidget *parent)
: QMainWindow(parent)
{
setup... | Enable WebGL in QtBrowser if able to. | Enable WebGL in QtBrowser if able to. | C++ | bsd-3-clause | mltframework/webvfx,rectalogic/webvfx,mltframework/webvfx,rectalogic/webvfx,mltframework/webvfx,rectalogic/webvfx,rectalogic/webvfx |
d0f892e17896cb014eb29d5d546e99d0743e4c00 | VajraFramework/Vajra/Framework/OpenGL/OpenGLCounter/OpenGLCounter.cpp | VajraFramework/Vajra/Framework/OpenGL/OpenGLCounter/OpenGLCounter.cpp | #include "Vajra/Framework/Core/Framework.h"
#include "Vajra/Framework/Logging/Logger.h"
#include "Vajra/Framework/OpenGL/OpenGLCounter/OpenGLCounter.h"
OpenGLCounter::OpenGLCounter() {
this->init();
}
OpenGLCounter::~OpenGLCounter() {
this->destroy();
}
void OpenGLCounter::CountGlCall(const char* /* glFunctionName... | #include "Vajra/Framework/Core/Framework.h"
#include "Vajra/Framework/Logging/Logger.h"
#include "Vajra/Framework/OpenGL/OpenGLCounter/OpenGLCounter.h"
OpenGLCounter::OpenGLCounter() {
this->init();
}
OpenGLCounter::~OpenGLCounter() {
this->destroy();
}
void OpenGLCounter::CountGlCall(const char* /* glFunctionName... | Stop spamming number of gl calls to console. | Stop spamming number of gl calls to console.
| C++ | mit | VajraFramework/Vajra,VajraFramework/Vajra,VajraFramework/Vajra,VajraFramework/Vajra,VajraFramework/Vajra |
8c9f64e800ba0db577f9e56179e9b8e0f9421601 | net/http/http_auth_handler_basic_unittest.cc | net/http/http_auth_handler_basic_unittest.cc | // Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h"
#include "base/basictypes.h"
#include "net/http/http_auth_handler_basic.h"
namespace net {
TEST... | // Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h"
#include "base/basictypes.h"
#include "net/http/http_auth_handler_basic.h"
namespace net {
TEST... | Add an HTTP basic auth unit test for an empty username. | Add an HTTP basic auth unit test for an empty username.
R=eroman
BUG=297
Review URL: http://codereview.chromium.org/8859
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@4109 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,robclark/chromium,zcbenz/cefode-chromium,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium... |
8aaa575de13f024e42de4ab7e92eae5a28758378 | PrimaryTreeIndex.cpp | PrimaryTreeIndex.cpp | #include "PrimaryTreeIndex.h"
void PrimaryTreeIndex::buildIndex(Table & table, int column) {
int rowno = 0;
for(auto currentRow : table) {
index.insert( std::pair<std::string, int>(currentRow[column], rowno++) );
}
}
int PrimaryTreeIndex::size() const {
return index.size();
}
| #include "PrimaryTreeIndex.h"
void PrimaryTreeIndex::buildIndex(Table & table, int column) {
int rowno = 0;
for(auto currentRow : table) {
index.emplace(currentRow[column], rowno++);
}
}
int PrimaryTreeIndex::size() const {
return index.size();
}
| Use emplace instead of insert | Use emplace instead of insert
| C++ | apache-2.0 | spakai/index_search,spakai/index_search |
e811e6ce3251ad3d4528b125d1d86da8281e852e | Test/CXXException.cc | Test/CXXException.cc |
extern "C" void throw_int()
{
throw 12;
}
extern "C" void throw_id();
extern "C" int id_catchall;
extern "C" int catchall()
{
try
{
throw_id();
}
catch(...)
{
id_catchall = 1;
throw;
}
__builtin_trap();
}
|
extern "C" void throw_int()
{
throw 12;
}
extern "C" void throw_id();
extern "C" int catchall()
{
try
{
throw_id();
}
catch(...)
{
throw;
}
__builtin_trap();
}
| Fix build failure in test. | Fix build failure in test.
| C++ | mit | gnustep/libobjc2,gnustep/libobjc2 |
5f301b9d8ca4287e452b3ded3b692d98d35716a2 | OpenROV/CalibrationLaser.cpp | OpenROV/CalibrationLaser.cpp | #include "AConfig.h"
#if(HAS_STD_CALIBRATIONLASERS)
#include "Device.h"
#include "Pin.h"
#include "CalibrationLaser.h"
#include "Settings.h"
Pin claser("claser", CALIBRATIONLASERS_PIN, claser.analog, claser.out);
void CalibrationLaser::device_setup(){
Settings::capability_bitarray |= (1 << CALIBRATION_LASERS_CAPA... | #include "AConfig.h"
#if(HAS_STD_CALIBRATIONLASERS)
#include "Device.h"
#include "Pin.h"
#include "CalibrationLaser.h"
#include "Settings.h"
Pin claser("claser", CALIBRATIONLASERS_PIN, claser.analog, claser.out);
void CalibrationLaser::device_setup(){
Settings::capability_bitarray |= (1 << CALIBRATION_LASERS_CAPA... | Revert "Revert "Adding laser indicator"" | Revert "Revert "Adding laser indicator""
This reverts commit 282ea0b855b20d23abed1a45d7fcfc311a9ef623.
| C++ | mit | binary42/openrov-software-arduino,spiderkeys/openrov-software-arduino,dieface/openrov-software-arduino,OpenROV/openrov-software-arduino,johan--/openrov-software-arduino,dieface/openrov-software-arduino,OpenROV/openrov-software-arduino,johan--/openrov-software-arduino,LeeCheongAh/openrov-software-arduino,spiderkeys/open... |
d627374598a1766c018b0099e9d29b368c3f98f6 | Plugins/org.commontk.dah.examplehost/ctkHostedAppPlaceholderWidget.cpp | Plugins/org.commontk.dah.examplehost/ctkHostedAppPlaceholderWidget.cpp | /*=============================================================================
Library: CTK
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the ... | /*=============================================================================
Library: CTK
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the ... | Fix getAbsolutePosition() providing position for hosted app | Fix getAbsolutePosition() providing position for hosted app
| C++ | apache-2.0 | Sardge/CTK,Heather/CTK,AndreasFetzer/CTK,Sardge/CTK,ddao/CTK,fedorov/CTK,commontk/CTK,CJGoch/CTK,151706061/CTK,commontk/CTK,jcfr/CTK,commontk/CTK,CJGoch/CTK,151706061/CTK,jcfr/CTK,pieper/CTK,msmolens/CTK,finetjul/CTK,ddao/CTK,sankhesh/CTK,CJGoch/CTK,danielknorr/CTK,espakm/CTK,fedorov/CTK,SINTEFMedtek/CTK,sankhesh/CTK,v... |
983140043ed3da50d1630b291b18dbd326b1cc28 | mainwindow.cpp | mainwindow.cpp | #include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new QWidget(this);
layout = new QGridLayout(widget);
loadImageButton = new QPushButton("Load Image", widget);
connect(load... | #include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
widget = new QWidget(this);
layout = new QGridLayout(widget);
loadImageButton = new QPushButton("Load Image", widget);
connect(load... | Set a text for the label while the image is loading | Set a text for the label while the image is loading
| C++ | mit | frostblooded/ImageAlterer |
33e2a1266134a045d12da7e58464d453651d0f4a | src/planner/main_action_planner/src/send_posture.cpp | src/planner/main_action_planner/src/send_posture.cpp | #include "impl_send_posture.hpp"
#include "algorithm"
#include "std_srvs/Empty.h"
SendPostureFactory SendPostureFactory::unique;
SendPostureFactory::SendPostureFactory() : sends() {}
SendPostureFactory::~SendPostureFactory() {
for (auto it = sends.begin(), end_it = sends.end();
it != end_it;
it++) ... | #include "impl_send_posture.hpp"
#include "std_srvs/Empty.h"
#include<algorithm>
SendPostureFactory SendPostureFactory::unique;
SendPostureFactory::SendPostureFactory() : sends() {}
SendPostureFactory::~SendPostureFactory() {
for (auto it = sends.begin(), end_it = sends.end();
it != end_it;
it++) {... | Update header include for standard library | Update header include for standard library
| C++ | mit | agrirobo/arcsys2,agrirobo/arcsys2 |
0b0be689e001e26228c36b78145dc00c363ad184 | arduino/lib/Telemetry/GenericSensor.cpp | arduino/lib/Telemetry/GenericSensor.cpp | #include "GenericSensor.h"
GenericSensor::GenericSensor(const char* name,
uint8_t bufsize,
unsigned long sample_interval,
unsigned long send_interval)
{
_name = name;
_interval_sampling = sample_interval;
_interval_sendi... | #include "GenericSensor.h"
GenericSensor::GenericSensor(const char* name,
uint8_t bufsize,
unsigned long sample_interval,
unsigned long send_interval)
{
_name = name;
_interval_sampling = sample_interval;
_interval_sendi... | Fix missing scaling factor application | Fix missing scaling factor application
| C++ | mit | wonkoderverstaendige/telemetry,wonkoderverstaendige/telemetry,wonkoderverstaendige/telemetry |
b306aefd01b817ebd3f6623657915f60b29dc365 | samples/iolib/src/main/cpp/player/SampleBuffer.cpp | samples/iolib/src/main/cpp/player/SampleBuffer.cpp | /*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | /*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Set pointer to null on delete. | Set pointer to null on delete.
| C++ | apache-2.0 | google/oboe,google/oboe,google/oboe,google/oboe,google/oboe,google/oboe |
953080c3260d9849e18cac88bf673a0938111494 | impl11/ddraw/dllmain.cpp | impl11/ddraw/dllmain.cpp | // Copyright (c) 2014 Jrmy Ansel
// Licensed under the MIT license. See LICENSE.txt
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <Windows.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
c... | // Copyright (c) 2014 Jrmy Ansel
// Licensed under the MIT license. See LICENSE.txt
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN
#define STRICT
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
c... | Fix compilation on case-sensitive filesystem. | Fix compilation on case-sensitive filesystem.
| C++ | mit | rdoeffinger/xwa_ddraw_d3d11,rdoeffinger/xwa_ddraw_d3d11 |
6f28af536e97ee8fee434ef9c666f7833b379b81 | main.cc | main.cc | #include "pdbreader.hh"
#include "yapdbr.hh"
void printList(atomsList &l) {
atomsList::iterator it1 = l.begin(), it2 = l.end();
for (; it1 != it2; ++it1) {
std::cout << std::get<0>(*it1) << " " << std::get<1>(*it1) << " " << std::get<2>(*it1) << "<-\n";
}
}
int main() {
std::string file = st... | #include <pdbreader.hh>
#include <yapdbr.hh>
void printList(atomsList &l) {
atomsList::iterator it1 = l.begin(), it2 = l.end();
for (; it1 != it2; ++it1) {
std::cout << std::get<0>(*it1) << " " << std::get<1>(*it1) << " " << std::get<2>(*it1) << "<-\n";
}
}
int main() {
std::string file = std... | Use <> instead "" for include local libs | Use <> instead "" for include local libs
| C++ | mit | eendru/yapdbr |
fb9aac85cd42d893b79efe29fc3a01af7bad178a | lib/System/Linux/TimeValue.cpp | lib/System/Linux/TimeValue.cpp | //===- Linux/TimeValue.cpp - Linux TimeValue Implementation -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===------------------... | //===- Linux/TimeValue.cpp - Linux TimeValue Implementation -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by Reid Spencer and is distributed under the
// University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===------------------... | Include the correct implementation file | Include the correct implementation file
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@17778 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm... |
d4921b25cd15f215b3c4ef8da02b21487192d01d | common.cpp | common.cpp | #include <common.hpp>
void radio_reset()
{
// reset
radio::select();
radio::wcmd<radio::SRES>();
radio::release();
radio::select();
// 433MHz center freq
radio::set<radio::FREQ2>(0x10);
radio::set<radio::FREQ1>(0xa7);
radio::set<radio::FREQ0>(0x63);
// modulation
radio::set<radio::MDMCFG2>(0x1a);
// ca... | #include <common.hpp>
void radio_reset()
{
// reset
radio::select();
radio::wcmd<radio::SRES>();
radio::release();
radio::select();
// 433MHz center freq
radio::set<radio::FREQ2>(0x10);
radio::set<radio::FREQ1>(0xa7);
radio::set<radio::FREQ0>(0x63);
// modulation
radio::set<radio::MDMCFG2>(0x1e);
// ca... | Enable CS for sync word detection | Enable CS for sync word detection
| C++ | bsd-3-clause | rkojedzinszky/thermo-sensor,rkojedzinszky/thermo-sensor,rkojedzinszky/thermo-sensor |
c0a3d566e8a7960a572c46b4c789a763175b82f3 | logicTest.cpp | logicTest.cpp | #include "logic.cpp"
#include <iostream>
#include <cstdlib>
int main( void );
void printCoords( block* b );
int rotationTest( void );
int main( void )
{
std::cout << "Rotation Test : " << (rotationTest())? "PASSED\n" : "FAILED\n";
exit( EXIT_SUCCESS );
}
void printCoords( block *b )
{
for( int i = 0; i < PIECE... | #include "logic.cpp"
#include <iostream>
#include <cstdlib>
int main( void );
void printCoords( block* b );
int rotationTest( void );
int main( void )
{
std::cout << "Rotation Test : " << (rotationTest())? "PASSED\n" : "FAILED\n";
exit( EXIT_SUCCESS );
}
void printCoords( block *b )
{
for( int i = 0; i < PIECE... | Update rotation test with actual checking | Update rotation test with actual checking
| C++ | apache-2.0 | MarkMcCaskey/tetrinos |
e36cbcb99102488e545fa1fad3f14fa6546ea7c8 | src/waitpid.cc | src/waitpid.cc | #include <v8.h>
#include <node.h>
#include <sys/wait.h>
#include <errno.h>
using namespace v8;
using namespace node;
static Handle<Value> Waitpid(const Arguments& args) {
HandleScope scope;
int r, target, *status = NULL;
if (args[0]->IsInt32()) {
target = args[0]->Int32Value();
r = waitpid(target, sta... | #include <v8.h>
#include <node.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
using namespace v8;
using namespace node;
static Handle<Value> Waitpid(const Arguments& args) {
HandleScope scope;
int r, child, status;
if (args[0]->IsInt32()) {
child = args[0]->Int32Value()... | Handle exit vs signal better. | [api] Handle exit vs signal better.
| C++ | mit | AvianFlu/node-waitpid,AvianFlu/node-waitpid,AvianFlu/node-waitpid |
5f9a05f1eea613ac7c34f4b02e606405985b422c | src/graphics/transfer_function_manager.cpp | src/graphics/transfer_function_manager.cpp | #include "./transfer_function_manager.h"
#include <QLoggingCategory>
#include <stdexcept>
#include "./texture_manager.h"
#include "./texture2d.h"
#include "../utils/gradient_utils.h"
namespace Graphics
{
// QLoggingCategory tfChan("Graphics.TransferFunction");
TransferFunctionManager::TransferFunctionManager(
st... | #include "./transfer_function_manager.h"
#include <QLoggingCategory>
#include <stdexcept>
#include "./texture_manager.h"
#include "./texture2d.h"
#include "../utils/gradient_utils.h"
namespace Graphics
{
// QLoggingCategory tfChan("Graphics.TransferFunction");
TransferFunctionManager::TransferFunctionManager(
st... | Fix error in return value from TransferFunctionManager::add. | Fix error in return value from TransferFunctionManager::add.
| C++ | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
b1d292630156f50424d57f12b0c83025b34edc4b | test/Profile/cxx-virtual-destructor-calls.cpp | test/Profile/cxx-virtual-destructor-calls.cpp | // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -main-file-name cxx-virtual-destructor-calls.cpp %s -o - -fprofile-instr-generate | FileCheck %s
struct Member {
~Member();
};
struct A {
virtual ~A();
};
struct B : A {
Member m;
virtual ~B();
};
// Complete dtor
// CHECK: @__llvm_profile_name__ZN1B... | // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -main-file-name cxx-virtual-destructor-calls.cpp %s -o - -fprofile-instr-generate | FileCheck %s
struct Member {
~Member();
};
struct A {
virtual ~A();
};
struct B : A {
Member m;
virtual ~B();
};
// Complete dtor
// CHECK: @__llvm_profile_name_... | Remove darwin-specific section names from this test | InstrProf: Remove darwin-specific section names from this test
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@237805 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | 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,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
6192ff29aeff277fce10b27d9b81b3ebe0d0bdf0 | src/loader.cpp | src/loader.cpp | #include "loader.h"
#include "gridmanager.h"
#include "bytebuffer.h"
#include "file.h"
GridManager* Loader::Load()
{
size_t size;
char* buffer;
File::Load(_fileName.c_str(), buffer, size);
ByteBuffer bb(size);
bb.WriteBuffer(buffer, size);
delete[] buffer;
return GridManager::Load(bb);
}... | #include "loader.h"
#include "gridmanager.h"
#include "bytebuffer.h"
#include "file.h"
GridManager* Loader::Load()
{
size_t size;
char* buffer;
if (!File::Load(_fileName.c_str(), buffer, size))
{
delete[] buffer;
return NULL;
}
ByteBuffer bb(size);
bb.WriteBuffer(buffer, si... | Fix a crash when loading unexisting file | Fix a crash when loading unexisting file
| C++ | mit | DDuarte/feup-aeda-grid,DDuarte/feup-aeda-grid |
737459df795e9a83835d1c69bd6e2ec4389b1534 | lib/Support/PluginLoader.cpp | lib/Support/PluginLoader.cpp | //===-- PluginLoader.cpp - Implement -load command line option ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | //===-- PluginLoader.cpp - Implement -load command line option ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | Use System/DynamicLibrary instead of Support/DynamicLinker to implement. | Use System/DynamicLibrary instead of Support/DynamicLinker to implement.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@18356 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/... |
4f5882b87eb1150154089dbd191fe24e496ef6df | test/mutex.cpp | test/mutex.cpp | #include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <vector>
#include "Thread/Mutex.hh"
#include "Thread/Thread.hpp"
int increment_value;
struct mock
{
int _data;
LilWrapper::Mutex _access;
};
void increment(struct mock *m)
{
m->_access.lock();
for (int i = 0; i < increment_value; i++)
m->... | #include <iostream>
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <vector>
#include "Thread/Mutex.hh"
#include "Thread/Thread.hpp"
int increment_value;
struct mock
{
int _data;
LilWrapper::Mutex _access;
};
void increment(mock *m)
{
m->_access.lock();
for (int i = 0; i < increment_value;... | Add some output and make code more readable. | Add some output and make code more readable.
| C++ | mit | aliou/lilwrapper |
341ada321433c5626f0cfcf643fda13be3bc3202 | Source/AtomicEditor/WebView/WebProcessHelperMac.cpp | Source/AtomicEditor/WebView/WebProcessHelperMac.cpp | // Copyright (c) 2013 The Chromium Embedded Framework 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 <AtomicWebView/Internal/WebAppOther.h>
#include <AtomicWebView/Internal/WebAppRenderer.h>
using namespace Atomic;
#inclu... | // Copyright (c) 2013 The Chromium Embedded Framework 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 <AtomicWebView/AtomicWebView.h>
// Entry point function for sub-processes.
int main(int argc, char* argv[])
{
return ... | Use WebMain for web helper executable on OS X | Use WebMain for web helper executable on OS X
| C++ | mit | rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine,rsredsq/AtomicGameEngine |
aedf43fb3cf44ec248fefa4a227c98210d956b95 | tensorflow/core/tpu/graph_rewrite/distributed_tpu_rewrite_pass_internal.cc | tensorflow/core/tpu/graph_rewrite/distributed_tpu_rewrite_pass_internal.cc | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Use standard absl::BitGen instead of function unavailable in open-source absl | Use standard absl::BitGen instead of function unavailable in open-source absl
PiperOrigin-RevId: 322697824
Change-Id: I98242ddd7368d4d302e0ddea52ea5626bd064d45
| C++ | apache-2.0 | tensorflow/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,Intel-tensorflow/tensorflow,gautam1858... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.