Search Results

Search found 3192 results on 128 pages for 'portable executable'.

Page 3/128 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • MVC Portable Area Modules *Without* MasterPages

    - by Steve Michelotti
    Portable Areas from MvcContrib provide a great way to build modular and composite applications on top of MVC. In short, portable areas provide a way to distribute MVC binary components as simple .NET assemblies where the aspx/ascx files are actually compiled into the assembly as embedded resources. I’ve blogged about Portable Areas in the past including this post here which talks about embedding resources and you can read more of an intro to Portable Areas here. As great as Portable Areas are, the question that seems to come up the most is: what about MasterPages? MasterPages seems to be the one thing that doesn’t work elegantly with portable areas because you specify the MasterPage in the @Page directive and it won’t use the same mechanism of the view engine so you can’t just embed them as resources. This means that you end up referencing a MasterPage that exists in the host application but not in your portable area. If you name the ContentPlaceHolderId’s correctly, it will work – but it all seems a little fragile. Ultimately, what I want is to be able to build a portable area as a module which has no knowledge of the host application. I want to be able to invoke the module by a full route on the user’s browser and it gets invoked and “automatically appears” inside the application’s visual chrome just like a MasterPage. So how could we accomplish this with portable areas? With this question in mind, I looked around at what other people are doing to address similar problems. Specifically, I immediately looked at how the Orchard team is handling this and I found it very compelling. Basically Orchard has its own custom layout/theme framework (utilizing a custom view engine) that allows you to build your module without any regard to the host. You simply decorate your controller with the [Themed] attribute and it will render with the outer chrome around it: 1: [Themed] 2: public class HomeController : Controller Here is the slide from the Orchard talk at this year MIX conference which shows how it conceptually works:   It’s pretty cool stuff.  So I figure, it must not be too difficult to incorporate this into the portable areas view engine as an optional piece of functionality. In fact, I’ll even simplify it a little – rather than have 1) Document.aspx, 2) Layout.ascx, and 3) <view>.ascx (as shown in the picture above); I’ll just have the outer page be “Chrome.aspx” and then the specific view in question. The Chrome.aspx not only takes the place of the MasterPage, but now since we’re no longer constrained by the MasterPage infrastructure, we have the choice of the Chrome.aspx living in the host or inside the portable areas as another embedded resource! Disclaimer: credit where credit is due – much of the code from this post is me re-purposing the Orchard code to suit my needs. To avoid confusion with Orchard, I’m going to refer to my implementation (which will be based on theirs) as a Chrome rather than a Theme. The first step I’ll take is to create a ChromedAttribute which adds a flag to the current HttpContext to indicate that the controller designated Chromed like this: 1: [Chromed] 2: public class HomeController : Controller The attribute itself is an MVC ActionFilter attribute: 1: public class ChromedAttribute : ActionFilterAttribute 2: { 3: public override void OnActionExecuting(ActionExecutingContext filterContext) 4: { 5: var chromedAttribute = GetChromedAttribute(filterContext.ActionDescriptor); 6: if (chromedAttribute != null) 7: { 8: filterContext.HttpContext.Items[typeof(ChromedAttribute)] = null; 9: } 10: } 11:   12: public static bool IsApplied(RequestContext context) 13: { 14: return context.HttpContext.Items.Contains(typeof(ChromedAttribute)); 15: } 16:   17: private static ChromedAttribute GetChromedAttribute(ActionDescriptor descriptor) 18: { 19: return descriptor.GetCustomAttributes(typeof(ChromedAttribute), true) 20: .Concat(descriptor.ControllerDescriptor.GetCustomAttributes(typeof(ChromedAttribute), true)) 21: .OfType<ChromedAttribute>() 22: .FirstOrDefault(); 23: } 24: } With that in place, we only have to override the FindView() method of the custom view engine with these 6 lines of code: 1: public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) 2: { 3: if (ChromedAttribute.IsApplied(controllerContext.RequestContext)) 4: { 5: var bodyView = ViewEngines.Engines.FindPartialView(controllerContext, viewName); 6: var documentView = ViewEngines.Engines.FindPartialView(controllerContext, "Chrome"); 7: var chromeView = new ChromeView(bodyView, documentView); 8: return new ViewEngineResult(chromeView, this); 9: } 10:   11: // Just execute normally without applying Chromed View Engine 12: return base.FindView(controllerContext, viewName, masterName, useCache); 13: } If the view engine finds the [Chromed] attribute, it will invoke it’s own process – otherwise, it’ll just defer to the normal web forms view engine (with masterpages). The ChromeView’s primary job is to independently set the BodyContent on the view context so that it can be rendered at the appropriate place: 1: public class ChromeView : IView 2: { 3: private ViewEngineResult bodyView; 4: private ViewEngineResult documentView; 5:   6: public ChromeView(ViewEngineResult bodyView, ViewEngineResult documentView) 7: { 8: this.bodyView = bodyView; 9: this.documentView = documentView; 10: } 11:   12: public void Render(ViewContext viewContext, System.IO.TextWriter writer) 13: { 14: ChromeViewContext chromeViewContext = ChromeViewContext.From(viewContext); 15:   16: // First render the Body view to the BodyContent 17: using (var bodyViewWriter = new StringWriter()) 18: { 19: var bodyViewContext = new ViewContext(viewContext, bodyView.View, viewContext.ViewData, viewContext.TempData, bodyViewWriter); 20: this.bodyView.View.Render(bodyViewContext, bodyViewWriter); 21: chromeViewContext.BodyContent = bodyViewWriter.ToString(); 22: } 23: // Now render the Document view 24: this.documentView.View.Render(viewContext, writer); 25: } 26: } The ChromeViewContext (code excluded here) mainly just has a string property for the “BodyContent” – but it also makes sure to put itself in the HttpContext so it’s available. Finally, we created a little extension method so the module’s view can be rendered in the appropriate place: 1: public static void RenderBody(this HtmlHelper htmlHelper) 2: { 3: ChromeViewContext chromeViewContext = ChromeViewContext.From(htmlHelper.ViewContext); 4: htmlHelper.ViewContext.Writer.Write(chromeViewContext.BodyContent); 5: } At this point, the other thing left is to decide how we want to implement the Chrome.aspx page. One approach is the copy/paste the HTML from the typical Site.Master and change the main content placeholder to use the HTML helper above – this way, there are no MasterPages anywhere. Alternatively, we could even have Chrome.aspx utilize the MasterPage if we wanted (e.g., in the case where some pages are Chromed and some pages want to use traditional MasterPage): 1: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> 2: <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> 3: <% Html.RenderBody(); %> 4: </asp:Content> At this point, it’s all academic. I can create a controller like this: 1: [Chromed] 2: public class WidgetController : Controller 3: { 4: public ActionResult Index() 5: { 6: return View(); 7: } 8: } Then I’ll just create Index.ascx (a partial view) and put in the text “Inside my widget”. Now when I run the app, I can request the full route (notice the controller name of “widget” in the address bar below) and the HTML from my Index.ascx will just appear where it is supposed to.   This means no more warnings for missing MasterPages and no more need for your module to have knowledge of the host’s MasterPage placeholders. You have the option of using the Chrome.aspx in the host or providing your own while embedding it as an embedded resource itself. I’m curious to know what people think of this approach. The code above was done with my own local copy of MvcContrib so it’s not currently something you can download. At this point, these are just my initial thoughts – just incorporating some ideas for Orchard into non-Orchard apps to enable building modular/composite apps more easily. Additionally, on the flip side, I still believe that Portable Areas have potential as the module packaging story for Orchard itself.   What do you think?

    Read the article

  • Unable to mount portable hard drive on Ubuntu

    - by VoY
    My portable hard drive (WD My Passport), which used to work correctly now does not automount on my Ubuntu system. It does work on a Windows machine or even when plugged into WD HD TV, which is a Linux based device. There's one NTFS partition spanning the whole drive. When I plug the disk in, I see the following in dmesg: [269259.504631] usb 1-2.2: new high speed USB device using ehci_hcd and address 20 [269259.604674] usb 1-2.2: configuration #1 chosen from 1 choice However it does not mount in GNOME and I don't see it when I type: sudo fdisk -l Any suggestions why this might be? I repaired the partition using chkdsk on Windows, so the issue is probably not filesystem related.

    Read the article

  • Portable trackball mouse, any recommendations?

    - by joshcomley
    Hi, I know there are other "mouse recommendation" questions, but I'm after some specific advise: Are there any useful and portable trackball mice? I'm particularly interested to hear if the recommendation has been used by the recommender! I have some space for a mouse on my travels, which are mainly on a train. A trackball mouse is the only real viable option as I don't really have room to "move around" a lot. I'm aware of the Genius Traveller 350: And some more crazy inventions: Anybody actually used any of these? Or anyone know of anything a little better? I have the Logitech Trackman, but the receiver makes it wholly unportable (and it's quite big anyway): Any thoughts?

    Read the article

  • Does a portable secondary laptop LCD monitor exist?

    - by Dougnukem
    I'm looking to buy a portable secondary LCD monitor for my Macbook Pro, does anything like that exist? I found some laptops that provide a dual 15'' monitor solution (but it's already baked into the hardware). Also some ideas posted about creating this type of setup back in 2007. I'm looking for something that is as thin as a laptop LCD (with maybe a bulky power supply that I could easily daisy chain or plug into a power strip along with my laptop). How difficult would it be to buy a 17'' laptop screen and hook up a DVI connector and power supply, and build a simple monitor stand for it? I've gotten to used to a dual-monitor setup at work and at home with my laptop that having to use my laptop in single-screen mode makes me feel crippled.

    Read the article

  • MacOS X 10.6 Portable Home Directory sync fails due to FileSync agent crashing

    - by tegbains
    On one of our cleanly installed MacPro machines running MacOS X 10.6.6 connected to our MacOS X 10.6.6 Server, syncing data using Portable Home Directories fails. It seems to be due to the filesync agent crashing during the home sync. We get -41 and -8026 errors, which we are suspecting are indicating that there is too much data or filesync agent can't read the files. The user is the owner of the files and can read/write to all of the files. < Logout 0:: [11/02/04 13:10:42.751] Error -41 copying /Volumes/RCAUsers/earlpeng/Library/Mail/Mailboxes/email from old imac./Attachments/12081/2.2. (source = NO) < Logout 0:: [11/02/04 13:10:42.758] Error -8062 copying /Volumes/RCAUsers/earlpeng/Library/Mail/Mailboxes/email from old imac./Attachments/12081/2.2/[email protected]. (source = NO) < Logout 1:: [11/02/04 13:10:42.758] -[DeepCopyContext deepCopyError:sourceError:sourceRef:]: error = -8062, wasSource = NO: return shouldContinue = NO

    Read the article

  • Creating a portable PHP install?

    - by Xeoncross
    I would like to create a folder with a couple versions of PHP that I can start in cgi mode as needed. I use different windows machines for development and I would like to be able to move around computers without needing to install PHP on each one. Something like below F:/PHP /5.3.2 /5.2.8 /5.1.0 Then I could just start each up as needed with something like F:\php\5.3.2\php-cgi.exe -b 127.0.0.1:9000 Which would allow nginx or apache to use the PHP service. This would really help to make my development environment decoupled. Does anyone know how to create a portable PHP install?

    Read the article

  • Executable war file that starts jetty without maven

    - by twilbrand
    I'm trying to make an "executable" war file (java -jar myWarFile.war) that will start up a jetty webserver that hosts the webapp contained in the war file I executed. I found a page that described how to make what I'm looking for: http://eclipsesource.com/blogs/2009/10/02/executable-wars-with-jetty/ however, following that advice along with how I think I'm supposed to make an executable jar (war) isn't working. I have an ant task creating a war with a manifest that looks like: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 Created-By: 1.5.0_18-b02 (Sun Microsystems Inc.) Main-Class: Start The contents of the war look like: > Start.class > jsp > build.jsp > META-INF > MANIFEST.MF > WEB-INF > lib > jetty-6.1.22.jar > jetty-util.6.1.22.jar When I try to execute the .war file, the error is: Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/Handler Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.Handler at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: Start. Program will exit. There appears to be two errors here, one where it seems the jar files can't be found and one where the Start.class can't be found. To fix the first one, I put the jetty .jar files in the base of the war and tried again, same error. I also tried adding the WEB-INF/lib/ to the Class-path attribute of the manifest. That did not work either. Does anyone have any insight as to what I'm doing right/wrong and how I can get this executable war up and running?

    Read the article

  • How to include text files with Executable Jar

    - by Jake
    Hi guys rookie Java question. I have a Java project and I want to include a text file with the executable jar. Right now the text file is in the default package. InputFlatFile currentFile = new InputFlatFile("src/theFile.txt"); I grab the file with that line as you can see using src. However this doesn't work with the executable jar. Can someone please let me know how to keep this file with the executable jar so someone using the program can just click a single icon and run the program. Thanks!

    Read the article

  • Making a Ubuntu executable.

    - by sfactor
    i have made a program in C using the gcc compiler. Right now it has no GUI components. So, I am basically compiling it with makefile and running it in the terminal. I need to deploy it so that the executable is standalone. So, basically I want the executable to have an icon and when clicked start the program in the terminal. Can anyone tell me how to do this?

    Read the article

  • Checking for a variable in the executable

    - by rboorgapally
    Is there a way to know whether a variable is defined, by looking at the executable. Lets say I declare int i; in the main function. By compiling and linking I get an executable my_program.exe. Now, by looking inside my_program.exe, can I say if it has an int eger variable i ?

    Read the article

  • What should developers know about Windows executable binary file compression?

    - by Peter Turner
    I'd never heard of this before, so shame on me, but programs like UPX can compress my files by 80% which is totally sweet, but I have no idea what the the disadvantages are in doing this. Or even what the compressor does. Website linked above doesn't say anything about dynamically linking DLLs but it mentions about compressing DESCENT 2 and about compressing Netscape 4.06. Also, it doesn't say what the tradeoffs are, only the benefits. If there weren't tradeoffs why wouldn't my linker compress the file? If I have an environment where I have one executable and 20-30 DLL's, some of which are dynamically loaded an unloaded fairly arbitrarily, but not in loops (hopefully), do I take a big hit in processing time decompressing these DLL's when they're used?

    Read the article

  • Debian as USB hardware portable as possible

    - by James Mitch
    I have recent hardware, 64 bit, pae and so on. But I'd like to have my Debian installation on a USB HDD. Installing Debian to USB is solved. I used the i386 architecture image. But a pae kernel has been installed. I want to be able to travel with my USB HDD and therefore I want best possible hardware compatibility. My friends and family have sometimes older hardware, but always i386, just sometimes without 64 bit or pae. Never met someone with sparc or other architectures. What should I do to get non-pae kernel and maximum hardware compatibility?

    Read the article

  • Cheap hackable portable mp3 player

    - by monov
    I want something that will: play mp3s fit in my pocket have a 3.5mm audio jack let me write software for it cost $50 max I guess a cheap mobile phone could satisfy that too. Don't care much for brand names. Any ideas?

    Read the article

  • What's the most popular portable applications manager?

    - by Andy Mikula
    I have a bunch of applications I carry around on a small flash drive, but I find it hard to keep everything up to date. I know about portableapps.com, but are there any other websites / repositories / resources on the subject? Ideally I'd like something that can manage both the 'installation' and updates for a range of tools.

    Read the article

  • Self-Charging, USB Portable Speaker Recommendations

    - by Koobz
    There are lots of strictly usb powered speakers, but I don't imagine they're that good. I'd like something that I can plug in at home, have the speakers charge and when I go to the park with my friends, I'm not compromising sound quality or battery life. Does anything like this exist?

    Read the article

  • Embed a JRE in a Windows executable?

    - by perp
    Suppose I want to distribute a Java application. Suppose I want to distribute it as a single executable. I could easily build a .jar with both the application and all its external dependencies in a single file (with some Ant hacking). Now suppose I want to distribute it as an .exe file on Windows. That's easy enough, given the nice tools out there (such as Launch4j and the likes). But suppose now that I also don't want to depend on the end user having the right JRE (or any JRE at all for that matter) installed. I want to distribute a JRE with my app, and my app should run on this JRE. It's easy enough to create a Windows installer executable, and embed a folder with all necessary JRE files in it. But then I'm distributing an installer and not a single-file app. Is there a way to embed both the application, and a JRE, into an .exe file acting as the application launcher (and not as an installer)?

    Read the article

  • How determine application subsystem from executable file

    - by Luca
    I'm trying to detect console application from the list of the executables files installed on my computer. How to implement it? Every application has a "subsystem" (windows application, console application or library; specified to the linker as option, I think). How to detect it using only the executable file? Are there alternative methods to detect the application characteristic? Additionally, are there any method for detecting the file is a really executable file? Any issue for JAR executables?

    Read the article

  • How to get information about a Windows executable (.exe) using C++

    - by ereOn
    Hi, I have to create a software that will scan several directories and extracts information about the executables found. I need to do two things: Determine if a given file is an executable (.exe, .dll, and so on) - Checking the extension is probably not good enough. Get the information about this executable (the company name, the product name, and so on). I never did this before and thus am not aware if there is a Windows API (or lightweight C/C++ library) to do that or if it is even possible. I guess it is, because explorer.exe does it. Do you guys know anything that could point me in the right direction ? Thank you very much for your help.

    Read the article

  • Ultra-Portable Laptop or Tablet PC for Development and Sketching

    - by Nelson LaQuet
    I am a software developer that primarily writes in PHP, [X]HTML, CSS, Javascript, C# and C++. I use Eclipse for web development, Visual Studio 2008 for C++ and C# work, TortoiseSVN, Subversion server for local repositories, SQL Server Express, Apache and MYSQL. I also use Office 2007 for word processing and spreadsheets and use Vista Ultimate 64 as my primary operating system. The only other things I do on my laptop are watch movies, surf the internet and listen to music. I currently have a Acer Aspire 5100 (1.4 GHz AMD Turion X2, 2 GB of RAM and a 15.4" screen). This thing does not cut it in performance or portability, and in addition, my DVD drive failed. And before anybody posts about vista: I have had XP Professional 32 on it for the last two years, and recently upgraded to Vista 64. It is actually faster (with areo disabled) then XP; so it is not the OS that is causing the laptop to be slow. I usually sketch a lot, for explaining things, developing user interfaces and software architecture. Because of my requirements, I was thinking about a Lenovo X61 Tablet PC. It outperforms my current laptop, is significantly more portable, and... is a tablet. My question is: do any other software developers use this (or other tablets) for programming? Does it help to be able to sketch on the computer itself? And is it capable of being a good development machine? Will it handle the above software listed? If not, what is the best ultra-portable laptop that is good for programming? Or are ultra-portable laptops even good for programming? I could manage with my 15.4" screen, but am spoiled by my two 19" at my home desktop and my job's workstation.

    Read the article

  • Doubts in executable and relocatable object file

    - by bala1486
    Hello, I have written a simple Hello World program. #include <stdio.h> int main() { printf("Hello World"); return 0; } I wanted to understand how the relocatable object file and executable file look like. The object file corresponding to the main function is 0000000000000000 <main>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: bf 00 00 00 00 mov $0x0,%edi 9: b8 00 00 00 00 mov $0x0,%eax e: e8 00 00 00 00 callq 13 <main+0x13> 13: b8 00 00 00 00 mov $0x0,%eax 18: c9 leaveq 19: c3 retq Here the function call for printf is callq 13. One thing i don't understand is why is it 13. That means call the function at adresss 13, right??. 13 has the next instruction, right?? Please explain me what does this mean?? The executable code corresponding to main is 00000000004004cc <main>: 4004cc: 55 push %rbp 4004cd: 48 89 e5 mov %rsp,%rbp 4004d0: bf dc 05 40 00 mov $0x4005dc,%edi 4004d5: b8 00 00 00 00 mov $0x0,%eax 4004da: e8 e1 fe ff ff callq 4003c0 <printf@plt> 4004df: b8 00 00 00 00 mov $0x0,%eax 4004e4: c9 leaveq 4004e5: c3 retq Here it is callq 4003c0. But the binary instruction is e8 e1 fe ff ff. There is nothing that corresponds to 4003c0. What is that i am getting wrong? Thanks. Bala

    Read the article

  • Portable and Secure Document Repository

    - by Sivakanesh
    I'm trying to find a document manager/repository (WinXP) that can be used from a USB disk. I would like a tool that will allow you to add all documents into a single repository (or a secure file system). Ideally you would login to this portable application to add or retrieve a document and document shouldn't be accessible outside of the application. I have found an application called Benubird Pro (app is portable) that allows you to add files to a single repository, but downsides are that it is not secure and the repository is always stored on the PC and not on the USB disk. Are you able to recommend any other applications? Thanks

    Read the article

  • How do i create a portable app (runs without installing)

    - by jiewmeng
    how do i create an app that is: lightweight: i am guessing don't require .NET frameworks maybe? portable: runs without installing and saves data in the app directory, so i can just move the folder or maybe even the exe? this is just a personal experiment: i want to try create a simple todo list app that has the above attributes i am thinking C#/WPF (but requires .NET framework, i can explore client profile tho) Appcelerator Titanium (i think this will be lightweight & good enough? i dunno if i can have a portable titanium app tho)

    Read the article

  • Do Portable Class Libraries work with .net 3.5?

    - by Eric
    I am running Windows 8 and have both Visual Studio 2010 Ultimate w/sp1 and Visual Studio 2012 Ultimate and I am trying to create a Portable Class Library that supports .net 3.5 and greater. When I first try to create a PCL I get a screen like this: I noticed that .net 3.5 is not in the list so I clicked on "Install additional frameworks" and found a Targeting Pack for version 3.5. But when I download and run "dotnetfx35setup.exe" nothing happens. And when I go back into VS and try to create a new Portable Class Library, it lists the same target frameworks as before. I have also turned on the Windows Features for .NET Framework 3.5 and am now out of ideas. Here is a screen shot in case I missed something else. Thanks,

    Read the article

  • How to create portable applications?

    - by alan
    In Ubuntu can you create a portable application and have it work on an os like suse 10.x via USB stick? I'm not sure if this can be done or not, how to do it or if it would be compatible, any advice is greatly welcomed. I need to make a portable version of Stellarium and have it work in Suse 10.x. I haven't been able portable linux versions. I'm pretty sure there can be portable versions of applications since you can run a program like TOR on it.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >