Displaying 11 results from an estimated 11 matches for "min_value".
2010 Nov 25
4
Cumsum with a max and min value
I have a vector of values -1, 0, 1, say
a <- c(0, 1, 0, 1, 1, -1, -1, -1, 0, -1, -1)
I want to create a vector of the cumulative sum of this, but I need to set a
maximum and minimum value for the cumsum, for example:
max_value <- 2
min_value <- -2
the expected result would be (0, 1, 1, 2, 2, 1, 0, -1, -1, -2, -2)
The only way I managed to do It, was
res <- vector(length=length(a))
res[1] <- a[1]
for ( i in 2:length(a)) res[i] <- res[i-1] + a[i] * (( res[i-1] < max_value
& a[i] > 0 ) | ( res[i-1] >...
2011 Dec 31
1
Pressure sensitivity not working on Photoshop CS or CS2
...ion: Device, Keyboard, or Pointer
trace:wintab32:X11DRV_LoadTabletInfo ButtonInput 0: [class 1|length 12|num_buttons 7]
trace:wintab32:X11DRV_LoadTabletInfo ValidatorInput 1: [class 2|length 56|num_axes 3|mode 1|motion_buffer 256]
trace:wintab32:trace_axes Axis 0: [resolution 234000|min_value 0|max_value 32767]
trace:wintab32:trace_axes Axis 1: [resolution 322000|min_value 0|max_value 32767]
trace:wintab32:trace_axes Axis 2: [resolution 10000|min_value 0|max_value 1023]
trace:wintab32:X11DRV_LoadTabletInfo Device 13: [id 11|name UC-LOGIC Tablet WP5540U|type MOUSE|num_cl...
2009 May 02
1
integer ranges in R vs C and Java
Hello,
I'm using R-2.9 and have a question about integer ranges. On C, (OS X
platform),
LONG_MIN and LONG_MAX(from limits.h) correspond to -2147483648(-2^31)
and 2147483647 (2^31-1)
In Java(1.4), Integer.MIN_VALUE and Integer.MAX_VALUE have the same values.
On R, as.integer(2^31-1) is the maximum (without returning NA) but the
lowest is -2147483647 (-2^31+1)
> as.integer((-2)^31)
[1] NA
So in both Java and C can hold 2^32 different values, but R holds 2^32
-1 different values.
Have I made a mistake?...
2012 Dec 03
0
[LLVMdev] Assert with getZExtValue()?
So the problem here was trying to return MIN_VALUE zero extended, if I
return sign extended than this issue is resolved; however, I still get an
error with getSExtValue when trying to get the value of the const from
Instruction: %mask166 = and i128 %lvar_ins176, -18446462598732840961
On Fri, Nov 16, 2012 at 3:17 PM, Ryan Taylor <ryta1203 at gma...
2012 Nov 16
2
[LLVMdev] Assert with getZExtValue()?
Eli,
Thanks for responding. Yes, I read the error message but it seems odd
that it would be trying to use more than 64 bits. It compiles and executes
in gcc on 32 bit arch just fine. I'll probably take your suggestion and
file a bug with a reduced testcase.
Thanks again,
Ryan
On Fri, Nov 16, 2012 at 3:10 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
> On Fri, Nov 16, 2012
2007 Feb 19
2
Integrate scruffy graph in rails view?
Hi everybody,
I''m using scruffy to create some graphs, and would like to integrate
them into a regular view (i.e. show them in an <img> tag).
However, I get errors when using img_tag, or the image doesn''t load if
I try saving the graph to disk and then loading them in html.
Generating the graph and linking to it works, however then I only have
the graph open in a new
2006 Nov 29
5
wxSugar control problem
I''m using wx_sugar 0.1.2 with wxruby2-preview 0.0.37 on OSX and am
coming up with an error when trying to create a SpinCtrl (and quite a
few others have exactly the same prob.):
#file date_picker.rb
class DatePicker < Wx::Dialog
def initialize
super(nil, :title => "Pick a date...")
@cal = Wx::CalendarCtrl.new(self)
add(@cal)
#works fine up to
2006 Dec 02
0
[770] trunk/wxsugar/lib/wx_sugar/keyword_classes.rb: Fix some broken ones (Alex Spelling), add some new & missing ones; add
...nbsp   A slider that can be dragged by the user
</span><span class="cx"> WxSugar.define_keyword_ctors(''Slider'') do
</span><ins>+ wx_ctor_params :value => 0
</ins><span class="cx"> wx_ctor_params :min_value, :max_value
</span><span class="cx"> wx_ctor_params :pos, :size, :style => Wx::SL_HORIZONTAL
</span><span class="cx"> # wx_ctor_params :validator, :name => ''radioButton''
</span><span class="cx"> end
</...
2007 Sep 03
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c
...iff --git a/test/trace/number-properties-6.swf.trace b/test/trace/number-properties-6.swf.trace
new file mode 100644
index 0000000..3688d93
--- /dev/null
+++ b/test/trace/number-properties-6.swf.trace
@@ -0,0 +1,22 @@
+_global.Number = function
+ MAX_VALUE (hpc) = number : 1.79769313486231e+308
+ MIN_VALUE (hpc) = number : 0
+ NEGATIVE_INFINITY (hpc) = number : -Infinity
+ NaN (hpc) = number : NaN
+ POSITIVE_INFINITY (hpc) = number : Infinity
+ __proto__ (hpc) = _global.Object.__proto__
+ constructor (hpc) = _global.Object.constructor
+ prototype (hpc) = object
+ __proto__ (hp) = _global.Obj...
2007 Jan 06
0
[836] trunk/wxsugar/lib/wx_sugar: Make :validator and :name sugary ctor args work for Controls classes
...     A slider that can be dragged by the user
</span><span class="lines">@@ -396,10 +410,9 @@
</span><span class="cx"> wx_ctor_params :value => 0
</span><span class="cx"> wx_ctor_params :min_value, :max_value
</span><span class="cx"> wx_ctor_params :pos, :size, :style => Wx::SL_HORIZONTAL
</span><del>- # wx_ctor_params :validator, :name => ''radioButton''
</del><ins>+ wx_ctor_params :validator, :name => ''sli...
2007 Sep 04
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_video_movie_as.c test/trace
...iff --git a/test/trace/number-properties-5.swf.trace b/test/trace/number-properties-5.swf.trace
new file mode 100644
index 0000000..55e0b11
--- /dev/null
+++ b/test/trace/number-properties-5.swf.trace
@@ -0,0 +1,17 @@
+_global.Number = function
+ MAX_VALUE (hpc) = number : 1.79769313486231e+308
+ MIN_VALUE (hpc) = number : 0
+ NEGATIVE_INFINITY (hpc) = number : -Infinity
+ NaN (hpc) = number : NaN
+ POSITIVE_INFINITY (hpc) = number : Infinity
+ constructor (hpc) = _global.Object.constructor
+ prototype (hpc) = object
+ __proto__ (hp) = _global.Object.prototype
+ constructor (hp) = _global....