Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I need to connect a QAbstractItemModel on a client computer to data on a server computer. I already have a nice class which handles data requests/responses asynchronously across the network (from another project), which emits a signal when data arrives.
I'm just trying to figure out how to allow the QAbstractItemModel methods (like data and rowCount) to behave asynchronously. I can override these methods and insert an eventloop which exits on data arrival, but that doesn't feel right.
I'm sure I once saw an example of this online but cannot find it. Can someone offer or point to a way to achieve this?
From what I can find online, you should NOT use an eventloop to cause the QAIM to wait in any of its methods.
Instead, return an immediate value with an option 'datavalid' flag which the view should use to present/hide output. Then request data from the remote model, and upon receipt issue the data changed signal for the view to update the data onscreen.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I'm interested in locally removing these two dependencies in the "regr.svm" learner code:
Dependency 1: Cost
Dependency 2: Epsilon
I have tried without success with the trace() function:
trace(LearnerRegrSVM.R, edit = TRUE)
I opened a related issue on Gitgub a few days ago, but I have not received a response.
{mlr3} learners are wrappers around the original implementations and are not editable by the user.
If something is wrong, you are always welcome to submit a PR in the respective GitHub repo and we'll have a look.
IF you want to modify code quickly, you can always fork the repo, make adjustments yourself and use your own fork.
(Asking on Stackoverflow should usually include some code, otherwise people will flag to close the question.)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to migrate the data which already exists in my firebase database: Add a new field to all children; manipulate an existing field (ie a -> a + 3).
Since there is no real frontend available to do that, I wonder how it could be done?
If there is no real front end then:
If the database is small and you are using the RTD then download the JSON and edit it
If the database is large since you have no front end you should do it with Functions
How to do it with Functions
You have to create a Functions project that will have an HTTP request trigger, once you access that url, then the trigger will query the data and for each result will create new data.
For doing this the simplest way to start is following this video. You have to do the same but instead of returning something to the browser with send, just end the Function with a code 200 (if it worked).
I would recommend creating an extra node for verification something like migration_march: false and then set it to true once the migration is completed. That way you can avoid unintentional re-migrations. There should be a validation for this once the trigger is started.
Doing a query on Functions is fairly the same as doing it in any other SDK this is the Functions docs.
You will probably need to know how to work with promises since your algorithm is gonna be: a query where for each value found set a new value in another place and then move forward to the new value, here is an illustrative video (couldn't find the original video)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to achieve the BAB tree structure like,
I am trying to use R, matlab and CPLEX, but cannot figure it out.
In C++ you could retrieve the Branch-and-Bound (B&B) information via a Callback. In simple terms, a callback is an instruction that is declared before optimisation to CPLEX and whenever the condition is met during the B&B, CPLEX will stop and enter the callback to execute your code.
As you can see this is exactly what you need, although most people use them to impose cuts or valid inequalities as a walkaround to avoid setting a priori an exponential number of constraints, and only add them on-the-go. Nothing stops you from declaring a very general condition that will be satisfied at every node of the tree, and then extract all the information you might need and construct the tree based on that info. You only have to go read CPLEX documentation to determine which is the more suitable callback depending on your problem and need.
One is glad to be of service
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I need get the File size while it is being generated.
I've tried using QThread and QFileInfo::size and a while with a flag that signals when the finished file, but the value never changes.
So was wondering if you can take the file size while it is being generated.
From the Qt docs:
Note: To speed up performance, QFileInfo caches information about the file. Because files can be changed by other users or programs, or even by other parts of the same program, there is a function that refreshes the file information: refresh(). If you want to switch off a QFileInfo's caching and force it to access the file system every time you request information from it call setCaching(false).
So try the QFileInfo::refresh() function before (re-)checking the file size.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
n case of rather large dataset with million+ objects, how scalable is firebase dashboard (web interface)?
On test project all changes in dataset are immediately propagated to browser. However in case of large project the browser will not be able to handle it, or will be?
if I have the index structure:
update_index:{
object_00000001:{},
object_00000002:{},
.
.
object_99999999:{}
}
and there are constant changes on various elements. Is there a way only to indicate a change in dataset without passing data to snapshot and propagate the changes on user request?
How is it handled in firebase dashboard?
Its difficult to understand what you're asking. Assuming you mean Forge for the dashboard, then Forge will load all the data in your firebase, which can be an expensive operation, and can definitely be slow. Additionally, if you're opening an object with any more than a couple hundred keys then it becomes quite slow.
Every read operation in firebase is done with a .on or a .once as far as I'm aware, and you can listen for 'child_changed' event type but the only way to handle read data is with a snapshot.
If you're referring to Forge in your question, this may help: Performance of Firebase with large data sets