Displaying 20 results from an estimated 20 matches for "dostuff".
2010 May 12
1
slot assignment in S4 classes
...use a special setter method [example 2 below] if I can assign data to a slot directly when I call new() [example 1 below]?
## first way to do it (the idiosyncratic way?)
setClass(Class = "TestClass", representation = representation(myDf = "data.frame"))
setGeneric(name = "doStuff", def = function(object, ...){standardGeneric("doStuff")})
setMethod(f = "doStuff",
signature = "TestClass",
definition = function(object, ...) {
return( object@myDf )
})
df_a <- data.frame(cbind(letters=letters, digits=runif(26)))
instance <- ne...
2011 Aug 25
1
Question about object permanence/marshalling
...ass="Test",
representation=representation(
amounts="data.frame"
)
)
setMethod(
f="initialize",
signature="Test",
definition=function(.Object, amounts){
.Object@amounts <- amounts
return(.Object)
}
)
setGeneric (
name="doStuff",
def=function(.Object){standardGeneric("doStuff")}
)
setMethod(
f = "doStuff",
signature = "Test",
definition=function(.Object) {
return(mean(.Object@amounts, na.rm=TRUE))
}
)
print( objects() )
instance <- new(Class="Test", data.f...
2013 Mar 27
1
Pattern matching repeating digits
...fied number of repeating digits? (Something similar to regular expressions' {})
Here's an example: let's say I have a string of things that need to be done for both extensions 233 and 255. I can either...
A) Repeat the exact same code for both extensions, like so:
exten => 233,1,DoStuff()
exten => 233,n,AndMoreStuff()
exten => 233,n,Dial(something)
exten => 255,1,DoStuff()
exten => 255,n,AndMoreStuff()
exten => 255,n,Dial(something)
...which is stupid, or...
B) I can attempt code reuse for similar cases (a Good Thing[tm]), and make as specific of a match as possi...
2010 Jul 21
1
fix()ing an S4 method
...used to edit normal functions. I would like to know whether it's also possible to use something similar to edit a method of an S4 class. In other words, is there a fix-like function that allows me to edit method definitions without having to go back to the source code?
setGeneric (name="doStuff",def = function(object){standardGeneric("doStuff")})
setClass("SomeClass", representation(text = "character"))
setMethod(f = "doStuff", signature ("SomeClass"), definition = function(object){
return(print(paste("***", object@text)...
2020 Jan 15
4
Finding callees of a function
I searched the doxygen documentation and could not find a solution to my
task:
In a ModulePass running at EP_OptimizerLast, if I have a function F like in:
bool Foo:runOnModule(Module &M) {
LLVMContext &C = M.getContext();
for (auto &F : M) {
// magic here
if I want to know from which function (callee) each function is called -
how can I do this?
(so that I e.g. have
2017 Jun 03
3
How the LLVM handle the debug location information of continue keyword and right brace(loop end location)?
Hi paulr:
Thanks for your kindly response. Maybe I don't describe my question cleanly, let me show more information. From my side, I notice that whether we are in the continue keyword mode or we are in the right brace mode, the target of br instruction is the same, i.e. for loop
Continue Keyword Mode:
; <label>:6: ; preds = %3
br label
2017 Jun 05
2
How the LLVM handle the debug location information of continue keyword and right brace(loop end location)?
...63.com]
Sent: Saturday, June 03, 2017 8:13 AM
To: Marcin Słowik
Cc: llvm-dev at lists.llvm.org; Robinson, Paul
Subject: Re:Re: Re: [llvm-dev] How the LLVM handle the debug location information of continue keyword and right brace(loop end location)?
If without any brace, the br should correspond to doStuff() in your case. However, maybe I don't list my concern and question very clearly, it is my mistake and I apologize for it.
Let me show you more details:
1.int main()
2.{
3. int i;
4.
5. for (i = 0; i < 256; i++) {
6. }
7.}
; <label>:6: ; preds...
2005 Jan 17
1
transfers with zap channel
...on channel 1
-- Started music on hold, class 'default', on Zap/3-1
-- Attempting native bridge of Zap/3-1 and Zap/1-1
-- Starting simple switch on 'Zap/1-2'
-- Started music on hold, class 'default', on Zap/3-1
== Parked Zap/3-1 on 701. Will timeout back to dostuff,7001,1 in 45 seconds
-- Added extension '701' priority 1 to parkedcalls
-- Playing 'digits/7' (language 'en')
-- Hungup 'Zap/1-1'
== Spawn extension (dostuff, 7001, 1) exited non-zero on 'Parked/Zap/3-1<ZOMBIE>'
-- Stopped music on hol...
2011 May 09
3
Lua.c32 - user input / scripting
I'm trying to get this bit of code to work with the lua.c32 interpreter:
--- sample, the goal is to build a script that will allow me to enter a 4digit
mt and load the bios iso accordingly
print ("enter machine type :")
mt = io.read()
print ("you entered...",mt)
doStuff()
if (mt == "8141") then
syslinux.run_command("memdisk initrd=/dos/BIOS/FSC-P7935-108.img raw")
end
--- the problem is that lua kicks out an error every time "...attempt to call
field 'read' ( a nil value)"
--- this seems to work on the interpreter i insta...
2017 Sep 07
5
RFC: Unify debug and optimized variable locations with llvm.dbg.addr [was: DW_OP_LLVM_memory]
...DIExpression on dbg.value to encode
this bit of information (address or value), we can encode it in the
intrinsic name.
This should handle both of the examples from the original RFC (
http://lists.llvm.org/pipermail/llvm-dev/2017-September/117141.html).
For this case:
int x = 42; // Can DSE
dostuff(x); // Can propagate 42
x = computation(); // Post-dominates `x = 42` store
escape(&x);
After DSE, we should get:
int x; // dbg.value(!"x", 42)
dostuff(42);
x = computation();
// dbg.addr(!"x", &x)
escape(&x);
The new capability illustrated here is t...
2001 Feb 02
1
test for end of file?
I want to read in text files, processing a line at a time in a while loop,
and exiting the loop when the entire file has been read. The files are too
large to suck in as a piece.
\
for example in :
while (line.I.just.read.in != end.of.file){
dostuff()
}
what is end.of.file?
or what would be the functional alternative to this little snippet?
thanks
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help"...
2017 Sep 05
7
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
...ways
remove it because the debugger will assume the variable lives in memory
unless it is told otherwise.
For the original problem of improving optimized debug info while avoiding
inaccurate information in the presence of dead store elimination, consider
this C example:
int x = 42; // Can DSE
dostuff(x); // Can propagate 42
x = computation(); // Post-dominates `x = 42` store
escape(&x);
We should be able to do this:
int x; // eliminate `x = 42` store
dbg.value(!x, 42, !DIExpression()) // mark x as the constant 42 in debug
info
dostuff(42); // propagate 42
dbg.value(!x, &x,...
2017 Sep 06
2
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
...ways remove it because the debugger will assume the variable lives in memory unless it is told otherwise.
For the original problem of improving optimized debug info while avoiding inaccurate information in the presence of dead store elimination, consider this C example:
int x = 42; // Can DSE
dostuff(x); // Can propagate 42
x = computation(); // Post-dominates `x = 42` store
escape(&x);
We should be able to do this:
int x; // eliminate `x = 42` store
dbg.value(!x, 42, !DIExpression()) // mark x as the constant 42 in debug info
dostuff(42); // propagate 42
dbg.value(!x, &x,...
2008 Jul 30
6
Refreshonly question
Does anyone have a technique for performing an exec the first time
puppetd runs but then reverting to refreshonly => true state for
subsequent runs?
The basic idea is:
file { "/etc/foo":
notify => Exec["bar"]
}
exec { "bar":
command => "Do stuff to /etc/foo",
refreshonly => true
}
Should I use a fact that is unset based on a
2006 May 03
0
[LLVMdev] Conflicting passes?
...ominatorTree, ETForest, LoopInfo and some other analyses
available
- possibly, I'll need access to DSAA
Possible solution:
- batch the conflicting transforms
- write myPass as a subclass of FunctionPass
- write myPass.runOnFunction like:
runOnFunction() {
if (!calledFromPassManager) {
doStuff();
}
}
- use CallGraph within myPass.runOnModule, set
calledFromPassManager=false, call runOnFunction
in reverse topological order. This bullet relies
on the assumption that FunctionPass.runOnModule can
be freely used without any limitations.
- If I understood correctly, FunctionPasses c...
2009 Oct 03
3
else if statement error
Hello,
I am doing a simple if else statement in R. But it always comes out error
such as 'unexpected error'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2,
a=5; all other situations, a=6. I don't know where it is wrong.
Here is my code
ini=3
b=4
if (ini==1) {
a=3
}
else if (ini>1 and b>2 ) {
a=5
}
else {a=6}
Thanks a
2017 Sep 05
2
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
...ways remove it because the debugger will assume the variable lives in memory unless it is told otherwise.
For the original problem of improving optimized debug info while avoiding inaccurate information in the presence of dead store elimination, consider this C example:
int x = 42; // Can DSE
dostuff(x); // Can propagate 42
x = computation(); // Post-dominates `x = 42` store
escape(&x);
We should be able to do this:
int x; // eliminate `x = 42` store
dbg.value(!x, 42, !DIExpression()) // mark x as the constant 42 in debug info
dostuff(42); // propagate 42
dbg.value(!x, &x,...
2006 Jul 10
7
Rails app in a subdirectory via Mongrel
I''m trying to make Mongrel the default web server for Typo, but I''m running
into a problem. Is there an easy way to run a Rails app in a subdirectory (
http://foo/blog instead of http://foo/) with Mongrel? For most apps, I''d
just change routes.rb to include the prefix that I wanted, but that won''t
really work with Typo--I''d rather not require a few
2007 Apr 05
3
Trying to get drag and drop to revert when I want and stay at other times
Here''s the deal. I''m making an ajax-based chess game. It''s done but
there''s something I''d like changed. Right now, to move pieces, you
click on the piece you want and you click where you want the piece to
go. People expect that, but they also expect the ability to simply
drag and drop the piece. So I''ve been using the draggables and
droppables,
2006 Feb 21
29
script/console
The agile book says "You can inspect variables, set values, add other
breakpoints, and generally have a good time".
This is very sweet and totally useless. For example, I want to see the session variable,
the cookies variable and so on. These names are unknown. I think I guess that the things
that are available depend on where you put the breakpoint() call. I''ve tried a