WDF - filter driver for sandbox - wdf

I want to intercept file (ReadFile, WriteFile) operations and registry calls of some program. I decided that filter driver will be the best solution. Is it possible to do that from WDF or I need to learn WDM?
Are there any samples?

OK, minifilter is the right solution

Related

SYCL DPC++ auto detect device

This question might be trivial, unfortunately I haven't found the answer I was looking for.
I used dpct migration tool to port some cuda code to Intel DPC++ and then I further optimized everything I needed and eventually got rid of everything related to dpct expect the super handy
dpct::get_current_device();
which basically solves all the previous pain I had to put compile options to select the appropriate device and control them with Makefiles and so on.
Is there any way to do this without using dpct ?
I had a look at how dpct does this (here) but it looks pretty non-straightforward and it relies on other internal functions.
Is there any way to avoid this ?
I'm not totally clear from your question whether you want to 1) grab a handle to your device or 2) select a device on which to run stuff, so I'll try to answer both. Note that dpct::get_current_device() isn't actually selecting a device, it's just returning the device which you have already selected earlier in your program.
Typically when using SYCL we start with a sycl::queue, which we use to submit kernels, memory copy operations etc. From a sycl::queue you can access your device with:
sycl::device d = q.get_device();
But it seems like you may instead be asking for the simplest way to select a device. In this case, the simplest approach is to construct your queue with one of SYCL's provided device selectors:
sycl::queue q{sycl::gpu_selector()};
sycl::queue q{sycl::cpu_selector()};
sycl::queue q{sycl::default_selector()};
Note that the last option (sycl::default_selector()) is probably what dpct is currently doing for you.

How to properly debug OCaml code?

Can I know how an experienced OCaml developer debugs his code?
What I am doing is just using Printf.printf. It is too troublesome as I have to comment them all out when I need a clean output.
How should I better control this debugging process? special annotation to switch those logging on or off?
thanks
You can use bolt for this purpose. It's a syntax extension.
Btw. Ocaml has a real debugger.
There is a feature of the OCaml debugger that you may not be aware of which is not commonly found with stateful programming and is called time travel. See section 16.4.4. Basically since all of the information from step to step is kept on the stack, by keeping the changes associated with each step saved during processing, one can move through the changes in time to see the values during that step. Think of it as running the program once logging all of the values at each step into a data store then indexing into that data store based on a step number to see the values at that step.
You can also use ocp-ppx-debug which will add a printf with the good location instead of adding them manually.
https://github.com/OCamlPro-Couderc/ocp-ppx-debug

Is it possible to replace apache solr in broadleafcommerce with ElasticSearch?

I am trying to use broadleafcommerce and customize it.On study i found it uses Apache Solr . However, i am already handy with
ElasticSearch as i am currently using ElasticSearch only in my workplace. so, i'm curious as if i can replace that customizable code of broadleafcommerce with ElasticSearch. If it is possible, i also want to know how long will it take or what will be its difficulty level ?
Thanks in advance !
The product is open source, you can have a look at the code yourself. Here is the package that would need to be made solr independent. As far as I see there are quite some dependencies on Solr now, but maybe you can give it a shot and contribute it back. In the end that's the power of open source.
I can't tell exactly how much work that would be since I don't know the product and what it does with the data. The solr schema would need to be translated to the related elasticsearch mapping, then the indexer will need to be converted in order to push data to elasticsearch (otherwise if technically doable you could write a river that imports data in elasticsearch from the framework itself). Last step is to convert the search code together with the facets, highlighting etc.
Maybe you (or the people behind the project) might want to have a look at spring data which has now a community driven spring-data-solr project and an unofficial elasticsearch implementation too.

Offline OLAP cube file format

In Excel pivot table you can request the generation of a offline OLAP cube : i.e., a file with the .cub extension. Does anybody know or have any pointer about this file format ?
Thanks, _marc
I think all of the information you need to create them is here, but according to this post, you can only edit them with SSMS.
EDIT: A C#-only approach is laid out here.
Here you can find how to transform xmla to .cub. If your task is to generate cub files from your application, it can be a good solution. There is much more information on xmla (standard) format than on proprietary .cub. Xmla is a standard and there are opensource implementations - olap4j, mondrian.

Sample Data Creation Tool (mainly for Databases)

I’m thinking through some database design concepts and believe that creating sample data simulating real-world volume of my application will help solidify some design decisions.
Does any anyone know of a tool to create sample data? I’m looking for something that’s database and platform neutral if possible (from MySQL to DB/2 and Windows to UNIX) so to test the design across different systems/architectures. I’m visioning some tool that you can:
point to a database table(s) (some configuration of the DSN, etc.)
introspect the fields and based on the field... (point-and-click or add some configuration)
have a means for expressing how to create sample data (MySQL Sample Data Creator is the kind of thing I vision but I think their'd be some more options like commit frequency so to create very large data sets... millions or billions of rows... don't think this tool would scale to the volume of data I want to create)
push a button and go (depending on your parameters, this may take a long time)
Any thoughts? Sure, I could write an app to do this but it seems so generic that I shouldn’t have to reinvent the wheel.
DBMonster is fine but I prefer databene benerator as I explained it in this answer to a similar question.
Something like DBMonster?
This page also has a listing of many DB data generators.
I cannot help you with MySQL or DB/2 but, in case anyone gets to this answer with a need for MS SQL Server, I can recommend the Data Generator from Red Gate.
Our test data generator, Datanamic DB Data Generator can do this for you. Works with MySQL. It uses default "generator settings" when loading your tables the first time. You can then "fine-tune" the fields and/or choose other "generators".

Resources