similar to: Need a bit help on "module_function" method

Displaying 20 results from an estimated 3000 matches similar to: "Need a bit help on "module_function" method"

2011 Mar 03
1
Does RSpec interfere with Pathname#dirname or Pathname#realpath ?
Hi, I starting a new project, and have run into behavior I cannot replicate in irb, (i.e. outside of using rspec) when the directory? returns true, so I thought I''d ask here, in case any one has seen this badhavior. ruby-1.9.2-p136 rspec (2.5.0) rspec-core (2.5.1) rspec-expectations (2.5.0) rspec-mocks (2.5.0) When I try to run this spec: require Pathname(__FILE__).ascend { |d|
2013 Feb 03
4
Create a helper for models and views?
Hi! If I have a method that is useful in both models and in views, where would be the appropriate place to put it? The method in question just takes two dates as strings, tries to parse them and returns all dates in the range between them. It also takes care of the issues when the dates are badly formatted etc etc.. This method is being used in several models (so a simple class method in
2018 Mar 16
3
cat(fill=N)
Hi all, I expect I'm getting something wrong, but cat("foo bar baz foo bar baz foo bar baz", fill = 10) should be broken into lines of width 10, whereas I get: > cat("foo bar baz foo bar baz foo bar baz", fill = 10) foo bar baz foo bar baz foo bar baz This is on R 3.4.3, but I don't see mentions of it fixed in 3.4.4 or r-devel NEWS. Cheers, David
2014 Jun 02
3
[LLVMdev] -fvisibility=hidden, and typeinfo, and type-erasure
[Was initially posted on cfe-users, sorry.] Hi, I'm sorry my message is quite long, the TL;DR version is "g++ and clang++ seem to have different opinions on how RTTI, templates, and ELF visibility should interact". I can't tell whether this is a bug or not: I have found no relevant documentation that could help me decide whether this behavior is meant, or not. All I can say
2010 Jan 16
0
Extending instance-methods of an Module for Plugin-Development
Don''t know if i should write this to rails or ruby mailinglist. But in the case i wan''t to extend the facebooker-plugin without touching it, i will here. 1. Instance-Methods of modules? The methods in a module may be instance methods or module methods. Instance methods appear as methods in a class when the module is included, module methods do not. Conversely, module methods may
2007 May 23
2
Markdown generates invalid html for a list immediately followed by a quote
Howdy, [Please preserve the CC to 424919-forwarded at bugs.debian.org on any replies.] The following bug in Markdown was reported to the Debian bug tracking system. In short, running both the released version of Markdown and the latest beta on * foo > bar > baz produces invalid HTML. ----- Forwarded message from Joey Hess <joeyh at debian.org> ----- From: Joey Hess <joeyh
2007 Dec 24
2
Build a cmdline for exec from optional parameters
How can I do this?: foo { name: $bar => "frob" } define foo( $bar = false, $baz = false ) { if #$bar and $baz both defined $cmd = "frobnicate --bar=$bar --baz=$baz ${name}" else if #$bar defined $cmd = "frobnicate --bar=$bar ${name}" else if #$baz defined $cmd = "frobnicate --baz=$baz ${name}" else
2008 Jun 04
3
how to automatically create objects with names from a string list?
Suppose I have a string of objects names: name <- c("foo", "bar", "baz") and I would like to use a for loop to automatically create three objects called "foo", "bar" and "baz" accordingly. Then how can this be done" (so that in the workspace, foo = 1, bar = 2 and baz=3) for (i in name) { ..... } Thanks! Mark
2009 Jul 26
1
Need help of exclusion options in rsync-3.0.6
Hi, I have a situation where I want to delete some of my excluded patterns but still want to preserve some other. For example consider below source and destination directory hierarchy. Source Dest ---------- --------- /foo/bar/ /foo/bar/ | -> baz | -> baz | -> xyz | -> xyz | ->
2017 Jan 08
2
IRC question about ?foo etc
14:50 < cbosdonnat> pino|work, do you know how I could get ?tar passed from one function to the other in the checksum code? 14:51 < pino|work> cbosdonnat: pass it as it is, ie ?foo 14:52 < cbosdonnat> pino|work, indeed, works better... I didn't know I could use the ? in the calling function and I used the ~ instead 14:53 < pino|work> ? is handled like an option type
2006 May 02
2
Bug: invalid nesting of inline markup across link labels
Hi John, there?s a bug in Markdown.pl: [foo*bar](#) [baz*quux](#) This expands to the following: <p><a href="#">foo<em>bar</a> <a href="#">baz</em>quux</a></p> Those `*` should either be disregarded or the tags should nest correctly: 1. <p><a href="#">foo*bar</a> <a
2006 May 04
3
SQL like manipulations on data frames
Is there a cheat-sheet anywhere that describes how to do SQL-like manipulations on a data frame? My knowledge of R is rather limited. But from my experience it seems as though one can think of data frames as being similar to tables in a database: there are rows, columns, and values. Also, one can perform similar manipulations on a data frame as one can on a table. For example:
2016 Feb 18
5
RFC: Add guard intrinsics to LLVM
On Wed, Feb 17, 2016 at 8:53 PM, Philip Reames <listmail at philipreames.com> wrote: > I think you're jumping ahead a bit here. I'm not sure the semantics are > anywhere near as weird as you're framing them to be. :) I now think this weirdness actually does not have to do anything with guard_on or bail_to_interpeter, but it has to do with deopt bundles itself. Our
2008 Mar 07
4
n-levels of nested resources in REST?
Hi, I find it would be very convenient to nest resources in two levels, so a member is only sensible as a part of a club, and a fee pament is only sensible in the context of a club and a member. Is it possible to nest nested resources? How would the syntax be? I have tried just nesting the assignment in routes.rb, but failed to get it right What do ou think? Is it possible? /Fredrik --
2013 Jan 08
6
[LLVMdev] LTO "bug" and Clang warnings
After looking at the Livermore for a while, we found the issue that was causing LTO to produce a different result. Consider the code below [1]. setup() doesn't touch bar/baz, main() doesn't reference foo. LTO finds, correctly, that it can remove the setup(), but the result is different. The code is clearly wrong, but the compiler has no right to fix user's stupidity, even at that
2009 Jan 27
4
[LLVMdev] inline asm semantics: output constraint width smaller than input
Hi, > If yes then this doesnt look all that bad or invasive at first sight (if > the put_user() workaround can be expressed in a cleaner way), but in any > case it would be nice to hear an LLVM person's opinion about roughly when > this is going to be solved in LLVM itself. one thing that seems to be clear to everyone except me is... what are the semantics supposed to be? [My
2009 May 02
1
The --relative option on remote machine to source machine ???
Hi, I read below lines in rsync v3.0.5 for --relative option. if you used this command: rsync -av /foo/bar/baz.c remote:/tmp/ ... this would create a file named baz.c in /tmp/ on the remote machine. If instead you used rsync -avR /foo/bar/baz.c remote:/tmp/ then a file named /tmp/foo/bar/baz.c would be created on the remote machine, preserving its full path It is also possible to limit the
2007 Nov 08
3
Downloading a file into a directory that does not exist
Hello again, all: When downloading a file from the puppetmaster''s fileserver, like so: ==========SNIP========== define install_file ($mode = 0644, $owner = ''root'', $group = ''root'') { file { "${name}": source => [ "puppet://${puppetserver}/dist/files/${name}_${operatingsystem}",
2006 Jun 02
3
Where are the best AJAX examples?
Googling for this has not solved my problems. Is there a particular site that is recommened for its examples and tutorials on Rails'' AJAX capabilities? I know exactly what I want to do, just not how to do it, and am looking for some code to pore over. 1) I have a dropdown that represents the name of an image in a library. When the dropdown value is changed, I would like to refresh
2014 Aug 26
2
[LLVMdev] llvm-objdump
Hi Kev, I'm glad to hear llvm-objdump is getting attention. I'm unclear on how much output specialization one could (or should) do for ELF vs. Mach-O. If you're game, let's compare an example: $ cat labeltest.s .text foo: nop bar: bum: nop jmp bar jmp bum jmp baz nop baz: nop Assembling for x86 and llvm-objdump'ing, i get $ llvm-mc