Displaying 20 results from an estimated 10000 matches similar to: "cleaning a string and encoding problem"
2007 Oct 08
6
stub actions that depend on the parameter
Hi,
I''m pretty new to all related to bdd and rspec and I have the following
question. Is it possible to stub actions that return different objects
depending on the parameteres they were called with? Something like this:
MyClass.stub!(:method).with(1).and_return(@mock_object_1)
MyClass.stub!(:method).with(2).and_return(@mock_object_2)
I know I could use
2006 Jan 01
4
rails under windows and mysql make webrick unstable
hi, I have installed ruby and rails under windows(exactly this one:
http://rubyforge.org/frs/download.php/4174/ruby182-15.exe that
includes rubygems)
the thing is that while trying to install the mysql gem, it seemd to
try to build the native extension, so I finally added a compiled
version that I found in http://dema.ruby.com.br/
the problem is that webrick behaves quite unstable while
2013 Nov 26
2
Xen private network across multiple physical servers
Hi,
I would like to configure a Xen private network where the guests use
private addresses. So far I have setup the Dom0 instances and the vm''s can
access to the other guests inside the same server.
Now my question is how can the guests reach the other guests that are
located in other physical servers.
Here is a diagram of how the network looks:
2006 Jan 01
5
scaffold not working on Windows XP
Hello,
I did a fresh install of ruby182 and gem rails --include-dependencies
Now when I do:
rails receipts
cd receipts
ruby script\generate scaffold receipt receipt
rails does not create the views or controller.
What can I do?
Thanks
Frank
2008 Oct 16
2
rails and security
Hi,
I am wondering if there is a way to secure rails application logs ?
My issue is that I discovered that form parameters are shown in clear in
the logs. So when users are authenticating, you see the login and
password in clear
Processing LoginController#index (for xxxxx at 2008-10-16 11:22:43)
[POST]
Session ID: 8cb95e2e50332added5715eff9e84938
Parameters:
2006 Mar 16
3
Passing function names from string variables
This may be a more generic Ruby question, so I''m going to ask on the Ruby
forum, but I''m trying to figure out if there is a way to pass in the string
value of a variable as the name of a method.
For example, I would like to do something like:
def sort_obj_by_uid(objects,@attr)
@tmparray = Array.new
@tmphash = Hash.new
for object in @objects
if !
2010 Oct 25
0
[PATCH node] add network.py script
---
scripts/network.py | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 207 insertions(+), 0 deletions(-)
create mode 100644 scripts/network.py
diff --git a/scripts/network.py b/scripts/network.py
new file mode 100644
index 0000000..28e32f2
--- /dev/null
+++ b/scripts/network.py
@@ -0,0 +1,207 @@
+#!/usr/bin/python
+
+from ovirtfunctions import *
+import tempfile
2011 Jul 18
0
[PATCH] fix ipv6 switch to disabled
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
scripts/network.py | 8 ++++++--
scripts/ovirt-config-setup.py | 15 +++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/scripts/network.py b/scripts/network.py
index fd78877..8159283 100644
--- a/scripts/network.py
+++ b/scripts/network.py
@@ -78,7 +78,6 @@ class Network:
2010 Jun 24
1
how can I evaluate a formula passed as a string?
Hey everyone,
I've been using 'R' long enough that I should have some idea of what the
heck either expression() or eval() are really ever useful for. I come
across another instance where I WISH they would be useful, but I cannot get
them to work.
Here is the crux of what I would like to do:
presume df looks like this
A B C
=== === ===
M 45 0
M
2011 Jul 20
0
[PATCH] fix ipv4 static/dhcp/disabled networking changes
This fixes networking changes when switching from dhcp/static to disabled. Before the ifcfg scripts would contain old values from the previous configuration. Support for disabled devices is now added and some useless remnant bash->python coding cleaned up
---
scripts/network.py | 45 +++++++++++++++++++---------------------
scripts/ovirt-config-setup.py | 34
2013 Jul 09
2
OCZ Vertex4 quirks
Same as its brothers/sisters, it's optimized for 4 KB blocks.
/*
* OCZ Vertex 4 SSDs
* 4k optimized
*/
{ T_DIRECT, SIP_MEDIA_FIXED, "ATA", "OCZ_VERTEX4*", "*"},
/*quirks/DA_Q_4K
Borja.
2010 Mar 25
1
Icalendar::UnknownPropertyMethod: Unknown property type: on Parsing a ical file
I downloaded the ics from
http://www.thegreenerleithsocial.org/events/cleanup-the-cycle-path and
tried to parse it in my rails app console:
?> cal_file = File.open("/tmp/Clean_up the Cycle Path-1.ics")
=> #<File:/tmp/Clean_up the Cycle Path-1.ics>
>> cals = Icalendar.parse(cal_file)
Icalendar::UnknownPropertyMethod: Unknown property type: website
from
2010 Oct 26
0
[PATCH node] add install.py
---
scripts/install.py | 247 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 247 insertions(+), 0 deletions(-)
create mode 100755 scripts/install.py
diff --git a/scripts/install.py b/scripts/install.py
new file mode 100755
index 0000000..ddffb53
--- /dev/null
+++ b/scripts/install.py
@@ -0,0 +1,247 @@
+#!/usr/bin/python
+#
+# install.py - configure local boot/root disk
2013 Jan 06
1
[PATCH] menugen: Make it compatible with Py3k
Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
---
com32/cmenu/menugen.py | 56 +++++++++++++++++++++++++-------------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/com32/cmenu/menugen.py b/com32/cmenu/menugen.py
index 70ec1f8..da64d93 100644
--- a/com32/cmenu/menugen.py
+++ b/com32/cmenu/menugen.py
@@ -72,9 +72,9 @@ class Menusystem:
2012 Feb 24
0
Use of .C and .Call
Hi All,
The Writing R-extensions document says this on whether I should prefer
.C or .Call:
"Before you decide to use .Call or .External, you should look at other
alternatives.
First, consider working in interpreted R code; if this is fast enough, this
is normally the
best option. You should also see if using .C is enough. If the task to be
performed in C is
simple enough requiring no
2009 Oct 06
1
[PATCH] Fix refreshing vms list This patch fix vms index view when a smart pool is not destroyed correctly.
Signed-off-by: Loiseleur Michel <mloiseleur at linagora.com>
---
app/models/smart_pool.rb | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/app/models/smart_pool.rb b/app/models/smart_pool.rb
index 1f718a8..9afc354 100644
--- a/app/models/smart_pool.rb
+++ b/app/models/smart_pool.rb
@@ -62,18 +62,16 @@ class SmartPool < Pool
if nested_pools
2010 Mar 22
2
ActiveMerchant, Authorize.net and Email Receipts
I''ve posted this on RailsForum.com and in the ActiveMerchant talk
group, and haven''t received an answer, so I figure I''ll try here.
Hello. I''ve been searching for information on this for a while, but my
google fu is evidently weak--hardly anyone even talks about email
receipts re: ActiveMerchant, much less my specific problem.
In any case, I have a client whose
2005 Feb 04
1
*, BeroNet BN4S0 and misdn - problems
Hi,
i use an BN4S0 with misdn an asterisk on Linux 2.6.9. The hfcmulti module
is loaded with option:
type=0x04 protocol=0x2,0x2,0x22,0x2 layermask=0xf,0xf,0xf,0xf
and the fourth port is connected to an ISDN PTMP (MSN) port.
Call to #72 from S0 (BN port 4) are not accepted from asterisk but why ?
Can anyone give me a hint ??
misdn debug messages follows:
lib: NEW_CR Ind with l3id:80001
2007 Feb 20
1
error message for record not found ?
I''m using backgroundrb for session management and deletion of visitor-entered information when a session is abandoned. The visitor can either click a button to end their session and remove their data, or backgroundrb will do it for them after 5 minutes of inactivity.
Everything''s working fine, I think. If the visitor explicitly logs out, then when the worker checks for their
2006 May 10
0
Ezra''s acl_system2 and flash not getting populated in functional tests
Hi all,
I am using the LoginGenerator and Ezra''s acl_system2 to protect
certain actions in my controllers. I have written some functional
tests to check for correct handling of redirects, flashes, etc. The
flashes however only get populated on the first get action in any
given test. Here is what I have so far:
In the controller:
class PageController < AC
before_filter