Results for: "tally"

Returns value if value is exists. If the value does not exist, this method returns nil.

tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
  puts "#{variable.name} #{variable.value}"
end

The result of above script is following:
  xlChart = -4109
  xlDialogSheet = -4116
  xlExcel4IntlMacroSheet = 4
  xlExcel4MacroSheet = 3
  xlWorksheet = -4167

Returns Ruby object value from OLE variant.

obj = WIN32OLE_VARIANT.new(1, WIN32OLE::VARIANT::VT_BSTR)
obj.value # => "1" (not Integer object, but String object "1")

Sets variant value to val. If the val type does not match variant value type(vartype), then val is changed to match variant value type(vartype) before setting val. This method is not available when vartype is VT_ARRAY(except VT_UI1|VT_ARRAY). If the vartype is VT_UI1|VT_ARRAY, the val should be String object.

obj = WIN32OLE_VARIANT.new(1) # obj.vartype is WIN32OLE::VARIANT::VT_I4
obj.value = 3.2 # 3.2 is changed to 3 when setting value.
p obj.value # => 3

Total number of input bytes read so far.

Total number of output bytes output so far.

Reads at most maxlen bytes from the gziped stream but it blocks only if gzipreader has no data immediately available. If the optional outbuf argument is present, it must reference a String, which will receive the data. It raises EOFError on end of file.

Returns true if stat is writable by the effective user id of this process.

File.stat("testfile").writable?   #=> true

Returns true if stat is executable or if the operating system doesn’t distinguish executable files from nonexecutable files. The tests are made using the effective owner of the process.

File.stat("testfile").executable?   #=> false

Iterates over values and objects in a weakly referenced object

Returns whether the buffer data is accessible.

A buffer becomes invalid if it is a slice of another buffer which has been freed.

If the buffer was freed with free or was never allocated in the first place.

The buffer is external if it references the memory which is not allocated or mapped by the buffer itself.

A buffer created using ::for has an external reference to the string’s memory.

External buffer can’t be resized.

If the buffer is internal, meaning it references memory allocated by the buffer itself.

An internal buffer is not associated with any external memory (e.g. string) or file mapping.

Internal buffers are created using ::new and is the default when the requested size is less than the IO::Buffer::PAGE_SIZE and it was not requested to be mapped on creation.

Internal buffers can be resized, and such an operation will typically invalidate all slices, but not always.

If the buffer is read only, meaning the buffer cannot be modified using set_value, set_string or copy and similar.

Frozen strings and read-only files create read-only buffers.

Returns an array of values of data_type starting from offset.

If count is given, only count values will be returned.

Example:

IO::Buffer.for("Hello World").values(:U8, 2, 2)
# => [108, 108]

Evaluates the instruction sequence and returns the result.

RubyVM::InstructionSequence.compile("1 + 2").eval #=> 3

Returns the value or list of values for this cookie.

Replaces the value of this cookie with a new value or list of values.

Set whether the Cookie is a httponly cookie or not.

val must be a boolean.

No documentation available
No documentation available
No documentation available

Is this server alive?

No documentation available

Creates a new Net::HTTP object, http, via Net::HTTP.new:

Net::HTTP.new(address, port, p_addr, p_port, p_user, p_pass)

Note: If port is nil and opts[:use_ssl] is a truthy value, the value passed to new is Net::HTTP.https_default_port, not port.

With no block given:

With a block given:

Example:

hostname = 'jsonplaceholder.typicode.com'
Net::HTTP.start(hostname) do |http|
  puts http.get('/todos/1').body
  puts http.get('/todos/2').body
end

Output:

{
  "userId": 1,
  "id": 1,
  "title": "delectus aut autem",
  "completed": false
}
{
  "userId": 1,
  "id": 2,
  "title": "quis ut nam facilis et officia qui",
  "completed": false
}

If the last argument given is a hash, it is the opts hash, where each key is a method or accessor to be called, and its value is the value to be set.

The keys may include:

Search took: 4ms  ·  Total Results: 1206