Daily Archives

Articles indexed Tuesday May 11 2010

Page 9/123 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Is it possible to output cache by host name? ie varybyhost or varbyhostheader?

    - by Pure.Krome
    Hi folks, i've got a website that has a number of host headers. Depending on the host header, the results are different - both visually (theme'd) and data. So lets imagine i have a website called 'Foo' - that returns search results (original, eh?). Now, the same code runs both sites. It is physically the same server/website (using Host Headers) :- www.foo.com www.foo.com.au Now, if i goto '.com', the site is theme'd in blue. if i goto the '.com.au' site, it's theme'd in red. And the data is different for the same search result, based on the host name (ie. us results for .com, au results for .com.au) SO .. if i wish to use OutputCaching .. can this be handled / differ by the host name? I don't want to have the first person goto the .com site .. grab the results ... and the a second person goto my .com.au .. same search data .. and get the theme and results for the .com site. Possible?

    Read the article

  • How to attach to the jQuery Autocomplete plugin's mouse events?

    - by Tommy B
    My problem is this: I need to update some text in a div with the value of what the mouse pointer is hovering over in the autocomplete drop down list. Can it be done easily, or do I have to make fundamental changes to the Autocomplete plugin? I am using the jQuery Autocomplete plugin version 1.1 by Jörn Zaefferer. Any and all help will be greatly appreciated!

    Read the article

  • Leave bash script running on remote terminal while not logged in?

    - by mechko
    I have a bash script that takes several hours to run. While it's running, I would like to do other things, which may involve logging out or disconnecting from the internet (my script runs network tests on various computers). I understand that there is a command that would allow me to run my tests from a remote terminal and logout of the terminal while it runs. Does anyone know what this command is? Thanks

    Read the article

  • How can I make subversion reset the stored passwords/users and remember my authentication credential

    - by NicDumZ
    Hello folks! Background: I used to have everything working just fine on my fresh install: $ svn co https://domain:443/ test1 Error validating server certificate for 'https://domain:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: **REMOVED** - Valid: **REMOVED** - Issuer: **REMOVED** - Fingerprint: **checked with issuer and REMOVED** (R)eject, accept (t)emporarily or accept (p)ermanently? p Authentication realm: <https://domain:443> Subversion repository Password for 'nicdumz-machine-hostname': Authentication realm: <https://domain:443> Subversion repository Username: nicdumz Password for 'nicdumz': # proceeds to checkout correctly $ svn co https://domain:443/ test2 # checkouts nicely, without asking for my password. At some point I needed to commit stuff using a different account. So I did that $ svn ci --username other.user Authentication realm: <https://domain:443> Subversion repository Password for 'other.user': # works fine But since then, everytime I want to commit as 'nicdumz' (default user, all repos have been checked-out with that user), it prompts me for my password: $ svn ci Authentication realm: <https://domain:443> Subversion repository Password for 'nicdumz': Hey come on, why :) The same happens if I want a fresh checkout, since read-access is also protected. So I tried fixing the issue by myself. I read around that ~/.subversion/auth was storing credentials, so I removed it from the way: $ cd ~/.subversion $ mv auth oldauth $ mkdir auth It seemed to work at first, because svn had forgotten about certificate validation: $ svn co https://domain:443/ test3 Error validating server certificate for 'https://domain:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: **REMOVED** - Valid: **REMOVED** - Issuer: **REMOVED** - Fingerprint: **checked with issuer and REMOVED** (R)eject, accept (t)emporarily or accept (p)ermanently? p Authentication realm: <https://domain:443> Subversion repository Password for 'nicdumz-machine-hostname': Authentication realm: <https://domain:443> Subversion repository Username: nicdumz Password for 'nicdumz': # proceeds to checkout correctly $ svn up Authentication realm: <https://domain:443> Subversion repository Password for 'nicdumz': What? how is this happening? If you have suggestions to investigate more about the behaviour, I am very interested. If I'm correct, there is no way to do a verbose svn up or anything of the like, so I'm not sure should I go for investigation. Oh, and for what it's worth: $ svn --version svn, version 1.6.6 (r40053) compiled Oct 26 2009, 06:19:08 Copyright (C) 2000-2009 CollabNet. Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/). The following repository access (RA) modules are available: * ra_neon : Module for accessing a repository via WebDAV protocol using Neon. - handles 'http' scheme - handles 'https' scheme * ra_svn : Module for accessing a repository using the svn network protocol. - with Cyrus SASL authentication - handles 'svn' scheme * ra_local : Module for accessing a repository on local disk. - handles 'file' scheme * ra_serf : Module for accessing a repository via WebDAV protocol using serf. - handles 'http' scheme - handles 'https' scheme

    Read the article

  • Javascript conflict on my html page

    - by tochiro
    Hello, I have an accordion menu and a lightwindow script on my web page. The lightwindow script does not work because of the accordion script because if I delete the latter the lightwindow script works. There must be a conflict but what? Here is the head section of my page: <!-- lightwindow files --> <script type="text/javascript" src="lightwindow/javascript/prototype.js"></script> <script type="text/javascript" src="lightwindow/javascript/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="lightwindow/javascript/lightwindow.js"></script> <link rel="stylesheet" href="lightwindow/css/lightwindow.css" type="text/css" media="screen" /> <!-- accordion scripts --> <script src="js/jquery-1.2.1.min.js" type="text/javascript"></script> <script src="js/menu.js" type="text/javascript"></script> <script src="js/jquery.cookie.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="css/accordion.css" /> Thank you for your time. Cheers tochiro

    Read the article

  • How to efficiently serve massive sitemaps in django

    - by mlissner
    I have a site with about 150K pages in its sitemap. I'm using the sitemap index generator to make the sitemaps, but really, I need a way of caching it, because building the 150 sitemaps of 1,000 links each is brutal on my server.[1] I COULD cache each of these sitemap pages with memcached, which is what I'm using elsewhere on the site...however, this is so many sitemaps that it would completely fill memcached....so that doesn't work. What I think I need is a way to use the database as the cache for these, and to only generate them when there are changes to them (which as a result of the sitemap index means only changing the latest couple of sitemap pages, since the rest are always the same.)[2] But, as near as I can tell, I can only use one cache backend with django. How can I have these sitemaps ready for when Google comes-a-crawlin' without killing my database or memcached? Any thoughts? [1] I've limited it to 1,000 links per sitemap page because generating the max, 50,000 links, just wasn't happening. [2] for example, if I have sitemap.xml?page=1, page=2...sitemap.xml?page=50, I only really need to change sitemap.xml?page=50 until it is full with 1,000 links, then I can it pretty much forever, and focus on page 51 until it's full, cache it forever, etc.

    Read the article

  • F# Seq.initInfinite giving StackOverflowException

    - by TrueWill
    I'm learning F#, and I am having trouble understanding why this crashes. It's an attempt to solve Project Euler problem 2. let rec fibonacci n = if n = 1 then 1 elif n = 2 then 2 else fibonacci (n - 1) + fibonacci (n - 2) let debugfibonacci n = printfn "CALC: %d" n fibonacci n let isEven n = n % 2 = 0 let isUnderLimit n = n < 55 let getSequence = //[1..30] Seq.initInfinite (fun n -> n) |> Seq.map debugfibonacci |> Seq.filter isEven |> Seq.takeWhile isUnderLimit Seq.iter (fun x -> printfn "%d" x) getSequence The final version would call a sum function (and would have a higher limit than 55), but this is learning code. As is, this gives a StackOverflowException. However, if I comment in the [1..30] and comment out the Seq.initInfinite, I get: CALC: 1 CALC: 2 2 CALC: 3 CALC: 4 CALC: 5 8 CALC: 6 CALC: 7 CALC: 8 34 CALC: 9 CALC: 10 CALC: 11 It appears to be generating items on demand, as I would expect in LINQ. So why does it blow up when used with initInfinite?

    Read the article

  • Android show listview.

    - by zaid
    i want to show this array as a listview in a new screen when a button is clicked. ArrayList<String> favorite = new ArrayList<String>(); this ListView is a small part of my class. i cant seem to figure out how to implement it with my code (i can figure out how to create a listview in a separate application, and set the onitemclicklistner just for that listview) i want to display that listview when. case R.id.ShowFavButton:

    Read the article

  • In Ruby, can the coerce() method know what operator it is that requires the help to coerce?

    - by Jian Lin
    In Ruby, it seems that a lot of coerce() help can be done by def coerce(something) [self, something] end that's is, when 3 + rational is needed, Fixnum 3 doesn't know how to handle adding a Rational, so it asks Rational#coerce for help by calling rational.coerce(3), and this coerce instance method will tell the caller: # I know how to handle rational + something, so I will return you the following: [self, something] # so that now you can invoke + on me, and I will deal with Fixnum to get an answer So what if most operators can use this method, but not when it is (a - b) != (b - a) situation? Can coerce() know which operator it is, and just handle those special cases, while just using the simple [self, something] to handle all the other cases where (a op b) == (b op a) ? (op is the operator).

    Read the article

  • Grails build-test-data

    - by bsreekanth
    Hello, Is it advisable to use the build-test-data plugin to load the bootstrap (seed/initial) data for an application. The plugin tutorial is excellent at http://bitbucket.org/tednaleid/grails-test-data/wiki/Home , but only mention about loading test data. There is a section about TestDataConfig , which allows to set default data. But is it a viable option if the data needs to persist in a larger scale, with complex relations.\ thanks.

    Read the article

  • JetBrains dotTrace, is it possible to profile source code line by line? else I need another tool

    - by m3ntat
    I am using JetBrains dotTrace, I've profiled my app which is entirely CPU bound. But the results as you walk down the tree don't sum to the level above in the tree, I only see method calls not the body lines of the node in questions method. Is it possible to profile the source code line by line. i.e for one node: SimulatePair() 99.04% --nextUniform() 30.12% --IDCF() 24.08% So the method calls nextUniform + IDCF use 54% of the time in SimulatePair (or 54% total execution time I'm not sure how to read this) regardless what is happening the other 46% of SimulatePair I need some detail on a line by line basis. Any help or alternative tools is much appreciated. Thanks

    Read the article

  • Handling incremental Data Modeling Changes in Functional Programming

    - by Adam Gent
    Most of the problems I have to solve in my job as a developer have to do with data modeling. For example in a OOP Web Application world I often have to change the data properties that are in a object to meet new requirements. If I'm lucky I don't even need to programmatically add new "behavior" code (functions,methods). Instead I can declarative add validation and even UI options by annotating the property (Java). In Functional Programming it seems that adding new data properties requires lots of code changes because of pattern matching and data constructors (Haskell, ML). How do I minimize this problem? This seems to be a recognized problem as Xavier Leroy states nicely on page 24 of "Objects and Classes vs. Modules" - To summarize for those that don't have a PostScript viewer it basically says FP languages are better than OOP languages for adding new behavior over data objects but OOP languages are better for adding new data objects/properties. Are there any design pattern used in FP languages to help mitigate this problem? I have read Phillip Wadler's recommendation of using Monads to help this modularity problem but I'm not sure I understand how?

    Read the article

  • Client connections with epoll

    - by Andres Rodriguez
    Hi, I'm programming an application(client/server) in C++ for linux using epoll y pthreads but I don't know how to handle the connect() calls for attach a new connection in the descriptor list if a loop with epoll_wait() is running(Edge-triggered), How to can I do it?... I could to use a dummy file descriptor to trigger an event and scape of wait?, or a simple call to connect() could fire the event??... Sorry for my bad english...

    Read the article

  • InteropServices COMException when executing a .net app from a web CGI script on Windows Server 2003

    - by Kurt W. Leucht
    Disclaimer: I'm completely clueless about .net and COM. I have a vendor's application that appears to be written in .net and I'm trying to wrap it with a web form (a cgi-bin Perl script) so I can eventually launch this vendor's app from a separate computer. I'm on a Windows Server 2003 R2 SE SP1 system and I'm using Apache 2.2 for the web server and ActivePerl 5.10.0.1004 for the cgi script. My cgi script calls the vendor's app that resides on the same machine using the Perl backtick operator. ... $result = "Result: " . `$vendorsPath/$vendorsExecutable $arg1 $arg2`; ... Right now I'm just running IE web browser locally on the server machine and accessing "http://localhost/cgi-bin/myPerlScript.pl". The vendor's app fails and logs a debug message that includes the following stack trace (I changed a couple names so as to not give away the vendor's identity): ... System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80043A1D): 0x80040154 - Class not registered --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at VendorsTool.Engine.Core.VendorsEngine.LoadVendorsServices(String fileName, String& projectCommPath) ... When I run the vendors app from the Windows command line on the server machine with the exact same arguments that the cgi script is passing it runs just fine, so there's something about invoking their app via the web script that is causing a problem. This problem is likely security related because the whole thing runs just fine on a Windows XP Pro machine (both command line and web invocation). I actually developed my web script there and got it completely working there before I tried moving it to the Windows Server 2003 machine. So what's different about the Windows Server 2003 machine that would keep the vendor's .net app from being executed successfully by a web cgi script? Can I fix this problem somehow to make it work on my server or will the vendor have to make a change to their .net app and ship out a new version? I'm probably the only person in the world who is trying to execute this vendor's app from a separate program, so I hate to bother the vendor with the issue if there's a workaround that I can implement myself here on my server machine. Plus, I'm in kind of a hurry and I don't want to wait 4 or 6 months for the vendor to put in a fix and deploy a new version. Thanks for any advise you can give.

    Read the article

  • Is there any way to provide custom factory for .Net Framework creation Entities from EF4 ?

    - by ILICH
    There are a lot of posts about how cool POCO objects are and how Entity Framework 4 supports them. I decided to try it out with domain driven development oriented architecture and finished with domain entities that has dependencies from services. So far so good. Imagine my Products are POCO objects. When i query for objects like this: NorthwindContext db = new NorthwindContext(); var products = db.Products.ToList(); EF creates instances of products for me. Now I want to inject dependencies in my POCO objects (products) The only way I see is make some method within NorthwindContext that makes something like pseudo-code below: public List<Product> GetProducts(){ var products = database.Products.ToList(); container.BuildUp(products); //inject dependencies return products; } But what if i want to make my repository to be more flexible like this: public ObjectSet<Product> GetProducts() { ... } So, I really need a factory to make it more lazy and linq friendly. Please help !

    Read the article

  • Float multiple fixed-width / varible-height boxes into 2 columns

    - by Jeremy H
    I'll try to explain this as best I can. I have multiple divs that are fixed-width but variable height. I want to float these boxes into two columns inside a fixed-width container. What happens when a give them all a float: left value, I get something like this: ######### ######### # box 1 # # box 2 # ######### # ..... # ......... # ..... # ......... ######### ######### ######### # box 3 # # box 4 # # ..... # # ..... # ######### ######### ######### ######### # box 5 # # box 6 # # ..... # ######### # ..... # ######### (The periods are white space) What I really would really like is the top of box 3 to touch the bottom of box 1. Any easy way to acheive this?

    Read the article

  • Mac Mini's internet very slow, every other device fine (PC, iPhone, Xbox 360)

    - by alex
    I recently haven't used my Mac Mini for about 5 days (however it was left on). I seem to be able to connect and get great download / upload speeds through my PC, Xbox 360, iPhone and parents' laptop. However, my Mac Mini is very slow. OS X's Mail.app is downloading mail at 0.4kbps and then dropping to 0. Skype file transfers are doing the same. Browsing the net is a terrible experience. It is taking 30 seconds or more to download basic pages. All of my devices connect wirelessly to a Netgear router / modem. I have tried giving the Mac Mini a manual IP, and renew DHCP lease, as well as flush DNS in Terminal. I have also rebooted the router / modem twice, and the Mac Mini twice. Do you know what could be causing this? Thanks

    Read the article

  • What format should I convert my iTunes Videos to?

    - by Aequitarum Custos
    Recently got Daniusoft Media Converter, and was about to strip the DRM off my iTunes library, then I found I had a huge decision to make. Converting my music seems obvious, to MP3, however the video formats, I'm at a loss on. It has "optimized" formats for all types of video players such as iPhone, Zune, Droid (which I own), and just a huge list! I bought several seasons of House and a few movies, though I don't know which format would be optimal to not lose quality. While I love my Droid, I have no intention on watching full episodes or movies on it, and I have a feeling that would reduce quality. One of the options sections is HD Video, and it has HD MPEG-4 Video (*.mp4). That one seems like it would be the best format to convert to without losing quality, but again, I'm unsure. Has anyone used this software, or have general expertise in video formats to give a recommendation on what file format I should convert my videos to? Format requirements: No loss in quality Portability would be ideal (as in, will play on my Windows and potentially MAC, and streamable to a bigscreen).

    Read the article

  • c# multi threaded file processing

    - by user177883
    There is a folder that contains 1000 of small text files. I aim to parse and process all of them while more files are being populated in to the folder. My intention is to multithread this operation as the single threaded prototype took 6 minutes to process 1000 files. I like to have reader and writer thread(s) as following : while the reader thread(s) are reading the files, I d like to have writer thread(s) to process them. Once the reader is started reading a file, I d like to mark it as being processed, such as by renaming it, once it s read, rename it to completed. How to approach such multithreaded application ? Is it better to use a distributed hash table or a queue? Which data structure to use that would avoid locks? Would you have a better approach to this scheme that you like to share?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >