hexsha stringlengths 40 40 | size int64 7 1.05M | ext stringclasses 13
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 269 | max_stars_repo_name stringlengths 5 109 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 9 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 269 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 9 | max_issues_count int64 1 48.5k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 269 | max_forks_repo_name stringlengths 5 116 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 9 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 7 1.05M | avg_line_length float64 1.21 330k | max_line_length int64 6 990k | alphanum_fraction float64 0.01 0.99 | author_id stringlengths 2 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a8b58030ce2b334ddac6f03b15d3173852484a1a | 664 | cpp | C++ | solutions/0204.count-primes/0204.count-primes.1567580766.cpp | nettee/leetcode | 19aa8d54d64cce3679db5878ee0194fad95d8fa1 | [
"MIT"
] | 1 | 2021-01-14T06:01:02.000Z | 2021-01-14T06:01:02.000Z | solutions/0204.count-primes/0204.count-primes.1567580766.cpp | nettee/leetcode | 19aa8d54d64cce3679db5878ee0194fad95d8fa1 | [
"MIT"
] | 8 | 2018-03-27T11:47:19.000Z | 2018-11-12T06:02:12.000Z | solutions/0204.count-primes/0204.count-primes.1567580766.cpp | nettee/leetcode | 19aa8d54d64cce3679db5878ee0194fad95d8fa1 | [
"MIT"
] | 2 | 2020-04-30T09:47:01.000Z | 2020-12-03T09:34:08.000Z | class Solution {
public:
int countPrimes(int n) {
if (n <= 2) {
return 0;
}
vector<bool> isPrime(n, true);
isPrime[0] = false;
isPrime[1] = false;
for (int j = 2; j < sqrt(n); j++) {
if (!isPrime[j]) {
continue... | 21.419355 | 48 | 0.331325 | nettee |
a8c04e957606ec45bea4a1540e157d83a78d0c79 | 29,766 | hpp | C++ | src/Switch.System.Windows.Forms/include/Switch/System/Windows/Forms/FontDialog.hpp | victor-timoshin/Switch | 8e8e687a8bdc4f79d482680da3968e9b3e464b8b | [
"MIT"
] | 4 | 2020-02-11T13:22:58.000Z | 2022-02-24T00:37:43.000Z | src/Switch.System.Windows.Forms/include/Switch/System/Windows/Forms/FontDialog.hpp | sgf/Switch | 8e8e687a8bdc4f79d482680da3968e9b3e464b8b | [
"MIT"
] | null | null | null | src/Switch.System.Windows.Forms/include/Switch/System/Windows/Forms/FontDialog.hpp | sgf/Switch | 8e8e687a8bdc4f79d482680da3968e9b3e464b8b | [
"MIT"
] | 2 | 2020-02-01T02:19:01.000Z | 2021-12-30T06:44:00.000Z | /// @file
/// @brief Contains Switch::System::Windows::Forms::Application class.
#pragma once
#include <Switch/System/Drawing/Color.hpp>
#include <Switch/System/Drawing/Font.hpp>
#include <Switch/System/EventHandler.hpp>
#include "../../../System/Windows/Forms/CommonDialog.hpp"
/// @brief The Switch namespace contain... | 54.416819 | 348 | 0.569643 | victor-timoshin |
a8c4c5f399d8f2ccc6b26b9066cf7b37a4d907c2 | 1,677 | cpp | C++ | U/168623.cpp | langonginc/cfile | 46458897b8a4a8d58a2bc63ecb6ef84f76bdb61f | [
"MIT"
] | 1 | 2020-09-13T02:51:25.000Z | 2020-09-13T02:51:25.000Z | U/168623.cpp | langonginc/cfile | 46458897b8a4a8d58a2bc63ecb6ef84f76bdb61f | [
"MIT"
] | null | null | null | U/168623.cpp | langonginc/cfile | 46458897b8a4a8d58a2bc63ecb6ef84f76bdb61f | [
"MIT"
] | 1 | 2021-06-05T03:37:57.000Z | 2021-06-05T03:37:57.000Z | /*
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;
typedef long long ll;
const int inf = 1e5 + 5;
ll a[inf], pre[inf], n, q, ans;
int main ()
{
scanf ("%lld%lld", &n, &q);
for (int i = 1; i <= n; i ++)
{
scanf ("%lld", &a[i]);
... | 20.204819 | 88 | 0.38879 | langonginc |
a8c8727dec512c83aa90809ca98816a86dd0251c | 783 | cpp | C++ | ArduinoAdalight/Police.cpp | Asord/AdalightEffects | 7c0c3403f9f58df7d711f9ebf7d24a6d5e95a4f6 | [
"Apache-2.0"
] | null | null | null | ArduinoAdalight/Police.cpp | Asord/AdalightEffects | 7c0c3403f9f58df7d711f9ebf7d24a6d5e95a4f6 | [
"Apache-2.0"
] | null | null | null | ArduinoAdalight/Police.cpp | Asord/AdalightEffects | 7c0c3403f9f58df7d711f9ebf7d24a6d5e95a4f6 | [
"Apache-2.0"
] | null | null | null | #include "police.h"
#include "policetpl.h"
char port[] = "\\\\.\\COM4";
Police::Police(): serial(port)
{
/* local init*/
this->speed = tplspeed;
this->frameLen = tplframelen;
this->data = policetpl;
this->framePos = 0;
/* serial init */
this->y_buffer = new byte[6+ this->frameLen];
// header
memcpy(this-... | 20.605263 | 66 | 0.636015 | Asord |
a8c8f93d940e6cae405df4680e7f92133e57e8c9 | 1,096 | cpp | C++ | the_concepts_and_practice_of_math_fin/Project11/ProjectB_13/lmm/rebonato_formula.cpp | calvin456/intro_derivative_pricing | 0841fbc0344bee00044d67977faccfd2098b5887 | [
"MIT"
] | 5 | 2016-12-28T16:07:38.000Z | 2022-03-11T09:55:57.000Z | the_concepts_and_practice_of_math_fin/Project11/ProjectB_13/lmm/rebonato_formula.cpp | calvin456/intro_derivative_pricing | 0841fbc0344bee00044d67977faccfd2098b5887 | [
"MIT"
] | null | null | null | the_concepts_and_practice_of_math_fin/Project11/ProjectB_13/lmm/rebonato_formula.cpp | calvin456/intro_derivative_pricing | 0841fbc0344bee00044d67977faccfd2098b5887 | [
"MIT"
] | 5 | 2017-06-04T04:50:47.000Z | 2022-03-17T17:41:16.000Z | //rebonato_formula.cpp
#include "rebonato_formula.h"
#include "dsct_factor.h"
//The approx formula
//Using Rebonato's formula to approx vol and plug it into Black formula to approx swaption price.
//Rebonato's formula for vol
double rebonato_formula(double swap_rte,
size_t a,
size_t b,
std::vecto... | 28.102564 | 97 | 0.644161 | calvin456 |
a8c94ebd1d13c1e6c86d55dc7e61ee1cc11f4a06 | 586 | cpp | C++ | Tetris/Texts.cpp | eewano/Tetris_OpenGL | 60bb14649a4a6a2f7f4f489af273acdfe29b3062 | [
"MIT"
] | null | null | null | Tetris/Texts.cpp | eewano/Tetris_OpenGL | 60bb14649a4a6a2f7f4f489af273acdfe29b3062 | [
"MIT"
] | 1 | 2017-07-25T07:27:56.000Z | 2017-07-25T07:27:56.000Z | Tetris/Texts.cpp | eewano/Tetris_OpenGL | 60bb14649a4a6a2f7f4f489af273acdfe29b3062 | [
"MIT"
] | null | null | null | #include "Texts.hpp"
Texts::Texts(Vec2f aPos, Vec2f aSize)
{
vertex[0] = geometry[0] = { -aSize.x / 2, +aSize.y / 2 };
vertex[1] = geometry[1] = { +aSize.x / 2, +aSize.y / 2 };
vertex[2] = geometry[2] = { +aSize.x / 2, -aSize.y / 2 };
vertex[3] = geometry[3] = { -aSize.x / 2, -aSize.y / 2 };
u... | 21.703704 | 61 | 0.447099 | eewano |
a8c9a8d0f37f5886627605abcbed992919696489 | 674 | hpp | C++ | src/version.hpp | Minhoquinha/pk2 | 91aa1dc76f21b18b641e8523d209c0a2980f45ee | [
"MIT"
] | 1 | 2020-02-20T13:43:42.000Z | 2020-02-20T13:43:42.000Z | src/version.hpp | Minhoquinha/pk2 | 91aa1dc76f21b18b641e8523d209c0a2980f45ee | [
"MIT"
] | null | null | null | src/version.hpp | Minhoquinha/pk2 | 91aa1dc76f21b18b641e8523d209c0a2980f45ee | [
"MIT"
] | null | null | null | //#########################
//Pekka Kana 2
//Copyright (c) 2003 Janne Kivilahti
//#########################
#pragma once
#define PK2_NAME "Pekka Kana 2"
#define PK2_VERSION "1.3.3-2"
#define PK2_VERNUM 0x0304
#define PK2_VER_MAJOR 1
#define PK2_VER_MINOR 3
#define PK2_VER_REVISION 3
#define PK2_VERSION_NAME "(r3)"
... | 20.424242 | 85 | 0.692878 | Minhoquinha |
a8ccca1a5a24f2a3f703f7d5e66dbde3ac8b5fb4 | 1,149 | cpp | C++ | Samples/Native/MyApp/TreeViewHostUserControl.cpp | sylveon/Xaml-Islands-Samples | edf87f7802d7accbd68bc6e20ed1d5b212b563e9 | [
"MIT"
] | 91 | 2020-01-06T20:17:28.000Z | 2022-03-26T22:04:35.000Z | Samples/Native/MyApp/TreeViewHostUserControl.cpp | sylveon/Xaml-Islands-Samples | edf87f7802d7accbd68bc6e20ed1d5b212b563e9 | [
"MIT"
] | 44 | 2020-01-18T13:07:32.000Z | 2021-12-05T11:41:11.000Z | Samples/Native/MyApp/TreeViewHostUserControl.cpp | sylveon/Xaml-Islands-Samples | edf87f7802d7accbd68bc6e20ed1d5b212b563e9 | [
"MIT"
] | 41 | 2019-12-18T01:41:40.000Z | 2022-02-28T19:52:09.000Z | #include "pch.h"
#include "TreeViewHostUserControl.h"
#if __has_include("TreeViewHostUserControl.g.cpp")
#include "TreeViewHostUserControl.g.cpp"
#endif
using namespace winrt;
using namespace Windows::UI::Xaml;
using namespace Windows::Foundation;
using namespace Windows::UI::Popups;
namespace winrt::MyApp::implemen... | 28.02439 | 135 | 0.793734 | sylveon |
a8d0786d75032fda3d801a056a3f3a404549a2ad | 3,017 | cpp | C++ | src/machine_info/machine_info.cpp | chingoduc/parallel-bayesian-toolbox | 20c06a823c714a51a51e5b59c3232cd1260b0fa4 | [
"BSD-4-Clause-UC"
] | 1 | 2015-12-01T13:15:14.000Z | 2015-12-01T13:15:14.000Z | src/machine_info/machine_info.cpp | chingoduc/parallel-bayesian-toolbox | 20c06a823c714a51a51e5b59c3232cd1260b0fa4 | [
"BSD-4-Clause-UC"
] | null | null | null | src/machine_info/machine_info.cpp | chingoduc/parallel-bayesian-toolbox | 20c06a823c714a51a51e5b59c3232cd1260b0fa4 | [
"BSD-4-Clause-UC"
] | null | null | null | #include "machine_info.h"
#include <stdio.h>
#include <cuda.h>
#include <cuda_runtime.h>
#ifdef WIN32
// Used by __cpuid (see: http://msdn.microsoft.com/en-us/library/hskdteyh%28v=vs.80%29.aspx and http://weseetips.com/2009/06/21/how-to-get-the-cpu-name-string/)
#include <iostream>
#include <intrin.h>
#en... | 26.008621 | 164 | 0.609546 | chingoduc |
a8d358281fdaff819773b89b7b532f6c339abcba | 139,794 | cpp | C++ | VehicleMovementArcadeWheeled.cpp | IvarJonsson/Project-Unknown | 4675b41bbb5e90135c7bf3aded2c2e262b50f351 | [
"BSL-1.0"
] | null | null | null | VehicleMovementArcadeWheeled.cpp | IvarJonsson/Project-Unknown | 4675b41bbb5e90135c7bf3aded2c2e262b50f351 | [
"BSL-1.0"
] | null | null | null | VehicleMovementArcadeWheeled.cpp | IvarJonsson/Project-Unknown | 4675b41bbb5e90135c7bf3aded2c2e262b50f351 | [
"BSL-1.0"
] | null | null | null | // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
/*************************************************************************
-------------------------------------------------------------------------
$Id$
$DateTime$
Description: Implements a standard wheel based vehicle movements
----------------... | 34.322121 | 301 | 0.684951 | IvarJonsson |
a8d3b39ba7e7f30f4296fe7950bacde7da79ff14 | 3,138 | cpp | C++ | AllChapters/Code/Chapter13Sample01.cpp | percentcer/Hands-On-Game-Animation-Programming | 52f9bdb9db964192bfdddc512c6a40055830f17a | [
"MIT"
] | 103 | 2020-05-22T09:17:54.000Z | 2022-03-29T07:31:05.000Z | AllChapters/Code/Chapter13Sample01.cpp | PacktPublishing/Game-Animation-Programming | 62c589661c51aaa83c4d060b0475b26b31e53a1d | [
"MIT"
] | 2 | 2020-10-14T20:09:58.000Z | 2021-02-07T05:15:41.000Z | AllChapters/Code/Chapter13Sample01.cpp | PacktPublishing/Game-Animation-Programming | 62c589661c51aaa83c4d060b0475b26b31e53a1d | [
"MIT"
] | 32 | 2020-06-15T20:15:28.000Z | 2022-03-27T07:22:09.000Z | #include "Chapter13Sample01.h"
#define GIZMO_SIZE 0.25f
void Chapter13Sample01::Initialize() {
mSolver.Resize(3);
mSolver[0].rotation = angleAxis(90.0f * QUAT_DEG2RAD, vec3(1, 0, 0));
mSolver[1].position = vec3(0, 0, 1.0f);
mSolver[2].position = vec3(0, 0, 1.5f);;
mTarget.position = vec3(1, -2, 0);
mCCDLines ... | 35.258427 | 118 | 0.705545 | percentcer |
a8d6eadbb657513375b89685a34644789dc19abb | 14,606 | cpp | C++ | src/Widgets/CustomizePanel.cpp | huntermalm/Layers | 1f2f6eabe3be8dfbc60d682ca47543f7807a0bbf | [
"MIT"
] | null | null | null | src/Widgets/CustomizePanel.cpp | huntermalm/Layers | 1f2f6eabe3be8dfbc60d682ca47543f7807a0bbf | [
"MIT"
] | null | null | null | src/Widgets/CustomizePanel.cpp | huntermalm/Layers | 1f2f6eabe3be8dfbc60d682ca47543f7807a0bbf | [
"MIT"
] | null | null | null | #include "../../include/CustomizePanel.h"
#include "../../include/calculate.h"
#include "../../include/Window.h"
#include <QApplication>
#include <QIntValidator>
using Layers::AttributeWidget;
using Layers::Button;
using Layers::CustomizePanel;
using Layers::Label;
CustomizePanel::CustomizePanel(Themeable* themeable... | 31.752174 | 132 | 0.768862 | huntermalm |
a8d79eb1f9cefe251fbadb51437124bbe1eaaee0 | 67 | hpp | C++ | home_server/Server.hpp | zhang-ray/easy-home-monitoring | a0d5012a1de5468d3d02ed60a3c247ab3788dd61 | [
"MIT"
] | 33 | 2018-10-11T05:30:37.000Z | 2022-02-10T12:51:47.000Z | home_server/Server.hpp | zhang-ray/easy-home-monitoring | a0d5012a1de5468d3d02ed60a3c247ab3788dd61 | [
"MIT"
] | 16 | 2018-10-15T06:52:41.000Z | 2020-11-06T02:53:21.000Z | home_server/Server.hpp | zhang-ray/easy-home-monitoring | a0d5012a1de5468d3d02ed60a3c247ab3788dd61 | [
"MIT"
] | 2 | 2019-09-14T18:07:57.000Z | 2020-04-29T09:38:02.000Z | #pragma once
class Server {
public :
virtual ~Server(){ }
};
| 8.375 | 24 | 0.597015 | zhang-ray |
a8d96823e18242273aa0c00282425dec748cba40 | 232 | cc | C++ | test/util/unique_ptr_test.cc | Conzxy/kanon | 3440b0966153a0b8469e90b2a52df317aa4fe723 | [
"MIT"
] | null | null | null | test/util/unique_ptr_test.cc | Conzxy/kanon | 3440b0966153a0b8469e90b2a52df317aa4fe723 | [
"MIT"
] | null | null | null | test/util/unique_ptr_test.cc | Conzxy/kanon | 3440b0966153a0b8469e90b2a52df317aa4fe723 | [
"MIT"
] | null | null | null | #include "kanon/util/ptr.h"
#include <assert.h>
int main()
{
auto p1 = kanon::make_unique<int>(32);
auto p2 = kanon::make_unique<int[]>(32);
p2[3] = 2;
assert(p2[3] == 2);
auto p3 = kanon::make_unique<int[]>(22);
}
| 15.466667 | 42 | 0.586207 | Conzxy |
a8dd9e6b267ba92b42c7f6036f58f8259e6b4649 | 506 | cpp | C++ | 03.fibbonachi/fibonacci_c_log_n_matrix.cpp | rostislav-nikitin/algorithms | c1b9522327a3890e43e54b638e568e30b1ae9714 | [
"MIT"
] | null | null | null | 03.fibbonachi/fibonacci_c_log_n_matrix.cpp | rostislav-nikitin/algorithms | c1b9522327a3890e43e54b638e568e30b1ae9714 | [
"MIT"
] | null | null | null | 03.fibbonachi/fibonacci_c_log_n_matrix.cpp | rostislav-nikitin/algorithms | c1b9522327a3890e43e54b638e568e30b1ae9714 | [
"MIT"
] | null | null | null | //#define DEBUG
#include <iostream>
#include <sstream>
#include "../matrix.h"
using namespace std;
template<typename T>
T parse(string str)
{
T result;
istringstream {str} >> result;
return result;
}
int main(int argc, char *argv[])
{
if(argc < 2)
{
cout << "Invalid arguments.\n\tUsage: fibonacci {n}"... | 14.882353 | 71 | 0.581028 | rostislav-nikitin |
a8e6f1f016a35b26c8ce050ae983b8dcfa53eadc | 3,650 | cpp | C++ | src/app/vio.cpp | Dung-ND/xivo | 47defabf05173559f694e2416e49d6b70e9d5a82 | [
"BSD-4-Clause-UC"
] | 34 | 2019-08-20T00:14:49.000Z | 2019-08-22T22:37:49.000Z | src/app/vio.cpp | Dung-ND/xivo | 47defabf05173559f694e2416e49d6b70e9d5a82 | [
"BSD-4-Clause-UC"
] | null | null | null | src/app/vio.cpp | Dung-ND/xivo | 47defabf05173559f694e2416e49d6b70e9d5a82 | [
"BSD-4-Clause-UC"
] | 1 | 2019-08-21T18:49:10.000Z | 2019-08-21T18:49:10.000Z | // Author: Xiaohan Fei
#include "unistd.h"
#include <algorithm>
#include <vector>
#include "gflags/gflags.h"
#include "glog/logging.h"
#include "opencv2/highgui/highgui.hpp"
#include "estimator.h"
#include "estimator_process.h"
#include "metrics.h"
#include "tracker.h"
#include "loader.h"
#include "viewer.h"
#include... | 29.2 | 74 | 0.600548 | Dung-ND |
5ef363ee23d0f5b8c479cd94ec7589fc3e66dab8 | 331 | cpp | C++ | docs/mfc/codesnippet/CPP/ctypedptrlist-class_2.cpp | bobbrow/cpp-docs | 769b186399141c4ea93400863a7d8463987bf667 | [
"CC-BY-4.0",
"MIT"
] | 965 | 2017-06-25T23:57:11.000Z | 2022-03-31T14:17:32.000Z | docs/mfc/codesnippet/CPP/ctypedptrlist-class_2.cpp | bobbrow/cpp-docs | 769b186399141c4ea93400863a7d8463987bf667 | [
"CC-BY-4.0",
"MIT"
] | 3,272 | 2017-06-24T00:26:34.000Z | 2022-03-31T22:14:07.000Z | docs/mfc/codesnippet/CPP/ctypedptrlist-class_2.cpp | bobbrow/cpp-docs | 769b186399141c4ea93400863a7d8463987bf667 | [
"CC-BY-4.0",
"MIT"
] | 951 | 2017-06-25T12:36:14.000Z | 2022-03-26T22:49:06.000Z | class CMyObject : public CObject
{
public:
int i;
void Serialize(CArchive& ar);
CMyObject() { i = 9876; }
protected:
DECLARE_SERIAL(CMyObject)
};
IMPLEMENT_SERIAL(CMyObject, CObject, 0)
void CMyObject::Serialize(CArchive& ar)
{
CObject::Serialize(ar);
if (ar.IsStoring())
ar << i;
else
... | 16.55 | 39 | 0.640483 | bobbrow |
5ef628671bef0c413d815088a6a2ffdc3e3fbe42 | 722 | cpp | C++ | qt5/radiobuttons.cpp | kristjanbb/libui | e381e6b45fc421daeea6f1ed5c29a84aad13271b | [
"MIT"
] | 3 | 2016-07-12T12:06:15.000Z | 2021-05-24T22:06:45.000Z | qt5/radiobuttons.cpp | kristjanbb/libui | e381e6b45fc421daeea6f1ed5c29a84aad13271b | [
"MIT"
] | null | null | null | qt5/radiobuttons.cpp | kristjanbb/libui | e381e6b45fc421daeea6f1ed5c29a84aad13271b | [
"MIT"
] | null | null | null |
#include "uipriv_qt5.hpp"
#include <QRadioButton>
#include <QVBoxLayout>
struct uiRadioButtons : public uiQt5Control {};
void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
{
if (auto layout = uiValidateAndCastObjTo<QLayout>(r)) {
auto radioButton = new QRadioButton(QString::fromUtf8(text));
layout-... | 24.896552 | 94 | 0.752078 | kristjanbb |
5ef79d2ceedc9b1666540c47d1f426bb712a0427 | 2,839 | cpp | C++ | test/unit/math/rev/fun/misc_test.cpp | bayesmix-dev/math | 3616f7195adc95ef8e719a2af845d61102bc9272 | [
"BSD-3-Clause"
] | 1 | 2020-06-14T14:33:37.000Z | 2020-06-14T14:33:37.000Z | test/unit/math/rev/fun/misc_test.cpp | bayesmix-dev/math | 3616f7195adc95ef8e719a2af845d61102bc9272 | [
"BSD-3-Clause"
] | 2 | 2019-07-23T12:45:30.000Z | 2020-05-01T20:43:03.000Z | test/unit/math/rev/fun/misc_test.cpp | bayesmix-dev/math | 3616f7195adc95ef8e719a2af845d61102bc9272 | [
"BSD-3-Clause"
] | 1 | 2020-05-10T12:55:07.000Z | 2020-05-10T12:55:07.000Z | #include <stan/math/rev.hpp>
#include <gtest/gtest.h>
#include <test/unit/math/rev/fun/util.hpp>
#include <vector>
TEST(AgradRevMatrix, mv_squaredNorm) {
using stan::math::matrix_v;
matrix_v a(2, 2);
a << -1.0, 2.0, 5.0, 10.0;
AVEC x = createAVEC(a(0, 0), a(0, 1), a(1, 0), a(1, 1));
AVAR s = a.squaredNorm... | 23.857143 | 71 | 0.579077 | bayesmix-dev |
6f01af9220e2bf36bf90a15745c8b59aa435e971 | 555 | cpp | C++ | Patterns/2 Heap/295_find_median_from_data_stream.cpp | xtstc131/mall0x_Leetcode | db528f2a78808d4123785c35218cce00906166dd | [
"MIT"
] | 1 | 2019-12-25T16:19:21.000Z | 2019-12-25T16:19:21.000Z | Patterns/2 Heap/295_find_median_from_data_stream.cpp | xtstc131/mall0x_Leetcode | db528f2a78808d4123785c35218cce00906166dd | [
"MIT"
] | null | null | null | Patterns/2 Heap/295_find_median_from_data_stream.cpp | xtstc131/mall0x_Leetcode | db528f2a78808d4123785c35218cce00906166dd | [
"MIT"
] | null | null | null | #include "header.hpp"
class MedianFinder
{
priority_queue<int> lo;
priority_queue<int, vector<int>, greater<int>> hi;
public:
/** initialize your data structure here. */
MedianFinder()
{
}
void addNum(int num)
{
lo.push(num);
hi.push(lo.top());
lo.pop();
... | 17.903226 | 86 | 0.481081 | xtstc131 |
6f08dd7c28990a7a4d6aa620c44ce71a7edb773e | 1,122 | cpp | C++ | src/main.cpp | ammubhave/emu | ff9501719f3cc53207a8931d85c19d24c86dccdc | [
"MIT"
] | null | null | null | src/main.cpp | ammubhave/emu | ff9501719f3cc53207a8931d85c19d24c86dccdc | [
"MIT"
] | null | null | null | src/main.cpp | ammubhave/emu | ff9501719f3cc53207a8931d85c19d24c86dccdc | [
"MIT"
] | null | null | null | #include <SFML/Graphics.hpp>
#include <iostream>
#include "Bus.h"
#include "GdbServer.h"
#include "Ram.h"
#include "Rom.h"
#include "cpu/Cpu.h"
#include "peripherals/Cmos.h"
#include "peripherals/Ps2.h"
const uint64_t CPU_FREQUENCY = 25000000;
using namespace emu::peripherals::cmos;
using namespace emu::peripherals:... | 19.344828 | 73 | 0.631016 | ammubhave |
6f091f1f2d25e8c982ed219a5573d40be420dbad | 2,019 | cpp | C++ | main.cpp | thuhuwei/eharmony-photofeature | cc9e2f4bc4469f0a0966e5190af5928bffe21ca6 | [
"BSD-3-Clause"
] | 14 | 2015-10-06T10:42:05.000Z | 2018-02-13T09:28:48.000Z | main.cpp | thuhuwei/eharmony-photofeature | cc9e2f4bc4469f0a0966e5190af5928bffe21ca6 | [
"BSD-3-Clause"
] | 1 | 2016-09-18T13:51:53.000Z | 2016-09-18T14:12:55.000Z | main.cpp | thuhuwei/eharmony-photofeature | cc9e2f4bc4469f0a0966e5190af5928bffe21ca6 | [
"BSD-3-Clause"
] | 14 | 2015-10-31T05:25:27.000Z | 2018-10-26T06:15:56.000Z | #include "eHimage.h"
#include "eHfacemodel.h"
#include "eHposemodel.h"
#include "eHbbox.h"
#include <cstring>
#include <vector>
#include <iostream>
int main(int argc, char** argv) {
const char *imgPath, *facemodelPath, *posemodelPath, *jpgSavePath, *xmlSavePath;
switch(argc) {
case 2:
imgPath = ar... | 30.134328 | 109 | 0.62209 | thuhuwei |
6f0c96cd1c8840df9fcdb17fb6fe7b42a53ac160 | 1,712 | cpp | C++ | codility/06_NumberOfDiscIntersections.cpp | longztian/cpp | 59203f41162f40a46badf69093d287250e5cbab6 | [
"MIT"
] | null | null | null | codility/06_NumberOfDiscIntersections.cpp | longztian/cpp | 59203f41162f40a46badf69093d287250e5cbab6 | [
"MIT"
] | null | null | null | codility/06_NumberOfDiscIntersections.cpp | longztian/cpp | 59203f41162f40a46badf69093d287250e5cbab6 | [
"MIT"
] | null | null | null | // you can use includes, for example:
// #include <algorithm>
// you can write to stdout for debugging purposes, e.g.
// cout << "this is a debug message" << endl;
#include <map>
#include <iterator>
using mmap_t = multimap<long, long>;
int solution(vector<int> &A) {
// write your code in C++11 (g++ 4.8.2)
in... | 23.777778 | 82 | 0.568925 | longztian |
6f0eb9478d8853c511985a2f9da2f31cb08d79da | 22,278 | cpp | C++ | src/chrono_vehicle/cosim/terrain/ChVehicleCosimTerrainNodeGranularSPH.cpp | aluaces/chrono | 675ff6c1105814973dd7f844bd19385d9760f90c | [
"BSD-3-Clause"
] | 1,383 | 2015-02-04T14:17:40.000Z | 2022-03-30T04:58:16.000Z | src/chrono_vehicle/cosim/terrain/ChVehicleCosimTerrainNodeGranularSPH.cpp | pchaoWT/chrono | fd68d37d1d4ee75230dc1eea78ceff91cca7ac32 | [
"BSD-3-Clause"
] | 245 | 2015-01-11T15:30:51.000Z | 2022-03-30T21:28:54.000Z | src/chrono_vehicle/cosim/terrain/ChVehicleCosimTerrainNodeGranularSPH.cpp | pchaoWT/chrono | fd68d37d1d4ee75230dc1eea78ceff91cca7ac32 | [
"BSD-3-Clause"
] | 351 | 2015-02-04T14:17:47.000Z | 2022-03-30T04:42:52.000Z | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2020 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... | 40.877064 | 120 | 0.603555 | aluaces |
6f16725df1d92918503ef17b61aa621ed01976fc | 26 | cpp | C++ | serializer/serializer.cpp | lukka/yagbe | 8f66d55f455e8a13db84cd521eabb498a1165f44 | [
"MIT"
] | 1 | 2018-06-10T14:45:53.000Z | 2018-06-10T14:45:53.000Z | serializer/serializer.cpp | Kaosumaru/yagbe | 13a2dea9dd50ae4b548bec3704fdc88c2a48d956 | [
"MIT"
] | 1 | 2020-02-16T02:50:36.000Z | 2020-02-24T20:50:38.000Z | serializer/serializer.cpp | lukka/yagbe | 8f66d55f455e8a13db84cd521eabb498a1165f44 | [
"MIT"
] | 1 | 2020-02-16T00:36:38.000Z | 2020-02-16T00:36:38.000Z | #include "serializer.hpp"
| 13 | 25 | 0.769231 | lukka |
6f16a4355e419352e34eba643c7b196416ffac57 | 3,068 | cpp | C++ | src/color_map_p4.cpp | Magorx/Vulkanizer | 3da477f2ccf337140b8557cee98636fe2547c540 | [
"MIT"
] | null | null | null | src/color_map_p4.cpp | Magorx/Vulkanizer | 3da477f2ccf337140b8557cee98636fe2547c540 | [
"MIT"
] | null | null | null | src/color_map_p4.cpp | Magorx/Vulkanizer | 3da477f2ccf337140b8557cee98636fe2547c540 | [
"MIT"
] | null | null | null | #include "color_map_p4.h"
ColorMapP4::ColorMapP4():
width(0),
height(0),
data(nullptr)
{}
bool ColorMapP4::ctor(const size_t width_, const size_t height_) {
real_width = width_;
width = real_width + (4 - real_width % 4);
height = height_;
data = (ARGB*) calloc(width * height, sizeof(ARGB));
if (!data) {
fprin... | 21.305556 | 87 | 0.604628 | Magorx |
6f1a0a1f8b8ecdaa4eadcaf91a7940e9ec79d4e6 | 8,817 | cpp | C++ | test/unit/io/alignment_file/format_sam_test.cpp | giesselmann/seqan3 | 3a26b42b7066ac424b6e604115fe516607c308c0 | [
"BSD-3-Clause"
] | null | null | null | test/unit/io/alignment_file/format_sam_test.cpp | giesselmann/seqan3 | 3a26b42b7066ac424b6e604115fe516607c308c0 | [
"BSD-3-Clause"
] | null | null | null | test/unit/io/alignment_file/format_sam_test.cpp | giesselmann/seqan3 | 3a26b42b7066ac424b6e604115fe516607c308c0 | [
"BSD-3-Clause"
] | null | null | null | // ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
//
// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
// Copyright (c) 2016-2018, Knut Reinert & MPI M... | 34.849802 | 96 | 0.556765 | giesselmann |
6f22502b08a0e6148ad2291b8cc51dd7aca29866 | 1,760 | cpp | C++ | src/modules/MFServo.cpp | danecreekphotography/MobiFlight-STM32Firmware | adfc5aba28271c00508ef07d5a2d12341aa7eef5 | [
"MIT"
] | 1 | 2021-11-08T15:07:59.000Z | 2021-11-08T15:07:59.000Z | src/modules/MFServo.cpp | danecreekphotography/MobiFlight-STM32Firmware | adfc5aba28271c00508ef07d5a2d12341aa7eef5 | [
"MIT"
] | 33 | 2021-09-23T13:21:56.000Z | 2021-09-30T15:11:57.000Z | src/modules/MFServo.cpp | danecreekphotography/MobiFlight-STM32Firmware | adfc5aba28271c00508ef07d5a2d12341aa7eef5 | [
"MIT"
] | null | null | null | /*---------------------------------------------------------------------------------------------
* Copyright (c) Neil Enns. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*-------------------------------------------------------------------------------... | 22.564103 | 96 | 0.621591 | danecreekphotography |
6f254aa457e84c08717d9da6703c7e971aea1b41 | 7,944 | cpp | C++ | src/tests/class_tests/smartpeak/source/WindowSizesAndPositions_test.cpp | AutoFlowResearch/SmartPeak | 079cd25aace5cad98d64486273a35fc8b4e53b07 | [
"MIT"
] | 13 | 2020-12-09T14:40:15.000Z | 2022-01-14T17:56:57.000Z | src/tests/class_tests/smartpeak/source/WindowSizesAndPositions_test.cpp | AutoFlowResearch/SmartPeak | 079cd25aace5cad98d64486273a35fc8b4e53b07 | [
"MIT"
] | 106 | 2020-12-02T20:50:58.000Z | 2022-03-26T10:45:57.000Z | src/tests/class_tests/smartpeak/source/WindowSizesAndPositions_test.cpp | AutoFlowResearch/SmartPeak | 079cd25aace5cad98d64486273a35fc8b4e53b07 | [
"MIT"
] | 8 | 2020-12-03T10:54:42.000Z | 2022-01-17T11:21:06.000Z | // --------------------------------------------------------------------------
// SmartPeak -- Fast and Accurate CE-, GC- and LC-MS(/MS) Data Processing
// --------------------------------------------------------------------------
// Copyright The SmartPeak Team -- Novo Nordisk Foundation
// Center for Biosustainabil... | 49.341615 | 78 | 0.771777 | AutoFlowResearch |
6f274d0ac31b09a3721f6034a2879f28fc478aa8 | 367 | hpp | C++ | src/common.hpp | waffle-empire/Crypto.com-Implementation | 0b9ca9756276b33cab82366020b1a350e850060e | [
"MIT"
] | null | null | null | src/common.hpp | waffle-empire/Crypto.com-Implementation | 0b9ca9756276b33cab82366020b1a350e850060e | [
"MIT"
] | null | null | null | src/common.hpp | waffle-empire/Crypto.com-Implementation | 0b9ca9756276b33cab82366020b1a350e850060e | [
"MIT"
] | null | null | null | #pragma once
#include <atomic>
#include <condition_variable>
#include <fstream>
#include <functional>
#include <memory>
#include <stack>
#include <thread>
#include <csignal>
#include <nlohmann/json.hpp>
namespace crypto_com_impl
{
inline std::atomic<bool> g_running{ true };
using namespace std::literals::c... | 17.47619 | 51 | 0.743869 | waffle-empire |
6f28d0d9e822fd4beb0066c3005c14514813bf5b | 1,010 | cpp | C++ | src/Tile.cpp | T0T0R/minimax2048 | 53f03c5d0461a0f68f522cf282c185d39ce0052c | [
"MIT"
] | null | null | null | src/Tile.cpp | T0T0R/minimax2048 | 53f03c5d0461a0f68f522cf282c185d39ce0052c | [
"MIT"
] | null | null | null | src/Tile.cpp | T0T0R/minimax2048 | 53f03c5d0461a0f68f522cf282c185d39ce0052c | [
"MIT"
] | null | null | null | #include <iostream>
#include <array>
#include "./mm2048.h"
#include "./Tile.h"
Tile::Tile():
m_x(-1), m_y(-1), m_value(-1), m_justMerged(false)
{}
Tile::Tile(int value) :
m_x(-1), m_y(-1), m_value(value), m_justMerged(false)
{}
Tile::Tile(Position const& position, int value):
m_x(position.x), m_y(position.y), m... | 16.290323 | 70 | 0.661386 | T0T0R |
6f2979d5a7a4d6ca803206e99d1d9a192adad56b | 2,804 | hpp | C++ | cpp_skeleton/skeleton/states.hpp | nmondal417/6.176-Pokerbots | 87eefb38e79adc94939d9676baf6b0f071a34d54 | [
"MIT"
] | null | null | null | cpp_skeleton/skeleton/states.hpp | nmondal417/6.176-Pokerbots | 87eefb38e79adc94939d9676baf6b0f071a34d54 | [
"MIT"
] | null | null | null | cpp_skeleton/skeleton/states.hpp | nmondal417/6.176-Pokerbots | 87eefb38e79adc94939d9676baf6b0f071a34d54 | [
"MIT"
] | null | null | null | #ifndef __SKELETON_STATES_HPP__
#define __SKELETON_STATES_HPP__
#include <array>
#include <string>
#include "actions.hpp"
using std::array;
using std::string;
using std::max;
using std::min;
const int NUM_ROUNDS = 1000;
const int STARTING_STACK = 200;
const int BIG_BLIND = 2;
const int SMALL_... | 23.762712 | 93 | 0.543509 | nmondal417 |
6f2b5f97115c4c377d9674658fca37eff83a26a6 | 1,025 | cpp | C++ | Console3D/Source/Core/PaceMaker.cpp | l3ch4tno1r/Console3D | acb6b92555e01b8ada31cd426753b3a671a6afdd | [
"Apache-2.0"
] | 3 | 2020-11-01T18:17:26.000Z | 2021-03-19T21:40:50.000Z | Console3D/Source/Core/PaceMaker.cpp | l3ch4tno1r/Console3D | acb6b92555e01b8ada31cd426753b3a671a6afdd | [
"Apache-2.0"
] | null | null | null | Console3D/Source/Core/PaceMaker.cpp | l3ch4tno1r/Console3D | acb6b92555e01b8ada31cd426753b3a671a6afdd | [
"Apache-2.0"
] | null | null | null | #include "PaceMaker.h"
namespace LCN::Core
{
PaceMaker::PaceMaker() :
m_Run(false),
m_Pause(false)
{}
PaceMaker::~PaceMaker()
{
m_Run = false;
if(m_RunThread.joinable())
m_RunThread.join();
}
void PaceMaker::MainThread()
{
std::chrono::high_resolution_clock::time_point start, next;
while (m_R... | 14.642857 | 61 | 0.652683 | l3ch4tno1r |
6f2b64a093bb87294dbe20bc0c43d5616379fc1c | 1,810 | cpp | C++ | Lab2/operatorOverloading/arrayAdder.cpp | HanlinHu/CS210_LAB_code | c0f2d89cb6b1d2047bd6fea7e2a041660245dc32 | [
"MIT"
] | null | null | null | Lab2/operatorOverloading/arrayAdder.cpp | HanlinHu/CS210_LAB_code | c0f2d89cb6b1d2047bd6fea7e2a041660245dc32 | [
"MIT"
] | null | null | null | Lab2/operatorOverloading/arrayAdder.cpp | HanlinHu/CS210_LAB_code | c0f2d89cb6b1d2047bd6fea7e2a041660245dc32 | [
"MIT"
] | null | null | null | //filename: arrayaddder.cpp
//Modify this program to overload subtraction operator and insertion operator
#include <iostream>
using namespace std;
#define MAXARRAY 5
class myarray
{
private:
int value[MAXARRAY];
public:
void setvalue(int index, int newvalue){
value[index]=newvalue;}
int getvalue(int index){
... | 18.854167 | 77 | 0.609392 | HanlinHu |
6f30c8b8bf62e23c32fa9469f5640fc8f1683f41 | 13,884 | hpp | C++ | src/lib/xdom/xdom.hpp | joshua655/v8cgi | eafd3bd7a5dd1d60e2f1483701a52e7ac0ae0eba | [
"BSD-3-Clause"
] | 4 | 2016-01-31T08:49:35.000Z | 2021-07-12T17:31:42.000Z | src/lib/xdom/xdom.hpp | joshua655/v8cgi | eafd3bd7a5dd1d60e2f1483701a52e7ac0ae0eba | [
"BSD-3-Clause"
] | null | null | null | src/lib/xdom/xdom.hpp | joshua655/v8cgi | eafd3bd7a5dd1d60e2f1483701a52e7ac0ae0eba | [
"BSD-3-Clause"
] | 1 | 2021-06-03T22:51:17.000Z | 2021-06-03T22:51:17.000Z | #ifndef _JS_DOM_H
#define _JS_DOM_H
#define RECAST(item, type) reinterpret_cast<type>(v8::Handle<v8::External>::Cast(item)->Value());
#define LOAD_DOMEXCEPTION(domerr) DOMException * domerr = LOAD_PTR(0,DOMException *)
#define DOM_EXCEPTION LOAD_DOMEXCEPTION(domerr)
#define DOMEXCPT LOAD_DOMEXCEPTION(domerr)
#def... | 47.385666 | 164 | 0.804667 | joshua655 |
6f3373cc43dfc9a4d462df30090b391d0021006c | 543 | cpp | C++ | recursion/TowerOfHanoi.cpp | heysujal/Problem-Solving-in-cpp | b5e21bc467d57d3c2050776b948e7f59daabe945 | [
"Unlicense"
] | 1 | 2021-10-04T16:24:57.000Z | 2021-10-04T16:24:57.000Z | recursion/TowerOfHanoi.cpp | heysujal/Problem-Solving-in-cpp | b5e21bc467d57d3c2050776b948e7f59daabe945 | [
"Unlicense"
] | null | null | null | recursion/TowerOfHanoi.cpp | heysujal/Problem-Solving-in-cpp | b5e21bc467d57d3c2050776b948e7f59daabe945 | [
"Unlicense"
] | 1 | 2021-10-04T16:25:00.000Z | 2021-10-04T16:25:00.000Z | #include <bits/stdc++.h>
using namespace std;
void tower_of_hanio(int n, char A, char B, char C){
if(n==1){
cout<<"Move from"<< A <<" to "<<C<<endl;
return;
}
// Move n-1 discs from A to B using C as an auxiliary
tower_of_hanio(n-1, A, C, B);
// move nth disc from A to C
cout... | 22.625 | 56 | 0.532228 | heysujal |
6f35097fff260bb14998caab8aed2b96425005e1 | 27,570 | cpp | C++ | Megem/tree.cpp | totenhack/megem | 5ab139bd38c8ddeac09d1b96caa0a05272917dab | [
"Apache-2.0"
] | null | null | null | Megem/tree.cpp | totenhack/megem | 5ab139bd38c8ddeac09d1b96caa0a05272917dab | [
"Apache-2.0"
] | null | null | null | Megem/tree.cpp | totenhack/megem | 5ab139bd38c8ddeac09d1b96caa0a05272917dab | [
"Apache-2.0"
] | 1 | 2021-12-20T20:12:19.000Z | 2021-12-20T20:12:19.000Z | #include "stdafx.h"
TREE *CreateTree(ARRAY *tokens, unsigned int *i) {
ARRAY *expression_stack = Array_New(sizeof(TREE));
ARRAY *operator_stack = Array_New(sizeof(TOKEN *));
TOKEN *token = 0;
TOKEN *token_previous = 0;
for (; *i < tokens->length; ++(*i)) {
token = (TOKEN *)Array_Get(tokens, *i);
switch (t... | 28.452012 | 167 | 0.538665 | totenhack |
6f360b707476aa041728d6f25f77bd8994b21333 | 2,682 | cpp | C++ | regression/esbmc-cpp/cpp/ch18_8/main.cpp | shmarovfedor/esbmc | 3226a3d68b009d44b9535a993ac0f25e1a1fbedd | [
"BSD-3-Clause"
] | 143 | 2015-06-22T12:30:01.000Z | 2022-03-21T08:41:17.000Z | regression/esbmc-cpp/cpp/ch18_8/main.cpp | shmarovfedor/esbmc | 3226a3d68b009d44b9535a993ac0f25e1a1fbedd | [
"BSD-3-Clause"
] | 542 | 2017-06-02T13:46:26.000Z | 2022-03-31T16:35:17.000Z | regression/esbmc-cpp/cpp/ch18_8/main.cpp | shmarovfedor/esbmc | 3226a3d68b009d44b9535a993ac0f25e1a1fbedd | [
"BSD-3-Clause"
] | 81 | 2015-10-21T22:21:59.000Z | 2022-03-24T14:07:55.000Z | // Fig. 18.17: fig18_17.cpp
// Using functions isdigit, isalpha, isalnum and isxdigit.
#include <iostream>
using std::cout;
using std::endl;
#include <cctype> // character-handling function prototypes
int main()
{
cout << "According to isdigit:\n"
<< ( isdigit( '8' ) ? "8 is a" : "8 is not a" )
... | 41.261538 | 75 | 0.464206 | shmarovfedor |
6f376abd51b7f07e440836df4d0c9a535091c090 | 666 | hpp | C++ | Source/Engine/src/include/audio/codec.hpp | DatZach/Swift | b0c6f9c87e8c8dfe8a19dedc4dd57081fa5cdef7 | [
"MIT"
] | null | null | null | Source/Engine/src/include/audio/codec.hpp | DatZach/Swift | b0c6f9c87e8c8dfe8a19dedc4dd57081fa5cdef7 | [
"MIT"
] | null | null | null | Source/Engine/src/include/audio/codec.hpp | DatZach/Swift | b0c6f9c87e8c8dfe8a19dedc4dd57081fa5cdef7 | [
"MIT"
] | 1 | 2021-10-30T20:43:01.000Z | 2021-10-30T20:43:01.000Z | /*
* codec.hpp
* Audio Codec
*/
#ifndef __AUDIO_CODEC_HPP
#define __AUDIO_CODEC_HPP
#include <vector>
#include <string>
namespace Audio
{
class Codec
{
protected:
size_t samples, channelCount, sampleRate;
Codec()
: samples(0),
channelCount(0),
sampleRate(0)
{
}
public:
virtual ~Codec... | 15.136364 | 57 | 0.674174 | DatZach |
6f38e64d98f95902ed7ae63fa5c7c1d4512297c1 | 7,459 | cpp | C++ | Libs/Widgets/ctkWorkflowAbstractPagedWidget.cpp | kraehlit/CTK | 6557c5779d20b78f501f1fd6ce1063d0f219cca6 | [
"Apache-2.0"
] | 515 | 2015-01-13T05:42:10.000Z | 2022-03-29T03:10:01.000Z | Libs/Widgets/ctkWorkflowAbstractPagedWidget.cpp | kraehlit/CTK | 6557c5779d20b78f501f1fd6ce1063d0f219cca6 | [
"Apache-2.0"
] | 425 | 2015-01-06T05:28:38.000Z | 2022-03-08T19:42:18.000Z | Libs/Widgets/ctkWorkflowAbstractPagedWidget.cpp | kraehlit/CTK | 6557c5779d20b78f501f1fd6ce1063d0f219cca6 | [
"Apache-2.0"
] | 341 | 2015-01-08T06:18:17.000Z | 2022-03-29T21:47:49.000Z | /*=========================================================================
Library: CTK
Copyright (c) Kitware Inc.
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.ap... | 30.822314 | 116 | 0.624749 | kraehlit |
6f3f37848cac580d962ada4e76185f88487f5d2c | 688 | hpp | C++ | inc/player.hpp | gabrielziegler3/Maze-Game | 83d4c25919afd578dd5f225d545dc20be8ef99f7 | [
"MIT"
] | null | null | null | inc/player.hpp | gabrielziegler3/Maze-Game | 83d4c25919afd578dd5f225d545dc20be8ef99f7 | [
"MIT"
] | null | null | null | inc/player.hpp | gabrielziegler3/Maze-Game | 83d4c25919afd578dd5f225d545dc20be8ef99f7 | [
"MIT"
] | null | null | null | #ifndef PLAYER_HPP
#define PLAYER_HPP
#include "gameobject.hpp"
#include "map.hpp"
#include <iostream>
#include <string>
class Player : public GameObject{
private:
bool alive;
int life;
int score;
std::string name;
public:
//Exemplo de SOBRECARGA de construtor
Player();
Player(char sprite,... | 21.5 | 105 | 0.659884 | gabrielziegler3 |
6f4457e911a77878b11105969c34a8337b2b02b4 | 14,204 | cpp | C++ | Sender.cpp | bgroff/tcp-light | 7f722c46233d0f7d3f7a16bd04410b98463e553c | [
"MIT"
] | 1 | 2019-04-16T03:38:06.000Z | 2019-04-16T03:38:06.000Z | Sender.cpp | bgroff/tcp-light | 7f722c46233d0f7d3f7a16bd04410b98463e553c | [
"MIT"
] | null | null | null | Sender.cpp | bgroff/tcp-light | 7f722c46233d0f7d3f7a16bd04410b98463e553c | [
"MIT"
] | null | null | null | /*
* Sender.cpp
*
*/
#include "Sender.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <fstream>
using namespace std;
#define error(s) { cerr<<"Error: "<<(s); exit(1); }
#define kSendDefaultTimeOut 200
#define kSendDefaultMss 4800 // 4 packets
#define kSend... | 25.546763 | 163 | 0.640946 | bgroff |
6f4670c4314c01b78d41d7ff878a68d2f1483251 | 69 | hpp | C++ | provides/include/lax_v1/lazify.hpp | per-framework/lax.cpp | 2acdb9adf19441fcd159238c63fba24865234ce1 | [
"MIT"
] | null | null | null | provides/include/lax_v1/lazify.hpp | per-framework/lax.cpp | 2acdb9adf19441fcd159238c63fba24865234ce1 | [
"MIT"
] | null | null | null | provides/include/lax_v1/lazify.hpp | per-framework/lax.cpp | 2acdb9adf19441fcd159238c63fba24865234ce1 | [
"MIT"
] | null | null | null | #pragma once
#include "lax_v1/type.hpp"
#include "lax_v1/value.hpp"
| 13.8 | 27 | 0.73913 | per-framework |
6f4c558c109bc598bcbc72a20bfb4e881ed48b2b | 5,549 | hh | C++ | include/gex/ua/UserActionManager.hh | jsparger/gex | 8ae50c97be4999958f509678343b7c396e55eb48 | [
"BSL-1.0"
] | null | null | null | include/gex/ua/UserActionManager.hh | jsparger/gex | 8ae50c97be4999958f509678343b7c396e55eb48 | [
"BSL-1.0"
] | 3 | 2015-05-22T19:30:00.000Z | 2015-05-26T01:48:54.000Z | include/gex/ua/UserActionManager.hh | jsparger/gex | 8ae50c97be4999958f509678343b7c396e55eb48 | [
"BSL-1.0"
] | null | null | null | //---------------------------------------------------------------------------//
// Copyright (c) 2014 John Sparger <jsparger87@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See https://github.c... | 29.994595 | 179 | 0.763201 | jsparger |
6f4f73fb6a06aa191f854496aeb383d38ef92ddd | 929 | cpp | C++ | projetFinalCPP/clsGuichet.cpp | raoufbaz/ATM-interface | 20a4b1561f556439c8eca34dc05489f40d823699 | [
"MIT"
] | 1 | 2020-01-28T01:26:31.000Z | 2020-01-28T01:26:31.000Z | projetFinalCPP/clsGuichet.cpp | raoufbaz/ATM-interface | 20a4b1561f556439c8eca34dc05489f40d823699 | [
"MIT"
] | null | null | null | projetFinalCPP/clsGuichet.cpp | raoufbaz/ATM-interface | 20a4b1561f556439c8eca34dc05489f40d823699 | [
"MIT"
] | null | null | null | #include "clsGuichet.h"
#include <iostream>
#include <string>
#include "clsListeClient.h"
using namespace std;
void clsGuichet::Ouvrir(string Numero, string Compagnie, string Adresse, clsListeClient Clients, string Status, float Solde) {
this->Numero = Numero; this->Compagnie = Compagnie; this->Adresse = Ad... | 33.178571 | 128 | 0.649085 | raoufbaz |
6f51be3dfaa99f4e5b9b90bca7e8c5ab31fce18c | 6,615 | hpp | C++ | src/node/node_protected.hpp | marcesengel/realm-js | 74b06e0f2aec8526056ccae1da6056e521853a44 | [
"Apache-1.1"
] | null | null | null | src/node/node_protected.hpp | marcesengel/realm-js | 74b06e0f2aec8526056ccae1da6056e521853a44 | [
"Apache-1.1"
] | null | null | null | src/node/node_protected.hpp | marcesengel/realm-js | 74b06e0f2aec8526056ccae1da6056e521853a44 | [
"Apache-1.1"
] | null | null | null | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm Inc.
//
// 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/li... | 26.673387 | 111 | 0.588057 | marcesengel |
6f51c9d87c824218d0f3f3072308786730cff558 | 4,302 | hxx | C++ | include/rtkCudaConjugateGradientImageFilter.hxx | agravgaard/RTK | 419f71cdaf0600fcb54e4faca643121b7832ea96 | [
"Apache-2.0",
"BSD-3-Clause"
] | 167 | 2015-02-26T08:39:33.000Z | 2022-03-31T04:40:35.000Z | include/rtkCudaConjugateGradientImageFilter.hxx | agravgaard/RTK | 419f71cdaf0600fcb54e4faca643121b7832ea96 | [
"Apache-2.0",
"BSD-3-Clause"
] | 270 | 2015-02-26T15:34:32.000Z | 2022-03-22T09:49:24.000Z | include/rtkCudaConjugateGradientImageFilter.hxx | agravgaard/RTK | 419f71cdaf0600fcb54e4faca643121b7832ea96 | [
"Apache-2.0",
"BSD-3-Clause"
] | 117 | 2015-05-01T14:56:49.000Z | 2022-03-11T03:18:26.000Z | /*=========================================================================
*
* Copyright RTK Consortium
*
* 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.apa... | 35.553719 | 97 | 0.682241 | agravgaard |
6f521450999cf02b94eace63c8e3eb93f0bda9ca | 2,018 | cpp | C++ | src/rps-tools/rps-client.cpp | rose-project/rps | cec9647cdebdd506dd342494a48341a806f53a81 | [
"MIT"
] | null | null | null | src/rps-tools/rps-client.cpp | rose-project/rps | cec9647cdebdd506dd342494a48341a806f53a81 | [
"MIT"
] | null | null | null | src/rps-tools/rps-client.cpp | rose-project/rps | cec9647cdebdd506dd342494a48341a806f53a81 | [
"MIT"
] | null | null | null | #include <cstdlib>
#include <vector>
#include <string>
#include <map>
#include <iostream>
#include <algorithm>
#include "command.h"
#include "installcommand.h"
#define RPS_CLIENT_VERSION "0.1.0"
void show_usage()
{
fprintf(stderr, "usage: \n"
" rps-client status\n"
" rps-client install [PACKAGE ... | 24.91358 | 74 | 0.539643 | rose-project |
6f521d3a04a42ee2840f67e2a45880eee62c7c2a | 72 | cpp | C++ | Source/Utility/MythForest/Component/Renderable/RenderableComponentModule.cpp | paintdream/PaintsNow | 52e14de651b56c100caac0ce2b14348441543e1a | [
"MIT"
] | 15 | 2016-09-17T16:29:42.000Z | 2021-11-24T06:21:27.000Z | Source/Utility/MythForest/Component/Renderable/RenderableComponentModule.cpp | paintdream/PaintsNow | 52e14de651b56c100caac0ce2b14348441543e1a | [
"MIT"
] | null | null | null | Source/Utility/MythForest/Component/Renderable/RenderableComponentModule.cpp | paintdream/PaintsNow | 52e14de651b56c100caac0ce2b14348441543e1a | [
"MIT"
] | 3 | 2017-04-07T13:33:57.000Z | 2021-03-31T02:04:48.000Z | #include "RenderableComponentModule.h"
using namespace PaintsNow;
| 14.4 | 39 | 0.777778 | paintdream |
6f53b998dc211b01065ac34d90b18145ce29dd52 | 15,578 | cpp | C++ | cbits/Interface.cpp | ghorn/wtf-viz | 4bc380bc0e1a83a144981d28e07aa3e0f611966d | [
"BSD-3-Clause"
] | null | null | null | cbits/Interface.cpp | ghorn/wtf-viz | 4bc380bc0e1a83a144981d28e07aa3e0f611966d | [
"BSD-3-Clause"
] | 1 | 2020-01-17T10:53:34.000Z | 2020-02-10T21:40:09.000Z | cbits/Interface.cpp | ghorn/wtf-viz | 4bc380bc0e1a83a144981d28e07aa3e0f611966d | [
"BSD-3-Clause"
] | 1 | 2022-01-13T02:36:12.000Z | 2022-01-13T02:36:12.000Z | #include "WtfViz2.hpp"
#include "OgreFramework.hpp"
#ifdef __cplusplus
extern "C" {
#endif
void wv2_run_viz(HsFunPtr haskell_init, HsFunPtr haskell_update,
HsFunPtr haskell_key_pressed, HsFunPtr haskell_key_released,
HsFunPtr haskell_mouse_pressed, HsFunPtr haskell_mouse_releas... | 32.252588 | 112 | 0.736423 | ghorn |
6f5a96e4eed2943d97ea8bc69b183e3cf1514811 | 3,483 | cc | C++ | source/common/tracing/zipkin/span_context.cc | taion809/envoy-build-tests | 2359971f3dc4e782e237f079f67719809008f0be | [
"Apache-2.0"
] | 1 | 2018-02-22T04:25:35.000Z | 2018-02-22T04:25:35.000Z | source/common/tracing/zipkin/span_context.cc | taion809/envoy-build-tests | 2359971f3dc4e782e237f079f67719809008f0be | [
"Apache-2.0"
] | 1 | 2018-06-06T00:20:24.000Z | 2018-06-06T00:20:24.000Z | source/common/tracing/zipkin/span_context.cc | taion809/envoy-build-tests | 2359971f3dc4e782e237f079f67719809008f0be | [
"Apache-2.0"
] | 1 | 2020-12-30T17:12:11.000Z | 2020-12-30T17:12:11.000Z | #include "common/tracing/zipkin/span_context.h"
#include "common/common/macros.h"
#include "common/common/utility.h"
#include "common/tracing/zipkin/zipkin_core_constants.h"
namespace Envoy {
namespace Zipkin {
namespace {
// The functions below are needed due to the "C++ static initialization order fiasco."
/**
*... | 34.83 | 99 | 0.652311 | taion809 |
6f6258257d49a44eeb32e4c3e169ce154f370b1c | 121 | cpp | C++ | compile_error_tests/utils/TestNonInstatiable/TestNonInstatiable01/main.cpp | julienlopez/ETL | 51c6e2c425d1bec29507a4f9a89c6211c9d7488f | [
"MIT"
] | null | null | null | compile_error_tests/utils/TestNonInstatiable/TestNonInstatiable01/main.cpp | julienlopez/ETL | 51c6e2c425d1bec29507a4f9a89c6211c9d7488f | [
"MIT"
] | 1 | 2015-03-25T09:42:10.000Z | 2015-03-25T09:42:10.000Z | compile_error_tests/utils/TestNonInstatiable/TestNonInstatiable01/main.cpp | julienlopez/ETL | 51c6e2c425d1bec29507a4f9a89c6211c9d7488f | [
"MIT"
] | null | null | null | #include <etl/utils/noninstantiable.hpp>
struct Test : private etl::utils::noninstantiable
{};
int main()
{
Test t1;
} | 13.444444 | 49 | 0.710744 | julienlopez |
6f625896e907f9577c21f7b91fa5044c91ea9fba | 106 | cpp | C++ | TemplateMethod/AbstractClass.cpp | zxc6419/design_patterns_exercise | 56239df3057ecb752228598dec6ddc912a2bbdaf | [
"MIT"
] | 1 | 2018-10-12T08:41:06.000Z | 2018-10-12T08:41:06.000Z | TemplateMethod/AbstractClass.cpp | zxc6419/design_patterns_exercise | 56239df3057ecb752228598dec6ddc912a2bbdaf | [
"MIT"
] | 1 | 2018-10-16T01:43:57.000Z | 2018-10-16T01:43:57.000Z | TemplateMethod/AbstractClass.cpp | zxc6419/design_patterns_exercise | 56239df3057ecb752228598dec6ddc912a2bbdaf | [
"MIT"
] | null | null | null | #include "AbstractClass.h"
void AbstractClass::templateMethod()
{
operation1();
operation2();
}
| 13.25 | 36 | 0.679245 | zxc6419 |
6f67e6c7a81ee2df9c6dbe1d4fbbfabdea5d8a65 | 8,458 | cpp | C++ | dependencies/agg/src/agg_sqrt_tables.cpp | bmharper/xo | 575429591c166cc70db60385d2a6563d0f9bc9ed | [
"Unlicense"
] | 7 | 2015-12-18T04:17:29.000Z | 2020-03-13T15:38:54.000Z | dependencies/agg/src/agg_sqrt_tables.cpp | benharper123/xo | 575429591c166cc70db60385d2a6563d0f9bc9ed | [
"Unlicense"
] | null | null | null | dependencies/agg/src/agg_sqrt_tables.cpp | benharper123/xo | 575429591c166cc70db60385d2a6563d0f9bc9ed | [
"Unlicense"
] | 4 | 2016-09-18T13:16:02.000Z | 2022-03-23T11:33:53.000Z | #include "pch.h"
//----------------------------------------------------------------------------
// Anti-Grain Geometry - Version 2.4
// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright noti... | 72.290598 | 93 | 0.690943 | bmharper |
6f6f78d1cbc8046be93e22859d7aee9f43ed3119 | 21,238 | cxx | C++ | src/app/texture_inpaint.cxx | hina-shah/US-famli | f927c89ec9cb51f9e511bbdfa2f59ce15e0e8730 | [
"Apache-2.0"
] | null | null | null | src/app/texture_inpaint.cxx | hina-shah/US-famli | f927c89ec9cb51f9e511bbdfa2f59ce15e0e8730 | [
"Apache-2.0"
] | null | null | null | src/app/texture_inpaint.cxx | hina-shah/US-famli | f927c89ec9cb51f9e511bbdfa2f59ce15e0e8730 | [
"Apache-2.0"
] | null | null | null |
#include "texture_inpaintCLP.h"
#include <itkImage.h>
#include <itkImageFileReader.h>
#include <itkImageFileWriter.h>
#include <itkLabelImageToLabelMapFilter.h>
#include <itkLabelMapMaskImageFilter.h>
#include <itkLabelStatisticsImageFilter.h>
#include <itkMaskImageFilter.h>
#include <itkNeighborhoodIterator.h>
#incl... | 37.790036 | 137 | 0.632593 | hina-shah |
6f7196b89bb4943f47c8e2e2b84b65998c836ecb | 588 | cpp | C++ | source/gloperate/source/rendering/StencilRenderTarget.cpp | lordgeorg/gloperate | 13a6363fdac1f9ff06d91c9bc99649eacd87078e | [
"MIT"
] | 34 | 2015-10-07T12:26:27.000Z | 2021-04-06T06:35:01.000Z | source/gloperate/source/rendering/StencilRenderTarget.cpp | lordgeorg/gloperate | 13a6363fdac1f9ff06d91c9bc99649eacd87078e | [
"MIT"
] | 219 | 2015-07-07T15:55:03.000Z | 2018-09-28T08:54:36.000Z | source/gloperate/source/rendering/StencilRenderTarget.cpp | lordgeorg/gloperate | 13a6363fdac1f9ff06d91c9bc99649eacd87078e | [
"MIT"
] | 21 | 2015-07-07T14:33:08.000Z | 2018-12-23T12:43:56.000Z |
#include <gloperate/rendering/StencilRenderTarget.h>
#include <glbinding/gl/enum.h>
#include <gloperate/rendering/AttachmentType.h>
namespace gloperate
{
AttachmentType StencilRenderTarget::underlyingAttachmentType() const
{
return AttachmentType::Stencil;
}
gl::GLenum StencilRenderTarget::attachmentGLType(... | 16.8 | 76 | 0.760204 | lordgeorg |
4cf74ba199ab0b2e1d006d72077660a3ba06fbfc | 46 | cpp | C++ | src/EvolutionEngine/ServerThread.cpp | trebla64/EvolutionEngine | 05de69735705122b260b1150424976a2f23e4fe3 | [
"CC0-1.0"
] | null | null | null | src/EvolutionEngine/ServerThread.cpp | trebla64/EvolutionEngine | 05de69735705122b260b1150424976a2f23e4fe3 | [
"CC0-1.0"
] | null | null | null | src/EvolutionEngine/ServerThread.cpp | trebla64/EvolutionEngine | 05de69735705122b260b1150424976a2f23e4fe3 | [
"CC0-1.0"
] | null | null | null | #include "ServerThread.h"
// TODO: Implement
| 11.5 | 25 | 0.717391 | trebla64 |
4cfa8ba0632172934446282ebec07df940ba7aa1 | 1,223 | cpp | C++ | march-long-challenge-2021/CollegeLife4-naive.cpp | patwadeepak/codechef | 735c5236cf574968b2396a829717f750d642233f | [
"Apache-2.0"
] | null | null | null | march-long-challenge-2021/CollegeLife4-naive.cpp | patwadeepak/codechef | 735c5236cf574968b2396a829717f750d642233f | [
"Apache-2.0"
] | null | null | null | march-long-challenge-2021/CollegeLife4-naive.cpp | patwadeepak/codechef | 735c5236cf574968b2396a829717f750d642233f | [
"Apache-2.0"
] | null | null | null | #include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <climits>
using namespace std;
#define FastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef long long ll;
... | 23.075472 | 68 | 0.485691 | patwadeepak |
9807e795d63e859b82cf8341c6d4eff35b229ca0 | 3,161 | hpp | C++ | src/programs/swe_sphere_benchmarks/SWESphereBenchmark_three_gaussian_bumps.hpp | valentinaschueller/sweet | 27e99c7a110c99deeadee70688c186d82b39ac90 | [
"MIT"
] | 6 | 2017-11-20T08:12:46.000Z | 2021-03-11T15:32:36.000Z | src/programs/swe_sphere_benchmarks/SWESphereBenchmark_three_gaussian_bumps.hpp | valentinaschueller/sweet | 27e99c7a110c99deeadee70688c186d82b39ac90 | [
"MIT"
] | 4 | 2018-02-02T21:46:33.000Z | 2022-01-11T11:10:27.000Z | src/programs/swe_sphere_benchmarks/SWESphereBenchmark_three_gaussian_bumps.hpp | valentinaschueller/sweet | 27e99c7a110c99deeadee70688c186d82b39ac90 | [
"MIT"
] | 12 | 2016-03-01T18:33:34.000Z | 2022-02-08T22:20:31.000Z | /*
* Author: Martin Schreiber <SchreiberX@Gmail.com>
*/
#ifndef SRC_SWE_SPHERE_BENCHMARKS_THREE_GAUSSIAN_BUMPS_HPP_
#define SRC_SWE_SPHERE_BENCHMARKS_THREE_GAUSSIAN_BUMPS_HPP_
#include "SWESphereBenchmarks_helpers.hpp"
#include "SWESphereBenchmarks_interface.hpp"
#include <sweet/SimulationVariables.hpp>
#include <... | 24.503876 | 101 | 0.700095 | valentinaschueller |
980db14da6afd74cfa062c35ddf7f288883bda76 | 2,041 | cpp | C++ | actuator/src/actuator_sub.cpp | GuttinRibeiro/TCC | fa0fe1f65e651f940ac0b9c2d0cf228c986f32bd | [
"MIT"
] | null | null | null | actuator/src/actuator_sub.cpp | GuttinRibeiro/TCC | fa0fe1f65e651f940ac0b9c2d0cf228c986f32bd | [
"MIT"
] | null | null | null | actuator/src/actuator_sub.cpp | GuttinRibeiro/TCC | fa0fe1f65e651f940ac0b9c2d0cf228c986f32bd | [
"MIT"
] | null | null | null | #include "actuator_sub.hpp"
using std::placeholders::_1;
Actuator_Sub::Actuator_Sub(std::string team, int id, std::string nodeName, int nodeID) : Node(nodeName+std::to_string(nodeID)) {
// Internal variables
_team = team;
_id = id;
std::string robotToken = team+"_"+std::to_string(id);
// Configur... | 60.029412 | 204 | 0.673199 | GuttinRibeiro |
98135ab5a2aeb87c834e67f33dbf2cf337bf3467 | 16,379 | cpp | C++ | lib/VolumeViz/render/2D/PageHandler.cpp | VolkerEnderlein/simvoleon | 6dff1c41bfaeb49ef31c96795c6ded2ea8f4acf7 | [
"BSD-3-Clause"
] | 5 | 2019-12-28T10:36:53.000Z | 2022-01-22T10:56:42.000Z | lib/VolumeViz/render/2D/PageHandler.cpp | VolkerEnderlein/simvoleon | 6dff1c41bfaeb49ef31c96795c6ded2ea8f4acf7 | [
"BSD-3-Clause"
] | 1 | 2021-03-19T22:19:24.000Z | 2021-03-19T22:19:24.000Z | lib/VolumeViz/render/2D/PageHandler.cpp | VolkerEnderlein/simvoleon | 6dff1c41bfaeb49ef31c96795c6ded2ea8f4acf7 | [
"BSD-3-Clause"
] | 5 | 2020-01-01T15:25:28.000Z | 2021-01-27T03:40:08.000Z | /**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Red... | 36.077093 | 107 | 0.664265 | VolkerEnderlein |
981647437bb4d2855da4de40f572ab41af488fca | 274 | cpp | C++ | Training/AIO/AIO13/save.cpp | rmal30/AIO2014 | 71450386e9a3bbfd8ff31b130bb825deec58d945 | [
"MIT"
] | 1 | 2019-08-17T01:39:18.000Z | 2019-08-17T01:39:18.000Z | Training/AIO/AIO13/save.cpp | rmal30/AIO2014 | 71450386e9a3bbfd8ff31b130bb825deec58d945 | [
"MIT"
] | null | null | null | Training/AIO/AIO13/save.cpp | rmal30/AIO2014 | 71450386e9a3bbfd8ff31b130bb825deec58d945 | [
"MIT"
] | null | null | null | #include <cstdio>
int main(){
FILE*in = fopen("savein.txt","r");
FILE*out=fopen("saveout.txt","w");
int n;
int total;
fscanf(in,"%d",&n);
int c[n];
for(int i=0; i<n; i++){
fscanf(in,"%d",&c[i]);
if(c[i]%10>=2){total+=c[i];}
}
fclose(in); fclose(out);
} | 16.117647 | 35 | 0.525547 | rmal30 |
981f94388cab6e166415847baeeec313b26d9175 | 1,224 | cpp | C++ | MTYFRI.cpp | Khush-Ramdev/codechef-solution | ecf57442efde8fbb03b55efdf761d7b1e0d04e80 | [
"MIT"
] | 5 | 2018-10-04T09:49:19.000Z | 2019-06-12T05:32:24.000Z | MTYFRI.cpp | Khush-Ramdev/codechef-solution | ecf57442efde8fbb03b55efdf761d7b1e0d04e80 | [
"MIT"
] | 5 | 2018-10-04T09:54:55.000Z | 2020-10-15T20:31:46.000Z | MTYFRI.cpp | Khush-Ramdev/codechef-solution | ecf57442efde8fbb03b55efdf761d7b1e0d04e80 | [
"MIT"
] | 38 | 2018-10-04T09:48:17.000Z | 2020-12-10T08:52:47.000Z | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
while(t--)
{
int n,k;
cin >> n >> k;
int motuSize = ceil(n/2.0), tomuSize = n/2;
int* motu = new int[motuSize];
int* tomu = n... | 21.857143 | 76 | 0.448529 | Khush-Ramdev |
9825ab6fcacf324f3189242e560c438631aa1545 | 1,021 | hh | C++ | include/LCSUSYPhysics.hh | omar-moreno/simulation-formerly-known-as-slic | 331d0452d05762e2f4554f0ace6fe46922a7333c | [
"BSD-3-Clause-LBNL"
] | null | null | null | include/LCSUSYPhysics.hh | omar-moreno/simulation-formerly-known-as-slic | 331d0452d05762e2f4554f0ace6fe46922a7333c | [
"BSD-3-Clause-LBNL"
] | null | null | null | include/LCSUSYPhysics.hh | omar-moreno/simulation-formerly-known-as-slic | 331d0452d05762e2f4554f0ace6fe46922a7333c | [
"BSD-3-Clause-LBNL"
] | null | null | null | #ifndef SLIC_LCSUSYPHYSICS_HH_
#define SLIC_LCSUSYPHYSICS_HH_ 1
// SLIC
#include "LCSUSYDecay.hh"
#include "Module.hh"
// Geant4
#include "G4ProcessManager.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4hIonisation.hh"
#include "G4hMultipleScattering.hh"
namespace slic {
/**
* @class LCSUSYPhysics
* @brief P... | 19.634615 | 79 | 0.713026 | omar-moreno |
98278cd67c207ceda5c495d69e51861e13b3ca79 | 4,515 | cpp | C++ | tools/stf_merge/stf_merge.cpp | sparcians/stf_tools | a963a34bf9ce39d99b6255a8c0fa75b2c894b8f2 | [
"MIT"
] | 1 | 2022-02-17T00:49:09.000Z | 2022-02-17T00:49:09.000Z | tools/stf_merge/stf_merge.cpp | sparcians/stf_tools | a963a34bf9ce39d99b6255a8c0fa75b2c894b8f2 | [
"MIT"
] | null | null | null | tools/stf_merge/stf_merge.cpp | sparcians/stf_tools | a963a34bf9ce39d99b6255a8c0fa75b2c894b8f2 | [
"MIT"
] | null | null | null |
// <STF_extract> -*- C++ -*-
/**
* \brief This tool extract records/instructions/memory accesses from an existing trace file
*
* Usage:
* -b 1000: head only the first 1000 records.
* -s 1000: skip the first 1000, output the rest.
*
*/
#include <iostream>
#include <limits>
#include <map>
#include <vector>
... | 32.25 | 114 | 0.588261 | sparcians |
9828114edbca43cf50ac23962c14bdb9505538fc | 965 | hpp | C++ | src/action/version.hpp | SameAsMuli/todo | 75b6380b2e8c9a0696f97f43b103de7d12fbd840 | [
"MIT"
] | null | null | null | src/action/version.hpp | SameAsMuli/todo | 75b6380b2e8c9a0696f97f43b103de7d12fbd840 | [
"MIT"
] | null | null | null | src/action/version.hpp | SameAsMuli/todo | 75b6380b2e8c9a0696f97f43b103de7d12fbd840 | [
"MIT"
] | null | null | null | #ifndef ACTION_VERSION_H
#define ACTION_VERSION_H
#include "action/action_abstract.hpp"
#include "input/input.hpp"
namespace todo {
namespace action {
/**
* @brief Action to display version information about the programme.
*/
class Version : public ActionAbstract {
public:
/**
* @brief Initialise the v... | 20.104167 | 68 | 0.643523 | SameAsMuli |
9828b8acc3cd971e76cabc19f70217dcbb5ea274 | 2,748 | hpp | C++ | trunk/src/kernel/srs_kernel_file.hpp | matthew1838/srs | 57f6eb09c168f17a5dcd0411a390ab93e3a051f0 | [
"MIT"
] | 18,396 | 2015-11-11T09:36:37.000Z | 2022-03-31T23:31:51.000Z | trunk/src/kernel/srs_kernel_file.hpp | matthew1838/srs | 57f6eb09c168f17a5dcd0411a390ab93e3a051f0 | [
"MIT"
] | 2,471 | 2015-11-10T04:01:38.000Z | 2022-03-31T21:37:21.000Z | trunk/src/kernel/srs_kernel_file.hpp | matthew1838/srs | 57f6eb09c168f17a5dcd0411a390ab93e3a051f0 | [
"MIT"
] | 4,219 | 2015-11-10T12:17:34.000Z | 2022-03-31T10:41:43.000Z | //
// Copyright (c) 2013-2021 Winlin
//
// SPDX-License-Identifier: MIT
//
#ifndef SRS_KERNEL_FILE_HPP
#define SRS_KERNEL_FILE_HPP
#include <srs_core.hpp>
#include <srs_kernel_io.hpp>
#include <string>
// for srs-librtmp, @see https://github.com/ossrs/srs/issues/213
#ifndef _WIN32
#include <sys/uio.h>
#endif
clas... | 23.895652 | 79 | 0.681951 | matthew1838 |
982cdfb1f57be07c7c9a32dc451097d9b80da4b6 | 233 | cpp | C++ | gui/shared/graphics/RHI/command_list_base.cpp | sadisutikku/engine_libs | b9d8aea6218e043162850c092fd32eb930120e15 | [
"MIT"
] | null | null | null | gui/shared/graphics/RHI/command_list_base.cpp | sadisutikku/engine_libs | b9d8aea6218e043162850c092fd32eb930120e15 | [
"MIT"
] | null | null | null | gui/shared/graphics/RHI/command_list_base.cpp | sadisutikku/engine_libs | b9d8aea6218e043162850c092fd32eb930120e15 | [
"MIT"
] | null | null | null |
//////////////////////////////////////////////////////////////////////
//! Includes
//////////////////////////////////////////////////////////////////////
#include "gui/shared/graphics/RHI/command_list_base.h"
namespace gui
{
}
| 17.923077 | 70 | 0.27897 | sadisutikku |
982fdb1c91e6ed1c74f36213a4d9c90935b97f3c | 250 | cpp | C++ | columns/HyPerColRunDelegate.cpp | PetaVision/ObsoletePV | e99a42bf4292e944b252e144b5e07442b0715697 | [
"MIT"
] | null | null | null | columns/HyPerColRunDelegate.cpp | PetaVision/ObsoletePV | e99a42bf4292e944b252e144b5e07442b0715697 | [
"MIT"
] | null | null | null | columns/HyPerColRunDelegate.cpp | PetaVision/ObsoletePV | e99a42bf4292e944b252e144b5e07442b0715697 | [
"MIT"
] | null | null | null | /*
* HyPerColRunDelegate.cpp
*
* Created on: Jan 10, 2010
* Author: Craig Rasmussen
*/
#include "HyPerColRunDelegate.hpp"
namespace PV {
HyPerColRunDelegate::HyPerColRunDelegate()
{
}
HyPerColRunDelegate::~HyPerColRunDelegate()
{
}
}
| 11.904762 | 43 | 0.704 | PetaVision |
9831b69a67938416b771fe35d160d8c0b1c9c418 | 3,267 | cpp | C++ | lessons/week10/apps/httping.cpp | Wiladams/sr | 4151ddc8303a78e44b0921d9dea0617dd412a7db | [
"MIT"
] | 1 | 2020-03-25T22:02:46.000Z | 2020-03-25T22:02:46.000Z | lessons/week10/apps/httping.cpp | Wiladams/sr | 4151ddc8303a78e44b0921d9dea0617dd412a7db | [
"MIT"
] | null | null | null | lessons/week10/apps/httping.cpp | Wiladams/sr | 4151ddc8303a78e44b0921d9dea0617dd412a7db | [
"MIT"
] | 2 | 2020-02-06T01:59:27.000Z | 2020-02-10T01:22:41.000Z | /*
In this example, we want to connect to various
servers on port 80, and see what kind of response they
return when we ask for the '/' resource.
We connect to all the interfaces reported by the server
and not just the first one on the list.
*/
#include <cstdio>
#include <cstring>
#include "p5.h... | 25.130769 | 65 | 0.533211 | Wiladams |
9837bcb4d9e7167e0f7caeb830fabd09b26b0d0c | 9,293 | cpp | C++ | src/test/storage/chunk_encoder_test.cpp | dey4ss/hyrise | c304b9ced36044e303eb8a4d68a05fc7edc04819 | [
"MIT"
] | null | null | null | src/test/storage/chunk_encoder_test.cpp | dey4ss/hyrise | c304b9ced36044e303eb8a4d68a05fc7edc04819 | [
"MIT"
] | null | null | null | src/test/storage/chunk_encoder_test.cpp | dey4ss/hyrise | c304b9ced36044e303eb8a4d68a05fc7edc04819 | [
"MIT"
] | null | null | null | #include <cstdint>
#include <map>
#include <memory>
#include <vector>
#include "base_test.hpp"
#include "gtest/gtest.h"
#include "all_type_variant.hpp"
#include "operators/table_scan.hpp"
#include "operators/table_wrapper.hpp"
#include "storage/base_encoded_segment.hpp"
#include "storage/base_value_segment.hpp"
#incl... | 40.938326 | 120 | 0.729151 | dey4ss |
983ad14b5ecc361d04ba9380f1db02ee3e6f09ba | 10,609 | cc | C++ | mmap/testing/node_allocator_test.cc | datacratic/DasDB | 5ccc1fc7c6c69c97e3dae0e02bb4009f95908d3b | [
"Apache-2.0"
] | 3 | 2017-12-06T00:25:52.000Z | 2021-08-24T20:46:54.000Z | mmap/testing/node_allocator_test.cc | datacratic/DasDB | 5ccc1fc7c6c69c97e3dae0e02bb4009f95908d3b | [
"Apache-2.0"
] | null | null | null | mmap/testing/node_allocator_test.cc | datacratic/DasDB | 5ccc1fc7c6c69c97e3dae0e02bb4009f95908d3b | [
"Apache-2.0"
] | 1 | 2016-11-24T17:14:16.000Z | 2016-11-24T17:14:16.000Z | /* mmap_trie_test.cc
Jeremy Barnes, 10 August 2011
Copyright (c) 2011 Datacratic. All rights reserved.
Test for the mmap trie class.
*/
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include "mmap/memory_region.h"
#include "mmap/page_table_allocator.h"
#include "mmap/memory_allocator.h"
#include "soa... | 27.992084 | 81 | 0.489019 | datacratic |
983c6c0e911c9b3c844b80ef4e745d04a17f6375 | 58,626 | cpp | C++ | src/seeds.quests.cpp | shakhruz/seeds-smart-contracts | 14423aa5901379f7a273536db4a93bf1da996f21 | [
"MIT"
] | 13 | 2020-04-05T15:26:58.000Z | 2022-03-24T07:29:45.000Z | src/seeds.quests.cpp | shakhruz/seeds-smart-contracts | 14423aa5901379f7a273536db4a93bf1da996f21 | [
"MIT"
] | 318 | 2020-03-09T14:56:45.000Z | 2022-03-29T18:26:24.000Z | src/seeds.quests.cpp | chuck-h/seeds-smart-contracts | 98f8279c52c607e0e3f697f125fcf43980402f27 | [
"MIT"
] | 3 | 2021-04-03T04:44:55.000Z | 2021-12-15T16:22:03.000Z | #include <seeds.quests.hpp>
#include "document_graph/content.cpp"
#include "document_graph/document.cpp"
#include "document_graph/edge.cpp"
#include "document_graph/util.cpp"
#include "document_graph/content_wrapper.cpp"
#include "document_graph/document_graph.cpp"
ACTION quests::reset () {
require_auth(get_self(... | 37.53265 | 145 | 0.734879 | shakhruz |
98452fad384baf2e781b81688ed78a80777017bd | 688 | cpp | C++ | 3rdparty/libcxx/libcxx/test/libcxx/type_traits/is_floating_point.pass.cpp | vlaza/openenclave | 02ae4e48c9d3b9678cb860e2af7c2319bb043679 | [
"MIT"
] | 1 | 2019-01-31T08:53:31.000Z | 2019-01-31T08:53:31.000Z | 3rdparty/libcxx/libcxx/test/libcxx/type_traits/is_floating_point.pass.cpp | vlaza/openenclave | 02ae4e48c9d3b9678cb860e2af7c2319bb043679 | [
"MIT"
] | null | null | null | 3rdparty/libcxx/libcxx/test/libcxx/type_traits/is_floating_point.pass.cpp | vlaza/openenclave | 02ae4e48c9d3b9678cb860e2af7c2319bb043679 | [
"MIT"
] | 1 | 2020-06-11T08:11:30.000Z | 2020-06-11T08:11:30.000Z | //===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------... | 27.52 | 80 | 0.534884 | vlaza |
9847ac11e571959178a9462b8e42598fee5e919c | 1,669 | hpp | C++ | include/gui/opening_balance_ctrl.hpp | skybaboon/dailycashmanager | 0b022cc230a8738d5d27a799728da187e22f17f8 | [
"Apache-2.0"
] | 4 | 2016-07-05T07:42:07.000Z | 2020-07-15T15:27:22.000Z | include/gui/opening_balance_ctrl.hpp | skybaboon/dailycashmanager | 0b022cc230a8738d5d27a799728da187e22f17f8 | [
"Apache-2.0"
] | 1 | 2020-05-07T20:58:21.000Z | 2020-05-07T20:58:21.000Z | include/gui/opening_balance_ctrl.hpp | skybaboon/dailycashmanager | 0b022cc230a8738d5d27a799728da187e22f17f8 | [
"Apache-2.0"
] | null | null | null | /*
* Copyright 2015 Matthew Harvey
*
* 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 agre... | 28.775862 | 75 | 0.751947 | skybaboon |
98488b2dd55535c7c1bf9b08d333511d1b44ad17 | 5,130 | cpp | C++ | beergame/individual.cpp | Bender250/ntnu-ai | 11c06f6cd575e076290370e6034bed51ac93a0a7 | [
"MIT"
] | null | null | null | beergame/individual.cpp | Bender250/ntnu-ai | 11c06f6cd575e076290370e6034bed51ac93a0a7 | [
"MIT"
] | null | null | null | beergame/individual.cpp | Bender250/ntnu-ai | 11c06f6cd575e076290370e6034bed51ac93a0a7 | [
"MIT"
] | null | null | null | #include "individual.h"
Individual::Individual() : _fitness(0)
{
Layer hidden;
for (uint64_t i = 0; i < 2; ++i) {
hidden._v.push_back(Neuron(5));
}
_ann.push_back(hidden);
Layer last;
for (uint64_t i = 0; i < 2; ++i) {
last._v.push_back(Neuron(2));
}
_ann.push_back(last... | 32.675159 | 96 | 0.547758 | Bender250 |
9848db6416bd053f4c5eabf873dab7151bdd558c | 5,562 | cpp | C++ | src/mazelib/grid.cpp | harrywhite4/maze | c297e770722474b68393b3b153d7b605803576d5 | [
"MIT"
] | null | null | null | src/mazelib/grid.cpp | harrywhite4/maze | c297e770722474b68393b3b153d7b605803576d5 | [
"MIT"
] | null | null | null | src/mazelib/grid.cpp | harrywhite4/maze | c297e770722474b68393b3b153d7b605803576d5 | [
"MIT"
] | null | null | null | #include <vector>
#include <optional>
#include <random>
#include <iostream>
#include <stdexcept>
#include "mazelib/error.hpp"
#include "mazelib/grid.hpp"
namespace mazelib {
GridGraph::GridGraph(int numRows, int numColumns) :
numRows(numRows),
numColumns(numColumns),
horEdges((numColumns - 1) * numRows, ... | 26.112676 | 87 | 0.57749 | harrywhite4 |
98490623d8cae68d9176a73e1817a768d9a54c2d | 1,308 | cpp | C++ | 31-40/034 Find First And Last Position Of Element In Sorted Array/FindFisrtAndLastPosition.cpp | tiandaochouqin1/leetcode | 9dcfc1aafd4dcf2e2a7cb0fa84677b59d7d34430 | [
"Apache-2.0"
] | 1 | 2021-04-17T17:32:56.000Z | 2021-04-17T17:32:56.000Z | 31-40/034 Find First And Last Position Of Element In Sorted Array/FindFisrtAndLastPosition.cpp | tiandaochouqin1/leetcode | 9dcfc1aafd4dcf2e2a7cb0fa84677b59d7d34430 | [
"Apache-2.0"
] | null | null | null | 31-40/034 Find First And Last Position Of Element In Sorted Array/FindFisrtAndLastPosition.cpp | tiandaochouqin1/leetcode | 9dcfc1aafd4dcf2e2a7cb0fa84677b59d7d34430 | [
"Apache-2.0"
] | null | null | null | #include <iostream>
#include <vector>
using namespace std;
//第一步将问题分解成简单的两个问题
class Solution34{
public:
vector<int> FindRange(vector<int>& nums,int target)
{
int len=nums.size();
cout<<len<<endl;
vector<int> v{-1,-1};
int mid=len/2;
//找出target,并作为分割点,找不到则结束
for(a... | 24.679245 | 65 | 0.457187 | tiandaochouqin1 |
984a716dfec0a5441bd1a01d76cf369dc43ceaeb | 31,454 | cc | C++ | tensorflow/core/profiler/protobuf/op_stats.pb.cc | 1250281649/tensorflow | fc6f4ec813c3514fc4a4c6a078f3f492b3ff325c | [
"Apache-2.0"
] | null | null | null | tensorflow/core/profiler/protobuf/op_stats.pb.cc | 1250281649/tensorflow | fc6f4ec813c3514fc4a4c6a078f3f492b3ff325c | [
"Apache-2.0"
] | 2 | 2021-08-25T15:57:35.000Z | 2022-02-10T01:09:32.000Z | tensorflow/core/profiler/protobuf/op_stats.pb.cc | 1250281649/tensorflow | fc6f4ec813c3514fc4a4c6a078f3f492b3ff325c | [
"Apache-2.0"
] | null | null | null | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/profiler/protobuf/op_stats.proto
#include "tensorflow/core/profiler/protobuf/op_stats.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wir... | 42.794558 | 269 | 0.760603 | 1250281649 |
984ae82f0870a196601b0f144d346d8d93871bb3 | 803 | hpp | C++ | saga/impl/packages/job/job_runtime.hpp | saga-project/saga-cpp | 7376c0de0529e7d7b80cf08b94ec484c2e56d38e | [
"BSL-1.0"
] | 5 | 2015-09-15T16:24:14.000Z | 2021-08-12T11:05:55.000Z | saga/impl/packages/job/job_runtime.hpp | saga-project/saga-cpp | 7376c0de0529e7d7b80cf08b94ec484c2e56d38e | [
"BSL-1.0"
] | null | null | null | saga/impl/packages/job/job_runtime.hpp | saga-project/saga-cpp | 7376c0de0529e7d7b80cf08b94ec484c2e56d38e | [
"BSL-1.0"
] | 3 | 2016-11-17T04:38:38.000Z | 2021-04-10T17:23:52.000Z | // Copyright (c) 2005-2009 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#if !defined(SAGA_JOB_IMPL_RUNTIME_APR_01_2008_0735PM)
#define SAGA_JOB_IMPL_RUNTIME_APR_01_2008_0735PM
#include <s... | 25.09375 | 81 | 0.731009 | saga-project |
984af1d5f07d81d84f24faeb098a078a26e6d795 | 5,206 | cc | C++ | testing/csv_test.cc | shgalus/shg | 0318d0126cf12c3236183447d130969c468a02fa | [
"MIT"
] | 9 | 2015-05-21T04:14:50.000Z | 2021-05-31T17:15:15.000Z | testing/csv_test.cc | shgalus/shg | 0318d0126cf12c3236183447d130969c468a02fa | [
"MIT"
] | 1 | 2015-05-21T05:31:04.000Z | 2015-05-21T05:31:04.000Z | testing/csv_test.cc | shgalus/shg | 0318d0126cf12c3236183447d130969c468a02fa | [
"MIT"
] | 2 | 2015-05-21T04:14:44.000Z | 2020-08-18T12:35:22.000Z | #include <shg/csv.h>
#include <algorithm>
#include <ios>
#include <sstream>
#include "testing.h"
namespace SHG::Testing {
using std::equal;
using std::ios_base;
using std::istringstream;
using std::ostringstream;
using std::string;
using std::vector;
BOOST_AUTO_TEST_SUITE(csv_test)
struct Case {
const vector<v... | 29.579545 | 70 | 0.431041 | shgalus |
984b9e1166402caaadfd1f60b3dfee2a86f67362 | 2,652 | cc | C++ | engines/ep/src/vbucket_bgfetch_item.cc | rualso/kv_engine | 17680c38a77d3a67fda55f763cc2631f924ed42d | [
"BSD-3-Clause"
] | null | null | null | engines/ep/src/vbucket_bgfetch_item.cc | rualso/kv_engine | 17680c38a77d3a67fda55f763cc2631f924ed42d | [
"BSD-3-Clause"
] | null | null | null | engines/ep/src/vbucket_bgfetch_item.cc | rualso/kv_engine | 17680c38a77d3a67fda55f763cc2631f924ed42d | [
"BSD-3-Clause"
] | 2 | 2019-10-11T14:00:49.000Z | 2020-04-06T09:20:15.000Z | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2020 Couchbase, Inc.
*
* 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
*
* ... | 35.36 | 80 | 0.691176 | rualso |
984d4ee0bae857c363dec3f0bce1b950f7d2ddde | 552 | hpp | C++ | include/header.hpp | jcoder39/Task-manager | da112260fba568ea2b0cb32f6f94d03e4c2a82c8 | [
"MIT"
] | null | null | null | include/header.hpp | jcoder39/Task-manager | da112260fba568ea2b0cb32f6f94d03e4c2a82c8 | [
"MIT"
] | null | null | null | include/header.hpp | jcoder39/Task-manager | da112260fba568ea2b0cb32f6f94d03e4c2a82c8 | [
"MIT"
] | null | null | null | //
// Created by User on 15.10.2016.
//
#ifndef TASK_MANAGER_HEADER_HPP
#define TASK_MANAGER_HEADER_HPP
#include <iostream>
#include <thread>
#include <vector>
#include <memory>
#include <condition_variable>
#include <atomic>
#include <queue>
#include <future>
#include <chrono>
#include <functional>
#define NAMESPAC... | 20.444444 | 80 | 0.748188 | jcoder39 |
98507afede722d7577f70c6c6e18d14f98c96f04 | 764 | cpp | C++ | src/lightcouch/cfghelper.cpp | ondra-novak/lightcouch | c11ff4fcb25159f2a5a4809b57cf5c2094a6aa2e | [
"MIT"
] | null | null | null | src/lightcouch/cfghelper.cpp | ondra-novak/lightcouch | c11ff4fcb25159f2a5a4809b57cf5c2094a6aa2e | [
"MIT"
] | null | null | null | src/lightcouch/cfghelper.cpp | ondra-novak/lightcouch | c11ff4fcb25159f2a5a4809b57cf5c2094a6aa2e | [
"MIT"
] | null | null | null | /*
* cfgparser.cpp
*
* Created on: Sep 24, 2012
* Author: ondra
*/
#include "cfghelper.h"
#include <lightspeed/utils/configParser.tcc>
void LightCouch::readConfig(LightCouch::CouchDBPool::Config& cfg,
const LightSpeed::IniConfig::Section& parser) {
LightCouch::Config &bcfg = cfg;
readConfig(bcfg,par... | 22.470588 | 99 | 0.731675 | ondra-novak |
9850d6bbc762235c71ba034d7423babc12f6ec87 | 8,289 | cpp | C++ | Utils/Settings.cpp | zmeyc/mapmaker | 65f079f50aa9808469dfad04140b4f2f3c1ea4d0 | [
"MIT"
] | 1 | 2017-02-13T15:25:32.000Z | 2017-02-13T15:25:32.000Z | Utils/Settings.cpp | zmeyc/mapmaker | 65f079f50aa9808469dfad04140b4f2f3c1ea4d0 | [
"MIT"
] | 25 | 2016-02-25T21:29:22.000Z | 2016-04-10T23:24:47.000Z | Utils/Settings.cpp | zmeyc/mapmaker | 65f079f50aa9808469dfad04140b4f2f3c1ea4d0 | [
"MIT"
] | 1 | 2016-02-27T12:26:05.000Z | 2016-02-27T12:26:05.000Z | // MapMaker (c) 2016 Andrey Fidrya. MIT license. See LICENSE for more information.
#include <QCommandLineParser>
#include "Settings.h"
#include "Utils/Utils.h"
const char *mapFilenameKey = "mapFilename";
const char *geometryKey = "window/geometry";
const char *imagesDirectoryKey = "imagesDirectory";
const char *show... | 24.966867 | 87 | 0.692001 | zmeyc |
9863fbd8ced6c30b179e91834d0ec45dabaec4dd | 5,263 | cpp | C++ | fluid/FluidSimulation.cpp | hjcapple/FluidSimulation | dd3599eebbce8204af9e679dda8534769ece863f | [
"MIT"
] | 2 | 2019-09-19T07:20:37.000Z | 2019-11-26T15:33:34.000Z | fluid/FluidSimulation.cpp | hjcapple/FluidSimulation | dd3599eebbce8204af9e679dda8534769ece863f | [
"MIT"
] | null | null | null | fluid/FluidSimulation.cpp | hjcapple/FluidSimulation | dd3599eebbce8204af9e679dda8534769ece863f | [
"MIT"
] | null | null | null | #include "./FluidSimulation.h"
#include "./shaders/shaders.h"
namespace glutils {
FluidSimulation::FluidSimulation() {
}
FluidSimulation::~FluidSimulation() {
safeDelete(tmpTexture);
safeDelete(color);
safeDelete(divergence);
safeDelete(velocity);
safeDelete(pressu... | 32.288344 | 85 | 0.533536 | hjcapple |
986646f11353275e43405c94afbaa96e15893de7 | 501 | cpp | C++ | lectures/14-Pointers/code/CopyConstructor/src/copy_constructor.cpp | tofergregg/cs106X-website-spring-2017 | 1c1f4bab672248a77bdb881e818dee49b48c0070 | [
"MIT"
] | null | null | null | lectures/14-Pointers/code/CopyConstructor/src/copy_constructor.cpp | tofergregg/cs106X-website-spring-2017 | 1c1f4bab672248a77bdb881e818dee49b48c0070 | [
"MIT"
] | null | null | null | lectures/14-Pointers/code/CopyConstructor/src/copy_constructor.cpp | tofergregg/cs106X-website-spring-2017 | 1c1f4bab672248a77bdb881e818dee49b48c0070 | [
"MIT"
] | null | null | null | #include <iostream>
#include "console.h"
#include "simpio.h" // for getLine
#include "rectangle.h"
using namespace std;
// Rectangle example
#include <iostream>
#include "console.h"
using namespace std;
int main() {
Rectangle r(3,4);
cout << "Width: " << r.getWidth() << ", ";
cout << "Height: " << r.g... | 17.892857 | 51 | 0.57485 | tofergregg |
986863a55e645aa46f7c46b889c2e9c83d6c05ea | 1,942 | cpp | C++ | test/unit/math/prim/meta/contains_vector_test.cpp | martinmodrak/math | 89e8ed81eb9fb7362a10648d1dece263def2ea64 | [
"BSD-3-Clause"
] | null | null | null | test/unit/math/prim/meta/contains_vector_test.cpp | martinmodrak/math | 89e8ed81eb9fb7362a10648d1dece263def2ea64 | [
"BSD-3-Clause"
] | null | null | null | test/unit/math/prim/meta/contains_vector_test.cpp | martinmodrak/math | 89e8ed81eb9fb7362a10648d1dece263def2ea64 | [
"BSD-3-Clause"
] | null | null | null | #include <stan/math/prim/meta.hpp>
#include <gtest/gtest.h>
#include <vector>
TEST(MetaTraitsPrimArr, contains_vector) {
using stan::contains_vector;
using std::vector;
EXPECT_TRUE(contains_vector<std::vector<double> >::value);
EXPECT_TRUE(contains_vector<std::vector<int> >::value);
EXPECT_TRUE(contains_vec... | 33.482759 | 78 | 0.750257 | martinmodrak |
986b33f9f527bbef8fd93eb541d4d73e4c654dd6 | 4,169 | cpp | C++ | raytracer/material.cpp | bdolinar/ray_tracer_challenge_cpp | 96e746b58ca4a173583ecbccfcde714a22b12935 | [
"BSD-2-Clause"
] | null | null | null | raytracer/material.cpp | bdolinar/ray_tracer_challenge_cpp | 96e746b58ca4a173583ecbccfcde714a22b12935 | [
"BSD-2-Clause"
] | null | null | null | raytracer/material.cpp | bdolinar/ray_tracer_challenge_cpp | 96e746b58ca4a173583ecbccfcde714a22b12935 | [
"BSD-2-Clause"
] | null | null | null | #include <raytracer/material.h>
#include <cmath>
#include <raytracer/light.h>
//------------------------------------------------------------------------------
Material::Material()
: color_{1, 1, 1}
, ambient_(0.1)
, diffuse_(0.9)
, specular_(0.9)
, shininess_(200.0)
{
}
//--------------... | 27.609272 | 80 | 0.513073 | bdolinar |
986c86670943b3113ea1d05d0057ee58d1fc36a5 | 184 | cc | C++ | project1/kernels/kernel_case7.cc | JisenRen/CompilerProject-2020Spring | 62d6d1cbf849805ba0df736ce6b22e9138ae2ae6 | [
"MIT"
] | null | null | null | project1/kernels/kernel_case7.cc | JisenRen/CompilerProject-2020Spring | 62d6d1cbf849805ba0df736ce6b22e9138ae2ae6 | [
"MIT"
] | null | null | null | project1/kernels/kernel_case7.cc | JisenRen/CompilerProject-2020Spring | 62d6d1cbf849805ba0df736ce6b22e9138ae2ae6 | [
"MIT"
] | 2 | 2021-07-07T05:12:48.000Z | 2021-07-07T05:12:54.000Z | #include "../run.h"
void kernel_case7(float (&A)[32][16], float (&B)[16][32]){
for(int i=0;i<16;i++){
for(int j=0;j<32;j++){
B[i][j]=A[j][i];
}
}
}
| 20.444444 | 58 | 0.418478 | JisenRen |
986d5936719ba9ceb9e9e8128a82a5002cfbf359 | 4,594 | cpp | C++ | src/Equations/elastic/Physics/InitialField.cpp | ivotron/SeisSol | 51c2935566998480f948caf2b66b27b80df4b2c4 | [
"BSD-3-Clause"
] | null | null | null | src/Equations/elastic/Physics/InitialField.cpp | ivotron/SeisSol | 51c2935566998480f948caf2b66b27b80df4b2c4 | [
"BSD-3-Clause"
] | null | null | null | src/Equations/elastic/Physics/InitialField.cpp | ivotron/SeisSol | 51c2935566998480f948caf2b66b27b80df4b2c4 | [
"BSD-3-Clause"
] | null | null | null | #include <cmath>
#include <array>
#include <Kernels/precision.hpp>
#include <Physics/InitialField.h>
#include <yateto/TensorView.h>
seissol::physics::Planarwave::Planarwave(real phase)
: m_setVar(2),
m_varField{1,8},
m_ampField{1.0, 1.0},
m_kVec{6.283185307179587E-002, 6.283185307179587E-002, 6.28318530... | 30.832215 | 155 | 0.494558 | ivotron |
986db8bae98a578d85b8b699b88055c5f2780f21 | 898 | hpp | C++ | SDK/ARKSurvivalEvolved_Buff_FlameThrower_OnFire_Short_classes.hpp | 2bite/ARK-SDK | c38ca9925309516b2093ad8c3a70ed9489e1d573 | [
"MIT"
] | 10 | 2020-02-17T19:08:46.000Z | 2021-07-31T11:07:19.000Z | SDK/ARKSurvivalEvolved_Buff_FlameThrower_OnFire_Short_classes.hpp | 2bite/ARK-SDK | c38ca9925309516b2093ad8c3a70ed9489e1d573 | [
"MIT"
] | 9 | 2020-02-17T18:15:41.000Z | 2021-06-06T19:17:34.000Z | SDK/ARKSurvivalEvolved_Buff_FlameThrower_OnFire_Short_classes.hpp | 2bite/ARK-SDK | c38ca9925309516b2093ad8c3a70ed9489e1d573 | [
"MIT"
] | 3 | 2020-07-22T17:42:07.000Z | 2021-06-19T17:16:13.000Z | #pragma once
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_Buff_FlameThrower_OnFire_Short_structs.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Classes
//------------------------------------------... | 22.45 | 130 | 0.671492 | 2bite |
986f3cc9d64bf7a873a8cc7988f1a9d9eea8d9c9 | 11,631 | cc | C++ | tests/materials/material_utility_test.cc | jgiven100/mpm | adfe6f126b1166a711271da0dfcc32e3d973ea0b | [
"MIT"
] | 154 | 2017-11-29T06:41:18.000Z | 2022-03-09T23:19:05.000Z | tests/materials/material_utility_test.cc | yujidu/mpm | e53ba04ac2737adac0d30d30287371d603adc877 | [
"MIT"
] | 707 | 2017-08-30T16:12:59.000Z | 2022-02-25T20:33:02.000Z | tests/materials/material_utility_test.cc | yujidu/mpm | e53ba04ac2737adac0d30d30287371d603adc877 | [
"MIT"
] | 83 | 2017-11-22T15:22:07.000Z | 2022-03-19T17:02:51.000Z | #include <limits>
#include <memory>
#include "Eigen/Dense"
#include "catch.hpp"
#include "material_utility.h"
//! \brief Check materials namespace functions
TEST_CASE("materials utility is checked", "[materials]") {
// Tolerance
const double Tolerance = 1.E-6;
SECTION("Check for zero stresses") {
// Ini... | 43.399254 | 80 | 0.673631 | jgiven100 |
98712005e7d0ba7c7a727a5d8c778a814f1f36d4 | 3,111 | cpp | C++ | Core/ShadowCamera.cpp | newpolaris/Deferred | 8db64c64599345032001786fb2c8d3727a1e4194 | [
"MIT"
] | null | null | null | Core/ShadowCamera.cpp | newpolaris/Deferred | 8db64c64599345032001786fb2c8d3727a1e4194 | [
"MIT"
] | null | null | null | Core/ShadowCamera.cpp | newpolaris/Deferred | 8db64c64599345032001786fb2c8d3727a1e4194 | [
"MIT"
] | null | null | null | //
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
// D... | 37.939024 | 137 | 0.720026 | newpolaris |
987e51ded801152cd98c7d9fd4cb264356db54df | 464 | hpp | C++ | src/Util.hpp | spacechase0/StardewEditor2 | 9f6ca0d445476ab0d37962bd3c3c602e23167006 | [
"MIT"
] | null | null | null | src/Util.hpp | spacechase0/StardewEditor2 | 9f6ca0d445476ab0d37962bd3c3c602e23167006 | [
"MIT"
] | null | null | null | src/Util.hpp | spacechase0/StardewEditor2 | 9f6ca0d445476ab0d37962bd3c3c602e23167006 | [
"MIT"
] | null | null | null | #ifndef UTIL_HPP
#define UTIL_HPP
#include <boost/filesystem.hpp>
std::string getStardewContentsDirectory();
void doStringImguiTextField(std::string& str, const std::string& displayName);
void showImguiHelp( const std::string& str );
boost::filesystem::path make_relative( boost::filesystem::path a_From, fs::path a... | 24.421053 | 87 | 0.767241 | spacechase0 |
9884c3f8e351ca904c4a0796496fe2426af7ce50 | 5,816 | cpp | C++ | windows-client/src/InputEvent/InputManager.cpp | Drew-j-Smith/switch-controller | ad4baec93fa99553a82c0f2aa3716b9a0caea45f | [
"MIT"
] | 1 | 2022-02-20T21:20:09.000Z | 2022-02-20T21:20:09.000Z | windows-client/src/InputEvent/InputManager.cpp | Drew-j-Smith/switch-controller | ad4baec93fa99553a82c0f2aa3716b9a0caea45f | [
"MIT"
] | null | null | null | windows-client/src/InputEvent/InputManager.cpp | Drew-j-Smith/switch-controller | ad4baec93fa99553a82c0f2aa3716b9a0caea45f | [
"MIT"
] | null | null | null | #include "InputManager.h"
#include "DefaultInputEvent.h"
#include "InputEventCollection.h"
#include "SfJoystickAnalogInputEvent.h"
#include "InputEventSwitch.h"
#include "InputEventTurbo.h"
InputManager::InputManager(const boost::property_tree::ptree & tree, const int turboButtonLoopTime) {
// set all inputs to b... | 31.956044 | 171 | 0.597146 | Drew-j-Smith |
988518c0ca4ba4591e9e31d1d525487c57e8ac07 | 6,146 | cpp | C++ | topovis/topologytoolkit/src/processors/contourtreetodataframe.cpp | JochenJankowai/modules | 20c5c2df6af4fe5faaa87a9a61432406a6d750e0 | [
"BSD-2-Clause"
] | null | null | null | topovis/topologytoolkit/src/processors/contourtreetodataframe.cpp | JochenJankowai/modules | 20c5c2df6af4fe5faaa87a9a61432406a6d750e0 | [
"BSD-2-Clause"
] | null | null | null | topovis/topologytoolkit/src/processors/contourtreetodataframe.cpp | JochenJankowai/modules | 20c5c2df6af4fe5faaa87a9a61432406a6d750e0 | [
"BSD-2-Clause"
] | null | null | null | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2019-2020 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... | 42.680556 | 99 | 0.616987 | JochenJankowai |
9886893cb741cbc6ec62187a5539f064a47d23fd | 646 | cc | C++ | aos/common/network/send_socket.cc | comran/cs31 | 646ee361056c3dbccdd0fc29fb207ec150cdd9df | [
"BSD-2-Clause"
] | 1 | 2019-10-30T23:43:12.000Z | 2019-10-30T23:43:12.000Z | aos/common/network/send_socket.cc | comran/miranda-dashboard | 54079cb276ef4ee149e931d618b445a618c7c1c0 | [
"BSD-2-Clause"
] | null | null | null | aos/common/network/send_socket.cc | comran/miranda-dashboard | 54079cb276ef4ee149e931d618b445a618c7c1c0 | [
"BSD-2-Clause"
] | null | null | null | #include "aos/common/network/send_socket.h"
#include <string.h>
#include <errno.h>
#include <stdint.h>
#include <stddef.h>
#include <math.h>
#include <sys/socket.h>
#include "aos/common/logging/logging.h"
namespace aos {
namespace network {
int SendSocket::Connect(NetworkPort port, const char *robot_ip, int type) {... | 20.1875 | 75 | 0.665635 | comran |
988889c5594e9793ca7f086da51eb21c8445f772 | 990 | cpp | C++ | tests/algorithm.test.cpp | bmathieugit/sitl | 4317d847dd2d9c713cb94c4375c8382fef216642 | [
"MIT"
] | null | null | null | tests/algorithm.test.cpp | bmathieugit/sitl | 4317d847dd2d9c713cb94c4375c8382fef216642 | [
"MIT"
] | null | null | null | tests/algorithm.test.cpp | bmathieugit/sitl | 4317d847dd2d9c713cb94c4375c8382fef216642 | [
"MIT"
] | null | null | null | #include <lib/range.hpp>
#include "tests.cpp"
int main()
{
TestResult result;
int tmp[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
auto i = lib::rangeof(tmp);
int tmp2[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
auto i2 = lib::rangeof(tmp2);
int tmp3[] = {0, 1, 2, 3, 4, 5, 5, 7, 8, 9};
auto i3 = lib::r... | 26.756757 | 53 | 0.536364 | bmathieugit |
9888f36f3f17337acebd419b77a81f96fe64f859 | 9,236 | cpp | C++ | interviews.cpp | Whatchado/storyrecorder | a442ebf2f5f5920f965ec5c07fddeec38a2a7aab | [
"Zlib"
] | null | null | null | interviews.cpp | Whatchado/storyrecorder | a442ebf2f5f5920f965ec5c07fddeec38a2a7aab | [
"Zlib"
] | null | null | null | interviews.cpp | Whatchado/storyrecorder | a442ebf2f5f5920f965ec5c07fddeec38a2a7aab | [
"Zlib"
] | null | null | null | #include "interviews.h"
#include <QSettings>
#include <QIODevice>
#include <QObject>
Interviews interviews;
QString postotime(double p)
{
qint64 s=p;
QString min(QString::number(s/60));
QString sec(QString::number(s%60));
if(sec.length()<2) sec="0"+sec;
//if(sec.size()<1) sec="0"+sec;
return mi... | 25.727019 | 154 | 0.632417 | Whatchado |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.