Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
31 views

Converting Node.js (npm) package to C++ for use in Go and C# [closed]

I have a npm package, which is basically a console application, that I need to use in both Go and C# applications. Direct conversion to C++ seems complex and time-consuming. What are the best ...
Arpan Nagar's user avatar
1 vote
1 answer
57 views

Is it possible to wrap (replace) a registered service with my own but still keep the old instance?

Assuming I have this service registration: services.AddScoped<IFoo, Foo>(); I know you can "Replace service registration in ASP.NET Core built-in DI container?" but is it possible to ...
Luke Vo's user avatar
  • 20k
0 votes
0 answers
20 views

DiscriminationThreshold() for catboost

visualizer = DiscriminationThreshold(estimator, is_fitted=True, exclude="queue_rate", random_state=42) visualizer.fit(X_val, y_val) visualizer.show() When I use the above code with ...
FeFortti's user avatar
0 votes
0 answers
28 views

Deny running a specific command in python virtual environment

Premise: I have created a python wrapper (let's call the wrapper pycomd) around a command (let's call the command comd). Requirement: I want to deny the user from running comd whenever they run my ...
Suhas Srivastava's user avatar
0 votes
1 answer
42 views

GDAL Exception when using in AutoCAD .Net Plugin

I have installed GDAL and GDAL.Native v3.9.1 packages. Console applications work well, but when I use it in AutoCAD Class Library project, it always raises the exception: The type initializer for '...
Imran Anees's user avatar
0 votes
0 answers
41 views

As a wrapper object in JavaScript, why can not use 'new' to create a BigInt in JavasScript? [duplicate]

There are 5 wrapper objects in JavaScript: Number, BigInt, String, Boolean, and Symbol.You can use 'new' to create a Number, String, Boolean, Symbol. But you can not use 'new' to create a BigInt. what ...
Leo qiao's user avatar
-1 votes
1 answer
102 views

C# proper (and easy) implementation for changing `using` statements?

I've recently stubled across a seemingly very simple problem I can't wrap my head around: I am currently building a simple tool to access some USB Oscilloscopes. Language Version is C#7.3 Following ...
L T's user avatar
  • 3
-1 votes
2 answers
76 views

Is it possible to implement a recursive POD wrapper in C++?

I have a class to wrap POD struct types, but I'm having trouble when a POD struct has another POD inside, because my wrapper class only stores the POD as it is, using composition. #include <utility&...
edugomez102's user avatar
1 vote
1 answer
36 views

How do I override auto formats in {tern} functions?

Considering {tern} and {rtables} package formatting functions, can you override auto formats in {tern} functions like count_patients_with_flags? For example: library(rtables) library(tern) library(...
Dimple Patel's user avatar
1 vote
1 answer
171 views

C wrapper to iterate a C++ map

I am building a module in C++ which will also be used by some C code. The C++ module makes use of std::map to manage some objects. I would like to write a C wrapper to return some info about the ...
phatpaul's user avatar
  • 334
0 votes
0 answers
25 views

Maven wrapper command(mvnw.cmd) failure

At DOS CMD prompt, I ran 'mvnw.cmd' as shown below. However, I had a hard to interpret error - my partial Window user home directory pathname is being treated as a command. That is, my home directory ...
Park JongBum's user avatar
  • 1,363
0 votes
1 answer
93 views

Encapsulate third-party Service Provider Interface

I am trying to encapsulate a third-party library by writing a wrapper over it and using only required APIs as per my need. To achieve this, I have created this wrapper project as a standalone project ...
booyaakaashaa's user avatar
0 votes
1 answer
182 views

Getting size of a C++ class in a C application at compile time

In summary, I have written a C++ library and am now making a C wrapper to let C programmer use my lib. I am able to get it to work by using raw pointers. Here's what I do. // some_class.hpp namespace ...
Pier-Yves Lessard's user avatar
1 vote
1 answer
108 views

Connecting to azure iot hub from client side react app within an iOS wrapper

We are attempting to connect a vite react web app to an azure iot hub. We'd like to use a .pem, and .key file to register the device with gobal.azure-devices-provisioning.net as shown in their github ...
Jeff spaulding's user avatar
1 vote
3 answers
129 views

How does one access the arguments of a function call when this function can not be rewritten due to its unknown implementation?

I have a function-returning function. The inner function makes use of the parent function's argument in its body. Then I make a list of functions produced by calling the parent function with different ...
burkay's user avatar
  • 1,170
0 votes
1 answer
27 views

Sort by name in an alphabetical order when returning in wrapper class

. @AuraEnabled(cacheable=true) public static list<ProgramBrandTotalAmount> ReportWithTotalBrandOrder(string programId) { list<Program_Item__c> programBrandList ...
Kavya's user avatar
  • 3
0 votes
0 answers
60 views

symbol not found in flat namespace '_GOMP_loop_end_nowait' when importing Python wrapper made with Cython (MacOS)

I'm working on a C++ code that makes use of openmp on MacOS. The code normally gets compiled with a makefile, and the resulting binary accepts some arguments in input and outputs arrays as files. ...
Matteo Peron's user avatar
2 votes
1 answer
77 views

File size overhead reduction of C++ wrapping by Cythonization

I have the following minimal example of summing an array (taken from here): #lib.cpp template<typename T> T arr_sum(T *arr, int size) { T temp=0; for (int i=0; i != size; ++i){ ...
Gideon Kogan's user avatar
-1 votes
1 answer
102 views

Using an array of length 2 or using an object to wrap two floats for high efficiency?

I am writing an app that requires high efficiency. It's an app that deals constantly with floats. I've been told to avoid constants (static final fields). So basically I have a method like this one: ...
zaxunobi's user avatar
  • 890
0 votes
1 answer
37 views

Cython interfaces for two libraries sharing an interface for a third library

My project involves 3 dlls for each of which I am building python interfaces. Let's call them aux, libA and libB. The idea is that aux defines a python object (which I will call Point that is used by ...
tjd's user avatar
  • 13
1 vote
1 answer
59 views

simple pybind11 wrapper in Yocto

I can build example.so and put it into /usr/lib in Yocto dunfell after I read https://github.com/pybind/pybind11/issues/1330. This is example.cpp that includes pybind11 wrapper #include <pybind11/...
Youngmin Kim's user avatar
0 votes
0 answers
31 views

Helps: rust wrap a third type to implement custom method , but allow to access it just like the origin one, include move fields

Assume there is a third type called Car; pub struct Car { name: String, price: i64, } I need to implement some custom method, such as get the car category or validate, so I create a new type ...
Edgar's user avatar
  • 101
0 votes
1 answer
68 views

workaround for wrapping C++ tuples in cython - a more explicit answer please

I need a cython wrapper for a tuple consisting of three elements all of the same type. Now I know that this isn't directly supported by cython but that there is a workaround that is "explained&...
tjd's user avatar
  • 13
0 votes
0 answers
53 views

Multi level project reference using dll

Adding multi level project reference(Project1 referenced in Project2 & Project2 is reference in Project3) allows accessing the methods/namespace of level1(i.e. Project1) in level3(i.e.Project3). ...
PRI's user avatar
  • 27
-1 votes
1 answer
32 views

VTK MouseEvents example not working with Java wrappers

After rewriting the VTK example 'MouseEvents' (https://examples.vtk.org/site/Cxx/Interaction/MouseEvents/) in Java, import vtk.vtkActor; import vtk.vtkInteractorStyleTrackballCamera; import vtk....
mike_uvw's user avatar
0 votes
0 answers
50 views

How do I access a variable that's using the @Query wrapper in other views?

I'm brand new to swift, and I've been learning how to use SwiftData at a basic level. I have an array of Item objects called "items" that is using the @Query wrapper so that it updates ...
snide_forever's user avatar
0 votes
0 answers
97 views

How to make wrapper's constructors copy paste the underlying type's constructors?

I am writing a class stalker<Obj> that holds inside a variable of type Obj. I want stalker<Obj> to pretend that it is the same as Obj (from the user's perspective). Thus, I expect that ...
Alexander S's user avatar
1 vote
2 answers
71 views

primitive types can't convert to Wrapper for an ArrayList

I've been trying to learn how to use ArrayLists, however when I try to add primitive type values they don't convert to wrapper types in this machine. import java.util.ArrayList; import java.util....
xzd's user avatar
  • 11
2 votes
1 answer
108 views

How can Mockito.spy() return the same type while adding spying behavior?

I suspected the Mockito.spy() returns a wrapper around the copy of the parameter object, and the type of this wrapper is a generated sub type of the wrapped object. Then the spying functionality could ...
Géza's user avatar
  • 515
-1 votes
1 answer
80 views

Proper way to marshal char* to string using C# interoperability. Get "a heap has been corrupted" exception

not a lot of experience in C++. Attempting to Marshal char* in C to string in C#, using [MarshalAs(UnmanagedType.LPStr)], but I get a "a heap has been corrupted" exception. It does however ...
isswf's user avatar
  • 193
0 votes
1 answer
208 views

How to use a c++ class as wrapper for timer-interrupts on RP2040 (RPPico)

I want to write a C++ wrapper class which can be used to handle multiple timer interrupts in parallel. For one interrupt at a time i have a working solution similar to this one: Use lambda function as ...
Vanessa 0's user avatar
-3 votes
1 answer
101 views

How to automate wrapping C library into C++ [closed]

LVGL library looks very promising as an alternative to Qt (C++), but it's C based. Is there a way to automate wrapping it into a C++ modern interface or at least with minimum modification each new ...
b26's user avatar
  • 676
2 votes
1 answer
376 views

How can I use GObject Introspection to generate Java bindings?

I need to use the GLib library in the spice-gtk. Since, it’s a GLib library, that means I can use GObject introspection to generate Java bindings. I have found out that I need to get GIR XML files ...
ThrownRedstone's user avatar
1 vote
1 answer
68 views

How to make default export compatible with CommonJS

I am currently in the process of writing a wrapper for an API in TypeScript but am currently experiencing an issue when trying to use said wrapper in CommonJS after its built. I have a class located ...
Daniel Wheaton's user avatar
0 votes
0 answers
66 views

Switch statement when using an Enum Wrapper (Enumeration base class)

Am using this mechanic here from official Microsoft docs because I need certain functionality that such a wrapper for enums can provide (ability to give enum values a different ToString() name): https:...
DragonGamer's user avatar
0 votes
0 answers
31 views

Validator method before executing method

I am working wiht Handlebars and i want to implement validation process before executing Handlebar Helper method apply(). I have an interface that extends Helper interface from Handlebar that has ...
user's user avatar
  • 51
0 votes
1 answer
61 views

Backpack Editable Columns does not store data with a wrapper

I like to flag objectionable data to users. But if I use the wrapper, the Editable Columns won't save the data. After pressing enter it returns 404 - Page not found. The route admin/undefined could ...
Ladislav Sviták's user avatar
0 votes
1 answer
51 views

Angular: Wrap anchors with specific class with a span and add svg alongside anchor while styling both elements

I would like to know how I can automatically wrap all anchor elements with a class X with a span element. Then, add an svg to the span along with the anchor. Illustration Imagine I have any amount of ...
Byebye's user avatar
  • 1,083
0 votes
0 answers
15 views

Why is wrapper not found even though the code explicitly exports it?

I have a wrapper inside a wrapper folder inside assets which is used by my Register.jsx page, I am getting the following error when I try to run: Uncaught SyntaxError: The requested module '/src/...
Romy's user avatar
  • 1
1 vote
0 answers
59 views

How to add type annotations to a decorator for a class instance method that has been decorated with functools.wraps?

P = ParamSpec("P") R = TypeVar("R") def deco(func: Callable[Concatenate[R, int, int, P], None]): @functools.wraps(func) def wrapper(self, *args: P.args, **kwargs: P....
Junyang Feng's user avatar
0 votes
0 answers
195 views

Nanobind: How to use class from another module inside module?

I currently have several NB_MODULEs, and those have some nb:classes which are identical. I'm looking to move those to a common place so that each NB_MODULE can use them from the same location, ...
WannabeDeveloper's user avatar
1 vote
1 answer
197 views

type safe wrapper class in typescript

I'm trying to create a wrapper class. I have a Base class from an imported package and want to wrap it with some logging and try/catch, in such a way that the Wrapper class is fully abstracted away ...
apocalypsis's user avatar
0 votes
0 answers
27 views

Flask wrapper function handles a error response correctly when wrapped around one route's function but doesnt for another route function

I have a flask wrapper function that is used to check for JWT's and verify them. When i use it for one route it works correctly but when I use it for my other route it doesn't. When I mean work ...
floki's user avatar
  • 1
0 votes
0 answers
12 views

Plugin wrapper not linking

My app was created in Unity for Mac and iOS using C#. I have also created an Apple TV version, but need to connect to iCloud for the save since that seems to be the only way to save on that medium. I ...
BevvyOfFun's user avatar
0 votes
0 answers
82 views

Gradle wrapper credentials requirements

I'm trying to get the credentials to work to download the gradle distribution. Currently, i've set the credentials in my root gradle.properties file like: systemProp.gradle.wrapperUser=user systemProp....
elementmg's user avatar
  • 254
3 votes
1 answer
344 views

How to wrap a cmdlet

PowerShell includes a large framework for processing cmdlets. But sometimes a cmdlet misses a feature required for specific custom need as e.g. in this question How to highlight the properties of ...
iRon's user avatar
  • 22.9k
0 votes
0 answers
152 views

Maintaining Layout of Percentage-Based Children in React Native Reanimated Wrapper

I'm working on a wrapper component that should animate child components using React Native Reanimated. My current approach is to clone each child and wrap it into a Animated.View. export function ...
Saphirah's user avatar
0 votes
1 answer
23 views

Can I use the YYYYMMDD-token *and* have the most recent logfile without the "_YYYYMMDD"-appendix?

my current logging configuration looks like this: wrapper.logfile=/something/logs/wrapper.YYYYMMDD.log wrapper.logfile.format=LPTM wrapper.logfile.loglevel=INFO wrapper.logfile.maxsize=0 wrapper....
Lars Neidhold's user avatar
0 votes
2 answers
242 views

Accessing child of React Fragment

Say I have a component that should wrap a child component and use an IntersectionObserver to monitor when the child appears on screen, and then fade it in. I could implement something like this: ...
Claude Hasler's user avatar
1 vote
0 answers
40 views

Python Create a simple library wrapper (as a side package)

I need to extend a library's functionality (let it be pandas, for example). It works if I put my code inside ...site-packages/pandas/__init__.py 👍 (however, the code I added will be auto erased with ...
Anton Frolov's user avatar

1
2 3 4 5
74