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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2bbcc05745f05f7d2dcfe4fff3d973cbf8002ae5 | 12,193 | hpp | C++ | Day01/src/input.hpp | tshortli/aoc2021 | 9d5ee93cbf9604a004c268866115d305a46b96df | [
"MIT"
] | null | null | null | Day01/src/input.hpp | tshortli/aoc2021 | 9d5ee93cbf9604a004c268866115d305a46b96df | [
"MIT"
] | null | null | null | Day01/src/input.hpp | tshortli/aoc2021 | 9d5ee93cbf9604a004c268866115d305a46b96df | [
"MIT"
] | null | null | null | #ifndef inputs_h
#define inputs_h
const int ExampleDepths[] = {
199, 200, 208, 210, 200, 207, 240, 269, 260, 263
};
const int PuzzleDepths[] = {
134, 138, 142, 143, 141, 142, 145, 140, 144, 156, 158, 163, 164, 170, 192, 193, 194, 218, 216, 229, 210, 212, 217, 219, 252, 254, 253, 256, 257, 258, 259, 270, 271, ... | 937.923077 | 12,015 | 0.666366 | tshortli |
2bc05a961830135eed952c7839ebadb85af21e99 | 1,627 | hpp | C++ | include/barry/cell-meat.hpp | USCbiostats/barry | 79c363b9f31d9ee03b3ae199e98c688ffc2abdd0 | [
"MIT"
] | 8 | 2020-07-21T01:30:35.000Z | 2022-03-09T15:51:14.000Z | include/barry/cell-meat.hpp | USCbiostats/barry | 79c363b9f31d9ee03b3ae199e98c688ffc2abdd0 | [
"MIT"
] | 2 | 2022-01-24T20:51:46.000Z | 2022-03-16T23:08:40.000Z | include/barry/cell-meat.hpp | USCbiostats/barry | 79c363b9f31d9ee03b3ae199e98c688ffc2abdd0 | [
"MIT"
] | null | null | null | #include "cell-bones.hpp"
#ifndef BARRY_CELL_MEAT_HPP
#define BARRY_CELL_MEAT_HPP 1
template <typename Cell_Type>
Cell<Cell_Type>& Cell<Cell_Type>::operator=(Cell<Cell_Type>& other) {
this->value = other.value;
this->visited = other.visited;
this->active = other.active;
return *this;
}
template <t... | 23.57971 | 86 | 0.650891 | USCbiostats |
2bc0c2ffd13f5c6f5c74f823f58868c065422d01 | 10,011 | hpp | C++ | ql/math/optimization/leastsquare.hpp | markxio/Quantuccia | ebe71a1b9c2a9ee7fc4ea918a9602f100316869d | [
"BSD-3-Clause"
] | 29 | 2017-03-20T14:17:39.000Z | 2021-12-22T08:00:52.000Z | ql/math/optimization/leastsquare.hpp | markxio/Quantuccia | ebe71a1b9c2a9ee7fc4ea918a9602f100316869d | [
"BSD-3-Clause"
] | 10 | 2017-04-02T14:34:07.000Z | 2021-01-13T05:31:12.000Z | ql/math/optimization/leastsquare.hpp | markxio/Quantuccia | ebe71a1b9c2a9ee7fc4ea918a9602f100316869d | [
"BSD-3-Clause"
] | 22 | 2017-03-19T05:56:19.000Z | 2022-03-16T13:30:20.000Z | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2001, 2002, 2003 Nicolas Di Césaré
Copyright (C) 2005, 2007 StatPro Italia srl
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.or... | 36.67033 | 82 | 0.60893 | markxio |
2bc3035e35c4e87e5afc1778a1f55177bfecbc10 | 689 | cpp | C++ | displayimage/DisplayImage.cpp | ammarnajjar/opencv_tutorials | d34581f2dca1873adcff56d79d67a01ec009df02 | [
"MIT"
] | 1 | 2016-07-23T22:17:23.000Z | 2016-07-23T22:17:23.000Z | displayimage/DisplayImage.cpp | ammarnajjar/opencv_tutorials | d34581f2dca1873adcff56d79d67a01ec009df02 | [
"MIT"
] | null | null | null | displayimage/DisplayImage.cpp | ammarnajjar/opencv_tutorials | d34581f2dca1873adcff56d79d67a01ec009df02 | [
"MIT"
] | null | null | null | #include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
static void show_usage(std::string name)
{
std::cerr << "Usage: " << name << " <option(s)> SOURCES\n"
<< "Options:\n"
<< "\t-h,--help\t\tShow this help message\n"
<< "\t-i,--input IMAGE\tSpecify the sou... | 20.264706 | 63 | 0.570392 | ammarnajjar |
2bcc05739efd22d5049dd07685dba056b54a0c10 | 950 | cpp | C++ | src/thunderbots/software/ai/intent/move_intent.cpp | Solaris5959/Software | b34ed63f671460dcb8db62d328b776747adaf374 | [
"MIT"
] | null | null | null | src/thunderbots/software/ai/intent/move_intent.cpp | Solaris5959/Software | b34ed63f671460dcb8db62d328b776747adaf374 | [
"MIT"
] | null | null | null | src/thunderbots/software/ai/intent/move_intent.cpp | Solaris5959/Software | b34ed63f671460dcb8db62d328b776747adaf374 | [
"MIT"
] | null | null | null | #include "ai/intent/move_intent.h"
#include "ai/intent/visitor/intent_visitor.h"
#include "util/logger/init.h"
const std::string MoveIntent::INTENT_NAME = "Move Intent";
MoveIntent::MoveIntent(unsigned int robot_id, const Point &dest, const Angle &final_angle,
double final_speed, unsigned int ... | 26.388889 | 90 | 0.689474 | Solaris5959 |
2bcd27dbe40020eeb28efbd630870d8d4f1654ba | 540 | cpp | C++ | Luogu/Noob_2_Branching_Structure/P1085.cpp | anine09/ACM | e9e8f09157e4ec91c1752a4b4724e28dfeaae4e6 | [
"MIT"
] | null | null | null | Luogu/Noob_2_Branching_Structure/P1085.cpp | anine09/ACM | e9e8f09157e4ec91c1752a4b4724e28dfeaae4e6 | [
"MIT"
] | null | null | null | Luogu/Noob_2_Branching_Structure/P1085.cpp | anine09/ACM | e9e8f09157e4ec91c1752a4b4724e28dfeaae4e6 | [
"MIT"
] | null | null | null | #include<cstdio>
#include<iostream>
using namespace std;
int week[7][4];
int unhappy[7][2];
int unhappy_sort(int a[10][10]);
int main(){
for (int i = 1; i <= 7;i++){
cin >> week[i][1] >> week[i][2];
}
for (int i = 1; i <= 7;i++){
week[i][3] = week[i][1] + week[i][2];
}
for (int i = 1... | 19.285714 | 45 | 0.442593 | anine09 |
2bd1c8646680df07c83895c4ba53248c65b4a1c4 | 6,698 | cc | C++ | GUI/AScope/ChannelConnectionWindow.cc | Gluttton/sidecar | 83b1ca2c842798dd3c48dd8461bcec941f049923 | [
"MIT"
] | null | null | null | GUI/AScope/ChannelConnectionWindow.cc | Gluttton/sidecar | 83b1ca2c842798dd3c48dd8461bcec941f049923 | [
"MIT"
] | null | null | null | GUI/AScope/ChannelConnectionWindow.cc | Gluttton/sidecar | 83b1ca2c842798dd3c48dd8461bcec941f049923 | [
"MIT"
] | null | null | null | #include "QtGui/QKeyEvent"
#include "GUI/LogUtils.h"
#include "GUI/ServiceEntry.h"
#include "GUI/modeltest.h"
#include "AppBase.h"
#include "ChannelConnectionModel.h"
#include "ChannelConnectionView.h"
#include "ChannelConnectionWindow.h"
#include "DisplayView.h"
#include "VideoChannel.h"
using namespace SideCar::GU... | 32.833333 | 119 | 0.701702 | Gluttton |
2bd9d3eb845b5f236f6d01b551561feae19b7974 | 1,930 | ipp | C++ | app/src/main/cpp/v8pp/json.ipp | Sexmonkey/V8Module | 3f25145e144653e5af870f4ee50fa600b3c855ef | [
"Apache-2.0"
] | null | null | null | app/src/main/cpp/v8pp/json.ipp | Sexmonkey/V8Module | 3f25145e144653e5af870f4ee50fa600b3c855ef | [
"Apache-2.0"
] | 1 | 2019-01-25T09:44:19.000Z | 2019-01-25T09:44:19.000Z | app/src/main/cpp/v8pp/json.ipp | monkey-jz/V8Module | 3f25145e144653e5af870f4ee50fa600b3c855ef | [
"Apache-2.0"
] | 1 | 2019-01-25T08:36:51.000Z | 2019-01-25T08:36:51.000Z | #include "json.hpp"
namespace v8pp {
V8PP_IMPL std::string json_str(v8::Isolate* isolate, v8::Local<v8::Value> value)
{
if (value.IsEmpty())
{
return std::string();
}
v8::HandleScope scope(isolate);
v8::Local<v8::Context> context = isolate->GetCurrentContext();
v8::Local<v8::String> key = v8::String::NewFr... | 32.711864 | 115 | 0.697409 | Sexmonkey |
2bdd6708e88913d10dcf8b2e17636600627c309b | 1,501 | cc | C++ | src/q_701_750/q0746.cc | vNaonLu/daily-leetcode | 2830c2cd413d950abe7c6d9b833c771f784443b0 | [
"MIT"
] | 2 | 2021-09-28T18:41:03.000Z | 2021-09-28T18:42:57.000Z | src/q_701_750/q0746.cc | vNaonLu/Daily_LeetCode | 30024b561611d390931cef1b22afd6a5060cf586 | [
"MIT"
] | 16 | 2021-09-26T11:44:20.000Z | 2021-11-28T06:44:02.000Z | src/q_701_750/q0746.cc | vNaonLu/daily-leetcode | 2830c2cd413d950abe7c6d9b833c771f784443b0 | [
"MIT"
] | 1 | 2021-11-22T09:11:36.000Z | 2021-11-22T09:11:36.000Z | #include <gtest/gtest.h>
#include <iostream>
#include <vector>
using namespace std;
/**
* This file is generated by leetcode_add.py v1.0
*
* 746.
* Min Cost Climbing Stairs
*
* ––––––––––––––––––––––––––––– Description –––––––––––––––––––––––––––––
*
* You are given an integer array ‘cost’ where ‘cost[... | 25.87931 | 75 | 0.563624 | vNaonLu |
2bde70338bb0f0054eafe89b607b764c0ddf7783 | 741 | cpp | C++ | src/zisa/math/cell_factory.cpp | 1uc/ZisaFVM | 75fcedb3bece66499e011228a39d8a364b50fd74 | [
"MIT"
] | null | null | null | src/zisa/math/cell_factory.cpp | 1uc/ZisaFVM | 75fcedb3bece66499e011228a39d8a364b50fd74 | [
"MIT"
] | null | null | null | src/zisa/math/cell_factory.cpp | 1uc/ZisaFVM | 75fcedb3bece66499e011228a39d8a364b50fd74 | [
"MIT"
] | 1 | 2021-08-24T11:52:51.000Z | 2021-08-24T11:52:51.000Z | // SPDX-License-Identifier: MIT
// Copyright (c) 2021 ETH Zurich, Luc Grosheintz-Laval
#include <zisa/math/cell_factory.hpp>
#include <zisa/math/cell.hpp>
#include <zisa/math/denormalized_rule.hpp>
#include <zisa/math/tetrahedral_rule.hpp>
#include <zisa/math/tetrahedron.hpp>
#include <zisa/math/triangle.hpp>
#includ... | 25.551724 | 60 | 0.747638 | 1uc |
2be6616f7638262a0d4c60a3b386dde636704d3a | 454 | hpp | C++ | library/ATF/_qry_case_gm_greetingmsg.hpp | lemkova/Yorozuya | f445d800078d9aba5de28f122cedfa03f26a38e4 | [
"MIT"
] | 29 | 2017-07-01T23:08:31.000Z | 2022-02-19T10:22:45.000Z | library/ATF/_qry_case_gm_greetingmsg.hpp | kotopes/Yorozuya | 605c97d3a627a8f6545cc09f2a1b0a8afdedd33a | [
"MIT"
] | 90 | 2017-10-18T21:24:51.000Z | 2019-06-06T02:30:33.000Z | library/ATF/_qry_case_gm_greetingmsg.hpp | kotopes/Yorozuya | 605c97d3a627a8f6545cc09f2a1b0a8afdedd33a | [
"MIT"
] | 44 | 2017-12-19T08:02:59.000Z | 2022-02-24T23:15:01.000Z | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
START_ATF_NAMESPACE
struct _qry_case_gm_greetingmsg
{
char type;
char in_gmname[17];
char in_gmgreetingmsg[256];
public:
int... | 25.222222 | 108 | 0.696035 | lemkova |
2be7cd359b0b3bf78bb213f46c44655114423abc | 1,520 | cpp | C++ | cpp/source/zInterOp/core/zRhinoCore.cpp | venumb/zSpace | a85de6d29c9099fcbd3d2c67f5f1be315eed6dc4 | [
"MIT"
] | 1 | 2020-05-19T16:52:23.000Z | 2020-05-19T16:52:23.000Z | cpp/source/zInterOp/core/zRhinoCore.cpp | GitZHCODE/zspace_toolsets | 8bcc0c47bc74f2dde06f0f2de8bdb976b67fbe0a | [
"MIT"
] | 1 | 2019-06-24T09:16:37.000Z | 2019-06-26T18:21:36.000Z | cpp/source/zInterOp/core/zRhinoCore.cpp | GitZHCODE/zspace_toolsets | 8bcc0c47bc74f2dde06f0f2de8bdb976b67fbe0a | [
"MIT"
] | null | null | null | // This file is part of zspace, a simple C++ collection of geometry data-structures & algorithms,
// data analysis & visualization framework.
//
// Copyright (C) 2019 ZSPACE
//
// This Source Code Form is subject to the terms of the MIT License
// If a copy of the MIT License was not distributed with this file, You... | 22.352941 | 110 | 0.751316 | venumb |
2bea75b542ec55abbe346d01f83647ace98477a5 | 4,702 | cpp | C++ | src/vms/fastvm/lookaheadtrie.cpp | elpollouk/BVM | bc10731293c4173d70cdd8ae2c30b6ab7f912f30 | [
"MIT"
] | null | null | null | src/vms/fastvm/lookaheadtrie.cpp | elpollouk/BVM | bc10731293c4173d70cdd8ae2c30b6ab7f912f30 | [
"MIT"
] | null | null | null | src/vms/fastvm/lookaheadtrie.cpp | elpollouk/BVM | bc10731293c4173d70cdd8ae2c30b6ab7f912f30 | [
"MIT"
] | null | null | null | #include "lookaheadtrie.h"
#include "vms/vmexception.h"
#include "linkernode.h"
namespace FVM
{
//-------------------------------------------------------------------------------------------//
// Node
//-------------------------------------------------------------------------------------------//
class TrieNode
... | 21.668203 | 109 | 0.585708 | elpollouk |
2bed7552956064ba00b23f998932288e4f0151b4 | 5,947 | hpp | C++ | library/ATF/WheatyExceptionReportInfo.hpp | lemkova/Yorozuya | f445d800078d9aba5de28f122cedfa03f26a38e4 | [
"MIT"
] | 29 | 2017-07-01T23:08:31.000Z | 2022-02-19T10:22:45.000Z | library/ATF/WheatyExceptionReportInfo.hpp | kotopes/Yorozuya | 605c97d3a627a8f6545cc09f2a1b0a8afdedd33a | [
"MIT"
] | 90 | 2017-10-18T21:24:51.000Z | 2019-06-06T02:30:33.000Z | library/ATF/WheatyExceptionReportInfo.hpp | kotopes/Yorozuya | 605c97d3a627a8f6545cc09f2a1b0a8afdedd33a | [
"MIT"
] | 44 | 2017-12-19T08:02:59.000Z | 2022-02-24T23:15:01.000Z | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <WheatyExceptionReport.hpp>
START_ATF_NAMESPACE
namespace Info
{
using WheatyExceptionReportDumpTypeIndex2_ptr = char* (WINAPIV*)(char*, uint64... | 104.333333 | 195 | 0.794518 | lemkova |
2bedd52a09a9caa707e79c3e3e55826186f9cdd6 | 7,022 | cpp | C++ | src/tournament/checker.cpp | dragoniye/bbpPairings | e7ac8352e41624c31904cadb587a0bd634718cb7 | [
"Apache-2.0"
] | null | null | null | src/tournament/checker.cpp | dragoniye/bbpPairings | e7ac8352e41624c31904cadb587a0bd634718cb7 | [
"Apache-2.0"
] | null | null | null | src/tournament/checker.cpp | dragoniye/bbpPairings | e7ac8352e41624c31904cadb587a0bd634718cb7 | [
"Apache-2.0"
] | null | null | null | #include <iomanip>
#include <iostream>
#include <list>
#include <ostream>
#include <string>
#include <swisssystems/common.h>
#include <utility/uintstringconversion.h>
#include "checker.h"
#include "tournament.h"
#ifndef OMIT_CHECKER
namespace tournament
{
namespace checker
{
/**
* Check the pairings of ... | 31.070796 | 78 | 0.500285 | dragoniye |
2bf1a43c3e3cd06c231fad9352a190691046aa79 | 4,392 | hh | C++ | apps/rosetta/riflib/scaffold/ExtraScaffoldData.hh | YaoYinYing/rifdock | cbde6bbeefd29a066273bdf2937cf36b0d2e6335 | [
"Apache-2.0"
] | 25 | 2019-07-23T01:03:48.000Z | 2022-03-31T04:16:08.000Z | apps/rosetta/riflib/scaffold/ExtraScaffoldData.hh | YaoYinYing/rifdock | cbde6bbeefd29a066273bdf2937cf36b0d2e6335 | [
"Apache-2.0"
] | 13 | 2018-01-30T17:45:57.000Z | 2022-03-28T11:02:44.000Z | apps/rosetta/riflib/scaffold/ExtraScaffoldData.hh | YaoYinYing/rifdock | cbde6bbeefd29a066273bdf2937cf36b0d2e6335 | [
"Apache-2.0"
] | 14 | 2018-02-08T01:42:28.000Z | 2022-03-31T12:56:17.000Z | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | 39.567568 | 146 | 0.688525 | YaoYinYing |
2bf31f6c9d7c0bb947e1a520e50e72a9bd622ef9 | 1,345 | cpp | C++ | src/exception.cpp | gaming-hacker/libfranka | 57374e69a01cc24854af4260d9c4e86929054883 | [
"Apache-2.0"
] | null | null | null | src/exception.cpp | gaming-hacker/libfranka | 57374e69a01cc24854af4260d9c4e86929054883 | [
"Apache-2.0"
] | null | null | null | src/exception.cpp | gaming-hacker/libfranka | 57374e69a01cc24854af4260d9c4e86929054883 | [
"Apache-2.0"
] | null | null | null | // Copyright (c) 2017 Franka Emika GmbH
// Use of this source code is governed by the Apache-2.0 license, see LICENSE
#include <franka/exception.h>
#include <string>
#include <utility>
// `using std::string_literals::operator""s` produces a GCC warning that cannot be disabled, so we
// have to use `using namespace ..... | 42.03125 | 98 | 0.64461 | gaming-hacker |
2bfde020a0dbdd9145a62be76a1ed815ea85e7d9 | 2,291 | cpp | C++ | src/tests/src/models/page-api-test.cpp | ranbaa22/imgbrd-grabber | 062da0e3eb40f6758837b45239f9356803bd5531 | [
"Apache-2.0"
] | null | null | null | src/tests/src/models/page-api-test.cpp | ranbaa22/imgbrd-grabber | 062da0e3eb40f6758837b45239f9356803bd5531 | [
"Apache-2.0"
] | null | null | null | src/tests/src/models/page-api-test.cpp | ranbaa22/imgbrd-grabber | 062da0e3eb40f6758837b45239f9356803bd5531 | [
"Apache-2.0"
] | null | null | null | #include <QScopedPointer>
#include <QSettings>
#include "models/page.h"
#include "models/page-api.h"
#include "models/profile.h"
#include "models/site.h"
#include "models/source.h"
#include "tags/tag.h"
#include "catch.h"
#include "source-helpers.h"
TEST_CASE("PageApi")
{
setupSource("Danbooru (2.0)");
setupSite("D... | 33.202899 | 184 | 0.707551 | ranbaa22 |
920037c253568d3a2d85d6e6c081835128122e4e | 462 | cpp | C++ | kcfi/llvm-kcfi/tools/clang/test/CodeGenCXX/deferred-global-init.cpp | IntelSTORM/Projects | b983417a5ca22c7679da5a1144b348863bea5698 | [
"Intel"
] | 1 | 2022-01-11T11:12:00.000Z | 2022-01-11T11:12:00.000Z | kcfi/llvm-kcfi/tools/clang/test/CodeGenCXX/deferred-global-init.cpp | IntelSTORMteam/Jurassic-Projects | b983417a5ca22c7679da5a1144b348863bea5698 | [
"Intel"
] | null | null | null | kcfi/llvm-kcfi/tools/clang/test/CodeGenCXX/deferred-global-init.cpp | IntelSTORMteam/Jurassic-Projects | b983417a5ca22c7679da5a1144b348863bea5698 | [
"Intel"
] | null | null | null | // RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
// PR5967
extern void* foo;
static void* const a = foo;
void* bar() { return a; }
// CHECK: @_ZL1a = internal global i8* null
// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: load i8*, i8** @foo
// CHECK: ret void
... | 27.176471 | 80 | 0.707792 | IntelSTORM |
920639dcf49fca609e981693b9c0447f7d695192 | 1,085 | cpp | C++ | HackerEarth/CodeMonk/GraphTheoryI/LittleMonkAndEdgeCount.cpp | seeva92/Competitive-Programming | 69061c5409bb806148616fe7d86543e94bf76edd | [
"Apache-2.0"
] | null | null | null | HackerEarth/CodeMonk/GraphTheoryI/LittleMonkAndEdgeCount.cpp | seeva92/Competitive-Programming | 69061c5409bb806148616fe7d86543e94bf76edd | [
"Apache-2.0"
] | null | null | null | HackerEarth/CodeMonk/GraphTheoryI/LittleMonkAndEdgeCount.cpp | seeva92/Competitive-Programming | 69061c5409bb806148616fe7d86543e94bf76edd | [
"Apache-2.0"
] | null | null | null | #include <bits/stdc++.h>
typedef long long ll;
const int mod = 1e9 + 7;
const int MAX = 1e5 + 7;
using namespace std;
typedef vector<int> vi;
int n, q, x, y;
vector<int> g[MAX];
pair<int, int> edges[MAX];
int cnt[MAX];
int dfs(int i) {
cnt[i] = 1;
for (auto j : g[i]) {
if (cnt[j] == 0) {
cnt[i] += dfs(j);
}
}... | 21.7 | 77 | 0.542857 | seeva92 |
9206dedc565853e0cc21c5c98e188e2ec7cf2c0c | 2,582 | cpp | C++ | src/game.cpp | basegpu/cpp-tetris | c67086e68030daaf7f2013237eada72463faf050 | [
"MIT"
] | null | null | null | src/game.cpp | basegpu/cpp-tetris | c67086e68030daaf7f2013237eada72463faf050 | [
"MIT"
] | null | null | null | src/game.cpp | basegpu/cpp-tetris | c67086e68030daaf7f2013237eada72463faf050 | [
"MIT"
] | null | null | null | #include "game.hpp"
#include "globals.hpp"
#include "tetrimino.hpp"
#include "board.hpp"
#include "state.hpp"
#include "actions.hpp"
#include <vector>
#include <algorithm>
Game::Game() :
gameIsOn(true),
score(0)
{
}
bool Game::On() const
{
return this->gameIsOn;
}
int Game::GetScore() const
{
re... | 21.697479 | 94 | 0.586754 | basegpu |
9208fa06ff0cec27b32af476a7916ffdda5348f7 | 361 | cpp | C++ | TIOJ/1506.cpp | w181496/OJ | 67d1d32770376865eba8a9dd1767e97dae68989a | [
"MIT"
] | 9 | 2017-10-08T16:22:03.000Z | 2021-08-20T09:32:17.000Z | TIOJ/1506.cpp | w181496/OJ | 67d1d32770376865eba8a9dd1767e97dae68989a | [
"MIT"
] | null | null | null | TIOJ/1506.cpp | w181496/OJ | 67d1d32770376865eba8a9dd1767e97dae68989a | [
"MIT"
] | 2 | 2018-01-15T16:35:44.000Z | 2019-03-21T18:30:04.000Z | #include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
double a,b,c,d, x, y;
while(cin>>a>>b>>c>>d)
{
if(a-b==0)
x=0;
else
x=(-c+d)/(a-b);
y=a*x+c;
cout<<fixed<<setprecision(2)<<x<<endl;
cout<<fixed<<setpre... | 17.190476 | 46 | 0.473684 | w181496 |
920c0879f89e4151801f923b325e5f6bfd19ed6b | 257 | cpp | C++ | Practica semanal 5/G.cpp | Tresillo2017/IOE2 | 6d191f0085a67b0b187851ad2d73b61040b74e87 | [
"MIT"
] | null | null | null | Practica semanal 5/G.cpp | Tresillo2017/IOE2 | 6d191f0085a67b0b187851ad2d73b61040b74e87 | [
"MIT"
] | null | null | null | Practica semanal 5/G.cpp | Tresillo2017/IOE2 | 6d191f0085a67b0b187851ad2d73b61040b74e87 | [
"MIT"
] | null | null | null | #include <iostream>
#include <string>
using namespace std;
int main()
{
int contador = 0;
string s;
cin >> s;
for (int i = 0; i < s.length()-1; i++)
{
cout << s[i] << "_";
}
cout << s[s.length()-1] << endl;
}
| 12.85 | 42 | 0.455253 | Tresillo2017 |
920cd0bb02358cf1d02af4b813cad64e40f97d7b | 3,209 | cc | C++ | protorpc/src/protorpc/rpc_client.cc | chai2010/protorpc3-cxx | eb384a6296817e0352b6febde5190b1f7947edeb | [
"BSD-3-Clause"
] | 4 | 2016-02-29T08:57:54.000Z | 2019-06-30T17:36:31.000Z | protorpc/src/protorpc/rpc_client.cc | chai2010/protorpc3-cxx | eb384a6296817e0352b6febde5190b1f7947edeb | [
"BSD-3-Clause"
] | null | null | null | protorpc/src/protorpc/rpc_client.cc | chai2010/protorpc3-cxx | eb384a6296817e0352b6febde5190b1f7947edeb | [
"BSD-3-Clause"
] | 2 | 2017-07-16T09:52:53.000Z | 2021-12-22T01:32:42.000Z | // Copyright 2013 <chaishushan{AT}gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "protorpc/rpc_client.h"
#include "protorpc/rpc_wire.h"
namespace protorpc {
Client::Client(const char* host, int port, Env* env):
conn_(... | 26.089431 | 110 | 0.668433 | chai2010 |
920f2338fd7af3b460d1b5ec80cabeb681622f5d | 303 | cpp | C++ | CCC/ccc20j4.cpp | aaronwng/competitive-programming-solutions | 60c463e6d71ef8116548045b25bd4b09f0e57188 | [
"MIT"
] | null | null | null | CCC/ccc20j4.cpp | aaronwng/competitive-programming-solutions | 60c463e6d71ef8116548045b25bd4b09f0e57188 | [
"MIT"
] | null | null | null | CCC/ccc20j4.cpp | aaronwng/competitive-programming-solutions | 60c463e6d71ef8116548045b25bd4b09f0e57188 | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
int main() {
string T,S; cin >> T >> S;
for (int i = 0; i < S.length(); i++) {
if (T.find(S) == string::npos) S = S.substr(1) + S.at(0);
else {
cout << "yes\n";
return 0;
}
}
cout << "no\n";
} | 23.307692 | 65 | 0.419142 | aaronwng |
92103c285240698e49bd69f8a053766b1d197e7f | 4,501 | cpp | C++ | src/BabylonCpp/src/cameras/inputs/free_camera_touch_input.cpp | samdauwe/BabylonCpp | eea9f761a49bb460ff1324c20e4674ef120e94f1 | [
"Apache-2.0"
] | 277 | 2017-05-18T08:27:10.000Z | 2022-03-26T01:31:37.000Z | src/BabylonCpp/src/cameras/inputs/free_camera_touch_input.cpp | samdauwe/BabylonCpp | eea9f761a49bb460ff1324c20e4674ef120e94f1 | [
"Apache-2.0"
] | 77 | 2017-09-03T15:35:02.000Z | 2022-03-28T18:47:20.000Z | src/BabylonCpp/src/cameras/inputs/free_camera_touch_input.cpp | samdauwe/BabylonCpp | eea9f761a49bb460ff1324c20e4674ef120e94f1 | [
"Apache-2.0"
] | 37 | 2017-03-30T03:36:24.000Z | 2022-01-28T08:28:36.000Z | #include <babylon/cameras/inputs/free_camera_touch_input.h>
#include <babylon/babylon_stl_util.h>
#include <babylon/engines/scene.h>
namespace BABYLON {
FreeCameraTouchInput::FreeCameraTouchInput(bool iAllowMouse)
: allowMouse{iAllowMouse}
, touchAngularSensibility{200000.f}
, touchMoveSensibility{250.f}... | 26.476471 | 94 | 0.620973 | samdauwe |
921091fe2586e2ce67a0e82039890ab0518604ef | 2,895 | cpp | C++ | src/procfid/fidFourier.cpp | wmotte/toolkid | 2a8f82e1492c9efccde9a4935ce3019df1c68cde | [
"MIT"
] | null | null | null | src/procfid/fidFourier.cpp | wmotte/toolkid | 2a8f82e1492c9efccde9a4935ce3019df1c68cde | [
"MIT"
] | null | null | null | src/procfid/fidFourier.cpp | wmotte/toolkid | 2a8f82e1492c9efccde9a4935ce3019df1c68cde | [
"MIT"
] | null | null | null | #include "fidFourier.h"
#include "itkNumericTraits.h"
#include "vnl/algo/vnl_fft_1d.h"
namespace fid
{
template< class TPrecision >
struct Fourier< TPrecision >::Impl
{
int N;
int M;
bool OutputKSpace;
};
template< class TPrecision >
Fourier< TPrecision >::Fourier( int N, int M )
: m_Impl( new Impl, true )
{
m_I... | 19.172185 | 87 | 0.573057 | wmotte |
921297061de5f2f15033d38bbdfe9a342e819805 | 1,275 | inl | C++ | include/string/format.inl | GheisMohammadi/CppCommon | 8785825f1f6a38f52ba2b5ecbd25ab0e550e897a | [
"MIT"
] | 211 | 2016-10-09T04:10:21.000Z | 2022-03-22T19:46:55.000Z | include/string/format.inl | GheisMohammadi/CppCommon | 8785825f1f6a38f52ba2b5ecbd25ab0e550e897a | [
"MIT"
] | 26 | 2019-04-15T09:04:06.000Z | 2022-02-18T10:52:44.000Z | include/string/format.inl | GheisMohammadi/CppCommon | 8785825f1f6a38f52ba2b5ecbd25ab0e550e897a | [
"MIT"
] | 87 | 2018-12-28T14:01:03.000Z | 2022-03-29T09:14:48.000Z | /*!
\file format.inl
\brief Format string inline implementation
\author Ivan Shynkarenka
\date 16.09.2016
\copyright MIT License
*/
namespace CppCommon {
template <typename... Args>
inline std::string format(std::string_view pattern, Args&&... args)
{
return fmt::format(pattern, std::forward<A... | 23.611111 | 83 | 0.677647 | GheisMohammadi |
9213c2c6ad991a7005ee7fb06bbec9296a0070f4 | 378 | hpp | C++ | test/EerosEnvironment.hpp | ClaudiaVisentin/eeros-framework | 63739a2e33b0c5e9e573748fef675131c35181a6 | [
"Apache-2.0"
] | 10 | 2015-02-17T15:27:50.000Z | 2021-12-10T08:34:13.000Z | test/EerosEnvironment.hpp | ClaudiaVisentin/eeros-framework | 63739a2e33b0c5e9e573748fef675131c35181a6 | [
"Apache-2.0"
] | 6 | 2016-05-10T17:11:09.000Z | 2022-03-31T07:52:11.000Z | test/EerosEnvironment.hpp | ClaudiaVisentin/eeros-framework | 63739a2e33b0c5e9e573748fef675131c35181a6 | [
"Apache-2.0"
] | 13 | 2016-05-01T09:56:51.000Z | 2022-03-28T09:27:49.000Z | #ifndef ORG_EEROS_TEST_ENVIRONMENT_HPP_
#define ORG_EEROS_TEST_ENVIRONMENT_HPP_
#include <string>
#include <gtest/gtest.h>
namespace eeros {
namespace test {
class EerosEnvironment : public testing::Environment {
public:
virtual void SetUp();
virtual void TearDown();
private:
int* envArgc;
char** envAr... | 15.75 | 55 | 0.746032 | ClaudiaVisentin |
9215c37344e6ee4b512112d66ea575d55ad5925b | 1,518 | cpp | C++ | test/test_index.cpp | nitrocaster/luabind-deboostified | 72cc6e5e9da61d8ba0cd6835937a827c2cbad652 | [
"BSL-1.0"
] | 3 | 2015-11-23T08:19:40.000Z | 2020-11-03T01:52:37.000Z | test/test_index.cpp | nitrocaster/luabind-deboostified | 72cc6e5e9da61d8ba0cd6835937a827c2cbad652 | [
"BSL-1.0"
] | 4 | 2020-10-18T23:11:14.000Z | 2021-01-01T20:54:49.000Z | test/test_index.cpp | nitrocaster/luabind-deboostified | 72cc6e5e9da61d8ba0cd6835937a827c2cbad652 | [
"BSL-1.0"
] | 1 | 2020-12-28T18:47:11.000Z | 2020-12-28T18:47:11.000Z | // Boost Software License http://www.boost.org/LICENSE_1_0.txt
// Copyright (c) 2003 The Luabind Authors
#include "test.hpp"
#include <luabind/luabind.hpp>
#include <type_traits>
class indexable
{
public:
int val1 = 1;
int val2 = 2;
int prop = 0;
int index(const char* key)
{
if (*key == '... | 19.21519 | 62 | 0.530303 | nitrocaster |
92162c17dc32e62f606111c99fb146705272c7e8 | 40,249 | cc | C++ | src/_IntSets/vectlib.cc | asminer/smart | 269747c4578b670e5c3973f93a1e6ec71d95be78 | [
"Apache-2.0"
] | 6 | 2018-05-30T23:02:14.000Z | 2022-01-19T07:30:46.000Z | src/_IntSets/vectlib.cc | asminer/smart | 269747c4578b670e5c3973f93a1e6ec71d95be78 | [
"Apache-2.0"
] | null | null | null | src/_IntSets/vectlib.cc | asminer/smart | 269747c4578b670e5c3973f93a1e6ec71d95be78 | [
"Apache-2.0"
] | 2 | 2018-07-13T18:53:27.000Z | 2021-04-12T17:54:02.000Z |
#include "vectlib.h"
#include "revision.h"
#include <stdio.h>
#include <stdlib.h>
// #define DEBUG_ADD
// #define DEBUG_REMOVE
// #define DEBUG_SWITCH
// #define DEBUG_GOSTATIC
// #define DEBUG_GODYNAMIC
const int MAJOR_VERSION = 1;
const int MINOR_VERSION = 0;
const int default_list_to_tree = 256;
const int defaul... | 24.202646 | 84 | 0.566946 | asminer |
921a503efc85b89dd3ed5375b8a42e76b555b944 | 2,546 | cpp | C++ | kettle/heater.cpp | gemtmp/gemha | 3c692dbdf89127cec38e9463af25cb9219097691 | [
"BSD-3-Clause"
] | null | null | null | kettle/heater.cpp | gemtmp/gemha | 3c692dbdf89127cec38e9463af25cb9219097691 | [
"BSD-3-Clause"
] | null | null | null | kettle/heater.cpp | gemtmp/gemha | 3c692dbdf89127cec38e9463af25cb9219097691 | [
"BSD-3-Clause"
] | null | null | null | #include <OneWire.h>
#include <DallasTemperature.h>
#include "heater.h"
namespace temp {
static int rawTemp;
struct Measure {
const int t;
const int v;
};
static const Measure points[] = { { 0, 2800 }, //
{ 8, 2710 }, //
{ 10, 2660 }, //
{ 20, 2260 }, //
{ 24, 2120 }, //
{ 30, 1914 }, //
{ 35, 1809 },... | 18.859259 | 91 | 0.590338 | gemtmp |
921b4425ea45b7044b7fb51c809a600819cbbafe | 8,278 | cpp | C++ | kernel/syscalls/Dispatch.cpp | DeanoBurrito/northport | 6da490b02bfe7d0a12a25316db879ecc249be1c7 | [
"MIT"
] | 19 | 2021-12-10T12:48:44.000Z | 2022-03-30T09:17:14.000Z | kernel/syscalls/Dispatch.cpp | DeanoBurrito/northport | 6da490b02bfe7d0a12a25316db879ecc249be1c7 | [
"MIT"
] | 24 | 2021-11-30T10:00:05.000Z | 2022-03-29T10:19:21.000Z | kernel/syscalls/Dispatch.cpp | DeanoBurrito/northport | 6da490b02bfe7d0a12a25316db879ecc249be1c7 | [
"MIT"
] | 2 | 2021-11-24T00:52:10.000Z | 2021-12-27T23:47:32.000Z | #include <syscalls/Dispatch.h>
#include <SyscallEnums.h>
#include <memory/PhysicalMemory.h>
#include <Configuration.h>
#include <Log.h>
extern "C"
{
[[noreturn]]
extern void TrapExit(Kernel::StoredRegisters* regs); //defined in arch/x86_64/Trap.s
}
namespace Kernel::Syscalls
{
StoredRegisters* EnterSyscal... | 41.59799 | 163 | 0.579005 | DeanoBurrito |
921bc57552621fc15064c8220246809dea993cd4 | 3,465 | cpp | C++ | modules/task_2/belik_j_ribbon_horiz/main.cpp | ChirkovRoman/pp_2020_autumn_informatics | a1f9508af0eaca3951c4d1fb5446a72cc64aa25d | [
"BSD-3-Clause"
] | null | null | null | modules/task_2/belik_j_ribbon_horiz/main.cpp | ChirkovRoman/pp_2020_autumn_informatics | a1f9508af0eaca3951c4d1fb5446a72cc64aa25d | [
"BSD-3-Clause"
] | null | null | null | modules/task_2/belik_j_ribbon_horiz/main.cpp | ChirkovRoman/pp_2020_autumn_informatics | a1f9508af0eaca3951c4d1fb5446a72cc64aa25d | [
"BSD-3-Clause"
] | null | null | null | // Copyright 2020 Belik Julia
#include <gtest-mpi-listener.hpp>
#include <gtest/gtest.h>
#include <mpi.h>
#include <algorithm>
#include <functional>
#include <vector>
#include "./RibbonHoriz.h"
TEST(Parallel_Operations_MPI, 6x6) {
int ProcNum, ProcRank;
MPI_Comm_size(MPI_COMM_WORLD, &ProcNum);
MPI_Comm_ran... | 30.394737 | 79 | 0.645887 | ChirkovRoman |
921d2f470ab62cdb2a6b09efd16d17e8a3532ea9 | 4,571 | cpp | C++ | tests/dbobjects/common/DbViewTest.cpp | Ascent-Group/visual-db | 4cd074fb64fac2def74bb5005fc0d46caa0e96f7 | [
"BSD-3-Clause"
] | 1 | 2015-06-25T18:12:50.000Z | 2015-06-25T18:12:50.000Z | tests/dbobjects/common/DbViewTest.cpp | Ascent-Group/visual-db | 4cd074fb64fac2def74bb5005fc0d46caa0e96f7 | [
"BSD-3-Clause"
] | null | null | null | tests/dbobjects/common/DbViewTest.cpp | Ascent-Group/visual-db | 4cd074fb64fac2def74bb5005fc0d46caa0e96f7 | [
"BSD-3-Clause"
] | null | null | null | /*-
* Copyright (c) 2009, Ascent Group.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list o... | 24.185185 | 85 | 0.688252 | Ascent-Group |
921d8e313a4d082e92b625ab66dbdd6a131fad8a | 657 | cpp | C++ | Examples/Classes/CooldownScene.cpp | umair6/FairyGUI-cocos2dx | 7b21889a48b6ff5878b407c2a484670ebd8a4549 | [
"MIT"
] | 308 | 2017-10-15T14:26:45.000Z | 2022-03-22T09:06:57.000Z | Examples/Classes/CooldownScene.cpp | umair6/FairyGUI-cocos2dx | 7b21889a48b6ff5878b407c2a484670ebd8a4549 | [
"MIT"
] | 73 | 2017-10-25T06:41:57.000Z | 2022-03-21T06:49:38.000Z | Examples/Classes/CooldownScene.cpp | umair6/FairyGUI-cocos2dx | 7b21889a48b6ff5878b407c2a484670ebd8a4549 | [
"MIT"
] | 108 | 2017-11-01T08:22:00.000Z | 2021-11-19T10:29:29.000Z | #include "CooldownScene.h"
USING_NS_CC;
void CooldownScene::continueInit()
{
UIPackage::addPackage("UI/Cooldown");
_view = UIPackage::createObject("Cooldown", "Main")->as<GComponent>();
_groot->addChild(_view);
GProgressBar* btn0 = _view->getChild("b0")->as<GProgressBar>();
GProgress... | 34.578947 | 84 | 0.652968 | umair6 |
92201186848b643e3e3ccc95bb0ac6d8474664e9 | 534 | cpp | C++ | src/Base/pybind11/PyPluginManager.cpp | MiladShafiee/Surena4HumanoidSimulation-Choreonoid | a3d8af2a6ae2e7720bab4a329809507632173177 | [
"MIT"
] | 2 | 2019-01-24T17:57:49.000Z | 2021-09-21T21:42:22.000Z | src/Base/pybind11/PyPluginManager.cpp | MiladShafiee/Surena4HumanoidSimulation-Choreonoid | a3d8af2a6ae2e7720bab4a329809507632173177 | [
"MIT"
] | null | null | null | src/Base/pybind11/PyPluginManager.cpp | MiladShafiee/Surena4HumanoidSimulation-Choreonoid | a3d8af2a6ae2e7720bab4a329809507632173177 | [
"MIT"
] | 1 | 2020-12-11T06:42:16.000Z | 2020-12-11T06:42:16.000Z | /*!
@author Shin'ichiro Nakaoka
*/
#include "../PluginManager.h"
#include <pybind11/pybind11.h>
using namespace cnoid;
namespace py = pybind11;
namespace cnoid {
void exportPyPluginManager(py::module m)
{
py::class_<PluginManager>(m, "PluginManager")
.def_static("instance", &PluginManager::instance, p... | 23.217391 | 104 | 0.691011 | MiladShafiee |
92201cc9f666ec58ef3442d32521fa498234ea0d | 31,942 | cpp | C++ | plugins/EphemPropagatorPlugin/src/base/propagator/StkEPropagator.cpp | saichikine/GMAT | 80bde040e12946a61dae90d9fc3538f16df34190 | [
"Apache-2.0"
] | null | null | null | plugins/EphemPropagatorPlugin/src/base/propagator/StkEPropagator.cpp | saichikine/GMAT | 80bde040e12946a61dae90d9fc3538f16df34190 | [
"Apache-2.0"
] | null | null | null | plugins/EphemPropagatorPlugin/src/base/propagator/StkEPropagator.cpp | saichikine/GMAT | 80bde040e12946a61dae90d9fc3538f16df34190 | [
"Apache-2.0"
] | 1 | 2021-12-05T05:40:15.000Z | 2021-12-05T05:40:15.000Z | //$Id$
//------------------------------------------------------------------------------
// StkEPropagator
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool.
//
// Copyright (c) 2002 - 2018 United States Government as repre... | 33.169263 | 93 | 0.488698 | saichikine |
9222135344d67fa520dadaccff795c644554bd2b | 3,002 | cpp | C++ | src/Gui/ModelForms/PassGroupDialogController.cpp | AndrzejWoronko/WebPassWare | 9af0df61a9279f1ffe8561714656265f4bec7939 | [
"MIT"
] | null | null | null | src/Gui/ModelForms/PassGroupDialogController.cpp | AndrzejWoronko/WebPassWare | 9af0df61a9279f1ffe8561714656265f4bec7939 | [
"MIT"
] | null | null | null | src/Gui/ModelForms/PassGroupDialogController.cpp | AndrzejWoronko/WebPassWare | 9af0df61a9279f1ffe8561714656265f4bec7939 | [
"MIT"
] | null | null | null | #include "PassGroupDialogController.h"
#include "PassGroupService.h"
PassGroupDialogController::PassGroupDialogController(QWidget *parent) :
CAbstractFormDialogController(new PassGroupDialog(parent), parent)
{
if (m_dialog)
{
m_dialog->addFieldsAndComponents();
this->setConnections();
... | 27.796296 | 79 | 0.562292 | AndrzejWoronko |
9222b8b5a7df02c277b8979e2940046313b9b8e4 | 5,073 | cpp | C++ | src/frame/scene/object/shader/uniform_variables.cpp | LightEngineProject/light-engine | 5a343dd0b4c58ff77e29c1c31ff8e7d7d16dce66 | [
"MIT"
] | null | null | null | src/frame/scene/object/shader/uniform_variables.cpp | LightEngineProject/light-engine | 5a343dd0b4c58ff77e29c1c31ff8e7d7d16dce66 | [
"MIT"
] | 2 | 2019-02-24T16:52:34.000Z | 2019-02-28T10:41:22.000Z | src/frame/scene/object/shader/uniform_variables.cpp | LightEngineProjects/light-engine | 5a343dd0b4c58ff77e29c1c31ff8e7d7d16dce66 | [
"MIT"
] | null | null | null | #include <GL/glew.h>
#include <glm/ext.hpp>
#include "../../../../../include/frame/scene/object/shader/shader.hpp"
using namespace LE;
shader_prog_t::uniform_variable_t::uniform_info_t::uniform_info_t() {}
inline bool compare_data(shader_prog_t::uniform_variable_t::uniform_info_t const & info, unsigned int target_t... | 29.323699 | 116 | 0.715356 | LightEngineProject |
922440ecb9ad5241a2bad821e1f694dbf7a439a4 | 1,060 | cpp | C++ | ThorEngine/Source Code/ResourceHandle.cpp | markitus18/Thor-Engine | d89c75f803357d6493cd018450bceb384d2dd265 | [
"Unlicense"
] | 12 | 2019-10-07T12:30:12.000Z | 2021-09-25T13:05:26.000Z | ThorEngine/Source Code/ResourceHandle.cpp | markitus18/Thor-Engine | d89c75f803357d6493cd018450bceb384d2dd265 | [
"Unlicense"
] | 15 | 2017-06-14T13:10:06.000Z | 2020-11-21T11:27:54.000Z | ThorEngine/Source Code/ResourceHandle.cpp | markitus18/Thor-Engine | d89c75f803357d6493cd018450bceb384d2dd265 | [
"Unlicense"
] | 4 | 2019-12-17T11:48:45.000Z | 2020-11-13T19:09:59.000Z | #include "ResourceHandle.h"
#include "Engine.h"
#include "M_Resources.h"
#include "R_Mesh.h"
#include "R_Model.h"
#include "R_Scene.h"
#include "R_Shader.h"
#include "R_Folder.h"
#include "R_Texture.h"
#include "R_Material.h"
#include "R_Animation.h"
#include "R_ParticleSystem.h"
#include "R_AnimatorController.h"
te... | 23.555556 | 71 | 0.784906 | markitus18 |
92270b7ee093b34de89a3c8a8a23948bd8effe28 | 2,190 | cpp | C++ | src/lib/file/Path.cpp | ryancalhoun/fit | dbe8bdf2d700981cd76fc0ed5c0946856ae785de | [
"MIT"
] | null | null | null | src/lib/file/Path.cpp | ryancalhoun/fit | dbe8bdf2d700981cd76fc0ed5c0946856ae785de | [
"MIT"
] | null | null | null | src/lib/file/Path.cpp | ryancalhoun/fit | dbe8bdf2d700981cd76fc0ed5c0946856ae785de | [
"MIT"
] | null | null | null | #include "Path.h"
#include "string/StringList.h"
#include "string/StringTokenizer.h"
#include <algorithm>
#include <iostream>
#include <vector>
Path::Path()
{}
Path::Path(const Path& rhs)
: _path(rhs)
{
fixSlashes();
}
Path::Path(const std::string& path)
: _path(path)
{
fixSlashes();
}
Path::Path(const char* pa... | 15.314685 | 68 | 0.60411 | ryancalhoun |
9229a7f185b7313b8529d78e32b3d09e8d45618b | 3,517 | hpp | C++ | app/defs/WorldPartDef.hpp | isonil/survival | ecb59af9fcbb35b9c28fd4fe29a4628f046165c8 | [
"MIT"
] | 1 | 2017-05-12T10:12:41.000Z | 2017-05-12T10:12:41.000Z | app/defs/WorldPartDef.hpp | isonil/Survival | ecb59af9fcbb35b9c28fd4fe29a4628f046165c8 | [
"MIT"
] | null | null | null | app/defs/WorldPartDef.hpp | isonil/Survival | ecb59af9fcbb35b9c28fd4fe29a4628f046165c8 | [
"MIT"
] | 1 | 2019-01-09T04:05:36.000Z | 2019-01-09T04:05:36.000Z | #ifndef APP_WORLD_PART_DEF_HPP
#define APP_WORLD_PART_DEF_HPP
#include "engine/util/Vec2.hpp"
#include "engine/util/Vec3.hpp"
#include "engine/util/Trace.hpp"
#include "engine/util/Def.hpp"
#include "parts/WorldPartRandomMineable.hpp"
#include "parts/WorldPartMob.hpp"
#include "parts/ItemsList.hpp"
#include <memory>
... | 34.821782 | 87 | 0.723344 | isonil |
922f02c39d22d030daf02f58613a54372b26a5d7 | 43 | cpp | C++ | test/autogen/smp@algorithm@suffix.cpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | 9 | 2020-07-04T16:46:13.000Z | 2022-01-09T21:59:31.000Z | test/autogen/smp@algorithm@suffix.cpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | null | null | null | test/autogen/smp@algorithm@suffix.cpp | jonathanpoelen/jln.mp | e5f05fc4467f14ac0047e3bdc75a04076e689985 | [
"MIT"
] | 1 | 2021-05-23T13:37:40.000Z | 2021-05-23T13:37:40.000Z | #include "jln/mp/smp/algorithm/suffix.hpp"
| 21.5 | 42 | 0.767442 | jonathanpoelen |
9235c66f36b899559393e043faf850d568437d56 | 3,968 | cpp | C++ | vp/src/core/common/real_clint.cpp | agra-uni-bremen/fdl21-stackuse-vp | 9c8be7a3534cdd8ed8b8fbce7be740fc16807876 | [
"MIT"
] | 72 | 2018-06-19T14:22:30.000Z | 2022-03-23T06:38:52.000Z | vp/src/core/common/real_clint.cpp | agra-uni-bremen/fdl21-stackuse-vp | 9c8be7a3534cdd8ed8b8fbce7be740fc16807876 | [
"MIT"
] | 16 | 2020-06-19T12:00:13.000Z | 2022-03-24T16:27:15.000Z | vp/src/core/common/real_clint.cpp | agra-uni-bremen/fdl21-stackuse-vp | 9c8be7a3534cdd8ed8b8fbce7be740fc16807876 | [
"MIT"
] | 36 | 2018-08-14T12:18:36.000Z | 2022-03-26T17:27:00.000Z | #include <assert.h>
#include <stddef.h>
#include "real_clint.h"
enum {
MSIP_BASE = 0,
MSIP_SIZE = 4,
MTIMECMP_BASE = 0x4000,
MTIMECMP_SIZE = 8,
MTIME_BASE = 0xBFF8,
MTIME_SIZE = 8,
};
enum {
MSIP_MASK = 0x1, // The upper MSIP bits are tied to zero
};
/* This is used to quantize a 1MHz value to the closest ... | 26.993197 | 128 | 0.729587 | agra-uni-bremen |
9237cae815037a39f32f80673776aa6b442c206d | 544 | cpp | C++ | src/AST/Expressions/LValueList.cpp | CarsonFox/CPSL | 07a949166d9399f273ddf15e239ade6e5ea6e4a5 | [
"MIT"
] | null | null | null | src/AST/Expressions/LValueList.cpp | CarsonFox/CPSL | 07a949166d9399f273ddf15e239ade6e5ea6e4a5 | [
"MIT"
] | null | null | null | src/AST/Expressions/LValueList.cpp | CarsonFox/CPSL | 07a949166d9399f273ddf15e239ade6e5ea6e4a5 | [
"MIT"
] | null | null | null | #include "LValueList.hpp"
LValueList::LValueList(LValueList *l, LValue *r) : left(l), right(r) {
}
LValueList::~LValueList() {
delete left;
delete right;
}
std::vector<std::shared_ptr<LValue>> LValueList::toVector() {
if (left) {
auto v = left->toVector();
if (right) {
v.emp... | 16.484848 | 70 | 0.544118 | CarsonFox |
92384fff7332324e4d142dff36c8d850ef410f69 | 1,585 | cpp | C++ | tests/Unit/NumericalAlgorithms/Interpolation/Test_Tags.cpp | macedo22/spectre | 97b2b7ae356cf86830258cb5f689f1191fdb6ddd | [
"MIT"
] | null | null | null | tests/Unit/NumericalAlgorithms/Interpolation/Test_Tags.cpp | macedo22/spectre | 97b2b7ae356cf86830258cb5f689f1191fdb6ddd | [
"MIT"
] | null | null | null | tests/Unit/NumericalAlgorithms/Interpolation/Test_Tags.cpp | macedo22/spectre | 97b2b7ae356cf86830258cb5f689f1191fdb6ddd | [
"MIT"
] | null | null | null | // Distributed under the MIT License.
// See LICENSE.txt for details.
#include "Framework/TestingFramework.hpp"
#include <cstddef>
#include "Helpers/DataStructures/DataBox/TestHelpers.hpp"
#include "NumericalAlgorithms/Interpolation/PointInfoTag.hpp"
#include "NumericalAlgorithms/Interpolation/Tags.hpp"
#include "Ut... | 36.022727 | 78 | 0.757729 | macedo22 |
923e14a86ee099e8d4e65ec62acc916169a71cf7 | 361 | cpp | C++ | ieee_sep/HexBinary128.cpp | Tylores/ieee_sep | 1928bed8076f4bfe702d34e436c6a85f197b0832 | [
"BSD-2-Clause"
] | null | null | null | ieee_sep/HexBinary128.cpp | Tylores/ieee_sep | 1928bed8076f4bfe702d34e436c6a85f197b0832 | [
"BSD-2-Clause"
] | null | null | null | ieee_sep/HexBinary128.cpp | Tylores/ieee_sep | 1928bed8076f4bfe702d34e436c6a85f197b0832 | [
"BSD-2-Clause"
] | null | null | null | ///////////////////////////////////////////////////////////
// HexBinary128.cpp
// Implementation of the Class HexBinary128
// Created on: 13-Apr-2020 2:51:30 PM
// Original author: svanausdall
///////////////////////////////////////////////////////////
#include "HexBinary128.h"
HexBinary128::HexBinary128()... | 19 | 59 | 0.468144 | Tylores |
92402048400026f6fa8349c25f9d6615f78f7b2e | 1,495 | cc | C++ | complejos_modificacion/test/test_complejos.cc | ULL-ESIT-IB-2020-2021/ib-practica12-oop-gtests-exercism-JonayVE-ull | a5f5bb898f987ef1528740bc006a4d61d9a9b035 | [
"MIT"
] | null | null | null | complejos_modificacion/test/test_complejos.cc | ULL-ESIT-IB-2020-2021/ib-practica12-oop-gtests-exercism-JonayVE-ull | a5f5bb898f987ef1528740bc006a4d61d9a9b035 | [
"MIT"
] | null | null | null | complejos_modificacion/test/test_complejos.cc | ULL-ESIT-IB-2020-2021/ib-practica12-oop-gtests-exercism-JonayVE-ull | a5f5bb898f987ef1528740bc006a4d61d9a9b035 | [
"MIT"
] | null | null | null | #include <gtest/gtest.h>
#include "complejos.h"
TEST(ComplexTest, Add){
Complex c1{3,4};
Complex c2{-3,8};
Complex c3{6,-1};
Complex result1;
Complex result2;
result1.Add(c1,c2);
result2.Add(c1,c3);
EXPECT_EQ(true, ((result1.GetReal() == 0)&&(result1.GetImaginary() == 12)));
EXPE... | 24.508197 | 82 | 0.597324 | ULL-ESIT-IB-2020-2021 |
92489371f6bdd4cdf9e7dcb0dd332481cdedd6fb | 633 | hpp | C++ | vm/parser/include/lexer.hpp | floyza/nand2tetris-exercises | 01f1e9414b6b340353f0e8478ea5d5937db1198d | [
"MIT"
] | null | null | null | vm/parser/include/lexer.hpp | floyza/nand2tetris-exercises | 01f1e9414b6b340353f0e8478ea5d5937db1198d | [
"MIT"
] | null | null | null | vm/parser/include/lexer.hpp | floyza/nand2tetris-exercises | 01f1e9414b6b340353f0e8478ea5d5937db1198d | [
"MIT"
] | null | null | null | #pragma once
#include <istream>
namespace Parser {
enum class Token {
Push,
Pop,
Local,
Argument,
This,
That,
Constant,
Static,
Pointer,
Temp,
Int,
Add,
Sub,
EOL,
None
};
struct Instruction {
Instruction(Token token = Token::None, int val = 0)
: token{token}, val{val} {}
Toke... | 12.918367 | 53 | 0.650869 | floyza |
924e661bb55c30a7902f4121faaf61733f8efb6e | 4,880 | hh | C++ | MCDataProducts/inc/MixingSummary.hh | bonventre/Offline | 77db9d6368f27ab9401c690c2c2a4257ade6c231 | [
"Apache-2.0"
] | null | null | null | MCDataProducts/inc/MixingSummary.hh | bonventre/Offline | 77db9d6368f27ab9401c690c2c2a4257ade6c231 | [
"Apache-2.0"
] | 1 | 2019-11-22T14:45:51.000Z | 2019-11-22T14:50:03.000Z | MCDataProducts/inc/MixingSummary.hh | bonventre/Offline | 77db9d6368f27ab9401c690c2c2a4257ade6c231 | [
"Apache-2.0"
] | 2 | 2019-10-14T17:46:58.000Z | 2020-03-30T21:05:15.000Z | #ifndef MCDataProducts_MixingSummary_hh
#define MCDataProducts_MixingSummary_hh
//
// Status information from one call to an event mixing module.
//
// $Id: MixingSummary.hh,v 1.2 2011/10/12 20:04:08 kutschke Exp $
// $Author: kutschke $
// $Date: 2011/10/12 20:04:08 $
//
// Original author Rob Kutschke
//
// Mu2e inc... | 39.354839 | 131 | 0.656557 | bonventre |
925125799440fe2150a67725ccdead3cedee0f83 | 1,022 | hpp | C++ | src/statements/ReadLineStatement.hpp | vgsantoniazzi/TinyInterpreter | c7269d50b47a1318989a43d807a40896f182ed16 | [
"MIT"
] | 29 | 2015-11-14T12:26:48.000Z | 2021-01-02T12:47:37.000Z | src/statements/ReadLineStatement.hpp | vgsantoniazzi/TinyInterpreter | c7269d50b47a1318989a43d807a40896f182ed16 | [
"MIT"
] | 9 | 2015-06-12T13:58:54.000Z | 2016-06-07T03:00:41.000Z | src/statements/ReadLineStatement.hpp | vgsantoniazzi/TinyInterpreter | c7269d50b47a1318989a43d807a40896f182ed16 | [
"MIT"
] | 6 | 2015-06-14T20:39:32.000Z | 2020-07-27T01:14:48.000Z | /**
* @file src/statements/ReadLineStatement.hpp
* @author Victor Antoniazzi <vgsantoniazzi@gmail.com>
* @brief Implements user input value to program.
*
* @details Wait for user input, and stores in a variable.
*/
#ifndef _READLINE_STATEMENT_
#define _READLINE_STATEMENT_
#include "Statement.hpp"
#include "../to... | 20.039216 | 78 | 0.677104 | vgsantoniazzi |
925a32c574beb5e8919db8ec0a0fa73a51746810 | 657 | cpp | C++ | util.cpp | tylerc/Ignatus | 7ceb806554f5af4afa5b22af65bc8249071cfc50 | [
"Unlicense"
] | 1 | 2019-08-13T07:09:47.000Z | 2019-08-13T07:09:47.000Z | util.cpp | tylerc/Ignatus | 7ceb806554f5af4afa5b22af65bc8249071cfc50 | [
"Unlicense"
] | null | null | null | util.cpp | tylerc/Ignatus | 7ceb806554f5af4afa5b22af65bc8249071cfc50 | [
"Unlicense"
] | null | null | null | #include "All.hpp"
namespace Ignatus{
std::string to_s(int i)
{
std::ostringstream stm;
stm << i;
return stm.str();
}
bool collision_between(GameObject* obj1, GameObject* obj2)
{
return sf::Rect<int>(obj1->Position.x,obj1->Position.y,obj1->Position.x+obj1->Dimensions.x,obj1->Position.y+o... | 24.333333 | 266 | 0.686454 | tylerc |
925ad9a9dccd0ed4762dc5dbb89e6c151f393122 | 5,835 | cpp | C++ | sources/utils/printer.cpp | neel/dhyara | 56c467ee5a56755881c3cd1fec8bd6c15ce5a348 | [
"BSD-2-Clause"
] | 7 | 2021-04-18T08:02:52.000Z | 2022-03-31T23:20:04.000Z | sources/utils/printer.cpp | RustyShackleforth/dhyara | 9f7dc956011f5aca542eca46cee4a27c463835a1 | [
"BSD-2-Clause"
] | 2 | 2021-04-17T21:17:10.000Z | 2021-04-23T15:17:36.000Z | sources/utils/printer.cpp | RustyShackleforth/dhyara | 9f7dc956011f5aca542eca46cee4a27c463835a1 | [
"BSD-2-Clause"
] | 1 | 2021-07-04T19:21:44.000Z | 2021-07-04T19:21:44.000Z | /*
* Copyright (c) 2020, Sunanda Bose (a.k.a. Neel Basu)
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "dhyara/utils/printer.h"
#include "esp_log.h"
#include <inttypes.h>
void dhyara::utils:... | 34.323529 | 121 | 0.606855 | neel |
1780bb740b42a459c5a3dcf61942487e7be54742 | 31,838 | cpp | C++ | proj/ecs_test.cpp | ariajanke/ecs | 57a324c9cbdb5f2ba9c9dfcabd37f09c62e03533 | [
"MIT"
] | null | null | null | proj/ecs_test.cpp | ariajanke/ecs | 57a324c9cbdb5f2ba9c9dfcabd37f09c62e03533 | [
"MIT"
] | 5 | 2021-07-11T02:13:54.000Z | 2021-11-09T00:32:06.000Z | proj/ecs_test.cpp | ariajanke/ecs | 57a324c9cbdb5f2ba9c9dfcabd37f09c62e03533 | [
"MIT"
] | null | null | null | #include <ecs/ecs.hpp>
#include <common/Util.hpp>
#include <common/Vector2Util.hpp>
#include <common/SfmlVectorTraits.hpp>
#include <iostream>
#include <memory>
#include <random>
#include <algorithm>
#include <thread>
#include <chrono>
#include <unordered_map>
#include <variant>
//#define MACRO_BUILD_WITH_SFML
#ifde... | 27.004241 | 126 | 0.603241 | ariajanke |
1781a6576625c71366d5136296f9a52447d313a9 | 7,313 | cpp | C++ | source/paint/image.cpp | bacusters/nana | 1ed7702790e54388f8299b34a8279690ab733b97 | [
"BSL-1.0"
] | 92 | 2016-09-18T14:37:22.000Z | 2022-01-27T19:55:00.000Z | source/paint/image.cpp | bacusters/nana | 1ed7702790e54388f8299b34a8279690ab733b97 | [
"BSL-1.0"
] | 1 | 2017-12-04T00:07:09.000Z | 2017-12-04T00:07:09.000Z | source/paint/image.cpp | bacusters/nana | 1ed7702790e54388f8299b34a8279690ab733b97 | [
"BSL-1.0"
] | 10 | 2016-09-23T02:32:01.000Z | 2021-12-20T11:43:48.000Z | /*
* Paint Image Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.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)
*
* @file: nana/paint/image... | 22.71118 | 172 | 0.638179 | bacusters |
1784dc52a3d92d7f96353670c858611e7761a97b | 2,890 | cpp | C++ | main.cpp | MrTAB/FolderCompare | c9101f9b1845f0808c324177ebd9cc310092b506 | [
"MIT"
] | null | null | null | main.cpp | MrTAB/FolderCompare | c9101f9b1845f0808c324177ebd9cc310092b506 | [
"MIT"
] | null | null | null | main.cpp | MrTAB/FolderCompare | c9101f9b1845f0808c324177ebd9cc310092b506 | [
"MIT"
] | null | null | null | /*
main.cpp
FolderCompare - compares two directories file lists and reports any files which
are unique by name between these folders, if any.
Arguments - two folders - simply drag the two directories in or name them if
using command line.
-----------
MIT License
Copyright (c) 2016 Tony Alastair Brow... | 31.758242 | 81 | 0.580277 | MrTAB |
1787904a7595f729a089d78e7f84fdecd57cb3e8 | 3,310 | cpp | C++ | AoC2016_09.cpp | tbsp/2016-AdventOfCode | a54973b13ad8b81e78c8063b6f6951ce66d24fa4 | [
"MIT"
] | null | null | null | AoC2016_09.cpp | tbsp/2016-AdventOfCode | a54973b13ad8b81e78c8063b6f6951ce66d24fa4 | [
"MIT"
] | null | null | null | AoC2016_09.cpp | tbsp/2016-AdventOfCode | a54973b13ad8b81e78c8063b6f6951ce66d24fa4 | [
"MIT"
] | null | null | null | /*
Advent of Code 2016
Day 9: Explosives in Cyberspace
*/
#include <string>
#include <fstream>
#include <iostream>
//#define DEBUG
/********************************************************
** Method to calculate the decompressed length
********************************************************/
i... | 26.48 | 166 | 0.572508 | tbsp |
17881b84d252cf283c40c5906b59a65bbee2ffc0 | 1,274 | hpp | C++ | include/aparse/lexer_machine.hpp | mohitmv/aparse | 34a6811f9a3d4f1c5dd21ed874b14e59e6725746 | [
"MIT"
] | 2 | 2021-04-15T20:02:37.000Z | 2021-04-17T18:18:50.000Z | include/aparse/lexer_machine.hpp | mohitmv/aparse | 34a6811f9a3d4f1c5dd21ed874b14e59e6725746 | [
"MIT"
] | 1 | 2019-10-07T10:41:52.000Z | 2019-10-07T10:41:52.000Z | include/aparse/lexer_machine.hpp | mohitmv/aparse | 34a6811f9a3d4f1c5dd21ed874b14e59e6725746 | [
"MIT"
] | 1 | 2020-05-05T16:52:20.000Z | 2020-05-05T16:52:20.000Z | // Copyright: 2015 Mohit Saini
// Author: Mohit Saini (mohitsaini1196@gmail.com)
#ifndef APARSE_LEXER_MACHINE_HPP_
#define APARSE_LEXER_MACHINE_HPP_
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include "aparse/utils/very_common_headers.hpp"
namespace aparse {
/** Underlyin... | 24.980392 | 74 | 0.708791 | mohitmv |
178e5a01d18183f8e5b7f69de5930a3ca58325e2 | 485 | cpp | C++ | WTLHelper/Theme.cpp | MaleNurse/RegExp | f8bada3d1f26fbdcf663a0a6e0965110c32bc0e6 | [
"MIT"
] | 825 | 2021-07-22T19:14:09.000Z | 2022-03-30T14:12:59.000Z | WTLHelper/Theme.cpp | MaleNurse/RegExp | f8bada3d1f26fbdcf663a0a6e0965110c32bc0e6 | [
"MIT"
] | 28 | 2021-07-24T17:30:46.000Z | 2022-01-10T23:11:08.000Z | WTLHelper/Theme.cpp | isabella232/RegExp | dbdb660f66ec7e29fd1fb32fb3ccee8d9c79cb90 | [
"MIT"
] | 64 | 2021-07-23T02:15:21.000Z | 2022-03-28T07:07:53.000Z | #include "pch.h"
#include "Theme.h"
Theme::Theme(bool def) : _default(def) {
for (auto& c : SysColors)
c = CLR_INVALID;
}
bool Theme::IsDefault() const {
return _default;
}
HBRUSH Theme::GetSysBrush(int index) const {
if (_SysBrush[index] == nullptr) {
auto color = GetSysColor(index);
if (color != CLR_INVAL... | 19.4 | 46 | 0.698969 | MaleNurse |
179070847353114232ba7d9f3b0708ce11f2f3ac | 2,260 | cpp | C++ | Codility_BinaryGap.cpp | CharlieGearsTech/Codility | b0c4355eb68f05f24390075e3fe2fe555d40b6b9 | [
"MIT"
] | 1 | 2021-01-31T22:59:59.000Z | 2021-01-31T22:59:59.000Z | Codility_BinaryGap.cpp | CharlieGearsTech/Codility | b0c4355eb68f05f24390075e3fe2fe555d40b6b9 | [
"MIT"
] | null | null | null | Codility_BinaryGap.cpp | CharlieGearsTech/Codility | b0c4355eb68f05f24390075e3fe2fe555d40b6b9 | [
"MIT"
] | null | null | null | /*
A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N.
For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contai... | 30.958904 | 437 | 0.647345 | CharlieGearsTech |
17942bae300345301d3ba8e5012cc44bc8dded46 | 1,161 | cpp | C++ | examples/IntegerOverflow.cpp | acpaquette/deepstate | 6acf07ad5dd95c9e8b970ca516ab93aa2620ea6e | [
"Apache-2.0"
] | 684 | 2018-02-18T18:04:23.000Z | 2022-03-26T06:18:39.000Z | examples/IntegerOverflow.cpp | acpaquette/deepstate | 6acf07ad5dd95c9e8b970ca516ab93aa2620ea6e | [
"Apache-2.0"
] | 273 | 2018-02-18T04:01:36.000Z | 2022-02-09T16:07:38.000Z | examples/IntegerOverflow.cpp | acpaquette/deepstate | 6acf07ad5dd95c9e8b970ca516ab93aa2620ea6e | [
"Apache-2.0"
] | 77 | 2018-02-19T00:18:33.000Z | 2022-03-16T04:12:09.000Z | /*
* Copyright (c) 2019 Trail of Bits, 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/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | 27 | 75 | 0.694229 | acpaquette |
17967b0a912ca75f4322074b60a2dc8de00d506c | 2,090 | cpp | C++ | src/coherence/component/net/extend/AbstractPofProtocol.cpp | chpatel3/coherence-cpp-extend-client | 4ea5267eae32064dff1e73339aa3fbc9347ef0f6 | [
"UPL-1.0",
"Apache-2.0"
] | 6 | 2020-07-01T21:38:30.000Z | 2021-11-03T01:35:11.000Z | src/coherence/component/net/extend/AbstractPofProtocol.cpp | chpatel3/coherence-cpp-extend-client | 4ea5267eae32064dff1e73339aa3fbc9347ef0f6 | [
"UPL-1.0",
"Apache-2.0"
] | 1 | 2020-07-24T17:29:22.000Z | 2020-07-24T18:29:04.000Z | src/coherence/component/net/extend/AbstractPofProtocol.cpp | chpatel3/coherence-cpp-extend-client | 4ea5267eae32064dff1e73339aa3fbc9347ef0f6 | [
"UPL-1.0",
"Apache-2.0"
] | 6 | 2020-07-10T18:40:58.000Z | 2022-02-18T01:23:40.000Z | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
#include "private/coherence/component/net/extend/AbstractPofProtocol.hpp"
#include "coherence/util/HashMap.hpp"
COH_OPEN_NAMESPACE4(coherence... | 29.027778 | 90 | 0.575598 | chpatel3 |
179cb1ed19257b0416727c0081d1ba3e262b40e6 | 2,624 | cpp | C++ | 00109_convert-sorted-list-to-binary-search-tree/200204-1.cpp | yanlinlin82/leetcode | ddcc0b9606d951cff9c08d1f7dfbc202067c8d65 | [
"MIT"
] | 6 | 2019-10-23T01:07:29.000Z | 2021-12-05T01:51:16.000Z | 00109_convert-sorted-list-to-binary-search-tree/200204-1.cpp | yanlinlin82/leetcode | ddcc0b9606d951cff9c08d1f7dfbc202067c8d65 | [
"MIT"
] | null | null | null | 00109_convert-sorted-list-to-binary-search-tree/200204-1.cpp | yanlinlin82/leetcode | ddcc0b9606d951cff9c08d1f7dfbc202067c8d65 | [
"MIT"
] | 1 | 2021-12-03T06:54:57.000Z | 2021-12-03T06:54:57.000Z | // https://leetcode-cn.com/problems/convert-sorted-list-to-binary-search-tree/
#include <cstdio>
#include <vector>
#include <initializer_list>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
TreeNode* create(initializer_list<... | 19.153285 | 78 | 0.563262 | yanlinlin82 |
179e04d9c9abf585df7c45ecea31ef77be7fe321 | 6,923 | cpp | C++ | src/decrypt.cpp | httese/OpenPGP | 7dce08dc8b72eeb0dcbf3df56d64606a6b957938 | [
"MIT"
] | 99 | 2015-01-06T01:53:26.000Z | 2022-01-31T18:18:27.000Z | src/decrypt.cpp | httese/OpenPGP | 7dce08dc8b72eeb0dcbf3df56d64606a6b957938 | [
"MIT"
] | 27 | 2015-03-09T05:46:53.000Z | 2020-05-06T02:52:18.000Z | src/decrypt.cpp | httese/OpenPGP | 7dce08dc8b72eeb0dcbf3df56d64606a6b957938 | [
"MIT"
] | 42 | 2015-03-18T03:44:43.000Z | 2022-03-31T21:34:06.000Z | #include "decrypt.h"
#include "Hashes/Hashes.h"
#include "Misc/PKCS1.h"
#include "Misc/cfb.h"
#include "Misc/mpi.h"
#include "PKA/PKAs.h"
#include "verify.h"
namespace OpenPGP {
namespace Decrypt {
Message data(const uint8_t sym,
const Message & message,
const std::string & session_key) {
... | 34.103448 | 175 | 0.572729 | httese |
17a4a187a794fc43ee800aa27d1642c641a762a9 | 18,939 | hpp | C++ | includes/nt/directories/dir_exceptions.hpp | ALEHACKsp/linux-pe | 77ab804076a2d3672050c769b9de0916dd849c48 | [
"BSD-3-Clause"
] | 1 | 2021-02-02T13:19:38.000Z | 2021-02-02T13:19:38.000Z | includes/nt/directories/dir_exceptions.hpp | ALEHACKsp/linux-pe | 77ab804076a2d3672050c769b9de0916dd849c48 | [
"BSD-3-Clause"
] | null | null | null | includes/nt/directories/dir_exceptions.hpp | ALEHACKsp/linux-pe | 77ab804076a2d3672050c769b9de0916dd849c48 | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) 2020 Can Boluk
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this lis... | 41.807947 | 145 | 0.516606 | ALEHACKsp |
17a578dee5652107ace4b38bb84bd17224f5473d | 4,488 | cpp | C++ | src/ui/widget.cpp | hyp/Arpheg | 78d142c15028da7c0c2ef4503bed6bcfd1ced67d | [
"BSD-3-Clause"
] | 1 | 2017-04-10T17:27:57.000Z | 2017-04-10T17:27:57.000Z | src/ui/widget.cpp | hyp/Arpheg | 78d142c15028da7c0c2ef4503bed6bcfd1ced67d | [
"BSD-3-Clause"
] | null | null | null | src/ui/widget.cpp | hyp/Arpheg | 78d142c15028da7c0c2ef4503bed6bcfd1ced67d | [
"BSD-3-Clause"
] | null | null | null | #include <string.h>
#include "../core/assert.h"
#include "../services.h"
#include "widget.h"
#include "components.h"
#include "ui.h"
namespace ui {
Widget::Widget(vec2i position,vec2i size) :
position_(position),size_(size),state_(StateVisible|StateEnabled),color_(0xFFffFFff),
next_(nullptr)
{
componentCount_ = ... | 26.556213 | 86 | 0.697861 | hyp |
17aabbeb6401f336bb5b978b35da5906b2d6d457 | 3,172 | cc | C++ | sources/patchwork/pwareascene.cc | jpcima/patchwork | 3a7bde127102ebcc2b8bfed5861caddd0243cef0 | [
"MIT"
] | null | null | null | sources/patchwork/pwareascene.cc | jpcima/patchwork | 3a7bde127102ebcc2b8bfed5861caddd0243cef0 | [
"MIT"
] | null | null | null | sources/patchwork/pwareascene.cc | jpcima/patchwork | 3a7bde127102ebcc2b8bfed5861caddd0243cef0 | [
"MIT"
] | null | null | null | #include "pwareascene.h"
#include "pwarea.h"
#include "pwnode.h"
#include "pwconnector.h"
#include <QDebug>
#include <boost/cast.hpp>
class PwAreaScenePrivate {
Q_DECLARE_PUBLIC(PwAreaScene);
PwAreaScenePrivate(PwAreaScene *p) : q_ptr(p) {}
PwAreaScene *q_ptr {};
QList<PwNode *> nodes;
QList<PwConnector *>... | 23.671642 | 80 | 0.682535 | jpcima |
17accc1ba1924903d6d1f724da1b42e8c3077758 | 270 | cpp | C++ | src/slib.cpp | mohansella/empty-cpp-project | e0084ae1235b623218a5e2f3480109ffc7320e99 | [
"MIT"
] | 1 | 2019-12-12T11:50:56.000Z | 2019-12-12T11:50:56.000Z | src/slib.cpp | mohansella/empty-cpp-project | e0084ae1235b623218a5e2f3480109ffc7320e99 | [
"MIT"
] | null | null | null | src/slib.cpp | mohansella/empty-cpp-project | e0084ae1235b623218a5e2f3480109ffc7320e99 | [
"MIT"
] | null | null | null | #include <stdio.h>
#include <spdlog/sinks/stdout_color_sinks.h>
void bootSlib()
{
auto consoleSink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
auto logger = std::make_shared<spdlog::logger>("MyApp", consoleSink);
logger->info("HelloWorld");
} | 30 | 79 | 0.718519 | mohansella |
17b7e373aabbed4636261fd07040abf33cb455fd | 674 | hpp | C++ | samples/helper.hpp | arsdever/Graph | 8e6f44eaabcf08707dc88119988f31dbb15133f0 | [
"MIT"
] | 1 | 2019-09-18T23:18:14.000Z | 2019-09-18T23:18:14.000Z | samples/helper.hpp | arsdever/Graph | 8e6f44eaabcf08707dc88119988f31dbb15133f0 | [
"MIT"
] | null | null | null | samples/helper.hpp | arsdever/Graph | 8e6f44eaabcf08707dc88119988f31dbb15133f0 | [
"MIT"
] | null | null | null | #pragma once
inline std::unordered_map<std::string, std::string> parse_args(int argc,
char** argv)
{
std::unordered_map<std::string, std::string> args;
for (int i = 1; i < argc; ++i)
{
std::string arg = argv[ i ];
if (arg.find("... | 26.96 | 75 | 0.354599 | arsdever |
17b8c25c61fcabb9695cc7206c813338ae57087e | 1,307 | cpp | C++ | tests/nostdlib/llvm_passes/Vectorize/SplitLoopPath/splitlooppath.cpp | TomWeaver18/dexter | d89b66ca6a0d1ba29a4c32f152773a34ce2881e8 | [
"MIT"
] | null | null | null | tests/nostdlib/llvm_passes/Vectorize/SplitLoopPath/splitlooppath.cpp | TomWeaver18/dexter | d89b66ca6a0d1ba29a4c32f152773a34ce2881e8 | [
"MIT"
] | null | null | null | tests/nostdlib/llvm_passes/Vectorize/SplitLoopPath/splitlooppath.cpp | TomWeaver18/dexter | d89b66ca6a0d1ba29a4c32f152773a34ce2881e8 | [
"MIT"
] | null | null | null | // RUN: %dexter
#include <stdlib.h>
#include <string.h>
#define BUFSZ 256
int
foo(int argc)
{
int foo[BUFSZ];
int bar[BUFSZ];
if (argc + 1 > BUFSZ)
return 0;
// So: when fed '8' as the loop size (argc), we step in and out of the loop
// below three times, but only on 'bar[j] += argc' once. It's a pain... | 24.203704 | 79 | 0.597552 | TomWeaver18 |
17bb7db724d9c1bec4b55d84ad1f4dc1b2567758 | 4,080 | cpp | C++ | servers/window_server/src/ServerDecoder.cpp | somerandomdev49/oneOS | e37bc4b5c7ec2573bd9022ecaa2c12a58a46869f | [
"BSD-2-Clause"
] | null | null | null | servers/window_server/src/ServerDecoder.cpp | somerandomdev49/oneOS | e37bc4b5c7ec2573bd9022ecaa2c12a58a46869f | [
"BSD-2-Clause"
] | null | null | null | servers/window_server/src/ServerDecoder.cpp | somerandomdev49/oneOS | e37bc4b5c7ec2573bd9022ecaa2c12a58a46869f | [
"BSD-2-Clause"
] | null | null | null | /*
* Copyright (C) 2020-2021 Nikita Melekhin. All rights reserved.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "ServerDecoder.h"
#ifdef TARGET_DESKTOP
#include "Desktop/Window.h"
#elif TARGET_MOBILE
#include "Mobile/Window.h"
#endif
#include ... | 30 | 87 | 0.683333 | somerandomdev49 |
17bb8daa5c27a9921840b8670a5dfae7fce46c71 | 4,433 | cpp | C++ | Tools/NounPlanetPort/Port.cpp | SnipeDragon/darkspace | b6a1fa0a29d3559b158156e7b96935bd0a832ee3 | [
"MIT"
] | 1 | 2016-05-22T21:28:29.000Z | 2016-05-22T21:28:29.000Z | Tools/NounPlanetPort/Port.cpp | SnipeDragon/darkspace | b6a1fa0a29d3559b158156e7b96935bd0a832ee3 | [
"MIT"
] | null | null | null | Tools/NounPlanetPort/Port.cpp | SnipeDragon/darkspace | b6a1fa0a29d3559b158156e7b96935bd0a832ee3 | [
"MIT"
] | null | null | null | /*
Port.cpp
(c)1998 Palestar, Richard Lyle
*/
#define NOUNPLANETPORT_DLL
#include "stdafx.h"
#include "Port.h"
#include "PortView.h"
#include "Tools/ScenePort/ChildFrame.h"
#include "DarkSpace/GameContext.h"
//----------------------------------------------------------------------------
IMPLEMENT_FACTORY( NounPla... | 27.364198 | 81 | 0.65238 | SnipeDragon |
17bba61a092b3f1557d6a2f205aa5020ee40714d | 12,437 | cpp | C++ | PhotonChat/LoadBalancing-cpp/src/MutableRoom.cpp | anhtrangg/PhotonChat | 4bd5788fe4ec89dab83ae01d7f372b6e9bd5ebc9 | [
"MIT"
] | null | null | null | PhotonChat/LoadBalancing-cpp/src/MutableRoom.cpp | anhtrangg/PhotonChat | 4bd5788fe4ec89dab83ae01d7f372b6e9bd5ebc9 | [
"MIT"
] | null | null | null | PhotonChat/LoadBalancing-cpp/src/MutableRoom.cpp | anhtrangg/PhotonChat | 4bd5788fe4ec89dab83ae01d7f372b6e9bd5ebc9 | [
"MIT"
] | null | null | null | /* Exit Games Photon LoadBalancing - C++ Client Lib
* Copyright (C) 2004-2020 by Exit Games GmbH. All rights reserved.
* http://www.photonengine.com
* mailto:developer@photonengine.com
*/
#include "LoadBalancing-cpp/inc/Client.h"
#include "LoadBalancing-cpp/inc/MutableRoom.h"
#include "LoadBalancing-cpp/in... | 33.254011 | 289 | 0.713516 | anhtrangg |
17c138096fdc3b9bc2d79cd4accdf79cb2e5d15f | 3,711 | cpp | C++ | ZooidEngine/ResourceManagers/ResourceManager.cpp | azon04/Z0-Engine | 1a44781fb5308c11c3b63b954ad683a51e9ba271 | [
"MIT"
] | 4 | 2019-05-31T22:55:49.000Z | 2020-11-26T11:55:34.000Z | ZooidEngine/ResourceManagers/ResourceManager.cpp | azon04/Z0-Engine | 1a44781fb5308c11c3b63b954ad683a51e9ba271 | [
"MIT"
] | null | null | null | ZooidEngine/ResourceManagers/ResourceManager.cpp | azon04/Z0-Engine | 1a44781fb5308c11c3b63b954ad683a51e9ba271 | [
"MIT"
] | 1 | 2018-04-11T02:50:47.000Z | 2018-04-11T02:50:47.000Z | #include "ResourceManager.h"
#include "Events/Events.h"
namespace ZE
{
IMPLEMENT_CLASS_0(ResourceManager)
Handle ResourceManager::loadResource(const char* resourceFilePath, ResourceCreateSettings* settings)
{
if (m_resourceMap.hasKey(resourceFilePath))
{
Resource& resource = m_resourceMap[resourceFilePath... | 25.244898 | 101 | 0.708434 | azon04 |
17c490a05ab24c35c9365857f5e9e223b6b7a880 | 6,108 | cpp | C++ | Drawer.cpp | dm1sh/wxMahjong | a2cf3d1c30f836d543901afebf956aea57df8e60 | [
"MIT"
] | null | null | null | Drawer.cpp | dm1sh/wxMahjong | a2cf3d1c30f836d543901afebf956aea57df8e60 | [
"MIT"
] | null | null | null | Drawer.cpp | dm1sh/wxMahjong | a2cf3d1c30f836d543901afebf956aea57df8e60 | [
"MIT"
] | null | null | null | #include "Drawer.h"
static const char* tileImageNames[TILE_IMAGES_N] = {
// clang-format off
"Pin1", "Pin2", "Pin3", "Pin4", "Pin5", "Pin6", "Pin7", "Pin8", "Pin9",
"Sou1", "Sou2", "Sou3", "Sou4", "Sou5", "Sou6", "Sou7", "Sou8", "Sou9",
"Man1", "Man2", ... | 32.663102 | 98 | 0.566143 | dm1sh |
17ca8e30a554c4ce0001fa027ee063f1bee88664 | 3,353 | cpp | C++ | Reme/Renderer/Image.cpp | RemeEngine/Reme | b35357130174e92e4cc36ad4a8f52f9298964287 | [
"MIT"
] | null | null | null | Reme/Renderer/Image.cpp | RemeEngine/Reme | b35357130174e92e4cc36ad4a8f52f9298964287 | [
"MIT"
] | null | null | null | Reme/Renderer/Image.cpp | RemeEngine/Reme | b35357130174e92e4cc36ad4a8f52f9298964287 | [
"MIT"
] | null | null | null | #include <Reme/Renderer/Image.h>
#include <stb/stb_image.h>
#include <stdlib.h>
namespace Reme {
Image::Image(u32 width, u32 height)
: m_width(width)
, m_height(height)
{
m_pixels = new Color[m_width * m_height];
}
Image::Image(const std::string& path)
{
int width, height, channels;
stbi_uc* data... | 28.415254 | 111 | 0.537131 | RemeEngine |
17ca9ec9ee3f92619d1989722761e51e58a1980d | 3,951 | hpp | C++ | src/age_emulator_gb/lcd/palettes/age_gb_lcd_palettes.hpp | c-sp/AGE | 054bc4c7c0fe703439b73575d56a23eb3700d695 | [
"Apache-2.0"
] | 2 | 2022-02-12T12:51:14.000Z | 2022-02-13T19:14:36.000Z | src/age_emulator_gb/lcd/palettes/age_gb_lcd_palettes.hpp | c-sp/AGE | 054bc4c7c0fe703439b73575d56a23eb3700d695 | [
"Apache-2.0"
] | 4 | 2021-05-19T18:11:22.000Z | 2021-09-27T18:17:26.000Z | src/age_emulator_gb/lcd/palettes/age_gb_lcd_palettes.hpp | c-sp/AGE | 054bc4c7c0fe703439b73575d56a23eb3700d695 | [
"Apache-2.0"
] | null | null | null | //
// Copyright 2021 Christoph Sprenger
//
// 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 agr... | 32.652893 | 113 | 0.649962 | c-sp |
17cad2b8b1060061e60057ffa1d593bc24ce8eef | 939 | cpp | C++ | test/rustify_enum/bind/c-renum.cpp | tiago-lqt/cppmm | 812c3678d10e998022458ec8d825e429afc6ffd0 | [
"OLDAP-2.5",
"OLDAP-2.3"
] | null | null | null | test/rustify_enum/bind/c-renum.cpp | tiago-lqt/cppmm | 812c3678d10e998022458ec8d825e429afc6ffd0 | [
"OLDAP-2.5",
"OLDAP-2.3"
] | null | null | null | test/rustify_enum/bind/c-renum.cpp | tiago-lqt/cppmm | 812c3678d10e998022458ec8d825e429afc6ffd0 | [
"OLDAP-2.5",
"OLDAP-2.3"
] | null | null | null | #include <renum.hpp>
#include <cppmm_bind.hpp>
namespace cppmm_bind {
namespace rustify {
enum Compression {
NO_COMPRESSION = 0,
RLE_COMPRESSION = 1,
ZIPS_COMPRESSION = 2,
ZIP_COMPRESSION = 3,
PIZ_COMPRESSION = 4,
PXR24_COMPRESSION = 5,
B44_COMPRESSION = 6,
B44A_COMPRESSION = 7,
... | 18.411765 | 53 | 0.680511 | tiago-lqt |
17d2790ec58053f6baac4a8f86ebc4c6b5a37859 | 4,341 | hh | C++ | hackt_docker/hackt/src/Object/expr/pint_expr.hh | broken-wheel/hacktist | 36e832ae7dd38b27bca9be7d0889d06054dc2806 | [
"MIT"
] | null | null | null | hackt_docker/hackt/src/Object/expr/pint_expr.hh | broken-wheel/hacktist | 36e832ae7dd38b27bca9be7d0889d06054dc2806 | [
"MIT"
] | null | null | null | hackt_docker/hackt/src/Object/expr/pint_expr.hh | broken-wheel/hacktist | 36e832ae7dd38b27bca9be7d0889d06054dc2806 | [
"MIT"
] | null | null | null | /**
\file "Object/expr/pint_expr.hh"
Base class related to lists of meta expressions.
NOTE: this file originally came from "Object/art_object_expr_base.h"
for the sake of revision history tracking.
$Id: pint_expr.hh,v 1.19 2011/01/14 01:32:57 fang Exp $
*/
#ifndef __HAC_OBJECT_EXPR_PINT_EXPR_H__
#define __HAC... | 27.649682 | 79 | 0.754434 | broken-wheel |
17d37bb660dd6199f16e110a9b06b06070f6e2c2 | 1,601 | cpp | C++ | Reorganize String.cpp | dishanilahiri/LeetCode-Premium | 1882606edac81586edea264d94b215acdac4f8b6 | [
"MIT"
] | null | null | null | Reorganize String.cpp | dishanilahiri/LeetCode-Premium | 1882606edac81586edea264d94b215acdac4f8b6 | [
"MIT"
] | null | null | null | Reorganize String.cpp | dishanilahiri/LeetCode-Premium | 1882606edac81586edea264d94b215acdac4f8b6 | [
"MIT"
] | 1 | 2021-06-06T09:46:13.000Z | 2021-06-06T09:46:13.000Z | Question->
Given a string s, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same.
If possible, output any possible result. If not possible, return the empty string.
Example 1:
Input: s = "aab"
Output: "aba"
Example 2:
Input: s = "aaab"
Output: ""
Note:
s ... | 21.065789 | 129 | 0.428482 | dishanilahiri |
17e0e54c87334abfaf0cafa98f70c0d5e7174f8e | 3,292 | cpp | C++ | Dwarfs/30_DNN/backprop_simple.cpp | egaburov/codevault | 1cad07aba42628a014bd91ad07d66f105614309c | [
"Apache-2.0"
] | null | null | null | Dwarfs/30_DNN/backprop_simple.cpp | egaburov/codevault | 1cad07aba42628a014bd91ad07d66f105614309c | [
"Apache-2.0"
] | null | null | null | Dwarfs/30_DNN/backprop_simple.cpp | egaburov/codevault | 1cad07aba42628a014bd91ad07d66f105614309c | [
"Apache-2.0"
] | null | null | null | #include <iostream>
#include <memory>
#include <cmath>
#include "parse_arguments.h"
using namespace std;
struct Unit
{
using value_type = double;
value_type value_{0}, grad_{0};
Unit(value_type value, value_type grad) : value_(value), grad_(grad) {}
};
static auto make_unit(Unit::value_type value, Unit::value... | 21.657895 | 78 | 0.595687 | egaburov |
17e2cf975edb16c7f8c3bde20030c5dbd7f94a78 | 490 | hpp | C++ | src/include/direction.hpp | tankorsmash/fast-wfc | 0f424f46e449182dadd3dad99215ab50977ca1f5 | [
"MIT"
] | null | null | null | src/include/direction.hpp | tankorsmash/fast-wfc | 0f424f46e449182dadd3dad99215ab50977ca1f5 | [
"MIT"
] | null | null | null | src/include/direction.hpp | tankorsmash/fast-wfc | 0f424f46e449182dadd3dad99215ab50977ca1f5 | [
"MIT"
] | null | null | null | #ifndef FAST_WFC_DIRECTION_HPP_
#define FAST_WFC_DIRECTION_HPP_
/**
* A direction is represented by an unsigned integer in the range [0; 3].
* The x and y values of the direction can be retrieved in these tables.
*/
static int directions_x[4] = {0, -1, 1, 0};
static int directions_y[4] = {-1, 0, 0, 1};
/**
* Re... | 25.789474 | 73 | 0.720408 | tankorsmash |
17e4e450f89cede403838a3a1d41eb022dd85293 | 5,656 | cpp | C++ | main.cpp | embeddedmz/QwtWaterfallplot | 58403c2c294188c4de4ff35da66d2a6407907d6a | [
"MIT"
] | 6 | 2020-02-14T15:05:53.000Z | 2021-09-18T01:05:28.000Z | main.cpp | embeddedmz/QwtWaterfallplot | 58403c2c294188c4de4ff35da66d2a6407907d6a | [
"MIT"
] | null | null | null | main.cpp | embeddedmz/QwtWaterfallplot | 58403c2c294188c4de4ff35da66d2a6407907d6a | [
"MIT"
] | 3 | 2020-02-14T15:06:07.000Z | 2020-11-15T02:42:27.000Z | #include <algorithm>
#include <cassert>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <qapplication.h>
#include <qmainwindow.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>
#include <qcombobox.h>
#include <qslider.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <QThread>
#include <QVBoxLayout... | 28 | 103 | 0.660361 | embeddedmz |
17e89f3f64451b60ee2715299330e6d2bd1513ee | 2,321 | cpp | C++ | src/address_validator/writer.cpp | MaxFork/ombre | b3d59a3f727d3b39a4e338e0ba5756a22f4c0b88 | [
"BSD-3-Clause"
] | 1 | 2019-04-13T18:26:28.000Z | 2019-04-13T18:26:28.000Z | src/address_validator/writer.cpp | MaxFork/ombre | b3d59a3f727d3b39a4e338e0ba5756a22f4c0b88 | [
"BSD-3-Clause"
] | null | null | null | src/address_validator/writer.cpp | MaxFork/ombre | b3d59a3f727d3b39a4e338e0ba5756a22f4c0b88 | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) 2018, Ombre Cryptocurrency Project
// Copyright (c) 2018, Ryo Currency Project
// Portions copyright (c) 2014-2018, The Monero Project
//
// Portions of this file are available under BSD-3 license. Please see ORIGINAL-LICENSE for details
// All rights reserved.
//
// Ombre changes to this code are in p... | 35.707692 | 102 | 0.640672 | MaxFork |
17ec747490e6841913b0cfcf8089112f43ed7152 | 5,057 | cpp | C++ | Cpp/odin/app.cpp | alexgalkin/odin | fa4d86de1a2479b57d994a9b5241bcf4206637f6 | [
"BSL-1.0"
] | 2 | 2019-10-01T08:11:05.000Z | 2019-10-01T08:11:12.000Z | Cpp/odin/app.cpp | alexgalkin/odin | fa4d86de1a2479b57d994a9b5241bcf4206637f6 | [
"BSL-1.0"
] | 25 | 2017-10-09T20:02:16.000Z | 2019-08-20T07:50:04.000Z | Cpp/odin/app.cpp | alexgalkin/odin | fa4d86de1a2479b57d994a9b5241bcf4206637f6 | [
"BSL-1.0"
] | 4 | 2017-06-14T14:21:10.000Z | 2019-05-07T10:46:02.000Z | /**
Copyright 2016-2019 Red Anchor Trading Co. Ltd.
Distributed under the Boost Software License, Version 1.0.
See <http://www.boost.org/LICENSE_1_0.txt>
*/
#include <fostgres/sql.hpp>
#include <odin/app.hpp>
#include <odin/odin.hpp>
#include <fost/insert>
#include <fost/log>
#include <fostgres/sql.hpp... | 34.875862 | 78 | 0.620328 | alexgalkin |
17ef138cc8eb04ca56d9ce35126ac8fbd3249a02 | 2,481 | cpp | C++ | libraries/atermpp/test/aterm_balanced_tree_test.cpp | nouwaarom/mCRL2 | cd77f9ab46c9568aa655a49d4d49c08d1768e870 | [
"BSL-1.0"
] | null | null | null | libraries/atermpp/test/aterm_balanced_tree_test.cpp | nouwaarom/mCRL2 | cd77f9ab46c9568aa655a49d4d49c08d1768e870 | [
"BSL-1.0"
] | null | null | null | libraries/atermpp/test/aterm_balanced_tree_test.cpp | nouwaarom/mCRL2 | cd77f9ab46c9568aa655a49d4d49c08d1768e870 | [
"BSL-1.0"
] | null | null | null | // Author(s): Wieger Wesselink
// Copyright: see the accompanying file COPYING or copy at
// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
//
// 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)
//
/// \file a... | 23.628571 | 66 | 0.678759 | nouwaarom |
17efb7da113b23c7f6e5b9789f235d808ef6d211 | 399 | cpp | C++ | spoj/COMDIV.cpp | larc/competitive_programming | deccd7152a14adf217c58546d1cf8ac6b45f1c52 | [
"MIT"
] | 1 | 2019-05-23T19:05:39.000Z | 2019-05-23T19:05:39.000Z | spoj/COMDIV.cpp | larc/oremor | deccd7152a14adf217c58546d1cf8ac6b45f1c52 | [
"MIT"
] | null | null | null | spoj/COMDIV.cpp | larc/oremor | deccd7152a14adf217c58546d1cf8ac6b45f1c52 | [
"MIT"
] | null | null | null | #include <cstdio>
int gcd(const int & a, const int & b)
{
return !b ? a : gcd(b, a % b);
}
int count_divisors(const int & x)
{
if(x == 1) return 1;
int i, r = 2;
for(i = 2; i * i < x; ++i)
if(!(x % i)) r += 2;
return r + (i * i == x);
}
int main()
{
int n, a, b;
scanf("%d", &n);
while(n--)
{
scanf("%... | 12.090909 | 44 | 0.471178 | larc |
17f2b90dad4127e5ebc62d6aa4ec06d15ac6603f | 7,456 | cc | C++ | src/runtime/venomobject.cc | stephentu/venom-lang | 3bfec2071df0cabebcfa5e5df73b95daeded76c9 | [
"BSD-3-Clause"
] | 1 | 2018-04-10T14:18:31.000Z | 2018-04-10T14:18:31.000Z | src/runtime/venomobject.cc | stephentu/venom-lang | 3bfec2071df0cabebcfa5e5df73b95daeded76c9 | [
"BSD-3-Clause"
] | null | null | null | src/runtime/venomobject.cc | stephentu/venom-lang | 3bfec2071df0cabebcfa5e5df73b95daeded76c9 | [
"BSD-3-Clause"
] | null | null | null | /**
* Copyright (c) 2012 Stephen Tu
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions ... | 31.196653 | 83 | 0.715263 | stephentu |
17f6471cb8d1f6c7d1e58b6b378fb218bc7c4f4d | 10,690 | hpp | C++ | openstudiocore/src/model/FanVariableVolume_Impl.hpp | hongyuanjia/OpenStudio | 6cc52f1b66c069cf13f2b6ca2a0cc3c137c37cf0 | [
"MIT"
] | 1 | 2019-04-21T15:38:54.000Z | 2019-04-21T15:38:54.000Z | openstudiocore/src/model/FanVariableVolume_Impl.hpp | hongyuanjia/OpenStudio | 6cc52f1b66c069cf13f2b6ca2a0cc3c137c37cf0 | [
"MIT"
] | null | null | null | openstudiocore/src/model/FanVariableVolume_Impl.hpp | hongyuanjia/OpenStudio | 6cc52f1b66c069cf13f2b6ca2a0cc3c137c37cf0 | [
"MIT"
] | 1 | 2019-07-18T06:52:29.000Z | 2019-07-18T06:52:29.000Z | /***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2018, Alliance for Sustainable Energy, LLC. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are perm... | 30.369318 | 120 | 0.752666 | hongyuanjia |
17fdb82a6e065d0d01f3ec2a7ff3d0b8a010acf0 | 392 | cpp | C++ | 0225proj/CommonClass.cpp | Bidoumyouou/-Quick | 98d58f4c66e7490c243b742d040a7e9c31d0696b | [
"Unlicense"
] | null | null | null | 0225proj/CommonClass.cpp | Bidoumyouou/-Quick | 98d58f4c66e7490c243b742d040a7e9c31d0696b | [
"Unlicense"
] | 1 | 2016-12-05T16:28:02.000Z | 2016-12-05T16:29:58.000Z | 0225proj/CommonClass.cpp | Bidoumyouou/-Quick | 98d58f4c66e7490c243b742d040a7e9c31d0696b | [
"Unlicense"
] | null | null | null | //#include"DxLib.h"
#include"CommonClass.h"
void MyDrawRotaGraph(Vector2 v, int GrHandle, int TransFlag , int TurnFlag , double ExRate , double Angle ) {
DrawRotaGraph(v.x, v.y, ExRate, Angle, GrHandle, TransFlag, TurnFlag);
}
bool practiceflag = 0;
unsigned int White = GetColor(255,255,255);
void DebugString(Vector... | 28 | 109 | 0.734694 | Bidoumyouou |
aa0176f34cf68d956626f2ee04388c4a8df04579 | 2,772 | cpp | C++ | qt-mvvm/source/libmvvm_viewmodel/mvvm/editors/combopropertyeditor.cpp | seaCheng/animation- | 89a0cb0efbcfea202965a5851979ae6f1b67f8f0 | [
"BSD-3-Clause"
] | 6 | 2021-12-08T03:09:47.000Z | 2022-02-24T03:51:14.000Z | qt-mvvm/source/libmvvm_viewmodel/mvvm/editors/combopropertyeditor.cpp | seaCheng/animation- | 89a0cb0efbcfea202965a5851979ae6f1b67f8f0 | [
"BSD-3-Clause"
] | null | null | null | qt-mvvm/source/libmvvm_viewmodel/mvvm/editors/combopropertyeditor.cpp | seaCheng/animation- | 89a0cb0efbcfea202965a5851979ae6f1b67f8f0 | [
"BSD-3-Clause"
] | null | null | null | // ************************************************************************** //
//
// Model-view-view-model framework for large GUI applications
//
//! @license GNU General Public License v3 or higher (see COPYING)
//! @authors see AUTHORS
//
// ********************************************************************... | 25.906542 | 100 | 0.666306 | seaCheng |
aa092ea022b769d9d7ab911fdb9f0d0ad2ac78e1 | 1,317 | hpp | C++ | third_party/boost/simd/function/compare_greater_equal.hpp | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | 5 | 2018-02-20T11:21:12.000Z | 2019-11-12T13:45:09.000Z | third_party/boost/simd/function/compare_greater_equal.hpp | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | null | null | null | third_party/boost/simd/function/compare_greater_equal.hpp | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | 2 | 2017-12-12T12:29:52.000Z | 2019-04-08T15:55:25.000Z | //==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//===========================... | 26.34 | 100 | 0.627183 | xmar |
aa0eb9ef5cd66d28d3cfd26f3a2854ab689f2905 | 703 | cpp | C++ | HC_SR04/examples/display_distance.cpp | jwolf02/libdriver | e83992ab3e83e2d58f59b021926f6e947ac20897 | [
"MIT"
] | null | null | null | HC_SR04/examples/display_distance.cpp | jwolf02/libdriver | e83992ab3e83e2d58f59b021926f6e947ac20897 | [
"MIT"
] | null | null | null | HC_SR04/examples/display_distance.cpp | jwolf02/libdriver | e83992ab3e83e2d58f59b021926f6e947ac20897 | [
"MIT"
] | null | null | null | #include <iostream>
#include <HC_SR04.hpp>
#include <csignal>
#include <common.hpp>
volatile bool flag = false;
void signal_handler(int signum) {
if (signum == SIGINT) {
flag = true;
}
}
int main(int argc, const char *argv[]) {
if (argc < 3) {
std::cout << "Usage: " << argv[0] << " <trigg... | 21.96875 | 86 | 0.556188 | jwolf02 |
aa169a38e7103956ea36999dc6a947239ce29a4e | 3,471 | cpp | C++ | src/libqgit2/private/remotecallbacks.cpp | lingnand/Helium | d1f8fab6eb5d60e35b3287f6ea35cd1fae71f816 | [
"BSD-3-Clause"
] | 8 | 2021-04-16T02:05:54.000Z | 2022-03-16T13:56:23.000Z | src/libqgit2/private/remotecallbacks.cpp | lingnand/Helium | d1f8fab6eb5d60e35b3287f6ea35cd1fae71f816 | [
"BSD-3-Clause"
] | null | null | null | src/libqgit2/private/remotecallbacks.cpp | lingnand/Helium | d1f8fab6eb5d60e35b3287f6ea35cd1fae71f816 | [
"BSD-3-Clause"
] | 2 | 2021-04-17T10:49:58.000Z | 2021-07-21T20:39:52.000Z | /******************************************************************************
* This file is part of the libqgit2 library
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
... | 30.716814 | 149 | 0.694901 | lingnand |
aa19ce62e75bac4a92de59cc3e6f13a338e611da | 2,134 | cpp | C++ | Isolate_Engine_Reborn/Source/R_Model.cpp | FranGV98/Isolate_Engine_Reborn | 9d435205954db237929417242b391f3bbcc76e50 | [
"MIT"
] | null | null | null | Isolate_Engine_Reborn/Source/R_Model.cpp | FranGV98/Isolate_Engine_Reborn | 9d435205954db237929417242b391f3bbcc76e50 | [
"MIT"
] | null | null | null | Isolate_Engine_Reborn/Source/R_Model.cpp | FranGV98/Isolate_Engine_Reborn | 9d435205954db237929417242b391f3bbcc76e50 | [
"MIT"
] | null | null | null | #include "Assimp.h"
#include "R_Mesh.h"
#include "I_Meshes.h"
#include "Application.h"
#include "M_Renderer3D.h"
#include "R_Model.h"
R_Model::R_Model(std::string full_path, vec4 colour) : Resource(RESOURCE_TYPE::NONE), full_path(full_path), colour(colour)
{
}
R_Model::~R_Model()
{
}
void R_Model::Draw()
{
for... | 19.4 | 122 | 0.637301 | FranGV98 |
aa1bdafd13bc66ca1a2564e8a0be70ffa165466b | 32,636 | cpp | C++ | hi_dsp_library/snex_basics/snex_ExternalData.cpp | Matt-Dub/HISE | ae2dd1653e1c8d749a9088edcd573de6252b0b96 | [
"Intel"
] | null | null | null | hi_dsp_library/snex_basics/snex_ExternalData.cpp | Matt-Dub/HISE | ae2dd1653e1c8d749a9088edcd573de6252b0b96 | [
"Intel"
] | null | null | null | hi_dsp_library/snex_basics/snex_ExternalData.cpp | Matt-Dub/HISE | ae2dd1653e1c8d749a9088edcd573de6252b0b96 | [
"Intel"
] | null | null | null | /* ===========================================================================
*
* This file is part of HISE.
* Copyright 2016 Christoph Hart
*
* HISE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation,... | 67.152263 | 300 | 0.699902 | Matt-Dub |
aa251b44a5861e6f3740e21e406df74cfc1d761e | 25,908 | cpp | C++ | LA_MsgHandler.cpp | Aeronavics/dronekit-la | 6b9b48aec5dcc610ad87631514aad12b67b753a9 | [
"Apache-2.0"
] | 33 | 2016-02-08T19:54:14.000Z | 2022-03-22T22:25:38.000Z | LA_MsgHandler.cpp | hnjm/dronekit-la | 68c11b61e049e72ca8217cf9f9b94fab93c12eab | [
"Apache-2.0"
] | 48 | 2016-01-27T06:22:42.000Z | 2022-03-29T21:54:14.000Z | LA_MsgHandler.cpp | hnjm/dronekit-la | 68c11b61e049e72ca8217cf9f9b94fab93c12eab | [
"Apache-2.0"
] | 32 | 2016-01-27T17:24:32.000Z | 2022-03-15T00:54:49.000Z | #include "LA_MsgHandler.h"
#define __STDC_FORMAT_MACROS 1 // for e.g. %PRIu64
#include "inttypes.h"
#include "la-log.h"
bool LA_MsgHandler::find_T(const uint8_t *msg, uint64_t &T)
{
uint32_t time_ms;
if (field_value(msg, "TimeUS", T)) {
} else if (field_value(msg, "TimeMS", time_ms)) {
// this is... | 38.044053 | 175 | 0.64648 | Aeronavics |
a8f979a446043e0e64cf15734ea4f9701b2cecb2 | 4,598 | cpp | C++ | lib/Init.cpp | lsbharadwaj/PothosCore | 02b3491ed06f23924a4c749f35b7fade88b81a14 | [
"BSL-1.0"
] | 180 | 2017-09-11T00:44:36.000Z | 2022-03-25T09:23:47.000Z | lib/Init.cpp | lsbharadwaj/PothosCore | 02b3491ed06f23924a4c749f35b7fade88b81a14 | [
"BSL-1.0"
] | 109 | 2015-01-19T07:33:38.000Z | 2017-08-12T00:29:13.000Z | lib/Init.cpp | lsbharadwaj/PothosCore | 02b3491ed06f23924a4c749f35b7fade88b81a14 | [
"BSL-1.0"
] | 32 | 2017-09-20T10:47:29.000Z | 2022-03-24T06:13:03.000Z | // Copyright (c) 2013-2017 Josh Blum
// SPDX-License-Identifier: BSL-1.0
#include <Pothos/Init.hpp>
#include <Pothos/Exception.hpp>
#include <Pothos/System/Paths.hpp>
#include <Pothos/Plugin.hpp>
#include <Poco/Path.h>
#include <Poco/File.h>
#include <Poco/Format.h>
//from lib/Framework/ConfLoader.cpp
std::vector<Pot... | 31.493151 | 92 | 0.630709 | lsbharadwaj |
a8fa0617ff4586e457c36eb46117bbcb0b3f382f | 1,990 | cpp | C++ | C-Plus-Plus/Data Structure/BinaryTree.cpp | 19-1-skku-oss/2019-1-OSS-L2 | 40cef694a9442b983da080d23913f34641b2fa4d | [
"MIT"
] | null | null | null | C-Plus-Plus/Data Structure/BinaryTree.cpp | 19-1-skku-oss/2019-1-OSS-L2 | 40cef694a9442b983da080d23913f34641b2fa4d | [
"MIT"
] | 25 | 2019-05-28T09:49:06.000Z | 2019-06-07T14:27:53.000Z | C-Plus-Plus/Data Structure/BinaryTree.cpp | 19-1-skku-oss/2019-1-OSS-L2 | 40cef694a9442b983da080d23913f34641b2fa4d | [
"MIT"
] | 1 | 2019-12-08T11:00:31.000Z | 2019-12-08T11:00:31.000Z | #include <iostream>
#define null 0
using namespace std;
template <typename T>
class Tree;
template <typename T>
class TreeNode {
friend class Tree<T>;
private:
T data;
TreeNode* left;
TreeNode* right;
public:
TreeNode(T data = 0, TreeNode* left = null, TreeNode* right = null) {
this->data = data... | 20.947368 | 150 | 0.537186 | 19-1-skku-oss |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.