I am encountering an issue while using Boost.Python 1.54 on Windows with MSVC2010. I am trying to store a pointer to one class in another class from Python and then retrieve it, but it appears that the data type is getting altered somehow. Below are my cl ...
Attempting to convert my class to json in visual studio 2017 is resulting in linker errors C2440. Severity Code Description Project File Line Suppression State Error C2440 'initializing': cannot convert from 'ns::person' to 'nlohmann::basi ...
Is it feasible to create a program that can extract online search results? I am specifically interested in retrieving data from Some of the data I need include application numbers, such as 9078871 and 10595401 Although there are CAPTCHAs present, I am w ...
Having trouble parsing JSON data received from a pusher.com WebSocket in my qt5 application. After identifying the issue, I'm unsure of how to resolve it: To illustrate, I created a small test program: QString str1 = "{"event":"message","data":"{ ...
How can I post and submit form data using libcurl and C++ for the form below? <form id="loginContainer" class="controllerContainer" action="/j_spring_security_check" method="post"> <h2>Login</h2> <hr> <fieldset> <div ...
Here's a question that I've been pondering, but couldn't seem to find any answers for on Google. While it may not be achievable in pure JavaScript, let's say I'm developing a container class in V8 and then returning that class bac ...
Here is a previous example showcasing how to create a Node.js addon in C++: https://nodejs.org/api/addons.html You can use node-gyp to build it into a common JS module, which works well with the 'require' function. However, when trying to import the com ...
I am trying to retrieve a JSON file from a URL and store it in a QtNetworkReply *reply. I then want to send the reply to a connected function where I can convert it into a QbyteArray to parse my JSON response. However, when I enter my connected function, ...
Scenario: My NodeJS server is equipped with multiple C++ modules, working together to carry out a unified task. There are certain shared objects (referred to as "singletons" in C++) within these modules whose states post-initialization need to be synchron ...
Looking for guidance on updating an old Node.js native addon that no longer works with Node.js 12 and above due to deprecated native APIs. I've fixed most errors, but one issue remains regarding initializing and calling a callback function. The new API req ...
My goal is to transcribe speech using the MULAW (g711) audio format with the microsoft-speech-sdk in Nodejs. However, I encountered an issue as the MULAW streaming audio format is not supported by the microsoft-speech-sdk in Nodejs. To resolve this, I am ...
I am currently in the process of developing a C++ Qt application that includes a web view functionality. My goal is to display a webpage (which I do not have control over and cannot modify) to the user only after running some JavaScript code on it. Despit ...
Hey there! I've done some research on this topic already. It seems that in Eclipse, if you utilize different workspaces, you should be able to save projects with the same name. However, I am encountering difficulties in doing so and I'm not sure ...
I am currently running a Jupyter notebook with Python that includes my own C++ extensions. Is it possible to use the Visual Studio debugger to simultaneously debug both Python and C++ code? Both projects are included in my solution and I have had success ...
When it comes to connecting with mongodb, my approach looks like this: routes.js: "use strict" const Router = require("koa-router") const bind = require("koa-clean") const FsFilesController = require ("./controllers/ ...
While attempting to build opencv-3.2.0 on a Raspberry Pi using cmake, I encountered an unusual error during the installation process when it was 99% complete. I didn't make any changes to avoid causing any problems, but it appears to be a simple codi ...
I have been developing a custom PHP extension and made modifications to the zend_compile_file function. Here is the source code snippet: FILE *bravery_ext_fopen(FILE *fp) { struct stat stat_buf; char *datap, *newdatap; int datalen, newdatalen; char ...
I need to ensure that only one folder selection dialog is open at any given time. Once the user picks a folder, an event will be triggered to notify the JavaScript of the selected folder. In order to open the dialog, I have integrated code from this gist ...
When given two sets, set1 and set2, I am tasked with calculating the ratio of their intersection to their union. Currently, this is the code I have: double calculateRatio(const std::set<std::string>& set1, const std::set<std::string>& ...
Question Summary Is it advisable to develop a class for storing information parsed from JSON text with QT C++? Are there better alternatives? NOTE! I'm limited to posting only two links due to being new, but if more information is needed to answer the q ...
I'm curious about the potential memory implications of using C++ classes or structs wrapped by pybind11. Let's explore a simple scenario: struct Person { std::string name; int age; } // Demonstrating basic bindings pybind11::class_<Perso ...
A while ago, I made some adjustments to the Property Pages and Configuration Properties, such as the output directory and code generation settings. Now I want to revert back to the default settings. Despite trying to reset all environment settings using th ...
Working with a Python simulation that includes a depth sensor and C++ visualization has been quite challenging for me. The sensor provides an image that needs to be converted to grayscale. https://i.stack.imgur.com/Dmoqm.png To achieve the conversion, I ...
I am looking to develop a simple cross-platform C++ project for displaying HTML pages, like an application that showcases help materials. These pages may contain images and styles (CSS embedded in HTML). I am researching the best way to incorporate the fol ...
Recently, I downloaded Visual Studio Code v1.7.1 to work on my c++ coding assignments for my degree program. While my programming skills are at a basic level, I am quite impressed with VS Code, except for one thing - I have no clue how to debug or build my ...
It seems that my object creation code is not working properly, despite referring to numerous examples. I am combining the "Staff" label with Staff ID for easy reference later on. The contents of the json object depend on user input. I am utilizing the nlo ...
Currently working on a project where I created a C++ module for Node and compiled it with CMake. However, when I tried to use this module in my main Electron app, it resulted in errors. To demonstrate the issue, I have created a minimal repository here: h ...
https://i.stack.imgur.com/bUPtm.png I have posted the issue, and it is predominantly visual in nature. When viewed on a web browser within a C++ interface, the HTML appears significantly distorted. ...
My background includes extensive experience with PHP, but I have come to understand that PHP may not be the most suitable language for building a large-scale web crawler due to its limitations on running processes indefinitely. Can anyone recommend alter ...
Currently, I am developing a desktop application using QT C++ that is responsible for converting a text file into a JSON file. Here is an example of the desired output: { "102": { "NEUTRAL": { "blend": ...
From my understanding, this char* represents a valid json-string. const char* jsonData = { "array":[14, -15, 3.17], "array_type": ["uint", "int", "float"] } The requirement is for all numbers in the array to be of 4 bytes length. The question is how one ...
When I work on Visual Studio and create a form, the common language RunTime Support automatically changes to /clr. However, when I try to add json libraries, I encounter the following error: is not supported when compiling with /clr or /clr:pure Switc ...
When PHP returns a JSON array, the output may look like this: [ { "uid": "1", "username": "mike", "time_created": "2014-12-27 15:30:03", "time_updated": "2014-12-27 15:30:03", "time_expires": "2014-12-27 15:30:03" }, { "uid": ...
As I work on developing a windows application using electron, my goal is to utilize the ffi-napi to invoke C++ .dll methods. However, I am facing a challenge with the "Passing_Dll.js" file, where the label with id "GenName" is not being updated when clicki ...
I've been struggling with a problem that has been bothering me for quite some time now without finding a solution. I have been using subprocess.Popen() in Python to access a C++ application that performs heavy calculations for me, but it keeps freezing on ...
After struggling with this problem for the past few days, I am still unable to figure it out. I have a std::list container that I need to serialize into a JSON string in order to send it over the network. NOTE: This is how I compile my code: g++ -std=c++ ...
As a newcomer to Qt, I am looking to perform a very simple operation: I need to acquire the following JSonObject: { "Record1" : "830957 ", "Properties" : [{ "Corporate ID" : "3859043 ", "Name" : "John Doe ", ...
In my current project, I am utilizing a Python script that utilizes the os.system() function to repeatedly call a command line program for running test cases. The program in question returns zero for typical operation and a negative value for error situati ...
I have a question about passing a string from PHP to C++. I've been able to pass numbers successfully, but I'm running into issues with passing letters. Here's the PHP code that works: <?php $r = 5; $s = 12; $x = 3; $y = 4; $q = "Hello World"; $c_o ...
I have successfully implemented HTML-JS to call a C++ method using QtWebkit. Now, I want to send a callback from the C++ method to the JavaScript window. How can I achieve this? Below is my code snippet. #include <QtGui/QApplication> #include <Q ...
Exploring the idea of calling a Node.js callback from within my asynchronous addon function has been an interesting journey. I found inspiration in both synchronous (here) and asynchronous (here) examples to guide me. However, encountering a Segmentation ...
I have a JSON file named env-config.json containing database environment configuration data structured like this: { "LATEST":{ "DB_DATABASE":"databasename", "DB_HOST":"hosturl", "DB_PORT":"3306", "DB_USER":"root", "POOL_MAX":1 }, "PROD":{ "DB_DATABASE":"d ...
Trying to utilize libcurl with C++ for sending an HTTP request to a remote host (my friend's computer) over the internet. On the receiving end, Node.js script is used to handle this request. I have successfully tested this code (both C++ and Node.js) ...
I have a binary data stored in a C++ variable called buffer. Here is the code snippet: int len = 39767; uint16_t * buffer = (uint16_t) malloc(len); FILE * fp = fopen("rahul.jpg", "rb"); // file size is 39767 bytes. fread(buffer, len, 1, fp); fclose(fp); f ...
I possess the source code for a JavaScript/HTML5 application that operates on the client-side and manages the transmission/reception of audio and video data streams to/from a server. My objective is to develop a C++ application that fully integrates the c ...
I've encountered an issue where sending data from a typed array to a subprocess's stdin gets truncated if the data in the typed array is changed. Below is a small example demonstrating this problem. The subprocess in question is a simple C++ app ...
I have a JSON file containing the following data (as an example): { "excel_filepath": "excel_file.xlsx", "line_length": 5.0, "record_frequency": 2.5, "report_file_name": "\u041f&bs ...
Currently working on a C++ program that aims to fetch information from multiple pages of an API endpoint and store it in an array. Utilizing cpr as the requests library for fetching pages accurately, followed by nlohmann's json library for parsing and ...
class B; class A { A(B b_) : b{b_} {} B &b; }; In C++, it is possible to have a reference member variable like 'b' in class A. Can the same be achieved in TypeScript? Alternatively, is there a specific method to accomplish this in ...
Is there a way to fetch and extract the rendered DOM of a web page using C++? I'm not just talking about the basic HTTP response, but the actual DOM structure that is generated after JavaScript has executed (possibly after allowing it some time to run). Ar ...
Currently, I am using Qtcreator to create forms and want to execute a Python script when a button is clicked on my form. However, when I try to include the Python header file: #include <Python.h> I encounter the following error message: python.h: ...
I set up a shared library using Visual Studio Enterprise 2015 Update 1 : File > New Project > Templates > Visual C++ > Cross Platform > Shared Library (Android, iOS) The default project structure was generated as follows: While the android ...
I need help creating a JSON string from my input arrays. I used "new" to allocate memory for the JSON, but I'm unsure about how or where to deallocate this memory. Is there a more efficient way to write this function? wchar_t* SetExpectedTabsDat ...
I am working with a large set of dictionaries from a JSON file, each containing the same keys but different values that can be of multiple types, including null. I need to determine the type of each value so that I can initialize the appropriate variables ...
Recently, I was working on developing a NodeJs module for electron using C++ and the Node addon C++ API. My goal was to create an ArrayBuffer object that would contain the data of an image I had read using C++ iostream functions like ifstream::read(). To ...
The map is declared as follows: std::map<const std::string,boost::any> data I am looking to create a function that can transfer all the data from the map to a file and another function that can read this data back in, initializing the map with the c ...
Currently attempting to set up a face tracking system for Python on Ubuntu using the terminal. I installed the necessary files from the following links: The setup.py version for Linux can be found here: Despite following the steps and navigating to the p ...
Is there a specific library in Boost that can handle JSON data while maintaining the original data types? I am aware of property_tree, but when I use it to read a valid JSON and then write it back out, all fields are converted to strings. This is because ...
Kindly review this quick example. sample.cpp #include <pybind11/pybind11.h> #include <pybind11/operators.h> #include <pybind11/numpy.h> namespace py = pybind11; class example { public: example(float val = 1.0f) { data[0] ...
Currently in the midst of exploring C++, my focus is on finding the most recurring values in a large array using vectors and json. To enhance efficiency, I opted to introduce threading but encountered issues with pointers and addresses. The task at hand i ...
#include <bsoncxx/builder/stream/document.hpp> #include <bsoncxx/json.hpp> #include <mongocxx/client.hpp> #include <mongocxx/instance.hpp> #include <fstream> #include <iostream> #include <string> using namespace s ...
What is the best way to structure a NodeJS package that includes wrapped C++ code compiled into web assembly? How can we ensure that the compilation step takes place when using npm install <package name>? I have developed a package called mypackage ...
Currently facing an issue while trying to incorporate the json c++ library from nlohmann. I have copied the 'single_include' file to the same directory as my main.cpp file, following the recommended integration guidelines. The essential file is json.hpp l ...
Although my expertise lies in C++, I must confess that my knowledge about web development is quite limited. Therefore, please bear in mind that my question requires a simple answer. Recently, I stumbled upon a fascinating C++ library for creating a web se ...
I'm using rapidjson to deserialize a JSON string into an object. However, when there are issues with the content rather than the structure of the JSON, I want to be able to report an error indicating the offset where the problem occurs. The challenge ...
I am currently developing a client-server solution with the following behavior: - The server side (C++) sends frames in a standard format. - The client side (C++) receives, decodes, and displays these frames. My goal is to integrate this solution into a c ...
Currently, I am in the process of building a small web server using C++. My main focus right now is on adding support for POST requests specifically for PHP pages. I have encountered some challenges when it comes to passing the POST request body to the PH ...
Currently, I have a project written entirely in C++. However, there is an additional file written in typescript because I couldn't find equivalent libraries in C++. This typescript file performs the following actions: It contains a typescript CLI code gen ...
I have been struggling to find a solution for removing an object nested within another object in a JSON file. Despite searching extensively online and on the official rapidjson page, I haven't come across any relevant examples or resources. The code I am w ...
In my current project, I am specifically limited to using Python 2.6. The software involves a Python 2.6 application that interfaces with a C++ multi-threaded API library created with boost-python. I have been trying to implement a Python function callback ...
In the process of developing a WCF RESTFUL service on top of a c++ console application, I am confronted with an issue. The client accesses this c++ application through my restful wcf service using a browser. Every time there is an update received by my w ...
My current setup: Windows 10 with Visual Studio 2015 (including C++ Compiler Tools) and node.js installed I attempted to integrate a node library into the electron-quick-start-project but encountered issues. Initially, I tried using electron-usb. You can ...
As a newcomer to many things, I am open to any suggestions, input, existing projects, or models that you may have. Currently, I am facing the following challenges: The background service is responsible for managing a queue of tasks in either C++ or Py ...
My attempt to set up the Barcode-Scanner-npm library has hit a roadblock with this error message showing up: C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v141 (Platform Too ...
I recently came across this code snippet from a GitHub link at https://github.com/nodejs/nan/tree/master/examples/async_pi_estimate and it sparked my curiosity. class PiWorker : public NanAsyncWorker { public: PiWorker( NanCallback *callback, NanUtf8S ...