search for: simplistically

Displaying 20 results from an estimated 556 matches for "simplistically".

2007 Dec 13
8
stub with assigns?
is there a way to stub a method that sets an instance variable, so the stub sets it too? def find_foo @foo = Foo.find(params[:id] end ... controller.stub!(:find_foo).and_assigns(:foo, "123") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071213/2042719f/attachment.html
2006 Apr 05
9
Is eval the only way?
Hi, I''m trying to write some methods which use a parameter to represent a Class name. A very simplistic example: def foo(class_name, conditions) x = class_name.find(:all, :conditions => "#{conditions}") end Unfortunately, this does not work. The only way around this problem that I can think of is to use eval: def foo(class_name, conditions) x = eval
2012 Jan 04
2
A simplistic parental-control setup
I am looking at the simplest (implementation-wise) solution to the following problem (on CentOS 6.2): I have a list of web addresses (like http://www.example.com, https://1.2.3.4/, etc.) that should be "forbidden" to access from a particular host. On access attempt, the browser should be redirected to a local web page (file on the hard disk) with the explanation that those addresses
2007 Nov 01
1
newbie: need to delete object in loop
Hi, sorry for this rather simplistic question, but I can''t think of a good way of googling the answer (just been trying for 20 mins). Anyway... so I have this rather simplistic piece of code: <% for artwork in @artworks %> <% if artwork.medium_id %> <% medium = Medium.find(artwork.medium_id) %> <% end %> <% if medium %> <p><%=
2007 Jul 03
7
CA migration
Anyone ever migrated the puppetca to a different host? What are the steps that are involved?
2009 Sep 28
4
Re ading Functions that are in a Vector
I am trying to write a function that will have an input of a vector of functions. Here is a simplistic example. sumstats <- c(mean,sd) sumstats[1] #Gives this error #> sumstats[1] #[[1]] #function (x, ...) #UseMethod("mean") #<environment: namespace:base> I thought about restricting the input to character variables such as the following sumstats2 <-
2000 Apr 12
6
Well done!
Great job! I'm considering converting all my mp3 files to Vorbis format. Only examples/encoder_example is a bit too simplistic (of course, being an example), and the cmdline tools aren't ready. I encode my mp3 files at 96 kbit/s, because that's enough for me. Will Vorbis do well at this rate? Any quick hacks I can make to examples/encoder_example.c? Perhaps Vorbis is of interest
2005 Jun 23
3
Automated YUM update kills DNS
We've got several CentOS 3.x systems running DNS that we keep updated automatically via YUM. Recently two of those systems (not all of them) when updating themselves to the latest versions of BIND, automatically replaced /etc/named.conf with a new one and saved the old one as /etc/named.conf.rpmsave. Which of course broke DNS for those servers. All servers got updated, but only two of
2003 Apr 24
3
Re: two computers set up ... now what?
*** Now you just need a "phone" or "station" (FXS) device and a method of connecting it. *** So... essentially I need to spend another $125 US on a Wildcard TDM400P so I can plug in an analog phone? On the X100P description it says: "The X100P supports FXS Loopstart and "Kewlstart" (Loopstart with far end disconnection supervision). It can detect ringing and
2020 Jul 19
6
Speed-up/Cache loadNamespace()
Dear all, in our current setting we have our packages stored on a (rather slow) network drive and need to invoke short R scripts (using RScript) in a timely manner. Most of the script's runtime is spent with package loading using library() (or loadNamespace to be precise). Is there a way to cache the package namespaces as listed in loadedNamespaces() and load them into memory before the
2005 Jul 19
2
Obtaining argument name within a function
Dear all How can I obtain the name of the argument passed in a function? Here is a simplistic example of what I would like to obtain: myfunction= function(name) { print(paste("The parameter name was",unknownFunction(name)) } myfunction(myobject) [1] "The parameter name was myobject" Thanks Francisco
2005 Nov 16
2
save to ascii
All, Usually when I save a variable I have ascii = FALSE since I usually load the variable via the load(variable) command and do not need to view the variable outside of R. When I set ascii = TRUE and view the variable outside of R in a text editor, I notice additional characters (starting w/ RDA2 ...) before the first actual value in the vector. Is there are way to save to ascii such that this
2008 Jun 10
2
Advanced testing tutorials on Web?
Everyone talks testing, but I don''t see much about it. I have been searching the web for about 5 hours and I can''t seem to find a good, advanced tutorial on the latest trends in testing. Everything is either outdated or very simplistic. Does anyone know where I might find good testing What are you using? Test::Unit Tess::Rails Selenium Something new that I don''t know
2006 Sep 06
2
deleting an arow added to a graphic
I know this has got to be simple, but I have a added an arrow to a graph with: arrows(5,8,8, predict(lmfit,data.frame(x=8)), length=0.1) but its in the wrong position, correcting it and running again adds an new arrow (which is what you would expect) so how do I a) edit the existing arrow, and b) delete it all together As so often seems to be the case, some of the simplist things seem also to
2006 Apr 12
2
Problems doing addition/subtraction with floats
Ok, I am sure this is a simplistic problem that I am just missing right now (maybe eyes are crossed??). However, I am trying to do simply math here. I have these variables initialized as follows: @amount_due = @amount_paid = @total_due = 0.0 I get @total_due and it is set to 1739.6 from the database. I then get @amount_paid and it is set to 1739.6 from the database. I then calculate the
2011 Oct 04
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
That should be fine. I don't believe the concern about performing a char-by-char conversion is valid; for example the NTFS-3G driver uses a simplistic upcase table and seems to work fine. I suspect Windows does the same. On Oct 3, 2011, at 1:12 PM, Nikola Smiljanic wrote: > How about this: > > for (int i = 0; i != NumWChars; ++i) > absPath[i] = std::tolower(absPath[i],
2007 Oct 12
2
Basic plot question: Figure 1.1 Pinheiro & Bates
All, Sorry for overly simplistic question, but I can't seem to remember how to create the basic plot shown in Figure 1.1 of Pinheiro & Bates (2004; p.4). The y-axis delineates a factor (Rail) while the x-axis displays the distribution of a continuous variable (time) according to each level of the factor. Didn't see it in archives but perhaps I'm not searching on correct key words,
2016 Nov 17
2
LLD: time to enable --threads by default
> Sounds like threading isn't beneficial much beyond the second CPU... > Maybe blindly creating one thread per core isn't the best plan... parallel.h is pretty simplistic at the moment. Currently it creates one per SMT. One per core and being lazy about it would probably be a good thing, but threading is already beneficial and improving parallel.h an welcome improvement. Cheers,
2002 Jun 14
3
[swat] won't run
The only docs I found on getting SWAT to run, showed editing the inetd.conf file. As this version of RH (7.3) only uses xinetd things don't fit exactly. I have gone through and did everything that one should do for inetd and it still will not work. I don't normally use the thing, but this client will need the more simplistic interface to add shares, etc.
2015 May 11
3
A question about CVE-2014-8242
Hi,everyone here: whether or not CVE-2014-8242 affects rsync? any commnet would be appreciated!! Yadi