repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
mattgil23/test01 | darkroom/include/darkroom/gazebo/LighthouseVisualPlugin.hpp | #pragma once
#include "gazebo/physics/physics.hh"
#include "gazebo/transport/TransportTypes.hh"
#include "gazebo/msgs/MessageTypes.hh"
#include "gazebo/common/Time.hh"
#include "gazebo/common/Plugin.hh"
#include "gazebo/common/Events.hh"
#include "gazebo/rendering/DynamicLines.hh"
#include "gazebo/rendering/RenderTy... |
mattgil23/test01 | darkroom/src/InYourGibbousPhase.cpp | #include "darkroom/InYourGibbousPhase.hpp"
namespace InYourGibbousPhase {
InYourGibbousPhase::InYourGibbousPhase(int numberOfSensors) :
Functor<double>(10, 2 * numberOfSensors), numberOfSensors(numberOfSensors) {
}
int InYourGibbousPhase::operator()(const VectorXd &x, VectorXd &fvec) const {
... |
mattgil23/test01 | darkroom/src/Transform.cpp | <gh_stars>0
#include "darkroom/Transform.hpp"
namespace DarkRoom {
bool Transform::getTransform(const char *from, const char *to, Matrix4d &transform){
tf::StampedTransform trans;
try {
tf_listener.lookupTransform(to, from, ros::Time(0), trans);
}
catch (tf::TransformEx... |
mattgil23/test01 | darkroom/src/Utilities.cpp | <reponame>mattgil23/test01
#include "darkroom/Utilities.hpp"
bool Utilities::readModelDirectory(string modelDirectory, ModelInformation &info) {
if(!directory_exists(modelDirectory))
return false;
info.modelSdf = fs::path(modelDirectory+"/model.sdf");
info.rootDirectory = fs::path(modelDirectory)... |
mattgil23/test01 | darkroom/include/darkroom/gazebo/DarkRoomVisualPlugin.hpp | <reponame>mattgil23/test01<filename>darkroom/include/darkroom/gazebo/DarkRoomVisualPlugin.hpp<gh_stars>10-100
#pragma once
#include "gazebo/physics/physics.hh"
#include "gazebo/transport/TransportTypes.hh"
#include "gazebo/msgs/MessageTypes.hh"
#include "gazebo/common/Time.hh"
#include "gazebo/common/Plugin.hh"
#incl... |
mattgil23/test01 | darkroom/src/Triangulation.cpp | <gh_stars>0
#include "darkroom/Triangulation.hpp"
double Triangulation::dist3D_Line_to_Line( Vector3d &pos0, Vector3d &dir1,
Vector3d &pos1, Vector3d &dir2,
Vector3d &tri0, Vector3d &tri1) {
Vector3d u = dir1;
Vector3d v = dir2;
Vector3d w = pos... |
guo122/bimg | 3rdparty/astc-codec/src/base/test/string_utils_test.cpp | <reponame>guo122/bimg
// Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
guo122/bimg | 3rdparty/nvtt/nvmath/fitting.cpp | <reponame>guo122/bimg
// This code is in the public domain -- <NAME> <<EMAIL>>
#include "fitting.h"
#include "vector.inl"
#include "plane.inl"
#include "matrix.inl"
#include "nvcore/array.inl"
#include "nvcore/utils.h" // max, swap
using namespace nv;
// @@ Move to EigenSolver.h
// @@ We should be able to do somet... |
guo122/bimg | 3rdparty/astc-codec/src/decoder/test/intermediate_astc_block_test.cc | // Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
guo122/bimg | 3rdparty/astc-codec/src/base/test/uint128_test.cpp | // Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
guo122/bimg | 3rdparty/astc-codec/src/decoder/codec.cc | // Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
guo122/bimg | 3rdparty/pvrtc/BitScale.cpp | <reponame>guo122/bimg
#include "BitScale.h"
const uint8_t Javelin::Data::BITSCALE_5_TO_8[32] = {
0, 8, 16, 24, 32, 41, 49, 57, 65, 74,
82, 90, 98, 106, 115, 123, 131, 139, 148, 156,
164, 172, 180, 189, 197, 205, 213, 222, 230, 238,
246, 255};
const uint8_t Javelin::Data::BITSCALE_4_TO_8[16] = {
0, 17, 34, 51, 68... |
guo122/bimg | 3rdparty/astc-codec/src/decoder/tools/astc_inspector_cli.cc | <gh_stars>1000+
// Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law ... |
guo122/bimg | 3rdparty/astc-codec/src/decoder/test/weight_infill_test.cc | <filename>3rdparty/astc-codec/src/decoder/test/weight_infill_test.cc<gh_stars>1000+
// Copyright 2018 Google LLC
//
// 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
//
// https://www.apac... |
guo122/bimg | 3rdparty/etc2/ProcessRGB.cpp | #include <string.h>
#include "Math.hpp"
#include "ProcessCommon.hpp"
#include "ProcessRGB.hpp"
#include "Tables.hpp"
#include "Types.hpp"
#include "Vector.hpp"
#include <bx/endian.h>
#ifdef __SSE4_1__
# ifdef _MSC_VER
# include <intrin.h>
# include <Windows.h>
# else
# include <x86intrin.h>
# endif
#endi... |
guo122/bimg | 3rdparty/astc-codec/src/base/test/math_utils_test.cpp | // Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
guo122/bimg | 3rdparty/astc/astc_imageblock.cpp | <reponame>guo122/bimg
/*----------------------------------------------------------------------------*/
/**
* This confidential and proprietary software may be used only as
* authorised by a licensing agreement from ARM Limited
* (C) COPYRIGHT 2011-2012 ARM Limited
* ALL RIGHTS RESERVED
*
* The entire notice above... |
guo122/bimg | 3rdparty/nvtt/bc7/avpcl_mode7.cpp | /*
Copyright 2007 nVidia, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distr... |
guo122/bimg | 3rdparty/etc2/ProcessRGB.hpp | <filename>3rdparty/etc2/ProcessRGB.hpp
#ifndef __PROCESSRGB_HPP__
#define __PROCESSRGB_HPP__
#include "Types.hpp"
uint64 ProcessRGB( const uint8* src );
uint64 ProcessRGB_ETC2( const uint8* src );
#endif
|
guo122/bimg | 3rdparty/astc-codec/src/decoder/physical_astc_block.cc | // Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
guo122/bimg | 3rdparty/etc2/ProcessCommon.hpp | #ifndef __PROCESSCOMMON_HPP__
#define __PROCESSCOMMON_HPP__
#include <assert.h>
#include <stddef.h>
#include "Types.hpp"
template<class T>
static size_t GetLeastError( const T* err, size_t num )
{
size_t idx = 0;
for( size_t i=1; i<num; i++ )
{
if( err[i] < err[idx] )
{
idx = ... |
guo122/bimg | 3rdparty/astc-codec/src/base/test/bit_stream_test.cpp | // Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
guo122/bimg | 3rdparty/etc2/Tables.hpp | #ifndef __TABLES_HPP__
#define __TABLES_HPP__
#include "Types.hpp"
#ifdef __SSE4_1__
#include <smmintrin.h>
#endif
extern const int32 g_table[8][4];
extern const int64 g_table256[8][4];
extern const uint32 g_id[4][16];
extern const uint32 g_avg2[16];
extern const uint32 g_flags[64];
#ifdef __SSE4_1__
extern const... |
guo122/bimg | 3rdparty/etc2/Tables.cpp | <filename>3rdparty/etc2/Tables.cpp<gh_stars>1000+
#include "Tables.hpp"
const int32 g_table[8][4] = {
{ 2, 8, -2, -8 },
{ 5, 17, -5, -17 },
{ 9, 29, -9, -29 },
{ 13, 42, -13, -42 },
{ 18, 60, -18, -60 },
{ 24, 80, -24, -80 },
{ 33, 106, -33, -106 },
{ 47, 183, -47, -... |
guo122/bimg | 3rdparty/etc2/Types.hpp | <filename>3rdparty/etc2/Types.hpp<gh_stars>1000+
#ifndef __DARKRL__TYPES_HPP__
#define __DARKRL__TYPES_HPP__
#include <stdint.h>
typedef int8_t int8;
typedef uint8_t uint8;
typedef int16_t int16;
typedef uint16_t uint16;
typedef int32_t int32;
typedef uint32_t uint32;
typedef int64_t int64;... |
guo122/bimg | 3rdparty/astc-codec/src/decoder/test/integer_sequence_codec_test.cc | <filename>3rdparty/astc-codec/src/decoder/test/integer_sequence_codec_test.cc
// Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org... |
bbalp/FractalDX9 | FractalDX9/MainForm.cpp | <reponame>bbalp/FractalDX9<filename>FractalDX9/MainForm.cpp
#include "stdafx.h"
#include "MainForm.h"
#include "PixelShader.h"
PixelShader UPS;
#define MAX_LOADSTRING 100
HINSTANCE hInst; // Current instance
TCHAR szTitle[MAX_LOADSTRING]; // Title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; ... |
bbalp/FractalDX9 | FractalDX9/PixelShader.cpp | #include "stdafx.h"
#include "PixelShader.h"
#include <string>
using namespace std;
LPDIRECT3D9 g_pD3D = NULL; // D3DDevice
LPDIRECT3DDEVICE9 g_pd3dDevice = NULL; // Rendering device
LPDIRECT3DVERTEXBUFFER9 g_pVB = NULL; // Buffer to hold vertices
// Our custom vertex type
struct CUS... |
IMULMUL/PolyHook_2_0 | polyhook2/ErrorLog.hpp | #ifndef POLYHOOK_2_0_ERRORLOG_HPP
#define POLYHOOK_2_0_ERRORLOG_HPP
#include <vector>
#include <string>
#include <iostream>
#include "polyhook2/Enums.hpp"
namespace PLH {
struct Error {
std::string msg;
ErrorLevel lvl;
};
class ErrorLog {
public:
void push(std::string msg, ErrorLevel level) {
push({ std::move(... |
IMULMUL/PolyHook_2_0 | sources/PageAllocator.cpp | <reponame>IMULMUL/PolyHook_2_0
#include "polyhook2/PageAllocator.hpp"
std::vector<PLH::SplitPage> PLH::PageAllocator::m_pages;
std::recursive_mutex PLH::PageAllocator::m_pageMtx;
std::atomic<uint8_t> PLH::PageAllocator::m_refCount = 0;
PLH::PageAllocator::PageAllocator(const uint64_t address, const uint64_t size) : m... |
IMULMUL/PolyHook_2_0 | sources/ILCallback.cpp | <filename>sources/ILCallback.cpp
#include "polyhook2/Detour/ILCallback.hpp"
asmjit::CallConv::Id PLH::ILCallback::getCallConv(const std::string& conv) {
if (conv == "cdecl") {
return asmjit::CallConv::kIdHostCDecl;
}else if (conv == "stdcall") {
return asmjit::CallConv::kIdHostStdCall;
}else if (conv == "fastca... |
IMULMUL/PolyHook_2_0 | polyhook2/CapstoneDisassembler.hpp | //
// Created by steve on 3/22/17.
//
#ifndef POLYHOOK_2_0_CAPSTONEDISASSEMBLER_HPP
#define POLYHOOK_2_0_CAPSTONEDISASSEMBLER_HPP
#include "polyhook2/ADisassembler.hpp"
#include <capstone/include/capstone/capstone.h>
#include <string.h>
#include <iostream> //for debug printing
#include <limits>
#include <cassert>
#... |
IMULMUL/PolyHook_2_0 | UnitTests/TestDetourx64.cpp | //
// Created by steve on 7/9/18.
//
#include <Catch.hpp>
#include "polyhook2/Detour/x64Detour.hpp"
#include "polyhook2/CapstoneDisassembler.hpp"
#include "polyhook2/Tests/TestEffectTracker.hpp"
EffectTracker effects;
/**These tests can spontaneously fail if the compiler desides to optimize away
the handler or inlin... |
cyferc/Empro-Datalog-Viewer | Widgets/Datalog/plotdatalog.cpp | #include "plotdatalog.h"
#include <QDebug>
#include <QPainter>
#include <QtMath>
#include <QInputDialog>
#include <cinttypes>
#include "helpers.h"
PlotDatalog::PlotDatalog(QWidget *pParent) : QWidget(pParent)
{
setMouseTracking(true);
setAutoFillBackground(true);
QPalette palette(this->palette());
p... |
cyferc/Empro-Datalog-Viewer | Widgets/Datalog/verticalaxis.cpp | <gh_stars>1-10
#include "verticalaxis.h"
#include "helpers.h"
#include <QPainter>
#include <QDebug>
VerticalAxis::VerticalAxis(QWidget *pParent) : QWidget(pParent)
{
this->setMinimumWidth(30);
setAutoFillBackground(true);
QPalette palette(this->palette());
palette.setColor(QPalette::Background, Qt::b... |
cyferc/Empro-Datalog-Viewer | Widgets/Datalog/dialogplotchannelchoose.cpp | #include "dialogplotchannelchoose.h"
#include "ui_dialogplotchannelchoose.h"
#include <QGridLayout>
#include <QCheckBox>
#include <QDebug>
#include "plotdatalog.h"
DialogPlotChannelChoose::DialogPlotChannelChoose(std::vector<PointList *> vecOfPointLists, QSplitter *pSplitterPlots, QWidget *pParent) :
QDialog(pPare... |
cyferc/Empro-Datalog-Viewer | Widgets/Datalog/pointlist.cpp | <filename>Widgets/Datalog/pointlist.cpp
#include "pointlist.h"
#include <cfloat>
#include <QDebug>
PointList::PointList()
{
m_MinX = DBL_MAX;
m_MaxX = DBL_MIN;
m_MinY = DBL_MAX;
m_MaxY = DBL_MIN;
m_Name = "";
m_Units = "";
m_LineColor = Qt::white;
... |
cyferc/Empro-Datalog-Viewer | Widgets/Datalog/widgetdatalogviewcontrol.cpp | <filename>Widgets/Datalog/widgetdatalogviewcontrol.cpp
#include "widgetdatalogviewcontrol.h"
#include "helpers.h"
#include "dialogplotchannelchoose.h"
#include "verticalaxis.h"
#include "mainwindow.h"
#include <QInputDialog>
#include <QFileDialog>
#include <QMessageBox>
#include <QGridLayout>
#include <QToolBar>
#inclu... |
cyferc/Empro-Datalog-Viewer | Widgets/Datalog/horizontalaxis.cpp | #include "horizontalaxis.h"
#include "helpers.h"
#include <QPainter>
#include <QDebug>
HorizontalAxis::HorizontalAxis(QWidget *pParent) : QWidget(pParent)
{
this->setMinimumHeight(m_MinimumHeight);
setAutoFillBackground(true);
QPalette palette(this->palette());
palette.setColor(QPalette::Background, ... |
cyferc/Empro-Datalog-Viewer | mainwindow.cpp | <gh_stars>1-10
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QGridLayout>
#include <QMessageBox>
MainWindow::MainWindow(QWidget *pParent) :
QMainWindow(pParent),
m_pUi(new Ui::MainWindow)
{
m_pUi->setupUi(this);
setWindowTitle(cWindowTitle);
// start Maximized
showMaximized();
... |
cyferc/Empro-Datalog-Viewer | helpers.cpp | #include "helpers.h"
#include <cmath>
#include <qglobal.h>
// Random number between low and high
int Helpers::randInt(int low, int high)
{
return qrand() % ((high + 1) - low) + low;
}
double Helpers::round_down_to_nearest_d(double value_to_round, double round_to)
{
return value_to_round - fmod(value_to_round,... |
DaveKerk/Sudoku_Solver | Class/main.cpp | #include <iostream>
int main(){std::cout<<"Hello, World!"<<std::endl;return 0;} |
DaveKerk/Sudoku_Solver | Messing Around/main.cpp | #include <iostream>
using std::cout;
int main()
{
std::string response;
cout << "Why hello there.\n";
cout << "You are experiencing the first code I have ever written in CLion.\n";
cout << "How are you enjoying it so far?\n";
cout << "Pretty mediocre right?\n";
cout << "How about we play a game... |
DaveKerk/Sudoku_Solver | Guessing Game/main.cpp | #include <iostream>
#include <time.h>
#include <ctime>
#include <string>
#include <cstdlib>
using namespace std;
int main()
{
int high = 5; //Ghost.
int low = 1; //Ghost.
int end = 99; //Ghost.
int end_all = 999; //Ghost.
int score = 0;
int lives = 5;
int input;
int var;
srand(time... |
DaveKerk/Sudoku_Solver | Second Chess Board/main.cpp | <reponame>DaveKerk/Sudoku_Solver
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout<<setw(5)<<setfill('#');
return 0;
} |
DaveKerk/Sudoku_Solver | Chess Board/main.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
for (int j=0; j < 4; j++)
{
for (int x = 0;x<3 ;x++) //(x==1||x==3||x==5||x==7))
{
for (int m = 0; m < 4; m++)
{
cout << setw(10) << "#####";
}
cout << endl;
... |
DaveKerk/Sudoku_Solver | Sudoku_Solver_Real/Grid.cpp | <filename>Sudoku_Solver_Real/Grid.cpp
//
// Created by David on 11/16/2016.
//
#include <iostream>
#include "Grid.h"
Grid::Grid(int height, int width) {
Height = height;
Width = width;
Data = vector<vector<int>>();
Data.reserve(height);
for (int i = 0; i < height; ++i) {
vecto... |
DaveKerk/Sudoku_Solver | Sudoku_Solver_Real/main.cpp | <gh_stars>0
#include <iostream>
#include <vector>
#include "Grid.h"
using std::vector;
using std::endl;
int main() {
Grid grid(10, 5);
for (int i = 0; i < 10; ++i) {
for (int j = 0; j < 5; ++j) {
grid.set(i, j, i + j);
}
}
grid.print();
return 0;
} |
Bhaskers-Blu-Org2/msphpsql | source/sqlsrv/util.cpp | <filename>source/sqlsrv/util.cpp
//---------------------------------------------------------------------------------------------------------------------------------
// File: util.cpp
//
// Contents: Utility functions used by both connection or statement functions
//
// Comments: Mostly error handling and some type hand... |
dibu13/BrofilerIntegrationResearch | BrofilerTesting/BrofilerTesting/TestingFunctions.cpp | <gh_stars>0
#include "TestingFunctions.h"
#include <iostream>
#include <string>
#include "Brofiler/Brofiler.h"
#define SAMPLING_SIZE 500
int arrayOfRandomSamples[SAMPLING_SIZE];
void GenerateSample()
{
BROFILER_CATEGORY("GenerateSample", Profiler::Color::LightYellow);
for (int i = 0; i < SAMPLING_SIZE; ++i)
{
... |
dibu13/BrofilerIntegrationResearch | BrofilerTesting/BrofilerTesting/main.cpp | <filename>BrofilerTesting/BrofilerTesting/main.cpp
#include <iostream>
#include "TestingFunctions.h"
#include "Brofiler\Brofiler.h"
#include <time.h>
#pragma comment(lib, "Brofiler/ProfilerCore32.lib")
int main()
{
srand(time(NULL));
bool runApp = true;
while (runApp)
{
BROFILER_FRAME("MyTestingApp");
runA... |
eskrut/vtk | Rendering/External/vtkExternalOpenGLRenderer.cxx | /*=========================================================================
Program: Visualization Toolkit
Module: vtkExternalOpenGLRenderer.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distri... |
eskrut/vtk | Rendering/OpenGL2/vtkOpenGLPointGaussianMapper.cxx | <gh_stars>0
/*=========================================================================
Program: Visualization Toolkit
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; wit... |
eskrut/vtk | Common/Core/Testing/Cxx/TestAtomic.cxx | /*=========================================================================
Program: Visualization Toolkit
Module: otherArrays.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ... |
irexyc/mmdeploy | csrc/backend_ops/tensorrt/common/common_cuda_helper.hpp | // Copyright (c) OpenMMLab. All rights reserved.
#ifndef COMMON_CUDA_HELPER
#define COMMON_CUDA_HELPER
#include <cublas_v2.h>
#include <cuda.h>
#include <algorithm>
#define CUDA_1D_KERNEL_LOOP(i, n) \
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (n); i += blockDim.x * gridDim.x)
#define THREADS_PER_BLO... |
Ishotihadus/usamin | ext/usamin/generator.cpp | <reponame>Ishotihadus/usamin
#include "rb270_fix.hpp"
#include <rapidjson/prettywriter.h>
#include <rapidjson/writer.h>
#include <ruby.h>
#include <ruby/version.h>
#include "rb_common.hpp"
#include "rb_usamin_value.hpp"
#include "rubynized_rapidjson.hpp"
#define WRITER_CONFIGS rapidjson::UTF8<>, rapidjson::UTF8<>, Rub... |
Ishotihadus/usamin | ext/usamin/rb270_fix.hpp | <filename>ext/usamin/rb270_fix.hpp
#ifndef RB270_FIX_HPP
#define RB270_FIX_HPP
#include <cstring>
#include <ruby/version.h>
#if RUBY_API_VERSION_CODE >= 20700 && defined(__GLIBC__)
namespace std {
static inline void *ruby_nonempty_memcpy(void *dest, const void *src, size_t n) {
return (n ? memcpy(dest, src, n) :... |
Ishotihadus/usamin | ext/usamin/rb_common.hpp | <filename>ext/usamin/rb_common.hpp
#ifndef USAMIN_RB_COMMON_HPP
#define USAMIN_RB_COMMON_HPP
#include <ruby.h>
#include "rubynized_rapidjson.hpp"
#include "usamin_value.hpp"
VALUE get_utf8_str(VALUE str);
VALUE new_utf8_str(const char *cstr, const long len);
bool str_compare_xx(VALUE str1, const RubynizedValue &str2)... |
Ishotihadus/usamin | ext/usamin/default_parse_flags.hpp | <filename>ext/usamin/default_parse_flags.hpp
#define RAPIDJSON_PARSE_DEFAULT_FLAGS \
(rapidjson::kParseIterativeFlag | rapidjson::kParseFullPrecisionFlag | rapidjson::kParseCommentsFlag | \
rapidjson::kParseTrailingCommasFlag | rapidjson::kPa... |
Ishotihadus/usamin | ext/usamin/rb_usamin_hash.hpp | #ifndef USAMIN_RB_USAMIN_HASH_HPP
#define USAMIN_RB_USAMIN_HASH_HPP
#include <ruby.h>
VALUE w_hash_operator_indexer(const VALUE self, const VALUE key);
VALUE w_hash_assoc(const VALUE self, const VALUE key);
VALUE w_hash_compact(const VALUE self);
VALUE w_hash_deconstruct_keys(const VALUE self, const VALUE keys);
VALU... |
Ishotihadus/usamin | ext/usamin/rubynized_rapidjson.hpp | #ifndef USAMIN_RUBYNIZED_RAPIDJSON_HPP
#define USAMIN_RUBYNIZED_RAPIDJSON_HPP
#include <rapidjson/document.h>
class RubyCrtAllocator {
public:
static const bool kNeedFree = true;
void *Malloc(size_t size);
void *Realloc(void *originalPtr, size_t, size_t newSize);
static void Free(void *ptr);
};
typed... |
Ishotihadus/usamin | ext/usamin/usamin.cpp | #include <ruby.h>
#include <ruby/encoding.h>
#include "generator.hpp"
#include "parser.hpp"
#include "rb_usamin_value.hpp"
#include "rb_usamin_hash.hpp"
#include "rb_usamin_array.hpp"
#if SIZEOF_VALUE < SIZEOF_VOIDP
#error SIZEOF_VOIDP must not be greater than SIZEOF_VALUE.
#endif
rb_encoding *utf8;
int utf8index;
ID... |
Ishotihadus/usamin | ext/usamin/rb_usamin_value.hpp | #ifndef USAMIN_RB_USAMIN_VALUE_HPP
#define USAMIN_RB_USAMIN_VALUE_HPP
#include <ruby.h>
#include "usamin_value.hpp"
VALUE usamin_alloc(const VALUE klass);
UsaminValue *get_value(VALUE value);
void set_value(VALUE value, UsaminValue *usamin);
VALUE w_value_equal(const VALUE self, const VALUE other);
VALUE w_value_is... |
Ishotihadus/usamin | ext/usamin/rb_usamin_hash.cpp | #include "rb270_fix.hpp"
#include <rapidjson/document.h>
#include <ruby.h>
#include <ruby/version.h>
#include "rb_usamin_array.hpp"
#include "usamin_value.hpp"
#include "parser_helper.hpp"
/*
* @return [Object | nil]
*
* @note This method has linear time complexity.
*/
VALUE w_hash_operator_indexer(const VALUE sel... |
Ishotihadus/usamin | ext/usamin/usamin_value.cpp | #include "usamin_value.hpp"
#include <ruby.h>
#include "rubynized_rapidjson.hpp"
UsaminValue::UsaminValue(RubynizedValue *value, const bool free_flag, const VALUE root_document) {
this->value = value;
this->free_flag = free_flag;
this->root_document = root_document;
}
UsaminValue::~UsaminValue() {
if ... |
Ishotihadus/usamin | ext/usamin/parser.cpp | #include "rb270_fix.hpp"
#include "default_parse_flags.hpp"
#include "parser.hpp"
#include <rapidjson/reader.h>
#include <rapidjson/error/en.h>
#include <ruby.h>
#include "rb_common.hpp"
#include "rubynized_rapidjson.hpp"
#include "usamin_value.hpp"
#include "parser_helper.hpp"
static inline rapidjson::ParseResult par... |
Ishotihadus/usamin | ext/usamin/rubynized_rapidjson.cpp | <gh_stars>10-100
#include "rubynized_rapidjson.hpp"
#include <ruby.h>
void *RubyCrtAllocator::Malloc(size_t size) {
if (size)
return ruby_xmalloc(size);
else
return nullptr;
}
void *RubyCrtAllocator::Realloc(void *originalPtr, size_t, size_t newSize) {
if (newSize == 0) {
ruby_xfre... |
Ishotihadus/usamin | ext/usamin/generator.hpp | #ifndef USAMIN_GENERATOR_HPP
#define USAMIN_GENERATOR_HPP
#include <rapidjson/writer.h>
#include <ruby.h>
#include "rubynized_rapidjson.hpp"
VALUE w_generate(const VALUE self, const VALUE value);
VALUE w_pretty_generate(const int argc, const VALUE *argv, const VALUE self);
#endif
|
Ishotihadus/usamin | ext/usamin/rb_common.cpp | #include <ruby.h>
#include <ruby/encoding.h>
#include "rubynized_rapidjson.hpp"
#include "usamin_value.hpp"
VALUE get_utf8_str(VALUE str) {
extern int utf8index;
extern VALUE utf8value;
extern rb_encoding *utf8;
Check_Type(str, T_STRING);
int encoding = rb_enc_get_index(str);
if (encoding == u... |
Ishotihadus/usamin | ext/usamin/rb_usamin_array.hpp | <reponame>Ishotihadus/usamin
#ifndef USAMIN_RB_USAMIN_ARRAY_HPP
#define USAMIN_RB_USAMIN_ARRAY_HPP
#include <ruby.h>
#include "rubynized_rapidjson.hpp"
void flatten_array(RubynizedValue &value, VALUE array, int level, VALUE root_document);
VALUE w_array_operator_indexer(const int argc, const VALUE *argv, const VALUE... |
Ishotihadus/usamin | ext/usamin/parser_helper.hpp | #include <ruby.h>
#include "rb_common.hpp"
#include "rb_usamin_value.hpp"
#include "rubynized_rapidjson.hpp"
#include "usamin_value.hpp"
static inline int test_option(VALUE options, VALUE sym) {
return !NIL_P(options) && RTEST(rb_hash_lookup(options, sym));
}
static inline VALUE make_hash(UsaminValue *value, bool... |
Ishotihadus/usamin | ext/usamin/parser.hpp | <filename>ext/usamin/parser.hpp<gh_stars>10-100
#ifndef USAMIN_PARSER_HPP
#define USAMIN_PARSER_HPP
#include <ruby.h>
VALUE w_load(const int argc, const VALUE *argv, const VALUE self);
VALUE w_parse(const int argc, const VALUE *argv, const VALUE self);
#endif
|
Ishotihadus/usamin | ext/usamin/usamin_value.hpp | #ifndef USAMIN_USAMIN_VALUE_HPP
#define USAMIN_USAMIN_VALUE_HPP
#include <ruby.h>
#include "rubynized_rapidjson.hpp"
class UsaminValue {
public:
RubynizedValue *value;
VALUE root_document;
bool free_flag;
UsaminValue(RubynizedValue *value = nullptr, const bool free_flag = false, const VALUE root_docu... |
Ishotihadus/usamin | ext/usamin/rb_usamin_value.cpp | #include "rb270_fix.hpp"
#include "default_parse_flags.hpp"
#include <rapidjson/error/en.h>
#include <rapidjson/reader.h>
#include <rapidjson/writer.h>
#include <ruby.h>
#include "generator.hpp"
#include "usamin_value.hpp"
#include "parser_helper.hpp"
static void usamin_free(void *p) {
if (!p)
return;
... |
Ishotihadus/usamin | ext/usamin/rb_usamin_array.cpp | <reponame>Ishotihadus/usamin<gh_stars>10-100
#include "rb270_fix.hpp"
#include <rapidjson/document.h>
#include <ruby.h>
#include "usamin_value.hpp"
#include "parser_helper.hpp"
/*
* @overload [](nth)
* @param [Integer] nth
* @return [Object | nil]
*
* @overload [](start, length)
* @param [Integer] start
*... |
Tymolc/botan | src/lib/entropy/rdrand/rdrand.cpp | <reponame>Tymolc/botan<filename>src/lib/entropy/rdrand/rdrand.cpp
/*
* Entropy Source Using Intel's rdrand instruction
* (C) 2012,2015 <NAME>
* (C) 2015 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/rdrand.h>
#include <botan/rdrand_rng.h>
namespace Botan {... |
Tymolc/botan | src/cli/hash.cpp | /*
* (C) 2009,2010,2014,2015,2019 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include "cli.h"
#if defined(BOTAN_HAS_HASH) && defined(BOTAN_HAS_HEX_CODEC)
#include <botan/hash.h>
#include <botan/hex.h>
#endif
#if defined(BOTAN_HAS_BASE64_CODEC)
#include <botan/base64.h... |
Tymolc/botan | src/lib/modes/aead/gcm/ghash.cpp | /*
* GCM GHASH
* (C) 2013,2015,2017 <NAME>
* (C) 2016 <NAME>, Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/ghash.h>
#include <botan/internal/ct_utils.h>
#include <botan/loadstor.h>
#include <botan/cpuid.h>
#include <botan/exceptn.h>
#if defi... |
Tymolc/botan | src/lib/misc/hotp/hotp.cpp | <filename>src/lib/misc/hotp/hotp.cpp<gh_stars>1-10
/*
* HOTP
* (C) 2017 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/hotp.h>
#include <botan/exceptn.h>
namespace Botan {
HOTP::HOTP(const uint8_t key[], size_t key_len,
const std::string& hash_algo, size... |
Tymolc/botan | src/lib/codec/base58/base58.cpp | <reponame>Tymolc/botan
/*
* (C) 2018 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/base58.h>
#include <botan/exceptn.h>
#include <botan/bigint.h>
#include <botan/divide.h>
#include <botan/loadstor.h>
#include <botan/hash.h>
namespace Botan {
namespace {
uint32_t ... |
Tymolc/botan | src/tests/test_x509_path.cpp | /*
* (C) 2006,2011,2012,2014,2015 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include "tests.h"
#if defined(BOTAN_HAS_X509_CERTIFICATES)
#include <botan/x509path.h>
#include <botan/calendar.h>
#include <botan/internal/filesystem.h>
#include <botan/parsing.h>
#inc... |
Tymolc/botan | src/lib/ffi/ffi.cpp | /*
* (C) 2015,2017 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/ffi.h>
#include <botan/internal/ffi_util.h>
#include <botan/internal/os_utils.h>
#include <botan/version.h>
#include <botan/mem_ops.h>
#include <botan/hex.h>
#include <botan/base64.h>
#include <cstdio>... |
Tymolc/botan | src/cli/bcrypt.cpp | <reponame>Tymolc/botan
/*
* (C) 2009,2010,2014,2015,2019 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include "cli.h"
#if defined(BOTAN_HAS_BCRYPT)
#include <botan/bcrypt.h>
#endif
namespace Botan_CLI {
#if defined(BOTAN_HAS_BCRYPT)
class Generate_Bcrypt final : public Com... |
Tymolc/botan | src/lib/pbkdf/pwdhash.cpp | <reponame>Tymolc/botan
/*
* (C) 2018 Ribose Inc
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/pwdhash.h>
#include <botan/exceptn.h>
#include <botan/scan_name.h>
#if defined(BOTAN_HAS_PBKDF2)
#include <botan/pbkdf2.h>
#endif
#if defined(BOTAN_HAS_PGP_S2K)
#include <... |
Tymolc/botan | src/tests/test_certstor_macos.cpp | <gh_stars>1-10
/*
* (C) 1999-2019 <NAME>
* (C) 2019 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include "tests.h"
#if defined(BOTAN_HAS_CERTSTOR_MACOS)
#include <botan/certstor_macos.h>
#include <botan/ber_dec.h>
#include <botan/der_enc.h>
#include <botan/hex.h>
namespac... |
Tymolc/botan | src/lib/utils/poly_dbl/poly_dbl.cpp | /*
* (C) 2017,2018 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/poly_dbl.h>
#include <botan/loadstor.h>
#include <botan/exceptn.h>
namespace Botan {
namespace {
/*
* The minimum weight irreducible binary polynomial of size n
*
* See http://www.hpl.hp.co... |
Tymolc/botan | src/lib/block/des/des.cpp | /*
* DES
* (C) 1999-2008,2018 <NAME>
*
* Based on a public domain implemenation by <NAME> (who in turn
* credited <NAME> and <NAME>)
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/des.h>
#include <botan/loadstor.h>
#include <botan/rotate.h>
namespace Botan {
namespace {
... |
Tymolc/botan | src/lib/block/aes/aes_power8/aes_power8.cpp | <gh_stars>1-10
/*
* AES using POWER8 crypto extensions
*
* Contributed by <NAME>
*
* Further changes
* (C) 2018 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/aes.h>
#include <botan/cpuid.h>
#include <altivec.h>
#undef vector
#undef bool
namespace Botan {
namespac... |
Tymolc/botan | src/lib/pubkey/mce/goppa_code.cpp | /*
* (C) Copyright Projet SECRET, INRIA, Rocquencourt
* (C) <NAME> and <NAME>
*
* (C) 2014 cryptosource GmbH
* (C) 2014 <NAME> <EMAIL>
*
* Botan is released under the Simplified BSD License (see license.txt)
*
*/
#include <botan/internal/mce_internal.h>
#include <botan/internal/code_based_util.h>
namespace ... |
Tymolc/botan | src/lib/math/numbertheory/powm_mnt.cpp | /*
* Montgomery Exponentiation
* (C) 1999-2010,2012,2018 <NAME>
* 2016 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/internal/def_powm.h>
#include <botan/numthry.h>
#include <botan/monty.h>
#include <botan/internal/monty_exp.h>
#include <botan/internal/rounding.... |
Tymolc/botan | src/lib/x509/certstor_system_macos/certstor_macos.cpp | /*
* Certificate Store
* (C) 1999-2019 <NAME>
* (C) 2019 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/build.h>
#include <algorithm>
#include <array>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include <botan/assert.h>
... |
Tymolc/botan | src/lib/tls/tls_version.cpp | <filename>src/lib/tls/tls_version.cpp<gh_stars>1-10
/*
* TLS Protocol Version Management
* (C) 2012 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/tls_version.h>
#include <botan/tls_exceptn.h>
namespace Botan {
namespace TLS {
std::string Protocol_Version::to_stri... |
Tymolc/botan | src/tests/test_pbkdf.cpp | /*
* (C) 2014,2015 <NAME>
* (C) 2018 Ribose Inc
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include "tests.h"
#if defined(BOTAN_HAS_PBKDF)
#include <botan/pbkdf.h>
#include <botan/pwdhash.h>
#endif
#if defined(BOTAN_HAS_PGP_S2K)
#include <botan/pgp_s2k.h>
#endif
#if defined... |
Tymolc/botan | src/lib/ffi/ffi_pkey_algs.cpp | /*
* (C) 2015,2017 <NAME>
* (C) 2017 Ribose Inc
* (C) 2018 <NAME>, Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/ffi.h>
#include <botan/hash.h>
#include <botan/pem.h>
#include <botan/internal/ffi_util.h>
#include <botan/internal/ffi_pkey.h>
#i... |
Tymolc/botan | src/tests/test_filters.cpp | /*
* (C) 2016 <NAME>
* 2016,2017 <NAME>
* 2017 <NAME>
* 2017 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#define BOTAN_NO_DEPRECATED_WARNINGS
#include "tests.h"
#if defined(BOTAN_HAS_FILTERS)
#include <botan/secqueue.h>
#include <botan/pipe.h>
#include <bot... |
Tymolc/botan | src/tests/main.cpp | /*
* (C) 2015 <NAME>
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include "../cli/argparse.h"
#include "test_runner.h"
#include "tests.h"
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <botan/version.h>
#if defined(BOTAN_HAS_OPENSSL)
#include <b... |
thrnz/libtorrent | src/merkle.cpp | /*
Copyright (c) 2015, 2017, 2019-2020, <NAME>
Copyright (c) 2015, <NAME>
Copyright (c) 2017, <NAME>
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... |
thrnz/libtorrent | test/test_hash_picker.cpp | /*
Copyright (c) 2017, BitTorrent Inc.
Copyright (c) 2019-2020, <NAME>
Copyright (c) 2020, <NAME>
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 ... |
thrnz/libtorrent | simulation/disk_io.hpp | <gh_stars>0
/*
Copyright (c) 2021, <NAME>
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 ... |
thrnz/libtorrent | src/ed25519/hasher512.cpp | /*
Copyright (c) 2003-2016, <NAME>, <NAME>
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.