Daily Archives

Articles indexed Wednesday May 5 2010

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

  • Assistance using respond_to to find the right actions to render PDF in ruby on rails

    - by Angela
    Hi, I am trying out Prince with the Princely plugin, which is supposed to format templates that have the .pdf into a PDF generator. Here is my controller: class TodoController < ApplicationController def show_date @date = Date.today @campaigns = Campaign.all @contacts = Contact.all @contacts.each do |contact| end respond_to do |format| format.html format.pdf do render :pdf => "filename", :stylesheets => ["application", "prince"], :layout => "pdf" end end end end I changed the routes.db to include the following: map.connect ':controller/:action.:format' map.todo "todo/today", :controller => "todo", :action => "show_date" My expected behavior is when I enter todo/today.pdf, it tries to execute show_date, but renders according to the princely plugin. Right now, it says cannot find action. What do I need to do to fix this?

    Read the article

  • Bugzilla Install question - I'm stuck

    - by Nabeel
    I run Bugzilla's checksetup.pl (migrating an older version), and it always returns: Reading ./localconfig... Checking for DBD-mysql (v4.00) ok: found v4.005 Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1229, <DATA> line 225. Use of uninitialized value in subroutine entry at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1229, <DATA> line 225. Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1259, <DATA> line 225. Use of uninitialized value in subroutine entry at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1259, <DATA> line 225. There was an error connecting to MySQL: Undefined subroutine &DBD::mysql::db::_login called at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBD/mysql.pm line 142, <DATA> line 225. MySQL Version: [root@bugzilla-core TMP]# mysql --version mysql Ver 14.12 Distrib 5.0.60sp1, for redhat-linux-gnu (x86_64) using readline 5.1 And mysql_config: [root@bugzilla-core TMP]# mysql_config Usage: /data01/mysql-5.0.60/bin/mysql_config [OPTIONS] Options: --cflags [-I/data01/mysql-5.0.60/include -g] --include [-I/data01/mysql-5.0.60/include] --libs [-rdynamic -L/data01/mysql-5.0.60/lib -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc] --libs_r [-rdynamic -L/data01/mysql-5.0.60/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -lmygcc] --socket [/tmp/mysql.sock] --port [0] --version [5.0.60sp1] --libmysqld-libs [-rdynamic -L/data01/mysql-5.0.60/lib -lmysqld -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -lmygcc] Now, I've tried the latest version of DBD-mysql (4.0.14). I'm completely lost and stumped. I'm not sure where to go from here. Scouring the 'webs haven't returned anything fruitful. Any ideas?

    Read the article

  • SQLServer Replication, dealing with updating data in a subscriber without merging with the publisher

    - by FlySwat
    To simplify my problem, picture two databases, one is a publisher, one is a replicated subscriber. Most of the time, changes are configured in the publisher, and pushed to the subscriber once per day using transactional replication. (The subscriber is the main production database). However, on a rare occasion, we need to make a change directly to the subscriber database. This does not break replication, however to ensure consistency, we also want to replicate this single change back to the publisher database. My first thought was to make both databases publishers to each other, but that does not work. Merge replication also does not work as that merges the data together, and we really only want to push that single change from the subscriber back to the publisher. Is there some other replication scheme I can use here, or do I need to invent my own thing?

    Read the article

  • Set item.selected in ASP.NET Menu Control

    - by BillB
    ASP.NET newbie here. When on a page I'd like to set the corresponding menu item to selected. My approach is this: On Home.aspx.cs: Menu menu = (Menu)Master.FindControl("Menu1"); if (menu.Items.Count > 0) { menu.FindItem("Home").Selected = true; } Trouble is, menu.item.count == 0. My menu is bound to a sitemap, if that matters. Thanks, Bill

    Read the article

  • iPhone connect to MySQL database on local network computer

    - by Billy Blanks
    I'm a bit of a noob to iPhone programming and I've read up on using PHP as the connection between an iPhone app and a remotely hosted MySQL database, but what I need to do is to connect directly to a MySQL database running on a local machine in my office. The machine is behind the same gateway and has an ip address similar to 192.169.x.x. Is that possible without PHP in the middle or anything else for that matter? Thanks in advance. Really appreciate this site.

    Read the article

  • Can I stop NUnit GUI test run from code under test?

    - by David White
    I'm using nunit.exe (v2.5.3, as it happens) for our testers to run UI tests of our web site, using WatiN. The regression test suite is up to around 100 tests. While the test suite is running, the test web site could go down for maintenance. It would be more efficient in those circumstances if the test suite would stop altogether, rather than attempting to run each remaining test, and failing. Is there any way to accomplish this?

    Read the article

  • Automate Testing on future only items business rules

    - by Titan
    I currently have a business object with a validation business rule, which is it can only be created for the future, tomorrow onwards, and I cannot create new items for today. I have a process, which runs the non-future business objects through some steps.. Because I have to set things up today, and test tomorrow, and when it fails, I can only create a new object tomorrow and test the following day. Are there any easy ways to automate this process in any testing frameworks? I think our testers are using the visual studio 2010 test manager. How do you guys manage situations like this? Cheers

    Read the article

  • SSH Password/User problem with Cygwin sshd service

    - by Supernovah
    hello I just set up SSHd through Cygwin on a Windows XP Pro box overseas using a RAT and discluded the openssh package from the install. I ran the cywin shell (from c:\cywin) and ran Now, It's under a port I know is safe and fowarded properly, but I won't share it's number. It's not a common port, but it's under 40000. Firewalls are off etc etc. I'm on the first Admin account made on the box. (It's full admin) I've run the following commands chmod +r /etc/passwd chmod +r /etc/group hmod 777 /var /*Created New Admin User Account To Be Used via SSH*/ mkpasswd -cl > /etc/passwd mkgroup --local > /etc/group I can connect locally, but not externally. I know my ports etc are fine. Any possible problems, as i really need this tunnel up :P

    Read the article

  • DataView.RowFilter an ISO8601

    - by Ryan
    I have a DataTable (instance named: TimeTable) whose DefaultView (instance named: TimeTableView) I am trying to use to filter based on a date. Column clock_in contains an ISO8601 formatted string. I would like to select all the rows in this DataTable/DefaultView between 2009-10-08T08:22:02Z and 2009-10-08T20:22:02Z. What would I have to filter on this criteria? I tried: TimeTableView = TimeTable.DefaultView; TimeTableView.RowFilter = "clock_in >= #2009-10-08T08:22:02Z# and #2009-10-08T20:22:02Z#"; This is not working for me. Am I operating on the wrong object or is my filter syntax wrong?

    Read the article

  • register device at run time

    - by user177893
    In the App ID section of the Program Portal, locate the App ID you wish to use with the Apple Push Notification service. Only App IDs with a specific bundle ID can be used with the APNs. You cannot use a “wild-card” application ID. You must see “Available” under the Apple Push Notification service column to register this App ID and configure a certificate for this App ID. Click the ‘Configure’ link next to your desired App ID. In the Configure App ID page, check the Enable Push Notification Services box and click the Configure button. Clicking this button launches the APNs Assistant, which guides you through the next series of steps that create your App ID specific Client SSL certificate. Download the Client SSL certificate file to your download location. Navigate to that location and double-click the certificate file (which has an extension of cer) to install it in your keychain. When you are finished, click Done in the APNS Assistant. Double-clicking the file launches Keychain Access. Make sure you install the certificate in your login keychain on the computer you are using for provider development. The APNs SSL certificate should be installed on your notification server. When you finish these steps you are returned to the Configure App ID page of the iPhone Dev Center portal. The certificate should be badged with a green circle and the label “Enabled”. To complete the APNs set-up process, you will need to create a new provisioning profile containing your APNs-enabled App ID. IS it posssible to do theses steps through code.

    Read the article

  • Is there a useDirtyFlag option for Tomcat 6 cluster configuration?

    - by kevinjansz
    In Tomcat 5.0.x you had the ability to set useDirtyFlag="false" to force replication of the session after every request rather than checking for set/removeAttribute calls. <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" managerClassName="org.apache.catalina.cluster.session.SimpleTcpReplicationManager" expireSessionsOnShutdown="false" **useDirtyFlag="false"** doClusterLog="true" clusterLogName="clusterLog"> ... The comments in the server.xml stated this may be used to make the following work: <% HashMap map = (HashMap)session.getAttribute("map"); map.put("key","value"); %> i.e. change the state of an object that has already been put in the session and you can be sure that this object still be replicated to the other nodes in the cluster. According to the Tomcat 6 documentation you only have two "Manager" options - DeltaManager & BackupManager ... neither of these seem to allow this option or anything like it. In my testing the default setup: <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> where you get the DeltaManager by default, it's definitely behaving as useDirtyFlag="true" (as I'd expect). So my question is - is there an equivalent in Tomcat 6? Looking at the source I can see a manager implementation "org.apache.catalina.ha.session.SimpleTcpReplicationManager" which does have the useDirtyFlag but the javadoc comments in this state it's "Tomcat Session Replication for Tomcat 4.0" ... I don't know if this is ok to use - I'm guessing not as it's not mentioned in the main cluster configuration documentation.

    Read the article

  • Clarification needed: How does .NET runtime resolve assembly references from parent folder?

    - by aoven
    I have the following output structure of executables in my solution: %ProgramFiles% | +-[MyAppName] | +-[Client] | | | +-(EXE & several DLL assemblies) | +-[Common] | | | +-[Schema Assemblies] | | | | | +-(several DLL assemblies) | | | +-(several DLL assemblies) | +-[Server] | +-(EXE & several DLL assemblies) Each project in solution references different DLL assemblies, some of which are outputs from other projects in solution, and others are plain 3rd-party assemblies. For example, [Client] EXE might reference an assembly in [Common], which is in a different directory branch. All references have "Copy Local" set to false, to mirror the layout of the files in the final installed application. Now, if I take a look at reference properties in the Visual Studio IDE, I see that "Path" of every reference is absolute and that it corresponds to the actual output location of the assembly. That's understandable and correct. As expected, solution compiles and runs just fine. What I don't understand is, why everything seems to work even when I close the IDE, rename the [MyAppName] directory and run the [Client] EXE manually? How does the runtime find the assemblies if the reference paths aren't the same as they were at the time of linking? To be clear - this is actually exactly what I'm after: a semi-dispersed set of application files that run fine regardless of where the [MyAppName] directory is located or even what it's named. I'd just like to know, how and why this works without any specific path resolution on my part. I've read the answers to this similar question, but I still don't get it. Help much appreciated!

    Read the article

  • Idea: CodeIgniter codecompletion in Eclipse

    - by ToS
    I just figured out that all code completion for Eclipse is stored in plain files located here (example): .\eclipse\plugins\org.eclipse.php.core_2.1.1.v20090921-1100\Resources\language I tried adding global variables like $_POST, $_GET, $_SERVER to the end of basic.php but without any luck (did try to restart Eclipse). Is there a way to create compatible files for the needs of "smooth integration" of (ie.)CodeIgniter framework by adding or changing files located here and how would it be done?

    Read the article

  • iPad: SplitView does not rotate

    - by raj.tiwari
    I have the following setup: A subclass of UISplitViewController that creates the master and detail view controllers in the constructor. Master and Detail view controllers that both override shouldAutorotateToInterfaceOrientation to return `YES'. Detail view controller implements the UISplitViewControllerDelegate protocol and deals with the popover. I am observing two weird issues that might be interrelated: When the split view comes up (in portrait mode - default on simulator), the Master view is visible. It should not be. When I rotate the simulator, the view does not "right" itself. My UISplitViewController subclass does not override shouldAutorotateToInterfaceOrientation. However, both master and details view controllers do and return YES. Any ideas what I might be doing wrong? Is this a simulator bug? Thanks. -Raj

    Read the article

  • How to scroll to the bottom of a UITableView on the iPhone before the view appears

    - by acqu13sce
    I have a UITableView that is populated with cells of a variable height. I would like the table to scroll to the bottom when the view is pushed into view. I currently have the following function NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[log count]-1 inSection:0]; [self.table scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO]; log is a mutable array containing the objects that make up the content of each cell. The above code works fine in viewDidAppear however this has the unfortunate side effect of displaying the top of the table when the view first appears and then jumping to the bottom. I would prefer it if the table view could be scrolled to the bottom before it appears. I tried the scroll in viewWillAppear and viewDidLoad but in both cases the data has not been loaded into the table yet and both throw an exception. Any guidance would be much appreciated, even if it's just a case of telling me what I have is all that is possible.

    Read the article

  • Shared value in parallel python

    - by Jonathan
    Hey all- I'm using ParallelPython to develop a performance-critical script. I'd like to share one value between the 8 processes running on the system. Please excuse the trivial example but this illustrates my question. def findMin(listOfElements): for el in listOfElements: if el < min: min = el import pp min = 0 myList = range(100000) job_server = pp.Server() f1 = job_server.submit(findMin, myList[0:25000]) f2 = job_server.submit(findMin, myList[25000:50000]) f3 = job_server.submit(findMin, myList[50000:75000]) f4 = job_server.submit(findMin, myList[75000:100000]) The pp docs don't seem to describe a way to share data across processes. Is it possible? If so, is there a standard locking mechanism (like in the threading module) to confirm that only one update is done at a time? l = Lock() if(el < min): l.acquire if(el < min): min = el l.release I understand I could keep a local min and compare the 4 in the main thread once returned, but by sharing the value I can do some better pruning of my BFS binary tree and potentially save a lot of loop iterations. Thanks- Jonathan

    Read the article

  • Gnome-Applets Package Causing Gnome to Segfault

    - by FranticPedantic
    When I boot ubuntu I get a bunch of windows saying "The panel encountered a problem while loading: OAFIID:GNOME_ShowDesktopApplet", with a bunch of others(5) besides ShowDesktopApplet. I am able to launch a terminal, and I do have the taskbar at the top, although the bar at the bottom that holds the windows is blank, so when I minimize a window it disappears. Furthermore, when I try to launch most applications (firefox for example) it segfaults. I have googled the error but it seems to be common but general issue, and a lot of the solutions that worked for others didn't work for me. I tried deleting the gconf, gnome, and gnome2 folders in my home directory. I tried deleting a bunch of the gnome folders (although I might have done this wrong, I was confused as to which ones). I have also tried to use apt-get and dpkg to re-install ubuntu-desktop and gnome-applets. However, when I try apt-get install ubuntu-desktop I get errors regarding /var/cache/apt/archives/gnome-applets_2.28.0-0ubunt2_amd64.deb I tried dpkg --configure -a and interestingly I get Package gnome-applets is not installed. When I try to use apt-get to install it, that same pesky problem pops up error processing /var/cache/apt/archives/gnome-applets_2.28.0-0ubunt2_amd64.deb (--unpack) subprocess new post-removal script returned error exist status 245 sub process /usr/bin/dpkg returned an error code(1) This file has been popping up with regards to a lot of the solutions suggested I see. Any ideas?

    Read the article

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