module ObjectSpace
The objspace library extends the ObjectSpace module and adds several methods to get internal statistic information about object/memory management.
You need to require 'objspace'
to use this extension
module.
Generally, you *SHOULD NOT* use this library if you do not know about the MRI implementation. Mainly, this library is for (memory) profiler developers and MRI developers who need to know about MRI memory usage.
The ObjectSpace module contains a number of routines that interact with the garbage collection facility and allow you to traverse all living objects with an iterator.
ObjectSpace also provides support for object finalizers, procs that will be called when a specific object is about to be destroyed by garbage collection.
require 'objspace' a = "A" b = "B" ObjectSpace.define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" }) ObjectSpace.define_finalizer(b, proc {|id| puts "Finalizer two on #{id}" })
produces:
Finalizer two on 537763470 Finalizer one on 537763480
Public Class Methods
Converts an object id to a reference to the object. May not be called on an object id passed as a parameter to a finalizer.
s = "I am a string" #=> "I am a string" r = ObjectSpace._id2ref(s.object_id) #=> "I am a string" r == s #=> true
static VALUE id2ref(VALUE obj, VALUE objid) { #if SIZEOF_LONG == SIZEOF_VOIDP #define NUM2PTR(x) NUM2ULONG(x) #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP #define NUM2PTR(x) NUM2ULL(x) #endif rb_objspace_t *objspace = &rb_objspace; VALUE ptr; void *p0; ptr = NUM2PTR(objid); p0 = (void *)ptr; if (ptr == Qtrue) return Qtrue; if (ptr == Qfalse) return Qfalse; if (ptr == Qnil) return Qnil; if (FIXNUM_P(ptr)) return (VALUE)ptr; if (FLONUM_P(ptr)) return (VALUE)ptr; ptr = obj_id_to_ref(objid); if ((ptr % sizeof(RVALUE)) == (4 << 2)) { ID symid = ptr / sizeof(RVALUE); if (rb_id2str(symid) == 0) rb_raise(rb_eRangeError, "%p is not symbol id value", p0); return ID2SYM(symid); } if (!is_id_value(objspace, ptr)) { rb_raise(rb_eRangeError, "%p is not id value", p0); } if (!is_live_object(objspace, ptr)) { rb_raise(rb_eRangeError, "%p is recycled object", p0); } if (RBASIC(ptr)->klass == 0) { rb_raise(rb_eRangeError, "%p is internal object", p0); } return (VALUE)ptr; }
Returns the class for the given object
.
class A def foo ObjectSpace::trace_object_allocations do obj = Object.new p "#{ObjectSpace::allocation_class_path(obj)}" end end end A.new.foo #=> "Class"
See ::trace_object_allocations for more information and examples.
static VALUE allocation_class_path(VALUE self, VALUE obj) { struct allocation_info *info = lookup_allocation_info(obj); if (info && info->class_path) { return rb_str_new2(info->class_path); } else { return Qnil; } }
Returns garbage collector generation for the given object
.
class B include ObjectSpace def foo trace_object_allocations do obj = Object.new p "Generation is #{allocation_generation(obj)}" end end end B.new.foo #=> "Generation is 3"
See ::trace_object_allocations for more information and examples.
static VALUE allocation_generation(VALUE self, VALUE obj) { struct allocation_info *info = lookup_allocation_info(obj); if (info) { return SIZET2NUM(info->generation); } else { return Qnil; } }
Returns the method identifier for the given object
.
class A include ObjectSpace def foo trace_object_allocations do obj = Object.new p "#{allocation_class_path(obj)}##{allocation_method_id(obj)}" end end end A.new.foo #=> "Class#new"
See ::trace_object_allocations for more information and examples.
static VALUE allocation_method_id(VALUE self, VALUE obj) { struct allocation_info *info = lookup_allocation_info(obj); if (info) { return info->mid; } else { return Qnil; } }
Returns the source file origin from the given object
.
See ::trace_object_allocations for more information and examples.
static VALUE allocation_sourcefile(VALUE self, VALUE obj) { struct allocation_info *info = lookup_allocation_info(obj); if (info && info->path) { return rb_str_new2(info->path); } else { return Qnil; } }
Returns the original line from source for from the given
object
.
See ::trace_object_allocations for more information and examples.
static VALUE allocation_sourceline(VALUE self, VALUE obj) { struct allocation_info *info = lookup_allocation_info(obj); if (info) { return INT2FIX(info->line); } else { return Qnil; } }
Counts objects for each T_IMEMO
type.
This method is only for MRI developers interested in performance and memory usage of Ruby programs.
It returns a hash as:
{:imemo_ifunc=>8, :imemo_svar=>7, :imemo_cref=>509, :imemo_memo=>1, :imemo_throw_data=>1}
If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
The contents of the returned hash is implementation specific and may change in the future.
In this version, keys are symbol objects.
This method is only expected to work with C Ruby.
static VALUE count_imemo_objects(int argc, VALUE *argv, VALUE self) { VALUE hash = setup_hash(argc, argv); if (imemo_type_ids[0] == 0) { imemo_type_ids[0] = rb_intern("imemo_none"); imemo_type_ids[1] = rb_intern("imemo_cref"); imemo_type_ids[2] = rb_intern("imemo_svar"); imemo_type_ids[3] = rb_intern("imemo_throw_data"); imemo_type_ids[4] = rb_intern("imemo_ifunc"); imemo_type_ids[5] = rb_intern("imemo_memo"); imemo_type_ids[6] = rb_intern("imemo_ment"); imemo_type_ids[7] = rb_intern("imemo_iseq"); } rb_objspace_each_objects(count_imemo_objects_i, (void *)hash); return hash; }
Counts nodes for each node type.
This method is only for MRI developers interested in performance and memory usage of Ruby programs.
It returns a hash as:
{:NODE_METHOD=>2027, :NODE_FBODY=>1927, :NODE_CFUNC=>1798, ...}
If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
Note: The contents of the returned hash is implementation defined. It may be changed in future.
This method is only expected to work with C Ruby.
static VALUE count_nodes(int argc, VALUE *argv, VALUE os) { size_t nodes[NODE_LAST+1]; size_t i; VALUE hash = setup_hash(argc, argv); for (i = 0; i <= NODE_LAST; i++) { nodes[i] = 0; } rb_objspace_each_objects(cn_i, &nodes[0]); if (hash == Qnil) { hash = rb_hash_new(); } else if (!RHASH_EMPTY_P(hash)) { st_foreach(RHASH_TBL(hash), set_zero_i, hash); } for (i=0; i<NODE_LAST; i++) { if (nodes[i] != 0) { VALUE node; switch (i) { #define COUNT_NODE(n) case n: node = ID2SYM(rb_intern(#n)); break; COUNT_NODE(NODE_SCOPE); COUNT_NODE(NODE_BLOCK); COUNT_NODE(NODE_IF); COUNT_NODE(NODE_CASE); COUNT_NODE(NODE_WHEN); COUNT_NODE(NODE_OPT_N); COUNT_NODE(NODE_WHILE); COUNT_NODE(NODE_UNTIL); COUNT_NODE(NODE_ITER); COUNT_NODE(NODE_FOR); COUNT_NODE(NODE_BREAK); COUNT_NODE(NODE_NEXT); COUNT_NODE(NODE_REDO); COUNT_NODE(NODE_RETRY); COUNT_NODE(NODE_BEGIN); COUNT_NODE(NODE_RESCUE); COUNT_NODE(NODE_RESBODY); COUNT_NODE(NODE_ENSURE); COUNT_NODE(NODE_AND); COUNT_NODE(NODE_OR); COUNT_NODE(NODE_MASGN); COUNT_NODE(NODE_LASGN); COUNT_NODE(NODE_DASGN); COUNT_NODE(NODE_DASGN_CURR); COUNT_NODE(NODE_GASGN); COUNT_NODE(NODE_IASGN); COUNT_NODE(NODE_IASGN2); COUNT_NODE(NODE_CDECL); COUNT_NODE(NODE_CVASGN); COUNT_NODE(NODE_CVDECL); COUNT_NODE(NODE_OP_ASGN1); COUNT_NODE(NODE_OP_ASGN2); COUNT_NODE(NODE_OP_ASGN_AND); COUNT_NODE(NODE_OP_ASGN_OR); COUNT_NODE(NODE_OP_CDECL); COUNT_NODE(NODE_CALL); COUNT_NODE(NODE_FCALL); COUNT_NODE(NODE_VCALL); COUNT_NODE(NODE_SUPER); COUNT_NODE(NODE_ZSUPER); COUNT_NODE(NODE_ARRAY); COUNT_NODE(NODE_ZARRAY); COUNT_NODE(NODE_VALUES); COUNT_NODE(NODE_HASH); COUNT_NODE(NODE_RETURN); COUNT_NODE(NODE_YIELD); COUNT_NODE(NODE_LVAR); COUNT_NODE(NODE_DVAR); COUNT_NODE(NODE_GVAR); COUNT_NODE(NODE_IVAR); COUNT_NODE(NODE_CONST); COUNT_NODE(NODE_CVAR); COUNT_NODE(NODE_NTH_REF); COUNT_NODE(NODE_BACK_REF); COUNT_NODE(NODE_MATCH); COUNT_NODE(NODE_MATCH2); COUNT_NODE(NODE_MATCH3); COUNT_NODE(NODE_LIT); COUNT_NODE(NODE_STR); COUNT_NODE(NODE_DSTR); COUNT_NODE(NODE_XSTR); COUNT_NODE(NODE_DXSTR); COUNT_NODE(NODE_EVSTR); COUNT_NODE(NODE_DREGX); COUNT_NODE(NODE_DREGX_ONCE); COUNT_NODE(NODE_ARGS); COUNT_NODE(NODE_ARGS_AUX); COUNT_NODE(NODE_OPT_ARG); COUNT_NODE(NODE_KW_ARG); COUNT_NODE(NODE_POSTARG); COUNT_NODE(NODE_ARGSCAT); COUNT_NODE(NODE_ARGSPUSH); COUNT_NODE(NODE_SPLAT); COUNT_NODE(NODE_TO_ARY); COUNT_NODE(NODE_BLOCK_ARG); COUNT_NODE(NODE_BLOCK_PASS); COUNT_NODE(NODE_DEFN); COUNT_NODE(NODE_DEFS); COUNT_NODE(NODE_ALIAS); COUNT_NODE(NODE_VALIAS); COUNT_NODE(NODE_UNDEF); COUNT_NODE(NODE_CLASS); COUNT_NODE(NODE_MODULE); COUNT_NODE(NODE_SCLASS); COUNT_NODE(NODE_COLON2); COUNT_NODE(NODE_COLON3); COUNT_NODE(NODE_DOT2); COUNT_NODE(NODE_DOT3); COUNT_NODE(NODE_FLIP2); COUNT_NODE(NODE_FLIP3); COUNT_NODE(NODE_SELF); COUNT_NODE(NODE_NIL); COUNT_NODE(NODE_TRUE); COUNT_NODE(NODE_FALSE); COUNT_NODE(NODE_ERRINFO); COUNT_NODE(NODE_DEFINED); COUNT_NODE(NODE_POSTEXE); COUNT_NODE(NODE_ALLOCA); COUNT_NODE(NODE_BMETHOD); COUNT_NODE(NODE_DSYM); COUNT_NODE(NODE_ATTRASGN); COUNT_NODE(NODE_PRELUDE); COUNT_NODE(NODE_LAMBDA); #undef COUNT_NODE default: node = INT2FIX(i); } rb_hash_aset(hash, node, SIZET2NUM(nodes[i])); } } return hash; }
Counts all objects grouped by type.
It returns a hash, such as:
{ :TOTAL=>10000, :FREE=>3011, :T_OBJECT=>6, :T_CLASS=>404, # ... }
The contents of the returned hash are implementation specific. It may be changed in future.
The keys starting with :T_
means live objects. For example,
:T_ARRAY
is the number of arrays. :FREE
means
object slots which is not used now. :TOTAL
means sum of above.
If the optional argument result_hash
is given, it is
overwritten and returned. This is intended to avoid probe effect.
h = {} ObjectSpace.count_objects(h) puts h # => { :TOTAL=>10000, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249 }
This method is only expected to work on C Ruby.
static VALUE count_objects(int argc, VALUE *argv, VALUE os) { rb_objspace_t *objspace = &rb_objspace; size_t counts[T_MASK+1]; size_t freed = 0; size_t total = 0; size_t i; VALUE hash; if (rb_scan_args(argc, argv, "01", &hash) == 1) { if (!RB_TYPE_P(hash, T_HASH)) rb_raise(rb_eTypeError, "non-hash given"); } for (i = 0; i <= T_MASK; i++) { counts[i] = 0; } for (i = 0; i < heap_allocated_pages; i++) { struct heap_page *page = heap_pages_sorted[i]; RVALUE *p, *pend; p = page->start; pend = p + page->total_slots; for (;p < pend; p++) { if (p->as.basic.flags) { counts[BUILTIN_TYPE(p)]++; } else { freed++; } } total += page->total_slots; } if (hash == Qnil) { hash = rb_hash_new(); } else if (!RHASH_EMPTY_P(hash)) { st_foreach(RHASH_TBL_RAW(hash), set_zero, hash); } rb_hash_aset(hash, ID2SYM(rb_intern("TOTAL")), SIZET2NUM(total)); rb_hash_aset(hash, ID2SYM(rb_intern("FREE")), SIZET2NUM(freed)); for (i = 0; i <= T_MASK; i++) { VALUE type; switch (i) { #define COUNT_TYPE(t) case (t): type = ID2SYM(rb_intern(#t)); break; COUNT_TYPE(T_NONE); COUNT_TYPE(T_OBJECT); COUNT_TYPE(T_CLASS); COUNT_TYPE(T_MODULE); COUNT_TYPE(T_FLOAT); COUNT_TYPE(T_STRING); COUNT_TYPE(T_REGEXP); COUNT_TYPE(T_ARRAY); COUNT_TYPE(T_HASH); COUNT_TYPE(T_STRUCT); COUNT_TYPE(T_BIGNUM); COUNT_TYPE(T_FILE); COUNT_TYPE(T_DATA); COUNT_TYPE(T_MATCH); COUNT_TYPE(T_COMPLEX); COUNT_TYPE(T_RATIONAL); COUNT_TYPE(T_NIL); COUNT_TYPE(T_TRUE); COUNT_TYPE(T_FALSE); COUNT_TYPE(T_SYMBOL); COUNT_TYPE(T_FIXNUM); COUNT_TYPE(T_IMEMO); COUNT_TYPE(T_UNDEF); COUNT_TYPE(T_NODE); COUNT_TYPE(T_ICLASS); COUNT_TYPE(T_ZOMBIE); #undef COUNT_TYPE default: type = INT2NUM(i); break; } if (counts[i]) rb_hash_aset(hash, type, SIZET2NUM(counts[i])); } return hash; }
Counts objects size (in bytes) for each type.
Note that this information is incomplete. You need to deal with this information as only a HINT. Especially, total size of T_DATA may not right size.
It returns a hash as:
{:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
The contents of the returned hash is implementation defined. It may be changed in future.
This method is only expected to work with C Ruby.
static VALUE count_objects_size(int argc, VALUE *argv, VALUE os) { size_t counts[T_MASK+1]; size_t total = 0; enum ruby_value_type i; VALUE hash = setup_hash(argc, argv); for (i = 0; i <= T_MASK; i++) { counts[i] = 0; } rb_objspace_each_objects(cos_i, &counts[0]); if (hash == Qnil) { hash = rb_hash_new(); } else if (!RHASH_EMPTY_P(hash)) { st_foreach(RHASH_TBL(hash), set_zero_i, hash); } for (i = 0; i <= T_MASK; i++) { if (counts[i]) { VALUE type = type2sym(i); total += counts[i]; rb_hash_aset(hash, type, SIZET2NUM(counts[i])); } } rb_hash_aset(hash, ID2SYM(rb_intern("TOTAL")), SIZET2NUM(total)); return hash; }
Counts symbols for each Symbol type.
This method is only for MRI developers interested in performance and memory usage of Ruby programs.
If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
Note: The contents of the returned hash is implementation defined. It may be changed in future.
This method is only expected to work with C Ruby.
On this version of MRI, they have 3 types of Symbols (and 1 total counts).
* mortal_dynamic_symbol: GC target symbols (collected by GC) * immortal_dynamic_symbol: Immortal symbols promoted from dynamic symbols (do not collected by GC) * immortal_static_symbol: Immortal symbols (do not collected by GC) * immortal_symbol: total immortal symbols (immortal_dynamic_symbol+immortal_static_symbol)
static VALUE count_symbols(int argc, VALUE *argv, VALUE os) { struct dynamic_symbol_counts dynamic_counts = {0, 0}; VALUE hash = setup_hash(argc, argv); size_t immortal_symbols = rb_sym_immortal_count(); rb_objspace_each_objects(cs_i, &dynamic_counts); if (hash == Qnil) { hash = rb_hash_new(); } else if (!RHASH_EMPTY_P(hash)) { st_foreach(RHASH_TBL(hash), set_zero_i, hash); } rb_hash_aset(hash, ID2SYM(rb_intern("mortal_dynamic_symbol")), SIZET2NUM(dynamic_counts.mortal)); rb_hash_aset(hash, ID2SYM(rb_intern("immortal_dynamic_symbol")), SIZET2NUM(dynamic_counts.immortal)); rb_hash_aset(hash, ID2SYM(rb_intern("immortal_static_symbol")), SIZET2NUM(immortal_symbols - dynamic_counts.immortal)); rb_hash_aset(hash, ID2SYM(rb_intern("immortal_symbol")), SIZET2NUM(immortal_symbols)); return hash; }
Counts objects for each T_DATA
type.
This method is only for MRI developers interested in performance and memory usage of Ruby programs.
It returns a hash as:
{RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6, :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99, ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1, Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2} # T_DATA objects existing at startup on r32276.
If the optional argument, result_hash, is given, it is overwritten and returned. This is intended to avoid probe effect.
The contents of the returned hash is implementation specific and may change in the future.
In this version, keys are Class object or Symbol object.
If object is kind of normal (accessible) object, the key is Class object. If object is not a kind of normal (internal) object, the key is symbol name, registered by rb_data_type_struct.
This method is only expected to work with C Ruby.
static VALUE count_tdata_objects(int argc, VALUE *argv, VALUE self) { VALUE hash = setup_hash(argc, argv); rb_objspace_each_objects(cto_i, (void *)hash); return hash; }
Adds aProc as a finalizer, to be called after obj was destroyed. The object ID of the obj will be passed as an argument to aProc. If aProc is a lambda or method, make sure it can be called with a single argument.
static VALUE define_final(int argc, VALUE *argv, VALUE os) { VALUE obj, block; rb_scan_args(argc, argv, "11", &obj, &block); should_be_finalizable(obj); if (argc == 1) { block = rb_block_proc(); } else { should_be_callable(block); } return define_final0(obj, block); }
Dump the contents of a ruby object as JSON.
This method is only expected to work with C Ruby. This is an experimental method and is subject to change. In particular, the function signature and output format are not guaranteed to be compatible in future versions of ruby.
static VALUE objspace_dump(int argc, VALUE *argv, VALUE os) { static const char filename[] = "rubyobj"; VALUE obj = Qnil, opts = Qnil, output; struct dump_config dc = {0,}; rb_scan_args(argc, argv, "1:", &obj, &opts); output = dump_output(&dc, opts, sym_string, filename); dump_object(obj, &dc); return dump_result(&dc, output); }
Dump the contents of the ruby heap as JSON.
This method is only expected to work with C Ruby. This is an experimental method and is subject to change. In particular, the function signature and output format are not guaranteed to be compatible in future versions of ruby.
static VALUE objspace_dump_all(int argc, VALUE *argv, VALUE os) { static const char filename[] = "rubyheap"; VALUE opts = Qnil, output; struct dump_config dc = {0,}; rb_scan_args(argc, argv, "0:", &opts); output = dump_output(&dc, opts, sym_file, filename); /* dump roots */ rb_objspace_reachable_objects_from_root(root_obj_i, &dc); if (dc.roots) dump_append(&dc, "]}\n"); /* dump all objects */ rb_objspace_each_objects(heap_i, &dc); return dump_result(&dc, output); }
Calls the block once for each living, nonimmediate object in this Ruby
process. If module is specified, calls the block for only those
classes or modules that match (or are a subclass of) module.
Returns the number of objects found. Immediate objects
(Fixnum
s, Symbol
s true
,
false
, and nil
) are never returned. In the
example below, each_object
returns both the numbers we defined
and several constants defined in the Math
module.
If no block is given, an enumerator is returned instead.
a = 102.7 b = 95 # Won't be returned c =<PHONE_NUMBER>7654321 count = ObjectSpace.each_object(Numeric) {|x| p x } puts "Total count: #{count}"
produces:
12345678987654321 102.7 2.71828182845905 3.14159265358979 2.22044604925031e-16 1.7976931348623157e+308 2.2250738585072e-308 Total count: 7
static VALUE os_each_obj(int argc, VALUE *argv, VALUE os) { VALUE of; if (argc == 0) { of = 0; } else { rb_scan_args(argc, argv, "01", &of); } RETURN_ENUMERATOR(os, 1, &of); return os_obj_of(of); }
Initiates garbage collection, unless manually disabled.
This method is defined with keyword arguments that default to true:
def GC.start(full_mark: true, immediate_sweep: true); end
Use full_mark: false to perform a minor GC.
Note: These keyword arguments are implementation and version dependent. They are not guaranteed to be future-compatible, and may be ignored if the underlying implementation does not support them.
static VALUE gc_start_internal(int argc, VALUE *argv, VALUE self) { rb_objspace_t *objspace = &rb_objspace; int full_mark = TRUE, immediate_mark = TRUE, immediate_sweep = TRUE; VALUE opt = Qnil; static ID keyword_ids[3]; rb_scan_args(argc, argv, "0:", &opt); if (!NIL_P(opt)) { VALUE kwvals[3]; if (!keyword_ids[0]) { keyword_ids[0] = rb_intern("full_mark"); keyword_ids[1] = rb_intern("immediate_mark"); keyword_ids[2] = rb_intern("immediate_sweep"); } rb_get_kwargs(opt, keyword_ids, 0, 3, kwvals); if (kwvals[0] != Qundef) full_mark = RTEST(kwvals[0]); if (kwvals[1] != Qundef) immediate_mark = RTEST(kwvals[1]); if (kwvals[2] != Qundef) immediate_sweep = RTEST(kwvals[2]); } garbage_collect(objspace, full_mark, immediate_mark, immediate_sweep, GPR_FLAG_METHOD); gc_finalize_deferred(objspace); return Qnil; }
- MRI specific feature
-
Return internal class of obj.
obj can be an instance of InternalObjectWrapper.
Note that you should not use this method in your application.
static VALUE objspace_internal_class_of(VALUE self, VALUE obj) { VALUE klass; if (rb_typeddata_is_kind_of(obj, &iow_data_type)) { obj = (VALUE)DATA_PTR(obj); } klass = CLASS_OF(obj); return wrap_klass_iow(klass); }
- MRI specific feature
-
Return internal super class of cls (Class or Module).
obj can be an instance of InternalObjectWrapper.
Note that you should not use this method in your application.
static VALUE objspace_internal_super_of(VALUE self, VALUE obj) { VALUE super; if (rb_typeddata_is_kind_of(obj, &iow_data_type)) { obj = (VALUE)DATA_PTR(obj); } switch (OBJ_BUILTIN_TYPE(obj)) { case T_MODULE: case T_CLASS: case T_ICLASS: super = RCLASS_SUPER(obj); break; default: rb_raise(rb_eArgError, "class or module is expected"); } return wrap_klass_iow(super); }
Return consuming memory size of obj.
Note that the return size is incomplete. You need to deal with this
information as only a HINT. Especially, the size of
T_DATA
may not be correct.
This method is only expected to work with C Ruby.
From Ruby 2.2, ::memsize_of(obj) returns a memory size includes sizeof(RVALUE).
static VALUE memsize_of_m(VALUE self, VALUE obj) { return SIZET2NUM(rb_obj_memsize_of(obj)); }
Return consuming memory size of all living objects.
If klass
(should be Class object) is
given, return the total memory size of instances of the given class.
Note that the returned size is incomplete. You need to deal with this
information as only a HINT. Especially, the size of
T_DATA
may not be correct.
Note that this method does NOT return total malloc'ed memory size.
This method can be defined by the following Ruby code:
def memsize_of_all klass = false total = 0 ObjectSpace.each_object{|e| total += ObjectSpace.memsize_of(e) if klass == false || e.kind_of?(klass) } total end
This method is only expected to work with C Ruby.
static VALUE memsize_of_all_m(int argc, VALUE *argv, VALUE self) { struct total_data data = {0, 0}; if (argc > 0) { rb_scan_args(argc, argv, "01", &data.klass); } rb_objspace_each_objects(total_i, &data); return SIZET2NUM(data.total); }
- MRI specific feature
-
Return all reachable objects from `obj'.
This method returns all reachable objects from `obj'.
If `obj' has two or more references to the same object `x', then returned array only includes one `x' object.
If `obj' is a non-markable (non-heap management) object such as true, false, nil, symbols and Fixnums (and Flonum) then it simply returns nil.
If `obj' has references to an internal object, then it returns instances of ObjectSpace::InternalObjectWrapper class. This object contains a reference to an internal object and you can check the type of internal object with `type' method.
If `obj' is instance of ObjectSpace::InternalObjectWrapper class, then this method returns all reachable object from an internal object, which is pointed by `obj'.
With this method, you can find memory leaks.
This method is only expected to work except with C Ruby.
Example:
ObjectSpace.reachable_objects_from(['a', 'b', 'c']) #=> [Array, 'a', 'b', 'c'] ObjectSpace.reachable_objects_from(['a', 'a', 'a']) #=> [Array, 'a', 'a', 'a'] # all 'a' strings have different object id ObjectSpace.reachable_objects_from([v = 'a', v, v]) #=> [Array, 'a'] ObjectSpace.reachable_objects_from(1) #=> nil # 1 is not markable (heap managed) object
static VALUE reachable_objects_from(VALUE self, VALUE obj) { if (rb_objspace_markable_object_p(obj)) { VALUE ret = rb_ary_new(); struct rof_data data; if (rb_typeddata_is_kind_of(obj, &iow_data_type)) { obj = (VALUE)DATA_PTR(obj); } data.refs = st_init_numtable(); data.internals = rb_ary_new(); rb_objspace_reachable_objects_from(obj, reachable_object_from_i, &data); st_foreach(data.refs, collect_values, (st_data_t)ret); return ret; } else { return Qnil; } }
- MRI specific feature
-
Return all reachable objects from root.
static VALUE reachable_objects_from_root(VALUE self) { struct rofr_data data; VALUE hash = data.categories = rb_ident_hash_new(); data.last_category = 0; rb_objspace_reachable_objects_from_root(reachable_object_from_root_i, &data); rb_hash_foreach(hash, collect_values_of_values, hash); return hash; }
Starts tracing object allocations from the ObjectSpace extension module.
For example:
require 'objspace' class C include ObjectSpace def foo trace_object_allocations do obj = Object.new p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}" end end end C.new.foo #=> "objtrace.rb:8"
This example has included the ObjectSpace module to make it easier to read, but you can also use the ::trace_object_allocations notation (recommended).
Note that this feature introduces a huge performance decrease and huge memory consumption.
static VALUE trace_object_allocations(VALUE self) { trace_object_allocations_start(self); return rb_ensure(rb_yield, Qnil, trace_object_allocations_stop, self); }
Clear recorded tracing information.
static VALUE trace_object_allocations_clear(VALUE self) { struct traceobj_arg *arg = get_traceobj_arg(); /* clear tables */ st_foreach(arg->object_table, free_values_i, 0); st_clear(arg->object_table); st_foreach(arg->str_table, free_keys_i, 0); st_clear(arg->str_table); /* do not touch TracePoints */ return Qnil; }
static VALUE trace_object_allocations_debug_start(VALUE self) { tmp_keep_remains = 1; if (object_allocations_reporter_registered == 0) { object_allocations_reporter_registered = 1; rb_bug_reporter_add(object_allocations_reporter, 0); } return trace_object_allocations_start(self); }
Starts tracing object allocations.
static VALUE trace_object_allocations_start(VALUE self) { struct traceobj_arg *arg = get_traceobj_arg(); if (arg->running++ > 0) { /* do nothing */ } else { if (arg->newobj_trace == 0) { arg->newobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_NEWOBJ, newobj_i, arg); arg->freeobj_trace = rb_tracepoint_new(0, RUBY_INTERNAL_EVENT_FREEOBJ, freeobj_i, arg); } rb_tracepoint_enable(arg->newobj_trace); rb_tracepoint_enable(arg->freeobj_trace); } return Qnil; }
Stop tracing object allocations.
Note that if ::trace_object_allocations_start is called n-times, then tracing will stop after calling ::trace_object_allocations_stop n-times.
static VALUE trace_object_allocations_stop(VALUE self) { struct traceobj_arg *arg = get_traceobj_arg(); if (arg->running > 0) { arg->running--; } if (arg->running == 0) { rb_tracepoint_disable(arg->newobj_trace); rb_tracepoint_disable(arg->freeobj_trace); arg->newobj_trace = 0; arg->freeobj_trace = 0; } return Qnil; }
Removes all finalizers for obj.
static VALUE undefine_final(VALUE os, VALUE obj) { return rb_undefine_finalizer(obj); }


Module cassandra
Cassandra single-host client module.
Single host module for PUC Lua, LuaJIT and OpenResty.
Info:
- Release: 1.3.3
- Author: thibaultcha
Functions
| _Host.new (opts) | Create a new Cassandra client. |
| _Host:connect () | Connect to the remote node. |
| _Host:settimeout (timeout) | Set the timeout value. |
| _Host:setkeepalive (timeout, size) | Put the underlying socket into the cosocket connection pool. |
| _Host:close (...) | Close the connection. |
| _Host:change_keyspace (keyspace) | Change the client's keyspace. |
| _Host:prepare (query) | Prepare a query. |
| _Host:execute (query, args, options) | Execute a query. |
| _Host:batch (queries, options) | Execute a batch. |
| _Host:iterate (query, args, options) | Lua iterator for auto-pagination. |
| _Host:get_trace (tracing_id) | Get tracing information. |
Tables
| cql_errors | CQL error codes CQL error codes constant. |
| consistencies | CQL consistencies. |
| auth_providers | Authentication providers |
| client_options | New client options. |
| query_options | Query options. |
| type_serializers | CQL serializers. |
Functions
- _Host.new (opts)
-
Create a new Cassandra client.
Takes a table of client_options. Does not connect automatically.
Parameters:
- opts table Options for the created client.
Returns:
-
table
client
: A table able to connect to the given host and port.Usage:
local cassandra = require "cassandra" local client = cassandra.new { host = "<IP_ADDRESS>", port = 9042, keyspace = "my_keyspace" }
- _Host:connect ()
-
Connect to the remote node.
Uses the client_options given at creation to connect to the configured
Cassandra node.
Returns:
-
boolean
ok
:true
if success,nil
if failure. -
string
err
: String describing the error if failure.
Usage:
local cassandra = require "cassandra" local client = cassandra.new() assert(client:connect())
-
boolean
- _Host:settimeout (timeout)
-
Set the timeout value.
Parameters:
- timeout number Value in milliseconds (for connect/read/write).
Returns:
-
boolean
ok
:true
if success,nil
if failure. -
string
err
: String describing the error if failure.
See also:
- _Host:setkeepalive (timeout, size)
-
Put the underlying socket into the cosocket connection pool.
Keeps the underlying socket alive until other clients use the connect
method on the same host/port combination.
Parameters:
- timeout number (optional) Value in milliseconds specifying the maximal idle timeout.
- size number (optional) Maximal number of connections allowed in the pool for the current server.
Returns:
-
number
success
:1
if success,nil
if failure. -
string
err
: String describing the error if failure.
See also:
- _Host:close (...)
-
Close the connection.
Parameters:
- ...
Returns:
-
number
success
:1
if success,nil
if failure. -
string
err
: String describing the error if failure.
See also:
- _Host:change_keyspace (keyspace)
-
Change the client's keyspace.
Closes the current connection and open a new one to the given
keyspace.
The connection is closed and reopen so that we use a different connection
pool for usage in ngx_lua.
Parameters:
- keyspace string Name of the desired keyspace.
Returns:
-
boolean
ok
:true
if success,nil
if failure. -
string
err
: String describing the error if failure.
- _Host:prepare (query)
-
Prepare a query.
Sends a PREPARE request for the given query. The result of this request will
contain a query id, which can be given to execute if the
prepared
option is enabled.Parameters:
- query string CQL query to prepare.
Returns:
-
table
res
: Table holding the query result if success,nil
if failure. -
string
err
: String describing the error if failure. -
number
cql_err
: If a server-side error occurred, the CQL error code.
Usage:
local cassandra = require "cassandra" local client = cassandra.new() assert(client:connect()) local res = assert(client:prepare("SELECT * FROM users WHERE id = ?")) local rows = assert(client:execute(res.query_id, {12345}, {prepared = true})) print(#rows) -- 1
- _Host:execute (query, args, options)
-
Execute a query.
Sends a request to execute the given query.
Parameters:
- query string CQL query to execute.
- args table (optional) Arguments to bind to the query.
- options table (optional) Options from query_options for this query.
Returns:
-
table
res
: Table holding the query result if success,nil
if failure. -
string
err
: String describing the error if failure. -
number
cql_err
: If a server-side error occurred, the CQL error code.
Usage:
local cassandra = require "cassandra" local client = cassandra.new() assert(client:connect()) local rows = assert(client:execute("SELECT * FROM users WHERE name = ? AND email = ?", { "john"<EMAIL_ADDRESS>})) print(#rows) -- 1 local rows, err, cql_code = client:execute("SELECT * FROM users WHERE age = ?", { age = 21 }, { named = true, page_size = 5000 }) if not rows then -- can compare cql_code to determine error type error(err) end print(#rows) --
<= 5000
print(rows.meta.paging_state) -- pagination token - _Host:batch (queries, options)
-
Execute a batch.
Sends a request to execute the given batch.
Parameters:
- queries table Array of CQL queries to execute as a batch.
- options table (optional) Options from query_options for this query.
Returns:
-
table
res
: Table holding the query result if success,nil
if failure. -
string
err
: String describing the error if failure. -
number
cql_err
: If a server-side error occurred, the CQL error code.
Usage:
local cassandra = require "cassandra" local client = cassandra.new() assert(client:connect()) local res = assert(client:batch({ {"INSERT INTO things(id, n) VALUES(?, 1)", {123}}, {"UPDATE things SET n = 2 WHERE id = ?", {123}}, {"UPDATE things SET n = 3 WHERE id = ?", {123}} }, { logged = false }))
- _Host:iterate (query, args, options)
-
Lua iterator for auto-pagination.
Perform auto-pagination for a query when used as a Lua iterator.
Parameters:
- query string CQL query to execute.
- args table (optional) Arguments to bind to the query.
- options table (optional) Options from query_options for this query.
Usage:
local cassandra = require "cassandra" local client = cassandra.new() assert(client:connect()) for rows, err, page in client:iterate("SELECT * FROM users") do if err then error(err) end print(page) print(#rows) end
- _Host:get_trace (tracing_id)
-
Get tracing information.
Retrieves the tracing information of a query (if tracing was enabled in
its options) from its tracing id.
Parameters:
- tracing_id string The query's tracing is as returned in the results of a traced query.
Returns:
-
table
trace
: Table holding the query's tracing events if success,nil
if failure. -
string
err
: String describing the error if failure.
Usage:
local cassandra = require "cassandra" local client = cassandra.new() assert(client:connect()) local res = assert(client:execute("INSERT INTO users(id, age) VALUES(1, 33)", nil, { tracing = true })) local trace = assert(client:get_trace(res.tracing_id)) print(trace.client) -- "<IP_ADDRESS>" print(trace.command) -- "QUERY"
Tables
- cql_errors
-
CQL error codes
CQL error codes constant. Useful when it is desired to programatically
determine the type of error that occurred during a query execution.
Fields:
- SERVER Something unexpected happened. This indicates a server-side bug.
- PROTOCOL Some client message triggered a protocol violation (for instance a QUERY message is sent before a STARTUP).
- BAD_CREDENTIALS A CREDENTIALS request failed because Cassandra did not accept the provided credentials.
- UNAVAILABLE_EXCEPTION The query could not be processed with respect to the given concurrency.
- OVERLOADED The request cannot be processed because the coordinator node is overloaded.
- IS_BOOTSTRAPPING The request was a read request but the coordinator node is bootstrapping.
- TRUNCATE_ERROR Error during a truncation.
- WRITE_TIMEOUT Timeout exception during a write request.
- READ_TIMEOUT Timeout exception during a read request.
- SYNTAX_ERROR The submitted query has a syntax error.
- UNAUTHORIZED The logged-in user doesn't have the right to perform the query.
- INVALID The query is syntactically correct but invalid.
- CONFIG_ERROR The query is invalid because of some configuration issue.
- ALREADY_EXISTS The query attempted to create a keyspace or a table that is already existing.
- UNPREPARED Can be thrown while a prepared statement tries to be executed if the provided prepared query id is not known by this host.
- consistencies
-
CQL consistencies.
Fields:
- all
CQL consistency
ALL
.cassandra.consistencies.all
- each_quorum
CQL consistency
EACH_QUORUM
.cassandra.consistencies.each_quorum
- quorum
CQL consistency
QUORUM
.cassandra.consistencies.quorum
- local_quorum
CQL consistency
LOCAL_QUORUM
.cassandra.consistencies.local_quorum
- one
CQL consistency
ONE
.cassandra.consistencies.one
- two
CQL consistency
TWO
.cassandra.consistencies.two
- three
CQL consistency
THREE
.cassandra.consistencies.three
- local_one
CQL consistency
LOCAL_ONE
.cassandra.consistencies.local_one
- any
CQL consistency
ANY
.cassandra.consistencies.any
- serial
CQL consistency
SERIAL
.cassandra.consistencies.seriam
- local_serial
CQL consistency
LOCAL_SERIAL
.cassandra.consistencies.local_serial
- all
- auth_providers
-
Authentication providers
Fields:
- plain_text
The plain text auth provider.
local auth = cassandra.auth_provider.plain_text("username", "password")
- plain_text
- client_options
-
New client options.
Options taken by new upon client creation.
Fields:
- host
Address to which the client should connect.
(string, default:
"<IP_ADDRESS>"
) - port
Port to which the client should connect.
(
number
, default:9042
) - keyspace Keyspace the client should use. (string, optional)
- protocol_version
Binary protocol version the client should try to use
(
number
, default:3
) - ssl
Determines if the client should connect using SSL.
(
boolean
, default:false
) - verify
Enable server certificate validation if
ssl
is enabled. (boolean
, default:false
) - cafile
Path to the server certificate (LuaSec usage only, see
lua_ssl_trusted_certificate
directive for ngx_lua). (string, optional) - cert Path to the client SSL certificate (LuaSec usage only). (string, optional)
- key Path to the client SSL key (LuaSec usage only). (string, optional)
- auth Authentication handler, created from the cassandra.auth_providers table. (optional)
- host
Address to which the client should connect.
(string, default:
- query_options
-
Query options.
Fields:
- consistency
Consistency level for this request.
See cassandra.consistencies table.
(default:
cassandra.consistencies.one
) - serial_consistency
Serial consistency level for this request.
See cassandra.consistencies table.
(default:
cassandra.consistencies.serial
) - page_size
When retrieving a set of rows (
SELECT
), determines the maximum maximum amount of rows per page. (number
, default:1000
) - paging_state String token representing the paging state. Useful for manual paging: if provided, the query will be executed starting from the given paging state. (string, optional)
- tracing
Enable query tracing. Use this option to diagnose performance
problems related to query execution.
(
boolean
, default:false
) - prepared
Determines if the argument given to execute is a prepared
query id (from prepare) to be executed.
(
boolean
, default:false
) - logged
When executing a batch, determines if the batch should be
written to the batchlog. (
boolean
, default:true
) - counter
When executing a batch, specify if the batch contains
counter updates. (
boolean
, default:false
) - timestamp
The default timestamp for the query/batch in microseconds
from unix epoch. If provided, will replace the server
side assigned timestamp as default timestamp.
(
number
, optional) - named
Determines if arguments binded to execute are key/value
indexed instead of an array. (
boolean
, default:false
)
- consistency
Consistency level for this request.
See cassandra.consistencies table.
(default:
- type_serializers
-
CQL serializers.
When binding arguments to a query, some types cannot be infered
automatically and will require manual serialization. Some other
times, it can be useful to manually enforce the type of a parameter.
For this purpose, shorthands for type serialization are available
on the cassandra module.
Fields:
- null
(native protocol v4 only) Equivalent to the
null
CQL value. Useful to unset a field.cassandra.null()
- unset
Equivalent to the
not set
CQL value. Leaves field untouched for binary protocol v4+, or unset it for v2/v3.cassandra.unset()
- uuid
Serialize a 32 lowercase characters string to a CQL uuid.
cassandra.uuid("123e4567-e89b-12d3-a456-426655440000")
- timestamp
Serialize a 10 digits number into a CQL timestamp.
cassandra.timestamp(1405356926)
- list
cassandra.list({"abc", "def"})
- set
cassandra.set({"abc", "def"})
- map
cassandra.map({foo = "bar"})
- udt CQL UDT.
- tuple CQL tuple.
- inet
CQL inet.
cassandra.inet("<IP_ADDRESS>") cassandra.inet("2001:0db8:85a3:0042:1000:8a2e:0370:7334")
- bigint
CQL bigint.
cassandra.bigint(42000000000)
- double
CQL double.
cassandra.bigint(1.0000000000000004)
- ascii CQL ascii.
- blob CQL blob.
- boolean
CQL boolean.
cassandra.boolean(true)
- counter
CQL counter.
cassandra.counter(1)
- decimal CQL decimal.
- float
CQL float.
cassandra.float(1.618033)
- int
CQL int.
cassandra.int(10)
- text
CQL text.
cassandra.text("hello world")
- timeuuid CQL timeuuid.
- varchar CQL varchar.
- varint CQL varint.
Usage:
local cassandra = require "cassandra" -- connect client... client:execute("SELECT * FROM users WHERE id = ?", { cassandra.uuid("123e4567-e89b-12d3-a456-426655440000") }) client:execute("INSERT INTO users(id, emails) VALUES(?, ?)", { 1<EMAIL_ADDRESS><EMAIL_ADDRESS>})
- null


I’ll arrest Yari if killings continue in Zamfara –Matawalle
by Maiharaji AltineMaiharaji Altine, Gusau
Governor Bello Matawalle of Zamfara State said he would arrest a former state governor, Abdul’aziz Yari, if there were any further killing of innocent people in the state.
Matawalle said this on Friday in a statement while receiving some firearms surrendered by repentant bandits at the Government House, Gusau.
Matawalle alleged that it was anytime Yari visited the state that there were attacks and killing of people.
“I decided to take this action against the former governor because I observed that whenever he visited the state, there would be attacks and killing of innocent people immediately he left,” he alleged.
According to Matawalle, the recent killings in Karaye village was the third time the former governor visited the state. He alleged that his predecessor’s visit was followed by a security breach, which he described as “too much of coincidence.”
He said, “Security is the responsibility of all and I wonder why some people such as the former governor and his followers are not happy with the current development in which the security of the state has significantly improved.”
The governor, therefore, instructed security agencies in the state to arrest and prosecute anybody found to be responsible for the killings, saying he would not allow “some failed politicians” to destroy the state for their personal interests.
When contacted for comments, the Special Adviser to Yari on Media, Alhali Ibrahim Dosara, declined to comment, stressing that only the Publicity Secretary Committee Chairman of the All Progressives Congress, Alhali Ibrahim Magaji, could comment on the matter.
However, several attempts made to speak with Magaji did not yield any result.
Meanwhile, the suspended Chairman of Shinkafi Local Government Area of Zamfara State, Alhaji Garba Galadi, on Friday said the state House of Assembly did not follow constitutional procedures before suspending him.
The House had suspended the chairman for alleged misappropriation of funds to the tune of N23m and asked him to hand over the affairs of the council to his deputy.
However, in a swift reaction, the House threatened to take drastic action against Galadi for still parading himself as the chairman and refusing to hand over to his deputy.
Copyright PUNCH.
All rights reserved. This material, and other digital content on this website, may not be reproduced, published, broadcast, rewritten or redistributed in whole or in part without prior express written permission from PUNCH.
Contact: theeditor@punchng.com


Optional part 8: Further exercises¶
In the role of model end user:
- In the study script, introduce another parameter
initial_high_fraction
that regulates the fraction of individuals who have a high effort initially. - Set a fixed
numpy.random.seed
so that repeated runs give the exact same result. - Use a python package of your taste to save some results from
traj
to disk, and write a script that reads them and does some further plots. - Perform a Monte-Carlo simulation in which the model is run with a hundred different seeds, and plot the average trajectory of the stock surrounded by a band showing the variation of that trajectory over different runs.
- Perform a bifurcation analysis in which this Monte-Carlo simulation is done
for twenty-one different values of
initial_high_fraction
from zero to one, and plot the average and standard deviation of the final fish stock (i.e. the one at time 100, where the average and standard deviation are w.r.t. the 100 runs in the same Monte-Carlo simulation) vs. the value ofinitial_high_fraction
. - Vary the number of individuals per cell by reducing the number of cells,
keeping the total number of individuals at 100 and the total fish capacity
of all cells together at 100. Plot some example runs, then do a Monte-Carlo
simulation, and finally a bifurcation analysis in which you vary the number
of cells (instead of the value of
initial_high_fraction
). - Make the cells heterogeneous by giving them different capacities and numbers of indidivuals.
In the role of model composer:
- Make another model in which you simply leave out the learning component, and test it with a copy of the existing study script.
In the role of model component developer:
- Change
my_exploit_growth
so that the basic growth rate is an attribute ofCell
rather thanEnvironment
. - … (TODO!)


Test inserting paragraphs: should see a blue box with "bar" in it, and two blank lines between "foo" and "bar".
foo
bar


Scorpions spinner Jamie Merchant reported for suspect bowling action
by Leighton LevyJamaica Scorpions off-spinner Jamie Merchant has been reported for a suspect bowling action during his side’s game against Canada last Saturday in the Colonial Medical Insurance Super50 Cup.
Cricket West Indies has confirmed that Merchant’s action was cited by match officials after he bowled his allotted 10 overs for figures of 0-33 during the game at Warner Park, which the Scorpions won by four wickets.
CWI will now arrange for an Opinion Report of the bowling action of the 30-year-old Merchant from an Independent Assessor, but he is permitted to continue bowling until the results of the assessment are known.
Video footage from the game will be sent to Loughborough University in the United Kingdom for an Opinion Report in accordance with the CWI Regulations for Dealing with Suspected Illegal Bowling Actions.
Earlier this week pacer Ronsford Beaton of the Guyana Jaguars was suspended from the competition after his bowling action was deemed illegal.


--- layout: page title: Lean Prover Zulip Chat Archive permalink: archive/144837PRreviews/71905406detisamonoidhom.html ---
I just created a new PR that proves that det is a monoid_hom. I suggest closing #375.
det


Livecodelab is a special secret place where you can make fancy "on-the-fly" 3d visuals and play awesomely offbeat (literally) sounds. "On-the-fly" meaning: as you type. Type just three letters: "box", and boom! a box appears. No clicking play, no waiting, no nothing. What are you waiting for? Try the magic. Press the button below and play with the examples.
Gaaaa don't we all love screenshooooots. These are from the "making of" and old/new examples. For many more (and much bigger) screenshots see the screenshots page here.
Livecodelab was made possible by heaps of people smarter than us, including:


int MPI_Reduce_scatter_block(void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
MPI_REDUCE_SCATTER_BLOCK(SENDBUF, RECVBUF, RECVCOUNT, DATATYPE, OP, COMM, IERROR)
{ void MPI::Comm::Reduce_scatter_block(const void* sendbuf, void* recvbuf, int recvcount, const MPI::Datatype& datatype, const MPI::Op& op) const = 0 (binding deprecated, see Section Deprecated since MPI-2.2
) }
If comm is an intracommunicator, MPI_REDUCE_SCATTER_BLOCK
first performs a global, element-wise reduction on vectors of count = n*recvcount
The MPI_REDUCE_SCATTER_BLOCK routine is functionally equivalent to:
an MPI_REDUCE collective operation with count equal to recvcount* n
If comm is an intercommunicator, then the result of the reduction of the data provided
by processes in one group (group A) is scattered among processes in the other group (group B) and vice versa.
Within each group, all processes provide the same value for the recvcount argument,
and provide input vectors of count = n*recvcount
The last restriction is needed so that the length of the send buffer of one group can be
determined by the local recvcount argument of the other group.
Otherwise, a communication is needed to figure out how many elements are reduced.
( End of rationale.)
MPI_REDUCE_SCATTER_BLOCK( sendbuf, recvbuf, recvcount,
datatype, op, comm) IN sendbuf starting address of send buffer (choice) OUT recvbuf starting address of receive buffer (choice) IN recvcount element count per block (non-negative integer) IN datatype data type of elements of send and receive buffers (handle) IN op operation (handle) IN comm communicator (handle)
<type> SENDBUF(*), RECVBUF(*)
INTEGER RECVCOUNT, DATATYPE, OP, COMM, IERROR
Advice
to implementors.
The ``in place'' option for intracommunictors is specified by passing MPI_IN_PLACE
in the sendbuf argument on all processes.
In this case, the input data is taken from the receive buffer.
Rationale.
Up: Reduce-Scatter
Next: MPI_REDUCE_SCATTER
Previous: Reduce-Scatter
Return to MPI-2.2 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-2.2 of September 4, 2009
HTML Generated on September 10, 2009


Attendance
The Constitution specifies that a majority of members constitutes a quorum to do business in each house.
Representatives and senators rarely force the presence of a quorum by demanding quorum calls; thus, in most
cases, debates continue even if a majority is not present.
The Senate uses roll-call votes; a clerk calls out the names of all the senators, each senator stating "aye"
or
"no" when his or her name is announced. The House reserves roll-call votes for the most formal matters, as a
roll-call of all 435 representatives takes quite some time; normally, members vote by electronic device. In
the
case of a tie, the motion in question fails. In the Senate, the Vice President may (if present) cast the
tiebreaking vote.
Senate at a glance
| Party |
Number of Reps |
% Voted with Prty |
| Republican |
|
| Democrat |
| Independent |
Least Engaged (Bottom 10% Attendance)
| Name |
Number of Missed Votes |
% Missed |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
Most Engaged (Top 10% Attendance)
| Name |
Number of Missed Votes |
% Missed |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |
| -- |
-- |
-- |


Onion prices skyrocket, reach Rs 100/kg in Delhi
Union Food and Consumer Affairs Minister Ram Vilas Paswan has assured that the government is taking all steps to contain the price rise.
The prices of onions, which are skyrocketing due to low procurement from producing states, have reached to Rs 100 per kilogram in Delhi, The Indian Express has reported.
According to the report, the prices are increasing despite a dip in the wholesale prices of the kitchen staple. Following a continuous hike for three weeks in the wholesale markets across Nashik, considered the onion belt of Maharashtra, the price was corrected by Rs 1,000 per quintal on November 6.
The average traded price of onion at Lasalgaon market, India’s largest wholesale onion market, was Rs 4,300 per quintal on November 6 — almost Rs 1,000 correction from the price of Rs 5,501 per quintal it traded on November 4, the report said.
Meanwhile, Union Food and Consumer Affairs Minister Ram Vilas Paswan has assured that the government is taking all steps to contain the price rise.
In view of high prices, Paswan reviewed the situation of demand, supply and prices with top officials of food and consumer affairs departments for two hours at his residence on November 6. The secretaries of both departments were present.
"We have reviewed the onion availability and price situation. Prices have gone up as production (kharif onion) has declined by 30-40 percent in the country," Paswan told reporters.
There was a delay in sowing of kharif onion because of late arrival of monsoon and later floods in many states damaged the crop, he said.
Stating that prices fluctuate depending on supply-demand, Paswan said currently, there is mismatch in this. However, the government is taking measures to improve availability and check prices.
"We are concerned about the situation and the government is trying its best. We have taken maximum steps," he said.
(With inputs from PTI)
Special Thursday Expiry on 10th 7th Nov
Early Closure to The Great Diwali Discount. Last Chance to get Moneycontrol PRO for a year @ Rs. 289/- only
Coupon code: DIWALI


Found 23 results
You have 14 new notifications
You have 12 new messages
Here will be a configuration form


Finally, we assess the sea-level legacy of temporarily exceeding a 1.5 °C warming level 3, 23, which is at times referred to as temperature overshoot. The time of overshoot relates quasi-linearly to median sea-level rise in 2300 for net-zero GHG scenarios, adding ~4 cm of median sea-level rise per 10 years overshoot above 1.5 °C (Fig. 5a). Net-zero CO 2 scenarios show that without balancing other GHG emissions through negative CO 2 emissions, median sea-level rise above 1.5 m is possible for temperature stabilization below 2 °C. No scenario in our set shows median sea-level rise below 1.2 m by 2300 once its global-mean temperatures pass the 1.5 °C level (Fig. 5a, half-filled markers). Another way to look at overshoots is by considering the integrated overshoot temperature over time. When this overshoot integral is larger than 60 °C·yr (Fig. 5b), the difference in year 2300 median sea-level rise between net-zero GHG and net-zero CO 2 scenarios disappears. This equivalence can be understood by looking at the characteristic temperature evolution in both scenario subsets (Fig. 1). Net-zero CO 2 scenarios consistent with the Paris Agreement exhibit small but persistent overshoot, while net-zero GHG scenarios show higher but shorter overshoots. At an integral overshoot value larger than 60 °C·yr, the additional early sea-level rise pulse during the high overshoot in net-zero GHG scenarios cannot be compensated through lower rates of sea-level rise later due to declining temperatures until 2300. Only a limited amount of sea-level rise can be avoided through falling temperatures over multiple centuries.
Sea-level rise in 2300 and temperature overshoot above 1.5 °C. a Median sea-level rise versus the temporal overshoot in years. b Median sea-level rise versus the time integral of the temperature overshoot. Half-filled markers indicate net-zero CO 2 scenarios, filled markers net-zero GHG scenarios. Gray crosses show net-zero GHG scenarios that do not comply with the 2 °C target of the Paris Agreement. Rate in legend refers to the rate of emissions reductions after the emissions peak in GtC yr −2. The grouping of net-zero CO 2 scenarios exceeding 1.5 °C in the upper-right corner of a reflects the length of our simulations and is of limited significance


{% include "includes/account-name-number.html" %}
View funds
Manage your funds including how much you have available to spend, your transactions and funds you could lose
Add apprentices
Add apprentices, review and approve cohorts
Manage apprentices
Pause or stop apprentices and review apprentices that need your attention
Find training
Search for new apprenticeship training or find out about choosing an assessor
Manage team
Add and change people who have access to this service.
To do:
Forecast: not completed
Requests that need your attention: 5
Review your apprentices
Requests to change apprentice details: 50
Review the changes
Apprentices that failed double lock: 12
Update details
Staff with access to account: 1
Grant access to others


| 1 | package fr.sii.ogham.core.util; | |
| 2 | ||
| 3 | /** | |
| 4 | * <p> | |
| 5 | * Assists in implementing Object.hashCode() methods. | |
| 6 | * </p> | |
| 7 | * | |
| 8 | * <p> | |
| 9 | * This class enables a good hashCode method to be built for any class. It | |
| 10 | * follows the rules laid out in the book Effective Java by Joshua Bloch. | |
| 11 | * Writing a good hashCode method is actually quite difficult. This class aims | |
| 12 | * to simplify the process. | |
| 13 | * </p> | |
| 14 | * | |
| 15 | * <p> | |
| 16 | * The following is the approach taken. When appending a data field, the current | |
| 17 | * total is multiplied by the multiplier then a relevant value for that data | |
| 18 | * type is added. For example, if the current hashCode is 17, and the multiplier | |
| 19 | * is 37, then appending the integer 45 will create a hashcode of 674, namely 17 | |
| 20 | * * 37 + 45. | |
| 21 | * </p> | |
| 22 | * | |
| 23 | * <p> | |
| 24 | * All relevant fields from the object should be included in the hashCode | |
| 25 | * method. Derived fields may be excluded. In general, any field used in the | |
| 26 | * equals method must be used in the hashCode method. | |
| 27 | * </p> | |
| 28 | * | |
| 29 | * <p> | |
| 30 | * To use this class write code as follows: | |
| 31 | * </p> | |
| 32 | * | |
| 33 | * <pre> | |
| 34 | * public class Person { | |
| 35 | * String name; | |
| 36 | * int age; | |
| 37 | * boolean smoker; | |
| 38 | * ... | |
| 39 | * | |
| 40 | * public int hashCode() { | |
| 41 | * // you pick a hard-coded, randomly chosen, non-zero, odd number | |
| 42 | * // ideally different for each class | |
| 43 | * return new HashCodeBuilder(17, 37). | |
| 44 | * append(name). | |
| 45 | * append(age). | |
| 46 | * append(smoker). | |
| 47 | * hashCode(); | |
| 48 | * } | |
| 49 | * } | |
| 50 | * </pre> | |
| 51 | * <p> | |
| 52 | * If required, the superclass hashCode() can be added using appendSuper. | |
| 53 | * </p> | |
| 54 | * | |
| 55 | * <p> | |
| 56 | * Alternatively, there is a method that uses reflection to determine the fields | |
| 57 | * to test. Because these fields are usually private, the method, | |
| 58 | * reflectionHashCode, uses AccessibleObject.setAccessible to change the | |
| 59 | * visibility of the fields. This will fail under a security manager, unless the | |
| 60 | * appropriate permissions are set up correctly. It is also slower than testing | |
| 61 | * explicitly. | |
| 62 | * </p> | |
| 63 | * | |
| 64 | * <p> | |
| 65 | * A typical invocation for this method would look like: | |
| 66 | * </p> | |
| 67 | * | |
| 68 | * <pre> | |
| 69 | * public int hashCode() { | |
| 70 | * return HashCodeBuilder.reflectionHashCode(this); | |
| 71 | * } | |
| 72 | * </pre> | |
| 73 | * | |
| 74 | * @author Aurélien Baudet | |
| 75 | * | |
| 76 | */ | |
| 77 | public class HashCodeBuilder { | |
| 78 | private org.apache.commons.lang3.builder.HashCodeBuilder delegate; | |
| 79 | ||
| 80 | /** | |
| 81 | * <p> | |
| 82 | * Two randomly chosen, odd numbers must be passed in. Ideally these should | |
| 83 | * be different for each class, however this is not vital. | |
| 84 | * </p> | |
| 85 | * | |
| 86 | * <p> | |
| 87 | * Prime numbers are preferred, especially for the multiplier. | |
| 88 | * </p> | |
| 89 | * | |
| 90 | * @param initialOddNumber | |
| 91 | * an odd number used as the initial value | |
| 92 | * @param multiplierOddNumber | |
| 93 | * an odd number used as the multiplier | |
| 94 | * @throws IllegalArgumentException | |
| 95 | * if the number is even | |
| 96 | */ | |
| 97 | public HashCodeBuilder(int initialOddNumber, int multiplierOddNumber) { | |
| 98 | super(); | |
| 99 | delegate = new org.apache.commons.lang3.builder.HashCodeBuilder(initialOddNumber, multiplierOddNumber); | |
| 100 | } | |
| 101 | ||
| 102 | /** | |
| 103 | * Uses two hard coded choices for the constants needed to build a hashCode. | |
| 104 | */ | |
| 105 | public HashCodeBuilder() { | |
| 106 | super(); | |
| 107 | delegate = new org.apache.commons.lang3.builder.HashCodeBuilder(); | |
| 108 | } | |
| 109 | ||
| 110 | /** | |
| 111 | * Append a hashCode for an Object. | |
| 112 | * | |
| 113 | * @param objectValue | |
| 114 | * the Object to add to the hashCode | |
| 115 | * @return used to chain calls | |
| 116 | */ | |
| 117 | public HashCodeBuilder append(Object objectValue) { | |
| 118 | delegate.append(objectValue); | |
| 119 |
1
1. append : replaced return value with null for fr/sii/ogham/core/util/HashCodeBuilder::append → RUN_ERROR |
return this; |
| 120 | } | |
| 121 | ||
| 122 | /** | |
| 123 | * Append a hashCode for an Object. | |
| 124 | * | |
| 125 | * @param objectValues | |
| 126 | * array of Object to add to the hashCode | |
| 127 | * @return used to chain calls | |
| 128 | */ | |
| 129 | public HashCodeBuilder append(Object... objectValues) { | |
| 130 | for(Object objectValue : objectValues) { | |
| 131 | append(objectValue); | |
| 132 | } | |
| 133 |
1
1. append : replaced return value with null for fr/sii/ogham/core/util/HashCodeBuilder::append → RUN_ERROR |
return this; |
| 134 | } | |
| 135 | ||
| 136 | /** | |
| 137 | * Adds the result of super.hashCode() to this builder. | |
| 138 | * | |
| 139 | * @param superHashCode | |
| 140 | * the result of calling super.hashCode() | |
| 141 | * @return used to chain calls | |
| 142 | */ | |
| 143 | public HashCodeBuilder appendSuper(int superHashCode) { | |
| 144 | delegate.appendSuper(superHashCode); | |
| 145 |
1
1. appendSuper : replaced return value with null for fr/sii/ogham/core/util/HashCodeBuilder::appendSuper → NO_COVERAGE |
return this; |
| 146 | } | |
| 147 | ||
| 148 | /** | |
| 149 | * The generated hash code | |
| 150 | * | |
| 151 | * @return the generated hashcode | |
| 152 | */ | |
| 153 | public int hashCode() { | |
| 154 |
1
1. hashCode : replaced int return with 0 for fr/sii/ogham/core/util/HashCodeBuilder::hashCode → RUN_ERROR |
return delegate.hashCode(); |
| 155 | } | |
| 156 | | |
| 157 | @Override | |
| 158 | public boolean equals(Object obj) { | |
| 159 |
2
1. equals : replaced boolean return with false for fr/sii/ogham/core/util/HashCodeBuilder::equals → NO_COVERAGE 2. equals : replaced boolean return with true for fr/sii/ogham/core/util/HashCodeBuilder::equals → NO_COVERAGE |
return delegate.equals(obj); |
| 160 | } | |
| 161 | | |
| 162 | /** | |
| 163 | * <p> | |
| 164 | * Uses reflection to build a valid hash code from the fields of object. | |
| 165 | * </p> | |
| 166 | * | |
| 167 | * <p> | |
| 168 | * This constructor uses two hard coded choices for the constants needed to | |
| 169 | * build a hash code. | |
| 170 | * </p> | |
| 171 | * | |
| 172 | * <p> | |
| 173 | * It uses AccessibleObject.setAccessible to gain access to private fields. | |
| 174 | * This means that it will throw a security exception if run under a | |
| 175 | * security manager, if the permissions are not set up correctly. It is also | |
| 176 | * not as efficient as testing explicitly. | |
| 177 | * </p> | |
| 178 | * | |
| 179 | * <p> | |
| 180 | * Transient members will be not be used, as they are likely derived fields, | |
| 181 | * and not part of the value of the Object. | |
| 182 | * </p> | |
| 183 | * | |
| 184 | * <p> | |
| 185 | * Static fields will not be tested. Superclass fields will be included. If | |
| 186 | * no fields are found to include in the hash code, the result of this | |
| 187 | * method will be constant. | |
| 188 | * </p> | |
| 189 | * | |
| 190 | * @param object | |
| 191 | * the Object to create a hashCode for | |
| 192 | * @param excludeFields | |
| 193 | * array of field names to exclude from use in calculation of | |
| 194 | * hash code | |
| 195 | * @return hash code | |
| 196 | * @throws IllegalArgumentException | |
| 197 | * if the object is null | |
| 198 | */ | |
| 199 | public static int reflectionsHashCode(Object object, String... excludeFields) { | |
| 200 |
1
1. reflectionsHashCode : replaced int return with 0 for fr/sii/ogham/core/util/HashCodeBuilder::reflectionsHashCode → NO_COVERAGE |
return org.apache.commons.lang3.builder.HashCodeBuilder.reflectionHashCode(object, excludeFields); |
| 201 | } | |
| 202 | ||
| 203 | } | |
Mutations | ||
| 119 |
1.1 |
|
| 133 |
1.1 |
|
| 145 |
1.1 |
|
| 154 |
1.1 |
|
| 159 |
1.1 2.2 |
|
| 200 |
1.1 |


Updated by Tushar on
The Best Tech Deals you shouldn't miss...
Today we bring some technology goods and accessories from the best sellers category which you will like.
Here we compare and suggest you the best tech goods in your budget. Products shown here are the best seller products sorted by us on different websites in different categories based on their performance and their features.


{% extends 'layouts/base.html' %} {% block content %}
UniTea is an online platform for students to form and join study groups for their classes or interests.
We believe that "Teamwork Makes The Dreamwork!" We provide an environment to make that dream a reality.
Once you have registered an account with us, all that's left is to create your own study group and you're ready to go!


Summer Thoughts
It is the morning of July 8th and I just now have time to sit down with some coffee and put some thoughts down that have been flying through my head for the last 10 days or so. This will be more like a “digest” blog post with some half-started thoughts on a few different topics.
- While visiting my family last week in Kentucky, we decided to go out for dinner at the Cracker Barrel. My parents love the Cracker Barrel and its turned into somewhat of a tradition for us when my wife and I are in town. We were chatting and waiting for our food when my wife nudged me and pointed to the table next to us where all three people were sitting silently, engrossed in their games on two iPhones and an iPad.
via jjprojects, Flickr CC
Don’t get me wrong, I’ve done my share of gaming while waiting on the train or bus in Seoul, but it made me kind of sad seeing a family out, but not enjoying each other’s company. Technology can really do a lot to bring people together…but this showed me how powerful it can also be at isolation. I’m all for using technology in schools, in parks, in libraries, wherever. But, as a teacher, it is my responsibility to teach learners that technology is a tool and it should not completely take place of face to face interaction. I have to model the ability to put the phone away when I’m with another person.
Technology can bring two people together from opposite corners of the world. But, it can also separate two people just as far even when they’re in the same room.
- My in-laws got me a new pair of binoculars for my birthday this year, which is great. I’ve never really owned a good pair and I’m excited to be able to start doing some new things. I’ve always been into astronomy and I’m planning on doing some more amateur stargazing with the binoculars. As I get better, I want to get into some small telescopes and then even hooking those up to my computer to do some nighttime photography. I inherited a 300mm Nikkor zoom lens a couple of years ago from a job and I took it outside last night to play with it a little bit. I took a picture of the moon that I’m really proud of and I’m afraid I’m already addicted to this new hobby.
As always, learning something new pointed two things out to me: A) the pride of discovery and creation that I felt last night with that photo is exactly what I want my students to experience throughout the year, and B) when I had no idea how to photograph the moon, I went to YouTube and looked it up. We all like the chance to check out tutorials online when they’re learning new things…the same goes for me. There is a great blog post from a follower I have on twitter, @MrSchwen about how the flipped class is not only beneficial to students, but that it can benefit teachers as well. I would write more on this, but he covered it really well…I suggest you go check it out.
- I need to be outside more. I miss Seoul and being in the city, but being home in the country has really helped remind me how much I appreciate open spaces. Being able to walk around barefoot in the backyard has done wonders for me this summer. Having the summer off is a blessing for teachers.  I do have an itch to get back to work, but I do appreciate and enjoy the break. Take some time today to go outside and get some grass stains on your knees…you won’t regret it.
Written on
July
8th,
2011
by
Brian Bennett
Categorized in:
All
Technology
Tagged:
Feel free to share!
Leave a comment


{% include 'header.html' %}
{% if done == '1' %}
Thank you!
You will receive an email very soon containing your PIN code
Fill in the form below to register a new resource
You will receive a PIN code that will allow you to update this information anytime


Executable models are constructed under a model of computation, which is the set of "laws of physics" that govern the interaction of components in the model. If the model is describing a mechanical system, then the model of computation may literally be the laws of physics. More commonly, however, it is a set of rules that are more abstract, and provide a framework within which a designer builds models. A set of rules that govern the interaction of components is called the semantics of the model of computation.
Ptolemy II is third-generation software that supports this style of modeling and design. The objective is to support the construction and interoperability of executable models that are built under a wide variety of models of computation. Ptolemy II is written entirely in Java, and aims to support the construction of applets, servlets, migrating code, and embedded Java.
This document is an evolving design document for Ptolemy II. It describes the design principles and design decisions. It is meant to complement, not replace, the code documentation.


Find Your Career For Life
Team Members: Joe Meskin and Brandon Bustos
Last Updated on Sprint 5 on 11/7/2020
Project Proposal
We plan to utilize the information that we obtained during Sprint 4 making Matchmaker to create
a website that will allow you to find the best career path for you between Aviation, Nursing,
and Computer Science.
Priority Features
- Website accessible through a domain name
- A comprehensive list of questions to determine a compatible career path
- Have the Matchmaker program run on the website
Secondary Features
- A complex weighting system that allows for multiple desired answers
- Have a functioning validate function
Languages and Platforms Utilized
Languages and Platforms Utilized
We are going to build upon the Matchmaker program we already made in Sprint 4 as well as the website we
created in Sprint 2. The programming that goes beyond what we have learned is combining the the two
projects and provinding a domain name


DEAD MAN WALKING A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): *** 1/2
DEAD MAN WALKING is a carefully crafted filmed by writer, director, and co-producer Tim Robbins. It tells the story of a convicted murder and rapist named Matthew Poncelet (Sean Penn). He has been on death row in Louisiana for six years and is soon to be executed after numerous appeals to the state and federal courts. DEAD MAN WALKING is purported to be an evenhanded view of both sides of the capital punishment issue. More on how successful the film is at that later in the review. This show is much more than a message movie, and it contains some incredible performances. Whether your feelings on the death penalty are strong one way or another or even if you simply don't have an opinion, this film will move you and challenge you to think about your beliefs and values.
The movie is based on an autobiography by Sister Helen Prejean. The characters in the story are not real, but rather are fictional compositions of similar ones she has known. Susan Sarandon plays Sister Helen and getting to know her through Saradon's Academy Award quality performance makes your time at the movies special. The many other marvelous aspects to the film enhance your movie going experience even more.
Matthew Poncelet committed his crime in 1988. He and his buddy found two teenagers kissing in a car in a wooded lovers lane area.  As a teenager, I once had a stranger try to come into my car in the same circumstance and in a similar wooded place. We got away, but even today I am frighten when I think about what could have happened. Certainly for me, this movie rang true, and it was easy to identify with the victims. As a parent, it was also even to identify with the parents in the movie. Chilling real.
Sister Helen works in a poor black ghetto, but gets a letter from Poncelet in prison and goes to visit him. She is scared and uneasy in her first visit ever to a prison, but agrees to help him file new appeals and find him a new lawyer. In this and every scene Sarandon is nothing short of incredible. She manages to be reserved, but show her emotion with her expressions and her soft but effective speech. Other actresses and other directors would have overdone the nun's role. Here her outward uneasiness and trepidation is conquered by her inner courage. A tour de force acting performance by Sarandon.
Penn is terrific as a prisoner.  The audience is quickly convinced that this guy did it. Nevertheless, he claims he only watched while his buddy did the rape and the murders. His buddy, of course, claims just the opposite is true. On one level the movie is about whether Poncelet will get his execution postponed and whether he really did it or not. Most of the film however reminded me more of MY DINNER WITH ANDRE than any other film. Sister Helen and Poncelet have long conversations about everything from racism to Jesus and salvation.
The director sets a slow and deliberate pace where there are a lot of natural pauses in the conversations. In a mediocre movie, this technique is the kiss of death as it rapidly gives rise to boredom, but here it allows the audience to contemplate the meaning of the excellent script. The sound effects editing of the movie is unusual. There is little ambient noise in most scenes causing the dialog to be accentuated much as a room with only a single picture focuses the viewer attention on it.
The movie shows the nuns as real people who are not afraid to laugh, and the script has several quite natural jokes. When Sister Helen gets stopped by a state trooper (Clancy Brown from THE SHAWSHANK REDEMPTION), he says, "You're a nun. I gave a ticket to an IRS agent one time. I got audited the next year. I don't think I'll give you a ticket."
The actors and actresses playing the victim's families (Raymond J. Barry, R. Lee Ermey, etc.) are some of the strongest minor characters I have seen in a long time. Their discussions of why there should be a death penalty contribute to the picture's attempt at evenhandedness. The Academy Award quality editing (Lisa Zeno Churgin) provides another pro-death penalty argument. It is hard to watch the flashbacks of the rape and the murders interlaced with photos of the victims growing up and not want Poncelet to die. On the other hand, I still think the script and most of the movie is so sympathetic to the killer that is a flawed attempt at evenhandedness. The audience ends up wanting the killer to live. There was major weeping in my audience.
I did not find Robert Prosky's role as lawyer Hilton Barber very effective. He gave his usual performance unchanged from many other movies he has been in. Clearly the weakest character of the lot.
The script is brilliant. There so many examples that is hard to know where to start. When Sister Helen first meets Poncelet and he comes on to her, she tells him, "Look at you.  The mother of the girl victim speaking about the last time she saw her daughter says, "You don't know when a child leaves, it will be the last time you'll ever see her again. If I'd known this, I'd of told her I loved her." When Sister Helen asks Poncelet if he isn't sorry for the parents of the victim, he answers that "It's hard to have much sympathy with the parents when they are trying to kill me". Toward the end he tells Sister Helen, "It's quiet. Only three days left. Plenty of time to read my Bible and look for a loophole." When the male victim's father asks Sister Helen how she has the faith to do what she does, she replies, "It's not faith, its work."
The cinematography (Roger Deakins) is slow, deliberate, and intimate just like the script. Watch especially how the camera moves during the naturally lit scenes in the victims' houses. The sets (Richard Hoover) and the costumes (Renee Ehrlich Kalfus) are extremely accurate in recreating poor Southern whites and their houses. Penn's attire and make-up help create his character before he even speaks. There is little use of music (David Robbins), but what there is has a wonderful reverential feel.
I had two guys sitting behind me talking some. When I realized they looked like the death row inmates in the movie, I decided I would let them talk without interruption.
I do have some criticisms of the movie. First, it is too sympathetic to the killer. Watch how they make him into Christ at the end. Second, the black ghetto was made to seem like too much fun.  I have been to ghettos before, and Robbin's vision is not realistic. Third, the lawyer claims that Poncelet's chances are a thousand to one. Given the large ratio of people on death row to those actually ever executed, the odds are that most convicted killers will never be executed even if there are initially sentenced to die. Finally, having Poncelet be such a racist that he gets on TV while he is trying to get the governor to pardon him and proclaim that, "Hitler was on the right track that the Aryan was the master race," is a bit much hard to belief. I think in those circumstances, he would have held his tongue.
DEAD MAN WALKING runs an absorbing but slow and deliberately paced 2:02. I would not have changed the pacing at all, and I hope to see the editor win lots of awards. It is rated R for rape and murder. It is a realistic show, but should be fine for teenagers interested in serious material. I strongly recommend this film to you, and I give it *** 1/2.
**** = One of the top few films of this or any year. A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show.  Totally unbearable.
REVIEW WRITTEN ON: January 23, 1996
Opinions expressed are mine and not meant to reflect my employer's.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


invoice
No.#00126
Client
- Ahmed Fahmy Ebrahim
-<EMAIL_ADDRESS>- 101 s first banh texas mail 4590st, TX, 76598
-<PHONE_NUMBER>1
Date08 AUG 2019
Due09 AUG 2019
| production name | quantity | price | amount |
|---|---|---|---|
| production description | 3 | 100 eg | 55 |
| production description | 3 | 100 eg | 55 |
| production description | 3 | 100 eg | 55 |
| production description | 3 | 100 eg | 55 |
thank you for choosing us


The Kukui Cup: Lights off, game on!
There appears to have been an error processing your request. The administrators have been notified, but if you wish to provide additional information, please send us an
email
.
Back to the home page


SHE'S ALL THAT Reviewed by Jamie Peck
A familiar story is spun under a fast pace and little else, true, but at least award "All That" a bag of chips for exuding endless charm and enthusiasm out of a cast of hot up-and-comers. The particularly appealing lead performers here are Freddie Prinze Jr. ("I Know What You Did Last Summer") and Rachael Leigh Cook (the infamous "This is your brain on heroin" commercial), respectively well-cast as popular jock Zack and nerdish outcast Laney, senior schoolmates in sunny So Cal. Taking a cue from "My Fair Lady"'s Henry Higgins, a bet is suggested that Zack can't turn Laney into the class queen with just eight weeks left until the prom. He accepts and pursues. She scratches her head at the sudden attention.
It's a given that this star-crossed twosome is going to fall in actual love, especially after she snips off her weird hairdo and trades in her frumpy overalls for a hot little red number. The source of suspense then hinges on whether or not Laney will learn of the unfortunate wager, and if so, whether or not there's still a happy ending waiting in the wings for our mismatched protagonists. Like, duh. The results of this eventually sticky dilemma is just as paint-by-numbers predictable as everything that comes before it, a shortcoming that wouldn't be as big if "She's All That" had supplanted the mechanics of its ho-hum narrative with more real imagination and wit.
Still, there are plenty of lively elements discovered amongst the clutter, and chief among them are the deft actors. "Scream"'s Matthew Lillard is a scream as a pugnacious former star of MTV's "The Real World" who plays a central but secondary role in the Zack-Laney courtship; Paul Walker ("Varsity Blues") and Jodi Lyn O'Keefe ("Halloween: H20") also have fun with their villain roles even as they fail to make much sense. And the unexpected tweaking of seemingly "ordinary" moments also provide welcome distraction, like a nicely choreographed dance sequence, numerous jabs at pop culture and the running commentary of a campus deejay (R&B star Usher Raymond) that seems to function as a Greek chorus.
The eventual sum of honest goodies like these elevates "She's All That" to a standing more notable than, as teen entertainment goes, at least half of the WB's hit youth-oriented programming. (And speaking of the WB, "Buffy" fans will adore that the Slayer herself, Sarah Michelle Gellar, contributes an amusing, wordless cameo. Talk about a movie counting on its target viewers.) Even the film's broad attempts to satisfy all tastes end up creating an oddly amiable combo of fairy tale ambitions, coarse potty humor and quite a bit more. It's like planning to go to the prom with Mel Gibson, getting Mel Brooks for some of the evening, and wanting to stick around to see how things turn out.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Hi and welcome! As part of our hiring process we'd like to get an idea of your technical skill level, as well as your ability to analyze and solve computing problems. And that's where this Exercise comes into play. It is designed to test some parts of your skillset, and hopefully provide us with a glimpse at your abilities.
At Roamler, we deal with a lot of locations. Each available task has a location and as you can imagine, this adds up. Since we are operating in an ever growing number of countries, the number of locations, as well as the number of users requesting information about them, is rising steadily. In fact, our live system currently contains almost 1 million locations already! Going through all of these locations to provide users with the relevant ones is tricky, which makes it a perfect Exercise!
You are tasked with developing a system that allows us to query the locations. The architecture and inner workings of this system are up to you, it could be one class, or it could have many. Design it as you would a real project.
You are free to choose the interface of the system, but it should provide a function similar to this:
SearchResult GetLocations(Location location, int maxDistance, int maxResults);
The exercise package contains some files to get you started.  The Code directory contains a basic location class. You can use this for calculating distances between locations. You can use it as-is, or you can just take the distance function from it. It's up to you!
As you might've noticed, we've kept the requirements and instructions a bit fuzzy, this is intentional. We want to see how you approach this kind of a problem. If you have any questions though, let me know! When you have completed the Exercise, send the finished product to<EMAIL_ADDRESS>Good luck!
Dennis Meelker