Daily Archives

Articles indexed Thursday May 6 2010

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

  • deviceID format for PS/2 mouse

    - by kingas
    I would like to know the DeviceID and PNPDeviceID format for PS/2 Mouse. On my system Device ID for PS/2 mouse is ACPI\PNP0F13\4&1F1D307&0. So is the format is ACPI\PNPxxxx{something} or some thing else? I mean is ACPI is mandatory for PS/2 mouse?

    Read the article

  • Making a DVD video with a still image and PCM 16bit audio with ffmpeg

    - by João
    I'm trying to make a small video with a still image and a sound file playing in the background to pass it to dvdauthor and create a DVD. The command I'm using is this: ffmpeg -loop_input -i image.jpg -qscale 2 -i song.flac -aspect 4:3 -target pal-dvd -acodec pcm_s16le -shortest output.mpg However, the resulting video file doesn't have sound at all (testing it on VLC Player). I don't know if I can't combine "-acodec pcm_s16le" with "-target pal-dvd" to override the later, or if there is something else wrong with the command. If I try without the "-acodec pcm_s16le" parameter the video and audio works, I can even create a DVD ISO with it. However, the audio stays as AC3. I wanted to include with the video the lossless audio, not a compressed one. I suppose the DVD standart allows to have PCM audio in it, am I right?

    Read the article

  • Ruby on Rails 2.3.5: Populating my prod and devel database with data (migration or fixture?)

    - by randombits
    I need to populate my production database app with data in particular tables. This is before anyone ever even touches the application. This data would also be required in development mode as it's required for testing against. Fixtures are normally the way to go for testing data, but what's the "best practice" for Ruby on Rails to ship this data to the live database also upon db creation? ultimately this is a two part question I suppose. 1) What's the best way to load test data into my database for development, this will be roughly 1,000 items. Is it through a migration or through fixtures? The reason this is a different answer than the question below is that in development, there's certain fields in the tables that I'd like to make random. In production, these fields would all start with the same value of 0. 2) What's the best way to bootstrap a production db with live data I need in it, is this also through a migration or fixture? I think the answer is to seed as described here: http://lptf.blogspot.com/2009/09/seed-data-in-rails-234.html but I need a way to seed for development and seed for production. Also, why bother using Fixtures if seeding is available? When does one seed and when does one use fixtures?

    Read the article

  • emacs cedet set up doubt

    - by trybeingarun
    Hi, I installed cedet successfully today and got most of it working; thanks to Alex Ott's Gentle Introduction to Cedet. However i am having a problem When I give the exact path relative to the current file i am working on then auto-completion is working fine. #include "../../opensource/inc/lldp_port.h" void test_func() { lldp_port port; port.blah //here auto-completion worked fine } However i cannot specify the full path all the time( we have eclipse at office and it generates makefiles for us ) #include "lldp_port.h" void test_func() { lldp_port port; port. //here auto-completion does not work :( } What should i do to solve this?

    Read the article

  • How to do an alphnumeric sort in R

    - by cbare
    Is there an alphanumeric sort for R? Say I had a character vector like so: > seq.names <- c('abc21', 'abc2', 'abc1', 'abc01', 'abc4', 'abc201', '1b', '1a') I'd like to sort it aphanumerically, so I get back this: c('1a', '1b', 'abc1', 'abc01', 'abc2', 'abc4', 'abc21', 'abc201') Does this exist somewhere, or should I start coding? Thanks, -chris

    Read the article

  • WPF XAML ComboBox Width

    - by griegs
    I have the following xaml with all the binding removed; <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Left" Height="20"> <ComboBox x:Name="ddlDay" Width="30"/> If I set the width of the combobox to 200 it works but if I set it to 50 it doesn't size past the default. I'm kinda new to xaml so is this default behavior or what do I do to make the combobox small?

    Read the article

  • hook_form for multiple content types defined by the same module

    - by pao13gate
    A new module 'foo' implements foo_node_info() where one or more new content types can be defined. If foo_node_info() defines two content types, namely a content type 'footypea' and a content type 'footypeb', how does one go about implementing hook_form() (what should the name of the "hook" be?) to configure each node's editing form? In the drupal example, the name of the new content type is the same as the module name. What happens in the above described example where two new content types are defined by the module? Should the implemented hook_form() function be of the form: footypea_form() and footypeb_form() ? (this doesn't seem to work) Or should you implement a single foo_form() function and within this create and return an array $form with elements $form['footypea'] and $form['footypeb'] that are in turn arrays of the individual form field definitions?

    Read the article

  • How to verify that post to website is coming from a specific purchased iPhone application?

    - by wgpubs
    I have an iPhone application that posts data to a web application ... and I want to only accept data posted from an iPhone application that was purchased from the iTunes store. Is there a way to do this? Is there something (or somethings) I can pass from the iPhone app to the web application that I can use to do such verification? Thanks much btw, using the asihttprequest library to handle requests/responses.

    Read the article

  • Navigate to the Same Page After Action in JSF 2

    - by shipmaster
    I have a component done in JSF 1.x, this component has a command button as follows <h:commandButton ... action="#{templateController.next}" /> Where templateController was passed as an EL binding and can be any object that implements a certain interface. The generic implementation of next() was just executing code and then returning an empty string causing the same page to refresh: public String next() { ..... return ""; } Now I am trying to port that component to JSF 2, my problem is that an empty string doesn't cause the same page to refresh anymore, instead, the framework tries to redirect to a page called ".jsf" i.e it just appends .jsf to whatever the outcome is. My question is how to return an outcome that causes the current page to refresh. My component is generic and I don't know before hand the name of the page it is going to be used on. Thanks

    Read the article

  • Where can I collaborate with my friend on source code in real time?

    - by Carson Myers
    I mean, other than a conference room :) Using google docs, I can upload any kind of file and view it with other people, watch them edit it in real time, with a live chat happening in the same window. This is awesome. How can I do the same thing with source code? I'm looking for a web application where I can upload source files that will be displayed in some kind of editor, with syntax highlighting, and allow others to view it and edit it in real time. Preferably with a live chat also, but not necessary. Does anybody know where I can find this?

    Read the article

  • Include Files using Wildcard into a folder in Visual Studio

    - by quip
    I am using <ItemGroup> <EmbeddedResource Include="..\..\resources\hbm\*.hbm.xml" /> </ItemGroup> to include a bunch of xml files into my C# project. Works fine. But, I don't want them in the "root level" of my project, I would rather see them in a subfolder in my project. For example, this file is included into a Mapping folder in Visual Studio: <ItemGroup> <EmbeddedResource Include="Mapping\User.hbm.xml" /> </ItemGroup> That's what I want for my *.hbm.xml files. I can't figure out how to do it and still keep my wildcard *.hbm.xml part and also keep the actual files in a different directory. I've looked at MSDN's doc on MSBUILD and items, but no luck.

    Read the article

  • Uncaught exception while using xdebug

    - by rich97
    I'm not too great with xdebug so forgive me if this is a stupid question. But I installed it on a separate machine and it performed some magic for me like formating my var_dump() output and catching any uncaught exceptions. It also fails to format the stack traces, outputting plain text which is extremely hard to read. As I am learning the Lithium PHP Framework I am required to use php5.3, on my other machine I compiled from the source but on this machine I'm using the precompiled packages from dotdeb.org. As far as I can tell the only difference is that this is a slightly newer version of php and it comes with the Suhosin patch. The other odd thing is that the xdebug functions such as xdebug_var_dump() work, aside from poor formatting. This is an Ubuntu machine, so I don't know if it could be anything to do with the dotdep packages, but I have installed xdebug through pecl, the downloadable tarball and from the SVN repository. But to no avail. You can see my php.ini and output of php -i in the following gist. I copied php.ini from /etc/php5/apache2/php.ini over to /etc/php5/cli/php.ini so php -i should reflect my apache setup. http://gist.github.com/391675 Any help is appreciated. Rich

    Read the article

  • Authlogic Facebook Connect and cucumber

    - by jspooner
    I added the authlogic_facebook_connect plugin to my project and I'm now having problem running my cucumber test because of a NoMethodError. undefined method `set_facebook_session' for nil:NilClass (NoMethodError) In authlogic_facebook_connect/Session.rb the method "authenticating_with_facebook_connect?" is called as some sort of callback and the controller is defined but is missing the 'set_facebook_session' method. def authenticating_with_facebook_connect? controller.set_facebook_session attempted_record.nil? && errors.empty? && controller.facebook_session end I don't understand why the cucumber test is not loading the controller with this method. I also test the app in development and cucumber environments and everything works perfect. Here is the full cucumber output. Feature: Authentication In order to keep security a user should only be able to edit their own profile Background: # features/authorization.feature:4 Given a valid user record for joe_runner # features/step_definitions/user_steps.rb:4 undefined method `set_facebook_session' for nil:NilClass (NoMethodError) ./vendor/plugins/authlogic/lib/authlogic/controller_adapters/abstract_adapter.rb:63:in `send' ./vendor/plugins/authlogic/lib/authlogic/controller_adapters/abstract_adapter.rb:63:in `method_missing' ./vendor/plugins/authlogic_facebook_connect/lib/authlogic_facebook_connect/session.rb:132:in `authenticating_with_facebook_connect?' ./vendor/plugins/authlogic/lib/authlogic/session/callbacks.rb:83:in `validate' ./vendor/plugins/authlogic/lib/authlogic/session/validation.rb:64:in `valid?' ./vendor/plugins/authlogic/lib/authlogic/session/existence.rb:65:in `save' ./vendor/plugins/authlogic/lib/authlogic/session/existence.rb:30:in `create' ./vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb:113:in `create_session' ./vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb:103:in `maintain_sessions' ./features/step_definitions/user_steps.rb:5:in `/^a valid user record for ([\w]*)$/' features/authorization.feature:5:in `Given a valid user record for joe_runner' Scenario: Jonathan can edit his profile but not other users profiles # features/authorization.feature:7 Given jonathan is logged in as an user # features/step_definitions/user_steps.rb:13 When I go to my user edit page # features/step_definitions/web_steps.rb:18 And I press "Update" # features/step_definitions/web_steps.rb:22 Then I should see "Account updated!" # features/step_definitions/web_steps.rb:142 When I go to joe_runner's user edit page # features/step_definitions/web_steps.rb:18 Then I should see "You do not allowed to access to view that page" # features/step_definitions/web_steps.rb:142 Failing Scenarios: cucumber features/authentication.feature:9 # Scenario: Signup cucumber features/authorization.feature:7 # Scenario: Jonathan can edit his profile but not other users profiles 2 scenarios (2 failed) 15 steps (2 failed, 13 skipped) 0m0.173s rake aborted! Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...] /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in `sh' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `call' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `sh' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in `ruby' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `ruby' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.4/lib/cucumber/rake/task.rb:68:in `run' /Library/Ruby/Gems/1.8/gems/cucumber-0.6.4/lib/cucumber/rake/task.rb:138:in `define_task' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 activespoon:base_project jspooner$ There are a couple of blogs that give examples on how to test facebook apps with cucumber but they didn't help because my error comes before these. http://opensoul.org/2009/3/6/testing-facebook-with-cucumber http://ryanbigg.com/2010/03/testing-facebook/

    Read the article

  • Call trace in Android

    - by DenMark
    I want to know how to do method tracing for Android applications. I mean, a sequence of calls on each object, not a stack trace. It's very similar to this question (Call trace in java), but on different platforms (jvm-PC vs dvm-Android). I have no control over the start arguments of dalvik, thus I cannot specify a java agent (or am I wrong here?). Is there another way to do method tracing? Thanks!

    Read the article

  • VB.NET: how to require CheckedListBox to have at least one item selected in WinForms

    - by Craig Johnston
    With the CheckListBox in VB.NET in VS2005, how would you make it compulsory that at least one item is selected? Can you select one of the items at design time to make it the default? EDIT: How can I make it so the last item the user tries to uncheck is the one that stays checked? So it's like the user tries to uncheck the only checked item but can't because it checks back straightaway.

    Read the article

  • JPA Cascade delete.

    - by Win Man
    Hi, I am new to JPA/Hibernate. Currently using EJB3, Hibernate/JPA. I have an inheritacnce structure as follows.. @Entity @DiscriminatorColumn(name = "form_type") @Inheritance(strategy = InheritanceType.JOINED) @GenericGenerator(name = "FORMS_SEQ", strategy = "sequence-identity", parameters = @Parameter(name = "sequence", value = "FORMS_SEQ")) @Table(name = "Forms") public abstract class Form{ //code for Form } @Entity @Table(name = "CREDIT_CARDS") @PrimaryKeyJoinColumn(name="CREDIT_CARD_ID") public class CreditCardForm extends Form { //Code for CreditCards. } When I add a row with save the rows are properly inserted into the parent and the child table. However when I try to delete I get an error - 10:19:35,465 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException: Removing a detached instance com.data.entities.form.financial.CreditCard#159? I am using a simple for loop to determine the inheritance type - CreditCard or DebitCard and then calling entityManager.remove(entity). What am I doing wrong? Code for delete.. for(Form content: contents){ if(content.getType()==Type.CREDIT_CARD){ creditCardService.delete((CreditCard)content); } Thanks. WM

    Read the article

  • python numpy roll with padding

    - by Marshall Ward
    I'd like to roll a 2D numpy in python, except that I'd like pad the ends with zeros rather than roll the data as if its periodic. Specifically, the following code import numpy as np x = np.array([[1, 2, 3],[4, 5, 6]]) np.roll(x,1,axis=1) returns array([[3, 1, 2],[6, 4, 5]]) but what I would prefer is array([[0, 1, 2], [0, 4, 5]]) I could do this with a few awkward touchups, but I'm hoping that there's a way to do it with fast built-in commands. Thanks

    Read the article

  • How can I make email template in Zend Framework?

    - by Billy
    I want to make email templates in Zend Framework. For example, <html> <body> Dear {$username$}, <br> This is a invitation email sent by your {$friend$}.<br> Regards,<br> Admin </body> </html> I want to make this file, get it in Zend framework, set those parameters (username, friend) and then send the email. How can I do that? Does Zend support this?

    Read the article

  • Python script run via cron does not execute occassionally

    - by gcorne
    I have a simple python script for fetching tweets and caching them to disk that is configured to run every two minutes via cron. */2 * * * * (date ; /usr/bin/python /path/get_tweets.py) >> /path/log/get_tweets.log 2>&1 The script runs successfully most of the time. However, every so often the script doesn't execute. In addition to other logging, I added a simple print statement above the meat of the script and nothing except the output from the initial date command makes it to the log. #!/usr/bin/python # Script for fetching tweets and then storing them as an HTML snippet for inclusion using SSI print "Starting get_tweets.py" Any ideas? The system is a VPS running Centos 5.3 with python 2.4.

    Read the article

  • html select execute javascript onload

    - by portoalet
    I am using HTML select onchange event to fire another javascript function func1. This html select is written into a form element, which are dynamically generated when users click on a button. The problem is how can I fire the javascript func1 when the dynamically generated form is first shown ? I am thinking of something along the line of on_first_show event for form ? Here is the snippet. I couldnt get the alert('don') to work either (the one just after div) var sPopupContents = "<div ><script type='text/javascript'>alert('don');</script> </div>"; // this javascript is not executed ? I cant get the alert. sPopupContents += "<form name='theform' >"; sPopupContents += "<select name='theselect' onchange='alert(2);"; sPopupContents += "func1()>'"; sPopupContents += "<option value='0' selected='selected'>Value1</option><option value='1'>Value2</option><br/>"; sPopupContents += "</form>";

    Read the article

  • Rows and Column of Excel File

    - by Mark
    It is possible to write a code that specifying the rows and column of spread sheet in terms of NUMBERS and NOT LIKE (B2:D6) Example: excelSheet.Range("B2:D6").Interior.Color = RGB(100, 100, 255) instead of B2 and D6 I want to write 5 rows and 3 column.. It is posible to write in vb.net 2003 code?

    Read the article

  • rails convert string to number

    - by Yang
    hi guys, i am wondering is there a convenient function in rails to convert string with negative signs into a number. e.g. -1005.32 when i use to_f method, the number will simply become 1005 with the negative sign and decimal part being ignored. thanks in advance!

    Read the article

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