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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
35780e67403f1502578682eb387b94c80863e5cd | 3,850 | cpp | C++ | src/libs/opengl/src/gl_buffers.cpp | zZnghialamZz/Ethan | e841b0a07f75022fab6634d53827c64dd1a466de | [
"Apache-2.0"
] | 2 | 2020-07-29T04:27:22.000Z | 2021-10-11T01:27:43.000Z | src/libs/opengl/src/gl_buffers.cpp | zZnghialamZz/Ethan | e841b0a07f75022fab6634d53827c64dd1a466de | [
"Apache-2.0"
] | null | null | null | src/libs/opengl/src/gl_buffers.cpp | zZnghialamZz/Ethan | e841b0a07f75022fab6634d53827c64dd1a466de | [
"Apache-2.0"
] | 2 | 2020-08-03T03:29:28.000Z | 2020-08-03T08:01:14.000Z | /**
* ==================================================
* _____
* __|___ |__ __ __ _ ____ ____ _
* | ___| | _| |_ | |_| || \ | \ | |
* | ___| ||_ _|| _ || \ | \| |
* |______| __| |__| |__| |_||__|\__\|__/\____|
* |_____|
*
* Ga... | 32.627119 | 101 | 0.670909 | zZnghialamZz |
357aacf63c7d9f507c2fc9dfb197f5d474f336a4 | 351 | cpp | C++ | CppPrimer/CppPrimer-Exercises/CppPrimer-Ch05/Exercise5.22.cpp | alaxion/Learning | 4b12b1603419252103cd933fdbfc4b2faffb6d00 | [
"MIT"
] | null | null | null | CppPrimer/CppPrimer-Exercises/CppPrimer-Ch05/Exercise5.22.cpp | alaxion/Learning | 4b12b1603419252103cd933fdbfc4b2faffb6d00 | [
"MIT"
] | null | null | null | CppPrimer/CppPrimer-Exercises/CppPrimer-Ch05/Exercise5.22.cpp | alaxion/Learning | 4b12b1603419252103cd933fdbfc4b2faffb6d00 | [
"MIT"
] | null | null | null | // Exercise5.22.cpp
// Ad
// Rewrite the last example in this section using a loop.
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
int get_size();
int main()
{
int sz = get_size();
while (sz <= 0)
{
sz = get_size();
}
// pause
cin.get();
return 0;
}
in... | 12.535714 | 58 | 0.555556 | alaxion |
357f2fc5c895bbe88e01755584290087338ea20c | 3,816 | cpp | C++ | src/armed/FilePickerDialog.cpp | retrowork/wme | 54cf8905091736aef0a35fe6d3e05b818441f3c8 | [
"MIT"
] | null | null | null | src/armed/FilePickerDialog.cpp | retrowork/wme | 54cf8905091736aef0a35fe6d3e05b818441f3c8 | [
"MIT"
] | null | null | null | src/armed/FilePickerDialog.cpp | retrowork/wme | 54cf8905091736aef0a35fe6d3e05b818441f3c8 | [
"MIT"
] | null | null | null | // This file is part of Wintermute Engine
// For conditions of distribution and use, see copyright notice in license.txt
#include "StdAfx.h"
#include "FilePickerDialog.h"
#include "QtUtil.h"
#include "Project.h"
#include "QtUtil.h"
namespace Armed
{
///////////////////////////////////////////////////... | 30.774194 | 96 | 0.604036 | retrowork |
3585618ed34f4961ccc77b2e7dd5e0f6ecb06a89 | 885 | cpp | C++ | SPOJ/FENCE1 - Build a Fence.cpp | ravirathee/Competitive-Programming | 20a0bfda9f04ed186e2f475644e44f14f934b533 | [
"Unlicense"
] | 6 | 2018-11-26T02:38:07.000Z | 2021-07-28T00:16:41.000Z | SPOJ/FENCE1 - Build a Fence.cpp | ravirathee/Competitive-Programming | 20a0bfda9f04ed186e2f475644e44f14f934b533 | [
"Unlicense"
] | 1 | 2021-05-30T09:25:53.000Z | 2021-06-05T08:33:56.000Z | SPOJ/FENCE1 - Build a Fence.cpp | ravirathee/Competitive-Programming | 20a0bfda9f04ed186e2f475644e44f14f934b533 | [
"Unlicense"
] | 4 | 2020-04-16T07:15:01.000Z | 2020-12-04T06:26:07.000Z | /*FENCE1 - Build a Fence
#math
There is a wall in your backyard. It is so long that you can’t see its endpoints. You want to build a fence of length L such that the area enclosed between the wall and the fence is maximized. The fence can be of arbitrary shape, but only its two endpoints may touch the wall.
Input
The ... | 23.918919 | 276 | 0.693785 | ravirathee |
358565336bad30a16789c0389cdf37d969dfd7d7 | 478 | hpp | C++ | include/SSVOpenHexagon/Data/PackData.hpp | mehlon/SSVOpenHexagon | a6abf3bcf41b4f6821c53f92a86f9b8c00ecbaad | [
"AFL-3.0"
] | null | null | null | include/SSVOpenHexagon/Data/PackData.hpp | mehlon/SSVOpenHexagon | a6abf3bcf41b4f6821c53f92a86f9b8c00ecbaad | [
"AFL-3.0"
] | null | null | null | include/SSVOpenHexagon/Data/PackData.hpp | mehlon/SSVOpenHexagon | a6abf3bcf41b4f6821c53f92a86f9b8c00ecbaad | [
"AFL-3.0"
] | null | null | null | // Copyright (c) 2013-2015 Vittorio Romeo
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: http://opensource.org/licenses/AFL-3.0
#ifndef HG_PACKDATA
#define HG_PACKDATA
namespace hg
{
struct PackData
{
std::string id, name;
float priority;
PackData(
co... | 20.782609 | 78 | 0.60251 | mehlon |
3586b02ccae01f85d6954123e95c028070b1f195 | 4,407 | cpp | C++ | MyThirthyHomeWork/for.1/for.1.cpp | pashak14/CppHomeWork | 861bf1241800f2c6a0fb782738554d617de89599 | [
"MIT"
] | null | null | null | MyThirthyHomeWork/for.1/for.1.cpp | pashak14/CppHomeWork | 861bf1241800f2c6a0fb782738554d617de89599 | [
"MIT"
] | null | null | null | MyThirthyHomeWork/for.1/for.1.cpp | pashak14/CppHomeWork | 861bf1241800f2c6a0fb782738554d617de89599 | [
"MIT"
] | 1 | 2020-12-14T11:52:04.000Z | 2020-12-14T11:52:04.000Z | #include <iostream>
using namespace std;
void variant1(),
variant2(),
variant3(),
variant4(),
variant5(),
variant6(),
variant7(),
variant8(),
variant9(),
variant10();
int main() {
int numEx;
setlocale(0, "");
while (true) {
cout << "\nВведите вар... | 17.557769 | 81 | 0.256637 | pashak14 |
3587c88b7d11dc508d9a24ec8758b390be867c65 | 20,157 | cc | C++ | src/core/rnn/CustomLayers.cc | arjun-k-r/Sibyl | ae2edbb09f58e8b1cef79470e8ca9c02c244fdcb | [
"Apache-2.0"
] | 34 | 2017-03-01T05:49:17.000Z | 2022-01-01T15:30:06.000Z | src/core/rnn/CustomLayers.cc | arjun-k-r/Sibyl | ae2edbb09f58e8b1cef79470e8ca9c02c244fdcb | [
"Apache-2.0"
] | 1 | 2018-12-19T17:02:52.000Z | 2018-12-19T17:02:52.000Z | src/core/rnn/CustomLayers.cc | junosan/Sibyl | ae2edbb09f58e8b1cef79470e8ca9c02c244fdcb | [
"Apache-2.0"
] | 24 | 2017-09-19T01:51:50.000Z | 2022-02-04T19:53:16.000Z | /*
Copyright 2017 Hosang Yoon
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 49.283619 | 126 | 0.674406 | arjun-k-r |
358c3223168f206b6db3f4686d2072394f2d571e | 648 | cpp | C++ | PAT/B1011.cpp | iphelf/Programming-Practice | 2a95bb7153957b035427046b250bf7ffc6b00906 | [
"WTFPL"
] | null | null | null | PAT/B1011.cpp | iphelf/Programming-Practice | 2a95bb7153957b035427046b250bf7ffc6b00906 | [
"WTFPL"
] | null | null | null | PAT/B1011.cpp | iphelf/Programming-Practice | 2a95bb7153957b035427046b250bf7ffc6b00906 | [
"WTFPL"
] | null | null | null | #include<stdio.h>
using namespace std;
long long A,B,C;
bool check(){
if(A>0 && B>0 && C>0) return A>C-B;
if(A<0 && B<0 && C<0) return A>C-B;
if(A>0 && B>0 && C<0) return true;
if(A<0 && B<0 && C>0) return false;
return A+B>C;
}
int main(void) {
// freopen("in.txt","r",stdin);
int T;
sc... | 16.615385 | 39 | 0.512346 | iphelf |
358d183c0e807d86a5d58dda48fdd53de75f73d3 | 11,928 | cpp | C++ | src/kernel.cpp | Unified-Projects/Unified-OS | 89912adc1ed9ec35753fe0f4fa35f03d30ec66a2 | [
"BSD-2-Clause"
] | null | null | null | src/kernel.cpp | Unified-Projects/Unified-OS | 89912adc1ed9ec35753fe0f4fa35f03d30ec66a2 | [
"BSD-2-Clause"
] | null | null | null | src/kernel.cpp | Unified-Projects/Unified-OS | 89912adc1ed9ec35753fe0f4fa35f03d30ec66a2 | [
"BSD-2-Clause"
] | null | null | null | #include <common/stdint.h>
#include <boot/bootinfo.h>
#include <pointers.h>
#include <IO/APIC/apic.h> //COMMENT
#include <smp/smp.h> //COMMENT
#include <gdt/gdt.h>
#include <gdt/tss.h> //COMMENT
#include <paging/PageTableManager.h>
#include <paging/PageFrameAllocator.h>
#include <memory/memory.h>
#include <memory/... | 31.0625 | 147 | 0.662726 | Unified-Projects |
358dd892ae6a47600fdf23472a3f1d53e967a577 | 2,008 | cpp | C++ | tools/ifaceed/ifaceed/gui/uiblocks/uiwayblock.cpp | mamontov-cpp/saddy | f20a0030e18af9e0714fe56c19407fbeacc529a7 | [
"BSD-2-Clause"
] | 58 | 2015-08-09T14:56:35.000Z | 2022-01-15T22:06:58.000Z | tools/ifaceed/ifaceed/gui/uiblocks/uiwayblock.cpp | mamontov-cpp/saddy-graphics-engine-2d | e25a6637fcc49cb26614bf03b70e5d03a3a436c7 | [
"BSD-2-Clause"
] | 245 | 2015-08-08T08:44:22.000Z | 2022-01-04T09:18:08.000Z | tools/ifaceed/ifaceed/gui/uiblocks/uiwayblock.cpp | mamontov-cpp/saddy | f20a0030e18af9e0714fe56c19407fbeacc529a7 | [
"BSD-2-Clause"
] | 23 | 2015-12-06T03:57:49.000Z | 2020-10-12T14:15:50.000Z | #include <new>
#include <cassert>
#include "uiwayblock.h"
#include <QListWidget>
#include <QLineEdit>
#include <QDoubleSpinBox>
#include <QCheckBox>
#include <QPushButton>
gui::uiblocks::UIWayBlock::UIWayBlock() : lstWays(nullptr),
txtWayName(nullptr),
dsbWayTotalTime(nullptr),
cbWayClosed(nullptr),
btnWayAdd(nullptr)... | 32.387097 | 84 | 0.731076 | mamontov-cpp |
358f0675afa1d80c560a1dec6fb0401f5642c3dc | 3,833 | cpp | C++ | opengl/hello_3d.cpp | xiwan/opengl | 1e30baf40debd00b55252fc14d0e6b909c94bfbd | [
"MIT"
] | 1 | 2019-02-22T03:11:28.000Z | 2019-02-22T03:11:28.000Z | opengl/hello_3d.cpp | xiwan/opengl | 1e30baf40debd00b55252fc14d0e6b909c94bfbd | [
"MIT"
] | null | null | null | opengl/hello_3d.cpp | xiwan/opengl | 1e30baf40debd00b55252fc14d0e6b909c94bfbd | [
"MIT"
] | null | null | null |
#include "./headers/shader.h"
#include "./headers/opengl_common.h"
#define STB_IMAGE_IMPLEMENTATION_2
#include "./headers/stb_image.h"
int hello_3d()
{
GLFWwindow* window = prepareWindow("hello_3d");
if (!window) {
return -1;
}
Shader textureShader("./shaders/3d.shader.vs", "./shaders/3d.shader.fs");
float ... | 32.760684 | 105 | 0.651448 | xiwan |
35969c7d3d5bf587b5c69a49b5535fe6a20368a1 | 4,970 | hpp | C++ | libraries/app/include/scorum/app/detail/advertising_api.hpp | scorum/scorum | 1da00651f2fa14bcf8292da34e1cbee06250ae78 | [
"MIT"
] | 53 | 2017-10-28T22:10:35.000Z | 2022-02-18T02:20:48.000Z | libraries/app/include/scorum/app/detail/advertising_api.hpp | Scorum/Scorum | fb4aa0b0960119b97828865d7a5b4d0409af7876 | [
"MIT"
] | 38 | 2017-11-25T09:06:51.000Z | 2018-10-31T09:17:22.000Z | libraries/app/include/scorum/app/detail/advertising_api.hpp | Scorum/Scorum | fb4aa0b0960119b97828865d7a5b4d0409af7876 | [
"MIT"
] | 27 | 2018-01-08T19:43:35.000Z | 2022-01-14T10:50:42.000Z | #pragma once
#include <scorum/chain/services/advertising_property.hpp>
#include <scorum/chain/services/account.hpp>
#include <scorum/chain/services/budgets.hpp>
#include <scorum/chain/services/dynamic_global_property.hpp>
#include <scorum/app/scorum_api_objects.hpp>
#include <scorum/app/advertising_api.hpp>
#include <... | 34.275862 | 115 | 0.673441 | scorum |
359b6f223ae30af473858429465ad694eddf411e | 6,256 | cpp | C++ | Day1/build/iOS/Preview/src/iOS.QuartzCore.g.cpp | sauvikatinnofied/ExploringFuse | cc272d55c7221d88ba773494f571b6528e5279f8 | [
"Apache-2.0"
] | null | null | null | Day1/build/iOS/Preview/src/iOS.QuartzCore.g.cpp | sauvikatinnofied/ExploringFuse | cc272d55c7221d88ba773494f571b6528e5279f8 | [
"Apache-2.0"
] | null | null | null | Day1/build/iOS/Preview/src/iOS.QuartzCore.g.cpp | sauvikatinnofied/ExploringFuse | cc272d55c7221d88ba773494f571b6528e5279f8 | [
"Apache-2.0"
] | null | null | null | // This file was generated based on '(multiple files)'.
// WARNING: Changes might be lost if you edit this file directly.
#include <iOS.QuartzCore.CATransform3D.h>
#include <Uno.Double.h>
namespace g{
namespace iOS{
namespace QuartzCore{
// ../../../../../../../usr/local/share/uno/Packages/Experimental.iOS/0.24.0/st... | 57.394495 | 538 | 0.646739 | sauvikatinnofied |
359d83a58dc46b4fa80fded4f093ab723cb9d5a4 | 1,516 | cpp | C++ | cplus/Day-Month-Year.cpp | chtld/Programming-and-Algorithm-Course | 669f266fc97db9050013ffbb388517667de33433 | [
"MIT"
] | 2 | 2019-06-10T11:50:06.000Z | 2019-10-14T08:00:41.000Z | cplus/Day-Month-Year.cpp | chtld/Programming-and-Algorithm-Course | 669f266fc97db9050013ffbb388517667de33433 | [
"MIT"
] | null | null | null | cplus/Day-Month-Year.cpp | chtld/Programming-and-Algorithm-Course | 669f266fc97db9050013ffbb388517667de33433 | [
"MIT"
] | null | null | null | #include<iostream>
int days = 0;
int getDayOfWeek();
int getYear();
int getMonth(bool isLeapYear);
int main(){
int year = 0, month = 0, dayOfWeek = 0;
bool isLeapYear = true;
char week[7][10] = {"Saturday", "Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday"};
while ((std::c... | 23.323077 | 71 | 0.511214 | chtld |
359dc15ccb18eb076d57ac1e794a721ab27c673f | 215,144 | cpp | C++ | libraries/wallet/wallet.cpp | LianshuOne/yoyow-core | fba1274b79f85110febd66aab428473ad75148a7 | [
"MIT"
] | 1 | 2019-06-11T09:00:42.000Z | 2019-06-11T09:00:42.000Z | libraries/wallet/wallet.cpp | LianshuOne/yoyow-core | fba1274b79f85110febd66aab428473ad75148a7 | [
"MIT"
] | null | null | null | libraries/wallet/wallet.cpp | LianshuOne/yoyow-core | fba1274b79f85110febd66aab428473ad75148a7 | [
"MIT"
] | null | null | null | /*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the... | 43.577881 | 299 | 0.600835 | LianshuOne |
35a7a08561f25f446421101cf82034e46321f4f9 | 503 | cpp | C++ | src/lpp_client.cpp | logpicker/prototype | 0a25fccc24a8e298dee9bae240fcd73a4e5d185e | [
"MIT"
] | null | null | null | src/lpp_client.cpp | logpicker/prototype | 0a25fccc24a8e298dee9bae240fcd73a4e5d185e | [
"MIT"
] | null | null | null | src/lpp_client.cpp | logpicker/prototype | 0a25fccc24a8e298dee9bae240fcd73a4e5d185e | [
"MIT"
] | null | null | null | #include "logpicker_t.hpp"
#include "types.hpp"
#include "logpicker_t.hpp"
#include "log.hpp"
#include "cert.hpp"
#include "utils.hpp"
int main() {
cert_t cert = read_cert_from_disk("/home/leen/Projects/TU_BS/misc/LogPicker/lpp/data/github/DER/github.com");
hash_t hash = hash_certificate(cert);
std::cout ... | 26.473684 | 113 | 0.658052 | logpicker |
35a8f8a2e57d67bf9ee9fd02b644b79bf7480f8d | 2,006 | cpp | C++ | src/AutoVersionTest.cpp | adamyg/libappupdater | a9dd531499cc87046347d9710574b459e5d541f3 | [
"MIT"
] | 1 | 2021-12-22T07:52:39.000Z | 2021-12-22T07:52:39.000Z | src/AutoVersionTest.cpp | adamyg/libappupdater | a9dd531499cc87046347d9710574b459e5d541f3 | [
"MIT"
] | null | null | null | src/AutoVersionTest.cpp | adamyg/libappupdater | a9dd531499cc87046347d9710574b459e5d541f3 | [
"MIT"
] | null | null | null | //
//
//
#include <gtest/gtest.h>
#include "AutoVersion.h"
TEST(AutoVersionTest, ParsesUpstreamOnly)
{
AutoVersion v("1");
EXPECT_EQ(0, v.Epoch());
EXPECT_STREQ("1", v.Upstream());
EXPECT_STREQ("0", v.Revision());
}
TEST(AutoVersionTest, ParsesEpochs)
{
AutoVersion v("1:2.0.1");
EXPECT_EQ(1, ... | 25.717949 | 68 | 0.631107 | adamyg |
35b4271fe40b17a31882ef7de3665b6288a65975 | 782 | hpp | C++ | src/main/include/Configuration.hpp | Apophis5006/Subsystem-Library | 7537637a166a8f161b95d0cae3152f02c87d61de | [
"MIT"
] | 1 | 2022-02-15T01:03:05.000Z | 2022-02-15T01:03:05.000Z | src/main/include/Configuration.hpp | Apophis5006/Subsystem-Library | 7537637a166a8f161b95d0cae3152f02c87d61de | [
"MIT"
] | null | null | null | src/main/include/Configuration.hpp | Apophis5006/Subsystem-Library | 7537637a166a8f161b95d0cae3152f02c87d61de | [
"MIT"
] | null | null | null | //-------------------Joysticks----------------
#define DRIVE_STICK 0
#define STEER_STICK 1
//-------------------Drivetrain---------------
#define SWERVE_DISTANCE_FRONT 10 //distance between swerve drives from front to back (inches)
#define SWERVE_DISTANCE_SIDE 10 //distance between swerve drives from side to side (inc... | 26.965517 | 93 | 0.713555 | Apophis5006 |
35b549edc2bb88298d2a8d909de8118dade9ba15 | 3,156 | hpp | C++ | src/rolmodl/hpp/Tex.hpp | maximsmol/rolmodl | fb41b7f9f4669eea84ce6f1574cdf1be9b6f072f | [
"MIT"
] | 1 | 2022-02-19T21:34:42.000Z | 2022-02-19T21:34:42.000Z | src/rolmodl/hpp/Tex.hpp | maximsmol/rolmodl | fb41b7f9f4669eea84ce6f1574cdf1be9b6f072f | [
"MIT"
] | null | null | null | src/rolmodl/hpp/Tex.hpp | maximsmol/rolmodl | fb41b7f9f4669eea84ce6f1574cdf1be9b6f072f | [
"MIT"
] | 1 | 2021-12-07T09:33:42.000Z | 2021-12-07T09:33:42.000Z | #pragma once
#include "forwarddecl/Tex.hpp"
#include "forwarddecl/Ren.hpp"
#include "Base.hpp"
#include "PixelFmt.hpp"
#include "Geom.hpp"
namespace rolmodl {
enum class TextureType {
Static, Lock, Ren
};
namespace textureType::unsafe {
constexpr TextureType fromSDLEnum(const int a) noexcept {
if... | 24.276923 | 80 | 0.631179 | maximsmol |
35b8397827a7b1f9700a9f9b2bba950c91fa569c | 906 | cpp | C++ | 10282.cpp | felikjunvianto/kfile-uvaoj-submissions | 5bd8b3b413ca8523abe412b0a0545f766f70ce63 | [
"MIT"
] | null | null | null | 10282.cpp | felikjunvianto/kfile-uvaoj-submissions | 5bd8b3b413ca8523abe412b0a0545f766f70ce63 | [
"MIT"
] | null | null | null | 10282.cpp | felikjunvianto/kfile-uvaoj-submissions | 5bd8b3b413ca8523abe412b0a0545f766f70ce63 | [
"MIT"
] | null | null | null | #include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define pi 2*acos(0.0)
#de... | 18.12 | 85 | 0.610375 | felikjunvianto |
35bfa942cddd463f93d90460ef7b939aae562857 | 1,972 | cpp | C++ | soruce/main.cpp | juyuanmao/pick-ghost | c0e9713d63c1428a93e64dd33497cb97a37758c1 | [
"Unlicense"
] | null | null | null | soruce/main.cpp | juyuanmao/pick-ghost | c0e9713d63c1428a93e64dd33497cb97a37758c1 | [
"Unlicense"
] | null | null | null | soruce/main.cpp | juyuanmao/pick-ghost | c0e9713d63c1428a93e64dd33497cb97a37758c1 | [
"Unlicense"
] | null | null | null | //
// main.cpp
// pick-ghost
//
// Created by Ju Yuanmao on 2017/7/15.
// Copyleft
//
#include <iostream>
#include <fstream>
#include <algorithm>
#include "randi.hpp"
#include "cards.hpp"
#include "player.hpp"
using std::cin;
using std::cout;
using std::endl;
int main(int argc, const char * argv[]) {
std::of... | 21.911111 | 62 | 0.399594 | juyuanmao |
35c17388680166e4bd3c03c481724aa2ec6cba04 | 6,640 | cpp | C++ | src/unused/SceneData.cpp | rampart5555/ark | 1399679feac89a84d3597e377992e90756e27dd0 | [
"Apache-2.0"
] | null | null | null | src/unused/SceneData.cpp | rampart5555/ark | 1399679feac89a84d3597e377992e90756e27dd0 | [
"Apache-2.0"
] | null | null | null | src/unused/SceneData.cpp | rampart5555/ark | 1399679feac89a84d3597e377992e90756e27dd0 | [
"Apache-2.0"
] | null | null | null | #include <stdio.h>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osg/io_utils>
#include <osg/UserDataContainer>
#include <osg/ValueObject>
#include "SceneData.h"
#include "AssetsManager.h"
#include "Logging.h"
static void build_scene_data(const char *osgt_file)
{
char buf[20];
osg::Group *roo... | 31.923077 | 106 | 0.578313 | rampart5555 |
35db1fde2e1f3b753bde44f9c864d80b8bd50157 | 28,340 | cpp | C++ | src/CamMonitor/CamMonitor/LiveTab.cpp | infinicam/infinicam-samples | 47c9c0dd79e1991d17fbcff91f49ab15a69c519a | [
"MIT"
] | null | null | null | src/CamMonitor/CamMonitor/LiveTab.cpp | infinicam/infinicam-samples | 47c9c0dd79e1991d17fbcff91f49ab15a69c519a | [
"MIT"
] | null | null | null | src/CamMonitor/CamMonitor/LiveTab.cpp | infinicam/infinicam-samples | 47c9c0dd79e1991d17fbcff91f49ab15a69c519a | [
"MIT"
] | 1 | 2020-12-23T04:38:56.000Z | 2020-12-23T04:38:56.000Z | #include "stdafx.h"
#include "LiveTab.h"
#include "resource.h"
#include "AppDefine.h"
#include "CamMonitor.h"
#include "cih.h"
#include "ChildView.h"
#include "SelectCameraDialog.h"
#include "SaveLiveDialog.h"
#include "Util.h"
IMPLEMENT_DYNAMIC(CLiveTab, CBaseTab)
CLiveTab::CLiveTab(CWnd* pParent)
: CBaseTab(CLive... | 24.347079 | 123 | 0.749365 | infinicam |
e3028bc70fab84b4590d18f85286390ff3a83e29 | 1,797 | hpp | C++ | include/engine/utils/timing/Profiler.hpp | Ghabriel/CppGameArchitecture | 1212cf1e140ba78d72f2aea2aff56ec8c3e23293 | [
"Apache-2.0"
] | 6 | 2018-08-05T21:45:23.000Z | 2021-10-30T19:48:34.000Z | include/engine/utils/timing/Profiler.hpp | Ghabriel/CppGameArchitecture | 1212cf1e140ba78d72f2aea2aff56ec8c3e23293 | [
"Apache-2.0"
] | null | null | null | include/engine/utils/timing/Profiler.hpp | Ghabriel/CppGameArchitecture | 1212cf1e140ba78d72f2aea2aff56ec8c3e23293 | [
"Apache-2.0"
] | 1 | 2021-11-01T20:15:38.000Z | 2021-11-01T20:15:38.000Z | #ifndef UTILS_TIMING_PROFILER_HPP
#define UTILS_TIMING_PROFILER_HPP
#include <chrono>
namespace engine::utils {
/**
* \brief Provides a simple way to profile arbitrary code.
*/
class Profiler {
public:
/**
* \brief Starts a time measurement.
*/
void start() {
... | 26.820896 | 83 | 0.558152 | Ghabriel |
e309c1e95eee4987d9f7c0a8851787e62ea609c2 | 573 | cpp | C++ | AIPaddle.cpp | deviant-zairus/pong | ae76c13c5801212051749bfcc967d231c1821920 | [
"Apache-2.0"
] | null | null | null | AIPaddle.cpp | deviant-zairus/pong | ae76c13c5801212051749bfcc967d231c1821920 | [
"Apache-2.0"
] | null | null | null | AIPaddle.cpp | deviant-zairus/pong | ae76c13c5801212051749bfcc967d231c1821920 | [
"Apache-2.0"
] | null | null | null | #include "AIPaddle.h"
#include "Ball.h"
AIPaddle::AIPaddle(Ball* ball) : Paddle(irr::core::vector3df(25.0f, 0.0f, 0.0f))
{
this->_ball = ball;
}
AIPaddle::~AIPaddle()
{
}
bool AIPaddle::Update(float deltaTime, InputHandler* ih)
{
irr::core::vector3df ballPos = this->_ball->GetPosition();
irr::core::vector3df myP... | 21.222222 | 80 | 0.673647 | deviant-zairus |
e3114210a4b46d76da8a8768405a17bd976435f6 | 407 | hpp | C++ | fts/fts_share/fts_define.hpp | iihiro/FHE-Table-Search | a035cf9af311a8cb123a08d5d1378acd739df4a4 | [
"Apache-2.0"
] | 2 | 2020-07-19T15:54:42.000Z | 2020-08-20T06:35:05.000Z | fts/fts_share/fts_define.hpp | yamanalab/FHE-Table-Search | 0104ace6e91409730cc6a58481a0f8459892d6dc | [
"Apache-2.0"
] | 2 | 2020-07-09T01:41:40.000Z | 2020-08-18T03:24:38.000Z | fts/fts_share/fts_define.hpp | iihiro/FHE-Table-Search | a035cf9af311a8cb123a08d5d1378acd739df4a4 | [
"Apache-2.0"
] | 1 | 2020-01-21T05:16:28.000Z | 2020-01-21T05:16:28.000Z | #ifndef FTS_DEFINE_HPP
#define FTS_DEFINE_HPP
#define FTS_TIMEOUT_SEC (60)
#define FTS_RETRY_INTERVAL_USEC (2000000)
#define FTS_DEFAULT_MAX_CONCURRENT_QUERIES 128
#define FTS_DEFAULT_MAX_RESULTS 128
#define FTS_DEFAULT_MAX_RESULT_LIFETIME_SEC 50000
#define FTS_LUTFILE_EXT "csv"
#define FTS_LUT_POSSIBLE_INPUT_NUM_O... | 23.941176 | 49 | 0.847666 | iihiro |
e31434cb7ae51ebbbc0295413f7cbdb6a0fda312 | 8,424 | cpp | C++ | src/argss/modules/akeys.cpp | cstrahan/argss | cc595bd9a1e4a2c079ea181ff26bdd58d9e65ace | [
"BSD-2-Clause"
] | 1 | 2015-02-12T01:24:04.000Z | 2015-02-12T01:24:04.000Z | src/argss/modules/akeys.cpp | cstrahan/argss | cc595bd9a1e4a2c079ea181ff26bdd58d9e65ace | [
"BSD-2-Clause"
] | null | null | null | src/argss/modules/akeys.cpp | cstrahan/argss | cc595bd9a1e4a2c079ea181ff26bdd58d9e65ace | [
"BSD-2-Clause"
] | null | null | null | /////////////////////////////////////////////////////////////////////////////
// ARGSS - Copyright (c) 2009 - 2010, Alejandro Marzini (vgvgf)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// ar... | 47.061453 | 78 | 0.647317 | cstrahan |
e3150079d1432cceb4c51ea2bda9e1f9307372bf | 520 | hpp | C++ | library/ATF/_pvp_order_view_end_zoclInfo.hpp | lemkova/Yorozuya | f445d800078d9aba5de28f122cedfa03f26a38e4 | [
"MIT"
] | 29 | 2017-07-01T23:08:31.000Z | 2022-02-19T10:22:45.000Z | library/ATF/_pvp_order_view_end_zoclInfo.hpp | kotopes/Yorozuya | 605c97d3a627a8f6545cc09f2a1b0a8afdedd33a | [
"MIT"
] | 90 | 2017-10-18T21:24:51.000Z | 2019-06-06T02:30:33.000Z | library/ATF/_pvp_order_view_end_zoclInfo.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 <_pvp_order_view_end_zocl.hpp>
START_ATF_NAMESPACE
namespace Info
{
using _pvp_order_view_end_zoclsize2_ptr = int (WINAPIV*)(struct _pvp_order_... | 34.666667 | 135 | 0.776923 | lemkova |
e31570afb71316f7e4160f8369a6fe6a8f742191 | 1,457 | cpp | C++ | src/bullet.cpp | Harrand/Asteroids-Topaz | ce549802b0360f2554f4f6189d6ca0a486c4c928 | [
"Apache-2.0"
] | null | null | null | src/bullet.cpp | Harrand/Asteroids-Topaz | ce549802b0360f2554f4f6189d6ca0a486c4c928 | [
"Apache-2.0"
] | null | null | null | src/bullet.cpp | Harrand/Asteroids-Topaz | ce549802b0360f2554f4f6189d6ca0a486c4c928 | [
"Apache-2.0"
] | null | null | null | //
// Created by Harrand on 25/08/2018.
//
#include "bullet.hpp"
#include "entity_manager.hpp"
Bullet::Bullet(Vector2F position, Vector2F velocity, const Texture* bullet_texture, EntityManager& manager, DynamicSprite* shooter): DynamicSprite(1.0f, position, 0.0f, {Bullet::bullet_size, Bullet::bullet_size}, bullet_tex... | 34.690476 | 313 | 0.716541 | Harrand |
e319f162f2ac133c1961311e5cfbf7466a3f887a | 8,669 | cpp | C++ | src/vertexcover.cpp | manighahrmani/PACE2017-min-fill | 496fffc8b61b3507611ab118f211dc06457e0855 | [
"MIT"
] | 1 | 2020-05-29T15:47:16.000Z | 2020-05-29T15:47:16.000Z | src/vertexcover.cpp | manighahrmani/PACE2017-min-fill | 496fffc8b61b3507611ab118f211dc06457e0855 | [
"MIT"
] | null | null | null | src/vertexcover.cpp | manighahrmani/PACE2017-min-fill | 496fffc8b61b3507611ab118f211dc06457e0855 | [
"MIT"
] | 1 | 2020-05-29T15:47:21.000Z | 2020-05-29T15:47:21.000Z | #include "vertexcover.hpp"
#include "graph.hpp"
#include "timer.hpp"
#include "global.hpp"
#include <vector>
#include <queue>
#include <cassert>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <map>
#define F first
#define S second
using namespace std;
namespace VertexCover {
int uu[maxN];
int... | 20.160465 | 85 | 0.484139 | manighahrmani |
e3232cb7da6a0da1723a513c5499943d2cb043e1 | 1,277 | hpp | C++ | include/meevax/kernel/stack.hpp | yamacir-kit/meevax | ff9449a16380eac727c914a33449e9b3a7597b8e | [
"Apache-2.0"
] | 13 | 2018-11-27T02:06:58.000Z | 2022-01-01T16:07:12.000Z | include/meevax/kernel/stack.hpp | yamacir-kit/meevax | ff9449a16380eac727c914a33449e9b3a7597b8e | [
"Apache-2.0"
] | 89 | 2017-11-24T23:58:06.000Z | 2022-02-06T14:54:01.000Z | include/meevax/kernel/stack.hpp | yamacir-kit/meevax | ff9449a16380eac727c914a33449e9b3a7597b8e | [
"Apache-2.0"
] | 4 | 2017-12-22T15:45:46.000Z | 2020-01-12T19:50:45.000Z | /*
Copyright 2018-2021 Tatsuya Yamasaki.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agree... | 26.061224 | 75 | 0.703994 | yamacir-kit |
e326c9f13c30636263244c06e30fc48f88dbb966 | 1,716 | cpp | C++ | dialog.cpp | mguludag/QtIFW_Frontend | 1f670e4e633ed5fc92412d523a7365c6b16ade58 | [
"BSL-1.0"
] | 11 | 2020-12-28T13:53:16.000Z | 2022-03-29T04:19:32.000Z | dialog.cpp | mguludag/QtIFW_Frontend | 1f670e4e633ed5fc92412d523a7365c6b16ade58 | [
"BSL-1.0"
] | null | null | null | dialog.cpp | mguludag/QtIFW_Frontend | 1f670e4e633ed5fc92412d523a7365c6b16ade58 | [
"BSL-1.0"
] | 1 | 2020-12-28T13:53:24.000Z | 2020-12-28T13:53:24.000Z | /*****************************************************************************
* dialog.cpp
*
* Created: 12/20/2020 2020 by mguludag
*
* Copyright 2020 mguludag. All rights reserved.
*
* This file may be distributed under the terms of GNU Public License version
* 3 (GPL v3) as defined by the Free Softwa... | 39 | 80 | 0.626457 | mguludag |
e327f8aaa69d6be9637dd6975423007026dd67e8 | 59 | cpp | C++ | src/base/shape.cpp | wzhhh123/SimpleRT | e2ff1a2773eecbc388568fdc2b5c20ead45d262d | [
"Apache-2.0"
] | null | null | null | src/base/shape.cpp | wzhhh123/SimpleRT | e2ff1a2773eecbc388568fdc2b5c20ead45d262d | [
"Apache-2.0"
] | null | null | null | src/base/shape.cpp | wzhhh123/SimpleRT | e2ff1a2773eecbc388568fdc2b5c20ead45d262d | [
"Apache-2.0"
] | null | null | null |
#include "shape.h"
FLOAT Shape::Area() { return 0; }
| 6.555556 | 33 | 0.576271 | wzhhh123 |
e32921ab796018ed3107d779fbe74a96a7df96b3 | 5,673 | cpp | C++ | src/stream_transformer_payload_to_payload.cpp | luibass92/mqttraffic-warden | a421b04aff99927e92f0bda4c0543af91abef6c5 | [
"MIT"
] | null | null | null | src/stream_transformer_payload_to_payload.cpp | luibass92/mqttraffic-warden | a421b04aff99927e92f0bda4c0543af91abef6c5 | [
"MIT"
] | null | null | null | src/stream_transformer_payload_to_payload.cpp | luibass92/mqttraffic-warden | a421b04aff99927e92f0bda4c0543af91abef6c5 | [
"MIT"
] | null | null | null | #include "stream_transformer_payload_to_payload.h"
#include <iostream>
#include "cast.h"
#include "exceptions.h"
#include "json_utilities.h"
#include "spdlog/spdlog.h"
#include "utilities.h"
namespace tw {
void StreamTransformerPayloadToPayload::setup(const nlohmann::json& p_json) {
if (!is_valid_setup(p_json)) {... | 36.365385 | 80 | 0.624008 | luibass92 |
e32967d92a125756460bf2a3ea5989ca1e3dba94 | 285 | cpp | C++ | beaker/decl.cpp | thehexia/beaker2 | ca6c563c51be4a08d78e4eda007967bc4ae812a2 | [
"Apache-2.0"
] | null | null | null | beaker/decl.cpp | thehexia/beaker2 | ca6c563c51be4a08d78e4eda007967bc4ae812a2 | [
"Apache-2.0"
] | null | null | null | beaker/decl.cpp | thehexia/beaker2 | ca6c563c51be4a08d78e4eda007967bc4ae812a2 | [
"Apache-2.0"
] | null | null | null | // Copyright (c) 2015 Andrew Sutton
// All rights reserved
#include "decl.hpp"
#include "type.hpp"
Function_type const*
Function_decl::type() const
{
return cast<Function_type>(Decl::type());
}
Type const*
Function_decl::return_type() const
{
return type()->return_type();
}
| 13.571429 | 43 | 0.705263 | thehexia |
e32d0195642344abdc5e1f7144acfba601f3fb66 | 8,475 | cc | C++ | src/ActProdXSecData.cc | UniversityofWarwick/ACTIVIA | bbd0dfa71337602f94d911fa5101a440e8c16606 | [
"BSL-1.0"
] | 1 | 2020-11-04T08:32:23.000Z | 2020-11-04T08:32:23.000Z | src/ActProdXSecData.cc | UniversityofWarwick/ACTIVIA | bbd0dfa71337602f94d911fa5101a440e8c16606 | [
"BSL-1.0"
] | null | null | null | src/ActProdXSecData.cc | UniversityofWarwick/ACTIVIA | bbd0dfa71337602f94d911fa5101a440e8c16606 | [
"BSL-1.0"
] | 1 | 2020-11-04T08:32:30.000Z | 2020-11-04T08:32:30.000Z | // Class for defining the production cross-section data for
// a specific target isotope. It stores a map of ActXSecGraphs
// for the target isotope.
#include "Activia/ActProdXSecData.hh"
#include "Activia/ActBeamSpectrum.hh"
#include "Activia/ActProdNuclideList.hh"
#include "Activia/ActProdNuclide.hh"
#include "Activ... | 30.706522 | 92 | 0.688732 | UniversityofWarwick |
e3326e1d70ba23df0af2595682eeb96335c58dd9 | 1,145 | cpp | C++ | tests/benchmark/src/main.cpp | typesAreSpaces/AXDInterpolator | e0759c806480ff54b7a4f878e007b534a71dad44 | [
"MIT"
] | null | null | null | tests/benchmark/src/main.cpp | typesAreSpaces/AXDInterpolator | e0759c806480ff54b7a4f878e007b534a71dad44 | [
"MIT"
] | 1 | 2021-06-24T18:55:46.000Z | 2021-06-24T18:55:46.000Z | tests/benchmark/src/main.cpp | typesAreSpaces/AXDInterpolator | e0759c806480ff54b7a4f878e007b534a71dad44 | [
"MIT"
] | null | null | null | #include "UAutomizerFileReader.h"
#include <sys/stat.h>
inline bool exists_file (const std::string& name) {
struct stat buffer;
return (stat (name.c_str(), &buffer) == 0);
}
int main(int argc, char * argv[]){
if(argc != 6){
std::cerr << "Invalid number of inputs.\n";
return 0;
}
// argv[1] -> ... | 20.818182 | 67 | 0.583406 | typesAreSpaces |
e33317d73edf89d40fd046ce25f1f608f05a5438 | 2,754 | cpp | C++ | Board.cpp | ahmadabed1/messageboard-b | 05b154801690250737f56a31b71359ae71c0cdbb | [
"MIT"
] | null | null | null | Board.cpp | ahmadabed1/messageboard-b | 05b154801690250737f56a31b71359ae71c0cdbb | [
"MIT"
] | null | null | null | Board.cpp | ahmadabed1/messageboard-b | 05b154801690250737f56a31b71359ae71c0cdbb | [
"MIT"
] | null | null | null | #include <iostream>
#include "Board.hpp"
using namespace std;
using namespace ariel;
const char defaultChar = '_';
namespace ariel {
void Board::update(unsigned int row, unsigned int col, bool flag, unsigned int num){
if(this->maxR!=0 || this->minR!=INT32_MAX || this->maxC!=0 || this->minC!=INT32_MAX)... | 23.142857 | 93 | 0.439361 | ahmadabed1 |
e3350eedf98cd11ade84d8706ee7ac6f3ac32187 | 346 | cpp | C++ | 5659.删除字符串两端相同字符后的最短长度/minimumLength.cpp | YichengZhong/Top-Interview-Questions | 124828d321f482a0eaa30012b3706267487bfd24 | [
"MIT"
] | 1 | 2019-10-21T14:40:39.000Z | 2019-10-21T14:40:39.000Z | 5659.删除字符串两端相同字符后的最短长度/minimumLength.cpp | YichengZhong/Top-Interview-Questions | 124828d321f482a0eaa30012b3706267487bfd24 | [
"MIT"
] | null | null | null | 5659.删除字符串两端相同字符后的最短长度/minimumLength.cpp | YichengZhong/Top-Interview-Questions | 124828d321f482a0eaa30012b3706267487bfd24 | [
"MIT"
] | 1 | 2020-11-04T07:33:34.000Z | 2020-11-04T07:33:34.000Z | class Solution {
public:
int minimumLength(string s)
{
int l = 0, r = s.size() - 1;
while(l < r)
{
if(s[l]!=s[r]) break;
while(l<r-1 && s[l+1]==s[r])l++;
while(r>l+1 && s[r-1]==s[l])r--;
if(r-l+1>=2&&l<s.size()-1){l++;r--;}
}
... | 21.625 | 48 | 0.358382 | YichengZhong |
e337577a783f4092f5d786c771233083f63ddc04 | 1,316 | hpp | C++ | src/time_advance.hpp | ckendrick/asgard | ed4fc90d240466e9ca0473071e8f64f84ad14462 | [
"MIT"
] | null | null | null | src/time_advance.hpp | ckendrick/asgard | ed4fc90d240466e9ca0473071e8f64f84ad14462 | [
"MIT"
] | null | null | null | src/time_advance.hpp | ckendrick/asgard | ed4fc90d240466e9ca0473071e8f64f84ad14462 | [
"MIT"
] | null | null | null | #pragma once
#include "batch.hpp"
#include "boundary_conditions.hpp"
#include "distribution.hpp"
#include "kronmult.hpp"
#include "program_options.hpp"
#include "tensors.hpp"
#include "timer.hpp"
#include <mutex>
// this function executes a time step using the current solution
// vector x (in host_space).
// on exit, ... | 41.125 | 80 | 0.6231 | ckendrick |
e3393fcf86a950ee192dfa381e4be20d3f3dfb74 | 55 | hpp | C++ | misc/tower.hpp | reubn/symfonisk | 559ae842a159734ab5f1dc33b80a394577b3b576 | [
"MIT"
] | 1 | 2020-05-14T20:52:56.000Z | 2020-05-14T20:52:56.000Z | misc/tower.hpp | reubn/symfonisk | 559ae842a159734ab5f1dc33b80a394577b3b576 | [
"MIT"
] | null | null | null | misc/tower.hpp | reubn/symfonisk | 559ae842a159734ab5f1dc33b80a394577b3b576 | [
"MIT"
] | null | null | null | extern void loopTower(ConfigurableSettings& settings);
| 27.5 | 54 | 0.854545 | reubn |
e34857efb9134554d767f7548f519dbb3a161ba2 | 8,179 | cpp | C++ | src/main.cpp | ak1211/m5stack-azure-iot | 179a474acde159c689ab359dba804c886402794a | [
"MIT"
] | null | null | null | src/main.cpp | ak1211/m5stack-azure-iot | 179a474acde159c689ab359dba804c886402794a | [
"MIT"
] | null | null | null | src/main.cpp | ak1211/m5stack-azure-iot | 179a474acde159c689ab359dba804c886402794a | [
"MIT"
] | null | null | null | // Copyright (c) 2021 Akihiro Yamamoto.
// Licensed under the MIT License <https://spdx.org/licenses/MIT.html>
// See LICENSE file in the project root for full license information.
//
#include "credentials.h"
#include "iothub_client.hpp"
#include "peripherals.hpp"
#include <ArduinoOTA.h>
#include <M5Core2.h>
#... | 28.106529 | 80 | 0.643477 | ak1211 |
e358559a3caa8d098753bf701165bc2bc379231c | 1,250 | cpp | C++ | BinarySearchTree/BinarySearchTree/BinarySearchTree.cpp | epoll31/DataStructuresCpp | bfd93bad226bb5175d6b74f8dd9beb60150bb055 | [
"MIT"
] | null | null | null | BinarySearchTree/BinarySearchTree/BinarySearchTree.cpp | epoll31/DataStructuresCpp | bfd93bad226bb5175d6b74f8dd9beb60150bb055 | [
"MIT"
] | null | null | null | BinarySearchTree/BinarySearchTree/BinarySearchTree.cpp | epoll31/DataStructuresCpp | bfd93bad226bb5175d6b74f8dd9beb60150bb055 | [
"MIT"
] | null | null | null | #include <iostream>
#include "BinarySearchTree.h"
#include <vector>
int main()
{
BinarySearchTree<int> tree;
//tree.Add(4);
//tree.Add(2);
//tree.Add(6);
//tree.Add(1);
//tree.Add(3);
//tree.Add(5);
//tree.Add(7);
tree.Add(25);
tree.Add(15);
tree.Add(50);
tree.Add(10);
tree.Add(22);
tree.Add(35);
tree... | 19.230769 | 73 | 0.5936 | epoll31 |
e3616c347f069bbae2093bca66d1b14e91cd1a34 | 565 | cpp | C++ | 396.cpp | pengzhezhe/LeetCode | 305ec0c5b4cb5ea7cd244b3308132dee778138bc | [
"Apache-2.0"
] | null | null | null | 396.cpp | pengzhezhe/LeetCode | 305ec0c5b4cb5ea7cd244b3308132dee778138bc | [
"Apache-2.0"
] | null | null | null | 396.cpp | pengzhezhe/LeetCode | 305ec0c5b4cb5ea7cd244b3308132dee778138bc | [
"Apache-2.0"
] | null | null | null | //
// Created by pzz on 2022/4/22.
//
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
class Solution {
public:
int maxRotateFunction(vector<int> &nums) {
int n = nums.size();
int numSum = 0, f = 0;
for (int i = 0; i < n; i++) {
numSum += nums[i... | 17.121212 | 46 | 0.446018 | pengzhezhe |
e36299db653d094110285453e6f864c66fdce7fa | 510 | cpp | C++ | usage/cl_11_array_no_exception_of_out_index.cpp | conncui/CProject | f2786e8cfad1b590154af9167cbc218332e4e71f | [
"Apache-2.0"
] | null | null | null | usage/cl_11_array_no_exception_of_out_index.cpp | conncui/CProject | f2786e8cfad1b590154af9167cbc218332e4e71f | [
"Apache-2.0"
] | null | null | null | usage/cl_11_array_no_exception_of_out_index.cpp | conncui/CProject | f2786e8cfad1b590154af9167cbc218332e4e71f | [
"Apache-2.0"
] | null | null | null |
# include <iostream>
using namespace std;
void test_1();
void test_2();
int main() {
// test_1();
test_2();
}
void test_1(){
int a[2];
a[0] = 1;
a[1] = 2;
int i = 2;
a[i] = 10;
for (int i = 0; i <=2; i++){
cout << a[i] << " ";
}
cout << endl;
for (int i = 0; ... | 12.75 | 33 | 0.401961 | conncui |
e365db498c6099afa4cad6311ab653c85460ca15 | 239 | cpp | C++ | chapter3/Proj325.cpp | basstal/CPPPrimer | 6366965657f873ac62003cf0a30a3fdb26c09351 | [
"MIT"
] | null | null | null | chapter3/Proj325.cpp | basstal/CPPPrimer | 6366965657f873ac62003cf0a30a3fdb26c09351 | [
"MIT"
] | null | null | null | chapter3/Proj325.cpp | basstal/CPPPrimer | 6366965657f873ac62003cf0a30a3fdb26c09351 | [
"MIT"
] | null | null | null | #include<vector>
#include<iostream>
using namespace::std;
int main()
{
vector<unsigned> v(11,0);
unsigned score;
auto it = v.begin();
while(cin>>score)
++*(it + score/10);
for(auto &w:v)
cout<<w<<" ";
cout<<endl;
return 0;
}
| 14.058824 | 26 | 0.610879 | basstal |
e36cf94d6f0dfa569ccdf34744f802dd5b933c03 | 4,572 | cpp | C++ | src/multimedia/AudioOutObject.cpp | 0of/WebOS-Magna | a0fe2c9708fd4dd07928c11fcb03fb29fdd2d511 | [
"Apache-2.0"
] | 1 | 2016-03-26T13:25:08.000Z | 2016-03-26T13:25:08.000Z | src/multimedia/AudioOutObject.cpp | 0of/WebOS-Magna | a0fe2c9708fd4dd07928c11fcb03fb29fdd2d511 | [
"Apache-2.0"
] | null | null | null | src/multimedia/AudioOutObject.cpp | 0of/WebOS-Magna | a0fe2c9708fd4dd07928c11fcb03fb29fdd2d511 | [
"Apache-2.0"
] | null | null | null | #include "AudioOutObject.h"
#include "AudioOutObject_p.h"
namespace Magna{
namespace MultiMedia{
AudioOutObject & AudioOutObject::getAudioOutObject(){
static AudioOutObject o;
return o;
}
AudioOutObject::AudioOutObject()
:m_data( new PrivateData( *this ) ){
}
... | 27.709091 | 129 | 0.554243 | 0of |
e3717fa7cf16cda5b6a3b951c2a5298affb407ec | 5,617 | cpp | C++ | src/generic_cubic_gadget/generic_cubic_gadget.cpp | AntoineRondelet/libsnark-playground | a67e20379decf42ae4b6189900ff0001e3936fc9 | [
"MIT"
] | 8 | 2018-08-31T08:51:30.000Z | 2021-05-10T17:30:34.000Z | src/generic_cubic_gadget/generic_cubic_gadget.cpp | AntoineRondelet/libsnark-playground | a67e20379decf42ae4b6189900ff0001e3936fc9 | [
"MIT"
] | 1 | 2018-09-03T20:57:49.000Z | 2018-09-03T20:57:49.000Z | src/generic_cubic_gadget/generic_cubic_gadget.cpp | AntoineRondelet/libsnark-playground | a67e20379decf42ae4b6189900ff0001e3936fc9 | [
"MIT"
] | 4 | 2018-08-31T08:51:33.000Z | 2021-04-04T01:56:33.000Z | /*
* While the "cubic_gadget" aims to provide a circuit for the statement:
* (E) x**3 + x + 5 = 35
* This gadget ("generic_cubic_gagdet") is more generic, and provides a circuit for the statement:
* (E') A*x**3 + B*x**2 + C*x + D = E
* where, A, B, C, D, and E are fields elements of the field we are working on (Fi... | 34.460123 | 100 | 0.582339 | AntoineRondelet |
e3747249d8bc1d18aba1920d752546bc0aedd0ac | 1,599 | hpp | C++ | components/scream/src/share/field/field_property_checks/field_upper_bound_check.hpp | ngam/scream | 676f7469b9b33120cb0810c3ab8d9a214746286b | [
"BSD-3-Clause"
] | 22 | 2018-12-12T17:44:55.000Z | 2022-03-11T03:47:38.000Z | components/scream/src/share/field/field_property_checks/field_upper_bound_check.hpp | ngam/scream | 676f7469b9b33120cb0810c3ab8d9a214746286b | [
"BSD-3-Clause"
] | 1,440 | 2018-07-10T16:49:55.000Z | 2022-03-31T22:41:25.000Z | components/scream/src/share/field/field_property_checks/field_upper_bound_check.hpp | ngam/scream | 676f7469b9b33120cb0810c3ab8d9a214746286b | [
"BSD-3-Clause"
] | 24 | 2018-11-12T15:43:53.000Z | 2022-03-30T18:10:52.000Z | #ifndef SCREAM_FIELD_UPPER_BOUND_CHECK_HPP
#define SCREAM_FIELD_UPPER_BOUND_CHECK_HPP
#include "share/field/field_property_checks/field_within_interval_check.hpp"
#include "ekat/util/ekat_math_utils.hpp"
namespace scream
{
// This field property check returns true if all data in a given field are
// bounded above b... | 34.76087 | 110 | 0.74359 | ngam |
e37d586f11df6440712c0b38140276ac072d136c | 3,799 | cpp | C++ | 17_2_FEB17/MAKETRI.cpp | parthlathiya/Codechef_Submissions | d404129e4a59c4df10eace61541f48263c32480c | [
"MIT"
] | null | null | null | 17_2_FEB17/MAKETRI.cpp | parthlathiya/Codechef_Submissions | d404129e4a59c4df10eace61541f48263c32480c | [
"MIT"
] | null | null | null | 17_2_FEB17/MAKETRI.cpp | parthlathiya/Codechef_Submissions | d404129e4a59c4df10eace61541f48263c32480c | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
#define forall(i,a,b) for(int i=a;i<b;i++)
#define miN(a,b) ( (a) < (b) ? (a) : (b))
#define maX(a,b) ( (a) > (b) ? (a) : (b))
#define ll long long int
#define llu long long unsigned
#define mod 1000000007
struct in... | 21.833333 | 65 | 0.304817 | parthlathiya |
be6b6527f236cafe21149bc0329c3881d6c0c9c2 | 864 | cpp | C++ | EasyCppTest/BsonSerializer.cpp | Thalhammer/EasyCpp | 6b9886fecf0aa363eaf03741426fd3462306c211 | [
"MIT"
] | 3 | 2018-02-06T05:12:41.000Z | 2020-05-12T20:57:32.000Z | EasyCppTest/BsonSerializer.cpp | Thalhammer/EasyCpp | 6b9886fecf0aa363eaf03741426fd3462306c211 | [
"MIT"
] | 41 | 2016-07-11T12:19:10.000Z | 2017-08-08T07:43:12.000Z | EasyCppTest/BsonSerializer.cpp | Thalhammer/EasyCpp | 6b9886fecf0aa363eaf03741426fd3462306c211 | [
"MIT"
] | 2 | 2019-08-02T10:24:36.000Z | 2020-09-11T01:45:12.000Z | #include <gtest/gtest.h>
#include <Serialize/BsonSerializer.h>
using namespace EasyCpp;
namespace EasyCppTest
{
TEST(BsonSerializer, BuildDocument)
{
Bundle b;
b.set("hello", "world");
Serialize::BsonSerializer bson;
auto result = bson.serialize(b);
ASSERT_EQ(result.size(), 22);
ASSERT_EQ(result, std::s... | 30.857143 | 138 | 0.662037 | Thalhammer |
be7344d2191bacb706b24cdc4ce662ada7cefe20 | 33,709 | cc | C++ | test/service_recorder_test.cc | epgdatacapbon/mirakc-arib | f50851ac1869599e95dcbefe115624b95e8274de | [
"Apache-2.0",
"MIT"
] | null | null | null | test/service_recorder_test.cc | epgdatacapbon/mirakc-arib | f50851ac1869599e95dcbefe115624b95e8274de | [
"Apache-2.0",
"MIT"
] | null | null | null | test/service_recorder_test.cc | epgdatacapbon/mirakc-arib | f50851ac1869599e95dcbefe115624b95e8274de | [
"Apache-2.0",
"MIT"
] | null | null | null | #include <memory>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <tsduck/tsduck.h>
#include "ring_file_sink.hh"
#include "service_recorder.hh"
#include "test_helper.hh"
namespace {
constexpr size_t kNumBuffers = 2;
constexpr size_t kNumChunks = 2;
constexpr size_t kChunkSize = RingFileSink::kBufferSize ... | 38.218821 | 88 | 0.531164 | epgdatacapbon |
be7c81fda2431801fa41313c1d4a8df4fecbe8bd | 4,066 | cpp | C++ | dbms/src/Storages/MergeTree/SimpleMergeSelector.cpp | rudneff/ClickHouse | 3cb59b92bccbeb888d136f7c6e14b622382c0434 | [
"Apache-2.0"
] | null | null | null | dbms/src/Storages/MergeTree/SimpleMergeSelector.cpp | rudneff/ClickHouse | 3cb59b92bccbeb888d136f7c6e14b622382c0434 | [
"Apache-2.0"
] | null | null | null | dbms/src/Storages/MergeTree/SimpleMergeSelector.cpp | rudneff/ClickHouse | 3cb59b92bccbeb888d136f7c6e14b622382c0434 | [
"Apache-2.0"
] | null | null | null | #include <DB/Storages/MergeTree/SimpleMergeSelector.h>
#include <DB/Common/interpolate.h>
#include <cmath>
namespace DB
{
namespace
{
/** Estimates best set of parts to merge within passed alternatives.
*/
struct Estimator
{
using Iterator = SimpleMergeSelector::PartsInPartition::const_iterator;
void consider... | 28.236111 | 126 | 0.715691 | rudneff |
be7df6dd1c4e64c658312aab616f39e541c3669d | 571 | hpp | C++ | libs/plugin/include/sge/plugin/declare_iterator.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 2 | 2016-01-27T13:18:14.000Z | 2018-05-11T01:11:32.000Z | libs/plugin/include/sge/plugin/declare_iterator.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | null | null | null | libs/plugin/include/sge/plugin/declare_iterator.hpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 3 | 2018-05-11T01:11:34.000Z | 2021-04-24T19:47:45.000Z | // Copyright Carl Philipp Reh 2006 - 2019.
// 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)
#ifndef SGE_PLUGIN_DECLARE_ITERATOR_HPP_INCLUDED
#define SGE_PLUGIN_DECLARE_ITERATOR_HPP_INCLUDED
... | 35.6875 | 99 | 0.789842 | cpreh |
be8decd271b23fec17ea31015c559bfd90c1b25d | 4,135 | cc | C++ | c++-stl/random-number-engines.cc | deyuan/coding-practice | 82bdf719397507601e582ab6d5693e4e50e96a3a | [
"MIT"
] | null | null | null | c++-stl/random-number-engines.cc | deyuan/coding-practice | 82bdf719397507601e582ab6d5693e4e50e96a3a | [
"MIT"
] | null | null | null | c++-stl/random-number-engines.cc | deyuan/coding-practice | 82bdf719397507601e582ab6d5693e4e50e96a3a | [
"MIT"
] | null | null | null | // Copyright (c) 2018 Deyuan Guo. All rights reserved.
// This file is subject to the terms and conditions defined
// in file 'LICENSE' in this source code package.
#include <iostream>
#include <random>
// Engine: std::random_device
// Algorithm: True-RNG if entropy() is non-zero, pseudo-RNG otherwise
// Note: Non-de... | 40.539216 | 80 | 0.58549 | deyuan |
be9382e0028be1e8abf2be05a94625d75b012b59 | 1,972 | cpp | C++ | src/plugins/monocle/plugins/postrus/postrus.cpp | Maledictus/leechcraft | 79ec64824de11780b8e8bdfd5d8a2f3514158b12 | [
"BSL-1.0"
] | 120 | 2015-01-22T14:10:39.000Z | 2021-11-25T12:57:16.000Z | src/plugins/monocle/plugins/postrus/postrus.cpp | Maledictus/leechcraft | 79ec64824de11780b8e8bdfd5d8a2f3514158b12 | [
"BSL-1.0"
] | 8 | 2015-02-07T19:38:19.000Z | 2017-11-30T20:18:28.000Z | src/plugins/monocle/plugins/postrus/postrus.cpp | Maledictus/leechcraft | 79ec64824de11780b8e8bdfd5d8a2f3514158b12 | [
"BSL-1.0"
] | 33 | 2015-02-07T16:59:55.000Z | 2021-10-12T00:36:40.000Z | /**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2006-2014 Georg Rudoy
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE... | 19.919192 | 83 | 0.646552 | Maledictus |
be9aea33c1dd3e5e41e625280ea311c225213135 | 752 | cpp | C++ | engine/calculators/source/RangedPhysicalDamageCalculator.cpp | sidav/shadow-of-the-wyrm | 747afdeebed885b1a4f7ab42f04f9f756afd3e52 | [
"MIT"
] | 60 | 2019-08-21T04:08:41.000Z | 2022-03-10T13:48:04.000Z | engine/calculators/source/RangedPhysicalDamageCalculator.cpp | cleancoindev/shadow-of-the-wyrm | 51b23e98285ecb8336324bfd41ebf00f67b30389 | [
"MIT"
] | 3 | 2021-03-18T15:11:14.000Z | 2021-10-20T12:13:07.000Z | engine/calculators/source/RangedPhysicalDamageCalculator.cpp | cleancoindev/shadow-of-the-wyrm | 51b23e98285ecb8336324bfd41ebf00f67b30389 | [
"MIT"
] | 8 | 2019-11-16T06:29:05.000Z | 2022-01-23T17:33:43.000Z | #include "RangedPhysicalDamageCalculator.hpp"
RangedPhysicalDamageCalculator::RangedPhysicalDamageCalculator(const PhaseOfMoonType new_pom)
: PhysicalDamageCalculator(AttackType::ATTACK_TYPE_RANGED, new_pom)
{
}
int RangedPhysicalDamageCalculator::get_statistic_based_damage_modifier(CreaturePtr attacking_creature)
{
... | 25.931034 | 103 | 0.785904 | sidav |
be9c5052b288578c0fc376c780e021103f05883e | 285 | hpp | C++ | include/flexui/Layout/TextLayoutObject.hpp | mlomb/flexui | 242790aa13b057e25b276b6a3df79a30735c2548 | [
"MIT"
] | 23 | 2020-12-20T01:41:56.000Z | 2021-11-14T20:26:40.000Z | include/flexui/Layout/TextLayoutObject.hpp | mlomb/flexui | 242790aa13b057e25b276b6a3df79a30735c2548 | [
"MIT"
] | 2 | 2020-12-23T16:29:55.000Z | 2021-11-29T05:35:12.000Z | include/flexui/Layout/TextLayoutObject.hpp | mlomb/flexui | 242790aa13b057e25b276b6a3df79a30735c2548 | [
"MIT"
] | 4 | 2020-12-23T16:02:25.000Z | 2021-09-30T08:37:51.000Z | #pragma once
#include "flexui/Layout/LayoutObject.hpp"
namespace flexui {
class Text;
class TextLayoutObject : public LayoutObject {
public:
TextLayoutObject(Text* text);
~TextLayoutObject();
Text* getTextNode() const { return m_Text; }
private:
Text* m_Text;
};
}
| 13.571429 | 47 | 0.708772 | mlomb |
bea22392664416aacba57e1ec2c161350ba0766a | 2,751 | hpp | C++ | back/project2/include/ast_terminal.hpp | wht-github/CS323-Compilers | d49c8e61f17b18503504d11e0eca58b1f89997c4 | [
"MIT"
] | null | null | null | back/project2/include/ast_terminal.hpp | wht-github/CS323-Compilers | d49c8e61f17b18503504d11e0eca58b1f89997c4 | [
"MIT"
] | null | null | null | back/project2/include/ast_terminal.hpp | wht-github/CS323-Compilers | d49c8e61f17b18503504d11e0eca58b1f89997c4 | [
"MIT"
] | null | null | null | #ifndef AST_TERMINAL_HPP
#define AST_TERMINAL_HPP
#include "ast.hpp"
#include <string>
#include <iostream>
class Terminal : public Base
{
public:
std::string symbol;
Terminal(const std::string &_symbol) : symbol(_symbol) {}
virtual void print(int idt = 0) const
{
for (int i = 0; i < idt... | 20.377778 | 76 | 0.519084 | wht-github |
bea5412932ae445664a243bc6db51fb808638852 | 616 | hpp | C++ | Code/Engine/Math/RigidBodyBucket.hpp | pronaypeddiraju/Engine | 0ca9720a00f51340c6eb6bba07d70972489663e8 | [
"Unlicense"
] | 1 | 2021-01-25T23:53:44.000Z | 2021-01-25T23:53:44.000Z | Code/Engine/Math/RigidBodyBucket.hpp | pronaypeddiraju/Engine | 0ca9720a00f51340c6eb6bba07d70972489663e8 | [
"Unlicense"
] | null | null | null | Code/Engine/Math/RigidBodyBucket.hpp | pronaypeddiraju/Engine | 0ca9720a00f51340c6eb6bba07d70972489663e8 | [
"Unlicense"
] | 1 | 2021-01-25T23:53:46.000Z | 2021-01-25T23:53:46.000Z | //------------------------------------------------------------------------------------------------------------------------------
#pragma once
#include <vector>
#include "Engine/Math/PhysicsTypes.hpp"
//---------------------------------------------------------------------------------------------------------------------... | 36.235294 | 128 | 0.287338 | pronaypeddiraju |
bea5eee63b0ceec1509be64925c74c24d88fb744 | 1,964 | cpp | C++ | toonz/sources/tnztools/inputstate.cpp | morevnaproject-org/opentoonz | 3335715599092c3f173c2ffd015f09b1a0b3cb91 | [
"BSD-3-Clause"
] | 36 | 2020-05-18T22:26:35.000Z | 2022-02-19T00:09:25.000Z | toonz/sources/tnztools/inputstate.cpp | morevnaproject-org/opentoonz | 3335715599092c3f173c2ffd015f09b1a0b3cb91 | [
"BSD-3-Clause"
] | 16 | 2020-05-14T17:51:08.000Z | 2022-02-11T01:49:38.000Z | toonz/sources/tnztools/inputstate.cpp | morevnaproject-org/opentoonz | 3335715599092c3f173c2ffd015f09b1a0b3cb91 | [
"BSD-3-Clause"
] | 8 | 2020-06-12T17:01:20.000Z | 2021-09-15T07:03:12.000Z |
#include <tools/inputstate.h>
//*****************************************************************************************
// TKey static members
//*****************************************************************************************
const TKey TKey::shift(Qt::Key_Shift, true);
const TKey TKey::control(Qt::Ke... | 28.057143 | 91 | 0.535642 | morevnaproject-org |
bea71ffa482ff76d6c4ef7897f0d4ce830dc5fa1 | 34,635 | cc | C++ | test/TestStratum.cc | vpashka/btcpool | dab18b2bc90b3db2fb30698fc04e7e21a06acd11 | [
"MIT"
] | null | null | null | test/TestStratum.cc | vpashka/btcpool | dab18b2bc90b3db2fb30698fc04e7e21a06acd11 | [
"MIT"
] | null | null | null | test/TestStratum.cc | vpashka/btcpool | dab18b2bc90b3db2fb30698fc04e7e21a06acd11 | [
"MIT"
] | 1 | 2021-11-05T08:36:28.000Z | 2021-11-05T08:36:28.000Z | /*
The MIT License (MIT)
Copyright (c) [2016] [BTC.COM]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, me... | 35.269857 | 99 | 0.640739 | vpashka |
beb0e6d6183bbf6bb8da617438c661f83e3ccafe | 1,691 | cpp | C++ | BZOJ/4896.cpp | sshockwave/Online-Judge-Solutions | 9d0bc7fd68c3d1f661622929c1cb3752601881d3 | [
"MIT"
] | 6 | 2019-09-30T16:11:00.000Z | 2021-11-01T11:42:33.000Z | BZOJ/4896.cpp | sshockwave/Online-Judge-Solutions | 9d0bc7fd68c3d1f661622929c1cb3752601881d3 | [
"MIT"
] | 4 | 2017-11-21T08:17:42.000Z | 2020-07-28T12:09:52.000Z | BZOJ/4896.cpp | sshockwave/Online-Judge-Solutions | 9d0bc7fd68c3d1f661622929c1cb3752601881d3 | [
"MIT"
] | 4 | 2017-07-26T05:54:06.000Z | 2020-09-30T13:35:38.000Z | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
#include <vector>
using namespace std;
typedef long long lint;
#define ni (next_num<int>())
#define nl (next_num<lint>())
template<class T>inline T next_num(){
T i=0;char c;
while(!isdigit(c=getchar())&&c!='-');
bool flag=c... | 18.182796 | 64 | 0.583678 | sshockwave |
beb86b042dc547fbe7ac9c8cc6a4a39888c5251a | 6,646 | cpp | C++ | Common/utils/iStyle/ASResource.cpp | testdrive-profiling-master/profiles | 6e3854874366530f4e7ae130000000812eda5ff7 | [
"BSD-3-Clause"
] | null | null | null | Common/utils/iStyle/ASResource.cpp | testdrive-profiling-master/profiles | 6e3854874366530f4e7ae130000000812eda5ff7 | [
"BSD-3-Clause"
] | null | null | null | Common/utils/iStyle/ASResource.cpp | testdrive-profiling-master/profiles | 6e3854874366530f4e7ae130000000812eda5ff7 | [
"BSD-3-Clause"
] | null | null | null | // $Id: ASResource.cpp,v 1.2 2004/02/04 07:35:10 devsolar Exp $
// --------------------------------------------------------------------------
//
// Copyright (c) 1998,1999,2000,2001,2002 Tal Davidson. All rights reserved.
//
// compiler_defines.h
// by Tal Davidson (davidsont@bigfoot.com)
//
// This file is a part of "... | 43.437908 | 84 | 0.671532 | testdrive-profiling-master |
beb879e76be433f8d05e2a88d7fabb47b17c7273 | 13,202 | cpp | C++ | example/FieldContainer/example_01.cpp | Sandia2014/intrepid | 9a310ddc033da1dda162a09bf80cca6c2dde2d6b | [
"MIT"
] | null | null | null | example/FieldContainer/example_01.cpp | Sandia2014/intrepid | 9a310ddc033da1dda162a09bf80cca6c2dde2d6b | [
"MIT"
] | null | null | null | example/FieldContainer/example_01.cpp | Sandia2014/intrepid | 9a310ddc033da1dda162a09bf80cca6c2dde2d6b | [
"MIT"
] | null | null | null | // @HEADER
// ************************************************************************
//
// Intrepid Package
// Copyright (2007) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the ... | 41.127726 | 196 | 0.522269 | Sandia2014 |
beba7f22985606f3d10d46aa8181f390f0d1d17c | 6,940 | hpp | C++ | src/si_derived.hpp | DarthPigrum/TypeSI | 3505cad5113c1c6c907c48b3bd71e24e9ddb32bc | [
"BSL-1.0"
] | null | null | null | src/si_derived.hpp | DarthPigrum/TypeSI | 3505cad5113c1c6c907c48b3bd71e24e9ddb32bc | [
"BSL-1.0"
] | null | null | null | src/si_derived.hpp | DarthPigrum/TypeSI | 3505cad5113c1c6c907c48b3bd71e24e9ddb32bc | [
"BSL-1.0"
] | null | null | null | #pragma once
/// @file si_derived.hpp
/// @brief Derived SI units
#include "si_base.hpp"
#include <utility>
namespace Si {
/// @brief Derived SI units
namespace Derived {
/// @tparam T Any number type such as float, double or long double used as a
/// container
template <typename T>
using Hertz = decltype(std::declv... | 38.131868 | 80 | 0.692507 | DarthPigrum |
bebcf0902de4b69fe2a506c8136d4c024ee247d5 | 3,274 | cpp | C++ | Source/Array-1-RemoveDups.cpp | KarateSnoopy/LeetCodeSubmissions | 6da0c71e4104a43aea7a5029597685739b9f31b2 | [
"MIT"
] | null | null | null | Source/Array-1-RemoveDups.cpp | KarateSnoopy/LeetCodeSubmissions | 6da0c71e4104a43aea7a5029597685739b9f31b2 | [
"MIT"
] | null | null | null | Source/Array-1-RemoveDups.cpp | KarateSnoopy/LeetCodeSubmissions | 6da0c71e4104a43aea7a5029597685739b9f31b2 | [
"MIT"
] | null | null | null | // LeetCode.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
//int x = input[inputSize - 1];
//for (int i = inputSize - 1; i > 0; i--)
//{
// input[i] = input[i - 1];
//}
//input[0] = x;
//while (numsSize > 0)
//{
// numsSize -= 1;
//}... | 21.682119 | 101 | 0.442578 | KarateSnoopy |
bec3cdfdc085fb7a2f2997c3cc209c5ba9794212 | 410 | cc | C++ | src/tools/hot_backup/sync_fault_state.cc | jdisearch/isearch1 | 272bd4ab0dc82d9e33c8543474b1294569947bb3 | [
"Apache-2.0"
] | 3 | 2021-08-18T09:59:42.000Z | 2021-09-07T03:11:28.000Z | src/tools/hot_backup/sync_fault_state.cc | jdisearch/isearch1 | 272bd4ab0dc82d9e33c8543474b1294569947bb3 | [
"Apache-2.0"
] | null | null | null | src/tools/hot_backup/sync_fault_state.cc | jdisearch/isearch1 | 272bd4ab0dc82d9e33c8543474b1294569947bb3 | [
"Apache-2.0"
] | null | null | null | #include "sync_fault_state.h"
FaultState::FaultState(SyncStateManager* pSyncStateManager)
: SyncStateBase()
{
m_pSyncStateManager = pSyncStateManager;
}
FaultState::~FaultState()
{
}
void FaultState::Enter()
{
log_error("Here is ErrorState");
}
void FaultState::Exit()
{
// do nothing
}
void FaultS... | 14.137931 | 59 | 0.682927 | jdisearch |
bec528bdccaf409b043f71101ac596fdadec3888 | 1,431 | hpp | C++ | nd-coursework/books/cpp/C++MoveSemantics/basics/card.hpp | crdrisko/nd-grad | f1765e4f24d7a4b1b3a76c64eb8d88bcca0eaa44 | [
"MIT"
] | 1 | 2020-09-26T12:38:55.000Z | 2020-09-26T12:38:55.000Z | nd-coursework/books/cpp/C++MoveSemantics/basics/card.hpp | crdrisko/nd-research | f1765e4f24d7a4b1b3a76c64eb8d88bcca0eaa44 | [
"MIT"
] | null | null | null | nd-coursework/books/cpp/C++MoveSemantics/basics/card.hpp | crdrisko/nd-research | f1765e4f24d7a4b1b3a76c64eb8d88bcca0eaa44 | [
"MIT"
] | null | null | null | // Copyright (c) 2020 by Nicolai Josuttis. All rights reserved.
// Licensed under the CCA-4.0 International License. See the LICENSE file in the project root for more information.
//
// Name: card.hpp
// Author: crdrisko
// Date: 08/08/2021-07:22:39
// Description: A class for the cards of a card game where each object... | 31.8 | 115 | 0.621244 | crdrisko |
bec673d7073fe18807d852a87afb6c56bc84cb75 | 2,024 | hpp | C++ | code/source/util/parallel_buffer.hpp | crafn/clover | 586acdbcdb34c3550858af125e9bb4a6300343fe | [
"MIT"
] | 12 | 2015-01-12T00:19:20.000Z | 2021-08-05T10:47:20.000Z | code/source/util/parallel_buffer.hpp | crafn/clover | 586acdbcdb34c3550858af125e9bb4a6300343fe | [
"MIT"
] | null | null | null | code/source/util/parallel_buffer.hpp | crafn/clover | 586acdbcdb34c3550858af125e9bb4a6300343fe | [
"MIT"
] | null | null | null | #ifndef CLOVER_UTIL_PARALLEL_BUFFER_HPP
#define CLOVER_UTIL_PARALLEL_BUFFER_HPP
#include "build.hpp"
#include "hardware/clstate.hpp"
namespace clover {
namespace visual {
/// @todo Shouldn't be in util >:(
class BaseVertexArrayObject;
class Framebuffer;
class Texture;
} // visual
namespace util {
class ParallelQue... | 25.620253 | 97 | 0.755435 | crafn |
bede311bcd84c89fdf5538666aed61f014d642c4 | 5,855 | cpp | C++ | source/lib/memory/mmu_factory.cpp | olduf/gb-emu | 37a2195fa67a2656cc11541eb75b1f7a548057b2 | [
"Unlicense"
] | null | null | null | source/lib/memory/mmu_factory.cpp | olduf/gb-emu | 37a2195fa67a2656cc11541eb75b1f7a548057b2 | [
"Unlicense"
] | null | null | null | source/lib/memory/mmu_factory.cpp | olduf/gb-emu | 37a2195fa67a2656cc11541eb75b1f7a548057b2 | [
"Unlicense"
] | null | null | null | #include "lib/memory/mmu_factory.hpp"
// Initial values come from the Gambatte source code
// https://github.com/sinamas/gambatte/blob/master/libgambatte/src/initstate.cpp
namespace gb_lib {
MMU* MMUFactory::create(uint8_t* rom, uint32_t romSize, DMAMediator* dmaMediator, DMAMediator* hdmaMediator, MemorySpace* tim... | 42.122302 | 186 | 0.641674 | olduf |
bedf9bf367676509351f56af3d525586bf7520cd | 1,210 | cpp | C++ | src/main.cpp | lukasz-pawlos/ukladV2 | 56d643d339160a891e5168fdaa576bab0a87f8a4 | [
"MIT"
] | null | null | null | src/main.cpp | lukasz-pawlos/ukladV2 | 56d643d339160a891e5168fdaa576bab0a87f8a4 | [
"MIT"
] | null | null | null | src/main.cpp | lukasz-pawlos/ukladV2 | 56d643d339160a891e5168fdaa576bab0a87f8a4 | [
"MIT"
] | null | null | null | #include <iostream>
#include "SWektor.hh"
#include "Macierz.hh"
#include "UkladRownan.hh"
#include "rozmiar.h"
#include "LZespolona.hh"
using namespace std;
int main()
{
char x;
cin >> x;
if (x == 'r') ///DLA DOUBLE
{
UkladRownanLiniowych<double, ROZMIAR> B;
SWektor<double, ROZ... | 20.166667 | 84 | 0.561157 | lukasz-pawlos |
bee1e1e4b5c5800a360b7a72a22951d90ac2ce30 | 4,666 | cpp | C++ | ch16-09-extruded-a/src/Utils.cpp | pulpobot/C-SFML-html5-animation | 14154008b853d1235e8ca35a5b23b6a70366f914 | [
"MIT"
] | 73 | 2017-12-14T00:33:23.000Z | 2022-02-09T12:04:52.000Z | ch17-03-extruded-a-light/src/Utils.cpp | threaderic/C-SFML-html5-animation | 22f302cdf7c7c00247609da30e1bcf472d134583 | [
"MIT"
] | null | null | null | ch17-03-extruded-a-light/src/Utils.cpp | threaderic/C-SFML-html5-animation | 22f302cdf7c7c00247609da30e1bcf472d134583 | [
"MIT"
] | 5 | 2017-12-26T03:30:07.000Z | 2020-07-05T04:58:24.000Z | #include <sstream>
#include <iostream>
#include "Utils.h"
void Utils::Bezier::QuadraticBezierCurve(const sf::Vector2f &p0, sf::Vector2f &p1, sf::Vector2f &p2, int segments,
std::vector<sf::Vector2f> &curvePoints, bool throughControlPoint) {
//If there are any segments requi... | 39.542373 | 114 | 0.536434 | pulpobot |
bee226083cad300103ba217fb6ad1b1e20152853 | 983 | cpp | C++ | tests/whole-program/structreturn.cpp | v8786339/NyuziProcessor | 34854d333d91dbf69cd5625505fb81024ec4f785 | [
"Apache-2.0"
] | 1,388 | 2015-02-05T17:16:17.000Z | 2022-03-31T07:17:08.000Z | tests/whole-program/structreturn.cpp | czvf/NyuziProcessor | 31f74e43a785fa66d244f1e9744ca0ca9b8a1fad | [
"Apache-2.0"
] | 176 | 2015-02-02T02:54:06.000Z | 2022-02-01T06:00:21.000Z | tests/whole-program/structreturn.cpp | czvf/NyuziProcessor | 31f74e43a785fa66d244f1e9744ca0ca9b8a1fad | [
"Apache-2.0"
] | 271 | 2015-02-18T02:19:04.000Z | 2022-03-28T13:30:25.000Z | //
// Copyright 2011-2015 Jeff Bush
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... | 20.914894 | 75 | 0.693795 | v8786339 |
bee879658e13c9e5d37bbf59ce9afb46702e32d4 | 1,406 | cpp | C++ | src/cube/src/syntax/cubepl/evaluators/nullary/CubeNullaryEvaluation.cpp | OpenCMISS-Dependencies/cube | bb425e6f75ee5dbdf665fa94b241b48deee11505 | [
"Cube"
] | null | null | null | src/cube/src/syntax/cubepl/evaluators/nullary/CubeNullaryEvaluation.cpp | OpenCMISS-Dependencies/cube | bb425e6f75ee5dbdf665fa94b241b48deee11505 | [
"Cube"
] | null | null | null | src/cube/src/syntax/cubepl/evaluators/nullary/CubeNullaryEvaluation.cpp | OpenCMISS-Dependencies/cube | bb425e6f75ee5dbdf665fa94b241b48deee11505 | [
"Cube"
] | 2 | 2016-09-19T00:16:05.000Z | 2021-03-29T22:06:45.000Z | /****************************************************************************
** CUBE http://www.scalasca.org/ **
*****************************************************************************
** Copyright (c) 1998-2016 **
** Fors... | 36.051282 | 77 | 0.396159 | OpenCMISS-Dependencies |
befdb4dc51f299c04b6b126655aa1748ff502e0f | 629 | cpp | C++ | comsci-110/Chapter 5/consoleInput.cpp | colmentse/Cplusplus-class | 0c7eff6b3fa6f2a2c42571889453d1bf5c0a5050 | [
"MIT"
] | null | null | null | comsci-110/Chapter 5/consoleInput.cpp | colmentse/Cplusplus-class | 0c7eff6b3fa6f2a2c42571889453d1bf5c0a5050 | [
"MIT"
] | null | null | null | comsci-110/Chapter 5/consoleInput.cpp | colmentse/Cplusplus-class | 0c7eff6b3fa6f2a2c42571889453d1bf5c0a5050 | [
"MIT"
] | null | null | null | /*
Author : Colmen Tse
Compsci : 120
5.6 consoleinput.cpp
*/
#include <string>
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int age;
cout << "Enter your age: ";
cin >> age;
cin.ignore(1000, 10);
string name;
cout << "Enter your name: ";
getline(cin, name);
double temp;
cout << ... | 17.971429 | 65 | 0.613672 | colmentse |
befefa3a238c5a224d33a3c2e82fabedb5ecc0ad | 67 | cc | C++ | fluid/src/framework/op_desc.cc | ImageMetrics/paddle-mobile | 8edfa0ddfc542962ba4530410bd2d2c9b8d77cc4 | [
"MIT"
] | 2 | 2018-07-17T10:55:48.000Z | 2018-08-03T01:35:20.000Z | fluid/src/framework/op_desc.cc | ImageMetrics/paddle-mobile | 8edfa0ddfc542962ba4530410bd2d2c9b8d77cc4 | [
"MIT"
] | null | null | null | fluid/src/framework/op_desc.cc | ImageMetrics/paddle-mobile | 8edfa0ddfc542962ba4530410bd2d2c9b8d77cc4 | [
"MIT"
] | null | null | null | //
// Created by liuRuiLong on 2018/4/23.
//
#include "op_desc.h"
| 11.166667 | 38 | 0.641791 | ImageMetrics |
8305a43c0016eb26e8d544d2c621426147818ff0 | 5,383 | cpp | C++ | tests/collection.cpp | dead1ock/algorithms-cpp | 35b79b4cfe5db24e83ce157765fbcb221bc2ed38 | [
"MIT"
] | null | null | null | tests/collection.cpp | dead1ock/algorithms-cpp | 35b79b4cfe5db24e83ce157765fbcb221bc2ed38 | [
"MIT"
] | null | null | null | tests/collection.cpp | dead1ock/algorithms-cpp | 35b79b4cfe5db24e83ce157765fbcb221bc2ed38 | [
"MIT"
] | null | null | null | #include <gtest/gtest.h>
#include <collection/FixedArrayStack.h>
#include <collection/FixedQueue.h>
#include <collection/LinkedListStack.h>
#include <collection/LinkedQueue.h>
#include <collection/ResizableStack.h>
#include <collection/ResizableQueue.h>
TEST(LINKEDLISTSTACK, PushPopCount)
{
LinkedListStack<int> stac... | 17.824503 | 56 | 0.602638 | dead1ock |
8306d502d0de3894cbff049ac4e1904b81fd428b | 729 | cpp | C++ | test/examples_test/04_module_test/04_module_tests.cpp | acc-cosc-1337-fall-2020/acc-cosc-1337-fall-2020-julieei206 | e1fb506dbe4b068c01db307cd7626fd88b456a20 | [
"MIT"
] | null | null | null | test/examples_test/04_module_test/04_module_tests.cpp | acc-cosc-1337-fall-2020/acc-cosc-1337-fall-2020-julieei206 | e1fb506dbe4b068c01db307cd7626fd88b456a20 | [
"MIT"
] | 1 | 2020-10-30T23:36:49.000Z | 2020-11-06T19:33:56.000Z | test/examples_test/04_module_test/04_module_tests.cpp | acc-cosc-1337-fall-2020/acc-cosc-1337-fall-2020-julieei206 | e1fb506dbe4b068c01db307cd7626fd88b456a20 | [
"MIT"
] | null | null | null | #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"
TEST_CASE("Verify Test Configuration", "verification") {
REQUIRE(true == true);
}
TEST_CASE("Verify sum of squares function")
{
REQUIRE(sum_of_squares(3)==14);
REQUIRE(sum_of_squares(4)==30);
... | 20.828571 | 97 | 0.702332 | acc-cosc-1337-fall-2020 |
8308730f7101ec449e3d4e3edfe2a179f4995b52 | 776 | cpp | C++ | Backtracking/ModularExpression.cpp | ssokjin/Interview-Bit | 8714d3d627eb5875f49d205af779b59ca33ab4a3 | [
"MIT"
] | 513 | 2016-08-16T12:52:14.000Z | 2022-03-30T19:32:10.000Z | Backtracking/ModularExpression.cpp | CodeOctal/Interview-Bit | 88c021685d6cdef17906d077411ce34723363a08 | [
"MIT"
] | 25 | 2018-02-14T15:25:48.000Z | 2022-03-23T11:52:08.000Z | Backtracking/ModularExpression.cpp | CodeOctal/Interview-Bit | 88c021685d6cdef17906d077411ce34723363a08 | [
"MIT"
] | 505 | 2016-09-02T15:04:20.000Z | 2022-03-25T06:36:31.000Z | // https://www.interviewbit.com/problems/modular-expression/
long long int calMod(int A, int B, int C){
if(B == 0){
return 1;
}
else if(B%2 == 0){
long long int y = calMod(A, B/2, C);
return (y*y)%C;
}
else{
return ((A%C)*calMod(A,B-1,C))%C;
}
}
int Solution::Mo... | 24.25 | 93 | 0.552835 | ssokjin |
830b9919832d3b721808454193278df544785653 | 570 | cpp | C++ | input/array.cpp | xdevkartik/cpp_basics | a6d5a6aca5cdd5b9634c300cfaf2e2914a57aa55 | [
"MIT"
] | null | null | null | input/array.cpp | xdevkartik/cpp_basics | a6d5a6aca5cdd5b9634c300cfaf2e2914a57aa55 | [
"MIT"
] | null | null | null | input/array.cpp | xdevkartik/cpp_basics | a6d5a6aca5cdd5b9634c300cfaf2e2914a57aa55 | [
"MIT"
] | null | null | null | #include <iostream>
using namespace std;
main(){
string name[5] = {"apple", "google", "microsoft", "ibm", "tesla"};
string arr[5] = {"ab", "bc", "cd", "de", "ff"};
string arr2[] = {"apappappapapap", "hghghdgahdgahsdghag"};
int num = sizeof(name[4]);
int num2 = sizeof(arr[0]);
int num3 = sizeof(... | 38 | 91 | 0.578947 | xdevkartik |
83124097feb5012b57dc4f4fec5f0ab33adc840f | 1,446 | hpp | C++ | code/aoce/Module/ModuleManager.hpp | msqljj/aoce | b15320acbb9454fb461501c8cf0c598d1b15c495 | [
"MIT"
] | 71 | 2020-10-15T03:13:50.000Z | 2022-03-30T02:04:28.000Z | code/aoce/Module/ModuleManager.hpp | msqljj/aoce | b15320acbb9454fb461501c8cf0c598d1b15c495 | [
"MIT"
] | 9 | 2021-02-20T10:30:10.000Z | 2022-03-04T07:59:58.000Z | code/aoce/Module/ModuleManager.hpp | msqljj/aoce | b15320acbb9454fb461501c8cf0c598d1b15c495 | [
"MIT"
] | 19 | 2021-01-01T12:03:02.000Z | 2022-03-21T07:59:59.000Z | #pragma once
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "IModule.hpp"
namespace aoce {
typedef IModule* (*loadModuleAction)();
typedef std::function<IModule*(void)> loadModuleHandle;
class ModuleInfo {
public:
void* handle = nullptr;
IModule* module = nullptr;
std::... | 22.246154 | 77 | 0.670124 | msqljj |
9b01091ed19e91701e87e18fd4691b40ac1c724e | 856 | cpp | C++ | pico_src/conversion.cpp | Bambofy/pico | a26d853cca9e28170efa6ca694a9233f08f9b655 | [
"MIT"
] | 5 | 2020-03-03T16:02:28.000Z | 2020-03-17T12:43:55.000Z | pico_src/conversion.cpp | Bambofy/pico | a26d853cca9e28170efa6ca694a9233f08f9b655 | [
"MIT"
] | null | null | null | pico_src/conversion.cpp | Bambofy/pico | a26d853cca9e28170efa6ca694a9233f08f9b655 | [
"MIT"
] | 1 | 2020-03-04T12:16:05.000Z | 2020-03-04T12:16:05.000Z | #include "../pico_inc/conversion.h"
void Conversion_Uint_To_Char_Array(uint32_t inNumber, char * outDestinationPtrLocation, uint32_t outDestinationByteLength)
{
uintptr_t destPtr = reinterpret_cast<uintptr_t>(outDestinationPtrLocation);
_Conversion_Uint_To_Char_Array(inNumber, destPtr, outDestinationByteLengt... | 37.217391 | 122 | 0.83528 | Bambofy |
9b0a3563dab2a04ccc0e60408e3dab89439e70d4 | 3,269 | cpp | C++ | test/core/image_processing/hough_circle_transform.cpp | harsh-4/gil | 6da59cc3351e5657275d3a536e0b6e7a1b6ac738 | [
"BSL-1.0"
] | 153 | 2015-02-03T06:03:54.000Z | 2022-03-20T15:06:34.000Z | test/core/image_processing/hough_circle_transform.cpp | harsh-4/gil | 6da59cc3351e5657275d3a536e0b6e7a1b6ac738 | [
"BSL-1.0"
] | 429 | 2015-03-22T09:49:04.000Z | 2022-03-28T08:32:08.000Z | test/core/image_processing/hough_circle_transform.cpp | harsh-4/gil | 6da59cc3351e5657275d3a536e0b6e7a1b6ac738 | [
"BSL-1.0"
] | 215 | 2015-03-15T09:20:51.000Z | 2022-03-30T12:40:07.000Z | // Boost.GIL (Generic Image Library) - tests
//
// Copyright 2020 Olzhas Zhumabek <anonymous.from.applecity@gmail.com>
//
// Use, modification and distribution are subject to 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)
//
#includ... | 38.916667 | 99 | 0.657693 | harsh-4 |
9b10a45f76002112ed294a14d916e6f2af835d83 | 2,704 | cpp | C++ | src/18_Appendix_mathematics_4_deep_learning/Statistics.cpp | jiamny/D2L_pytorch_cpp | 5bd89bb5531b9fca4fbe0dc3bfe5beaa7c45cb09 | [
"MIT"
] | null | null | null | src/18_Appendix_mathematics_4_deep_learning/Statistics.cpp | jiamny/D2L_pytorch_cpp | 5bd89bb5531b9fca4fbe0dc3bfe5beaa7c45cb09 | [
"MIT"
] | null | null | null | src/18_Appendix_mathematics_4_deep_learning/Statistics.cpp | jiamny/D2L_pytorch_cpp | 5bd89bb5531b9fca4fbe0dc3bfe5beaa7c45cb09 | [
"MIT"
] | 1 | 2022-03-11T00:12:20.000Z | 2022-03-11T00:12:20.000Z | #include <unistd.h>
#include <iomanip>
#include <torch/utils.h>
#include "../utils/Ch_18_util.h"
#include "../matplotlibcpp.h"
namespace plt = matplotlibcpp;
using torch::indexing::Slice;
using torch::indexing::None;
// Statistical bias
torch::Tensor stat_bias(float true_theta, torch::Tensor est_theta) {
return(... | 31.811765 | 114 | 0.637574 | jiamny |
9b11201d895aebd1c232215dd1a6d43437170e38 | 4,093 | cpp | C++ | src/gamelib/editor/ui/Overlay.cpp | mall0c/GameLib | df4116b53c39be7b178dd87f7eb0fe32a94d00d3 | [
"MIT"
] | 1 | 2020-02-17T09:53:36.000Z | 2020-02-17T09:53:36.000Z | src/gamelib/editor/ui/Overlay.cpp | mall0c/GameLib | df4116b53c39be7b178dd87f7eb0fe32a94d00d3 | [
"MIT"
] | null | null | null | src/gamelib/editor/ui/Overlay.cpp | mall0c/GameLib | df4116b53c39be7b178dd87f7eb0fe32a94d00d3 | [
"MIT"
] | null | null | null | #include "gamelib/editor/ui/Overlay.hpp"
#include "gamelib/editor/tools/ToolUtils.hpp"
#include "gamelib/editor/EditorShared.hpp"
#include "gamelib/core/ecs/Entity.hpp"
#include "gamelib/core/geometry/flags.hpp"
#include "gamelib/core/input/InputSystem.hpp"
#include "gamelib/core/Game.hpp"
#include "gamelib/core/render... | 36.221239 | 120 | 0.548986 | mall0c |
9b19915623890a71c6440137e1819b08795a6ab4 | 1,018 | cpp | C++ | engine/strings/source/RangedCombatTextKeys.cpp | sidav/shadow-of-the-wyrm | 747afdeebed885b1a4f7ab42f04f9f756afd3e52 | [
"MIT"
] | 60 | 2019-08-21T04:08:41.000Z | 2022-03-10T13:48:04.000Z | engine/strings/source/RangedCombatTextKeys.cpp | cleancoindev/shadow-of-the-wyrm | 51b23e98285ecb8336324bfd41ebf00f67b30389 | [
"MIT"
] | 3 | 2021-03-18T15:11:14.000Z | 2021-10-20T12:13:07.000Z | engine/strings/source/RangedCombatTextKeys.cpp | cleancoindev/shadow-of-the-wyrm | 51b23e98285ecb8336324bfd41ebf00f67b30389 | [
"MIT"
] | 8 | 2019-11-16T06:29:05.000Z | 2022-01-23T17:33:43.000Z | #include "RangedCombatTextKeys.hpp"
using namespace std;
// Ranged combat messages
RangedCombatTextKeys::RangedCombatTextKeys()
{
}
RangedCombatTextKeys::~RangedCombatTextKeys()
{
}
const string RangedCombatTextKeys::RANGED_COMBAT_UNAVAILABLE_ON_WORLD_MAP = "RANGED_COMBAT_UNAVAILABLE_ON_WORLD_MAP";
const string R... | 50.9 | 135 | 0.852652 | sidav |
9b1d4f31caa5ccafbba94af952d5598e43d485ab | 1,603 | hpp | C++ | rayt-cpp/utils.hpp | gkmngrgn/rayt | 726d8e3d9716e91f27fec2c5982b7f79bfe0ea8a | [
"CC0-1.0",
"MIT"
] | 11 | 2020-07-04T13:35:10.000Z | 2022-03-30T17:34:27.000Z | rayt-cpp/utils.hpp | gkmngrgn/rayt | 726d8e3d9716e91f27fec2c5982b7f79bfe0ea8a | [
"CC0-1.0",
"MIT"
] | null | null | null | rayt-cpp/utils.hpp | gkmngrgn/rayt | 726d8e3d9716e91f27fec2c5982b7f79bfe0ea8a | [
"CC0-1.0",
"MIT"
] | 2 | 2021-03-02T06:31:43.000Z | 2022-03-30T17:34:28.000Z | #ifndef UTILS_HPP
#define UTILS_HPP
//==============================================================================
// Originally written in 2016 by Peter Shirley <ptrshrl@gmail.com>
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this softwa... | 27.169492 | 80 | 0.65315 | gkmngrgn |
9b1e120f3f985b6e526ca03ec3955e648466096f | 5,202 | hh | C++ | kenlm/include/util/mmap.hh | pokey/w2ldecode | 03f9995a48c5c1043be309fe5b20c6126851a9ff | [
"BSD-3-Clause"
] | 114 | 2015-01-11T05:41:03.000Z | 2021-08-31T03:47:12.000Z | Part 02/001_LM/ngram_lm_lab/kenlm/include/util/mmap.hh | Kabongosalomon/AMMI-NLP | 00a0e47399926ad1951b84a11cd936598a9c7c3b | [
"MIT"
] | 29 | 2015-01-09T01:00:09.000Z | 2019-09-25T06:04:02.000Z | Part 02/001_LM/ngram_lm_lab/kenlm/include/util/mmap.hh | Kabongosalomon/AMMI-NLP | 00a0e47399926ad1951b84a11cd936598a9c7c3b | [
"MIT"
] | 50 | 2015-02-13T13:48:39.000Z | 2019-08-07T09:45:11.000Z | #ifndef UTIL_MMAP_H
#define UTIL_MMAP_H
// Utilities for mmaped files.
#include <cstddef>
#include <limits>
#include <stdint.h>
#include <sys/types.h>
namespace util {
class scoped_fd;
long SizePage();
// (void*)-1 is MAP_FAILED; this is done to avoid including the mmap header here.
class scoped_mmap {
publ... | 26.953368 | 122 | 0.662438 | pokey |
9b1ef61068f354d7463caaa27ecf5b7deb9a80a4 | 501 | hpp | C++ | ffl/include/pipeline/FFL_PipelineNodeParser.hpp | zhenfei2016/FFL-v2 | 376c79a0611af580d4767a4bbb05822f1a4fd454 | [
"MIT"
] | null | null | null | ffl/include/pipeline/FFL_PipelineNodeParser.hpp | zhenfei2016/FFL-v2 | 376c79a0611af580d4767a4bbb05822f1a4fd454 | [
"MIT"
] | null | null | null | ffl/include/pipeline/FFL_PipelineNodeParser.hpp | zhenfei2016/FFL-v2 | 376c79a0611af580d4767a4bbb05822f1a4fd454 | [
"MIT"
] | null | null | null | /*
* This file is part of FFL project.
*
* The MIT License (MIT)
* Copyright (C) 2017-2018 zhufeifei All rights reserved.
*
* FFL_PipelineNodeParser.hpp
* Created by zhufeifei(34008081@qq.com) on 2018/02/11
* https://github.com/zhenfei2016/FFL-v2.git
*
* Pipelin系统中通过脚本创建node的parser
*
*/
#ifndef _FFL_PIPELINENOD... | 17.892857 | 57 | 0.740519 | zhenfei2016 |
9b23a487cc1e235334005a4fd35d270a66e79f66 | 328 | cpp | C++ | chapter10/Proj1013.cpp | basstal/CPPPrimer | 6366965657f873ac62003cf0a30a3fdb26c09351 | [
"MIT"
] | null | null | null | chapter10/Proj1013.cpp | basstal/CPPPrimer | 6366965657f873ac62003cf0a30a3fdb26c09351 | [
"MIT"
] | null | null | null | chapter10/Proj1013.cpp | basstal/CPPPrimer | 6366965657f873ac62003cf0a30a3fdb26c09351 | [
"MIT"
] | null | null | null | #include"head.h"
bool func(const string &s);
int main(){
vector<string> words{"fox","jumps","over","quick","red","quick","blow","slow","the","turtle"};
auto iter = partition(words.begin(),words.end(),func);
for(const auto &e:words)
cout<<e<<" ";
cout<<endl;
return 0;
}
bool func(const string &s){
return s.size... | 23.428571 | 95 | 0.631098 | basstal |
9b25946d853b291db8676fcd613c862454f7ef3e | 1,719 | cpp | C++ | firmware/Heat controller/lib/NTC/src/NTC.cpp | atoomnetmarc/IoT12 | 7706f69758a800da70bf8034a91a331206706824 | [
"Apache-2.0"
] | null | null | null | firmware/Heat controller/lib/NTC/src/NTC.cpp | atoomnetmarc/IoT12 | 7706f69758a800da70bf8034a91a331206706824 | [
"Apache-2.0"
] | null | null | null | firmware/Heat controller/lib/NTC/src/NTC.cpp | atoomnetmarc/IoT12 | 7706f69758a800da70bf8034a91a331206706824 | [
"Apache-2.0"
] | null | null | null | /*
Copyright 2021-2022 Marc Ketel
SPDX-License-Identifier: Apache-2.0
*/
#include <math.h>
#include "NTC.h"
/*
Class which is able to calculate the temperature of a NTC given the voltage of a resistor divider.
Simple schematic:
resistorDividerVoltage---[resistorDividerResistance]---[NTC]---GND
*/
NTC::NTC(void... | 28.180328 | 139 | 0.753345 | atoomnetmarc |
9b2a0aeeed97f88621425a9a0b549c20a5d110d2 | 1,065 | hpp | C++ | src/elona/serialization/std/bitset.hpp | nanbansenji/ElonaFoobar | ddbd6639db8698e89f09b2512526e855d8016e46 | [
"MIT"
] | 84 | 2018-03-03T02:44:32.000Z | 2019-07-14T16:16:24.000Z | src/elona/serialization/std/bitset.hpp | AFB111/elonafoobar | da7a3c86dd45e68e6e490fb260ead1d67c9fff5e | [
"MIT"
] | 685 | 2018-02-27T04:31:17.000Z | 2019-07-12T13:43:00.000Z | src/elona/serialization/std/bitset.hpp | nanbansenji/ElonaFoobar | ddbd6639db8698e89f09b2512526e855d8016e46 | [
"MIT"
] | 23 | 2019-07-26T08:52:38.000Z | 2021-11-09T09:21:58.000Z | #pragma once
#include <bitset>
#include "../concepts.hpp"
namespace elona::serialization
{
template <size_t N, typename Archive>
void serialize(std::bitset<N>& value, Archive& ar)
{
if constexpr (concepts::is_iarchive_v<Archive>)
{
if constexpr (N <= 32)
{
uint32_t tmp;
... | 18.684211 | 51 | 0.449765 | nanbansenji |
9b2b78b9110a940be1ce88a548c6fadf5e412df8 | 6,835 | cpp | C++ | modules/sensors/dynamic_sensor/HidUtils/HidReport.cpp | lighthouse-os/hardware_libhardware | c6fa046a69d9b1adf474cf5de58318b677801e49 | [
"Apache-2.0"
] | null | null | null | modules/sensors/dynamic_sensor/HidUtils/HidReport.cpp | lighthouse-os/hardware_libhardware | c6fa046a69d9b1adf474cf5de58318b677801e49 | [
"Apache-2.0"
] | null | null | null | modules/sensors/dynamic_sensor/HidUtils/HidReport.cpp | lighthouse-os/hardware_libhardware | c6fa046a69d9b1adf474cf5de58318b677801e49 | [
"Apache-2.0"
] | null | null | null | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 29.717391 | 98 | 0.58654 | lighthouse-os |
9b2d7bdf8175e9af1324c8529f05ebc9298df440 | 4,713 | cpp | C++ | node_modules/lzz-gyp/lzz-source/smtc_DefineLazyClass.cpp | SuperDizor/dizornator | 9f57dbb3f6af80283b4d977612c95190a3d47900 | [
"ISC"
] | 3 | 2019-09-18T16:44:33.000Z | 2021-03-29T13:45:27.000Z | node_modules/lzz-gyp/lzz-source/smtc_DefineLazyClass.cpp | SuperDizor/dizornator | 9f57dbb3f6af80283b4d977612c95190a3d47900 | [
"ISC"
] | null | null | null | node_modules/lzz-gyp/lzz-source/smtc_DefineLazyClass.cpp | SuperDizor/dizornator | 9f57dbb3f6af80283b4d977612c95190a3d47900 | [
"ISC"
] | 2 | 2019-03-29T01:06:38.000Z | 2019-09-18T16:44:34.000Z | // smtc_DefineLazyClass.cpp
//
#include "smtc_DefineLazyClass.h"
#include "smtc_ClassDefn.h"
#include "smtc_ClassScope.h"
#include "smtc_CreateLazyClass.h"
#include "smtc_CreateLazyClassEntity.h"
#include "smtc_CreateLazyClassScope.h"
#include "smtc_CreateMbrInit.h"
#include "smtc_CreateQualName.h"
#include "smtc_Crea... | 34.152174 | 290 | 0.717165 | SuperDizor |
9b36bf4ac6c6a7f412d25e45df5084a4df3baa41 | 530 | cc | C++ | pathtracer/src/scene_elements/serialized/lights/SpotLight.cc | bjorn-grape/bidirectional-pathtracer | 6fbbf5fc6cee39f595533494d779726658d646e1 | [
"MIT"
] | null | null | null | pathtracer/src/scene_elements/serialized/lights/SpotLight.cc | bjorn-grape/bidirectional-pathtracer | 6fbbf5fc6cee39f595533494d779726658d646e1 | [
"MIT"
] | null | null | null | pathtracer/src/scene_elements/serialized/lights/SpotLight.cc | bjorn-grape/bidirectional-pathtracer | 6fbbf5fc6cee39f595533494d779726658d646e1 | [
"MIT"
] | null | null | null | #include "SpotLight.hh"
float SpotLight::getAngle() const {
return angle_;
}
void SpotLight::setAngle(float angle) {
SpotLight::angle_ = angle;
}
const Vector3D<float> &SpotLight::getDirection() const {
return direction_;
}
void SpotLight::setDirection(const Vector3D<float> &direction) {
SpotLight::... | 20.384615 | 64 | 0.720755 | bjorn-grape |
9b375c34a28ab4aee9774fa54acb33fb2ebd7fa8 | 8,869 | cpp | C++ | code/utils/encoding.cpp | trgswe/fs2open.github.com | a159eba0cebca911ad14a118412fddfe5be8e9f8 | [
"Unlicense"
] | 307 | 2015-04-10T13:27:32.000Z | 2022-03-21T03:30:38.000Z | code/utils/encoding.cpp | trgswe/fs2open.github.com | a159eba0cebca911ad14a118412fddfe5be8e9f8 | [
"Unlicense"
] | 2,231 | 2015-04-27T10:47:35.000Z | 2022-03-31T19:22:37.000Z | code/utils/encoding.cpp | trgswe/fs2open.github.com | a159eba0cebca911ad14a118412fddfe5be8e9f8 | [
"Unlicense"
] | 282 | 2015-01-05T12:16:57.000Z | 2022-03-28T04:45:11.000Z | //
//
#include "utils/encoding.h"
#include "mod_table/mod_table.h"
namespace util {
Encoding guess_encoding(const SCP_string& content, bool assume_utf8) {
if (content.size()>= 3 && !strncmp(content.c_str(), "\xEF\xBB\xBF", 3)) { // UTF-8
return Encoding::UTF8;
}
if (content.size()>= 4 && !strncmp(conte... | 35.906883 | 140 | 0.597023 | trgswe |
9b3addf69baf6396826baea1132848c4bea1126f | 353 | cpp | C++ | Artemis/Source/Graphics/Artemis.Graphics.cpp | NoriyukiHiromoto/TinyGameEngine | ea683db3d498c1b8df91930a262a4c50a4e69b82 | [
"MIT"
] | null | null | null | Artemis/Source/Graphics/Artemis.Graphics.cpp | NoriyukiHiromoto/TinyGameEngine | ea683db3d498c1b8df91930a262a4c50a4e69b82 | [
"MIT"
] | null | null | null | Artemis/Source/Graphics/Artemis.Graphics.cpp | NoriyukiHiromoto/TinyGameEngine | ea683db3d498c1b8df91930a262a4c50a4e69b82 | [
"MIT"
] | null | null | null | //----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
#include "Artemis.Local.hpp"
#include "Artemis.Graphics.hpp"
#if defined(ATS_API_DIRECTX11)
#include "Platform/Artemis.Graphics.directx11.cpp"
#e... | 35.3 | 85 | 0.407932 | NoriyukiHiromoto |
9b3cc3cd55dd4d87adcbf4cab59dd62587a51248 | 3,360 | cpp | C++ | GraphAlgorithms/Monsters.cpp | su050300/CSES-Problemset-Solutions | 292281f9ac3c57c21c8208b30087386c29238d17 | [
"MIT"
] | 2 | 2021-02-05T04:21:42.000Z | 2021-02-10T14:24:38.000Z | GraphAlgorithms/Monsters.cpp | su050300/CSES-Problemset-Solutions | 292281f9ac3c57c21c8208b30087386c29238d17 | [
"MIT"
] | null | null | null | GraphAlgorithms/Monsters.cpp | su050300/CSES-Problemset-Solutions | 292281f9ac3c57c21c8208b30087386c29238d17 | [
"MIT"
] | null | null | null | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
vector<vector<char>>v(n,vector<char>(m));
vector<vector<int>>poss(n,vector<int>(m,-1));
queue<pair<int,int>>q;
int xi,yi;
for(int i=0;i<n;i++)
{
for(int j=0;j<m;j++)
{
cin>>v[i][j];
... | 24.347826 | 73 | 0.344048 | su050300 |
9b3e2593d9ff36628dfe296383a498755d0df0e7 | 3,595 | cpp | C++ | src/main.cpp | shouxieai/kiwi-rknn | 55c1a4ae2b664acf564b1218728b6ed85b9713aa | [
"MIT"
] | 8 | 2022-03-02T08:51:21.000Z | 2022-03-23T13:24:11.000Z | src/main.cpp | shouxieai/kiwi-rknn | 55c1a4ae2b664acf564b1218728b6ed85b9713aa | [
"MIT"
] | 3 | 2022-03-15T02:40:14.000Z | 2022-03-29T03:25:17.000Z | src/main.cpp | shouxieai/kiwi-rknn | 55c1a4ae2b664acf564b1218728b6ed85b9713aa | [
"MIT"
] | 3 | 2022-03-03T07:46:21.000Z | 2022-03-14T08:32:45.000Z | #include <stdio.h>
#include <thread>
#include <opencv2/opencv.hpp>
#include "kiwi-logger.hpp"
#include "kiwi-app-nanodet.hpp"
#include "kiwi-app-scrfd.hpp"
#include "kiwi-app-arcface.hpp"
#include "kiwi-infer-rknn.hpp"
using namespace cv;
using namespace std;
void test_pref(const char* model){
// 测试性能启用sync mode... | 30.726496 | 119 | 0.59249 | shouxieai |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.