ActiveRecordIntegration to support IStatelessSession - castle-activerecord

it seems that AR Integration doesn't support to open StatelessSession, from looking at:
http://github.com/castleproject/Castle.Facilities.ActiveRecordIntegration/blob/master/src/Castle.Facilities.ActiveRecordIntegration/SessionFactoryDelegate.cs
looking at line 62, if you don't call OpenSession it will throw exception.
I would like to call OpenStatelessSession to initialize IStatelessSession.
I saw that some people are talking about StatelessSessionScope but I didn't manage to find good examples for using it with AR Integration...

To the best of my knowledge, it's not currently implemented/supported. Please file an issue in the issue tracker and if possible also fork and implement it :-)

Related

How to use dapper.fluentmap in Dapper?

Does anyone know or have link in how to use https://github.com/henkmollema/Dapper-FluentMap in my Dapper CRUD?. Right now I am using Dapper.Contrib but we are trying to implement Clean architecture which we remove the Dapper.Contrib in our structure. Now I am trying to use this Dapper-FluentMap to map the properties but there documentation is very poor.
I've wrote an article and a sample that shows how to use Dapper-FluentMap:
https://medium.com/dapper-net/custom-columns-mapping-1cd45dfd51d6
After beating my head against a few brick walls, I have established this much as fact (at least as of late 2018, which is after the date of the OP)...
Answering the question "Is FluentMap supposed to work with Dapper.Contrib extensions?", henkmollema (author of Dapper.FluentMap) responds, "Nope, it does not work with Dapper.Contrib".
So there's your answer, user3928241.
However for me as well as for user3928241 and others desperately searching for answers, he adds, "Shameless plug: it does work together with Dommel using the Dapper.FluentMap.Dommel integration component."
YMMV, but I'm pressing on. Going to try Dommel now.

How can I supply pathconf with FUSE?

I would like to create a FUSE file system to mount tape archives. To do this correctly, I need to be able to supply replies to two pathconf keys, specifically _PC_NAME_MAX and _PC_PATH_MAX. It seems that FUSE takes the answer for the _PC_NAME_MAX key from the statfs function you provide, but I haven't found a way to set _PC_PATH_MAX. Is there a way to configure the answer to _PC_PATH_MAX? Is there in general a way to supply an answer to any pathconf call?
Further research indicates that this is not possible with FUSE at all. What a sad excuse for an API.

How to perform Geo Spatial search with django-haystack + solr

I'm currently using django haystack with xapian. I couldn't find any documentation on how to perform geospatial queries on xapian. But there seems to be some momentum on Solr. So i'm currently experimenting with that.
I couldn't get spatialSolr to work properly on local, but for now working with spatial-solr-light, which seems to work fine. It accepts queries like
http://127.0.0.1:8080/solr/select/?q=blahblah&spatial={!radius=1.0%20sort=true}lat:10.0,lng:-10.0
Can anyony point me to a patch for haystack that allows me to pass custom queries like that. I could use raw_search(), but i can't chain the resuts. In any case i would like to find a cleaner way to do something like
sqs.spatial(....)
There are some patches from other people mentioned on the google group(links below), but most of them are unreachable.
References:
https://github.com/fizx/solr-spatial-light
http://groups.google.com/group/django-haystack/browse_thread/thread/d0e23d45c0baa300/2298b6cf43389e18?lnk=gst&q=Spatial#2298b6cf43389e18
http://groups.google.com/group/django-haystack/browse_thread/thread/f88d625679941d77/420892adac151a64
http://groups.google.com/group/django-haystack/browse_thread/thread/e3a70112ce944b00/33bd673fbaaed0a7?lnk=gst&q=jteam#33bd673fbaaed0a7
If you're not tied to Xapian, look at Django, Sphinx and search by distance. I had a similar problem when I ran across this question and this seems to solve it. Thanks to django-sphinx, it's about as easy to set up as Haystack. Sphinx also seems to offer more flexibility.
Here's a fork of django haystack that adds in support for :
https://github.com/sidmitra/django-haystack-spatialsolrplugin
And corresponding notes are here:
https://github.com/sidmitra/django-haystack-spatialsolrplugin/wiki/_pages
Sidmitra, I made port of your solution using haystack 1.2.X and solr 3.4. With some limitations to be frank - no support for schema generation at the moment, only LatLong geo type supported, sorting by distance is not perfect (but works)
https://github.com/frutik/django-haystack/tree/1.2.X
I agree with https://github.com/sidmitra/django-haystack-spatialsolrplugin .
It seems to be out-of-date, but I could beat it into shape with some work. Issues I had:
Hard to find the java SSP and when I found it it was the wrong version. http://www.dutchworks.nl/en/home/download.html was the link that worked for me.
The classpaths in the example xml files I found on the net were all wrong; I had to remove .solrext. from all of them.
The plugin was very picky about which directory it lived in; it couldn't talk to anything else until it was happily in solr/lib
solr_backend.py required the following patch (around line 505):
if self.spatial_query:
final_query = '{{!spatial circles={lat},{long},{radius} }}{0}'.format(final_query,**self.spatial_query)
I had further issues with making the solrconfig.xml so that GeoDistanceComponent never loaded before the query had a valid rsp.
In other words, you can certainly make it work, but you have to be able to deal with a number of error messages in both python and java before you get there.

Does anyone here use the make-cdf & stats.pl program?

I came across this page: Plotting Tools
where I found a set of tools with the name stats.pl and make-cdf. I can write my own but don't want to spend too much time when someone else has already done that. Does anyone have these tools or at least point me to a similar set of tools somewhere?
I do not know who Dave, Binju, Vijay and Dan are and I did not see a way of figuring out what stats.pl and make-cdf contain.
There are a number of excellent statistics related modules on CPAN including Statistics::Descriptive, Statistics::KernelEstimation and Math::GSL::CDF to name but a few that might be relevant given the names of the scripts you mention.
However, if you want to do serious statistics, I would recommend you consider using R which you can control using Statistics::R. AFAIK, the R tag on StackOverflow is pretty active.

C: dependency analysis of functions

Is there a tool where I can give a file + function name as an input and it gives me all functions the given function depends on and the same for all the found functions, and so on within my codebase?
Something like this would help a lot in extracting functionality from existing codebases.
You could use doxygen with dot to create a call graph -- it should work fine even without doxygen annotations in the comments.
See some samples of it here.
See this discussion.
I don't know of a standalone tool that will do this. However it is a supported feature of certain IDE's such as Source Insight
http://www.sourceinsight.com/
Source Navigator is a free tool that includes this functionality:
http://sourcenav.sourceforge.net/
cxref should do what you ask for.

Resources