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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
da17ec7a4bc01e0a4ee5df4ec1c355b83edf82cc | 2,713 | cpp | C++ | bench/bench-find-sort.cpp | oussemanaffetyy/mlib | e72aa5fb791b23150dab1c6037a078dba839b4b3 | [
"BSD-2-Clause"
] | 501 | 2017-02-24T12:19:59.000Z | 2022-03-31T10:12:21.000Z | bench/bench-find-sort.cpp | oussemanaffetyy/mlib | e72aa5fb791b23150dab1c6037a078dba839b4b3 | [
"BSD-2-Clause"
] | 90 | 2017-03-03T21:18:11.000Z | 2022-03-25T09:25:55.000Z | bench/bench-find-sort.cpp | oussemanaffetyy/mlib | e72aa5fb791b23150dab1c6037a078dba839b4b3 | [
"BSD-2-Clause"
] | 42 | 2017-03-26T13:53:52.000Z | 2022-02-23T00:01:30.000Z | // program to find longest contiguous subsequence
// based on https://www.geeksforgeeks.org/longest-consecutive-subsequence/
#include <iostream>
#include <unordered_set>
using namespace std;
// Returns length of the longest contiguous subsequence
int cpp_find_longest(int arr[], int n)
{
unordered_set<int> S; ... | 26.598039 | 108 | 0.588647 | oussemanaffetyy |
da1c348146476cf9b6bfd19aad9b6577fa36ea57 | 2,179 | cpp | C++ | src/packet.cpp | leroythelegend/rough_idea_pcars | 07ead73fa04402c860b21039d5aa8c22a33a7d93 | [
"MIT"
] | 4 | 2018-08-09T00:44:01.000Z | 2021-07-03T08:26:39.000Z | src/packet.cpp | ejmhub/rough_idea_project_cars | d7cd062cbff2a1df82b5a623205d9c1920c41b1c | [
"MIT"
] | 1 | 2018-02-02T10:44:43.000Z | 2018-02-02T10:44:43.000Z | src/packet.cpp | ejmhub/rough_idea_project_cars | d7cd062cbff2a1df82b5a623205d9c1920c41b1c | [
"MIT"
] | 1 | 2018-11-24T09:12:51.000Z | 2018-11-24T09:12:51.000Z | #include "packet.h"
#include "packetbase.h"
#include "consts.h"
namespace pcars {
void Packet::decode(const PCars_Data & data, Position & ) {
Packet_Base base;
Position pos = 0;
base.decode(data, pos);
switch (static_cast<Packet_Type_V2>(base.packet_type())) {
case Packet_Type_V2::PACKET_CAR_PHYSICS:
pos... | 21.362745 | 79 | 0.721891 | leroythelegend |
da1da83a6d0ed84e511026f1ea0a92455dc9aa61 | 5,138 | cpp | C++ | Ryukuo Suspender/automaticsuspenderview.cpp | Iciclez/ryukuo-suspender | cdcc6beede79a23e5da71813b78c41cde718453a | [
"MIT"
] | null | null | null | Ryukuo Suspender/automaticsuspenderview.cpp | Iciclez/ryukuo-suspender | cdcc6beede79a23e5da71813b78c41cde718453a | [
"MIT"
] | null | null | null | Ryukuo Suspender/automaticsuspenderview.cpp | Iciclez/ryukuo-suspender | cdcc6beede79a23e5da71813b78c41cde718453a | [
"MIT"
] | null | null | null | #include "automaticsuspenderview.hpp"
#include "window.hpp"
#include "inject.hpp"
#include "resource.h"
#include <unordered_set>
#include <thread>
#include <atomic>
#include <functional>
#include <algorithm>
#include <sstream>
automaticsuspenderview::automaticsuspenderview(tabcontrol *ptabcontrol, mainwindow *pmainwi... | 29.36 | 151 | 0.679253 | Iciclez |
da1efeebe6bd9d2c91e1c42167136c60f40d4e97 | 3,572 | hpp | C++ | cpp/src/process/render.hpp | LoveDaisy/ice_halo_sim | 2e812612b1a782a59e727fa8fc7241f0f7b69143 | [
"MIT"
] | 76 | 2018-06-26T11:02:04.000Z | 2022-03-23T09:12:00.000Z | cpp/src/process/render.hpp | LoveDaisy/ice_halo_sim | 2e812612b1a782a59e727fa8fc7241f0f7b69143 | [
"MIT"
] | 2 | 2018-07-17T17:32:15.000Z | 2019-07-07T09:57:06.000Z | cpp/src/process/render.hpp | LoveDaisy/ice_halo_sim | 2e812612b1a782a59e727fa8fc7241f0f7b69143 | [
"MIT"
] | 13 | 2018-07-15T06:12:43.000Z | 2022-03-07T14:12:19.000Z | #ifndef SRC_CORE_RENDER_H_
#define SRC_CORE_RENDER_H_
#include <functional>
#include "context/context.hpp"
#include "core/core_def.hpp"
#include "util/enum_map.hpp"
#include "util/threading_pool.hpp"
namespace icehalo {
enum class VisibleRange { kUpper, kLower, kFront, kFull };
enum class LensType {
kLinear,
... | 32.18018 | 120 | 0.68449 | LoveDaisy |
da225ee2fa91b0134ee7aa973c566d9aa27345af | 4,968 | cpp | C++ | jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.cpp | MeFisto94/test-bot-1 | c761210e199fc2e3cae5db0b2fbf13043d8d4b48 | [
"BSD-3-Clause"
] | 3 | 2020-11-08T14:55:48.000Z | 2021-09-28T08:33:26.000Z | jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.cpp | MeFisto94/test-bot-1 | c761210e199fc2e3cae5db0b2fbf13043d8d4b48 | [
"BSD-3-Clause"
] | 2 | 2020-09-24T22:09:36.000Z | 2020-09-24T22:29:30.000Z | jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.cpp | Akshita-tewatia/jmonkeyengine | ff4b8d6a3b953a6899e31b787cb91094bced9ae6 | [
"BSD-3-Clause"
] | 1 | 2017-08-31T15:17:31.000Z | 2017-08-31T15:17:31.000Z | /*
* Copyright (c) 2009-2012 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of ... | 39.428571 | 161 | 0.763889 | MeFisto94 |
da24e8c967546cc2e558cb49e9d6a5999d1ebed5 | 665 | hpp | C++ | include/ashespp/Enum/SubpassContents.hpp | DragonJoker/Ashes | a6ed950b3fd8fb9626c60b4291fbd52ea75ac66e | [
"MIT"
] | 227 | 2018-09-17T16:03:35.000Z | 2022-03-19T02:02:45.000Z | include/ashespp/Enum/SubpassContents.hpp | DragonJoker/RendererLib | 0f8ad8edec1b0929ebd10247d3dd0a9ee8f8c91a | [
"MIT"
] | 39 | 2018-02-06T22:22:24.000Z | 2018-08-29T07:11:06.000Z | include/ashespp/Enum/SubpassContents.hpp | DragonJoker/Ashes | a6ed950b3fd8fb9626c60b4291fbd52ea75ac66e | [
"MIT"
] | 8 | 2019-05-04T10:33:32.000Z | 2021-04-05T13:19:27.000Z | /*
This file belongs to Ashes.
See LICENSE file in root folder.
*/
#ifndef ___AshesPP_SubpassContents_HPP___
#define ___AshesPP_SubpassContents_HPP___
#pragma once
namespace ashes
{
/**
*\brief
* Gets the name of the given element type.
*\param[in] value
* The element type.
*\return
* The name.
*/
inline std:... | 19 | 55 | 0.735338 | DragonJoker |
da30168420d50037b6fae02f59fe8c5f3c58156f | 3,640 | cpp | C++ | src/apbp.cpp | BreadFish64/teakra | d6b36df0ef86afef268a38916a0e89b73ff22614 | [
"MIT"
] | 61 | 2018-01-26T13:26:50.000Z | 2022-03-12T20:00:46.000Z | src/apbp.cpp | BreadFish64/teakra | d6b36df0ef86afef268a38916a0e89b73ff22614 | [
"MIT"
] | 23 | 2018-02-01T12:55:27.000Z | 2022-02-24T01:04:11.000Z | src/apbp.cpp | BreadFish64/teakra | d6b36df0ef86afef268a38916a0e89b73ff22614 | [
"MIT"
] | 14 | 2018-01-31T14:15:15.000Z | 2022-02-23T23:39:36.000Z | #include <array>
#include <atomic>
#include <mutex>
#include <utility>
#include "apbp.h"
namespace Teakra {
class DataChannel {
public:
void Reset() {
ready = false;
data = 0;
}
void Send(u16 data) {
{
std::lock_guard lock(mutex);
ready = true;
t... | 24.266667 | 83 | 0.645055 | BreadFish64 |
da313a89b347ab8fe28b92827705a2f53ba76173 | 3,441 | cpp | C++ | src/tier0/cpu_usage.cpp | DeadZoneLuna/csso-src | 6c978ea304ee2df3796bc9c0d2916bac550050d5 | [
"Unlicense"
] | 4 | 2021-10-03T05:16:55.000Z | 2021-12-28T16:49:27.000Z | src/tier0/cpu_usage.cpp | cafeed28/what | 08e51d077f0eae50afe3b592543ffa07538126f5 | [
"Unlicense"
] | null | null | null | src/tier0/cpu_usage.cpp | cafeed28/what | 08e51d077f0eae50afe3b592543ffa07538126f5 | [
"Unlicense"
] | 3 | 2022-02-02T18:09:58.000Z | 2022-03-06T18:54:39.000Z | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: return the cpu usage as a float value
//
// On win32 this is 0.0 to 1.0 indicating the amount of CPU time used
// On posix its the load avg from the last minute
//
// On win32 you need to call this once in a while. Every few s... | 25.87218 | 111 | 0.739611 | DeadZoneLuna |
da33dc158276838f2000b33bcc997108f28612cd | 483 | hpp | C++ | TankController/light_sequence.hpp | mohammedari/AquariumThermostat | f7499444a2fff137df3ef26418f2c03716e049be | [
"Apache-2.0"
] | 2 | 2015-02-24T14:07:48.000Z | 2015-11-23T10:00:12.000Z | TankController/light_sequence.hpp | mohammedari/AquariumThermostat | f7499444a2fff137df3ef26418f2c03716e049be | [
"Apache-2.0"
] | null | null | null | TankController/light_sequence.hpp | mohammedari/AquariumThermostat | f7499444a2fff137df3ef26418f2c03716e049be | [
"Apache-2.0"
] | null | null | null | #pragma once
#include "time.hpp"
#include "array.hpp"
namespace tank_controller
{
class light_sequence
{
public:
static const size_t size = 24;
private:
util::array<bool, size> arr;
public:
void set_on(unsigned char hour) { if(hour < arr.size()){ arr[hour] = true; } }
void s... | 20.125 | 84 | 0.616977 | mohammedari |
da36b57c63aa4f7cb697e570bd62f1da99f4397d | 527 | cpp | C++ | array/reverse.cpp | prameetu/DSA_2021 | a0053c3f1280629281b12d8b6e8fd95697550488 | [
"MIT"
] | null | null | null | array/reverse.cpp | prameetu/DSA_2021 | a0053c3f1280629281b12d8b6e8fd95697550488 | [
"MIT"
] | null | null | null | array/reverse.cpp | prameetu/DSA_2021 | a0053c3f1280629281b12d8b6e8fd95697550488 | [
"MIT"
] | null | null | null | //reverse a string
//Expected Time Complexity: O(|S|).
//Expected Auxiliary Space: O(1)
#include <bits/stdc++.h>
using namespace std;
string reverse_string(string s)
{
int i(0),j(s.size()-1);
while(i<j)
{
char temp;
temp = s[i];
s[i] = s[j];
s[j] = temp;
... | 14.638889 | 43 | 0.434535 | prameetu |
da41de8736436fea5b423f5c9787666a6b58d513 | 1,456 | cpp | C++ | Recursion/uniquepathsiii.cpp | thisisnitish/cp-dsa- | 9ae94930b65f8dc293d088e9148960939b9f6fa4 | [
"MIT"
] | null | null | null | Recursion/uniquepathsiii.cpp | thisisnitish/cp-dsa- | 9ae94930b65f8dc293d088e9148960939b9f6fa4 | [
"MIT"
] | null | null | null | Recursion/uniquepathsiii.cpp | thisisnitish/cp-dsa- | 9ae94930b65f8dc293d088e9148960939b9f6fa4 | [
"MIT"
] | null | null | null | /*
Leetcode Question 980. Unique Paths III
https://leetcode.com/problems/unique-paths-iii/
*/
class Solution
{
public:
// Time: O(3^(m*n)), Space: O(m*n)
int emptyCells = 1;
int uniquePathsIII(vector<vector<int> > &grid)
{
int m = grid.size();
int n = grid[0].size();
int startX,... | 26 | 80 | 0.405907 | thisisnitish |
da42301e3ad4814c993541af4f92fee5bb2f327d | 7,704 | cpp | C++ | cykSDH_with_ferns.cpp | chenyikuan/C_common | 0becf0db3aa64e13809ee57f7f055df320917dcb | [
"BSD-3-Clause"
] | null | null | null | cykSDH_with_ferns.cpp | chenyikuan/C_common | 0becf0db3aa64e13809ee57f7f055df320917dcb | [
"BSD-3-Clause"
] | null | null | null | cykSDH_with_ferns.cpp | chenyikuan/C_common | 0becf0db3aa64e13809ee57f7f055df320917dcb | [
"BSD-3-Clause"
] | null | null | null | #include "cykSDH_with_ferns.h"
#include "cykTools.h"
#include<iomanip>
#include <cmath>
using namespace std;
using namespace arma;
SDH_with_ferns::SDH_with_ferns(){
maxItr = 15;
g_lambda = 1; // original 1.0
nu = 0.0001;
nbits = 32;
if_classification = true;
}
void SDH_with_ferns::init(sdh_with_fe... | 27.222615 | 139 | 0.541018 | chenyikuan |
da4494102e928ed3abf12b92ab7a9468bffeab3b | 1,695 | cpp | C++ | Metadata.cpp | alexgoussev/TrackProcessor | d991696542822b7136fffa797741b2ed9e4d66c4 | [
"Apache-2.0"
] | null | null | null | Metadata.cpp | alexgoussev/TrackProcessor | d991696542822b7136fffa797741b2ed9e4d66c4 | [
"Apache-2.0"
] | null | null | null | Metadata.cpp | alexgoussev/TrackProcessor | d991696542822b7136fffa797741b2ed9e4d66c4 | [
"Apache-2.0"
] | null | null | null | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Metadata.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TEditMetadata *EditMetadata;
//-----------------------... | 27.33871 | 77 | 0.515634 | alexgoussev |
da47e44f1069785607722a8d82df6aa44016515b | 5,138 | cpp | C++ | Source/GASShooter/Private/AI/GSEnvQueryGenerator_ConeBetween.cpp | nwiswakarma/GASShooter | 7bd6bd016e1fd0eddb1ee96840b0891b56b5ac92 | [
"MIT"
] | null | null | null | Source/GASShooter/Private/AI/GSEnvQueryGenerator_ConeBetween.cpp | nwiswakarma/GASShooter | 7bd6bd016e1fd0eddb1ee96840b0891b56b5ac92 | [
"MIT"
] | null | null | null | Source/GASShooter/Private/AI/GSEnvQueryGenerator_ConeBetween.cpp | nwiswakarma/GASShooter | 7bd6bd016e1fd0eddb1ee96840b0891b56b5ac92 | [
"MIT"
] | null | null | null | //
#include "AI/GSEnvQueryGenerator_ConeBetween.h"
#include "EnvironmentQuery/Contexts/EnvQueryContext_Querier.h"
#include "GameFramework/Actor.h"
#define LOCTEXT_NAMESPACE "EnvQueryGenerator"
UGSEnvQueryGenerator_ConeBetween::UGSEnvQueryGenerator_ConeBetween(const FObjectInitializer& ObjectInitializer)
: Supe... | 35.680556 | 126 | 0.682756 | nwiswakarma |
da4b0bfb1d973e7210690cf150b0a5e40748cfef | 2,623 | cpp | C++ | src/depot_cmd.cpp | trademarks/OpenTTD | fd7fca73cf61a2960e8df8fa221b179d23ae3ef0 | [
"Unlicense"
] | 8 | 2016-10-21T09:01:43.000Z | 2021-05-31T06:32:14.000Z | src/depot_cmd.cpp | blackberry/OpenTTD | fd7fca73cf61a2960e8df8fa221b179d23ae3ef0 | [
"Unlicense"
] | null | null | null | src/depot_cmd.cpp | blackberry/OpenTTD | fd7fca73cf61a2960e8df8fa221b179d23ae3ef0 | [
"Unlicense"
] | 4 | 2017-05-16T00:15:58.000Z | 2020-08-06T01:46:31.000Z | /* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD 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, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without... | 29.144444 | 185 | 0.712162 | trademarks |
da4fc7953d116c4be0f3d9dc618c8d1516fcdaa6 | 2,549 | hpp | C++ | Tefnout/src/Tefnout/Memory/Allocator/LinearAllocator.hpp | JeremyBois/Tefnout | 3e0d79c96857a395d2f00a61bb25a49ce39c8c89 | [
"Apache-2.0",
"MIT"
] | null | null | null | Tefnout/src/Tefnout/Memory/Allocator/LinearAllocator.hpp | JeremyBois/Tefnout | 3e0d79c96857a395d2f00a61bb25a49ce39c8c89 | [
"Apache-2.0",
"MIT"
] | null | null | null | Tefnout/src/Tefnout/Memory/Allocator/LinearAllocator.hpp | JeremyBois/Tefnout | 3e0d79c96857a395d2f00a61bb25a49ce39c8c89 | [
"Apache-2.0",
"MIT"
] | null | null | null | #ifndef __LINEARALLOCATOR__HPP
#define __LINEARALLOCATOR__HPP
#include "Tefnout/Core/Core.hpp"
namespace Tefnout
{
namespace Memory
{
/**
* @brief A simple linear allocator policy where allocation and de-allocation is
* O(1). Alignment is handled under the hood.
*
* @note Allocations do no... | 27.117021 | 100 | 0.619459 | JeremyBois |
da4fee4b67372d22e0637f3dbcf3a89166f7e626 | 4,370 | cpp | C++ | oldlib/graph_tree/euler_tour_tree.cpp | hotman78/cpplib | c2f85c8741cdd0b731a5aa828b28b38c70c8d699 | [
"CC0-1.0"
] | null | null | null | oldlib/graph_tree/euler_tour_tree.cpp | hotman78/cpplib | c2f85c8741cdd0b731a5aa828b28b38c70c8d699 | [
"CC0-1.0"
] | null | null | null | oldlib/graph_tree/euler_tour_tree.cpp | hotman78/cpplib | c2f85c8741cdd0b731a5aa828b28b38c70c8d699 | [
"CC0-1.0"
] | null | null | null | template<typename T,typename E>
class euler_tour_tree{
public:
struct node;
using np=node*;
using lint=long long;
struct node{
np ch[2]={nullptr,nullptr};
np p=nullptr;
int l,r,sz=1,sz2=0;
T val=et,sum=et;
E lazy=ee;
node(){}
node(int l,int r,int sz2):l(l)... | 22.879581 | 87 | 0.482838 | hotman78 |
da58000550cd9c4eee77022b951ad35535a17d9d | 2,298 | cpp | C++ | week3/5_drawingWithTime_5/src/ofApp.cpp | evejweinberg/algo2012 | 7e13c20bab94e1769f6751c4e124964ae05b7087 | [
"MIT"
] | 94 | 2015-01-12T16:07:57.000Z | 2021-12-24T06:48:04.000Z | week3/5_drawingWithTime_5/src/ofApp.cpp | theomission/algo2012 | 7e13c20bab94e1769f6751c4e124964ae05b7087 | [
"MIT"
] | null | null | null | week3/5_drawingWithTime_5/src/ofApp.cpp | theomission/algo2012 | 7e13c20bab94e1769f6751c4e124964ae05b7087 | [
"MIT"
] | 18 | 2015-03-12T23:11:08.000Z | 2022-02-05T05:43:51.000Z | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetVerticalSync(true);
ofBackground(255, 255, 255);
TPR.setup();
playbackStartTime = 0;
}
//--------------------------------------------------------------
void ofApp::update(){
}
//-----------------... | 22.096154 | 88 | 0.4604 | evejweinberg |
da5be97110c83651858e63b8d5fc7f7fa64f6e36 | 9,786 | cpp | C++ | src/solution.cpp | JustAdamHere/MAGIC098-Exam | 1e3cf42b1a64fb0de64172ae0c13f1888362904a | [
"MIT"
] | null | null | null | src/solution.cpp | JustAdamHere/MAGIC098-Exam | 1e3cf42b1a64fb0de64172ae0c13f1888362904a | [
"MIT"
] | null | null | null | src/solution.cpp | JustAdamHere/MAGIC098-Exam | 1e3cf42b1a64fb0de64172ae0c13f1888362904a | [
"MIT"
] | null | null | null | /******************************************************************************
* @details This is a file containing definitions of [Solution].
*
* @author Adam Matthew Blakey
* @date 2019/12/07
******************************************************************************/
#include "common.hpp"
#includ... | 29.475904 | 151 | 0.663499 | JustAdamHere |
da5d86bcfe0742f3f0218782a94547346c75d3f8 | 5,808 | hpp | C++ | include/Lex.hpp | scribelang/scribe-poc | c1ba4dafbb3b38a5b408e068747a5ed0f3e49e25 | [
"MIT"
] | null | null | null | include/Lex.hpp | scribelang/scribe-poc | c1ba4dafbb3b38a5b408e068747a5ed0f3e49e25 | [
"MIT"
] | null | null | null | include/Lex.hpp | scribelang/scribe-poc | c1ba4dafbb3b38a5b408e068747a5ed0f3e49e25 | [
"MIT"
] | null | null | null | /*
MIT License
Copyright (c) 2021 Scribe Language Repositories
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, mod... | 18.093458 | 98 | 0.653409 | scribelang |
da628e531dd10aa259524bad0144b8955ef476b3 | 254 | cpp | C++ | Trees/MinDepthOfABinaryTree.cpp | ssokjin/Interview-Bit | 8714d3d627eb5875f49d205af779b59ca33ab4a3 | [
"MIT"
] | 513 | 2016-08-16T12:52:14.000Z | 2022-03-30T19:32:10.000Z | Trees/MinDepthOfABinaryTree.cpp | ssokjin/Interview-Bit | 8714d3d627eb5875f49d205af779b59ca33ab4a3 | [
"MIT"
] | 25 | 2018-02-14T15:25:48.000Z | 2022-03-23T11:52:08.000Z | Trees/MinDepthOfABinaryTree.cpp | ssokjin/Interview-Bit | 8714d3d627eb5875f49d205af779b59ca33ab4a3 | [
"MIT"
] | 505 | 2016-09-02T15:04:20.000Z | 2022-03-25T06:36:31.000Z | int Solution::minDepth(TreeNode* A) {
if(!A)return 0;
if(!A->left and !A->right) return 1;
if(!A->left)return minDepth(A->right) + 1;
if(!A->right)return minDepth(A->left) + 1;
return min(minDepth(A->left), minDepth(A->right)) + 1;
}
| 31.75 | 58 | 0.606299 | ssokjin |
da6355bf04591b39f389cd410f71b4d336749b85 | 402 | cpp | C++ | 2020.10.08-Lesson-4/Task3/ArrayList.cpp | st021213/programming-bach-2020-autumn | b0b62cc3ac46b981f272bc362398e63b4cb62e7f | [
"Apache-2.0"
] | 2 | 2020-10-09T20:44:11.000Z | 2020-10-11T16:57:01.000Z | 2020.10.08-Lesson-4/Task3/ArrayList.cpp | st021213/programming-bach-2020-autumn | b0b62cc3ac46b981f272bc362398e63b4cb62e7f | [
"Apache-2.0"
] | null | null | null | 2020.10.08-Lesson-4/Task3/ArrayList.cpp | st021213/programming-bach-2020-autumn | b0b62cc3ac46b981f272bc362398e63b4cb62e7f | [
"Apache-2.0"
] | 1 | 2020-09-30T15:55:47.000Z | 2020-09-30T15:55:47.000Z | #include "ArrayList.h"
ListArray::ListArray()
{
std::cout << "default constructor call" << std::endl;
count = 0;
capacity = 10;
data = new int[10];
}
ListArray::ListArray(int cap)
{
std::cout << "parametrized constructor call" << std::endl;
count = 0;
capacity = cap;
data = new int[cap];
}
ListArray::~ListArra... | 19.142857 | 59 | 0.641791 | st021213 |
da66ad53253963ba3d57bb434dc89f2247197b14 | 1,034 | cpp | C++ | DEPRICATED/MathTesting/Source/Shapes/Circle.cpp | Arzana/MathTesting | 11029e9456f97dc0961f633e7f1b6beb18d2508b | [
"MIT"
] | null | null | null | DEPRICATED/MathTesting/Source/Shapes/Circle.cpp | Arzana/MathTesting | 11029e9456f97dc0961f633e7f1b6beb18d2508b | [
"MIT"
] | null | null | null | DEPRICATED/MathTesting/Source/Shapes/Circle.cpp | Arzana/MathTesting | 11029e9456f97dc0961f633e7f1b6beb18d2508b | [
"MIT"
] | null | null | null | #include "Shapes\Circle.h"
#include "Core\Math.h"
bool Circle::AreColliding(Circle other) const
{
return dist(pos, other.pos) < rad + other.rad;
}
bool Circle::Contains(Vector2 v) const
{
return dist(pos, v) <= rad;
}
float Circle::GetIntersectionFactor(Circle other) const
{
return max(0.0f, (rad + other.rad) / 2... | 22.977778 | 64 | 0.656673 | Arzana |
da69b84a9fa6b6ceebb68952e249b367d5152f09 | 7,694 | cc | C++ | rgbd_slam/ORB_SLAM2_modified/src/pointcloudmapping.cc | AndyoyoZ/kinect_rgb_calibration | 80b6ff877879224cd3898f69d7f483f44f404079 | [
"Apache-2.0"
] | 1 | 2019-09-24T05:35:02.000Z | 2019-09-24T05:35:02.000Z | rgbd_slam/ORB_SLAM2_modified/src/pointcloudmapping.cc | AndyoyoZ/kinect_rgb_calibration | 80b6ff877879224cd3898f69d7f483f44f404079 | [
"Apache-2.0"
] | null | null | null | rgbd_slam/ORB_SLAM2_modified/src/pointcloudmapping.cc | AndyoyoZ/kinect_rgb_calibration | 80b6ff877879224cd3898f69d7f483f44f404079 | [
"Apache-2.0"
] | null | null | null | /*
* <one line to give the program's name and a brief idea of what it does.>
* Copyright (C) 2016 <copyright holder> <email>
*
* This program 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, either vers... | 33.452174 | 155 | 0.570834 | AndyoyoZ |
da6b147ba1f037f04d6bba52fc6fe47f209731c6 | 2,585 | hpp | C++ | Include/DialogMsgMatchers.hpp | kwiato88/WinApi | fca9b5bf22dcc9e9e3056d2062016099076771d8 | [
"MIT"
] | 1 | 2019-01-28T03:06:49.000Z | 2019-01-28T03:06:49.000Z | Include/DialogMsgMatchers.hpp | kwiato88/WinApi | fca9b5bf22dcc9e9e3056d2062016099076771d8 | [
"MIT"
] | null | null | null | Include/DialogMsgMatchers.hpp | kwiato88/WinApi | fca9b5bf22dcc9e9e3056d2062016099076771d8 | [
"MIT"
] | null | null | null | //This code is under MIT licence, you can find the complete file here: https://github.com/kwiato88/WinApi/blob/master/LICENSE
#ifndef WINAPI_DIALOGMSGMATCHERS_HPP
#define WINAPI_DIALOGMSGMATCHERS_HPP
#include <Windows.h>
#include <commctrl.h>
#include <functional>
namespace WinApi
{
namespace MsgMatchers
{... | 26.111111 | 126 | 0.714507 | kwiato88 |
da75cc65886fb1dfb8b1bd126d7e5b2597c56e72 | 1,193 | cpp | C++ | ASTU.PSMP.ConcurentGeneticAlgorithm/ASTU.PSMP.ConcurentGeneticAlgorithm/LoadBalancingAlgorithm.cpp | Mogikan/OpenMP | 7fa130159dfb32a9885c31b2c4e36de4ef36fa44 | [
"Apache-2.0"
] | null | null | null | ASTU.PSMP.ConcurentGeneticAlgorithm/ASTU.PSMP.ConcurentGeneticAlgorithm/LoadBalancingAlgorithm.cpp | Mogikan/OpenMP | 7fa130159dfb32a9885c31b2c4e36de4ef36fa44 | [
"Apache-2.0"
] | null | null | null | ASTU.PSMP.ConcurentGeneticAlgorithm/ASTU.PSMP.ConcurentGeneticAlgorithm/LoadBalancingAlgorithm.cpp | Mogikan/OpenMP | 7fa130159dfb32a9885c31b2c4e36de4ef36fa44 | [
"Apache-2.0"
] | null | null | null | #include "LoadBalancingAlgorithm.h"
LoadBalancingAlgorithm::LoadBalancingAlgorithm(shared_ptr<GeneticAlgorithmParameters> geneticParameters,shared_ptr<TaskList> tasklist):GeneticAlgorithm(geneticParameters)
{
this->tasks = tasklist;
}
LoadBalancingAlgorithm::~LoadBalancingAlgorithm()
{
}
shared_ptr<BalancerAlgo... | 33.138889 | 221 | 0.844091 | Mogikan |
da7ed6918b4f2371c4f953d7900598241fe8a64a | 40,251 | cpp | C++ | server source/otserv.cpp | zmovirzynski/PokeRoots | 3497a77ffb134af8ac6ae482e5c63d086d91ea41 | [
"MIT"
] | null | null | null | server source/otserv.cpp | zmovirzynski/PokeRoots | 3497a77ffb134af8ac6ae482e5c63d086d91ea41 | [
"MIT"
] | null | null | null | server source/otserv.cpp | zmovirzynski/PokeRoots | 3497a77ffb134af8ac6ae482e5c63d086d91ea41 | [
"MIT"
] | null | null | null | ////////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
////////////////////////////////////////////////////////////////////////
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License ... | 29.401753 | 327 | 0.671313 | zmovirzynski |
da899f7b8eac3f5fe9480f7a3b0de135fb6cb629 | 3,117 | cpp | C++ | test/ff.test.unit/source/data/dict_visitor_tests.cpp | spadapet/ff-engine | 244f653c5a25f22f2222842f32608f1101150c6f | [
"MIT"
] | null | null | null | test/ff.test.unit/source/data/dict_visitor_tests.cpp | spadapet/ff-engine | 244f653c5a25f22f2222842f32608f1101150c6f | [
"MIT"
] | null | null | null | test/ff.test.unit/source/data/dict_visitor_tests.cpp | spadapet/ff-engine | 244f653c5a25f22f2222842f32608f1101150c6f | [
"MIT"
] | null | null | null | #include "pch.h"
using namespace std::string_view_literals;
namespace ff::test::data
{
TEST_CLASS(dict_visitor_tests)
{
public:
TEST_METHOD(convert_number_to_string)
{
std::string json(
"{\n"
" 'foo': 1,\n"
" 'obj' : { 'nested':... | 32.46875 | 83 | 0.325634 | spadapet |
da9a2a7626086034e8094e7eb28b2d1246475ce7 | 599 | cpp | C++ | Codechef_Long_Chalenge_2021/tempCodeRunnerFile.cpp | AkashKumarSingh11032001/Coding-Challenge-Solutions | c46b5d466b1403b8e58b6ac9081298d617ad8611 | [
"MIT"
] | null | null | null | Codechef_Long_Chalenge_2021/tempCodeRunnerFile.cpp | AkashKumarSingh11032001/Coding-Challenge-Solutions | c46b5d466b1403b8e58b6ac9081298d617ad8611 | [
"MIT"
] | null | null | null | Codechef_Long_Chalenge_2021/tempCodeRunnerFile.cpp | AkashKumarSingh11032001/Coding-Challenge-Solutions | c46b5d466b1403b8e58b6ac9081298d617ad8611 | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
long long int ipow(long long int base, long long int exp)
{
long long int result = 1;
for (;;)
{
if (exp & 1)
result *= base;
exp >>= 1;
if (!exp)
break;
base *= base;
}
return result;
}
int main... | 16.189189 | 57 | 0.45576 | AkashKumarSingh11032001 |
daa84ff7a3f670755acdc743af86c06c8bcb3059 | 3,525 | cpp | C++ | 6Shots-V2/CPlayerPhysics.cpp | chrisdepas/6Shots | 2b339b1a367e3421d502e7815548d0b13ea3e32c | [
"CC0-1.0"
] | 1 | 2022-01-06T22:49:28.000Z | 2022-01-06T22:49:28.000Z | 6Shots-V2/CPlayerPhysics.cpp | chrisdepas/6Shots-Game | 2b339b1a367e3421d502e7815548d0b13ea3e32c | [
"CC0-1.0"
] | null | null | null | 6Shots-V2/CPlayerPhysics.cpp | chrisdepas/6Shots-Game | 2b339b1a367e3421d502e7815548d0b13ea3e32c | [
"CC0-1.0"
] | null | null | null | #include "stdafx.h"
#include "CPlayerPhysics.h"
#include "CWorldPhysics.h"
CPlayerPhysics::~CPlayerPhysics() {
}
void CPlayerPhysics::InitPhysics(CWorldPhysics* pWorldPhysics, int initPosX, int initPosY, int width, int height, bool bAffectedByGravity, int IDData) {
b2BodyDef def;
if (bAffectedByGravi... | 26.111111 | 153 | 0.667801 | chrisdepas |
dab0403f78c3972bda0fa010aea8b5160cdcd2e7 | 984 | hpp | C++ | Leetcode_C++/Leetcode_C++/MyQueue.hpp | cwwise/Leetcode | 5f8879945057312acd76492370e48314e4ec3b64 | [
"MIT"
] | null | null | null | Leetcode_C++/Leetcode_C++/MyQueue.hpp | cwwise/Leetcode | 5f8879945057312acd76492370e48314e4ec3b64 | [
"MIT"
] | null | null | null | Leetcode_C++/Leetcode_C++/MyQueue.hpp | cwwise/Leetcode | 5f8879945057312acd76492370e48314e4ec3b64 | [
"MIT"
] | null | null | null | //
// MyQueue.hpp
// Leetcode_C++
//
// Created by chenwei on 2020/3/29.
// Copyright © 2020 chenwei. All rights reserved.
//
#ifndef MyQueue_hpp
#define MyQueue_hpp
#include <stdio.h>
#include <stack>
class MyQueue {
public:
//
stack<int> left;
stack<int> right;
/** Initialize your data structur... | 18.222222 | 79 | 0.522358 | cwwise |
dab2264019f4c6b477ca83465ce9f79c90d49326 | 17,127 | cpp | C++ | 111004_stereo_anccDlg.cpp | ntthuy11/stereo-matching-ancc | c0ead82c56ccdc205bf87979dea7a7951a12c65e | [
"MIT"
] | 3 | 2020-10-15T06:09:05.000Z | 2022-03-01T05:12:57.000Z | 111004_stereo_anccDlg.cpp | ntthuy11/stereo-matching-ancc | c0ead82c56ccdc205bf87979dea7a7951a12c65e | [
"MIT"
] | null | null | null | 111004_stereo_anccDlg.cpp | ntthuy11/stereo-matching-ancc | c0ead82c56ccdc205bf87979dea7a7951a12c65e | [
"MIT"
] | null | null | null |
// 111004_stereo_anccDlg.cpp : implementation file
//
#include "stdafx.h"
#include "111004_stereo_ancc.h"
#include "111004_stereo_anccDlg.h"
#include "afxdialogex.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMy111004_stereo_anccDlg dialog
CMy111004_stereo_anccDlg::CMy111004_stereo_anccD... | 32.873321 | 181 | 0.725404 | ntthuy11 |
dab3705017ebb4b588e6821fabe8d642c8b868da | 10,454 | hh | C++ | src/include/usb-cxx.hh | bad-alloc-heavy-industries/usb-cxx | f7cfd917b1da624f0bf41f21bf91280d17488baf | [
"BSD-3-Clause"
] | 1 | 2021-07-03T00:32:39.000Z | 2021-07-03T00:32:39.000Z | src/include/usb-cxx.hh | bad-alloc-heavy-industries/usb-cxx | f7cfd917b1da624f0bf41f21bf91280d17488baf | [
"BSD-3-Clause"
] | null | null | null | src/include/usb-cxx.hh | bad-alloc-heavy-industries/usb-cxx | f7cfd917b1da624f0bf41f21bf91280d17488baf | [
"BSD-3-Clause"
] | null | null | null | // SPDX-License-Identifier: BSD-3-Clause
#pragma once
#if !defined(USB_CXX_HH)
#define USB_CXX_HH
#include <libusb.h>
#include <string_view>
#include <memory>
#include <optional>
#include <string>
#include <type_traits>
namespace usb_cxx {
using std::literals::string_view_literals::sv;
struct usb_endpoint_t final... | 28.562842 | 150 | 0.678114 | bad-alloc-heavy-industries |
dabf07ac0e295fa87b2b91830fc8c22d034bc555 | 1,301 | cpp | C++ | CodeRed/DirectX12/DirectX12PipelineState/DirectX12BlendState.cpp | LinkClinton/Code-Red | 491621144aba559f068c7f91d71e3d0d7c87761e | [
"MIT"
] | 34 | 2019-09-11T09:12:16.000Z | 2022-02-13T12:50:25.000Z | CodeRed/DirectX12/DirectX12PipelineState/DirectX12BlendState.cpp | LinkClinton/Code-Red | 491621144aba559f068c7f91d71e3d0d7c87761e | [
"MIT"
] | 7 | 2019-09-22T14:21:26.000Z | 2020-03-24T10:36:20.000Z | CodeRed/DirectX12/DirectX12PipelineState/DirectX12BlendState.cpp | LinkClinton/Code-Red | 491621144aba559f068c7f91d71e3d0d7c87761e | [
"MIT"
] | 6 | 2019-10-21T18:05:55.000Z | 2021-04-22T05:07:30.000Z | #include "DirectX12BlendState.hpp"
#ifdef __ENABLE__DIRECTX12__
using namespace CodeRed::DirectX12;
CodeRed::DirectX12BlendState::DirectX12BlendState(
const std::shared_ptr<GpuLogicalDevice> &device,
const std::vector<BlendProperty>& blend_properties) :
GpuBlendState(device, blend_properties)
{
mBlendState.Alpha... | 41.967742 | 90 | 0.810915 | LinkClinton |
dac13dc1b7229156e822e8bc0643e3d24e6d797b | 98,525 | cpp | C++ | frameworks/runtime-src/Classes/anysdk_manual_bindings.cpp | AnySDK/Sample_Lua | 9ce854c814400a0ed6d1c4586677bf479106d643 | [
"MIT"
] | 14 | 2015-01-29T08:41:15.000Z | 2017-09-03T14:29:32.000Z | frameworks/runtime-src/Classes/anysdk_manual_bindings.cpp | edwardzhou/ddz-client | ed5db2b625cc55192027ffd69e0ec5f342a40222 | [
"MIT"
] | 1 | 2016-09-20T10:54:53.000Z | 2016-09-20T10:54:53.000Z | frameworks/runtime-src/Classes/anysdk_manual_bindings.cpp | AnySDK/Sample_Lua | 9ce854c814400a0ed6d1c4586677bf479106d643 | [
"MIT"
] | 22 | 2015-01-05T08:07:50.000Z | 2019-03-25T07:52:48.000Z | /*
** Lua binding: sdk
** Generated automatically by tolua++-1.0.92 on Wed Jul 2 14:12:17 2014.
*/
/****************************************************************************
Copyright (c) 2011 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
... | 30.343394 | 130 | 0.632804 | AnySDK |
dac23a48d9aa9c2418eb5130d7410b4b86860d01 | 1,300 | cpp | C++ | src/game/cmd/Unmute.cpp | jumptohistory/jaymod | 92d0a0334ac27da94b12280b0b42b615b8813c23 | [
"Apache-2.0"
] | 25 | 2016-05-27T11:53:58.000Z | 2021-10-17T00:13:41.000Z | src/game/cmd/Unmute.cpp | jumptohistory/jaymod | 92d0a0334ac27da94b12280b0b42b615b8813c23 | [
"Apache-2.0"
] | 1 | 2016-07-09T05:25:03.000Z | 2016-07-09T05:25:03.000Z | src/game/cmd/Unmute.cpp | jumptohistory/jaymod | 92d0a0334ac27da94b12280b0b42b615b8813c23 | [
"Apache-2.0"
] | 16 | 2016-05-28T23:06:50.000Z | 2022-01-26T13:47:12.000Z | #include <bgame/impl.h>
namespace cmd {
///////////////////////////////////////////////////////////////////////////////
Unmute::Unmute()
: AbstractBuiltin( "unmute" )
{
__usage << xvalue( "!" + _name ) << ' ' << xvalue( "PLAYER" );
__descr << "Allow a player to talk again.";
}
//////////////////////////... | 24.528302 | 79 | 0.45 | jumptohistory |
dac4344807bccd0232c98bc514fac95202de0fd6 | 5,072 | cpp | C++ | genccjson.cpp | JehTeh/jel | 2c43cf23ea7b89e7ec0f7c2e9549be74ab0bbc4b | [
"MIT"
] | 14 | 2018-10-09T00:08:26.000Z | 2021-09-24T19:49:42.000Z | genccjson.cpp | JehTeh/jel | 2c43cf23ea7b89e7ec0f7c2e9549be74ab0bbc4b | [
"MIT"
] | null | null | null | genccjson.cpp | JehTeh/jel | 2c43cf23ea7b89e7ec0f7c2e9549be74ab0bbc4b | [
"MIT"
] | null | null | null | #include <windows.h>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <fstream>
const char cflags_line_identifer[] = "CFLAGS";
const char cppflags_line_identifer[] = "CPPFLAGS";
int main(int argc, char** argv)
{
std::cout << std::endl << "======== compile_commands.json generator... | 35.71831 | 139 | 0.537263 | JehTeh |
dac8a5d468e6b8c4db8d794052b5cb69ddbc25ce | 613 | cpp | C++ | ARRAY/more efficient of left rotate by d time.cpp | ghostumar/DSA | ca8ca00d1c2cb132c46ace68f862c09883491f3c | [
"Apache-2.0"
] | null | null | null | ARRAY/more efficient of left rotate by d time.cpp | ghostumar/DSA | ca8ca00d1c2cb132c46ace68f862c09883491f3c | [
"Apache-2.0"
] | null | null | null | ARRAY/more efficient of left rotate by d time.cpp | ghostumar/DSA | ca8ca00d1c2cb132c46ace68f862c09883491f3c | [
"Apache-2.0"
] | null | null | null | #include<iostream>
using namespace std;
void reverse(int arr[],int n,int d){
int low=0,high=n-1;
while(low<high){
int temp=arr[low];
arr[low]=arr[high];
arr[high]=temp;
low++;
high--;
}
}
void rotate_byd(int arr[],int n,int d){//not working
if(d==0)
return;
//d=d%n;
if(d=d%n){
... | 16.567568 | 53 | 0.549755 | ghostumar |
dac99b331b99d548eff2f9e6ece2d530d37e4850 | 3,582 | cpp | C++ | ExEditPropertyWindowFixer/ScrollContainerView.cpp | amate/PropertyWindowFixerPlugin | 3a44870de703fe606c39ce28afc25bc88b0e15b3 | [
"MIT"
] | 17 | 2019-12-15T07:03:24.000Z | 2022-03-10T21:59:45.000Z | ExEditPropertyWindowFixer/ScrollContainerView.cpp | amate/PropertyWindowFixerPlugin | 3a44870de703fe606c39ce28afc25bc88b0e15b3 | [
"MIT"
] | 5 | 2021-12-08T18:43:42.000Z | 2022-02-27T14:39:41.000Z | ExEditPropertyWindowFixer/ScrollContainerView.cpp | amate/PropertyWindowFixerPlugin | 3a44870de703fe606c39ce28afc25bc88b0e15b3 | [
"MIT"
] | null | null | null |
#include "stdafx.h"
#include "ScrollContainerView.h"
LRESULT CALLBACK GetMsgProc(
_In_ int code,
_In_ WPARAM wParam,
_In_ LPARAM lParam
)
{
}
CScrollConteinerView::CScrollConteinerView()
{
}
void CScrollConteinerView::DoScroll(int nType, int nScrollCode, int& cxyOffset, int cxySizeAll, int cxySizePage, in... | 21.709091 | 133 | 0.705193 | amate |
daccab7c3d878c24ab0bdafa616edebf027e82a4 | 3,184 | cpp | C++ | src/lex/token_kind.cpp | BastianBlokland/novus | 3b984c36855aa84d6746c14ff7e294ab7d9c1575 | [
"MIT"
] | 14 | 2020-04-14T17:00:56.000Z | 2021-08-30T08:29:26.000Z | src/lex/token_kind.cpp | BastianBlokland/novus | 3b984c36855aa84d6746c14ff7e294ab7d9c1575 | [
"MIT"
] | 27 | 2020-12-27T16:00:44.000Z | 2021-08-01T13:12:14.000Z | src/lex/token_kind.cpp | BastianBlokland/novus | 3b984c36855aa84d6746c14ff7e294ab7d9c1575 | [
"MIT"
] | 1 | 2020-05-29T18:33:37.000Z | 2020-05-29T18:33:37.000Z | #include "lex/token_kind.hpp"
namespace lex {
auto operator<<(std::ostream& out, const TokenKind& rhs) -> std::ostream& {
switch (rhs) {
case TokenKind::OpPlus:
out << "+";
break;
case TokenKind::OpPlusPlus:
out << "++";
break;
case TokenKind::OpMinus:
out << "-";
break;
case TokenKi... | 18.619883 | 75 | 0.54554 | BastianBlokland |
dad3824e916a256deb6c7745c9c2384cd302ccd3 | 7,352 | cpp | C++ | segment/seg_test_g.cpp | Bouncner/PAM | 191e6cee8bbd6610aaa437205241d3281f73324b | [
"MIT"
] | 3 | 2021-03-29T05:54:10.000Z | 2022-02-27T05:09:32.000Z | segment/seg_test_g.cpp | Bouncner/PAM | 191e6cee8bbd6610aaa437205241d3281f73324b | [
"MIT"
] | 1 | 2020-12-21T21:40:37.000Z | 2020-12-23T19:53:02.000Z | segment/seg_test_g.cpp | Bouncner/PAM | 191e6cee8bbd6610aaa437205241d3281f73324b | [
"MIT"
] | null | null | null | //#define GLIBCXX_PARALLEL
#include <algorithm>
#include <iostream>
#include <vector>
#include <random>
#include <climits>
#include <cstdlib>
#include <iomanip>
#include "segment_g.h"
#include "pbbslib/get_time.h"
#include "pbbslib/sequence_ops.h"
#include "pbbslib/parse_command_line.h"
using namespace std;
int str... | 28.276923 | 153 | 0.585419 | Bouncner |
dadb4d050302281a7cec6d0453f7fa47f9db0dce | 128 | hpp | C++ | dependencies/glm/gtx/normal.hpp | realtehcman/-UnderwaterSceneProject | 72cbd375ef5e175bed8f4e8a4d117f5340f239a4 | [
"MIT"
] | null | null | null | dependencies/glm/gtx/normal.hpp | realtehcman/-UnderwaterSceneProject | 72cbd375ef5e175bed8f4e8a4d117f5340f239a4 | [
"MIT"
] | null | null | null | dependencies/glm/gtx/normal.hpp | realtehcman/-UnderwaterSceneProject | 72cbd375ef5e175bed8f4e8a4d117f5340f239a4 | [
"MIT"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:c1acb783fb2d2eabdb3159640b2f5890b29d6f9eeda0df986fba3e8ec380555b
size 894
| 32 | 75 | 0.882813 | realtehcman |
dadc42a886eaa1b131c1ac2914bcff6c4de5528f | 5,931 | cpp | C++ | src/redis_connect.cpp | andyzhshg/tml | 5165a972dcb6ac9485b33cb0c2733546efe5d58c | [
"MIT"
] | 1 | 2016-04-06T06:52:16.000Z | 2016-04-06T06:52:16.000Z | src/redis_connect.cpp | andyzhshg/tml | 5165a972dcb6ac9485b33cb0c2733546efe5d58c | [
"MIT"
] | null | null | null | src/redis_connect.cpp | andyzhshg/tml | 5165a972dcb6ac9485b33cb0c2733546efe5d58c | [
"MIT"
] | null | null | null | // Name: redis_connect
// Description: redis connect client
// Author: zhangshiguang
// Email: andyzhshg@gmail.com
// Date: 2016-03
#include "redis_connect.h"
#include <string.h>
namespace tml {
redis_connect::redis_connect(const std::string &ip, int port)
... | 29.216749 | 128 | 0.56348 | andyzhshg |
dae54c96c3033efa17d1b1ae84fcfdafe2fcd0a6 | 495 | cpp | C++ | Redrov/sem_2/insertion_sort/main.cpp | soomrack/MR2020 | 2de7289665dcdac4a436eb512f283780aa78cb76 | [
"MIT"
] | 4 | 2020-09-22T12:04:07.000Z | 2020-10-03T22:28:00.000Z | Redrov/sem_2/insertion_sort/main.cpp | soomrack/MR2020 | 2de7289665dcdac4a436eb512f283780aa78cb76 | [
"MIT"
] | null | null | null | Redrov/sem_2/insertion_sort/main.cpp | soomrack/MR2020 | 2de7289665dcdac4a436eb512f283780aa78cb76 | [
"MIT"
] | null | null | null | #include "iostream"
void insertion_sort(int* array, size_t size){
for (int i = 0; i < size; i++)
{
for (int j = i; j > 0; j--)
{
if (array[j - 1] < array[j] ) { break; }
std::swap(array[j], array[j - 1]);
}
}
}
int main(int argc, char const *argv[])
{
... | 16.5 | 52 | 0.420202 | soomrack |
dae7a5babfd6832c46993eba8c6d7d795ca4cbda | 1,135 | cpp | C++ | vkinterface/surface.cpp | Lut1n/Vulkan-BrickBreaker | 05b2c9a59277d2a18e4ba8085ccc77ce620a8ca8 | [
"MIT"
] | 1 | 2020-06-15T01:44:13.000Z | 2020-06-15T01:44:13.000Z | vkinterface/surface.cpp | Lut1n/Vulkan-BrickBreaker | 05b2c9a59277d2a18e4ba8085ccc77ce620a8ca8 | [
"MIT"
] | null | null | null | vkinterface/surface.cpp | Lut1n/Vulkan-BrickBreaker | 05b2c9a59277d2a18e4ba8085ccc77ce620a8ca8 | [
"MIT"
] | null | null | null | #include "surface.h"
#include "instance.h"
//--------------------------------------------------------------
Surface::Surface(Instance* vkinstance, GLFWwindow* window)
: VkInsObject(vkinstance)
, m_window(window)
{
}
//--------------------------------------------------------------
Surface::~Surface(... | 25.222222 | 95 | 0.414097 | Lut1n |
daece4504f275fcea2d3f337da76f651c4a684b1 | 745 | cpp | C++ | c++11/understanding-cpp11/chapter7/7-3-14.cpp | cuiwm/choe_lib | 6992c7bf551e7d6d633399b21b028e6873d5e6e8 | [
"MIT"
] | null | null | null | c++11/understanding-cpp11/chapter7/7-3-14.cpp | cuiwm/choe_lib | 6992c7bf551e7d6d633399b21b028e6873d5e6e8 | [
"MIT"
] | null | null | null | c++11/understanding-cpp11/chapter7/7-3-14.cpp | cuiwm/choe_lib | 6992c7bf551e7d6d633399b21b028e6873d5e6e8 | [
"MIT"
] | null | null | null | #include <vector>
#include <algorithm>
using namespace std;
vector<int> nums;
vector<int> largeNums;
class LNums{
public:
LNums(int u): ubound(u){}
void operator () (int i) const
{
if (i > ubound)
largeNums.push_back(i);
}
private:
int uboun... | 19.102564 | 61 | 0.516779 | cuiwm |
daf310510264be9a7a3a2ce4a4c7a5a4bab8b8eb | 1,905 | cpp | C++ | bench/simple_bench.cpp | pyrbin/realm.hpp | e34b18ce1f5c39b080a9e70f675adf740490ff83 | [
"MIT"
] | 2 | 2020-03-01T18:15:27.000Z | 2020-03-25T10:21:59.000Z | bench/simple_bench.cpp | pyrbin/realm.hpp | e34b18ce1f5c39b080a9e70f675adf740490ff83 | [
"MIT"
] | null | null | null | bench/simple_bench.cpp | pyrbin/realm.hpp | e34b18ce1f5c39b080a9e70f675adf740490ff83 | [
"MIT"
] | 1 | 2020-03-25T10:22:00.000Z | 2020-03-25T10:22:00.000Z | #include <realm/realm.hpp>
#include "util/components.hpp"
#include "util/timer.hpp"
// TODO: Use a benchmark library/framework
struct movement_system
{
int collection{ 0 };
void update(pos& p, const dir& d, const runtime&) const
{
p.x += d.x;
p.y += d.y;
}
};
struct comflab_system
{
... | 20.934066 | 72 | 0.539633 | pyrbin |
daf4a9a4c2449ce7a68db1a2f6e135ee624aca98 | 10,981 | cpp | C++ | Plugins/Laser/mcplugin_laser.cpp | alexanderoster/AutodeskMachineControlFramework | 17aec986c2cb3c9ea46bbe583bdc0e766e6f980b | [
"BSD-3-Clause"
] | null | null | null | Plugins/Laser/mcplugin_laser.cpp | alexanderoster/AutodeskMachineControlFramework | 17aec986c2cb3c9ea46bbe583bdc0e766e6f980b | [
"BSD-3-Clause"
] | null | null | null | Plugins/Laser/mcplugin_laser.cpp | alexanderoster/AutodeskMachineControlFramework | 17aec986c2cb3c9ea46bbe583bdc0e766e6f980b | [
"BSD-3-Clause"
] | null | null | null | /*++
Copyright (C) 2020 Autodesk Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the follow... | 37.097973 | 176 | 0.647118 | alexanderoster |
daf507247a3ea863d716707dbc5c74e92dc40646 | 2,266 | hpp | C++ | include/ast/AST.hpp | sigalor/scratch-code-ast | 135a98476a4cd28227a213e3574cdf41851cde03 | [
"Apache-2.0"
] | 1 | 2020-05-09T10:59:43.000Z | 2020-05-09T10:59:43.000Z | include/ast/AST.hpp | sigalor/scratch-code-ast | 135a98476a4cd28227a213e3574cdf41851cde03 | [
"Apache-2.0"
] | null | null | null | include/ast/AST.hpp | sigalor/scratch-code-ast | 135a98476a4cd28227a213e3574cdf41851cde03 | [
"Apache-2.0"
] | 1 | 2020-05-09T10:59:44.000Z | 2020-05-09T10:59:44.000Z | /*
* Copyright 2016 sigalor
*
* File: scratch-code-ast/include/ast/AST.hpp
*
* 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-... | 30.213333 | 77 | 0.705649 | sigalor |
daf561ad666d952c87083a45b06bca009e2b1584 | 2,285 | cpp | C++ | src/KMeansBase.cpp | kroolp/betterKMeans | fdbd537aef534bcea6f7963f6b0db8dafb990257 | [
"MIT"
] | null | null | null | src/KMeansBase.cpp | kroolp/betterKMeans | fdbd537aef534bcea6f7963f6b0db8dafb990257 | [
"MIT"
] | 1 | 2017-06-04T00:54:04.000Z | 2017-06-06T22:14:19.000Z | src/KMeansBase.cpp | kroolp/betterKMeans | fdbd537aef534bcea6f7963f6b0db8dafb990257 | [
"MIT"
] | null | null | null | #include <cmath>
#include <limits>
#include "../include/KMeansBase.hpp"
#include <iostream>
KMeansBase::KMeansBase(mat pointsMatrix, int k, double epsilon, int maxIter, vec omega, string expression)
:pointsMatrix(pointsMatrix), k(k), epsilon(epsilon), maxIter(maxIter), iterationCount(0),
omega(omega), expression(expr... | 20.772727 | 106 | 0.642888 | kroolp |
dafb9b6006afcf7da27f983ebedb5d1d1c8ef1cf | 4,901 | cpp | C++ | Engine/Src/Ancona/Framework/Serializing/MapSerializer.cpp | ild-games/Ancona | 6a4f520f97d17648a6dd3ba0582cd51da4f9e809 | [
"MIT"
] | 11 | 2018-04-15T21:00:48.000Z | 2021-12-30T20:55:21.000Z | Engine/Src/Ancona/Framework/Serializing/MapSerializer.cpp | tlein/Ancona | 6a4f520f97d17648a6dd3ba0582cd51da4f9e809 | [
"MIT"
] | 58 | 2016-04-17T20:41:25.000Z | 2017-02-27T01:21:46.000Z | Engine/Src/Ancona/Framework/Serializing/MapSerializer.cpp | ild-games/Ancona | 6a4f520f97d17648a6dd3ba0582cd51da4f9e809 | [
"MIT"
] | 4 | 2018-05-04T17:03:20.000Z | 2021-02-12T21:26:57.000Z | #include <Ancona/Util/Json.hpp>
#include <Ancona/Framework/Config/Config.hpp>
#include <Ancona/Framework/Serializing/Serializing.hpp>
using namespace ild;
std::unique_ptr<rapidjson::Document> MapSerializer::_lastMapRoot = std::unique_ptr<rapidjson::Document>(new rapidjson::Document());
std::string MapSerializer::_las... | 30.63125 | 131 | 0.644154 | ild-games |
9707605fb713b78e9d0b27037d8abbbb60458f44 | 2,927 | cpp | C++ | leetcode/cpp/091.cpp | xpharry/leetcode_and_lintcode_battle | a06d966ad45bdbed6dda51cf0b480592fc4000d6 | [
"MIT"
] | null | null | null | leetcode/cpp/091.cpp | xpharry/leetcode_and_lintcode_battle | a06d966ad45bdbed6dda51cf0b480592fc4000d6 | [
"MIT"
] | null | null | null | leetcode/cpp/091.cpp | xpharry/leetcode_and_lintcode_battle | a06d966ad45bdbed6dda51cf0b480592fc4000d6 | [
"MIT"
] | 2 | 2020-09-29T21:59:43.000Z | 2021-06-22T13:24:04.000Z | /**
* Code description
*
* Author: xpharry
* Date: 11/11/2018
*
* Data structure:
* Array, Stack
*
* Idea:
* - DP.
* - version 1
* - 每次看两位:
* a) 当前位大于0(后者说:>=1 && <= 9),当前位可以单独被decode;
* b) 当前位和前一位组成的数是否处于10-26的范围内,是的话,该两位可以被decode。
*
* Complexity:
* O()
*
*/
class Soluti... | 22.867188 | 82 | 0.433208 | xpharry |
8cca9476f74fa648cd716800bf2518d430aa39c1 | 3,437 | cpp | C++ | src/objects/image.cpp | Gathros/SegVL | 0e5c682d8ba0e63129384f7ba102203ce801f4d8 | [
"MIT"
] | 11 | 2018-05-06T17:50:47.000Z | 2021-11-25T15:58:49.000Z | src/objects/image.cpp | leios/GathVL | 66aec6e53c1e3bc40aad7cd40a8a5e9d3cf53450 | [
"MIT"
] | 5 | 2018-05-01T21:10:13.000Z | 2021-12-16T15:46:55.000Z | src/objects/image.cpp | leios/GathVL | 66aec6e53c1e3bc40aad7cd40a8a5e9d3cf53450 | [
"MIT"
] | 4 | 2018-04-29T16:42:39.000Z | 2021-12-16T13:20:45.000Z | #include "../../include/objects/image.h"
#define STB_IMAGE_IMPLEMENTATION
#include "../../include/stb_image.h"
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include "../../include/stb_image_resize.h"
#include <cstdlib>
#include <iostream>
static inline void format_converter(unsigned char *in, unsigned char *out,
... | 29.886957 | 79 | 0.491417 | Gathros |
8ccb1f5f185b1f2c105bc332e8ab2601e77194f4 | 3,557 | hpp | C++ | general/src/ValueTypeDef.hpp | mrpPhys/Isis | 0322a660e75f13605b0e6fc9688b0ca99b72999d | [
"MIT"
] | null | null | null | general/src/ValueTypeDef.hpp | mrpPhys/Isis | 0322a660e75f13605b0e6fc9688b0ca99b72999d | [
"MIT"
] | null | null | null | general/src/ValueTypeDef.hpp | mrpPhys/Isis | 0322a660e75f13605b0e6fc9688b0ca99b72999d | [
"MIT"
] | null | null | null | //////////////////////////////////////////////////////////////////////////////////
//
// General package
//
// -------------------------------------------------------------------------------
//
// AUTHOR: Miguel Ramos Pernas
// e-mail: miguel.ramos.pernas@cern.ch
//
// Last update: 10/04/2017
//
// ----------------... | 36.670103 | 84 | 0.649143 | mrpPhys |
8cdbbf883d5f30ffc57c0c5ff08fa155ada98549 | 1,933 | cpp | C++ | examples/Switch.System/ConsoleInfo/ConsoleInfo.cpp | victor-timoshin/Switch | 8e8e687a8bdc4f79d482680da3968e9b3e464b8b | [
"MIT"
] | 4 | 2020-02-11T13:22:58.000Z | 2022-02-24T00:37:43.000Z | examples/Switch.System/ConsoleInfo/ConsoleInfo.cpp | sgf/Switch | 8e8e687a8bdc4f79d482680da3968e9b3e464b8b | [
"MIT"
] | null | null | null | examples/Switch.System/ConsoleInfo/ConsoleInfo.cpp | sgf/Switch | 8e8e687a8bdc4f79d482680da3968e9b3e464b8b | [
"MIT"
] | 2 | 2020-02-01T02:19:01.000Z | 2021-12-30T06:44:00.000Z | #include <Switch/Switch>
using namespace System;
namespace Examples {
class Program {
public:
// The main entry point for the application.
static void Main() {
Console::WriteLine("BackgroundColor = {0}", Console::BackgroundColor);
Console::WriteLine("ForegroundColor = {0}", Console::Foreground... | 44.953488 | 86 | 0.682359 | victor-timoshin |
8cdef65f2fabd12d5c66a9ce890b15ce7986f1ea | 177 | cc | C++ | build/ARM/python/swig/range.i_init.cc | Jakgn/gem5_test | 0ba7cc5213cf513cf205af7fc995cf679ebc1a3f | [
"BSD-3-Clause"
] | null | null | null | build/ARM/python/swig/range.i_init.cc | Jakgn/gem5_test | 0ba7cc5213cf513cf205af7fc995cf679ebc1a3f | [
"BSD-3-Clause"
] | null | null | null | build/ARM/python/swig/range.i_init.cc | Jakgn/gem5_test | 0ba7cc5213cf513cf205af7fc995cf679ebc1a3f | [
"BSD-3-Clause"
] | null | null | null | #include "sim/init.hh"
extern "C" {
void init_range();
}
EmbeddedSwig embed_swig_range(init_range, "m5.internal._range");
| 19.666667 | 72 | 0.514124 | Jakgn |
8ce8470adfabc7d2341ae999a26a1ac3f8456b56 | 1,263 | hpp | C++ | cgi/function/hello/hello.hpp | harryoh/api-gateway | 9576d499c35fbf8d8304f470e825acaa7d9a4674 | [
"MIT"
] | null | null | null | cgi/function/hello/hello.hpp | harryoh/api-gateway | 9576d499c35fbf8d8304f470e825acaa7d9a4674 | [
"MIT"
] | null | null | null | cgi/function/hello/hello.hpp | harryoh/api-gateway | 9576d499c35fbf8d8304f470e825acaa7d9a4674 | [
"MIT"
] | null | null | null | #ifndef HELLO_H_
#define HELLO_H_
///////////////////////////////////////////////////////////////////////////////
/// @file hello.hpp
/// @brief The Hello class
/// @~
/// @author Harry Oh (harry.oh@udptechnology.com)
/// @copyright UDP Technology
////////////////////////////////////////////////////////... | 19.734375 | 79 | 0.538401 | harryoh |
8cec5e95ec082b0f5ea02dec822b2f925320127a | 1,876 | hpp | C++ | Extensions/ZilchShaders/OperatorKeys.hpp | jodavis42/ZeroPhysicsTestbed | e84a3f6faf16b7a4242dc049121b5338e80039f8 | [
"MIT"
] | 1 | 2022-03-26T21:08:19.000Z | 2022-03-26T21:08:19.000Z | Extensions/ZilchShaders/OperatorKeys.hpp | jodavis42/ZeroPhysicsTestbed | e84a3f6faf16b7a4242dc049121b5338e80039f8 | [
"MIT"
] | null | null | null | Extensions/ZilchShaders/OperatorKeys.hpp | jodavis42/ZeroPhysicsTestbed | e84a3f6faf16b7a4242dc049121b5338e80039f8 | [
"MIT"
] | null | null | null | ///////////////////////////////////////////////////////////////////////////////
///
/// Authors: Joshua Davis
/// Copyright 2018, DigiPen Institute of Technology
///
///////////////////////////////////////////////////////////////////////////////
#pragma once
namespace Zero
{
//-----------------------------... | 33.5 | 88 | 0.574627 | jodavis42 |
8ced6f6814500627c754d7abadb0f5df62448fb3 | 19,896 | cc | C++ | progprojet/trial/Qt_GL/vue_opengl.cc | YoussefSaied/MagneticFrustration | d3df5a70f4926540b97695170d85b15b8d895890 | [
"MIT"
] | 1 | 2020-12-18T15:39:49.000Z | 2020-12-18T15:39:49.000Z | progprojet/trial/Qt_GL/vue_opengl.cc | YoussefSaied/MagneticFrustration | d3df5a70f4926540b97695170d85b15b8d895890 | [
"MIT"
] | null | null | null | progprojet/trial/Qt_GL/vue_opengl.cc | YoussefSaied/MagneticFrustration | d3df5a70f4926540b97695170d85b15b8d895890 | [
"MIT"
] | null | null | null | #include "vue_opengl.h"
#include "vertex_shader.h" // Identifiants Qt de nos différents attributs
#include "Systeme.h"
#include "Dalle.h"
#include "Sphere.h"
#include "Brique.h"
#include "Cylinder.h"
using namespace std;
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =... | 39.011765 | 156 | 0.606755 | YoussefSaied |
8cefc7783329e0bf6d7e50959209034c86a27035 | 2,952 | hpp | C++ | contrib/autoboost/autoboost/preprocessor/list/first_n.hpp | CaseyCarter/autowiring | 48e95a71308318c8ffb7ed1348e034fd9110f70c | [
"Apache-2.0"
] | 87 | 2015-01-18T00:43:06.000Z | 2022-02-11T17:40:50.000Z | contrib/autoboost/autoboost/preprocessor/list/first_n.hpp | CaseyCarter/autowiring | 48e95a71308318c8ffb7ed1348e034fd9110f70c | [
"Apache-2.0"
] | 274 | 2015-01-03T04:50:49.000Z | 2021-03-08T09:01:09.000Z | contrib/autoboost/autoboost/preprocessor/list/first_n.hpp | CaseyCarter/autowiring | 48e95a71308318c8ffb7ed1348e034fd9110f70c | [
"Apache-2.0"
] | 15 | 2015-09-30T20:58:43.000Z | 2020-12-19T21:24:56.000Z | # /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.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)
# */
#
# /* Revised by Paul Mensonides (2002) */
#
# /* See http://www.boost... | 50.033898 | 236 | 0.792005 | CaseyCarter |
8cf25d92f3e81736006101f1aabe278e11b57e51 | 11,835 | hpp | C++ | include/morphotree/attributes/bitquads/quadCountTreeOfShapesComputer.hpp | dennisjosesilva/morphotree | 3be4ff7f36de65772ef273a61b0bc5916e2904d9 | [
"MIT"
] | null | null | null | include/morphotree/attributes/bitquads/quadCountTreeOfShapesComputer.hpp | dennisjosesilva/morphotree | 3be4ff7f36de65772ef273a61b0bc5916e2904d9 | [
"MIT"
] | 3 | 2022-03-23T19:16:08.000Z | 2022-03-28T00:40:19.000Z | include/morphotree/attributes/bitquads/quadCountTreeOfShapesComputer.hpp | dennisjosesilva/morphotree | 3be4ff7f36de65772ef273a61b0bc5916e2904d9 | [
"MIT"
] | null | null | null | #pragma once
#include "morphotree/core/alias.hpp"
#include "morphotree/attributes/attributeComputer.hpp"
#include "morphotree/attributes/bitquads/quads.hpp"
#include "morphotree/tree/treeOfShapes/kgrid.hpp"
#include "morphotree/tree/treeOfShapes/order_image.hpp"
#include <array>
#include <limits>
#include <functiona... | 38.803279 | 109 | 0.656443 | dennisjosesilva |
8cf6f6e6cb1df7502766d771a05f6c30431428fd | 10,868 | cpp | C++ | opengl/common/cube.cpp | allstarschh/training-handout | 86b16316e99ed5c1c7bc8dbb0a77dcf49c7e0a57 | [
"BSD-3-Clause-Clear"
] | null | null | null | opengl/common/cube.cpp | allstarschh/training-handout | 86b16316e99ed5c1c7bc8dbb0a77dcf49c7e0a57 | [
"BSD-3-Clause-Clear"
] | null | null | null | opengl/common/cube.cpp | allstarschh/training-handout | 86b16316e99ed5c1c7bc8dbb0a77dcf49c7e0a57 | [
"BSD-3-Clause-Clear"
] | null | null | null | #include "cube.h"
#include "axisalignedboundingbox.h"
#include <QOpenGLShaderProgram>
#include <QOpenGLContext>
#include <QOpenGLFunctions>
// Vertices
//
// 3 floats per vertex
// 4 vertices per face
// 6 faces
static const int vertexDataCount = 6 * 4 * 3;
static const float vertexData[vertexDataCount] = {
// L... | 24.151111 | 122 | 0.596154 | allstarschh |
ea0331c7b937bb2b8483f7a0a549b88ee90f6247 | 689 | hpp | C++ | include/Crypto.hpp | mihmin98/passman | fa676b21a73e53f62e82686b01909c6da623eef2 | [
"MIT"
] | null | null | null | include/Crypto.hpp | mihmin98/passman | fa676b21a73e53f62e82686b01909c6da623eef2 | [
"MIT"
] | 8 | 2020-03-02T05:54:42.000Z | 2020-11-28T18:01:10.000Z | include/Crypto.hpp | mihmin98/passman | fa676b21a73e53f62e82686b01909c6da623eef2 | [
"MIT"
] | null | null | null | #ifndef _CRYPTO_HPP_
#define _CRYPTO_HPP_
#pragma once
#include <cstring>
#include <cstdint>
#include <string>
#include <vector>
#include "LoginInfo.hpp"
#include "aes.hpp"
#include "sha256.hpp"
class Crypto
{
public:
static std::uint8_t *Encrypt(std::vector<LoginInfo> &v, std::string key, std::uintmax_t &dataSiz... | 27.56 | 103 | 0.719884 | mihmin98 |
ea0735d59d85f9107ac8c0f43745a9cb995aa1ee | 1,314 | cxx | C++ | http_response.cxx | andy-yx-chen/sokoh | e115251f20824ac7c292ed85eca7234521c93790 | [
"Apache-2.0"
] | null | null | null | http_response.cxx | andy-yx-chen/sokoh | e115251f20824ac7c292ed85eca7234521c93790 | [
"Apache-2.0"
] | null | null | null | http_response.cxx | andy-yx-chen/sokoh | e115251f20824ac7c292ed85eca7234521c93790 | [
"Apache-2.0"
] | null | null | null | #include "sokoh.hxx"
http_response::http_response(FCGX_Stream* out, const char* protocol_version)
: _out(out), _status(200), _protocol_version(protocol_version), _reason_phrase(), _headers(), _content(){
}
void http_response::crlf(){
FCGX_PutStr("\r\n", 2, this->_out);
}
void http_response::done(){
//... | 33.692308 | 109 | 0.66895 | andy-yx-chen |
ea098a4c25fcfdb36360f03e62b40f2f6ce9c9c2 | 3,814 | hpp | C++ | src/mlpack/methods/ann/layer/not_adapted/minibatch_discrimination_impl.hpp | shubham1206agra/mlpack | 2c656fcba850134f3f5d1dd1a6a1a15743aa7661 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | src/mlpack/methods/ann/layer/not_adapted/minibatch_discrimination_impl.hpp | shubham1206agra/mlpack | 2c656fcba850134f3f5d1dd1a6a1a15743aa7661 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | src/mlpack/methods/ann/layer/not_adapted/minibatch_discrimination_impl.hpp | shubham1206agra/mlpack | 2c656fcba850134f3f5d1dd1a6a1a15743aa7661 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | /**
* @file methods/ann/layer/minibatch_discrimination_impl.hpp
* @author Saksham Bansal
*
* Implementation of the MiniBatchDiscrimination layer class.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3... | 27.438849 | 80 | 0.6699 | shubham1206agra |
ea0a97a62247bf8ac0adc3fb8ce30cb63f4b30dd | 252 | cpp | C++ | pointer-like class/shared_ptr.cpp | RobespierreXu/CppPractice | 6838560f6ca4d2f8bb1e7bd0674356021f9d755f | [
"Unlicense"
] | 1 | 2021-11-01T02:53:46.000Z | 2021-11-01T02:53:46.000Z | pointer-like class/shared_ptr.cpp | RobespierreXu/CppPractice | 6838560f6ca4d2f8bb1e7bd0674356021f9d755f | [
"Unlicense"
] | null | null | null | pointer-like class/shared_ptr.cpp | RobespierreXu/CppPractice | 6838560f6ca4d2f8bb1e7bd0674356021f9d755f | [
"Unlicense"
] | null | null | null | using namespace std;
#include "shared_ptr.h"
struct Foo
{
void method(void){}
};
int main()
{
shared_ptr<Foo> sp(new Foo);
/* *符号使用掉以后就消耗掉了 */
Foo f(*sp);
/* 箭头符号得到的东西要用箭头符号继续作用下去 */
sp->method();
cout << __cplusplus << endl;
return 0;
}
| 10.956522 | 29 | 0.630952 | RobespierreXu |
ea0d8328e02980e93726851e00699160a24a8a13 | 17,391 | hpp | C++ | include/tip/lru-cache/lru_cache.hpp | zmij/tip-lru | 418a12ae3c7b1dbefb1ea6b8fc21280007522929 | [
"Artistic-2.0"
] | null | null | null | include/tip/lru-cache/lru_cache.hpp | zmij/tip-lru | 418a12ae3c7b1dbefb1ea6b8fc21280007522929 | [
"Artistic-2.0"
] | null | null | null | include/tip/lru-cache/lru_cache.hpp | zmij/tip-lru | 418a12ae3c7b1dbefb1ea6b8fc21280007522929 | [
"Artistic-2.0"
] | null | null | null | /*
* lru_cache.hpp
*
* Created on: Aug 30, 2015
* Author: zmij
*/
#ifndef TIP_LRU_CACHE_LRU_CACHE_HPP_
#define TIP_LRU_CACHE_LRU_CACHE_HPP_
#include <unordered_map>
#include <functional>
#include <list>
#include <mutex>
#include <memory>
#include <chrono>
#include <iostream>
#include <sstream>
namespace ... | 31.335135 | 93 | 0.753666 | zmij |
ea0ec2b448071a01c5d6c4b04d3b5db0d621c7cc | 2,906 | cpp | C++ | src/modemserver.cpp | davidwed/sqlrelay_rudiments | 6ccffdfc5fa29f8c0226f3edc2aa888aa1008347 | [
"BSD-2-Clause-NetBSD"
] | null | null | null | src/modemserver.cpp | davidwed/sqlrelay_rudiments | 6ccffdfc5fa29f8c0226f3edc2aa888aa1008347 | [
"BSD-2-Clause-NetBSD"
] | null | null | null | src/modemserver.cpp | davidwed/sqlrelay_rudiments | 6ccffdfc5fa29f8c0226f3edc2aa888aa1008347 | [
"BSD-2-Clause-NetBSD"
] | null | null | null | #include <rudiments/modemserver.h>
#include <rudiments/charstring.h>
#include <rudiments/device.h>
#include <rudiments/chat.h>
#ifdef RUDIMENTS_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef RUDIMENTS_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef RUDIMENTS_HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef ... | 22.88189 | 74 | 0.734343 | davidwed |
ea1278e288e944ef3c422f41be41f7e4f49976c1 | 3,713 | cpp | C++ | SimSpark/spark/carbon/treeitem.cpp | IllyasvielEin/Robocup3dInstaller | 12e91d9372dd08a92feebf98e916c98bc2242ff4 | [
"MIT"
] | null | null | null | SimSpark/spark/carbon/treeitem.cpp | IllyasvielEin/Robocup3dInstaller | 12e91d9372dd08a92feebf98e916c98bc2242ff4 | [
"MIT"
] | null | null | null | SimSpark/spark/carbon/treeitem.cpp | IllyasvielEin/Robocup3dInstaller | 12e91d9372dd08a92feebf98e916c98bc2242ff4 | [
"MIT"
] | null | null | null | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
This file is part of Carbon
Author: Patrick Geib
$Id$
This program 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; version 2 of th... | 21.71345 | 92 | 0.586318 | IllyasvielEin |
ea17d645a800828dd1a50bee115741d2f0f5eda4 | 4,601 | cpp | C++ | gui/IPCServer.cpp | NiklasWang/Uranium | dee2480496ccf4a5aa11502d0b9ed2fdfeb647fe | [
"Apache-2.0"
] | 1 | 2019-07-10T05:14:54.000Z | 2019-07-10T05:14:54.000Z | gui/IPCServer.cpp | NiklasWang/Uranium | dee2480496ccf4a5aa11502d0b9ed2fdfeb647fe | [
"Apache-2.0"
] | 4 | 2019-05-27T05:43:16.000Z | 2019-08-27T13:59:22.000Z | gui/IPCServer.cpp | NiklasWang/Uranium | dee2480496ccf4a5aa11502d0b9ed2fdfeb647fe | [
"Apache-2.0"
] | 1 | 2019-05-31T04:29:25.000Z | 2019-05-31T04:29:25.000Z | #include <QtCore/QDebug>
#include <QtCore/QEventLoop>
#include "common.h"
#include "IPCServer.h"
#include "IPCInstruction.h"
namespace uranium {
void IPCServer::run()
{
int32_t rc = NO_ERROR;
if (SUCCEED(rc)) {
rc = construct();
if (FAILED(rc)) {
LOGE(mModule, "Failed to construc... | 22.120192 | 85 | 0.562704 | NiklasWang |
ea197e9b3bc9b5ca34eec2591caf8b348ed6bce0 | 380 | cpp | C++ | TagRelabelAlgo.cpp | TNishimoto/BTree | 79e793793cbc58d784570b08d002e47d06f20887 | [
"MIT"
] | 2 | 2020-02-21T05:39:36.000Z | 2021-12-26T02:51:52.000Z | TagRelabelAlgo.cpp | TNishimoto/BTree | 79e793793cbc58d784570b08d002e47d06f20887 | [
"MIT"
] | null | null | null | TagRelabelAlgo.cpp | TNishimoto/BTree | 79e793793cbc58d784570b08d002e47d06f20887 | [
"MIT"
] | 1 | 2019-05-30T09:41:48.000Z | 2019-05-30T09:41:48.000Z | /*!
* Copyright (c) 2017 Tomohiro I
*
* This program is released under the MIT License.
* http://opensource.org/licenses/mit-license.php
*/
#include "TagRelabelAlgo.hpp"
namespace itmmti
{
const uint64_t TagRelabelAlgo::TBL_Capacities[] = {
9755,
4281003,
1196954387,
301970036317,
352781318... | 17.272727 | 53 | 0.686842 | TNishimoto |
ea19b829508eb40a9d95e0ce1d4ff2e6b96615c6 | 1,869 | cpp | C++ | thread/6_server.cpp | D3M4C14/GXN-server | 80d5605bb9dad292685f490d2ddfcdf58fa255a7 | [
"MIT"
] | null | null | null | thread/6_server.cpp | D3M4C14/GXN-server | 80d5605bb9dad292685f490d2ddfcdf58fa255a7 | [
"MIT"
] | null | null | null | thread/6_server.cpp | D3M4C14/GXN-server | 80d5605bb9dad292685f490d2ddfcdf58fa255a7 | [
"MIT"
] | null | null | null | #include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <wait.h>
pthread_mutex_t mut;
void* thread_func( void* arg )
{
printf( "thread try get the lock\n" );
pthread_mutex_lock( &mut );
printf( "thread got the lock\n" );
sleep( 2 );
pthread_mutex_unlock( &mut );
... | 22.25 | 58 | 0.591225 | D3M4C14 |
ea210640e5ccfea5bb4bb2155ffb8ba6d0c2759b | 513 | hpp | C++ | include/RED4ext/Scripting/Natives/Generated/red/ResourceReferenceScriptToken.hpp | WSSDude420/RED4ext.SDK | eaca8bdf7b92c48422b18431ed8cd0876f53bdb3 | [
"MIT"
] | null | null | null | include/RED4ext/Scripting/Natives/Generated/red/ResourceReferenceScriptToken.hpp | WSSDude420/RED4ext.SDK | eaca8bdf7b92c48422b18431ed8cd0876f53bdb3 | [
"MIT"
] | null | null | null | include/RED4ext/Scripting/Natives/Generated/red/ResourceReferenceScriptToken.hpp | WSSDude420/RED4ext.SDK | eaca8bdf7b92c48422b18431ed8cd0876f53bdb3 | [
"MIT"
] | null | null | null | #pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/NativeTypes.hpp>
namespace RED4ext
{
struct CResource;
namespace red {
struct ResourceReferenceScriptToken
{
static constexpr const char* NAME = "redResourceReferenceScriptT... | 21.375 | 74 | 0.762183 | WSSDude420 |
ea2c7f467c60bac92467fc704b4c502d5842d1d5 | 547 | cpp | C++ | 1 sem/1 week/Problem_5.cpp | resueman/HW_Sem1 | f096c7b026ce13ec4b7df5c9bea980a33697e60a | [
"Apache-2.0"
] | null | null | null | 1 sem/1 week/Problem_5.cpp | resueman/HW_Sem1 | f096c7b026ce13ec4b7df5c9bea980a33697e60a | [
"Apache-2.0"
] | 1 | 2018-11-22T14:14:55.000Z | 2018-11-22T14:14:55.000Z | 1 sem/1 week/Problem_5.cpp | resueman/HW_Sem1 | f096c7b026ce13ec4b7df5c9bea980a33697e60a | [
"Apache-2.0"
] | null | null | null | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int mainh() {
int n;
printf("%s", "Enter the number of chars ");
scanf("%d\n", &n);
char* c = new char[n] {};
for (int i = 0; i < n; ++i) {
scanf("%c", &c[i]);
}
for (int i = 0; i < n; ++i) {
printf("%c ", c[i]);
}
printf("\n");
int balance = 0;
... | 17.09375 | 48 | 0.480804 | resueman |
ea3057a6f502b7cc2e6d67f27f3aceeb4c39c2c7 | 1,632 | hpp | C++ | apps/openmw/mwgui/bookwindow.hpp | Bodillium/openmw | 5fdd264d0704e33b44b1ccf17ab4fb721f362e34 | [
"Unlicense"
] | null | null | null | apps/openmw/mwgui/bookwindow.hpp | Bodillium/openmw | 5fdd264d0704e33b44b1ccf17ab4fb721f362e34 | [
"Unlicense"
] | null | null | null | apps/openmw/mwgui/bookwindow.hpp | Bodillium/openmw | 5fdd264d0704e33b44b1ccf17ab4fb721f362e34 | [
"Unlicense"
] | null | null | null | #ifndef MWGUI_BOOKWINDOW_H
#define MWGUI_BOOKWINDOW_H
#include "windowbase.hpp"
#include "../mwworld/ptr.hpp"
#include <components/widgets/imagebutton.hpp>
namespace MWGui
{
class BookWindow : public WindowBase
{
public:
BookWindow();
virtual void exit();
void o... | 26.322581 | 65 | 0.590074 | Bodillium |
ea327cce7b9d26060462a3615073e7aff801010a | 229 | hxx | C++ | is_array.hxx | mojo-runtime/lib-std | 35178964db5b51184f35447f33c379de9768b534 | [
"MIT"
] | null | null | null | is_array.hxx | mojo-runtime/lib-std | 35178964db5b51184f35447f33c379de9768b534 | [
"MIT"
] | null | null | null | is_array.hxx | mojo-runtime/lib-std | 35178964db5b51184f35447f33c379de9768b534 | [
"MIT"
] | null | null | null | #pragma once
#include "false_type.hxx"
#include "true_type.hxx"
namespace std {
template <typename T>
struct is_array : false_type
{
};
template <typename T, decltype(sizeof(int)) n>
struct is_array<T[n]> : true_type
{
};
}
| 12.052632 | 46 | 0.707424 | mojo-runtime |
ea336a11f5dbdb0dea24e9d19ec00a9745be2be0 | 8,639 | cpp | C++ | test/intersections_tests.cpp | extramask93/RayTracer | ba7f46fb212971e47b296991a7a7e981fef50dda | [
"Unlicense"
] | null | null | null | test/intersections_tests.cpp | extramask93/RayTracer | ba7f46fb212971e47b296991a7a7e981fef50dda | [
"Unlicense"
] | null | null | null | test/intersections_tests.cpp | extramask93/RayTracer | ba7f46fb212971e47b296991a7a7e981fef50dda | [
"Unlicense"
] | null | null | null | //
// Created by damian on 07.07.2020.
//
#include <catch2/catch.hpp>
#include <Tuple.h>
#include <Matrix.h>
#include <shapes/Sphere.h>
#include <shapes/Triangle.h>
#include <intersections/Intersection.h>
#include <intersections/Intersections.h>
#include <misc/Computations.h>
SCENARIO("An intersection encapsulates t a... | 27.166667 | 223 | 0.547749 | extramask93 |
ea39c3cba3a437d3e8cedee01eb673aeffbff85e | 5,881 | cpp | C++ | lib-src/vgui/TextImage.cpp | Velaron/vgui_dll | 9ebb9ab4abf49ba3bd4aad8d102923a0d61d139b | [
"BSD-3-Clause"
] | 22 | 2017-02-21T04:30:12.000Z | 2022-02-13T22:40:39.000Z | lib-src/vgui/TextImage.cpp | FWGS/vgui_dll | 4a677fc844f3d92c1b83c6a0f748242a2601286e | [
"BSD-3-Clause"
] | 1 | 2017-05-08T18:31:26.000Z | 2017-05-08T18:31:26.000Z | lib-src/vgui/TextImage.cpp | nagist/vgui_dll | acf73ec95a4499b229d68854819fb5e951de1759 | [
"BSD-3-Clause"
] | 12 | 2017-02-18T16:03:05.000Z | 2021-12-30T16:34:27.000Z | /*
* BSD 3-Clause License
*
* 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 and the following disc... | 17.555224 | 82 | 0.572522 | Velaron |
ea42cea22aa6868e6285830c2e6734638f52d318 | 5,608 | cpp | C++ | src/Snake.cpp | RybaPila-IT/Multiprocess-Snake-Game | 7719a2d0ffa45691eb8f1665a75e73aac09b8a2d | [
"MIT"
] | null | null | null | src/Snake.cpp | RybaPila-IT/Multiprocess-Snake-Game | 7719a2d0ffa45691eb8f1665a75e73aac09b8a2d | [
"MIT"
] | null | null | null | src/Snake.cpp | RybaPila-IT/Multiprocess-Snake-Game | 7719a2d0ffa45691eb8f1665a75e73aac09b8a2d | [
"MIT"
] | 1 | 2021-05-20T07:59:16.000Z | 2021-05-20T07:59:16.000Z | //
// Created pointB.y swirta on 02.05.2021.
//
#include "../include/Snake.hpp"
#include <random>
using namespace std;
using namespace cv;
void Snake::clear_snake() {
snakeBody.clear();
}
void Snake::grow(const Point &chunk) {
snakeBody.push_back(chunk);
}
int Snake::length() {
return snakeBody.size();... | 32.416185 | 166 | 0.569722 | RybaPila-IT |
ea4485679ff7916294ddc998cb99ef73e8680704 | 798 | cpp | C++ | src/string-to-integer.cpp | yangzhiyuan0928/newcoder | 359f93967ff6c5d28c90f397025b920d65e34328 | [
"MIT"
] | null | null | null | src/string-to-integer.cpp | yangzhiyuan0928/newcoder | 359f93967ff6c5d28c90f397025b920d65e34328 | [
"MIT"
] | null | null | null | src/string-to-integer.cpp | yangzhiyuan0928/newcoder | 359f93967ff6c5d28c90f397025b920d65e34328 | [
"MIT"
] | null | null | null | #include <string>
#include <cctype>
#include <climits>
#include <cstdint>
using namespace std;
class Solution
{
public:
int StrToInt(string str)
{
const int R = 10;
int len = str.size();
int64_t res = 0;
int i = 0;
while (i < len && str[i] == ' ') { /* ommit the space & Tab */
++i;
... | 15.96 | 66 | 0.451128 | yangzhiyuan0928 |
356a79f94d9c36d749fde83f84cf46e51c8b6d3a | 6,096 | cpp | C++ | Source/Tome/Book.cpp | SeanNikkel/Tome | 7c2a7d9ab9f0a23ad5e1add04ab3254d9674d10b | [
"MIT"
] | 1 | 2020-09-13T20:15:24.000Z | 2020-09-13T20:15:24.000Z | Source/Tome/Book.cpp | SeanNikkel/Tome | 7c2a7d9ab9f0a23ad5e1add04ab3254d9674d10b | [
"MIT"
] | null | null | null | Source/Tome/Book.cpp | SeanNikkel/Tome | 7c2a7d9ab9f0a23ad5e1add04ab3254d9674d10b | [
"MIT"
] | null | null | null | // Fill out your copyright notice in the Description page of Project Settings.
#include "Book.h"
// Sets default values
ABook::ABook()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
SceneRoot = CreateDefau... | 24.094862 | 115 | 0.698491 | SeanNikkel |
356d0cc8a79dd0fd7c83d2ed589ec8b4e2520804 | 1,620 | cpp | C++ | src/renderer/Camera.cpp | CaptainCaffeine/subdivision | 547eac95a043cef3a4b0e4d7c2513ff1a4621b82 | [
"MIT"
] | null | null | null | src/renderer/Camera.cpp | CaptainCaffeine/subdivision | 547eac95a043cef3a4b0e4d7c2513ff1a4621b82 | [
"MIT"
] | null | null | null | src/renderer/Camera.cpp | CaptainCaffeine/subdivision | 547eac95a043cef3a4b0e4d7c2513ff1a4621b82 | [
"MIT"
] | null | null | null | #include <algorithm>
#include <glm/gtc/matrix_transform.hpp>
#include "renderer/Camera.h"
namespace Renderer {
Camera::Camera(const glm::vec3& init_pos, const glm::vec3& up_vec, const glm::vec3& look)
: pos(init_pos)
, up(glm::normalize(up_vec))
, look_dir(glm::normalize(look))
, righ... | 28.421053 | 89 | 0.62284 | CaptainCaffeine |
356ef96e5492e44b7d84a7fcb17761c17caab092 | 1,417 | cpp | C++ | Algorithms/Strings/Highest_Value_Palindrome/main.cpp | ugurcan-sonmez-95/HackerRank_Problems | 187d83422128228c241f279096386df5493d539d | [
"MIT"
] | null | null | null | Algorithms/Strings/Highest_Value_Palindrome/main.cpp | ugurcan-sonmez-95/HackerRank_Problems | 187d83422128228c241f279096386df5493d539d | [
"MIT"
] | null | null | null | Algorithms/Strings/Highest_Value_Palindrome/main.cpp | ugurcan-sonmez-95/HackerRank_Problems | 187d83422128228c241f279096386df5493d539d | [
"MIT"
] | null | null | null | // Highest Value Palindrome - Solution
#include <iostream>
#include <vector>
#include <algorithm>
std::string checkHighestPalindrome(int k, int start, int end, std::string &pal_s, const std::string &s) {
start = 0;
end = s.size()-1;
while (start <= end) {
if (start == end)
if (k > 0)
... | 24.859649 | 105 | 0.441778 | ugurcan-sonmez-95 |
3570b09e100bcdb0cbff90d87a8ff2d8bec7d7c4 | 4,288 | hpp | C++ | core/src/main/cpp/include/softarch/Buffer.hpp | caolongcl/OpenImage | d29e0309bc35ff1766e0c81bfba82b185a7aabb6 | [
"BSD-3-Clause"
] | 2 | 2021-09-16T15:14:39.000Z | 2021-09-17T14:39:52.000Z | core/src/main/cpp/include/softarch/Buffer.hpp | caolongcl/OpenImage | d29e0309bc35ff1766e0c81bfba82b185a7aabb6 | [
"BSD-3-Clause"
] | null | null | null | core/src/main/cpp/include/softarch/Buffer.hpp | caolongcl/OpenImage | d29e0309bc35ff1766e0c81bfba82b185a7aabb6 | [
"BSD-3-Clause"
] | null | null | null | //
// Created by caolong on 2020/8/17.
//
#pragma once
#include <softarch/std.hpp>
#include <utils/Log.hpp>
namespace clt {
/**
* 存储图像数据
* 比如从 ProcessPipe 管道中读取的纹理像素值
*/
struct Buffer final {
static long s_count;
static std::mutex s_mutex;
using DataType = unsigned char;
using DataPtrT... | 25.676647 | 90 | 0.546642 | caolongcl |
3570c7c73d6ea7d52953d9d009b4098924f0677b | 2,082 | cpp | C++ | source/about.cpp | tomorrow-wakeup/Font-Creator-For-Unity3D | 6bcb740def77679f8f6f7d9c08e4c6afca6fe2ab | [
"BSD-3-Clause"
] | null | null | null | source/about.cpp | tomorrow-wakeup/Font-Creator-For-Unity3D | 6bcb740def77679f8f6f7d9c08e4c6afca6fe2ab | [
"BSD-3-Clause"
] | null | null | null | source/about.cpp | tomorrow-wakeup/Font-Creator-For-Unity3D | 6bcb740def77679f8f6f7d9c08e4c6afca6fe2ab | [
"BSD-3-Clause"
] | 1 | 2019-09-09T06:44:23.000Z | 2019-09-09T06:44:23.000Z | /*
AngelCode Bitmap Font Generator
Copyright (c) 2004-2014 Andreas Jonsson
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this so... | 26.025 | 69 | 0.724304 | tomorrow-wakeup |
35711ba3e179534db621cd58d5fcb6f32b95f0be | 616 | cpp | C++ | with fun bubble sort.cpp | akkiind4/Codechef | 83821c0b6056e3d631ad1d3273b41727074537bb | [
"MIT"
] | null | null | null | with fun bubble sort.cpp | akkiind4/Codechef | 83821c0b6056e3d631ad1d3273b41727074537bb | [
"MIT"
] | null | null | null | with fun bubble sort.cpp | akkiind4/Codechef | 83821c0b6056e3d631ad1d3273b41727074537bb | [
"MIT"
] | null | null | null | /* bubble sort using function */
#include<stdio.h>
void bubble_sort(int a[],int);
int main()
{
int n,a[100],i;
printf("enter the no of element u want to sort\n");
scanf("%d",& n);
printf("enter %d inter value\n",n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
bubble_sort(a,n);
printf("sor... | 16.648649 | 53 | 0.488636 | akkiind4 |
35736f855caebc92a32adf399a235b6ab087221a | 784 | cpp | C++ | problems/leet/213-house-robber-ii/code.cpp | brunodccarvalho/competitive | 4177c439174fbe749293b9da3445ce7303bd23c2 | [
"MIT"
] | 7 | 2020-10-15T22:37:10.000Z | 2022-02-26T17:23:49.000Z | problems/leet/213-house-robber-ii/code.cpp | brunodccarvalho/competitive | 4177c439174fbe749293b9da3445ce7303bd23c2 | [
"MIT"
] | null | null | null | problems/leet/213-house-robber-ii/code.cpp | brunodccarvalho/competitive | 4177c439174fbe749293b9da3445ce7303bd23c2 | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
using namespace std;
// *****
class Solution {
public:
int rob(const vector<int> &nums) {
int N = nums.size();
int best = 0;
int robbed = 0;
int skipped = 0;
if (N == 1)
return nums[0];
// case 1: we rob the first house
for (int i = 0; i + 1 < N; i++) {
... | 17.818182 | 43 | 0.526786 | brunodccarvalho |
3573c71638ce8fd70a3908a3d54c569a1ad9f9d1 | 1,777 | cpp | C++ | Source/PluginGameObject_All/CGameObjectTrainRails1.cpp | shanefarris/CoreGameEngine | 5bef275d1cd4e84aa059f2f4f9e97bfa2414d000 | [
"MIT"
] | 3 | 2019-04-12T15:22:53.000Z | 2022-01-05T02:59:56.000Z | Source/PluginGameObject_All/CGameObjectTrainRails1.cpp | shanefarris/CoreGameEngine | 5bef275d1cd4e84aa059f2f4f9e97bfa2414d000 | [
"MIT"
] | null | null | null | Source/PluginGameObject_All/CGameObjectTrainRails1.cpp | shanefarris/CoreGameEngine | 5bef275d1cd4e84aa059f2f4f9e97bfa2414d000 | [
"MIT"
] | 2 | 2019-04-10T22:46:21.000Z | 2020-05-27T16:21:37.000Z | #include "CGameObjectTrainRails1.h"
#include "CGameManager.h"
#include "CPhysicsManager.h"
#include "CPhysicsProfile.h"
#include "IPhysicsStrategy.h"
#include "OgreEntity.h"
#include "OgreSceneNode.h"
#include "OgreSceneManager.h"
#include "OgreMaterialManager.h"
using namespace Core;
namespace Core
{
namespace Plu... | 26.924242 | 123 | 0.740011 | shanefarris |
3577ca8e509523f66fdf3af92458f326babf4db9 | 4,242 | cpp | C++ | LEDMatrix.cpp | vishalsjsu/2048_Game | 6a550d4e5772055e549e1c8bded6a582c2e2b20c | [
"Apache-2.0"
] | 1 | 2019-01-02T16:23:43.000Z | 2019-01-02T16:23:43.000Z | LEDMatrix.cpp | NavyaC24/2048_Game | 6a550d4e5772055e549e1c8bded6a582c2e2b20c | [
"Apache-2.0"
] | null | null | null | LEDMatrix.cpp | NavyaC24/2048_Game | 6a550d4e5772055e549e1c8bded6a582c2e2b20c | [
"Apache-2.0"
] | 1 | 2018-11-29T06:49:47.000Z | 2018-11-29T06:49:47.000Z | /*
* LEDMatrix.cpp
*
* Created on: November 11, 2018
* Author: Vishal
*/
#include "io.hpp"
#include "string.h"
#include <stdint.h>
#include "LEDMatrix.hpp"
#include "inttypes.h"
void LEDMatrix:: init(LEDMatrixDisplayPincon &pincon)
{
//Address lines
A = new GPIO(pincon.A);
B = new GPIO(pincon.B... | 26.679245 | 113 | 0.583451 | vishalsjsu |
357a6995ce5cf62b071b2896d01d4aef9491f107 | 2,610 | cpp | C++ | EditAffBits.cpp | GalacticSoft/DikuEd | 135f49bba7ce2faf5faac12a355da9813c28d0fa | [
"MIT"
] | null | null | null | EditAffBits.cpp | GalacticSoft/DikuEd | 135f49bba7ce2faf5faac12a355da9813c28d0fa | [
"MIT"
] | null | null | null | EditAffBits.cpp | GalacticSoft/DikuEd | 135f49bba7ce2faf5faac12a355da9813c28d0fa | [
"MIT"
] | null | null | null | // EditAffBits.cpp : implementation file
//
#include "stdafx.h"
#include "WinDE.h"
#include "EditAffBits.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// EditAffBits dialog
EditAffBits... | 18.125 | 77 | 0.655556 | GalacticSoft |
357ba52cf2136a6e6f3a3d82e568806cec3bcaa6 | 418 | cpp | C++ | src/Map.cpp | amecky/color_match | fb6caea11c80da006021eabfd7721360ebb3c0bf | [
"MIT"
] | null | null | null | src/Map.cpp | amecky/color_match | fb6caea11c80da006021eabfd7721360ebb3c0bf | [
"MIT"
] | null | null | null | src/Map.cpp | amecky/color_match | fb6caea11c80da006021eabfd7721360ebb3c0bf | [
"MIT"
] | null | null | null | #include "Map.h"
#include "Constants.h"
#include <Vector.h>
namespace grid {
v2 convert(int gx,int gy) {
return v2(STARTX + gx * CELL_SIZE,STARTY + gy * CELL_SIZE);
}
v2 convert(const p2i& p) {
return convert(p.x, p.y);
}
p2i convert(const v2& pos) {
int my = ((int)pos.y - STARTY + HALF_CELL_SIZE) / CE... | 20.9 | 62 | 0.636364 | amecky |
357c13e5777af01ee7d2770676fe72eba595be03 | 1,416 | hpp | C++ | libraries/snaxlib/contracts/snax/system.hpp | ant-mad/snax.cdt | b502a5ec4c3656a98b3657bc25dd334eafa812fe | [
"MIT"
] | 1 | 2019-06-13T09:35:08.000Z | 2019-06-13T09:35:08.000Z | libraries/snaxlib/contracts/snax/system.hpp | ant-mad/snax.cdt | b502a5ec4c3656a98b3657bc25dd334eafa812fe | [
"MIT"
] | 1 | 2019-06-01T19:26:18.000Z | 2019-06-01T19:26:18.000Z | libraries/snaxlib/contracts/snax/system.hpp | ant-mad/snax.cdt | b502a5ec4c3656a98b3657bc25dd334eafa812fe | [
"MIT"
] | 1 | 2019-08-08T16:47:35.000Z | 2019-08-08T16:47:35.000Z | /**
* @file
* @copyright defined in snax/LICENSE
*/
#pragma once
#include "../../core/snax/time.hpp"
#include "../../core/snax/check.hpp"
namespace snax {
namespace internal_use_do_not_use {
extern "C" {
__attribute__((snax_wasm_import, noreturn))
void snax_exit( int32_t code );
}
}
/**... | 24.842105 | 157 | 0.646893 | ant-mad |
35830f5c556d6dda2c5a7e49781d9607660976c8 | 2,835 | cpp | C++ | lib/ftpHelper.cpp | MootezSaaD/cs411-hw1 | f54855523e04be46e82ceafabd0c4a66bcebc386 | [
"MIT"
] | null | null | null | lib/ftpHelper.cpp | MootezSaaD/cs411-hw1 | f54855523e04be46e82ceafabd0c4a66bcebc386 | [
"MIT"
] | null | null | null | lib/ftpHelper.cpp | MootezSaaD/cs411-hw1 | f54855523e04be46e82ceafabd0c4a66bcebc386 | [
"MIT"
] | null | null | null | #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <iostream>
#include <fstream>
#include "ftpHelper.h"
namespace fs = std::filesystem;
char *StrToChar(std::string str)
{
char *charArr = new char[str.size() + 1];
copy(str.begin(), str.end(), charArr);
charArr[str.size()] = '\0';
return charA... | 20.106383 | 78 | 0.681834 | MootezSaaD |
358a907a346a8d1bc001a75bfe9b2752d952da73 | 88 | cpp | C++ | main.cpp | hsencan03/Sfml-Frogger | 898a12516fee4f90e1393f09f716bcc8836bedf3 | [
"MIT"
] | null | null | null | main.cpp | hsencan03/Sfml-Frogger | 898a12516fee4f90e1393f09f716bcc8836bedf3 | [
"MIT"
] | null | null | null | main.cpp | hsencan03/Sfml-Frogger | 898a12516fee4f90e1393f09f716bcc8836bedf3 | [
"MIT"
] | null | null | null | #include "Game.hpp"
int main()
{
Game::constructor(800, 600, "hello");
return 0;
} | 9.777778 | 38 | 0.613636 | hsencan03 |
3590bf1fdcf1bc4aa059ae6e4ff1aa0e2a81b2f2 | 2,541 | cc | C++ | benchmark/ametsuchi/cache_benchmark.cc | rjones-lf/iroha-ametsuchi | dc17d940690cf946a4c2f31ee8f75c6270ccfb85 | [
"Apache-2.0"
] | 18 | 2017-01-24T09:24:20.000Z | 2017-06-29T21:02:25.000Z | benchmark/ametsuchi/cache_benchmark.cc | rjones-lf/iroha-ametsuchi | dc17d940690cf946a4c2f31ee8f75c6270ccfb85 | [
"Apache-2.0"
] | 31 | 2017-02-17T12:08:37.000Z | 2017-06-17T08:18:28.000Z | benchmark/ametsuchi/cache_benchmark.cc | rjones-lf/iroha-ametsuchi | dc17d940690cf946a4c2f31ee8f75c6270ccfb85 | [
"Apache-2.0"
] | 11 | 2017-02-17T06:48:57.000Z | 2017-06-23T03:09:49.000Z | /**
* Copyright Soramitsu Co., Ltd. 2016 All Rights Reserved.
* http://soramitsu.co.jp
*
* 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/LICENS... | 29.546512 | 80 | 0.647776 | rjones-lf |
3592b1c4878c1e044645c889652f4ba4ba4ebccc | 2,967 | hpp | C++ | tket/tests/TokenSwapping/TestUtils/FullTsaTesting.hpp | CQCL/tket | 3f3d7c24d9a6c9cfd85966c13dcccc8a13f92adb | [
"Apache-2.0"
] | 104 | 2021-09-15T08:16:25.000Z | 2022-03-28T21:19:00.000Z | tket/tests/TokenSwapping/TestUtils/FullTsaTesting.hpp | CQCL/tket | 3f3d7c24d9a6c9cfd85966c13dcccc8a13f92adb | [
"Apache-2.0"
] | 109 | 2021-09-16T17:14:22.000Z | 2022-03-29T06:48:40.000Z | tket/tests/TokenSwapping/TestUtils/FullTsaTesting.hpp | CQCL/tket | 3f3d7c24d9a6c9cfd85966c13dcccc8a13f92adb | [
"Apache-2.0"
] | 8 | 2021-10-02T13:47:34.000Z | 2022-03-17T15:36:56.000Z | // Copyright 2019-2022 Cambridge Quantum Computing
//
// 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... | 33.715909 | 78 | 0.748905 | CQCL |
3593dc996453e10375a886d734af9ed345b9e7c4 | 18,739 | cpp | C++ | final_project/Interface.cpp | MadDawg/LSCS-COSC1437-Fall2020 | 7afa31d19690a868698bf1e8ebe5c619814de977 | [
"Unlicense"
] | null | null | null | final_project/Interface.cpp | MadDawg/LSCS-COSC1437-Fall2020 | 7afa31d19690a868698bf1e8ebe5c619814de977 | [
"Unlicense"
] | null | null | null | final_project/Interface.cpp | MadDawg/LSCS-COSC1437-Fall2020 | 7afa31d19690a868698bf1e8ebe5c619814de977 | [
"Unlicense"
] | null | null | null | #include "Interface.h"
namespace cosc1437_final{
// convert string to lowercase to make input checks less tedious
void to_lower(std::string& str){
for (char& c : str){
c = std::tolower(c);
}
}
// currently does not check for dupes nor does it check for sane scores... | 42.110112 | 106 | 0.44949 | MadDawg |
3598d2f266b9c8dfd406743162ab1026f9a6284c | 209 | cpp | C++ | test/unit/ut_cucs_processor.cpp | MikeCharikov/vsm-cpp-sdk | 966dfe7cd3a436f8452e16c97328e720f882c484 | [
"BSD-3-Clause"
] | 1 | 2020-04-24T17:50:56.000Z | 2020-04-24T17:50:56.000Z | test/unit/ut_cucs_processor.cpp | AlexandreBorowczyk/vsm-cpp-sdk | 234be1fc05697b79b88398b2c425a5b35d6e3ffb | [
"BSD-3-Clause"
] | null | null | null | test/unit/ut_cucs_processor.cpp | AlexandreBorowczyk/vsm-cpp-sdk | 234be1fc05697b79b88398b2c425a5b35d6e3ffb | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) 2018, Smart Projects Holdings Ltd
// All rights reserved.
// See LICENSE file for license details.
#include <ugcs/vsm/cucs_processor.h>
#include <UnitTest++.h>
using namespace ugcs::vsm;
| 17.416667 | 50 | 0.727273 | MikeCharikov |
3599623e932f2031a28a3537187afdc79b00509a | 9,180 | cpp | C++ | src/puzzlesolver.cpp | huwlloyd-mmu/jpop | 8a749ec5d92b3a6d67ea898a5b4282113dc7ea4b | [
"MIT"
] | null | null | null | src/puzzlesolver.cpp | huwlloyd-mmu/jpop | 8a749ec5d92b3a6d67ea898a5b4282113dc7ea4b | [
"MIT"
] | null | null | null | src/puzzlesolver.cpp | huwlloyd-mmu/jpop | 8a749ec5d92b3a6d67ea898a5b4282113dc7ea4b | [
"MIT"
] | null | null | null | #include "solvers/aco/puzzleantsystem.h"
#include "solvers/ga/puzzlegeneticalgorithm.h"
#include "solvers/random/RandomSearch.h"
#include "solvers/backtracking/backtracking.h"
#include "solvers/sa/simulatedannealing.h"
#include "puzzles/nurikabe/nurikabesimulator.h"
#include "puzzles/nurikabe/nkboard.h"
#include... | 28.073394 | 154 | 0.655991 | huwlloyd-mmu |
359cdeda3eb7cf649c644427c6f7e654bde173a9 | 6,707 | cpp | C++ | test/structure/math/modulox_test.cpp | plamenko/altruct | e16fc162043933fbe282fe01a44e0c908df4f612 | [
"MIT"
] | 66 | 2016-10-18T20:37:09.000Z | 2021-11-28T09:56:41.000Z | test/structure/math/modulox_test.cpp | plamenko/altruct | e16fc162043933fbe282fe01a44e0c908df4f612 | [
"MIT"
] | null | null | null | test/structure/math/modulox_test.cpp | plamenko/altruct | e16fc162043933fbe282fe01a44e0c908df4f612 | [
"MIT"
] | 4 | 2018-02-11T17:56:03.000Z | 2019-01-18T15:41:15.000Z | #include "altruct/structure/math/modulo.h"
#include "structure_test_util.h"
#include "gtest/gtest.h"
#include <functional>
using namespace std;
using namespace altruct::math;
using namespace altruct::test_util;
typedef moduloX<int> modx;
TEST(modulox_test, constructor) {
modx m1;
EXPECT_EQ(... | 36.05914 | 76 | 0.630535 | plamenko |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.