Search Results

Search found 10841 results on 434 pages for 'air native extension'.

Page 68/434 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • Building an extension framework for a Rails app

    - by obvio171
    I'm starting research on what I'd need in order to build a user-level plugin system (like Wordpress plugins) for a Rails app, so I'd appreciate some general pointers/advice. By user-level plugin I mean a package a user can extract into a folder and have it show up on an admin interface, allowing them to add some extra configuration and then activate it. What is the best way to go about doing this? Is there any other opensource project that does this already? What does Rails itself already offer for programmer-level plugins that could be leveraged? Any Rails plugins that could help me with this? A plugin would have to be able to: run its own migrations (with this? it's undocumented) have access to my models (plugins already do) have entry points for adding content to views (can be done with content_for and yield) replace entire views or partials (how?) provide its own admin and user-facing views (how?) create its own routes (or maybe just announce its presence and let me create the routes for it, to avoid plugins stepping on each other's toes) Anything else I'm missing? Also, is there a way to limit which tables/actions the plugin has access to concerning migrations and models, and also limit their access to routes (maybe letting them include, but not remove routes)? P.S.: I'll try to keep this updated, compiling stuff I figure out and relevant answers so as to have a sort of guide for others.

    Read the article

  • Can't make my WCF extension work

    - by Sergio Romero
    I have a WCF solution that consists of the following class libraries: Exercise.Services: Contains the implementation classes for the services. Exercise.ServiceProxy: Contains the classes that are instantiated in the client. Exercise.HttpHost: Contains the services (*.svc files). I'm calling the service from a console application and the "first version" works really well so I took the next step which is to create a custom ServiceHostFactory, ServiceHost, and InstanceProvider so I can use constructor injection in my services as it is explained in this article. These classes are implemented in yet another class library: 4. Exercise.StructureMapWcfExtension Now even though I've modified my service this: <%@ ServiceHost Language="C#" Debug="true" Factory="Exercise.StructureMapWcfExtension.StructureMapServiceHostFactory" Service="Exercise.Services.PurchaseOrderService" %> I always get the following exception: System.ServiceModel.CommunicationException Security negotiation failed because the remote party did not send back a reply in a timely manner. This may be because the underlying transport connection was aborted. It fails in this line of code: public class PurchaseOrderProxy : ClientBase<IPurchaseOrderService>, IPurchaseOrderService { public PurchaseOrderResponse CreatePurchaseOrder(PurchaseOrderRequest purchaseOrderRequest) { return base.Channel.CreatePurchaseOrder(purchaseOrderRequest); //Fails here } } But that is not all, I added a trace to the web.config file and this is the error that appears in the log file: System.InvalidOperationException The service type provided could not be loaded as a service because it does not have a default (parameter-less) constructor. To fix the problem, add a default constructor to the type, or pass an instance of the type to the host. So this means that my ServiceHostFactory is never being hit, I even set a breakpoint in both its constructor and its method and they never get hit. I've added a reference of the StructureMapWcfExtension library to all the other ones (even the console client), one by one to no avail. I also tried to use the option in the host's web.config file to configure the factory like so: <serviceHostingEnvironment> <serviceActivations> <add service="Exercise.Services.PurchaseOrderService" relativeAddress="PurchaseOrderService.svc" factory="Exercise.StructureMapWcfExtension.StructureMapServiceHostFactory"/> </serviceActivations> </serviceHostingEnvironment> That didn't work either. Please I need help in getting this to work so I can incorporate it to our project. Thank you. UPDATE: Here's the service host factory's code: namespace Exercise.StructureMapWcfExtension { public class StructureMapServiceHostFactory : ServiceHostFactory { private readonly Container Container; public StructureMapServiceHostFactory() { Container = new Container(); new ContainerConfigurer().Configure(Container); } protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { return new StructureMapServiceHost(Container, serviceType, baseAddresses); } } public class ContainerConfigurer { public void Configure(Container container) { container.Configure(r => r.For<IPurchaseOrderFacade>().Use<PurchaseOrderFacade>()); } } }

    Read the article

  • Remove file extension from a URL

    - by Thomas Blund
    Hello, I am trying to make my site look more professional by removing the html endings from the pages.. ex. just leaving at http://33tpm.com/es/tienda All the answers Ive found so far are so confusing that I don't really understand anything.. Can someone please help me out? Thank you Thomas

    Read the article

  • Spam in the VS2010 Extension Manager

    - by Alex DeLarge
    What's with all the spam (free trials and so on from Component Source & Telerik among others) in the VS 2010 Extensions Manager. Without going to the website there is no way to know whether a listing is free or trialware so, for me, the entire user experience of the Extensions Manager is ruined. Anyone else finding this? Is there a way of suppressing these? Alex...

    Read the article

  • Cocoa App with Python extension which use Scipy -> ImportError: No module named scipy

    - by Snej
    Hi: I have installed Scipy (via macports) for Python on my Mac and it runs fine when running Python scripts. But now I'm using Scipy (via PyObjc) for calculations embedded in a Cocoa App frontend. The following error occurs: ImportError: No module named scipy I am using the "Python.framework" in XCode. Does anybody know why Scipy module is not found? I even added it manually to the module search path via sys.path.append("/opt/local/var/macports/software/py26-scipy/0.7.1_0+gcc43/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/") EDIT: I found the problem myself. The path should be without "/scipy" at the end. But now I got an architecture problem: ImportError: dlopen(/opt/local/var/macports/software/py26-scipy/0.7.1_0+gcc43/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so, 2): no suitable image found. Did find: /opt/local/var/macports/software/py26-scipy/0.7.1_0+gcc43/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so: mach-o, but wrong architecture EDIT 2: I checked the architectures: Yes, sure it is an architecture problem. But when I run: file /opt/local/var/macports/software/py26-scipy/0.7.1_0+gcc43/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so I get a result Mach-O 64-bit bundle x86_64. And the Mac OS 10.6 PYTHON is: Mach-O universal binary with 3 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture ppc7400): Mach-O executable ppc I build the XCode project as x86_64.

    Read the article

  • DataContractJsonSerializer set value extension point

    - by svinto
    using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; namespace ConsoleApplication1 { internal class Program { private static void Main(string[] args) { var pony = new Pony(); var serializer = new DataContractJsonSerializer(pony.GetType()); var example = @"{""Foo"":null}"; var stream = new MemoryStream(Encoding.UTF8.GetBytes(example.ToCharArray())); stream.Position = 0; pony = (Pony) serializer.ReadObject(stream); // The previous line throws an exception. } } [DataContract] public class Pony { [DataMember] private int Foo { get; set; } } } Sometimes the serialization throws a casting error on Int32s being set to null. Is there any way to hook into the Json-serializer?

    Read the article

  • PHP Bz2 extension question

    - by Rob
    Hi, I wanted to ask: when I am using php.net/bzopen, does I need to bzwrite() already compressed by bzcompress() string or it being compressed automatically while writing?

    Read the article

  • Firefox extension file structure best practice

    - by user353969
    Is it a good practice to put js files of the "content" folders in inner folders representing their logical module? For example have a "datalayer" and "view" folders? I looked into some well known extensions, such as Firebug, and saw no such devision. I'm a Java developer so its seems much more natural to divide the files logically.

    Read the article

  • Codeigniter Routes for filename with extension

    - by thehuby
    I am using codeigniter and its routes system successfully with some lovely regexp, however I have come unstuck on what should be an easy peasy thing in the system. I want to include a bunch of search engine related files (for Google webmaster etc.) plus the robots.txt file, all in a controller. So, I have create the controller and updated the routes file and don't seem to be able to get it working with these files. Here's a snip from my routes file: $route['robots\.txt|LiveSearchSiteAuth\.xml'] = 'search_controller/files'; Within the function I use the URI helper to figure out which content to show. Now I can't get this to match, which points to my regexp being wrong. I'm sure this is a really obvious one but its late and my caffeine tank is empty :)

    Read the article

  • Grails: URL mapping - how to pass file extension ?

    - by Olexandr
    Hi. I have some folder with different files. I want to use something like this: http://myserver.com/foo/bar/test.html I'm using this way to obtain path: "/excursion/$path**" (controller:"excursion", action:"sweet") But it doesn't helps with file extensions... How to disable file extensions truncating ?

    Read the article

  • Updating Commit Message in Mercurial MQ extension

    - by Jerub
    After using hg qnew and hg qrefresh to create and update a patch that I want to apply to my repository, but the commit message that I wrote when I did hg qnew was not very good, it did not reference the ticket number from trac, and I would like to say something in it about some of the issues that my commit addresses. How do I do something like hg qrewritemycommitmessage. I have examined the docs on the website (starting here: http://mercurial.selenic.com/wiki/MqExtension ) and I have come up blank.

    Read the article

  • How to create a VS2010 extension that uses Language Services

    - by Hades32
    Creating extensions got much easier with Vs2010, but this seems not to be the case for everything... My aim: I wnat to make method calls and property uses of STATIC classes ITALIC. (Just like Eclipse and Java) I think I need to talk to the C# Language Service for this information, but searching for "Language Service" just yields results on how to CREATE one, not how to use one of the existing ones... To get this question a little more general: How do I get information about properties of the code (static/visibility etc) for using it in a VSX?

    Read the article

  • Mocking Autofac's "Resolve" extension method with TypeMock

    - by Lockshopr
    I'm trying to mock an Autofac resolve, such as: using System; using Autofac; using TypeMock.ArrangeActAssert; class Program { static void Main(string[] args) { var inst = Isolate.Fake.Instance<IContainer>(); Isolate.Fake.StaticMethods(typeof(ResolutionExtensions), Members.ReturnNulls); Isolate.WhenCalled(() => inst.Resolve<IRubber>()).WillReturn(new BubbleGum()); Console.Out.WriteLine(inst.Resolve<IRubber>()); } } public interface IRubber {} public class BubbleGum : IRubber {} Coming from Moq, the syntax and exceptions from TypeMock confuse me a great deal. Having initially run this in a TestMethod, I kept getting an exception resembling "WhenCalled cannot be run without a complementing behavior". I tried defining behaviors for everyone and their mothers, but to no avail. Then I debug stepped through the test run, and saw that an actual exception was fired from Autofac: IRubber has not been registered. So it's obvious that the static Resolve function isn't being faked, and I can't get it to be faked, no matter how I go about hooking it up. Isolate.WhenCalled(() => ResolutionExtensions.Resolve<IRubber>(null)).WillReturn(new BubbleGum()); ... throws an exception from Autofac complaining that the IComponentContext cannot be null. Feeding it the presumably faked IContainer (or faking an IComponentContext instead) gets me back to the "IRubber not registered" error.

    Read the article

  • Modify post data with a custom MVC extension?

    - by Jaxidian
    So I'm looking into writing some custom MVC extensions and the first one I'm attempting to tackle is a FormattedTextBox to handle things such as currency, dates, and times. I have the rendering of it working perfectly, formatting it, working with strong types and everything all golden. However, the problem I'm now running into is cleaning up the formatted stuff when the page posts the data back. Take for example, a currency format. Let's use USD for these examples. When an object has a property as a decimal, the value would be 79.95. Your edit view would be something like: <%= Html.FormattedTextBox(model => Model.Person.HourlyWage, "{0:C}") %> This is all well and good for the GET request, but upon POST, the value is going to be $79.95, which when you assign to that decimal, gets unhappy very quickly and ends up shoving a 0 in there. So my question is, how do I get code working somewhere to work with that value before the MVC Framework goes and starts shoving it back into my ViewModel? I'd much rather this be done server-side than client-side. Thanks!!

    Read the article

  • Xml files stop being served by IIS6 after allowing .net to process the .xml extension

    - by Brian Surowiec
    I added a route into my site to allow for a sitemap and everything worked fine in IIS7 but once I deployed the route stopped working. Since the live server is running IIS6 I needed to put a new mapping in for .xml to be processed by .net and then it started to work. My issue though is on every other xml file on the site now. I keep getting a 404 error when trying to view xml files, but the sitemap.xml route works. Is this a routing issue or an IIS setup issue? Here are my routes if it will help routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Gallery-Group-View", "Projects/{groupId}", new { controller = "Gallery", action = "GalleryList", groupId = "" }); routes.MapRoute( "Gallery-List-View", "Projects/{groupId}/{galleryId}", new { controller = "Gallery", action = "GalleryView", groupId = "", galleryId = "" }); routes.MapRoute( "Sitemap", "Sitemap.xml", new { controller = "XML", action = "Sitemap" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } );

    Read the article

  • How to create mapping for a List<SomeNativeType> in FluentNhibernate ?

    - by Mahesh Velaga
    Hi all, I am trying to create a mapping file for the following Model using Fluent NHibernate. But, I am not sure of how to do the mapping for the List in the mapping file. public class MyClass { public virtual Guid Id { get; set; } public virtual string Name { get; set; } public virtual List<string> MagicStrings { get; set; } } public class EnvironmentMapping : ClassMap<Models.Environment> { public EnvironmentMapping() { Id(x => x.Id); Map(x => x.Name); //HasMany(x => string) What should this be ? } } Help in this regard is much appreciated. Thanks!

    Read the article

  • Contains Query into MongoDB Array using Mongoose

    - by Nilay Parikh
    I'm trying to query into following document and want to list all document which contains TaxonomyID "1" in "TaxonomyIDs" field. ... "Slug" : "videosecu-600tvl-outdoor-security-surveillance", "Category" : "Digital Cameras", "SubCategory" : "Surveillance Cameras", "Segment" : "", "Usabilities" : [ "Dome Cameras", "Night Vision" ], "TaxonomyIDs" : [ 1, 12, 20, 21, 13 ], "Brand" : "VideoSecu", ... Totally stuck!

    Read the article

  • CSS with PHP Extension ????

    - by raj
    hi everyone,,,plz helpl me out .. i want my css to recognise as mystyle.php but inside code would be of css , and i want to access it in my index.php page with header method ,i dont want to use Link method.

    Read the article

  • Generic extension method returning IEnumerable<T> without using reflection

    - by roosteronacid
    Consider this snippet of code: public static class MatchCollectionExtensions { public static IEnumerable<T> AsEnumerable<T>(this MatchCollection mc) { return new T[mc.Count]; } } And this class: public class Ingredient { public String Name { get; set; } } Is there any way to magically transform a MatchCollection object to a collection of Ingredient? The use-case would look something like this: var matches = new Regex("([a-z])+,?").Matches("tomato,potato,carrot"); var ingredients = matches.AsEnumerable<Ingredient>();

    Read the article

  • Ocamlrun.lib Not Found For Linking

    - by Onorio Catenacci
    Hi all, Trying to build the OCaml Win32 API binaries for OCaml 3.11.0 on Win 7 and I consistently get a message when I try nmake dynamic: 'cannot open input file "ocamlrun.lib"'. My google skills seem to be failing me--is there something I need to do to get this .lib file? It doesn't seem to be part of the libraries which are included in the OCaml binary distribution for Windows. Can anyone give me a pointer in the right direction?

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >