Search Results

Search found 4677 results on 188 pages for 'alternative'.

Page 107/188 | < Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >

  • How can I differentiate between the .net WebBrowser component and an actual browser?

    - by Septih
    OK, so we have an online downloads store accessed via our software. Recently we've had requests to allow downloads via normal browsers and it's fairly easy just to slap a download page on. The problem is that it would be confusing to people having two download links, one for the software and one for their web browser, so we want to differentiate between the two and only show the relevant download link. From what I've gathered, the .net WebBrowser component is the same as IE and uses the same User Agent, so we can't use that unless we subclass the WebBrowser in the software to make it use a specific User Agent. It's the more sensible option, but we'd have to roll out another updated version, which is less than ideal. Are there any other ways to tell if someone's accessing a site via the .net component? My only other alternative is to copy the store to a different address with the different download links and send people there. Again this is doable, but not ideal.

    Read the article

  • Servlet Filters and the OSGi HttpService

    - by wrumsby
    I'm working on an OSGi-based application that uses org.osgi.service.http.HttpService which does not support the use of Servlet Filters. Before I realised that I wouldn't be able to use Servlet Filters I was planning to apply a couple of existing Filters. These Filters set the appropriate HTTP headers to: prevent caching of responses control rendering in IE8 with the X-UA-Compatible header What are my options here? I don't want to use meta elements to control caching since that technique is unreliable. Using a meta element to set the X-UA-Compatible header is probably acceptable, but I'd still be interested in alternative approaches.

    Read the article

  • LuaInterface and 64Bit

    - by Skintkingle
    Ok i'm currently using LuaScript v5.1 in a Game engine i'm using. and the handy LuaInterface that comes along with it. i've tested it on a range of systems running a range of OS's. LuaInterface seems to fail on 64bit Operating Systems. Could anyone point me to a 64bit Compiled LuaInterface.dll, or is there any alternative to the LuaInterface that can be used, because LuaInterface is extremely useful and i dont think i would be able to write a more extensive interface by myself using lua51. (I'm not that good, sadly) Any help or links would be greatly appreciated. Thanks alot guys!

    Read the article

  • xapian-full installed on mac os x snow leopard but failed with dlopen LoadError

    - by goodwill
    Since I have tried to install xapian but failed, I try another alternative with xapian-full. Installation seems goes well, but when I try to write code with that I got toasted with error message again: irb(main):001:0> require 'xapian' LoadError: dlopen(/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle, 9): Library not loaded: /usr/local/lib/libxapian-1.1.3.dylib Referenced from: /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle Reason: image not found - /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/xapian-full-1.1.3.4/lib/_xapian.bundle from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/xapian.rb:40 from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /opt/ruby-enterprise/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from (irb):1 Anyone know how to solve this?

    Read the article

  • Trying to extend ActionView::Helpers::FormBuilder

    - by nibbo
    Hello I am trying to DRY up some code by moving some logic into the FormBuilder. After reading the documentation about how to select and alternative form builder the logical solution for me seemed to be something like this. In the view <% form_for @event, :builder => TestFormBuilder do |f| %> <%= f.test %> <%= f.submit 'Update' %> <% end %> and then in app/helpers/application_helper.rb module ApplicationHelper class TestFormBuilder < ActionView::Helpers::FormBuilder def test puts 'apa' end end end This, however, gives me an error at the "form_for" uninitialized constant ActionView::Base::CompiledTemplates::TestFormBuilder Where am I doing it wrong?

    Read the article

  • Is this valid EJB-QL?

    - by Yishai
    I have the following construct in EJB-QL several EJB 2.1 finder methods: SELECT distinct OBJECT(rd) FROM RequestDetail rd, DetailResponse dr WHERE dr.updateReqResponseParentID is not null and dr.updateReqResponseParentID = ?1 and rd.requestDetailID = dr.requestDetailID and rd.deleted is null and dr.deleted is null IDEA's EJB-QL inspection flags the use of the two object FROM RequestDetail rd, DetailResponse dr with an inspection which says: Several ranged variable declarations are not supported, use collection member declarations instead (e.g. IN(o.lineItems)) The queries themselves function fine (as in return the expected results) on JBoss 4.2. Is IDEA all wet here, or is there a valid issue with the query? And what is the actual preferred alternative syntax for such a query?

    Read the article

  • Boost::Thread or fork() : Multithreaded HTTP Proxy

    - by osmano807
    I'm testing boost::thread on a system. It happens that I needed to act as a fork(), because one thread modifies the other variables, even member variables of class I do the project using fork() or is there some alternative still using boost::thread? Basically I run this program in Linux and maybe FreeBSD. It is an http proxy,accept() in main thread, and a function that accepts a class (where there is the file descriptor socket) in a secondary thread that makes the service. Is there a better way to implement a proxy?

    Read the article

  • newbie question -- how does one override show for a newtype?

    - by gatoatigrado
    I want to override the default integer constructors in Haskell so they produce strings (mostly for curiosity, but temporarily to make a nice input alternative for LaTeX's \frac{}{} inconvenience). I wanted to be able to use the language itself, instead of a special parser, but I guess that's probably not going to work out... module Main where import Prelude hiding ((+)) newtype A = A Int deriving (Eq, Show, Num) default (A) (+) :: A -> (A -> String) (A a) + (A b) = (show a) ++ " + " ++ (show b) main2 = 3+4 main :: IO () main = putStrLn main2 The problem with the above is that the + function only works for (A, A) instead of (A, String), etc. If one simply leaves out the pattern match "(A a)" and writes "a" instead, then the show() function prepends "A " so "3" becomes "A 3" instead of just "3". I want to override Show for A, but it seems to be quite a headache...

    Read the article

  • Is it proper to get and especially set Perl module's global variables directly?

    - by DVK
    I was wondering what the best practice in Perl is regarding getting - or, more importantly, setting - a global variable of some module by directly accessing $Module::varName in case the module didn't provide getter/setter method for it. The reason it smells bad to me is the fact that it sort of circumvents encapsulation. Just because I can do it in Perl, I'm not entirely certain I should (assuming there actually is an alternative such as adding a getter/setter to the module). I'm asking this because I'm about to request an addition of a getter/setter for a global variable in one of the core Perl modules, and I would like to avoid it soundly and unanimously rejected on the grounds of "Why the heck do you need one when you can access the variable in the package directly?" - in case doing the latter is actually considered perfectly OK by the community.

    Read the article

  • Using OpenSessionInViewInterceptor with Hibernate and JSF 2

    - by sammy
    I'm building an application in Hibernate, Spring and JSF2 using only annotations. How can I take advantage of OpenSessionInViewInterceptor found in Spring to catch any hibernate session that might open within a bean? I'm trying to elegantly solve the common “failed to lazily initialize a collection of role: your.Class.assocation no session or session was closed.” problem when trying to read from a yet uninitialized list of POJOs inside another POJO (A Tag entity retrieved by a DAO that contains a List of Project objects I want to read). I've found this: http://www.paulcodding.com/blog/2008/01/21/using-the-opensessioninviewinterceptor-for-spring-hibernate3/ but failed to make use of it in my environment. Please provide a detailed answer, as the Internet is full of foggy, unhelpful tutorials. I'll also be greatful for an alternative solution, given a step-by-step instruction is provided.

    Read the article

  • Intersections of 3D polygons in python

    - by Andrew Walker
    Are there any open source tools or libraries (ideally in python) that are available for performing lots of intersections with 3D geometry read from an ESRI shapefile? Most of the tests will be simple line segments vs polygons. I've looked into OGR 1.7.1 / GEOS 3.2.0, and whilst it loads the data correctly, the resulting intersections aren't correct, and most of the other tools available seem to build on this work. Whilst CGAL would have been an alternative, it's license isn't suitable. The Boost generic geometry library looks fantastic, but the api is huge, and doesn't seem to support wkt or wkb readers out of the box.

    Read the article

  • Displaying a pdf file located on a http server from mobile phone

    - by JCasso
    I have some pdf files located on a http server: Like: http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf I need to display these files on a mobile application using java me. I tried to display them by opening Google Docs Viewer with platformRequest. However it seems Google Docs Viewer uses ajax and many mobile browsers does not support it. Is there an alternative for "Google Docs Viewer" for mobile devices ? Or is there a better solution for this problem ?

    Read the article

  • Embed a Python persistance layer into a C++ application - good idea?

    - by Rickard
    say I'm about to write an application with a thin GUI layer, a really fat calculation layer (doing computationally heavy calibrations and other long-running stuff) and fairly simple persistance layer. I'm looking at building the GUI + calculation layer in C++ (using Qt for the gui parts). Now - would it be a crazy idea to build the persistance layer in Python, using sqlalchemy, and embed it into the C++ application, letting the layers interface with eachother through lightweigth data transfer objects (written in C++ but accessible from python)? (the other alternative I'm leaning towards would probably be to write the app in Python from the start, using the PyQt wrapper, and then calling into C++ for the computational tasks) Thanks, Rickard

    Read the article

  • PHP mssql_query double quotes cannot be used

    - by Nilesh
    Hi all, In java-jdbc, I can easily run the following SQL (NOTE the double quotes around columns and table names) Select cus."customer_id" , cus."organisation_or_person" , cus."organisation_name" , cus."first_name" , cus."last_name" , cus."date_became_customer" , cus."other_customer_details" From "Contact_Management"."dbo"."Customers" cus But the same query in PHP errors out saying invalid syntax "Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near 'customer_id'. (severity 15) " But If remove all the double quotes, the query works fine and no errors. The query is ported from a java application so I would like to keep the double quotes and the SQL as it is. Any alternative solutions? Thank you Nilesh

    Read the article

  • Is there an offline version of Smush.it available?

    - by Jonathon Watney
    Sometimes I use Smush.it via the YSlow Firefox plugin to non-destructively reduce the file size of JPG images. Is there an offline version available that runs on Windows? And if not is there an alternative? The reason I'd like an offline version is that I'd like to optimize images before I deploy them. Currently Smush.it accepts only public facing URLs for images or a web page (via YSlow) and can't access my internal network. That means I have to deploy, optimize, replace images and deploy again. I'd really like to deploy the optimized images on the first deploy. Update: Here's a very similar question.

    Read the article

  • Svn log - svn: '.' is not a working copy

    - by fampinheiro
    I'm getting "svn: '.' is not a working copy" when i use the svn log command. I know that i need a working copy for the log command to work but can this be done directly on a repository? My goal is to display the information (change history) of a repository. I think updating the working copy whenever i need the log information is not a good solution. Is there an alternative solution to this or updating a working copy every time i need to log is the only way to go? Thanks in advance.

    Read the article

  • Handling messages for window from other process

    - by MK
    I'm developing a C# WPF application that reparents the main window of another application using a call to Win32 SetParent(). The handle to this out-of-process child window is wrapped by a class named FormHost which is derived from HwndHost. All is working well except for one thing: messages for the reparented window are not delivered to FormHost. MSDN documentation clearly states that the HwndHost window procedure WndProc() cannot be used with out-of-process windows. The alternative, MessageHook doesn't work either. I also tried calling AttachThreadInput() to combine the input processing of the two windows. No luck. Any suggestions?

    Read the article

  • PHP text output in clauses

    - by arik-so
    Hello. I am working on a PHP project. There, I often use following syntax to output text in a cluase: if($boolean){ ?> output text <? }else{ ?> alternative <? } On my computer, this works perfectly well. I use XAMPP foer Mac OS X. But when I send the files to my coworker, these outputs often do not work and the compiler complains about having reached an unexpected $end of file. This occurs especially often when there is a tag in the output. We have to replace the means of output with echo. What's the reason for this strange behavior of the compiler? Is the above-mention syntax of outputting text wrong?

    Read the article

  • Best practice in this situation?

    - by Steve
    My Delphi program relies heavily on Outlook automation. Outlook versions prior to 2007-SP2 tend to get stuck in memory due to badly written addins and badly written Outlook code. If Outlook is stuck, calling CreateOleObject('Outlook.Application') or GetActiveObject ... doesn't return and keeps my application hanging till Outlook.exe is closed in the task manager. I've thought of a solution, but I'm unsure whether it's good practice or not. I'd start Outlook with CreateOleObject in a separate thread, wait 10 seconds in my main thread and if Outlook hangs (CreateOleObject doesn't return), offer the user to kill the Outlook.exe process from my program. But since I don't want to force the user to kill the Outlook.exe proccess, as an alternative I also need a way to kill the new thread in my program which keeps hanging now. My questions are: a, Is this good practice b, How can I terminate a hanging thread in Delphi without leaking memory? Is there a way?

    Read the article

  • PHP voting system with sessions?

    - by pingu
    Hi guys, I've been reading up on stackoverflow about creating voting systems in PHP that minimize abuse/multiple voting from the same user, but I haven't come across the answer to my question. I've got an application where users don't need to register to vote or "like" an entry. Obviously, I want to minimize abuse and I don't want to limit votes per IP address because some organisations (mine included) use shared IP addresses. I've never used sessions in a non-authenticated system before, but since this application is centered around entry votes I was wondering if this approach would work and whether there were any disadvantages such as performance implications, and whether it's even possible to use sessions in this way: start a session when the website is loaded allow one vote per item per session If this is a bad idea, my alternative options would be to allow a reasonable number of votes per IP address (say 25), or put a time limit between votes from the same IP address. What do you guys recommend?

    Read the article

  • What is the best option for reading Java property files?

    - by Mr Morgan
    Hello I have an application which uses a servlet to read an intialization parameter from web.xml for the location of a property file. The serlvet then creates an instance of a class which stores the location of the file for other programs to read as required. This class has appropriate get and set methods. But my question concerns access to the properties: should the physical property file be read by each program as at runtime or should the properties be stored in memory instead? The properties are not currently altered at runtime but this could change? I've seen various alternative approaches but am not sure which is best. Thanks Mr Morgan

    Read the article

  • Listing subdirectories 3 levels deep using LINQ C#

    - by paradox
    I'd like to know if there is a better alternative to my following code (preferably using LINQ) #region List and filter directories to only 3 levels deep // List all subdirectories within main directory string[] folders = Directory.GetDirectories(@"C:\pdftest\", "*" ,SearchOption.AllDirectories); List<string> subdirectories = new List<string>(); //Filter away all main directories, now we are left with subdirectories 3 levels deep for (int i = 0; i<folders.Length; i++) { int occurences = folders[i].Split('\\').Length-1; if (occurences==4) subdirectories.Add(folders[i]); } #endregion

    Read the article

  • Python: unix socket -> broken pipe

    - by Heinrich Schmetterling
    I'm trying to get Python socket working as an alternative to calling the command line socat. This socat command works fine: echo 'cmd' | sudo socat stdio <path-to-socket> but when I run this python code, I get an error: >>> import socket >>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) >>> s.connect(<path-to-socket>) >>> s.send('cmd') Traceback (most recent call last): File "<stdin>", line 1, in <module> socket.error: (32, 'Broken pipe') Any ideas what the issue is? Thanks.

    Read the article

  • Looking for a good example usage of get_or _create in Django views and raising a Form error

    - by Rik Wade
    I am looking for a good example of how to achieve the following: I would like to use get_or_create to check whether an object already exists in my database. If it does not, then it will be created. If it does exist, then I will not create the new object, but need to raise a form error to inform the user that they need to enter different data (for example, a different username). The view contains: p, created = Person.objects.get_or_create( email = registration_form.cleaned_data['email'], defaults = { 'creationDate': datetime.datetime.now(), 'dateOfBirth': datetime.date(1970,1,1) }) So 'p' will contain the existing Person if it exists, or the new Person if not. I would like to act on the boolean value in 'created' in order to skip over saving the Person and re-display the registration_form and raise an appropriate form validation error. The alternative I'm considering is doing a check in a custom Form validation method to see whether a Person exists with the data in the provided 'email' field, and just raising a validation error.

    Read the article

  • Scala 2.8 Actors

    - by Dave
    Hi, We're looking at using actors in our Scala code quite soon. We're also thinking of moving to Scala 2.8 in the next few weeks. We've been keeping an eye on Akka but it doesn't currently support 2.8 and plans for it have slipped from the 0.7 release to 0.8 We would like distributed, supervised actors. Is there an alternative to Akka? Or does anyone know if Akka 0.8 will definitely have 2.8 support (and when it's scheduled for)? Perhaps it's possible to just use Scala actors for the time being and switch to Akka at a later stage? Thanks, Dave

    Read the article

< Previous Page | 103 104 105 106 107 108 109 110 111 112 113 114  | Next Page >