search for: dzone

Displaying 20 results from an estimated 25 matches for "dzone".

Did you mean: done
2007 Jan 09
6
rcov seg fault
Hi Trying to get rcov going (has been working), but with the following context and specs it fails. context ''/account POST with invalid attendee'' do controller_name :account setup do Attendee.stub!(:create!).and_raise(ActiveRecord::RecordInvalid.new( Attendee.new)) end specify ''should raise on create'' do Attendee.should_receive(:create!).with({
2007 Dec 06
8
Default value for country_select
Using Country_select how to have default valur set to United States. I have a select drop down in my Ui to display the Country names. But i need United tates to be selected as default value. I use country_select to populate the country names. This is how i use <%= f.country_select :country, :selected=>''United States'' %> i also tried <%= f.country_select :country,
2007 Dec 16
1
Unit test preperation with migrations
...understanding is that the ''test'' and ''test:units'' have the db:test:prepare pre-requisite which copies the schema from dev to the test database. I would prefer to use migrations to perform the building of the test schema, and I have tried ''http://snippets.dzone.com/posts/show/2031'' to use migration building. However, this still attempts to use ''dropdb'' and ''createdb'' commands when using the rake test. I know this is some kind of setup / registration problem, but I wanted confirmation that these kind of '...
2012 Dec 03
4
Unnecessary changes when creating facts.yaml
..."6" + processorthreadcount: "1" title: "mcollective::server" lsbdistcodename: Santiago mcollective_serverpackage: mcollective id: root At first I was thinking of just changing the template so that the the yaml output is sorted by key order (http://www.dzone.com/snippets/generating-yaml-hashes-sorted) but is this expected behaviour? Is there a better way to solve this problem? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com...
2009 Apr 24
4
Long string in crypting
I use a solution to crypt a string that I found using OpenSSL. But the crypted string becomes very long, too long for a varchar 255 to hold it. What can I do to make it shorter? Or should I just use text as column in the mysql db? public_key_file = ''lib/public.pem'' public_key = OpenSSL::PKey::RSA.new(File.read(public_key_file)) @encrypted_string =
2008 Dec 08
4
Removing string's accents
Hi, I''m pretty sure to have seen a new method ''remove_accents'' in Rails 2.2 but I can''t find it again. Is it me or does this method exists for good ? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2007 Nov 03
3
Birthdate validation
Hello everyone, I''m almost cracking my head trying to do this birthdate validation. It turns out that I can only accept users with at least 18 years old and I''m trying to validate it writing this code on my user.rb fil at app/ models class User < ActiveRecord::Base validates_presence_of :full_name validates_presence_of :street_address validates_presence_of :city
2014 Jan 06
5
[LLVMdev] LLVM Weekly - #1, Jan 6th 2014
...dy in a good state, but Mikael is inviting review or contributions, particularly from those who implement frontends of higher level languages targetting LLVM IR. Andrew Wilkins writes about recent changes to llgo, a Go frontend for LLVM. <http://blog.awilkins.id.au/2014/01/llgo-on-ssa.html> DZone predicts the end of the GNU gcc era <http://java.dzone.com/articles/2014-look-magic-crystal-ball> Phoronix published a series of benchmarks comparing Clang 3.4 performance against GCC 4.9 <http://www.phoronix.com/scan.php?page=article&item=llvm34_gcc49_compilers&num=1> ## On t...
2009 Sep 09
5
Newbie question: undefined method 'number_with_delimiter'(probably configuration problem)
Hi all: i am using gem to insall rails 2.3.3 and using $rails myapp to generate my application, but strangely i can''t use the number_helper below is my env: export RUBY_HOME=$HOME/ruby export GEM_HOME=$HOME/gems export RUBYLIB=$RUBY_HOME/lib:$RUBY_HOME/lib/ruby:$RUBY_HOME/lib/ site_ruby/1.8 export PATH=$HOME/gems/bin:$HOME/ruby/bin: and: $ locate number_helper.rb
2014 Mar 10
2
opus-tool installation guide
...6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso 2) download and install virtualbox: https://www.virtualbox.org/wiki/Downloads 3) create a centOS virtual-machine using the ISO file from the previous step. ??Before doing the install, point the CD device to the ISO file. reference: ?http://architects.dzone.com/articles/centos-minimal-installation 4) [optional] modify the ifcfg-etho file: vi /etc/sysconfig/network-scripts/ifcfg-eth0 change: ONBOOT=no to: ??ONBOOT=yes 5) manually start the network: /etc/init.d/network restart 6) get this virtual-machine current: ??yum ?--assumeyes ?update ; ???##...
2007 Aug 25
2
insert HTML <select> value into a textarea - Works in IE6, not in FireFox or Opera
...alue); var textArea=document.getElementById(targetTextArea); textArea.appendChild(txtNode); is ? 2) Should I be using some other way of accessing the textarea other than the "appendChild" method? Any other ideas appreciated. Mike ============================== http://snippets.dzone.com/posts/show/4465 ======= This code DOES work in I.E6 (on my machine (XP pro), but doesn''t work in Firefox 1.5.0.12 or Opera 9.0.2 The idea is to be able to either type into a text area directly or choose from a list of saved words in the select box. When a new choice is made from the s...
2018 Nov 29
0
Solr: URI Too Long
Hi, i'm quite often getting this error: Error: fts_solr: Lookup failed: 414 URI Too Long Most web servers are limiting URI length to 8192 characters. Why not to use POST instead of GET when communicating with Solr? Solr is able to handle this ok, also see: https://dzone.com/articles/solr-select-query-get-vs-post azur
2007 May 10
2
Dynamic counter?
Hi, In a form I have a text area T and a disable text field C (for counter). C must show dynamically how many characters have been typed in T. Should I go in for a Javascript solution (or Ajax) or is there any other way? Thanks, Ram. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2007 Jul 31
1
check all - check box problem
I am not able to create a check box or a button that can check and uncheckall the check boxes that i have created. It can be a check box or button that checks and unchecks all the check boxes. <form name="czar" action=''<%= url_for(:action => "list_supplier") %>'' method=''POST''> <% i = 0 %> <% @hotels.each do |hotel|
2007 Aug 06
1
Question Possibility.
Hi everyone i am new to the rails and enjoying what this framework has to offer. And I have a job interview comming up as rails developer. I have passed the 1st stage which was theory and I was wondering if you could give me some potential coding exercise that might come in the interview. for instance loops ? related to ORM and anything else you can think of. -- Posted via
2008 Mar 03
0
A kind of monkey patch and an invitation for criticism for all you (who know this stuff better than I do)
I''ve often felt the need including Rails'' view helpers within my controllers, if only for some simple things like formatting my flash notices with text helpers or html escaping. I loved this suggestion, which helps by not cluttering the namespace of controllers: http://snippets.dzone.com/posts/show/1799 But I wanted to generalize this a little to automatically include whatever helper modules are included in the views. So I dreamt up 35 lines of goodness: class Object def metaclass; class << self; self; end; end end module ActionController class Base class_inher...
2009 Jan 22
2
how to make a soundex method in
I am working with a table in my database where I am looking through every record to see if it matches with every other record in that same table to see if its a soundex match or not I want to define a method where I can call it as a true or false statement like: onerecord.soundex(otherrecord) = true or false and be able to run the code below based on if its true or false -- Posted via
2008 May 24
2
test:prepare failure with enum columns
...y. The error occured while evaluating nil.[] After some search I learned that the schema dump cannot handle e.g. enum columns. There is an old ticket #2379 about it but it seems not to have been implemented in 2.0. ( I am using a Imac and textmate) I also found another solution (http://snippets.dzone.com/posts/show/2031) using a rake file that I called test_prepare.rake and put in lib/tasks/test_prepare.rake, but when I used the rake command I got the message Don''t know how to build task ''test_prepare'' The question is now how to create a test database?? When I tried...
2008 Apr 19
3
How to find nil object error in the rails application?
After I added some plugins to rails my application it begin to give following error. Error during failsafe response: You have a nil object when you didn''t expect it! The error occurred while evaluating nil.symbolize_keys (originally You have a nil object when you didn''t expect it! The error occurred while evaluating nil.symbolize_keys) But there is no stack trace I dont
2008 May 21
5
Recieve email from gmail using POP3
can someone help me out with this folder... im stuck and i cant trouble shoot where is the error thx alot~~~ Attachments: http://www.ruby-forum.com/attachment/1982/mail4.zip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to