search for: do_something_else

Displaying 19 results from an estimated 19 matches for "do_something_else".

2010 May 04
3
Idiomatic looping over list name, value pairs in R
Considering the python code: for k, v in d.items(): do_something(k); do_something_else(v) I have the following for R: for (i in c(1:length(d))) { do_something(names(d[i])); do_something_else(d[[i]]) } This does not seem seems idiomatic. What is the best way of doing the same with R? Thanks. Luis
2018 Apr 09
3
InductiveRangeCheckElimination and BranchProbabilityInfo
Hi, extractRangeChecksFromBranch uses BranchProbabilityInfo to decide whether its worth trying the InductiveRangeCheckElimination transformation. For the following example: void split() { for (int i = 0; i < 100; ++i) { if (i < 99) do_something() else do_something_else() } } But the reported BPI is reported as 50/50 to whether do_something will be called, but we can see with our human eyes that this should be 99%. So two questions: - why is BPI used to enable the transformation? - would it not be more useful for BPI to use something like inductive range analy...
2013 Sep 13
0
[LLVMdev] llvm.meta (was Rotated loop identification)
...that carries the alignment guarantee, and I think that this makes > a lot of sense. Consider something like this: > > void foo(double *x) { > if (check_if_x_is_special(&global_state)) { > y = __builtin_assume_aligned(x, 16); > do_something(y); > } else > do_something_else(x); > } > > with this scheme, there is never a danger that the alignment assumption > can be lifted and incorrectly applied to x in an inlined > do_something_else(x). If we simply have the intrinsic not return a value > and apply its invariant back on its arguments, then I don'...
2010 Jan 28
3
Using tcltk or other graphical widgets to view zoo time series objects
Dear all, I am looking at the R-help entry below: http://finzi.psych.upenn.edu/R/Rhelp02/archive/26640.html I have a more complicatedt problem. I have a zoo time series frame with 100+ sequences. I want to cycle through them back and forth and compare them to the 1st column at any time. I need also a button to click when I need the viewed-selected sequence (that is being compared to the
2015 Dec 01
10
[RFC] Intrinsic naming convention (words with dots)
Hi everyone, We seem to have allowed our documented target-independent intrinsics to acquire a somewhat-haphazard naming system, and I think we should standardize on one convention. All of the intrinsics have 'llvm.' as a prefix, and some also have some additional prefix 'llvm.dbg.', 'llvm.eh.', 'llvm.experimental.', etc., but after that we lose consistency. When
2013 Sep 12
2
[LLVMdev] llvm.meta (was Rotated loop identification)
...it is the return value of the intrinsic that carries the alignment guarantee, and I think that this makes a lot of sense. Consider something like this: void foo(double *x) { if (check_if_x_is_special(&global_state)) { y = __builtin_assume_aligned(x, 16); do_something(y); } else do_something_else(x); } with this scheme, there is never a danger that the alignment assumption can be lifted and incorrectly applied to x in an inlined do_something_else(x). If we simply have the intrinsic not return a value and apply its invariant back on its arguments, then I don't see how to guarantee corre...
2006 Jul 17
0
respond_to and redirect_to
Hi, I have two controller actions like: def foo do_something respond_to :html, :js end def bar do_something_else redirect_to :action => "foo" end How can I get foo to return JS, when bar is called via AJAX? What I''d like to get is: bar is called via AJAX do_something_else is executed do_something is executed foo.rjs is rendered The ideal solution should also work when foo and ba...
2005 Aug 19
13
Enumerations (again): Comments please
Some of my earlier questions may have hinted ever so slightly in the direction that I''m trying to implement "enumerations". By an enumeration here I mean a class that has a fixed number of immutable instances, which in turn have essentially only a name and a position. Requirements I''ve tried to meet are - Enumeration instances should only be loaded once from the
2006 Apr 05
23
how to create RJS visual effects callbacks
I''m trying desperately to get visuall effects callbacks working in rjs templates to no avail What I''m trying to do is fade an image, change the div with the image to a new image, and then fade the new image back in. How would I go about this in RJS Here''s a simple line from my rjs that I can''t get to work. It is not using callbacks so the
2018 Apr 10
0
InductiveRangeCheckElimination and BranchProbabilityInfo
...>> wrote: Hi, extractRangeChecksFromBranch uses BranchProbabilityInfo to decide whether its worth trying the InductiveRangeCheckElimination transformation. For the following example: void split() { for (int i = 0; i < 100; ++i) { if (i < 99) do_something() else do_something_else() } } But the reported BPI is reported as 50/50 to whether do_something will be called, but we can see with our human eyes that this should be 99%. So two questions: - why is BPI used to enable the transformation? - would it not be more useful for BPI to use something like inductive range analy...
2006 Jun 27
11
Newb question
This isn''t affecting my app, but I''d like to know the reason why I''m seeing this. In my layout, the following code <%= image_tag "front.jpg", :size =>"760x175" %> generates <img alt="Front" height="175" src="/images/front.jpg?1122106054" width="760" /> Where is the parameter in the
2006 Apr 27
12
ducktyping ruby
Hi, Does anyone know is there some ruby configurations that can be done to make ruby act a little more like a statically typed language???I love its dynamic nature, but miss the safety that comes from statically typed languages like java??. Cheers in advance -- Posted via http://www.ruby-forum.com/.
2006 Jul 22
4
Visible elements in RJS
How can I know if a an element is visible or hidden in RJS I''m trying to hide/show some data but it does not work Error => parse error, unexpected $undefined. #show_doctor.rjs if($("#{@element}").visible()) page.hide "hide_#{@element}" end Any ideas? @element contains the value of the html element -- Posted via http://www.ruby-forum.com/.
2013 Sep 09
0
[LLVMdev] llvm.meta (was Rotated loop identification)
On Sep 7, 2013, at 7:41 AM, Hal Finkel <hfinkel at anl.gov> wrote: >> On Feb 7, 2013, at 10:58 PM, Hal Finkel < hfinkel at anl.gov > wrote: >> >> >> >> >> As long as this is brainstorming time, I actually like the idea of >> an >> llvm.invariant intrinsic that the optimizers know to ignore. I >> like >> it for other
2006 Jun 06
14
How can I set the session in a functional test?
Hey :) I need to simulate a login in my functional test, otherwise I can''t GET nor POST to the action. I need to set the session key "logged_in_user_id". I tried this inside the setup() method: session[''logged_in_user_id''] = 1 But that throws: TypeError: can''t convert String into Integer Any ideas? Thanks, Rob -------------- next part
2013 Sep 07
2
[LLVMdev] llvm.meta (was Rotated loop identification)
----- Original Message ----- > > > > On Aug 19, 2013, at 8:06 PM, Hal Finkel < hfinkel at anl.gov > wrote: > > > > ----- Original Message ----- > > > > On Feb 22, 2013, at 6:28 AM, Hal Finkel < hfinkel at anl.gov > wrote: > > > > ----- Original Message ----- > > > From: "Andrew Trick" < atrick at
2010 May 05
0
R-help Digest, Vol 87, Issue 5
...> To: r-help at r-project.org Subject: [R] Idiomatic looping over list name, value pairs in R Message-ID: <p2wc6e072941005040724u2c2e66e4u3a20edca1a8c82a9 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Considering the python code: for k, v in d.items(): do_something(k); do_something_else(v) I have the following for R: for (i in c(1:length(d))) { do_something(names(d[i])); do_something_else(d[[i]]) } This does not seem seems idiomatic. What is the best way of doing the same with R? Thanks. Luis ------------------------------ Message: 36 Date: Tue, 4 May 2010 10:31:46 -0400...
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I have a new problem: Register RBP is used in a function foo. (I am not allocating RBP to any virtual register, the instances of RBP in function foo are in the machine code when my register allocator starts.) Function foo calls function bar. Register RBP is not saved across the call, though it is live after the call. Function bar includes a virtual register. The code that I'm using to
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...used to turn the definition", " * int a single C statement (which needs a semi-colon terminator). This", " * avoids problems with code like:", " *", " * if ( condition_holds )", " * yyless( 5 );", " * else", " * do_something_else();", " *", " * Prior to using the do-while the compiler would get upset at the", " * \"else\" because it interpreted the \"if\" statement as being all", " * done when it reached the ';' after the yyless() call.", &qu...