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
51c47348285aa98f37466dabc050857e6d48f05d
lib/Fuzzer/test/InitializeTest.cpp
lib/Fuzzer/test/InitializeTest.cpp
// This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // Make sure LLVMFuzzerInitialize is called. #include <assert.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static char *argv0; extern "C" int LLVM...
// This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // Make sure LLVMFuzzerInitialize is called. #include <assert.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static char *argv0; extern "C" int LLVM...
Revert "[libFuzzer tests] Use substring comparison in libFuzzer tests"
Revert "[libFuzzer tests] Use substring comparison in libFuzzer tests" This reverts commit 3592d8049660dcdd07f7c2e797f2de9790f93111. Breaks the bots, reverting for now. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309899 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mi...
fa3d9ab2997f3d51543bf4f0218186ca0ef30fb3
questions/html-get-24965972/main.cpp
questions/html-get-24965972/main.cpp
// https://github.com/KubaO/stackoverflown/tree/master/questions/html-get-24965972 #include <QtNetwork> #include <functional> void htmlGet(const QUrl &url, const std::function<void(const QString&)> & fun) { QScopedPointer<QNetworkAccessManager> manager(new QNetworkAccessManager); QNetworkReply * response = manag...
// https://github.com/KubaO/stackoverflown/tree/master/questions/html-get-24965972 #include <QtNetwork> #include <functional> void htmlGet(const QUrl &url, const std::function<void(const QString&)> &fun) { QScopedPointer<QNetworkAccessManager> manager(new QNetworkAccessManager); QNetworkReply *response = manager...
Fix to make it work.
Fix to make it work.
C++
unlicense
KubaO/stackoverflown,KubaO/stackoverflown,KubaO/stackoverflown
4dcb3c01699415863b6f2340936bcc95412b5e1f
pyQuantuccia/src/pyQuantuccia.cpp
pyQuantuccia/src/pyQuantuccia.cpp
#include <Python.h> #include "Quantuccia/ql/time/calendars/unitedstates.hpp" static PyObject* get_holiday_date(PyObject *self, PyObject *args) { return NULL; } static PyMethodDef QuantucciaMethods[] = { {"get_holiday_date", (PyCFunction)get_holiday_date, METH_VARARGS, NULL}, {NULL, NULL} /* Sentinel...
#include <Python.h> #include "Quantuccia/ql/time/calendars/unitedstates.hpp" static PyObject* get_holiday_date(PyObject *self, PyObject *args) { return NULL; } static PyMethodDef QuantucciaMethods[] = { {"get_holiday_date", (PyCFunction)get_holiday_date, METH_VARARGS, NULL}, {NULL, NULL} /* Sentinel...
Correct name of module initializer.
Correct name of module initializer.
C++
bsd-3-clause
jwg4/pyQuantuccia,jwg4/pyQuantuccia
b2d7e710de9cd6b7ea74f186aacada9daba47e72
src/defcalc/defcalc.cpp
src/defcalc/defcalc.cpp
//// Basic implementation of the icalcterm interface #include "icalc/icalc.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #define EXPORT __attribute__ ((visibility ("default"))) extern "C" { void EXPORT CI_init( CI_Config* config ) { printf("Starting defcalc.\n"); } // Note: this function retu...
Add basic implemention of icalc interface
Add basic implemention of icalc interface
C++
bsd-2-clause
dpacbach/calcterm,dpacbach/calcterm,dpacbach/calcterm,dpacbach/calcterm
9bd5a04467c4a6c79e6ae9fe48230e33314d0afd
test/asan/TestCases/Posix/bcmp_test.cc
test/asan/TestCases/Posix/bcmp_test.cc
// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s // REQUIRES: compiler-rt-optimized // U...
// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s // REQUIRES: compiler-rt-optimized // U...
Disable failing test on darwin during investigation.
[compiler-rt] Disable failing test on darwin during investigation. /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/projects/compiler-rt/test/asan/TestCases/Posix/bcmp_test.cc:14:12: error: CHECK: expected string not found in input // CHECK: {{#1.*bcmp}} ^ <stdin>:2:57: note: scanning fro...
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
2b65eeba66e150271f752056b57c1f73526cc2db
test/CoverageMapping/trymacro.cpp
test/CoverageMapping/trymacro.cpp
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fexceptions -fcxx-exceptions -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name trymacro.cpp %s | FileCheck %s // CHECK: Z3fn1v: void fn1() try { return; } // CHECK: [[@LINE]]:12 -> [[@LINE+1]]:14 = #1 catch(...)...
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fexceptions -fcxx-exceptions -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name trymacro.cpp %s | FileCheck %s // CHECK: Z3fn1v: void fn1() try { return; } // CHECK: [[@LINE]]:12 -> [[@LINE+1]]:14 = #1 catch(...)...
Fix a typo in the test for r243066
InstrProf: Fix a typo in the test for r243066 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@243068 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/cl...
882cc0598bdf25a61064a0230def835500b5143d
code/ranlux32.cpp
code/ranlux32.cpp
/* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include <iostream> #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), prev(0), count(0), state(), index(0) {} void RANLUX32::seed(fuint se...
/* * rngs * ECE 541 Project 2 * Kashev Dalmia - dalmia3 * David Huang - huang157 */ #include "ranlux32.h" namespace rng { RANLUX32::RANLUX32() : RandomNumberGenerator(), prev(0), count(0), state(), index(0) {} void RANLUX32::seed(fuint seed_num) { st...
Remove iostream inclusion in RANLUX
Remove iostream inclusion in RANLUX
C++
mit
kashev/rngs,kashev/rngs,kashev/rngs
da4842e266becaca6ca4b46428c277fc5fbadc7a
lib/Target/ARM/ARMTargetAsmInfo.cpp
lib/Target/ARM/ARMTargetAsmInfo.cpp
//===-- ARMTargetAsmInfo.cpp - ARM asm properties ---------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by James M. Laskey and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. // //===------------------...
//===-- ARMTargetAsmInfo.cpp - ARM asm properties ---------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by James M. Laskey and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. // //===------------------...
Define StaticCtorsSection and StaticDtorsSection for ARM.
Define StaticCtorsSection and StaticDtorsSection for ARM. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@32763 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,apple/s...
c983fc00fb4b4d6c17f76f628e0df7b340033817
si.cpp
si.cpp
#include <iostream> #include "word.h" using namespace std; string make_outfile(string namefile); int main(int argc, char* argv[]) { Word word; if (argc < 2) { cerr << "Usage: si [origin].si [destination].cpp" << endl; exit(EXIT_FAILURE); } ...
#include <iostream> #include "word.h" using namespace std; string make_outfile(string namefile); int main(int argc, char* argv[]) { Word word; if (argc < 2) { cerr << "Usage: si origin.si [destination.cpp]" << endl; exit(EXIT_FAILURE); } else if (argc...
Add a sanity check for the input file
Add a sanity check for the input file
C++
mit
akercheval/si
09c41e422d9e53261e3d1431129e02d58a4c14a9
job.cpp
job.cpp
#include <iostream> #include <string> #include "job.h" Job::Job(int id, std::string machine_name) : job_id(id), state(State::Moveable), machine(machine_name) { std::cout << "Created new job: " << id << std::endl; } int Job::get_id() const { return job_id; } const std::string& Job::get_machine() const { ...
#include <iostream> #include <string> #include "job.h" Job::Job(int id, std::string machine_name) : job_id(id), machine(machine_name), state(State::Moveable) { std::cout << "Created new job: " << id << std::endl; } int Job::get_id() const { return job_id; } const std::string& Job::get_machine() const { ...
Change the order of variables in the constructor init list
Change the order of variables in the constructor init list Member variables are always initialised in the order in which they were declared in the class. If an initialiser list uses a different order, the initialisations will be re-ordered by the compiler to match the order of declaration. In some cases, this can lead...
C++
mit
mattportas/yejong
be04ede842463605ce8e655b972f13db1123628f
src/linux/linuxopenglcontext.cc
src/linux/linuxopenglcontext.cc
#include <GL/glx.h> #include "linuxwindow.hh" #include "system/openglcontext.hh" #include <iostream> class LinuxOpenGLContext : public System::OpenGLContext { public: LinuxOpenGLContext(System::Window *window) : _window((LinuxWindow *)window) { Display *display = _window->getDisplay(); ...
#include <GL/glx.h> #include "linuxwindow.hh" #include "system/openglcontext.hh" class LinuxOpenGLContext : public System::OpenGLContext { public: LinuxOpenGLContext(System::Window *window) : _window((LinuxWindow *)window) { Display *display = _window->getDisplay(); ::Window windowHand...
Clean up a couple things
Clean up a couple things
C++
mit
Frinter/fire-frame,Frinter/fire-frame
660a76be9b36fe39f92fa18293def9136cc82730
src/RateLimit.cpp
src/RateLimit.cpp
#include <libclientserver.h> RateLimit::RateLimit() { m_last = {0, 0}; } RateLimit::~RateLimit() { } void RateLimit::SetTimeout(const struct timespec *tv) { memcpy(&m_timeout, tv, sizeof(*tv)); } bool RateLimit::Check() { struct timespec now; struct timespec when; Time::MonoTonic(&now); Time::Add(&now, &m_t...
#include <libclientserver.h> RateLimit::RateLimit() { m_last.tv_sec = 0; m_last.tv_nsec = 0; } RateLimit::~RateLimit() { } void RateLimit::SetTimeout(const struct timespec *tv) { memcpy(&m_timeout, tv, sizeof(*tv)); } bool RateLimit::Check() { struct timespec now; struct timespec when; Time::MonoTonic(&now)...
Fix compiler warning which is not support until c++11
Fix compiler warning which is not support until c++11
C++
mit
mistralol/libclientserver,mistralol/libclientserver
e29c1785fc2f5cddd4e3db459588f41b6a7a3863
chrome/browser/extensions/extension_bookmarks_apitest.cc
chrome/browser/extensions/extension_bookmarks_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" // Flaky, http://crbug.com/19866. Please consult phajdan.jr before re-enabling. IN_PROC_BROW...
// 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" // Flaky, http://crbug.com/19866. Please consult phajdan.jr before re-enabling. IN_PROC_BROW...
Move ExtensionApiTest.Bookmarks from DISABLED to FLAKY since it doesn't crash.
Move ExtensionApiTest.Bookmarks from DISABLED to FLAKY since it doesn't crash. BUG=19866 TEST=ExtensionApiTest.Bookmarks Review URL: http://codereview.chromium.org/465034 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@33822 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
mogoweb/chromium-crosswalk,ltilve/chromium,ondra-novak/chromium.src,zcbenz/cefode-chromium,robclark/chromium,Chilledheart/chromium,keishi/chromium,mogoweb/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,keishi/chromium,keish...
188a73c58c845e86793c31099a317b7b3bcd865c
practice02/02.cpp
practice02/02.cpp
#include <stdio.h> int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); int t; if(a > b) t = a, a = b, b = t; if(b > c) t = b, b = c, c = t; if(a > b) t = a, a = b, b = t; printf("%d %d %d\n", a, b, c); return 0; }
#include <stdio.h> int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a > b) { int tmp = a; a = b; b = tmp; } if(b > c) { int tmp = b; b = c; c = tmp; } if(a > b) { int tmp = a; a = b; b = tmp; } printf("%d %d %d\n", a, b, c); return 0; }
Reduce a scope of the temporary variable
Reduce a scope of the temporary variable
C++
mit
kdzlvaids/problem_solving-pknu-2016,kdzlvaids/problem_solving-pknu-2016
ba010b1ac045db55edf95eeb1a825e507cfabdbb
libcoroutine/Coro.cc
libcoroutine/Coro.cc
#ifndef SCHEDULER_CORO_OSTHREAD # include "Coro.c" #endif
#include <sdk/config.h> #ifndef SCHEDULER_CORO_OSTHREAD # include "Coro.c" #endif
Include sdk/config.h before testing configuration macros.
Include sdk/config.h before testing configuration macros. * src/scheduler/libcoroutine/Coro.cc: Here.
C++
bsd-3-clause
aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport
7798a5020aca61cf96eb783fbf0de201bd2b8553
chrome/test/remoting/webapp_javascript_unittest.cc
chrome/test/remoting/webapp_javascript_unittest.cc
// Copyright 2014 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/path_service.h" #include "chrome/test/remoting/qunit_browser_test_runner.h" #if defined(OS_MACOSX) #include "base/mac/foundation_util.h" #...
// Copyright 2014 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/path_service.h" #include "chrome/test/remoting/qunit_browser_test_runner.h" #if defined(OS_MACOSX) #include "base/mac/foundation_util.h" #...
Fix path to remoting webapp unittest results.
Fix path to remoting webapp unittest results. This was missed in the cleanup in crrev.com/984203003, leading to a mismatch between the generated unittests.html and the filename expected by the browser-test driver, and thereby breaking the tests once a build clobber had removed the old-named file. BUG=466752 Review U...
C++
bsd-3-clause
chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888...
1b730b5e4e1aff438d07f60e0790894ee125fca3
src/expand/rustc_diagnostics.cpp
src/expand/rustc_diagnostics.cpp
/* * MRustC - Rust Compiler * - By John Hodge (Mutabah/thePowersGang) * * expand/rustc_diagnostics.cpp * - Stubbed handling for __register_diagnostic and __diagnostic_used */ #include <synext.hpp> #include <parse/common.hpp> // TokenTree etc #include <parse/ttstream.hpp> class CExpanderRegisterDiagnostic: p...
/* * MRustC - Rust Compiler * - By John Hodge (Mutabah/thePowersGang) * * expand/rustc_diagnostics.cpp * - Stubbed handling for __register_diagnostic and __diagnostic_used */ #include <synext.hpp> #include <parse/common.hpp> // TokenTree etc #include <parse/ttstream.hpp> class CExpanderRegisterDiagnostic: p...
Expand - Handle another rustc internal macro
Expand - Handle another rustc internal macro
C++
mit
thepowersgang/mrustc,thepowersgang/mrustc,thepowersgang/mrustc,thepowersgang/mrustc,thepowersgang/mrustc
f50189a449fac45303341bc08e79b96308a57215
Common/TargetOptionsCommandFlags.cpp
Common/TargetOptionsCommandFlags.cpp
//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
Fix for file renaming in LLVM (CommandFlags.h -> CommandFlags.def)
Fix for file renaming in LLVM (CommandFlags.h -> CommandFlags.def) git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@319084 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/lld,llvm-mirror/lld
08a011ba8a711fdb9908341958fa9869bbc7ccd1
src/Propagator.cc
src/Propagator.cc
/* * Copyright (C) 2017 Mario Alviano (mario@alviano.net) * * 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 ...
/* * Copyright (C) 2017 Mario Alviano (mario@alviano.net) * * 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 ...
Fix warning for nonused parameter.
Fix warning for nonused parameter.
C++
apache-2.0
alviano/zuccherino,alviano/zuccherino
06758d0ea712795fe0ff5c2dee4b9a162569dfef
test/CodeGenCXX/virt.cpp
test/CodeGenCXX/virt.cpp
// RUN: clang-cc %s -emit-llvm -o - -std=c++0x class A { public: virtual void foo(); }; static_assert (sizeof (A) == (sizeof(void *)), "vtable pointer layout");
// RUN: clang-cc -triple x86_64-apple-darwin -frtti=0 -std=c++0x -S %s -o %t-64.s && // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s && // RUN: clang-cc -triple i386-apple-darwin -frtti=0 -std=c++0x -S %s -o %t-32.s && // RUN: FileCheck -check-prefix LP32 -input-file=%t-32.s %s && // RUN: true class A { p...
Test cases for some recent work.
Test cases for some recent work. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@78100 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
678e833e0112da0c2f8dd46c1a2f2dd0172e4554
ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.cpp
ReactCommon/fabric/uimanager/ComponentDescriptorProviderRegistry.cpp
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ComponentDescriptorProviderRegistry.h" namespace facebook { namespace react { void ComponentDescriptorProviderRegistry...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ComponentDescriptorProviderRegistry.h" namespace facebook { namespace react { void ComponentDescriptorProviderRegistry...
Fix creation of new ComponentDescriptorRegistry when switching surface
Fix creation of new ComponentDescriptorRegistry when switching surface Summary: # Problem: I enabled Fabric for "Profile About", when I navigate to "Marketplace Home" from "Profile About", I get following warning "<Component> is not Fabric compatible yet". Even though the component has been migrated to Fabric and is g...
C++
mit
javache/react-native,facebook/react-native,javache/react-native,myntra/react-native,exponent/react-native,hoangpham95/react-native,javache/react-native,javache/react-native,janicduplessis/react-native,javache/react-native,pandiaraj44/react-native,pandiaraj44/react-native,myntra/react-native,myntra/react-native,hammeran...
bba966add1104c8091ef378324aba316e2da321c
PluginHelpers/ContentControl.cpp
PluginHelpers/ContentControl.cpp
// PluginHelpers.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #include "pluginhelpers.h" #include "ContentControl.h" #include "..\..\ToDoList_Dev\Interfaces\UITheme.h" #include "..\..\ToDoList_Dev\Interfaces\IContentControl.h" //////////////////////////////////////////////////...
// PluginHelpers.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #include "pluginhelpers.h" #include "ContentControl.h" #include "..\..\ToDoList_Dev\Interfaces\UITheme.h" #include "..\..\ToDoList_Dev\Interfaces\IContentControl.h" //////////////////////////////////////////////////...
Fix change in message names
Fix change in message names
C++
epl-1.0
abstractspoon/ToDoList_Plugins,abstractspoon/ToDoList_Plugins,abstractspoon/ToDoList_Plugins
112aed4869c5c6ef428129a7a05b1426e7428812
Settings/Tabs/HotkeyInput.cpp
Settings/Tabs/HotkeyInput.cpp
#include "HotkeyInput.h" #include "../../3RVX/Logger.h" #include "../Controls/Controls.h" #include "KeyGrabber.h" HotkeyInput::HotkeyInput(HWND parent) : Dialog(parent, MAKEINTRESOURCE(IDD_HOTKEYPROMPT)) { } void HotkeyInput::Initialize() { _prompt = new Label(LBL_PROMPT, *this); }
#include "HotkeyInput.h" #include "../../3RVX/Logger.h" #include "../Controls/Controls.h" #include "KeyGrabber.h" HotkeyInput::HotkeyInput(HWND parent) : Dialog(parent, MAKEINTRESOURCE(IDD_HOTKEYPROMPT)) { } void HotkeyInput::Initialize() { _prompt = new Label(LBL_PROMPT, *this); KeyGrabber::Instance()->Set...
Set the dest hwnd and start grabbing keys during init
Set the dest hwnd and start grabbing keys during init
C++
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
823f3f3c5bc2ac9a2a63224356d286f2037a343a
test/cts/device_feature_test_cts.cc
test/cts/device_feature_test_cts.cc
/* * Copyright (C) 2018 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) 2018 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...
Increase core count for PerfettoDeviceFeatureTest am: 542f1ede9d
Increase core count for PerfettoDeviceFeatureTest am: 542f1ede9d Original change: https://android-review.googlesource.com/c/platform/external/perfetto/+/1872395 Change-Id: I9e7d754c0ddc74f3750d94f8a89a71ddda760eed
C++
apache-2.0
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto
4618957d0d6eb015bbc5add5c22e004d3e4390e0
lib/Debugger/FDHandle.cpp
lib/Debugger/FDHandle.cpp
//===- Support/FileUtilities.cpp - File System Utilities ------------------===// // // 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. // //===--------...
//===- lib/Debugger/FDHandle.cpp - File Descriptor Handle -----------------===// // // 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. // //===--------...
Correct the comments and file header.
Correct the comments and file header. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@19120 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-D...
fc57e6d1c6faaf62f63ca3d5f31ab543bb8fbbe7
caffe2/operators/accumulate_op.cc
caffe2/operators/accumulate_op.cc
#include "caffe2/operators/accumulate_op.h" namespace caffe2 { namespace { REGISTER_CPU_OPERATOR(Accumulate, AccumulateOp<float, CPUContext>); OPERATOR_SCHEMA(Accumulate) .NumInputs(1) .NumOutputs(1) // TODO: add Shape inference function (bootcamp) .SetDoc(R"DOC( Accumulate operator accumulates the input tens...
#include "caffe2/operators/accumulate_op.h" namespace caffe2 { namespace { REGISTER_CPU_OPERATOR(Accumulate, AccumulateOp<float, CPUContext>); OPERATOR_SCHEMA(Accumulate) .NumInputs(1) .NumOutputs(1) .IdenticalTypeAndShape() .SetDoc(R"DOC( Accumulate operator accumulates the input tensor to the output tensor....
Implement shape inference function for AccumulateOp
Implement shape inference function for AccumulateOp Summary: Implemented the sharp inference function for AccmulateOp. The output shape and type should be same as the input. Differential Revision: D4518812 fbshipit-source-id: 11fc7ec4fad1fe3049c5a35d13c371627f9e3d11
C++
apache-2.0
xzturn/caffe2,sf-wind/caffe2,pietern/caffe2,Yangqing/caffe2,caffe2/caffe2,bwasti/caffe2,pietern/caffe2,sf-wind/caffe2,sf-wind/caffe2,davinwang/caffe2,bwasti/caffe2,xzturn/caffe2,bwasti/caffe2,davinwang/caffe2,xzturn/caffe2,bwasti/caffe2,Yangqing/caffe2,sf-wind/caffe2,davinwang/caffe2,xzturn/caffe2,davinwang/caffe2,xztu...
219e1c27240d009edf25ce23b6c8e6f581e1d733
examples/HelloWorld/HelloWorld.cpp
examples/HelloWorld/HelloWorld.cpp
#include "HelloWorld.h" void HelloWorld::respond() { out << "Content-type: text/html\r\n\r\n" << flush; out << "<h1>hello, world</h1>"; dumpHash(tr("Get variables"), request.getData()); dumpHash(tr("Server variables"), request.serverData()); } void HelloWorld::dumpHash(const QString& label, const QHash<QString, Q...
#include "HelloWorld.h" void HelloWorld::respond() { out << "Content-type: text/html\r\n\r\n" << flush; out << "<h1>hello, world</h1>"; dumpHash(tr("Get variables"), request.getData()); dumpHash(tr("Post variables"), request.postData()); dumpHash(tr("Server variables"), request.serverData()); } void HelloWorld::...
Make helloworld example also dump post data
Make helloworld example also dump post data
C++
isc
fredemmott/fastcgiqt,fredemmott/fastcgiqt,fredemmott/fastcgiqt
cf5fdb4ec8359ae1f5e86f8f32e62d962af83cd8
test/t/exceptions/test_cases.cpp
test/t/exceptions/test_cases.cpp
#include <test.hpp> TEST_CASE("exceptions messages for pbf exception") { protozero::exception e; REQUIRE(std::string{e.what()} == std::string{"pbf exception"}); } TEST_CASE("exceptions messages for varint too long") { protozero::varint_too_long_exception e; REQUIRE(std::string{e.what()} == std::strin...
#include <test.hpp> TEST_CASE("exceptions messages for pbf exception") { protozero::exception e; REQUIRE(std::string{e.what()} == std::string{"pbf exception"}); } TEST_CASE("exceptions messages for varint too long") { protozero::varint_too_long_exception e; REQUIRE(std::string{e.what()} == std::strin...
Add some tests for new exceptions.
Add some tests for new exceptions.
C++
bsd-2-clause
mapbox/pbf.hpp,mapbox/pbf.hpp,mapbox/pbf.hpp
188d3fe36498045d5d07c832e3616a44d8478031
test/unit/math/opencl/assign_event_test.cpp
test/unit/math/opencl/assign_event_test.cpp
#ifdef STAN_OPENCL #include <stan/math/opencl/opencl.hpp> #include <stan/math/opencl/kernel_cl.hpp> #include <gtest/gtest.h> using stan::math::matrix_cl; using stan::math::opencl_kernels::in_buffer; using stan::math::opencl_kernels::in_out_buffer; using stan::math::opencl_kernels::internal::assign_events; using stan:...
#ifdef STAN_OPENCL #include <stan/math/opencl/opencl.hpp> #include <stan/math/opencl/kernel_cl.hpp> #include <gtest/gtest.h> using stan::math::matrix_cl; using stan::math::opencl_kernels::in_buffer; using stan::math::opencl_kernels::in_out_buffer; using stan::math::opencl_kernels::internal::assign_events; using stan:...
Revert "Forgot to update test for assign_event"
Revert "Forgot to update test for assign_event" This reverts commit 7256c1fbc6e3dfde24d49a73a93fb4011dd16934.
C++
bsd-3-clause
stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math
8f203fe16b1d910a2aafb87cdb4609bbc41b73e0
bottleopener/thingspeakSender.cpp
bottleopener/thingspeakSender.cpp
#include "thingspeakSender.h" #include "ThingSpeak.h" #define USE_WIFI101_SHIELD #include "BridgeClient.h" BridgeClient client; void ThingspeakSender::init() { ThingSpeak.begin(client); Serial.println("\nconnected to ThingSpeak!"); } void ThingspeakSender::sendCounter(int counter) { //send '1' to the IoT ser...
#include "thingspeakSender.h" #include "ThingSpeak.h" #define USE_WIFI101_SHIELD #include "BridgeClient.h" BridgeClient client; void ThingspeakSender::init() { ThingSpeak.begin(client); Serial.println("\nBottle-Opener is now connected to ThingSpeak!"); } void ThingspeakSender::sendCounter(int counter) { //se...
Extend log when connected to the IoT platform
Extend log when connected to the IoT platform
C++
mit
Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot
d0bd21a5a2cdde99139d6dbd29abd5ed2a0dd5ec
src/page/model/DirListMapModel.cpp
src/page/model/DirListMapModel.cpp
#include "DirListMapModel.h" #include <QtCore/QDebug> #include <QtCore/QDir> namespace web { namespace page { namespace model { DirListMapModel::DirListMapModel(const QString & dirPath, const QString & addressPath, QObject *parent) : AbstractListModel(parent) { generateAllModels(dirPath, addressPath); } voi...
#include "DirListMapModel.h" #include <QtCore/QDebug> #include <QtCore/QDir> namespace web { namespace page { namespace model { DirListMapModel::DirListMapModel(const QString & dirPath, const QString & addressPath, QObject *parent) : AbstractListModel(parent) { generateAllModels(dirPath, addressPath); } voi...
Check if there is a valid model
Check if there is a valid model
C++
mit
saeschdivara/Qt-Webframework
f9fbeea96a9bd2f6b4e96fe946ee1ed1651d40fe
Game.cpp
Game.cpp
#include "Game.h" #include "SFML/Graphics.hpp" #include "SFML/Window.hpp" void Game::start() { if (s_game_state != Uninitialized) { return; } s_main_window.create(sf::VideoMode(1024, 768, 32), "Pang!"); s_game_state = Game::Playing; while(!is_exiting()) { game_loop(); } s...
#include "Game.h" #include "SFML/Graphics.hpp" #include "SFML/Window.hpp" void Game::start() { if (s_game_state != Uninitialized) { return; } s_main_window.create(sf::VideoMode(1024, 768, 32), "Pang!"); s_game_state = Game::Playing; while(!is_exiting()) { game_loop(); } s...
Add game loop - when the program is run, the screen is red
Add game loop - when the program is run, the screen is red
C++
mit
jessicaphuong/pong-clone
0fb62536914ea825e6a457746f83141e9d51fcce
chrome/browser/prerender/prerender_config.cc
chrome/browser/prerender/prerender_config.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 "chrome/browser/prerender/prerender_config.h" namespace prerender { Config::Config() : max_bytes(150 * 1024 * 1024), max...
// 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 "chrome/browser/prerender/prerender_config.h" namespace prerender { Config::Config() : max_bytes(150 * 1024 * 1024), max...
Drop prerender abandon timeout to 3 seconds.
Drop prerender abandon timeout to 3 seconds. 30 seconds is too long to keep a missed prerender around for. Per Prerender.AbandonTimeUntilUsed, prerenders swap in well under 3 seconds of them being abandoned. BUG=356290 Review URL: https://codereview.chromium.org/545063003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c...
C++
bsd-3-clause
markYoungH/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Jonekee/chromium....
70b8dab388291bac126789d834ab43a008251527
src/Genes/Draw_Value_Gene.cpp
src/Genes/Draw_Value_Gene.cpp
#include "Genes/Draw_Value_Gene.h" #include <string> #include <map> #include "Game/Color.h" #include "Utility/Random.h" class Board; std::string Draw_Value_Gene::name() const noexcept { return "Draw Value Gene"; } double Draw_Value_Gene::draw_value() const noexcept { return value_of_draw_in_centipawns; } ...
#include "Genes/Draw_Value_Gene.h" #include <string> #include <map> #include "Game/Color.h" #include "Utility/Random.h" class Board; std::string Draw_Value_Gene::name() const noexcept { return "Draw Value Gene"; } double Draw_Value_Gene::draw_value() const noexcept { return value_of_draw_in_centipawns; } ...
Increase draw value mutation rate
Increase draw value mutation rate
C++
mit
MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess
5534be182fc35875810ecd78063c420a175a4be6
src/tutorial_storage_facility.cc
src/tutorial_storage_facility.cc
#include "tutorial_storage_facility.h" namespace tutorial_storage { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Tutorial_storageFacility::Tutorial_storageFacility(cyclus::Context* ctx) : cyclus::Facility(ctx) {} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -...
#include "tutorial_storage_facility.h" namespace tutorial_storage { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Tutorial_storageFacility::Tutorial_storageFacility(cyclus::Context* ctx) : cyclus::Facility(ctx) {} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -...
Add LOGGER messages as hello world to Tick and Tock.
Add LOGGER messages as hello world to Tick and Tock.
C++
bsd-3-clause
gonuke/TutorialStorage,gonuke/TutorialStorage
bdef140b5092b129936937cdcba8ffc2a9a5332b
src/ports/SkDebug_win.cpp
src/ports/SkDebug_win.cpp
/* * Copyright 2010 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkTypes.h" static const size_t kBufferSize = 2048; #include <stdarg.h> #include <stdio.h> #include <windows.h> void SkDebugf(const char format[], ...) { ch...
/* * Copyright 2010 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkTypes.h" static const size_t kBufferSize = 2048; #include <stdarg.h> #include <stdio.h> #include <windows.h> void SkDebugf(const char format[], ...) { ch...
Send SkDebugf through stderr and flush on Windows too.
Send SkDebugf through stderr and flush on Windows too. This makes it consistent with Linux/Mac. There, stderr is not buffered, so the flush is not needed / implicit. BUG=skia: Review URL: https://codereview.chromium.org/1419073003
C++
bsd-3-clause
aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,tmpvar/skia.cc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,qrealka/skia-hc,qrea...
8774c3ffe5cdea802dc0df85eaec1509f4c6be8c
src/AssimpWorker/import/AssimpImporter.cpp
src/AssimpWorker/import/AssimpImporter.cpp
/* * This file is part of ATLAS. It is subject to the license terms in * the LICENSE file found in the top-level directory of this distribution. * (Also avialable at http://www.apache.org/licenses/LICENSE-2.0.txt) * You may not use this file except in compliance with the License. */ #include <iostream> #include <assimp...
/* * This file is part of ATLAS. It is subject to the license terms in * the LICENSE file found in the top-level directory of this distribution. * (Also avialable at http://www.apache.org/licenses/LICENSE-2.0.txt) * You may not use this file except in compliance with the License. */ #include <iostream> #include <assimp...
Set assimp flag to ignore up direction in collada files
Set assimp flag to ignore up direction in collada files
C++
apache-2.0
dfki-asr/atlas-worker,dfki-asr/atlas-worker
63050b9b49994fc7f0408b47e46a935df820de71
cvmfs/receiver/lease_path_util.cc
cvmfs/receiver/lease_path_util.cc
/** * This file is part of the CernVM File System. */ #include "lease_path_util.h" namespace receiver { bool IsPathInLease(const PathString& lease, const PathString& path) { // If lease is "", any path falls within item if (!strcmp(lease.c_str(), "")) { return true; } // Is the lease string is the pre...
/** * This file is part of the CernVM File System. */ #include "lease_path_util.h" namespace receiver { bool IsPathInLease(const PathString& lease, const PathString& path) { // If lease is "", then any path is a subpath if (lease.GetLength() == 0) { return true; } // If the lease string is the prefix...
Remove redundant string comparisons in IsPathInLease()
Remove redundant string comparisons in IsPathInLease() Signed-off-by: Michael Brown <2a36638259b3302298d1519e970c48ecd5dbd43e@fensystems.co.uk>
C++
bsd-3-clause
DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs
3e095dae5822fbf9b29b376fd7e6b5f449360c64
OrbitService/ProcessServiceImpl.cpp
OrbitService/ProcessServiceImpl.cpp
// Copyright (c) 2020 The Orbit 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 "ProcessServiceImpl.h" #include <memory> #include <string> using grpc::ServerContext; using grpc::Status; Status ProcessServiceImpl::GetProce...
// Copyright (c) 2020 The Orbit 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 "ProcessServiceImpl.h" #include <memory> #include <string> using grpc::ServerContext; using grpc::Status; Status ProcessServiceImpl::GetProce...
Update cpu times when refreshing the process list.
Update cpu times when refreshing the process list. Bug: http://b/156339188 Test: start client and check that cpu-times are not all 0
C++
bsd-2-clause
google/orbit,google/orbit,google/orbit,google/orbit
ed07fd6ee8ed5dd7cb9dabe5a9be71eea2e98642
main.cpp
main.cpp
#include <iostream> #include "fixed_point.hpp" int main() { auto g1 = [](double x) -> double { return (x * x + 2) / 3; }; auto g2 = [](double x) -> double { return std::sqrt(3 * x - 2); }; auto g3 = [](double x) -> double { return 3 - (2 / x); }; auto g4 = [](do...
#include <iostream> #include "fixed_point.hpp" int main() { auto g1 = [](double x) -> double { return (x * x + 2) / 3; }; // will result in NaNs because the value under the square root // will become negative at some point. auto g2 = [](double x) -> double { return std::sqrt(3 * ...
Comment as to why the code for g2 actually doesn’t work yet.
Comment as to why the code for g2 actually doesn’t work yet.
C++
mit
makramkd/root-finding
b7cf1d28a2c3210ab1c8df57fdf49f55c20dcf71
Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.cpp
Plugins/org.mitk.gui.qt.cli/src/internal/CommandLineModulesViewControls.cpp
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ...
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ...
Improve minimum width: Remove choose label, and use tool tip instead
Improve minimum width: Remove choose label, and use tool tip instead
C++
bsd-3-clause
lsanzdiaz/MITK-BiiG,fmilano/mitk,NifTK/MITK,lsanzdiaz/MITK-BiiG,MITK/MITK,danielknorr/MITK,rfloca/MITK,nocnokneo/MITK,NifTK/MITK,rfloca/MITK,nocnokneo/MITK,fmilano/mitk,NifTK/MITK,rfloca/MITK,RabadanLab/MITKats,nocnokneo/MITK,nocnokneo/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,danielknorr/MITK,MITK/MITK,NifTK/MITK,rfloca/M...
f5f8de76f1348b91c0235c6a8fada09db3df3663
test/detect/main.cpp
test/detect/main.cpp
/* mbed Microcontroller Library * Copyright (c) 2013-2014 ARM Limited * * 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 re...
/* mbed Microcontroller Library * Copyright (c) 2013-2014 ARM Limited * * 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 re...
Test - fix detect test - remove notify function call
Test - fix detect test - remove notify function call
C++
apache-2.0
bremoran/mbed-drivers,0xc0170/mbed-drivers,bremoran/mbed-drivers,0xc0170/mbed-drivers
ff87716e0a69b3173b93fea44fec270cd58dc488
main.cpp
main.cpp
#include <QApplication> #include <QQmlApplicationEngine> #include <QQuickStyle> #include "world.hpp" int main(int argc, char** argv) { QApplication app(argc, argv); app.setApplicationName("Headway"); #ifdef Q_OS_WINDOWS QQuickStyle::setStyle("Universal"); #else QQuickStyle::setStyle("Basic"); #endif ...
#include <QApplication> #include <QQmlApplicationEngine> #include <QQuickStyle> #include "world.hpp" int main(int argc, char** argv) { QApplication app(argc, argv); app.setApplicationName("Headway"); #ifdef Q_OS_WINDOWS QQuickStyle::setStyle("Universal"); #endif QQmlApplicationEngine engine; qml...
Use Default style on non-Windows
Use Default style on non-Windows
C++
apache-2.0
davidhaller/headway
e48d213aea8e9559d9c4a547604ada13a99b8917
main.cpp
main.cpp
#include <iostream> using namespace std; int main() { cout << "Hello world!" << endl; }
#include <iostream> #include <ncurses.h> using namespace std; int main() { cout << "Hello world!" << endl; }
Add an include to trigger Travis
Add an include to trigger Travis
C++
bsd-3-clause
RandomInsano/erstat
e75671f303990574a51ad90a0f5e1ce515da9174
src/views/session_view.cc
src/views/session_view.cc
#include "models/bucket.h" #include "views/session_view.h" SessionView::SessionView(Session* session, QWidget* parent) : QWidget(parent), m_session(session) { m_hostFileSystem = new QFileSystemModel(this); m_hostFileSystem->setRootPath(QDir::rootPath()); m_hostBrowser = new QTreeView; m_hostBrowser->setModel(...
#include "models/bucket.h" #include "views/session_view.h" SessionView::SessionView(Session* session, QWidget* parent) : QWidget(parent), m_session(session) { m_hostFileSystem = new QFileSystemModel(this); m_hostFileSystem->setRootPath(QDir::rootPath()); m_hostBrowser = new QTreeView; m_hostBrowser->setModel(...
Remove the focus rectangles that are rendered around the host/remote tree view widgets on OSX. Windows doesn't render this same focus rectangle so no change is necessary there.
Remove the focus rectangles that are rendered around the host/remote tree view widgets on OSX. Windows doesn't render this same focus rectangle so no change is necessary there.
C++
apache-2.0
Klopsch/ds3_browser,Klopsch/ds3_browser,Klopsch/ds3_browser,SpectraLogic/ds3_browser,SpectraLogic/ds3_browser,SpectraLogic/ds3_browser
ca51885f3d9b82ba8fb7da88fe58cd2cde49d7bb
runtime/vm/native_symbol_fuchsia.cc
runtime/vm/native_symbol_fuchsia.cc
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "platform/globals.h" #if defined(TARGET_OS_FUCHSIA) #include "vm/native_symbol.h" #include <...
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "vm/globals.h" #if defined(TARGET_OS_FUCHSIA) #include "platform/memory_sanitizer.h" #include...
Add C++ demangle to the native symbol resolver
Fuchsia: Add C++ demangle to the native symbol resolver R=johnmccutchan@google.com Review URL: https://codereview.chromium.org/2468673002 .
C++
bsd-3-clause
dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,da...
476a4cdd97a4d01d5a4cf79514800e4996bcb4fa
src/jage.cpp
src/jage.cpp
/* * Justin's Awesome Game Engine * or * * Just Another Game Engine * * Copyright 2016 Justin White * * See included LICENSE file for distribution and reuse. */ #include <Engine.hpp> static std::unique_ptr<Engine> theGame; int success(const std::string& msg); int fail(const std::string& msg); int main(const ...
/* * Justin's Awesome Game Engine * or * * Just Another Game Engine * * Copyright 2016 Justin White * * See included LICENSE file for distribution and reuse. */ #include <Engine.hpp> int done(std::unique_ptr<Engine> theGame, int exitCode, const std::string& msg = "Done"); int main(const int argc, const char**...
Consolidate main() helpers a bit.
Consolidate main() helpers a bit.
C++
bsd-3-clause
just6979/SpaceFight
37514002fac9bb9306aafde7593ce6120aacce2f
Examples/TrafficCongestionExample.cpp
Examples/TrafficCongestionExample.cpp
// Copyright (c) 2014 eeGeo. All rights reserved. #import <EegeoWorld.h> #include "TrafficCongestionExample.h" namespace Examples { TrafficCongestionExample::TrafficCongestionExample( Eegeo::TrafficCongestion::ITrafficCongestionService& trafficCongestionService, Eegeo::EegeoWorld& world) : ...
// Copyright (c) 2014 eeGeo. All rights reserved. #import <EegeoWorld.h> #include "TrafficCongestionExample.h" namespace Examples { TrafficCongestionExample::TrafficCongestionExample( Eegeo::TrafficCongestion::ITrafficCongestionService& trafficCongestionService, Eegeo::EegeoWorld& world) : ...
Update example using a TTY instead of assert. Buddy: Malc
Update example using a TTY instead of assert. Buddy: Malc
C++
bsd-2-clause
eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/ee...
aaacd90b8ef4e580851441b5bb0dd7904284d4dc
sky/engine/tonic/dart_error.cc
sky/engine/tonic/dart_error.cc
// Copyright 2015 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 "sky/engine/tonic/dart_error.h" #include "base/logging.h" namespace blink { namespace DartError { const char kInvalidArgument[] = "Invalid ar...
// Copyright 2015 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 "sky/engine/tonic/dart_error.h" #include "base/logging.h" namespace blink { namespace DartError { const char kInvalidArgument[] = "Invalid argu...
Switch to the other stack trace printer
Switch to the other stack trace printer
C++
bsd-3-clause
jason-simmons/sky_engine,mikejurka/engine,qiankunshe/sky_engine,jason-simmons/flutter_engine,afandria/sky_engine,chinmaygarde/sky_engine,mdakin/engine,rmacnak-google/engine,chinmaygarde/sky_engine,mdakin/engine,qiankunshe/sky_engine,mxia/engine,mpcomplete/flutter_engine,mxia/engine,mikejurka/engine,flutter/engine,krisg...
6167b7c1926af76b80bf49e783647d22a66d0c40
variants/platforms/rocket_v0.1/digital_platform.cpp
variants/platforms/rocket_v0.1/digital_platform.cpp
#include "variant/digital_platform.hpp" #include "hal.h" DigitalPlatform::DigitalPlatform() { palSetPadMode(GPIOA, 4, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); palClearP...
#include "variant/digital_platform.hpp" #include "hal.h" DigitalPlatform::DigitalPlatform() { palSetPadMode(GPIOA, 4, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); palSetPadM...
Add debug LEDs to digital platform setup.
Add debug LEDs to digital platform setup.
C++
mit
OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control
891a20914cb5097c6bdf2aebb6232b49874826b2
Podrios.cpp
Podrios.cpp
/* * Podrios.cpp * * Created on: 2014年10月23日 * Author: nemo */ #include <iostream> #include <stdlib.h> using namespace std; int main() { cout << "Show Message." << endl; system("pause"); return 0; }
/* * Podrios.cpp * * Created on: 2014年10月23日 * Author: nemo */ #include <iostream> using namespace std; int main() { cout << "Show Message." << endl; return 0; }
Remove system pause, Linux doesn't have this function.
Remove system pause, Linux doesn't have this function.
C++
apache-2.0
NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP,NemoChenTW/PodriosCPP
ec064a8fb2dfa13dc44e8dde32ce59b79efc7f92
src/qt/test/test_main.cpp
src/qt/test/test_main.cpp
#include <QTest> #include <QObject> #include "uritests.h" // This is all you need to run all the tests int main(int argc, char *argv[]) { URITests test1; QTest::qExec(&test1); }
#include <QTest> #include <QObject> #include "uritests.h" // This is all you need to run all the tests int main(int argc, char *argv[]) { bool fInvalid = false; URITests test1; if (QTest::qExec(&test1) != 0) fInvalid = true; return fInvalid; }
Return !0 when qt tests fail.
Return !0 when qt tests fail.
C++
mit
coinkeeper/2015-06-22_18-46_reddcoin,Cannacoin-Project/Cannacoin,reddink/reddcoin,Cannacoin-Project/Cannacoin,reddcoin-project/reddcoin,ahmedbodi/poscoin,coinkeeper/2015-06-22_18-46_reddcoin,bmp02050/ReddcoinUpdates,ahmedbodi/poscoin,coinkeeper/2015-06-22_19-10_cannacoin,ahmedbodi/poscoin,joroob/reddcoin,coinkeeper/201...
0698300cc567384d6c528b5b1757ed8abe930dc5
src/effects/SkColorMatrixFilter.cpp
src/effects/SkColorMatrixFilter.cpp
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkColorMatrixFilter.h" static SkScalar byte_to_scale(U8CPU byte) { if (0xFF == byte) { // want to get this exact return 1; } else { ...
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkColorMatrixFilter.h" static SkScalar byte_to_scale(U8CPU byte) { if (0xFF == byte) { // want to get this exact return 1; } else { ...
Simplify LightingFilter in add-free case
Simplify LightingFilter in add-free case bug:28519669 Change-Id: Id55b51c92468a53e7623c34bb23081283da18655
C++
bsd-3-clause
aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform...
ed98d7a6824da557ebb4fbbd186da7acc76eb4a5
primality-test.cpp
primality-test.cpp
#include<math.h> #include<stdio.h> /*#include<iostream> using namespace std;*/ int isPrimeBruteForce(int x) { if (x < 2) return false; double sqroot_x; sqroot_x = sqrt (x); for(int i=0; i <= sqroot_x; i++) { /* If there were only factors above the square root of x, they would be bigger than x itself. */ if (x...
#include <iostream> #include <cmath> //using namespace std; int isPrimeBruteForce(int x) { if (x < 2) return false; double sqroot_x; double square = x; sqroot_x = std::sqrt(square); for(int i=0; i <= sqroot_x; i++) { /* If there were only factors above the square root of x, they would be bigger than x itself. *...
Change preprocessors and namespaces to c++ std library; make data types consistent (at least trying to)
Change preprocessors and namespaces to c++ std library; make data types consistent (at least trying to)
C++
mit
luforst/primality-test,luforst/primality-test
ddd715321f022315f1275271228bcbb9a6cb76b2
tensorflow/core/platform/default/cuda_libdevice_path.cc
tensorflow/core/platform/default/cuda_libdevice_path.cc
/* Copyright 2016 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 2016 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...
Add /usr/local/cuda to the list of CUDA data directories that XLA searches by default.
Add /usr/local/cuda to the list of CUDA data directories that XLA searches by default. My installation of JAX chose /usr/local/cuda-11.2 as its default CUDA data directory. That's a fine first choice, but the problem with it is that it names a specific CUDA version, when CUDA 11.1+ are backwards compatible between min...
C++
apache-2.0
gautam1858/tensorflow,sarvex/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,Intel-Corporation/tensorflow,sarvex/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer...
6b313989a79db35cd62461efd03e05959be9b126
lotto.cpp
lotto.cpp
#include <iostream> #include "lotto.h" using namespace std; /* So I guess I should use arrays? Seems like quite good idea, hopefully it'll work as intended. * Also I'm still not sure how to avoid duplicates... */ void lotto::lotek(){ for(int i = 0; i < 6; i++) { int a = rand()%49+1; cout << '\t' ...
#include <iostream> #include "lotto.h" using namespace std; /* So I guess I should use arrays? Seems like quite good idea, hopefully it'll work as intended. * Also I'm still not sure how to avoid duplicates... */ void lotto::lotek(){ int lotteryPool[50]; for(int x = 0; x < 50; x++) { lotteryPool[x] = x ...
Add changes to first option
Add changes to first option Somehow it's working, gotta change second part later
C++
mit
arveth/cpp-lottery
df4bad1c1eef56aae5c0c159cf66a9e52925a1ea
source/deferred_shading_demo/main.cpp
source/deferred_shading_demo/main.cpp
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #include "halfling/halfling_engine.h" #include "deferred_shading_demo/graphics_manager.h" #include "deferred_shading_demo/game_state_manager.h" int WINAPI Wi...
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #include "halfling/halfling_engine.h" #include "deferred_shading_demo/graphics_manager.h" #include "deferred_shading_demo/game_state_manager.h" int WINAPI Wi...
Change the title bar caption
DEFERRED_SHADING_DEMO: Change the title bar caption
C++
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
801178fc5232430de11eb4a2f5341cc2f00f8627
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 "Revert "Solution for week 3, task 9""
Revert "Revert "Solution for week 3, task 9"" This reverts commit a280465d0b09e0aa9f9ec3b403b1bf3785b7d75a.
C++
mit
vpetrigo/yandex-course
3415ed22f390e0d930df53d33f642ea07a859528
src/tests/test_main.cpp
src/tests/test_main.cpp
/* * Copyright (c) 2015 Roc authors * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <CppUTest/CommandLineArguments.h> #include <CppUTest/CommandLine...
/* * Copyright (c) 2015 Roc authors * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <CppUTest/CommandLineArguments.h> #include <CppUTest/CommandLine...
Enable colorful logs in tests
Enable colorful logs in tests Relates: #272
C++
mpl-2.0
roc-project/roc,roc-project/roc,roc-project/roc,roc-project/roc
f3f718a03918156c1d3f07cec608f2140208b286
src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
#include "ros/ros.h" #include "pattern_posture_generator_node.hpp" int main(int argc, char* argv[]) { ros::init(argc, argv, "pattern_posture_generator"); ros::NodeHandle nh; PatternPostureGenerator ppg(nh); ros::spin(); return 0; } PatternPostureGenerator::PatternPostureGenerator(){} PatternPostureGener...
#include "ros/ros.h" #include "pattern_posture_generator_node.hpp" int main(int argc, char* argv[]) { ros::init(argc, argv, "pattern_posture_generator"); ros::NodeHandle nh; PatternPostureGenerator ppg(nh); ros::spin(); return 0; } PatternPostureGenerator::PatternPostureGenerator(){} PatternPostureGener...
Implement getPostureKey of PPG node.
Implement getPostureKey of PPG node. PPG is pattern posture generator.
C++
mit
agrirobo/arcsys2,agrirobo/arcsys2
350b4d304bef849f8be2a48de24849c6779df879
src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
#include "ros/ros.h" #include "pattern_posture_generator_node.hpp" PatternPostureGenerator::PatternPostureGenerator(){} PatternPostureGenerator::PatternPostureGenerator(ros::NodeHandle& nh) { if (!nh.getParam("pattern", pattern_names)) return; for (std::map<std::string, std::string >::iterator it = pattern_names...
#include "ros/ros.h" #include "pattern_posture_generator_node.hpp" int main(int argc, char* argv[]) { ros::init(argc, argv, "pattern_posture_generator"); ros::NodeHandle nh; PatternPostureGenerator ppg(nh); ros::spin(); return 0; } PatternPostureGenerator::PatternPostureGenerator(){} PatternPostureGener...
Implement main func of PPG.
Implement main func of PPG. PPG is pattern posture generator.
C++
mit
agrirobo/arcsys2,agrirobo/arcsys2
4d1eb4a80cf17e5dace8e305716a3f74d8fc3e55
agent/tests/main.cpp
agent/tests/main.cpp
/* * Copyright 2014-2015 Adam Chyła, adam@chyla.org * All rights reserved. Distributed under the terms of the MIT License. */ #include "../config.h" #if defined(HAVE_GTEST) && defined(HAVE_GMOCK) #include <gtest/gtest.h> int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); return RUN_...
/* * Copyright 2014-2015 Adam Chyła, adam@chyla.org * All rights reserved. Distributed under the terms of the MIT License. */ #include "../config.h" #if defined(HAVE_GTEST) && defined(HAVE_GMOCK) #include <boost/log/common.hpp> #include <gtest/gtest.h> int main(int argc, char **argv) { boost::log::core::get()-...
Disable logging in agent tests
Disable logging in agent tests
C++
mit
chyla/slas,chyla/pat-lms,chyla/slas,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/pat-lms
9c1605c5f2bf1a00e96175596534b7a4ad900ee4
examples/writing_flash.cpp
examples/writing_flash.cpp
#include <cstring> #include "board.h" #include <aery32/all.h> using namespace aery; int main(void) { int errno; uint16_t page = FLASH_LAST_PAGE; char buf[512] = {'\0'}; init_board(); gpio_init_pin(LED, GPIO_OUTPUT|GPIO_HIGH); /* If page is empty, write "foo". Else read page. */ if (flashc_page_isempty(page))...
#include <cstring> #include "board.h" #include <aery32/all.h> using namespace aery; void lock_flash_programspace(void) { int i = FLASH_LAST_PAGE; for (; flashc_page_isempty(i); i--); for (; i >= 0; i--) { flashc_lock_page(i); } } int main(void) { int errno; uint16_t page = FLASH_LAST_PAGE; char buf[512] = {...
Enhance example to write flash
Enhance example to write flash
C++
bsd-3-clause
denravonska/aery32,aery32/aery32,aery32/aery32,denravonska/aery32
c19fe867432f15fd605a1904dbfcc51a85af35cf
test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp
test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/get_param.pass.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
Fix bug in test; found by AddressSanitizer
Fix bug in test; found by AddressSanitizer git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@177355 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
c39c60d6a18f5298480c25a2fff1dc7dfaaac4c1
projects/kickstart/2019/practice/mural/main.cpp
projects/kickstart/2019/practice/mural/main.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <string> int main() { size_t T; std::cin >> T; for (auto testCase{1u}; testCase <= T; ++testCase) { size_t N; std::cin >> N; std::string beautyScores; std::cin >> beautyScores; std::transform(beautyScores.begin(), beautyScor...
#include <algorithm> #include <iostream> #include <numeric> #include <string> int main() { size_t T; std::cin >> T; for (auto testCase{1u}; testCase <= T; ++testCase) { size_t N; std::cin >> N; std::string beautyScores; std::cin >> beautyScores; std::transform(beautyScores.begin(), beautyScor...
Fix compilation on clang and gcc
Fix compilation on clang and gcc
C++
mit
antaljanosbenjamin/miscellaneous,antaljanosbenjamin/miscellaneous
a2b9a14ce8ed68ce8678fb20a25a140a011a9198
test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cc
// Tests -fsanitize-coverage=inline-8bit-counters // // REQUIRES: has_sancovcc,stable-runtime // UNSUPPORTED: i386-darwin, x86_64-darwin // // RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1 #include <stdio.h> #include <assert.h> const char *first_counter; extern "C" void __sanitizer_cov_8bit_coun...
// Tests -fsanitize-coverage=inline-8bit-counters // // REQUIRES: has_sancovcc,stable-runtime // UNSUPPORTED: i386-darwin, x86_64-darwin, x86_64h-darwin // // RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters 2>&1 #include <stdio.h> #include <assert.h> const char *first_counter; extern "C" void __sanitiz...
Mark a sancov test as unsupported on x86_64h-darwin
Mark a sancov test as unsupported on x86_64h-darwin Failing bot: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/6891 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@305133 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
0b76884736e36365d3a4a8061ff965a3722a4c69
test/test_integration/test_int_battery_wait.cpp
test/test_integration/test_int_battery_wait.cpp
#include "configs/includes.h" #include "power/gb_abstract_battery.h" #include "power/gb_battery.h" #include "utilities/gb_utility.h" #include <Arduino.h> class FakeBattery : public GbAbstractBattery { public: FakeBattery() : GbAbstractBattery(1, 3.4, 3.5, 3){}; float GetVoltage() { return (sin(millis()/10000.0...
#include "configs/includes.h" #include "power/gb_abstract_battery.h" #include "power/gb_battery.h" #include "utilities/gb_utility.h" #include <Arduino.h> class FakeBattery : public GbAbstractBattery { private: char _scheme; public: FakeBattery(char scheme) : GbAbstractBattery(1, 3.4, 3.5, 3), _scheme(scheme) {}; ...
Add fake voltage decay schemes
Add fake voltage decay schemes
C++
mit
cgorton1313/gortobot,cgorton1313/gortobot
054f1169e34683bda96fcaab1e09ac7794e6ce33
src/Thread/Unix/ThreadImpl.cpp
src/Thread/Unix/ThreadImpl.cpp
#include "Thread/Unix/ThreadImpl.hh" #include "Thread/ThreadException.hh" namespace LilWrapper { ThreadImpl::ThreadImpl(Thread *thread) { this->_isActive = pthread_create(&this->_thread, NULL, &ThreadImpl::entryPoint, thread) == 0; if (!this->_isActive) throw ThreadException("Thread Exception...
#include "Thread/Unix/ThreadImpl.hh" #include "Thread/ThreadException.hh" namespace LilWrapper { ThreadImpl::ThreadImpl(Thread *thread) { this->_isActive = pthread_create(&this->_thread, NULL, &ThreadImpl::entryPoint, thread) == 0; if (!this->_isActive) throw ThreadException("Thread Exception...
Set the thread to non active after waiting for it.
Set the thread to non active after waiting for it.
C++
mit
aliou/lilwrapper
1bba242c85038a27865259ef8a50643e19b2079e
test/Parser/top-level-semi-cxx0x.cpp
test/Parser/top-level-semi-cxx0x.cpp
// RUN: clang-cc -fsyntax-only -pedantic -std=c++0x -verify %s void foo(); void bar() { }; void wibble(); ;
// RUN: clang-cc -fsyntax-only -pedantic -std=c++0x -verify %s void foo(); void bar() { }; void wibble(); ; namespace Blah { void f() { }; void g(); }
Improve top-level-semicolon test a bit
Improve top-level-semicolon test a bit git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@79913 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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
007d2dca9ff5c437f30422d22935609a2da9d15f
src/utils/SkNullCanvas.cpp
src/utils/SkNullCanvas.cpp
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkNullCanvas.h" #include "SkCanvas.h" #include "SKNWayCanvas.h" SkCanvas* SkCreateNullCanvas() { // An N-Way canvas forwards calls to N canvas's. When N == 0 ...
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkNullCanvas.h" #include "SkCanvas.h" #include "SKNWayCanvas.h" SkCanvas* SkCreateNullCanvas() { // An N-Way canvas forwards calls to N canvas's. When N == 0 ...
Fix SkNWayCanvas cons call when creating null canvas.
Fix SkNWayCanvas cons call when creating null canvas.
C++
bsd-3-clause
csulmone/skia,csulmone/skia,csulmone/skia,csulmone/skia
6ce04051e41e550a11d61e58f987f250cc982378
trunk/src/utest/srs_utest_http.cpp
trunk/src/utest/srs_utest_http.cpp
/* The MIT License (MIT) Copyright (c) 2013-2019 Winlin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
/* The MIT License (MIT) Copyright (c) 2013-2019 Winlin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
Improve test coverage of status for HTTP.
Improve test coverage of status for HTTP.
C++
mit
winlinvip/srs,ossrs/srs,winlinvip/srs,winlinvip/srs,winlinvip/simple-rtmp-server,ossrs/srs,ossrs/srs,ossrs/srs,winlinvip/srs,ossrs/srs,ossrs/srs,winlinvip/srs,winlinvip/srs
7ea5e772803c237eddc04327024b06cafe697190
Sources/Rosetta/Actions/Summon.cpp
Sources/Rosetta/Actions/Summon.cpp
// This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // RosettaStone is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Actions/Summon.hpp> #include <Rosetta/Games/...
// This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // RosettaStone is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Actions/Summon.hpp> #include <Rosetta/Games/...
Add code to update aura and minion to summoned minions
feat(card-impl): Add code to update aura and minion to summoned minions
C++
mit
Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp
ce675648a7dd0900f02314bbf277bee683b44ba2
examples/hello/example0.cpp
examples/hello/example0.cpp
#include "sleepy_discord/sleepy_discord.h" class myClientClass : public SleepyDiscord::DiscordClient { public: using SleepyDiscord::DiscordClient::DiscordClient; void onMessage(SleepyDiscord::Message message) { if (message.startsWith("whcg hello")) sendMessage(message.channelID, "Hello " + message.author.userna...
#include "sleepy_discord/sleepy_discord.h" class myClientClass : public SleepyDiscord::DiscordClient { public: using SleepyDiscord::DiscordClient::DiscordClient; void onMessage(SleepyDiscord::Message message) { if (message.startsWith("whcg hello")) sendMessage(message.channelID, "Hello " + message.author.userna...
Fix hello example, variable not defined
Fix hello example, variable not defined
C++
mit
NoNamer64/sleepy-discord,yourWaifu/sleepy-discord,NoNamer64/sleepy-discord,yourWaifu/sleepy-discord,yourWaifu/sleepy-discord
50fe89054fd005f6b620ec51da6703f7acb01490
test/var_len_pool_test.cpp
test/var_len_pool_test.cpp
/* * var_len_pool_test.cpp - Test suite for varrable lengthed allocation pool */ #include "test_suite.h" /* * VarLenPoolBasicTest() - This function allocates a series of memory * using an increasing sequence and then check * for correctness */ void VarLenPoolBasi...
/* * var_len_pool_test.cpp - Test suite for varrable lengthed allocation pool */ #include "test_suite.h" #include "../src/VarLenPool.h" /* * VarLenPoolBasicTest() - This function allocates a series of memory * using an increasing sequence and then check * for corr...
Fix test case compilation problem
Fix test case compilation problem
C++
apache-2.0
wangziqi2013/EpochManager
0d0398d3cb6b721f97d2465759906d46c68a554d
src/timers-win32.cpp
src/timers-win32.cpp
// Copyright (C) 2011-2012, Zeex // // 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 agreed to ...
// Copyright (C) 2011-2012, Zeex // // 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 agreed to ...
Fix infinite recursion in GetTickCount() on Windows
timers: Fix infinite recursion in GetTickCount() on Windows
C++
apache-2.0
WopsS/sampgdk,WopsS/sampgdk,Zeex/sampgdk,Zeex/sampgdk,WopsS/sampgdk,Zeex/sampgdk
581f7df12a476e538b9855c08dd3bbf3fa47ac1a
compress.cpp
compress.cpp
#include "compress.hpp" #include "huffman.hpp" std::string compress(const std::string& data) { using uch = unsigned char; std::array<uint64_t, BYTES_COUNT> freq_table; freq_table.fill(0); for(uch c : data) ++freq_table[c]; auto root = buildHuffmanTree(freq_table); auto table = buildCompressTable(root); std::s...
#include "compress.hpp" #include "huffman.hpp" std::string compress(const std::string& data) { using uch = unsigned char; std::array<uint64_t, BYTES_COUNT> freq_table; freq_table.fill(0); for(uch c : data) ++freq_table[c]; auto root = buildHuffmanTree(freq_table); auto table = buildCompressTable(root); std::s...
Add frequency table to output
Add frequency table to output
C++
mit
cuklev/huffman-archiver-cpp,StanislavNikolov/huffman-archiver-cpp
39510cf8408d3b5705bfb7ca5d9dac7e13657b62
src/autowiring/CreationRulesUnix.cpp
src/autowiring/CreationRulesUnix.cpp
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved. #include "stdafx.h" #include "CreationRules.h" #include <cstdlib> void* autowiring::aligned_malloc(size_t ncb, size_t align) { void* pRetVal; if(posix_memalign(&pRetVal, ncb, align)) return nullptr; return pRetVal; } void autowiring::aligned_...
// Copyright (C) 2012-2015 Leap Motion, Inc. All rights reserved. #include "stdafx.h" #include "CreationRules.h" #include <cstdlib> void* autowiring::aligned_malloc(size_t ncb, size_t align) { void* pRetVal; if(posix_memalign(&pRetVal, align, ncb)) return nullptr; return pRetVal; } void autowiring::aligned_...
Fix an issue with the call to posix_memalign
Fix an issue with the call to posix_memalign
C++
apache-2.0
codemercenary/autowiring,leapmotion/autowiring,leapmotion/autowiring,codemercenary/autowiring,leapmotion/autowiring,codemercenary/autowiring,codemercenary/autowiring,leapmotion/autowiring,codemercenary/autowiring,leapmotion/autowiring,leapmotion/autowiring,codemercenary/autowiring
516531887d4fc0290f1b4ef10672bece233e2a41
framework/shape.cpp
framework/shape.cpp
#include "shape.hpp" Shape::Shape(): name_{}, color_{0.0, 0.0, 0.0} {} Shape::Shape(std::string const& name): name_{name}, color_{1.0, 1.0, 1.0} {} Shape::Shape(Color const& color): name_{}, color_{color} {} Shape::Shape(std::string const& name...
#include "shape.hpp" Shape::Shape(): name_{}, color_{0.0, 0.0, 0.0} {} Shape::Shape(std::string const& name): name_{name}, color_{1.0, 1.0, 1.0} {} Shape::Shape(Color const& color): name_{}, color_{color} {} Shape::Shape(std::string const& name...
Switch to predefined color output.
Switch to predefined color output.
C++
mit
elmeyer/programmiersprachen-raytracer,elmeyer/programmiersprachen-raytracer
f436979feb208b3d2376f313939ed987ae902326
Test/NumberTheory/Fibonacci.test.cpp
Test/NumberTheory/Fibonacci.test.cpp
#define CATCH_CONFIG_MAIN #include "../catch.hpp" #include "../../NumberTheory/Fibonacci.cpp" TEST_CASE("Base cases", "[fibonacci]") { REQUIRE(fibonacci(0) == 0); REQUIRE(fibonacci(1) == 1); } TEST_CASE("Normal cases", "[fibonacci]") { REQUIRE(fibonacci(2) == 1); REQUIRE(fibonacci(7) == 13); REQU...
#define CATCH_CONFIG_MAIN #define TEST #include "../catch.hpp" #include "../../NumberTheory/Fibonacci.cpp" TEST_CASE("Base cases", "[fibonacci]") { REQUIRE(fibonacci(0) == 0); REQUIRE(fibonacci(1) == 1); } TEST_CASE("Normal cases", "[fibonacci]") { REQUIRE(fibonacci(2) == 1); REQUIRE(fibonacci(7) == ...
Add a define to simplify compilation
Add a define to simplify compilation
C++
mit
faheel/Algos,eskeype/Algos,faheel/Algos
6b4e6e799b489a8058e3f6e3c9a5676b3cb4a4bf
third_party/tcmalloc/win_allocator.cc
third_party/tcmalloc/win_allocator.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. // This is a simple allocator based on the windows heap. extern "C" { HANDLE win_heap; bool win_heap_init(bool use_lfh) { win_heap = HeapCreate(0...
// 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. // This is a simple allocator based on the windows heap. extern "C" { HANDLE win_heap; bool win_heap_init(bool use_lfh) { win_heap = HeapCreate(0...
Fix the windows allocator to behave properly on realloc.
Fix the windows allocator to behave properly on realloc. The spec says that calling realloc(ptr, 0) should free ptr and return NULL. BUG=none TEST=none Review URL: http://codereview.chromium.org/196041 git-svn-id: http://src.chromium.org/svn/trunk/src@25612 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: f...
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...
be787b1feecfd615e0aa265bc0aa01f38fe6cd4b
libraries/chain/webassembly/runtimes/eos-vm-oc/llvmWARshim.cpp
libraries/chain/webassembly/runtimes/eos-vm-oc/llvmWARshim.cpp
#pragma push_macro("N") #undef N #include <llvm/IR/IRBuilder.h> #pragma pop_macro("N") namespace eosio { namespace chain { namespace eosvmoc { namespace LLVMJIT { llvm::Value* CreateInBoundsGEPWAR(llvm::IRBuilder<>& irBuilder, llvm::Value* Ptr, llvm::Value* v1, llvm::Value* v2) { if(!v2) return irBuilder.Crea...
#include <llvm/IR/IRBuilder.h> namespace eosio { namespace chain { namespace eosvmoc { namespace LLVMJIT { llvm::Value* CreateInBoundsGEPWAR(llvm::IRBuilder<>& irBuilder, llvm::Value* Ptr, llvm::Value* v1, llvm::Value* v2) { if(!v2) return irBuilder.CreateInBoundsGEP(Ptr, v1); else return irBuilder.C...
Revert "Attempt to fix unity builds."
Revert "Attempt to fix unity builds." This reverts commit 3c7543ca41c24f14a59db382f9e9d2b8bf1aa4fd. The attempt to fix unity builds was unsuccessful.
C++
mit
EOSIO/eos,EOSIO/eos,EOSIO/eos,EOSIO/eos,EOSIO/eos
7acf0026a4cfb7ecdd0f4c4988a2ed39207d9601
main.cpp
main.cpp
#include <QGuiApplication> #include <QQuickView> #include <QQmlContext> #include "sailfishapplication.h" #include "servercomm.h" Q_DECL_EXPORT int main(int argc, char *argv[]) { QScopedPointer<QGuiApplication> app(Sailfish::createApplication(argc, argv)); QScopedPointer<QQuickView> view(Sailfish::createView(...
#include <QGuiApplication> #include <QQuickView> #include <QQmlContext> #include <QQuickWindow> #include "sailfishapplication.h" #include "servercomm.h" Q_DECL_EXPORT int main(int argc, char *argv[]) { QQuickWindow::setDefaultAlphaBuffer(true); QScopedPointer<QGuiApplication> app(Sailfish::createApplication(...
Add trasparency support for the app cover
Add trasparency support for the app cover
C++
bsd-2-clause
andreagrandi/sailsoma
9ec0512b8599a2f9f44b3a87959cad6b097b1fca
main.cpp
main.cpp
#include <ncurses.h> #include "print.hpp" #include "lightsout.hpp" using namespace roadagain; int main() { initscr(); cbreak(); noecho(); start_color(); init_colors(); board b(5, 5); while (!b.is_perfect()){ char c = getch(); switch (c){ case 'h': b.mo...
#include <ncurses.h> #include <cstring> #include <cstdlib> #include "print.hpp" #include "lightsout.hpp" using namespace roadagain; int main(int argc, char** argv) { initscr(); cbreak(); noecho(); start_color(); init_colors(); int width = 5; int height = 5; for (int i = 1; i < argc; i...
Add getting width and height from argv
Add getting width and height from argv
C++
mit
Roadagain/KeyBindings-LightsOut
d113b3b7a7e30b50444274cde034fb673611abe1
projecteuler/019/019.cpp
projecteuler/019/019.cpp
#include <iostream> using namespace std; int week_day(int day, int month, int year) { int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; year -= month < 3; return (year + year / 4 - year / 100 + year / 400 + t[month - 1] + day) % 7; } int main() { int y, m, count = 0; for (y = 1901; y <= 2000; ...
#include <iostream> using namespace std; int week_day(int day, int month, int year) { int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; year -= month < 3; return (year + year / 4 - year / 100 + year / 400 + t[month - 1] + day) % 7; } int main() { int y, m, count = 0; for (y = 1901; y <= 2000; y++)...
Remove espaço no fim da linha.
Remove espaço no fim da linha.
C++
mit
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
bb6faf8b6a24dc06757425c5d45f1cbfc39feadb
src/main/cpp/MoneyToStr.cpp
src/main/cpp/MoneyToStr.cpp
#include <iostream> #include <vector> #include <string> using namespace std; class StringBuilder { vector<string> _buffer; StringBuilder() { // this._buffer = new List(); } public: StringBuilder append(string text) { _buffer.push_back(text); return *this; } /* Strin...
#include <iostream> #include <vector> #include <string> using namespace std; class StringBuilder { vector<string> _buffer; public: StringBuilder() { } StringBuilder append(string text) { _buffer.push_back(text); return *this; } StringBuilder insert(int index, string text)...
Improve c++ version of thr converter
Improve c++ version of thr converter
C++
apache-2.0
javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russian,javadev/moneytostr-russ...
f860231f1baaa91e3ca5f92c8b3c1c891b6b30dd
src/game/space/gamescreen.cpp
src/game/space/gamescreen.cpp
#include "gamescreen.hpp" #include "ui/menu.hpp" #include "ui/event.hpp" #include "world.hpp" #include "player.hpp" #include "scenery.hpp" namespace Space { void GameScreen::handleEvent(UI::Event const &evt) { switch (evt.type) { case UI::KeyDown: case UI::KeyUp: handleKey(evt.keyEvent()); ...
#include "gamescreen.hpp" #include "ui/menu.hpp" #include "ui/event.hpp" #include "world.hpp" #include "player.hpp" #include "scenery.hpp" namespace Space { void GameScreen::handleEvent(UI::Event const &evt) { switch (evt.type) { case UI::KeyDown: case UI::KeyUp: handleKey(evt.keyEvent()); ...
Change order of entities in space game
Change order of entities in space game
C++
bsd-2-clause
depp/sglib,depp/sglib
46777affc06be43526586e0cff0541e87101dc5d
src/utility/timed_section.cpp
src/utility/timed_section.cpp
#include <bitcoin/utility/timed_section.hpp> #include <bitcoin/utility/logger.hpp> namespace libbitcoin { timed_section::timed_section( const std::string& context, const std::string& section) : context_(context), section_(section) { clock_gettime(CLOCK_REALTIME, &start_); } timed_section::~timed_section()...
#include <bitcoin/utility/timed_section.hpp> #include <bitcoin/utility/logger.hpp> #ifdef __MACH__ #include <mach/clock.h> #include <mach/mach.h> #define CLOCK_REALTIME 0 void clock_gettime(int ign, struct timespec * ts) { clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(),...
Fix Mac OS X compilation issue
Fix Mac OS X compilation issue
C++
agpl-3.0
BWallet/libbitcoin,GroestlCoin/libgroestlcoin,GroestlCoin/libgroestlcoin,GroestlCoin/libgroestlcoin,libmetrocoin/libmetrocoin-consensus,kaostao/libbitcoin,libtetcoin/libtetcoin-consensus,BWallet/libbitcoin,libmetrocoin/libmetrocoin-consensus,libtetcoin/libtetcoin-consensus,kaostao/libbitcoin,BWallet/libbitcoin,kaostao/...
ebf22b7dc6c4c4493ff4b7995c35a69204c4d438
tools/ofpx/ofpx_jsonrpc.cpp
tools/ofpx/ofpx_jsonrpc.cpp
// Copyright 2014-present Bill Fisher. All rights reserved. #include "ofpx_jsonrpc.h" #include "ofp/api/apiserver.h" using namespace ofpx; using ExitStatus = JsonRpc::ExitStatus; const int STDIN = 0; const int STDOUT = 1; //-------// // r u n // //-------// int JsonRpc::run(int argc, char **argv) { cl::ParseComm...
// Copyright 2014-present Bill Fisher. All rights reserved. #include "ofpx_jsonrpc.h" #include "ofp/api/apiserver.h" using namespace ofpx; using ExitStatus = JsonRpc::ExitStatus; const int STDIN = 0; const int STDOUT = 1; //-------// // r u n // //-------// int JsonRpc::run(int argc, char **argv) { cl::ParseComm...
Fix error logging for getrlimit and setrlimit.
Fix error logging for getrlimit and setrlimit.
C++
mit
byllyfish/libofp,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr,byllyfish/oftr,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr
ed146ce23406c8e7494b65ea423fccafd8928210
forth/stringtable.tas.cpp
forth/stringtable.tas.cpp
#define CAT(X,Y) CAT_(X,Y) #define CAT_(X,Y) X ## Y #define COUNTSTRING(Stem,Val) \ Stem: \ CAT(.L_,Stem): \ .word (CAT(...
#define CAT(X,Y) CAT_(X,Y) #define CAT_(X,Y) X ## Y #define COUNTSTRING(Stem,Val) \ Stem: \ CAT(.L_,Stem): \ .word (CAT(...
Mend bad macro in stringtable
Mend bad macro in stringtable
C++
mit
kulp/tenyr,kulp/tenyr,kulp/tenyr
1783e3ada106e5d30a1ad90a1809f32abde63ac9
source/main.cpp
source/main.cpp
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <3ds.h> #include "constants.h" #include "patches.h" #define log(...) fprintf(stderr, __VA_ARGS__) int main(int argc, char** argv) { gfxInitDefault(); consoleInit(GFX_TOP, NULL); GetVersionConstants(); PatchSrvAccess(); // ONLY UNCO...
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <3ds.h> #include "constants.h" #include "patches.h" #define log(...) fprintf(stderr, __VA_ARGS__) int main(int argc, char** argv) { gfxInitDefault(); consoleInit(GFX_TOP, NULL); if (!GetVersionConstants()) { log("Warning, your ...
Add warning if not all platform-specific constants are known for a given platform.
Add warning if not all platform-specific constants are known for a given platform.
C++
apache-2.0
archshift/service-patch,archshift/service-patch
c0710f13fd92e14339d1780ca59228860c0e0076
test/PCH/check-deserializations.cpp
test/PCH/check-deserializations.cpp
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-pch -o %t.1 %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -error-on-deserialized-decl S1_keyfunc -error-on-deserialized-decl S3 -include-pch %t.1 -emit-pch -o %t.2 %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -error-on-deserialized-decl S1_method -error-on-deserializ...
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-pch -o %t.1 %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -error-on-deserialized-decl S1_keyfunc -error-on-deserialized-decl S3 -include-pch %t.1 -emit-pch -o %t.2 %s // RUN: %clang_cc1 -triple x86_64-linux-gnu -error-on-deserialized-decl S1_method -error-on-deserializ...
Fix bots failing on an explicit triple
Fix bots failing on an explicit triple Why do we need a registered target for this? git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@230450 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
b75c0224d95005e55911bc7e81944728c78bcce1
src/libs/library.cc
src/libs/library.cc
#include "library.h" #include "libs/console.h" // console.log, console.error namespace grok { namespace libs { using namespace grok::vm; using namespace grok::obj; int LoadLibraries(VMContext *ctx) { // just console for now auto V = GetVStore(ctx); auto C = std::make_shared<Console>(); auto Wrapped...
#include "library.h" #include "libs/console.h" // console.log, console.error namespace grok { namespace libs { using namespace grok::vm; using namespace grok::obj; int LoadLibraries(VMContext *ctx) { // just console for now auto V = GetVStore(ctx); auto C = std::make_shared<Console>(); DefineIntern...
Set Console object to non writable
Set Console object to non writable
C++
apache-2.0
PrinceDhaliwal/grok,PrinceDhaliwal/grok,PrinceDhaliwal/grok
67726358f29d62db4f5e215774e3cb3b20140610
src/thread_cache.cc
src/thread_cache.cc
#include "thread_cache.h" #include "allocators/dq_sc_allocator.h" #include "runtime_vars.h" namespace { cache_aligned SpinLock g_threadcache_lock(LINKER_INITIALIZED); cache_aligned scalloc::PageHeapAllocator<scalloc::ThreadCache, 64> g_threadcache_alloc; cache_aligned uint64_t g_thread_id; } // namespace namespac...
#include "thread_cache.h" #include "allocators/dq_sc_allocator.h" #include "runtime_vars.h" namespace { cache_aligned SpinLock g_threadcache_lock(LINKER_INITIALIZED); cache_aligned scalloc::PageHeapAllocator<scalloc::ThreadCache, 64> g_threadcache_alloc; cache_aligned uint64_t g_thread_id; } // namespace namespac...
Fix missing symbols in thread cache.
Fix missing symbols in thread cache. Signed-off-by: Michael Lippautz <0d543840881a2c189b4f7636b15eebd6a8f60ace@gmail.com>
C++
bsd-2-clause
cksystemsgroup/scalloc,cksystemsgroup/scalloc,cksystemsgroup/scalloc
321a821db88cf08888f8e03cb2fc124470423306
test/test_camera.cc
test/test_camera.cc
#include "./test.h" #include "../src/camera.h" TEST(Test_Camera, ConstructorFromMatrices) { Camera expected; Camera camera(expected.getViewMatrix(), expected.getProjectionMatrix(), expected.getOrigin()); EXPECT_Vector3f_NEAR(expected.getPosition(), camera.getPosition(), 1e-5f); EXPECT_NEAR(e...
#include "./test.h" #include "../src/camera.h" TEST(Test_Camera, ConstructorFromMatricesWithDefaultValues) { Camera expected; Camera camera(expected.getViewMatrix(), expected.getProjectionMatrix(), expected.getOrigin()); EXPECT_Vector3f_NEAR(expected.getPosition(), camera.getPosition(), 1e-5f);...
Extend first camera test and add another one.
Extend first camera test and add another one. With a changed camera.
C++
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
a184d5e49d173dd5b783a2022b28f45f70b665ee
src/effects/SkColorMatrixFilter.cpp
src/effects/SkColorMatrixFilter.cpp
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkColorMatrixFilter.h" static SkScalar byte_to_scale(U8CPU byte) { if (0xFF == byte) { // want to get this exact return 1; } else { ...
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkColorMatrixFilter.h" static SkScalar byte_to_scale(U8CPU byte) { if (0xFF == byte) { // want to get this exact return 1; } else { ...
Simplify LightingFilter in add-free case am: 0698300cc5
Simplify LightingFilter in add-free case am: 0698300cc5 * commit '0698300cc567384d6c528b5b1757ed8abe930dc5': Simplify LightingFilter in add-free case Change-Id: Ic395be971bac84e1d2e6f8b9043c026051c21361
C++
bsd-3-clause
aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_ext...
a59c479e03a288ae157b9a79c4321ebc7df69654
src/main.cpp
src/main.cpp
#include <QApplication> #include "mainwindow.h" #include "runguard.h" int main(int argc, char **argv) { RunGuard guard("UwNDcyZjc6MjE1tN2Ma3NGIf5OGx"); if (!guard.tryToRun()) return 0; QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
#include <QApplication> #include "mainwindow.h" #include "runguard.h" QString getUserName() { QString name = qgetenv("USER"); if (name.isEmpty()) name = qgetenv("USERNAME"); return name; } int main(int argc, char **argv) { RunGuard guard(getUserName() + "-doer-UwNDcyZjc6MjE1tN2Ma3NGIf5OGx")...
Allow to run doer as a different user on the same machine
Allow to run doer as a different user on the same machine
C++
unlicense
Y2Z/doer
ace349173e6e68dfa347e78b5b185628f3b0720e
Lectures/Introductions/Randoms/randoms.cpp
Lectures/Introductions/Randoms/randoms.cpp
#include <iostream> #include <cstdlib> // for RAND_MAX #include <ctime> using namespace std; int main(int argc, char* argv[]) { const int LARGEST_POSSIBLE = 100; srand(time(0)); // seed the random number generator based on current time //srand(10); rand(); // the rand() function generates a random inte...
#include <iostream> #include <random> using namespace std; int main(int argc, char* argv[]) { const int LARGEST_POSSIBLE = 100; // Some of this will look funny for now; we will explain later. // A random_device helps to "seed" a number generator. random_device rd; // a compiler-chosen "good" random nu...
Use C++11 <random> instead of C rand().
Use C++11 <random> instead of C rand().
C++
mit
csulb-cecs282-2015sp/lectures,csulb-cecs282-2015fa/lectures,csulb-cecs282-2015fa/lectures,aleyba24/lectures,aadentat/lectures,aadentat/lectures,StanleyUng/lectures,StanleyUng/lectures,aleyba24/lectures,csulb-cecs282-2015sp/lectures
97aa5109956c1941aa559ecb1eba7febbed402c2
pith/test/TestPage.cpp
pith/test/TestPage.cpp
#include <Pith/Config.hpp> #include <Pith/Page.hpp> #include <gtest/gtest.h> using namespace Pith; TEST(TestPage, StackAllocate) { Page p; } TEST(TestPage, mapOnePage) { Span<Page> pages{nullptr, 1}; auto result = Page::map(pages); EXPECT_TRUE(result); EXPECT_NE(result(), nullptr); pages.value(result()); EXPE...
#include <Pith/Config.hpp> #include <Pith/Page.hpp> #include <gtest/gtest.h> using namespace Pith; TEST(TestPage, stackAllocate) { [[maybe_unused]] Page p; } TEST(TestPage, mapOnePage) { Span<Page> pages{nullptr, 1}; auto result = Page::map(pages); EXPECT_TRUE(result); EXPECT_NE(result(), nullptr); pages.value...
Mark stack allocated page as unused
Mark stack allocated page as unused Signed-off-by: Robert Young <42c59959a3f4413d6a1b4d7b4f99db457d199e49@gmail.com>
C++
apache-2.0
ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab,ab-vm/ab
8eda77e8ff8a234d836b67ab6a98bb9db5e1e762
src/DeviceInterfaces/Networking.Sntp/nf_networking_sntp.cpp
src/DeviceInterfaces/Networking.Sntp/nf_networking_sntp.cpp
// // Copyright (c) 2018 The nanoFramework project contributors // See LICENSE file in the project root for full license information. // #include "nf_networking_sntp.h" static const CLR_RT_MethodHandler method_lookup[] = { NULL, Library_nf_networking_sntp_nanoFramework_Networking_Sntp::Start___STATIC__VOID, ...
// // Copyright (c) 2018 The nanoFramework project contributors // See LICENSE file in the project root for full license information. // #include "nf_networking_sntp.h" static const CLR_RT_MethodHandler method_lookup[] = { NULL, Library_nf_networking_sntp_nanoFramework_Networking_Sntp::Start___STATIC__VOID, ...
Update nanoFramework.Networking.Sntp version to 1.0.2 ***NO_CI***
Update nanoFramework.Networking.Sntp version to 1.0.2 ***NO_CI***
C++
mit
Eclo/nf-interpreter,Eclo/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter,Eclo/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter,Eclo/nf-interpreter
69527d56bcf6896ce0a6c82d373b56865e25436a
src/zillians-thorscript-vm/main.cpp
src/zillians-thorscript-vm/main.cpp
/** * Zillians MMO * Copyright (C) 2007-2010 Zillians.com, Inc. * For more information see http://www.zillians.com * * Zillians MMO is the library and runtime for massive multiplayer online game * development in utility computing model, which runs as a service for every * developer to build their virtual world r...
/** * Zillians MMO * Copyright (C) 2007-2010 Zillians.com, Inc. * For more information see http://www.zillians.com * * Zillians MMO is the library and runtime for massive multiplayer online game * development in utility computing model, which runs as a service for every * developer to build their virtual world r...
Fix warning: convert from char** to const char**
Fix warning: convert from char** to const char**
C++
agpl-3.0
zillians/supercell_language,zillians/supercell_language,zillians/supercell_language,zillians/supercell_language,zillians/supercell_language