search for: dosometh

Displaying 20 results from an estimated 70 matches for "dosometh".

2006 Jan 29
2
GetText and rjs templates?
hi, is it possible that gettext don''t work with rjs templates? i''ve just tried this simple example blog_controller.rb : class BlogController < ApplicationController def index end def dosomething end end index.rhtml : <html> <head> <%= javascript_include_tag :defaults %> </head> <body> <div id="test">Some text to change </div> <%= link_to_remote ''click'', :url => {:action => ''dosomething''}...
2019 Jul 12
3
RFC: changing variable naming rules in LLVM codebase
...LVM's `/*foo=*/`-style comment to annotate function arguments need > to be handled automatically to make the tool scalable. So is the > doxygen @parameter. This is a bit of a side note, but in my own work I've more recently tried to move from this style: foo.h int foo(int a, bool doSomething); foo.cpp x = foo(a, /*doSomething=*/true); y = foo(a, /*doSomething=*/false); to something like: foo.h inline constexpr DoDoSomething = true; inline constexpr DontDoSomething = false; int foo(int a, bool doSomething); foo.cpp x = foo(a, DoDoSomething); y = foo(a, DontDoSomething); On...
2004 Jul 17
3
chan_capi: sending incoming calls to different contexts
Hello, I am using chan_capi and would like * to behave differently depending on the MSN the caller dials. Is there a way to route incoming ISDN calls to different contexts based on the MSN dailled? I have tried something like msn=1234 incomingmsn=1234 context=msn1 msn=4567 incomingmsn=4567 context=msn2 in capi.conf but with no results. Thanks for any hints. -Walter -- Walter Doerr
2008 Feb 29
1
Optional data argument for a function
...is called the parent frame from which the function was called. I looked at the source code for lm() (and similar functions) and the documentation of ?eval, but I just can't quite figure out how to make this work. So, for a simple example, suppose I want to do this with the following function: dosomething <- function(x, data) { temp <- x^2 + 5 return(temp) } How does the function need to be changed, so that dosomething(somevariable, data=somedataframe) will find somevariable within the dataframe somedataframe and if dosomething(somevariable) is called, the function should find somevariab...
2019 Jul 12
2
RFC: changing variable naming rules in LLVM codebase
...unction arguments need > > to be handled automatically to make the tool scalable. So is the > > doxygen @parameter. > > This is a bit of a side note, but in my own work I've more recently > tried to move from this style: > > foo.h > > int foo(int a, bool doSomething); > > foo.cpp > > x = foo(a, /*doSomething=*/true); > y = foo(a, /*doSomething=*/false); > > to something like: > > foo.h > > inline constexpr DoDoSomething = true; > inline constexpr DontDoSomething = false; > > int foo(int a, bool doSomething...
2008 Sep 17
1
Dealing with missing EOL at end of file
Colleagues, I am using R 2.7.2 on all three platforms (OS X; Windows; Linux) and I have encountered the following problem: I use R to issue a system call the execute a command in the OS. For example: system("DOSOMETHING TOSOMEFILE") In most situations, this task completes successfully and control returns to R. However, in rare situations, the target file (TOSOMEFILE) is missing an EOL character in its final line. In that situation, the task DOSOMETHING hangs and control never returns to R. Exit...
2013 Sep 24
0
[LLVMdev] LLD: Returning true on success
...functions, we return true to indicate success and false to > indicate failure. The inconsistency is confusing, and fixing it should > improve code readability. > > Note that some places in LLVM use false to indicate success, not sure how widespread this is. Personally I think that { if (doSomething()) } means if doSomething succeeded, and thus agree with you. However, I think this is something that needs to be consistent across all of LLVM and should be in the coding standard. - Michael Spencer -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://list...
2018 Aug 09
3
WishList: Remove Generic Arguments
...has been raised before. I really like object oriented S3 programming. However, there's one feature of object oriented S3 programming that I don't like. Generic functions can have arguments other than dots. Lets say you have an R package with something like: print.myfunction (f, ...) { dosomething (f, ...) } Noting that I use function objects a lot. R CMD check will generate a warning because you've named your object f rather than x. I don't want to name my object x. I want to name my object f. Naming the object x makes the program unreadable. Especially if f contains an attrib...
2019 May 27
1
"if" function in pure R?
Thanks a lot Jiefei, I had thought of defining a binary operator (inspired by pipes) or simply using an additional condition in the if() calls [e.g. if(foo & fn(bar)) doSomeThing; with fn(bar) returning a logical], but both are workaround that I do not find as elegant as a proper control-flow construct. Thus two questions remain: - is it possible to create a control-flow construct in pure R? - if yes, how? Anyone with more insights? Thanks On Mon, 27 May 2019 at 04:27...
2012 Jul 31
3
Access @resouce in custom type
...to make some decisions on parameters based on other parameters that may have already been set. For example, --- newparam(:param1) do Puppet.debug "Found drivesperarray parameter" desc "parameter 1" validate do |value| if resource[:otherparam] then #dosomething else resource[:param1] = 0 end end Puppet.debug "Parameter 1 is: #{@resource[:param1]}" end --- But I keep getting messages like "undefined method `[]'' for nil:NilClass" Anyone have experience with this? I''ve tried searching...
2013 Sep 24
5
[LLVMdev] LLD: Returning true on success
Hi LLD developers, I'm about to make a change to invert the return value of Driver::parse() to return true on success. Currently it returns false on success. In many other functions, we return true to indicate success and false to indicate failure. The inconsistency is confusing, and fixing it should improve code readability. -------------- next part -------------- An HTML attachment was
2012 Dec 20
2
Filling Lists or Arrays of variable dimensions
...ameters and want to produce results for all combinations of those: height<-c("high","low") width<-c("slim","wide") then what i used to do was something like this: l<-list() for(h in height){ l[[h]]<-list() for(w in width){ l[[h]][[w]] <- doSomething() } } Now those parameters aren't always the same. Their number can change and the number of entries can change, and i'd like to have one code that can handle all configurations. Now i thought i could use expand.grid() to get all configurations ,and than iterate over the rows, but the...
2011 Apr 30
1
Reference Classes: Accessing methods via [[...]], bug?
I've been trying to use methods for reference classes via the notation "[[...]]" (X[["doSomething"]] rather than X$doSomething), but it failed to work. However, I did find that if you use the usual "$" notation first, "[[...]]" can be used afterwards. The following simple example illustrates the point: > setRefClass("Number", + fields = list(+ valu...
2013 Sep 24
3
[LLVMdev] LLD: Returning true on success
...er functions, we return true to indicate success and false to indicate failure. The inconsistency is confusing, and fixing it should improve code readability. > > > Note that some places in LLVM use false to indicate success, not sure how widespread this is. Personally I think that { if (doSomething()) } means if doSomething succeeded, and thus agree with you. However, I think this is something that needs to be consistent across all of LLVM and should be in the coding standard. StringRef::getAsInteger() is an example documented to return true if there was an error parsing the string. Ma...
2019 May 26
2
"if" function in pure R?
Hi all, Could anyone refer to me to a good source to learn how to program a simple control-flow construct* in R, or provide me with a simple example? Control-flow constructs are programmed as primitives, but I would like to be able to do that (if possible) in pure R. The general context is that those functions are a mystery to me. The motivating example is that I would like to create a function
2006 May 02
5
How to call a javascript function from rails view?
Is there a way to call a javascript function from within a rails view? I can''t use the onLoad javascript method inside the <body> tag because I don''t have control over the body tag, it''s in my header. There are several rss feed reading functions that are in the page and I would like to call those functions while the page is being loaded or once it''s
2014 Nov 04
10
[LLVMdev] lifetime.start/end clarification
...marked alive - this is an unexpected situation I think this ambiguity should be cleared in the LRM, because today's implicit assumption may be broken at any time. This is not a theoretical question: clang can generate such cases. For example, the following testcase: struct X { void doSomething(); char b[33]; }; void bar(X &); void baz(); void test(int i) { if (i==9) { X x; x.doSomething(); label: bar(x); } else { baz(); if (i==0) goto label; } } Produces: %struct.X = type { [33 x i8] } define void @_Z4testi(i32 %i...
2013 Sep 24
2
[LLVMdev] LLD: Returning true on success
..., we return true to indicate success and false to indicate failure. The inconsistency is confusing, and fixing it should improve code readability. >> >> >> Note that some places in LLVM use false to indicate success, not sure how widespread this is. Personally I think that { if (doSomething()) } means if doSomething succeeded, and thus agree with you. However, I think this is something that needs to be consistent across all of LLVM and should be in the coding standard. > > StringRef::getAsInteger() is an example documented to return true if there was an error parsing the str...
2005 Jan 25
0
Goto invalid extension doesn't go to 'I' when in a macro.
...of a problem here which I'd appreciate some thoughts on. (please excuse the stray capital letters - Outlook has a habit of capitalising where I don't want it to!) For various reasons, I need to be able to do the following: --------------8<-------------- [default] Exten => s,1,Macro(dosomething,9999) Exten => s,2,NoOp(Returned) [macro-dosomething] Exten => s,1,Goto(${ARG1},1) Exten => _[123]XXX,1,NoOp(Success) Exten => I,1,NoOp(Failure) --------------8<-------------- Which should allow me to trap an invalid entry from the caller. If ${ARG1} contains, say, 2000, it a...
2011 Sep 02
2
NUT 2.6.1+ Windows 2008 R2 - NOTIFYCMD not being called
...UTDOWN SYSLOG+EXEC NOTIFYFLAG REPLBATT SYSLOG+EXEC NOTIFYFLAG NOCOMM SYSLOG+EXEC NOTIFYFLAG NOPARENT SYSLOG+EXEC When a notify event occurs, such as when I pull the plug on the UPS, the appropriate message _is_ logged in the event logs, but the batch file is _not_ being called. Do I need to dosomething more to enable this? Thanks in advance, Ian Wells -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110902/3dae25c0/attachment.html>