Daily Archives

Articles indexed Friday March 26 2010

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

  • How can I change the link format in will_paginate for page_cache in Ruby on Rails?

    - by jaehyun
    I want to use page_cache with will_paginate. There are good information on this page below. http://railsenvy.com/2007/2/28/rails-caching-tutorial#pagination http://railslab.newrelic.com/2009/02/05/episode-5-advanced-page-caching I wrote routes.rb looks like: map.connect '/products/page/:page', :controller => 'products', :action => 'index' But, links of url are not changed to '/products/page/:page' which are in will_paginate helper. They are still 'products?page=2' How can i change url format is in will_paginate?

    Read the article

  • Find a free X11 display number

    - by James
    I have some unit tests that need an X11 display so I plan to start Xvfb before running them, but to start Xvfb I will need a free display number to connect it to. My best guess is to see what's free in /tmp/.X11-unix but I'm not sure how to handle the race if many tests try to start simultaneously. sshd must do this, does anyone know how?

    Read the article

  • Retrieving cached data from existing Crystal Reports file

    - by TimS
    Is there any way to retrieve the cached data from a previously refreshed report and say, dump it to a file? Basically, I'm looking for the dataset that is being used by the report, and hand-dragging each field onto the canvas or even exporting the file doesn't quite get me where I want. I'm not particular to a specific solution, be it .NET, vbscripting or even within the program itself... I'm not overly familiar with the Crystal Report object model, nor .NET, but it seems like with a setting like "EnableSaveDataWithReport", there ought to be a straightforward way. Oh, and I'm on CR 11 Pro

    Read the article

  • How to rotate table-headline in Latex table

    - by pagid
    Hi, is there a way to rotate the "Demo 1", "Demo2" and "Demo 3" headlines 90° in the following LaText table? \documentclass[a4paper,twoside,10pt]{report} \begin{document} \begin{tabular}{|l|l|l|l|} \hline & Demo1 & Demo2 & Demo3 \\ \hline Person 1 & x & & \\ \hline Person 2 & x & & x \\ \hline Person 3 & x & x & \\ \hline Person 4 & & x & x \\ \hline \end{tabular} \end{document} Thanks

    Read the article

  • How can I start X11 window with no display associated

    - by stoimen
    I'd like to start Firefox for example with no display associated and eventually take a screenshot with import. Can I in fact make it periodically with cronjobs? I'm now making a ssh -X connection, take the xwininfo for the window started in background and everything's OK. But I'd like to automate it.

    Read the article

  • Auto Size Embed Code

    - by Belgin Fish
    Hey, I'm just wondering what code I could use to auto change the size of the video being embedded before it gets displayed. Example, I need to have it find all instances of this width="any value" height="any value" and replace them with this width="540" height="405"

    Read the article

  • Unlocked Linux smartphone swivels 180 degrees

    <b>LinuxDevices:</b> "ChinaGrabber is selling an unlocked, quadband GSM cellphone that runs Linux on a 624MHz Marvell PXA310. The $570 BPhone features a 5-inch 800 x 480 touchscreen with 180-degree rotation, plus WiFi, Bluetooth, GPS, and up to 16GB flash expansion."

    Read the article

  • XP Pro repair CD - does Pro/Home disc matter?

    - by Moshe
    I'm trying to repair an xp pro install using the repair cd The issue is a corrupted registry. Following the MS help center instructions, I made a batch file to replace the registry. It's not working. Does the CD need to match the edition and service pack of Windows on the disc? How can I tell (retroactively, with no Windows access) what edition/sp is installed? Any other ideas/thoughts? I am considering an pgrade install to Windows 7... TH\hanks!

    Read the article

  • Looking to display a text RSS feed as Windows 7 desktop/background

    - by Matt
    I'd like to display an RSS feed (updating dynamically of course) on my Windows 7 desktop. The posts I've read about Windows 7 RSS backgrounds are all about displaying various background images delivered via RSS. What I'm looking for would be similar to the Windows XP/95 Active Desktop feature which allowed for web pages to be presented on the desktop background.

    Read the article

  • Why can't I call methods within a class that explicitly implements an interface?

    - by tyrone302
    Here's the story. I created and interface, IVehicle. I explicitly implemented the interface in my class, Vehicle.cs. Here is my interface: Interface IVehicle { int getWheel(); } here is my class: class Vehicle: IVehicle { public int IVehicle.getWheel() { return wheel; } public void printWheel() { Console.WriteLine(getWheel()); } } Notice that "getWheel()" is explicitly implemented. Now, when I try to call that method within my Vehicle class, I receive an error indicating that getWheel() does not exist in the current context. Can someone help me understand what I am doing wrong?

    Read the article

  • CSS Question - Any way to set (eg. a font-size) to a group of styles, by linking the style to anothe

    - by Joe
    .small_fonts{ font-size:10px; } .fonts_blue{ color:blue; } .fonts_red{ color:red; } .fonts_green{ color:green; } Any way to apply "small_fonts" to each of the "fonts_blue, _red, _green" w/o doing this: .fonts_blue, fonts_red, fonts_green { font-size:10px; } I am just trying to update my css to be more organized. I realised I don't need to define the font-size for each of the "small" fonts. When adding the class btw... I know you can do this: class="small_fonts fonts_blue" ~ however I'm talking about combining within the css stylesheet

    Read the article

  • How can I measure the quality of a fax file?

    - by debita
    Hi! I'm trying to make a tool that can measure the quality of a fax file, comparing the received one with the one sent. I tried Phase_Correlation software, in order to see if the images are similar... but it's not enough. My purpose is to evaluate if the fax is legible after the transmission. Any ideas? Is there any way of comparing two tiffs? pdfs? or image files? Thanks a lot

    Read the article

  • Fluent NHibernate auto mapping: map property from another table's column

    - by queen3
    I'm trying to use S#arp architecture... which includes Fluent NHibernate I'm newbie with (and with NHibernate too, frankly speaking). Auto mapping is used. So I have this: public class UserAction : Entity { public UserAction() { } [DomainSignature] [NotNull, NotEmpty] public virtual string Name { get; set; } [NotNull, NotEmpty] public virtual string TypeName { get; private set; } } public class UserActionMap : IAutoMappingOverride<UserAction> { public void Override(AutoMap<UserAction> mapping) { mapping.WithTable("ProgramComponents", m => m.Map(x => x.TypeName)); } } Now, table UserActions references table ProgramComponents (many to one) and I want property UserAction.TypeName to have value from db field ProgramComponents.TypeName. However, the above code fails with NHibernate.MappingException: Duplicate property mapping of TypeName found in OrderEntry3.Core.UserAction As far as I understand the problem is that TypeName is already auto-mapped... but I haven't found a way to remove the automatic mapping. Actually I think that my WithTable/Map mapping has to replace the automatic TypeName mapping, but seems like it does not. I also tried different mapping (names are different but that's all the same): mapping.WithTable("ProgramComponents", m => m.References<ProgramComponent>( x => x.Selector, "ProductSelectorID" ) and still get the same error. I can overcome this with mapping.HasOne<ProgramComponent>(x => x.Selector); but that's not what I exactly wants to do. And I still wonder why the first two methods do not work. I suspect this is because of WithTable.

    Read the article

  • Apache rewrite rules redux

    - by AlexanderJohannesen
    I've got a REST framework that when plopped into any directory should Just Work(TM), and it seems to work fine when I've got projects in subdirectories, but not if it's in root. So, given a few example directories; / /project1 /bingo/project2 /hoopla/doopla/minor/project3 All of these works fine, except I'm getting "funnies"* when the project runs in the root directory (bit hard to explain, I suppose, but the second level rewrites are not working properly). Here's my attempt at a generic .htaccess file: RewriteEngine On RewriteRule ^static/ - [L] RewriteCond %{REQUEST_URI} ^$ RewriteRule .* ./ [R,L] RewriteRule ^index.php - [L] RewriteRule (.*) index.php?q=$1 [QSA,PT] (And yes, all projects have a subdirectory ./static which is ignored by rewrites) What I'm trying to achieve is a set of rewrite rules that work for most cases (which is, again, plonking the project in a directory the webserver serves). I'm not a rewrite rules wiz by a long shot, and any good advice and gotchas would be appreciated (and yes, I've gone through too many introductory articles. I need some serious juice.) More info on the funnies; my webserver has docroot in one spot (under /usr/share/apache2/default-site/), but a set of rules that says that /projects is pulled in from somewhere else that's not a subdirectory of docroot (/home/user/Projects/). When I go there, I get a list of /projects subdirectories, and if one of those subdirectories gets called (restmapp) with the proposed rewrite rules, I get ; The requested URL /home/user/Projects/restmapp/index.php was not found on this server.

    Read the article

  • How do I access the ApplicationSettings section from another assembly?

    - by Calanus
    I have a dll that is referenced by the parent (executing) assembly. In the ApplicationSettings section of the app.config for the parent assembly I have some settings that can be accessed in the normal intellisense manner (e.g. Properties.Settings.Default.SMTPServer). How do I access these settings from the referenced dll? I obviously can't use intellisense as they are not in the same assembly!

    Read the article

  • C: WinAPI CreateDIBitmap() from byte[] problem

    - by zipcodeman
    I have been working on this problem for a while now. I am trying to add JPEG support to a program with libjpeg. For the most part, it is working fairly well, But for some JPEGs, they show up like the picture on the left. It may not be obvious, but the background shows up with alternating red green and blue rows. If anyone has seen this behavior before and knows a probable cause, I would appreciate any input. I have padded the rows to be multiples of four bytes, and it only slightly helped the issue.

    Read the article

  • Is it possible from Spring to inject the result of calling a method on a ref bean?

    - by Alex Worden
    Hi, Is it possible from Spring to inject the result of calling a method on a ref bean? I'm trying to refactor some cut/pasted code from two separate projects into a common class. In one of the projects, the code lives in a class I'll call "MyClient" that is being instantiated from Spring. It is injected with another spring-instantiated class "MyRegistry", then the MyClient class uses that class to look up an endpoint. All I really need is the endpoint String in my refactored class, which can be initialized via a Setter. I really cannot have a dependency on MyRegistry from MyClient in the refactored code. So, my question is this... is there a way I can inject the endpoint String from spring that was looked up in the MyRegistry class. So, I currently have: <bean id="registryService" class="foo.MyRegistry"> ...properties set etc... </bean> <bean id="MyClient" class="foo.MyClient"> <property name="registry" ref="registryService"/> </bean> But I'd like to have (and I know this is imaginary Spring syntax) <bean id="MyClient" class="foo.MyClient"> <property name="endPoint" value="registryService.getEndPoint('bar')"/> </bean> where MyRegistry will have a method getEndPoint(Stirng endPointName) Hope that makes sense from a the standpoint of what I'm trying to achieve. Please let me know if something like this is possible in Spring!

    Read the article

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