Displaying 2 results from an estimated 2 matches for "this_filename".
2010 Jun 17
2
tempfile problem
...file("nahis", "/Library/WebServer/Documents/nahis/tmp"))
on a mac, or
> fname <- basename(tempfile("nahis", "/htdocs/nahis/tmp"))
on a FreeBSD system, as I need to be able to find the file from the web browser up to 24 hours later.
and then
> this_filename <- paste(fname, ".png", sep = "")
and saving the file as this_filename, hence the next call doesn't find it's own suggestion, and starts again.
Is there any alternative filenameing approach I can use to get around this? Do I need to manually scan and reject the name...
2011 Jul 21
0
Templates and self-knowledge
...nch of
defines sprinkled all over my manifests, all of which do the same thing:
bring a value into the ERB scope as a named variable.
Of course, it just now occurred to me that I can create a define like this:
> define smart_template($module, $mode = 0644, $args = undef) {
>>
>> $this_filename = $name
>>
>> $this_short_filename = inline_template("<%=
>>> this_filename.split(/\//)[-1] %>")
>>
>> $template_file = "${module}/${this_short_filename}.erb"
>>
>> file{$name:
>>
>> content => template(...