class ARGF
ARGF
is a stream designed for use in scripts that process
files given as command-line arguments or passed in via STDIN.
The arguments passed to your script are stored in the ARGV
Array, one argument per element. ARGF
assumes that any
arguments that aren't filenames have been removed from
ARGV
. For example:
$ ruby argf.rb --verbose file1 file2 ARGV #=> ["--verbose", "file1", "file2"] option = ARGV.shift #=> "--verbose" ARGV #=> ["file1", "file2"]
You can now use ARGF
to work with a concatenation of each of
these named files. For instance, ARGF.read
will return the
contents of file1 followed by the contents of file2.
After a file in ARGV
has been read ARGF
removes
it from the Array. Thus, after all files have been read ARGV
will be empty.
You can manipulate ARGV
yourself to control what
ARGF
operates on. If you remove a file from ARGV
,
it is ignored by ARGF
; if you add files to ARGV
,
they are treated as if they were named on the command line. For example:
ARGV.replace ["file1"] ARGF.readlines # Returns the contents of file1 as an Array ARGV #=> [] ARGV.replace ["file2", "file3"] ARGF.read # Returns the contents of file2 and file3
If ARGV
is empty, ARGF
acts as if it contained
STDIN, i.e. the data piped to your script. For example:
$ echo "glark" | ruby -e 'p ARGF.read' "glark\n"
Public Instance Methods
Returns the ARGV
array, which contains the arguments passed to
your script, one per element.
For example:
$ ruby argf.rb -v glark.txt ARGF.argv #=> ["-v", "glark.txt"]
static VALUE argf_argv(VALUE argf) { return ARGF.argv; }
Puts ARGF
into binary mode. Once a stream is in binary mode,
it cannot be reset to non-binary mode. This option has the following
effects:
-
Newline conversion is disabled.
-
Encoding conversion is disabled.
-
Content is treated as ASCII-8BIT.
static VALUE argf_binmode_m(VALUE argf) { ARGF.binmode = 1; next_argv(); ARGF_FORWARD(0, 0); rb_io_ascii8bit_binmode(ARGF.current_file); return argf; }
Returns true if ARGF
is being read in binary mode; false
otherwise. To enable binary mode use ARGF.binmode
.
For example:
ARGF.binmode? #=> false ARGF.binmode ARGF.binmode? #=> true
static VALUE argf_binmode_p(VALUE argf) { return ARGF.binmode ? Qtrue : Qfalse; }
This is a deprecated alias for each_byte
.
static VALUE argf_bytes(VALUE argf) { rb_warn("ARGF#bytes is deprecated; use #each_byte instead"); if (!rb_block_given_p()) return rb_enumeratorize(argf, ID2SYM(rb_intern("each_byte")), 0, 0); return argf_each_byte(argf); }
This is a deprecated alias for each_char
.
static VALUE argf_chars(VALUE argf) { rb_warn("ARGF#chars is deprecated; use #each_char instead"); if (!rb_block_given_p()) return rb_enumeratorize(argf, ID2SYM(rb_intern("each_char")), 0, 0); return argf_each_char(argf); }
Closes the current file and skips to the next file in ARGV. If there are no
more files to open, just closes the current file. STDIN
will
not be closed.
For example:
$ ruby argf.rb foo bar ARGF.filename #=> "foo" ARGF.close ARGF.filename #=> "bar" ARGF.close
static VALUE argf_close_m(VALUE argf) { next_argv(); argf_close(argf); if (ARGF.next_p != -1) { ARGF.next_p = 1; } ARGF.lineno = 0; return argf; }
Returns true if the current file has been closed; false
otherwise. Use ARGF.close
to actually close the current file.
static VALUE argf_closed(VALUE argf) { next_argv(); ARGF_FORWARD(0, 0); return rb_io_closed(ARGF.current_file); }
This is a deprecated alias for each_codepoint
.
static VALUE argf_codepoints(VALUE argf) { rb_warn("ARGF#codepoints is deprecated; use #each_codepoint instead"); if (!rb_block_given_p()) return rb_enumeratorize(argf, ID2SYM(rb_intern("each_codepoint")), 0, 0); return argf_each_codepoint(argf); }
Returns an enumerator which iterates over each line (separated by
sep, which defaults to your platform's newline character) of
each file in ARGV
. If a block is supplied, each line in turn
will be yielded to the block, otherwise an enumerator is returned. The
optional limit argument is an Integer
specifying the
maximum length of each line; longer lines will be split according to this
limit.
This method allows you to treat the files supplied on the command line as a
single file consisting of the concatenation of each named file. After the
last line of the first file has been returned, the first line of the second
file is returned. The ARGF.filename
and
ARGF.lineno
methods can be used to determine the filename and
line number, respectively, of the current line.
For example, the following code prints out each line of each named file prefixed with its line number, displaying the filename once per file:
ARGF.each_line do |line| puts ARGF.filename if ARGF.lineno == 1 puts "#{ARGF.lineno}: #{line}" end
static VALUE argf_each_line(int argc, VALUE *argv, VALUE argf) { RETURN_ENUMERATOR(argf, argc, argv); FOREACH_ARGF() { argf_block_call_line(rb_intern("each_line"), argc, argv, argf); } return argf; }
Iterates over each byte of each file in ARGV
. A byte is
returned as an Integer
in the range 0..255.
This method allows you to treat the files supplied on the command line as a
single file consisting of the concatenation of each named file. After the
last byte of the first file has been returned, the first byte of the second
file is returned. The ARGF.filename
method can be used to
determine the filename of the current byte.
If no block is given, an enumerator is returned instead.
For example:
ARGF.bytes.to_a #=> [35, 32, ... 95, 10]
static VALUE argf_each_byte(VALUE argf) { RETURN_ENUMERATOR(argf, 0, 0); FOREACH_ARGF() { argf_block_call(rb_intern("each_byte"), 0, 0, argf); } return argf; }
Iterates over each character of each file in ARGF
.
This method allows you to treat the files supplied on the command line as a
single file consisting of the concatenation of each named file. After the
last character of the first file has been returned, the first character of
the second file is returned. The ARGF.filename
method can be
used to determine the name of the file in which the current character
appears.
If no block is given, an enumerator is returned instead.
static VALUE argf_each_char(VALUE argf) { RETURN_ENUMERATOR(argf, 0, 0); FOREACH_ARGF() { argf_block_call(rb_intern("each_char"), 0, 0, argf); } return argf; }
Iterates over each codepoint of each file in ARGF
.
This method allows you to treat the files supplied on the command line as a
single file consisting of the concatenation of each named file. After the
last codepoint of the first file has been returned, the first codepoint of
the second file is returned. The ARGF.filename
method can be
used to determine the name of the file in which the current codepoint
appears.
If no block is given, an enumerator is returned instead.
static VALUE argf_each_codepoint(VALUE argf) { RETURN_ENUMERATOR(argf, 0, 0); FOREACH_ARGF() { argf_block_call(rb_intern("each_codepoint"), 0, 0, argf); } return argf; }
Returns an enumerator which iterates over each line (separated by
sep, which defaults to your platform's newline character) of
each file in ARGV
. If a block is supplied, each line in turn
will be yielded to the block, otherwise an enumerator is returned. The
optional limit argument is an Integer
specifying the
maximum length of each line; longer lines will be split according to this
limit.
This method allows you to treat the files supplied on the command line as a
single file consisting of the concatenation of each named file. After the
last line of the first file has been returned, the first line of the second
file is returned. The ARGF.filename
and
ARGF.lineno
methods can be used to determine the filename and
line number, respectively, of the current line.
For example, the following code prints out each line of each named file prefixed with its line number, displaying the filename once per file:
ARGF.each_line do |line| puts ARGF.filename if ARGF.lineno == 1 puts "#{ARGF.lineno}: #{line}" end
static VALUE argf_each_line(int argc, VALUE *argv, VALUE argf) { RETURN_ENUMERATOR(argf, argc, argv); FOREACH_ARGF() { argf_block_call_line(rb_intern("each_line"), argc, argv, argf); } return argf; }
Returns true if the current file in ARGF
is at end of file,
i.e. it has no data to read. The stream must be opened for reading or an
IOError
will be raised.
$ echo "eof" | ruby argf.rb ARGF.eof? #=> false 3.times { ARGF.readchar } ARGF.eof? #=> false ARGF.readchar #=> "\n" ARGF.eof? #=> true
static VALUE argf_eof(VALUE argf) { next_argv(); if (RTEST(ARGF.current_file)) { if (ARGF.init_p == 0) return Qtrue; next_argv(); ARGF_FORWARD(0, 0); if (rb_io_eof(ARGF.current_file)) { return Qtrue; } } return Qfalse; }
Returns true if the current file in ARGF
is at end of file,
i.e. it has no data to read. The stream must be opened for reading or an
IOError
will be raised.
$ echo "eof" | ruby argf.rb ARGF.eof? #=> false 3.times { ARGF.readchar } ARGF.eof? #=> false ARGF.readchar #=> "\n" ARGF.eof? #=> true
static VALUE argf_eof(VALUE argf) { next_argv(); if (RTEST(ARGF.current_file)) { if (ARGF.init_p == 0) return Qtrue; next_argv(); ARGF_FORWARD(0, 0); if (rb_io_eof(ARGF.current_file)) { return Qtrue; } } return Qfalse; }
Returns the external encoding for files read from ARGF
as an
Encoding
object. The external encoding is the encoding of the
text as stored in a file. Contrast with
ARGF.internal_encoding
, which is the encoding used to
represent this text within Ruby.
To set the external encoding use ARGF.set_encoding
.
For example:
ARGF.external_encoding #=> #<Encoding:UTF-8>
static VALUE argf_external_encoding(VALUE argf) { if (!RTEST(ARGF.current_file)) { return rb_enc_from_encoding(rb_default_external_encoding()); } return rb_io_external_encoding(rb_io_check_io(ARGF.current_file)); }
Returns the current file as an IO
or File
object.
#<IO:<STDIN>>
is returned when the current file is
STDIN.
For example:
$ echo "foo" > foo $ echo "bar" > bar $ ruby argf.rb foo bar ARGF.file #=> #<File:foo> ARGF.read(5) #=> "foo\nb" ARGF.file #=> #<File:bar>
static VALUE argf_file(VALUE argf) { next_argv(); return ARGF.current_file; }
Returns the current filename. “-” is returned when the current file is STDIN.
For example:
$ echo "foo" > foo $ echo "bar" > bar $ echo "glark" > glark $ ruby argf.rb foo bar glark ARGF.filename #=> "foo" ARGF.read(5) #=> "foo\nb" ARGF.filename #=> "bar" ARGF.skip ARGF.filename #=> "glark"
static VALUE argf_filename(VALUE argf) { next_argv(); return ARGF.filename; }
Returns an integer representing the numeric file descriptor for the current
file. Raises an ArgumentError
if there isn't a current
file.
ARGF.fileno #=> 3
static VALUE argf_fileno(VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream"); } ARGF_FORWARD(0, 0); return rb_io_fileno(ARGF.current_file); }
Gets the next 8-bit byte (0..255) from ARGF
. Returns
nil
if called at the end of the stream.
For example:
$ echo "foo" > file $ ruby argf.rb file ARGF.getbyte #=> 102 ARGF.getbyte #=> 111 ARGF.getbyte #=> 111 ARGF.getbyte #=> 10 ARGF.getbyte #=> nil
static VALUE argf_getbyte(VALUE argf) { VALUE ch; retry: if (!next_argv()) return Qnil; if (!RB_TYPE_P(ARGF.current_file, T_FILE)) { ch = rb_funcall3(ARGF.current_file, rb_intern("getbyte"), 0, 0); } else { ch = rb_io_getbyte(ARGF.current_file); } if (NIL_P(ch) && ARGF.next_p != -1) { argf_close(argf); ARGF.next_p = 1; goto retry; } return ch; }
Reads the next character from ARGF
and returns it as a
String
. Returns nil
at the end of the stream.
ARGF
treats the files named on the command line as a single
file created by concatenating their contents. After returning the last
character of the first file, it returns the first character of the second
file, and so on.
For example:
$ echo "foo" > file $ ruby argf.rb file ARGF.getc #=> "f" ARGF.getc #=> "o" ARGF.getc #=> "o" ARGF.getc #=> "\n" ARGF.getc #=> nil ARGF.getc #=> nil
static VALUE argf_getc(VALUE argf) { VALUE ch; retry: if (!next_argv()) return Qnil; if (ARGF_GENERIC_INPUT_P()) { ch = rb_funcall3(ARGF.current_file, rb_intern("getc"), 0, 0); } else { ch = rb_io_getc(ARGF.current_file); } if (NIL_P(ch) && ARGF.next_p != -1) { argf_close(argf); ARGF.next_p = 1; goto retry; } return ch; }
Returns the next line from the current file in ARGF
.
By default lines are assumed to be separated by $/
; to use a
different character as a separator, supply it as a String
for
the sep argument.
The optional limit argument specifies how many characters of each line to return. By default all characters are returned.
static VALUE argf_gets(int argc, VALUE *argv, VALUE argf) { VALUE line; line = argf_getline(argc, argv, argf); rb_lastline_set(line); return line; }
Returns the file extension appended to the names of modified files under
in-place edit mode. This value can be set using
ARGF.inplace_mode=
or passing the -i
switch to
the Ruby binary.
static VALUE argf_inplace_mode_get(VALUE argf) { if (!ARGF.inplace) return Qnil; return rb_str_new2(ARGF.inplace); }
Sets the filename extension for in-place editing mode to the given String. Each file being edited has this value appended to its filename. The modified file is saved under this new name.
For example:
$ ruby argf.rb file.txt ARGF.inplace_mode = '.bak' ARGF.each_line do |line| print line.sub("foo","bar") end
Each line of file.txt has the first occurrence of “foo” replaced with “bar”, then the new line is written out to file.txt.bak.
static VALUE argf_inplace_mode_set(VALUE argf, VALUE val) { if (rb_safe_level() >= 1 && OBJ_TAINTED(val)) rb_insecure_operation(); if (!RTEST(val)) { if (ARGF.inplace) free(ARGF.inplace); ARGF.inplace = 0; } else { StringValue(val); if (ARGF.inplace) free(ARGF.inplace); ARGF.inplace = 0; ARGF.inplace = strdup(RSTRING_PTR(val)); } return argf; }
Returns the internal encoding for strings read from ARGF
as an
Encoding
object.
If ARGF.set_encoding
has been called with two encoding names,
the second is returned. Otherwise, if
Encoding.default_external
has been set, that value is
returned. Failing that, if a default external encoding was specified on the
command-line, that value is used. If the encoding is unknown,
nil
is returned.
static VALUE argf_internal_encoding(VALUE argf) { if (!RTEST(ARGF.current_file)) { return rb_enc_from_encoding(rb_default_external_encoding()); } return rb_io_internal_encoding(rb_io_check_io(ARGF.current_file)); }
Returns the current line number of ARGF as a whole.
This value can be set manually with ARGF.lineno=
.
For example:
ARGF.lineno #=> 0 ARGF.readline #=> "This is line 1\n" ARGF.lineno #=> 1
static VALUE argf_lineno(VALUE argf) { return INT2FIX(ARGF.lineno); }
Sets the line number of ARGF
as a whole to the given
Integer
.
ARGF
sets the line number automatically as you read data, so
normally you will not need to set it explicitly. To access the current line
number use ARGF.lineno
.
For example:
ARGF.lineno #=> 0 ARGF.readline #=> "This is line 1\n" ARGF.lineno #=> 1 ARGF.lineno = 0 #=> 0 ARGF.lineno #=> 0
static VALUE argf_set_lineno(VALUE argf, VALUE val) { ARGF.lineno = NUM2INT(val); ARGF.last_lineno = ARGF.lineno; return Qnil; }
This is a deprecated alias for each_line
.
static VALUE argf_lines(int argc, VALUE *argv, VALUE argf) { rb_warn("ARGF#lines is deprecated; use #each_line instead"); if (!rb_block_given_p()) return rb_enumeratorize(argf, ID2SYM(rb_intern("each_line")), argc, argv); return argf_each_line(argc, argv, argf); }
Returns the current filename. “-” is returned when the current file is STDIN.
For example:
$ echo "foo" > foo $ echo "bar" > bar $ echo "glark" > glark $ ruby argf.rb foo bar glark ARGF.filename #=> "foo" ARGF.read(5) #=> "foo\nb" ARGF.filename #=> "bar" ARGF.skip ARGF.filename #=> "glark"
static VALUE argf_filename(VALUE argf) { next_argv(); return ARGF.filename; }
Returns the current offset (in bytes) of the current file in
ARGF
.
ARGF.pos #=> 0 ARGF.gets #=> "This is line one\n" ARGF.pos #=> 17
static VALUE argf_tell(VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to tell"); } ARGF_FORWARD(0, 0); return rb_io_tell(ARGF.current_file); }
Seeks to the position given by position (in bytes) in
ARGF
.
For example:
ARGF.pos = 17 ARGF.gets #=> "This is line two\n"
static VALUE argf_set_pos(VALUE argf, VALUE offset) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to set position"); } ARGF_FORWARD(1, &offset); return rb_io_set_pos(ARGF.current_file, offset); }
Writes the given object(s) to ios. Returns nil
.
The stream must be opened for writing. Each given object that isn't a
string will be converted by calling its to_s
method. When
called without arguments, prints the contents of $_
.
If the output field separator ($,
) is not nil
, it
is inserted between objects. If the output record separator
($\
) is not nil
, it is appended to the output.
$stdout.print("This is ", 100, " percent.\n")
produces:
This is 100 percent.
VALUE rb_io_print(int argc, const VALUE *argv, VALUE out) { int i; VALUE line; /* if no argument given, print `$_' */ if (argc == 0) { argc = 1; line = rb_lastline_get(); argv = &line; } for (i=0; i<argc; i++) { if (!NIL_P(rb_output_fs) && i>0) { rb_io_write(out, rb_output_fs); } rb_io_write(out, argv[i]); } if (argc > 0 && !NIL_P(rb_output_rs)) { rb_io_write(out, rb_output_rs); } return Qnil; }
Formats and writes to ios, converting parameters under control of
the format string. See Kernel#sprintf
for details.
VALUE rb_io_printf(int argc, const VALUE *argv, VALUE out) { rb_io_write(out, rb_f_sprintf(argc, argv)); return Qnil; }
If obj is Numeric
, write the character whose code is
the least-significant byte of obj, otherwise write the first byte
of the string representation of obj to ios. Note: This
method is not safe for use with multi-byte characters as it will truncate
them.
$stdout.putc "A" $stdout.putc 65
produces:
AA
static VALUE rb_io_putc(VALUE io, VALUE ch) { VALUE str; if (RB_TYPE_P(ch, T_STRING)) { str = rb_str_substr(ch, 0, 1); } else { char c = NUM2CHR(ch); str = rb_str_new(&c, 1); } rb_io_write(io, str); return ch; }
Writes the given object(s) to ios. Writes a newline after any that
do not already end with a newline sequence. Returns nil
.
The stream must be opened for writing. If called with an array argument,
writes each element on a new line. Each given object that isn't a
string or array will be converted by calling its to_s
method.
If called without arguments, outputs a single newline.
$stdout.puts("this", "is", ["a", "test"])
produces:
this is a test
Note that puts
always uses newlines and is not affected by the
output record separator ($\
).
VALUE rb_io_puts(int argc, const VALUE *argv, VALUE out) { int i; VALUE line; /* if no argument given, print newline. */ if (argc == 0) { rb_io_write(out, rb_default_rs); return Qnil; } for (i=0; i<argc; i++) { if (RB_TYPE_P(argv[i], T_STRING)) { line = argv[i]; goto string; } if (rb_exec_recursive(io_puts_ary, argv[i], out)) { continue; } line = rb_obj_as_string(argv[i]); string: rb_io_write(out, line); if (RSTRING_LEN(line) == 0 || !str_end_with_asciichar(line, '\n')) { rb_io_write(out, rb_default_rs); } } return Qnil; }
Reads length bytes from ARGF. The files named on the command line are concatenated and treated as a single file by this method, so when called without arguments the contents of this pseudo file are returned in their entirety.
length must be a non-negative integer or nil
.
If length is a positive integer, read
tries to read
length bytes without any conversion (binary mode). It returns
nil
if an EOF is encountered before anything can be read.
Fewer than length bytes are returned if an EOF is encountered
during the read. In the case of an integer length, the resulting
string is always in ASCII-8BIT encoding.
If length is omitted or is nil
, it reads until EOF
and the encoding conversion is applied, if applicable. A string is returned
even if EOF is encountered before any data is read.
If length is zero, it returns an empty string
(""
).
If the optional outbuf argument is present, it must reference a String, which will receive the data. The outbuf will contain only the received data after the method call even if it is not empty at the beginning.
For example:
$ echo "small" > small.txt $ echo "large" > large.txt $ ./glark.rb small.txt large.txt ARGF.read #=> "small\nlarge" ARGF.read(200) #=> "small\nlarge" ARGF.read(2) #=> "sm" ARGF.read(0) #=> ""
Note that this method behaves like the fread() function in C. This means it retries to invoke read(2) system calls to read data with the specified length. If you need the behavior like a single read(2) system call, consider #readpartial or #read_nonblock.
static VALUE argf_read(int argc, VALUE *argv, VALUE argf) { VALUE tmp, str, length; long len = 0; rb_scan_args(argc, argv, "02", &length, &str); if (!NIL_P(length)) { len = NUM2LONG(argv[0]); } if (!NIL_P(str)) { StringValue(str); rb_str_resize(str,0); argv[1] = Qnil; } retry: if (!next_argv()) { return str; } if (ARGF_GENERIC_INPUT_P()) { tmp = argf_forward(argc, argv, argf); } else { tmp = io_read(argc, argv, ARGF.current_file); } if (NIL_P(str)) str = tmp; else if (!NIL_P(tmp)) rb_str_append(str, tmp); if (NIL_P(tmp) || NIL_P(length)) { if (ARGF.next_p != -1) { argf_close(argf); ARGF.next_p = 1; goto retry; } } else if (argc >= 1) { long slen = RSTRING_LEN(str); if (slen < len) { len -= slen; argv[0] = INT2NUM(len); goto retry; } } return str; }
Reads at most maxlen bytes from the ARGF stream in non-blocking mode.
static VALUE argf_read_nonblock(int argc, VALUE *argv, VALUE argf) { VALUE opts; rb_scan_args(argc, argv, "11:", NULL, NULL, &opts); if (!NIL_P(opts)) argc--; return argf_getpartial(argc, argv, argf, opts, 1); }
Reads the next 8-bit byte from ARGF and returns it
as an Integer
. Raises an EOFError
after the last
byte of the last file has been read.
For example:
$ echo "foo" > file $ ruby argf.rb file ARGF.readbyte #=> 102 ARGF.readbyte #=> 111 ARGF.readbyte #=> 111 ARGF.readbyte #=> 10 ARGF.readbyte #=> end of file reached (EOFError)
static VALUE argf_readbyte(VALUE argf) { VALUE c; NEXT_ARGF_FORWARD(0, 0); c = argf_getbyte(argf); if (NIL_P(c)) { rb_eof_error(); } return c; }
Reads the next character from ARGF
and returns it as a
String
. Raises an EOFError
after the last
character of the last file has been read.
For example:
$ echo "foo" > file $ ruby argf.rb file ARGF.readchar #=> "f" ARGF.readchar #=> "o" ARGF.readchar #=> "o" ARGF.readchar #=> "\n" ARGF.readchar #=> end of file reached (EOFError)
static VALUE argf_readchar(VALUE argf) { VALUE ch; retry: if (!next_argv()) rb_eof_error(); if (!RB_TYPE_P(ARGF.current_file, T_FILE)) { ch = rb_funcall3(ARGF.current_file, rb_intern("getc"), 0, 0); } else { ch = rb_io_getc(ARGF.current_file); } if (NIL_P(ch) && ARGF.next_p != -1) { argf_close(argf); ARGF.next_p = 1; goto retry; } return ch; }
Returns the next line from the current file in ARGF
.
By default lines are assumed to be separated by $/
; to use a
different character as a separator, supply it as a String
for
the sep argument.
The optional limit argument specifies how many characters of each line to return. By default all characters are returned.
An EOFError
is raised at the end of the file.
static VALUE argf_readline(int argc, VALUE *argv, VALUE argf) { VALUE line; if (!next_argv()) rb_eof_error(); ARGF_FORWARD(argc, argv); line = argf_gets(argc, argv, argf); if (NIL_P(line)) { rb_eof_error(); } return line; }
Reads ARGF
's current file in its entirety, returning an
Array
of its lines, one line per element. Lines are assumed to
be separated by sep.
lines = ARGF.readlines lines[0] #=> "This is line one\n"
static VALUE argf_readlines(int argc, VALUE *argv, VALUE argf) { long lineno = ARGF.lineno; VALUE lines, ary; ary = rb_ary_new(); while (next_argv()) { if (ARGF_GENERIC_INPUT_P()) { lines = rb_funcall3(ARGF.current_file, rb_intern("readlines"), argc, argv); } else { lines = rb_io_readlines(argc, argv, ARGF.current_file); argf_close(argf); } ARGF.next_p = 1; rb_ary_concat(ary, lines); ARGF.lineno = lineno + RARRAY_LEN(ary); ARGF.last_lineno = ARGF.lineno; } ARGF.init_p = 0; return ary; }
Reads at most maxlen bytes from the ARGF stream.
If the optional outbuf argument is present, it must reference a String, which will receive the data. The outbuf will contain only the received data after the method call even if it is not empty at the beginning.
It raises EOFError
on end of ARGF
stream. Since ARGF stream is a concatenation of
multiple files, internally EOF is occur for each file. #readpartial returns empty
strings for EOFs except the last one and raises EOFError
for
the last one.
static VALUE argf_readpartial(int argc, VALUE *argv, VALUE argf) { return argf_getpartial(argc, argv, argf, Qnil, 0); }
Positions the current file to the beginning of input, resetting
ARGF.lineno
to zero.
ARGF.readline #=> "This is line one\n" ARGF.rewind #=> 0 ARGF.lineno #=> 0 ARGF.readline #=> "This is line one\n"
static VALUE argf_rewind(VALUE argf) { VALUE ret; int old_lineno; if (!next_argv()) { rb_raise(rb_eArgError, "no stream to rewind"); } ARGF_FORWARD(0, 0); old_lineno = RFILE(ARGF.current_file)->fptr->lineno; ret = rb_io_rewind(ARGF.current_file); if (!global_argf_p(argf)) { ARGF.last_lineno = ARGF.lineno -= old_lineno; } return ret; }
Seeks to offset amount (an Integer
) in the
ARGF
stream according to the value of whence. See IO#seek for further details.
static VALUE argf_seek_m(int argc, VALUE *argv, VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to seek"); } ARGF_FORWARD(argc, argv); return rb_io_seek_m(argc, argv, ARGF.current_file); }
If single argument is specified, strings read from ARGF are tagged with the encoding specified.
If two encoding names separated by a colon are given, e.g. “ascii:utf-8”, the read string is converted from the first encoding (external encoding) to the second encoding (internal encoding), then tagged with the second encoding.
If two arguments are specified, they must be encoding objects or encoding names. Again, the first specifies the external encoding; the second specifies the internal encoding.
If the external encoding and the internal encoding are specified, the
optional Hash
argument can be used to adjust the conversion
process. The structure of this hash is explained in the String#encode documentation.
For example:
ARGF.set_encoding('ascii') # Tag the input as US-ASCII text ARGF.set_encoding(Encoding::UTF_8) # Tag the input as UTF-8 text ARGF.set_encoding('utf-8','ascii') # Transcode the input from US-ASCII # to UTF-8.
static VALUE argf_set_encoding(int argc, VALUE *argv, VALUE argf) { rb_io_t *fptr; if (!next_argv()) { rb_raise(rb_eArgError, "no stream to set encoding"); } rb_io_set_encoding(argc, argv, ARGF.current_file); GetOpenFile(ARGF.current_file, fptr); ARGF.encs = fptr->encs; return argf; }
Sets the current file to the next file in ARGV. If there aren't any more files it has no effect.
For example:
$ ruby argf.rb foo bar ARGF.filename #=> "foo" ARGF.skip ARGF.filename #=> "bar"
static VALUE argf_skip(VALUE argf) { if (ARGF.init_p && ARGF.next_p == 0) { argf_close(argf); ARGF.next_p = 1; } return argf; }
Returns the current offset (in bytes) of the current file in
ARGF
.
ARGF.pos #=> 0 ARGF.gets #=> "This is line one\n" ARGF.pos #=> 17
static VALUE argf_tell(VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to tell"); } ARGF_FORWARD(0, 0); return rb_io_tell(ARGF.current_file); }
Reads ARGF
's current file in its entirety, returning an
Array
of its lines, one line per element. Lines are assumed to
be separated by sep.
lines = ARGF.readlines lines[0] #=> "This is line one\n"
static VALUE argf_readlines(int argc, VALUE *argv, VALUE argf) { long lineno = ARGF.lineno; VALUE lines, ary; ary = rb_ary_new(); while (next_argv()) { if (ARGF_GENERIC_INPUT_P()) { lines = rb_funcall3(ARGF.current_file, rb_intern("readlines"), argc, argv); } else { lines = rb_io_readlines(argc, argv, ARGF.current_file); argf_close(argf); } ARGF.next_p = 1; rb_ary_concat(ary, lines); ARGF.lineno = lineno + RARRAY_LEN(ary); ARGF.last_lineno = ARGF.lineno; } ARGF.init_p = 0; return ary; }
Returns an integer representing the numeric file descriptor for the current
file. Raises an ArgumentError
if there isn't a current
file.
ARGF.fileno #=> 3
static VALUE argf_fileno(VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream"); } ARGF_FORWARD(0, 0); return rb_io_fileno(ARGF.current_file); }
Returns an IO
object representing the current file. This will
be a File
object unless the current file is a stream such as
STDIN.
For example:
ARGF.to_io #=> #<File:glark.txt> ARGF.to_io #=> #<IO:<STDIN>>
static VALUE argf_to_io(VALUE argf) { next_argv(); ARGF_FORWARD(0, 0); return ARGF.current_file; }
Returns “ARGF”.
static VALUE argf_to_s(VALUE argf) { return rb_str_new2("ARGF"); }
Returns IO instance tied to ARGF for writing if inplace mode is enabled.
static VALUE argf_write_io(VALUE argf) { if (!RTEST(ARGF.current_file)) { rb_raise(rb_eIOError, "not opened for writing"); } return GetWriteIO(ARGF.current_file); }
Writes string if inplace mode.
static VALUE argf_write(VALUE argf, VALUE str) { return rb_io_write(argf_write_io(argf), str); }


Documentation for libximc library.
Libximc is thread safe, cross-platform library for working with 8SMC4-USB and 8SMC5-USB controllers.
Full documentation about controllers is there
Full documentation about libximc API is available on the page ximc.h.
What the controller does.
- Supports input and output synchronization signals to ensure the joint operation of multiple devices within a complex system ;.
- Works with all compact stepper motors with a winding current of up to 3 A, without feedback, as well as with stepper motors equipped with an encoder in the feedback circuit, including a linear encoder on the positioner.
- Manages hardware using ready-made software or using libraries for programming languages: C / C ++, C #, JAVA, Visual Basic, Python 2/3, .NET, Delphi, integration with MS Visual Studio programming environments, gcc, Xcode.
- Works with scientific development environments by integrating LabVIEW and MATLAB;
What can do libximc library
- Libximc manages hardware using interfaces: USB 2.0., RS232 and Ethernet, also uses a common and proven virtual serial port interface, so you can work with motor control modules through this library under almost all operating systems, including Windows, Linux and Mac OS X
- Libximc library supports plug/unplug on the fly. Each device can be controlled only by one program at once. Multiple processes (programs) that control one device simultaneously are not allowed.
- Warning
- Libximc library opens the controller in exclusive access mode. Any controller opened with libximc (XiLab also uses this library) needs to be closed before it may be used by another process. So at first check that you have closed XiLab or other software dealing with the controller before trying to reopen the controller.
Please read the Introduction to start work with library.
To use libximc in your project please consult with How to use with...
Assistance.
Many thanks to everyone who sends suggestions, errors and ideas. We appreciate your suggestions and try to make our product better. Please post your questions here. Your ideas and comments send a e-mail: 8smc4.nosp@m.@sta.nosp@m.nda.l.nosp@m.t


Testing. Wednesday 2pm.
Quick test for date/time.
2018-02-26
Testing.
2018-03-02
Just some photos for testing.
Test Saturday.
Another test.
Testing.
Test with Jekyll 3.0.
Testing back to regular site.
Testing from new version.
We posted this week’s Core Intuition. Some of my favorite episodes are when Daniel and I talk through an issue unplanned and reach some insight, which happened on this one. Hope you enjoy it!
Test photos.
Testing.
Testing. Test. Test.
Quick test.
Testing lists:
Hmm.
Test for Wednessday morning.
Test.
2018-02-26
2018-03-02
Testing. Hello.


Curriculum Vitae
General Information
| Full Name | Andreea Bobu |
| Contact | abobu [at] berkeley [dot] edu |
| Languages | Romanian (native), English (fluent), French (intermediate), German (beginner), Turkish (beginner) |
Education
-
2017 - now
University of California Berkeley – Ph.D. in Computer Science
- Advised by Prof. Anca D. Dragan
- GPA: 4.0 (4.0 scale)
-
2013 - 2017
Massachusetts Institute of Technology – B.S. in Computer Science and Engineering
- Advised by Prof. Polina Golland, Prof. Stefanie Jegelka, and Prof. Adrian Dalca
- GPA: 5.0 (5.0 scale)
Work Experience
-
Summer 2018
&
Spring 2019Software Engineering Intern at Google Research
- Expander team in Google Research , Mountain View, CA, USA
- Research in semi-supervised learning combining deep learning and graphs.
-
Summer 2016
Software Engineering Intern at Google X
- Self-Driving Car team in Google X , Mountain View, CA, USA
- Undisclosed Machine Learning projects for the Google self-driving car.
-
Summer 2014
Software Developer Intern at Microsoft
- Cortana team at Microsoft Corporation, Redmond, WA, USA
- Undisclosed Machine Learning project for Cortana, Windows Phone’s digital personal assistant.
Research Experience
-
2017 - now
Machine Learning for understanding how the brain produces speech
- Carnegie Mellon University, Pittsburgh, PA, USA
- Advised by Prof. Tom M. Mitchell and Dr. Barnabàs Pòczos
- Developing Machine Learning models that analyze neural activity signals (ECoG and Local Field Potentials) in order to understand how different properties of speech are represented in the brain, which can have major consequences for the treatment of many neurological disorders, such as Parkinson’s disease.
-
2018
Monte Carlo methods for question answering
- Carnegie Mellon University, Pittsburgh, PA, USA
- Advised by Dr. Barnabàs Pòczos
- Using Monte Carlo Tree Search to answer natural language questions, using background knowledge represented as a graph.
-
2016 - 2017
Machine Learning for understanding meaning representation in the brain
- Carnegie Mellon University, Pittsburgh, PA, USA
- Advised by Dr. Barnabàs Pòczos and Prof. Tom M. Mitchell
- Developed Machine Learning models that combine neural activity time series of different modalities. The goal was to use brain activity recordings, such as fMRI, EEG and MEG, to understand how the brain processes language. I focused on Deep Learning models, such as recurrent neural networks.
-
2014 - 2015
Computer Vision for unsupervised object discovery in video
- Carnegie Mellon University, Pittsburgh, PA, USA
- Advised by Dr. Marius Leordeanu
- Unsupervised object discovery in video based on multiple frames matching. We also proposed a fast method for detecting the main object of interest in a video, titled VideoPCA.
-
Summer 2013
Research Internship in Machine Learning at EPFL
- École Polytechnique Fédérale de Lausanne, Laboratory for Probabilistic Machine Learning
- Advised by Dr. Matthias Seeger
- Used topic models to explore the correlation between social media messages from Twitter and the location of the users, with applications to user profiling, topic tracking and content recommendation. I was responsible with applying various machine learning models and parallelizing the code in order to scale well.
-
Summer 2013
Research for Undergraduates Program
- Politehnica University of Timisoara, Romania
- Advised by Prof. Emilia Petrisor
- Implemented algorithms for spectral clustering of nodes in a graph, based on minimum graph cut, with applications to data mining and statistics, such as clustering information from documents on the web and medical images segmentation.
Honors and Awards
-
Fellowships
- Center for Machine Learning and Health (CMLH) Fellowship in Digital Health (2018)
-
Scholarships
-
Awards
- Best poster award at the Eastern European Machine Learning Summer School in Bucharest, Romania (2019)
- Machine Learning Department Teaching Assistant Award (2018)
- Carnegie Mellon University Neurohackathon: 2nd place (2017)
- KTH University Programming Challenge, Sweden: Top 10 contestants (2013)
- ACM International Collegiate Programming Contest (ACM-ICPC): Honorable Mention in Southeastern European Regional (2013, 2012, 2011)
- Microsoft Imagine Cup: Top 20 in the World Finals (2012), 1st team in the Romanian National Finals (2012)
- Romanian National Olympiad in Informatics: Gold Medal (2008), Bronze Medal (2010), 1st Place (2004), 2nd Place (2005), Honorable Mention (2010, 2008, 2007, 2003)
- Kangaroo International Mathematical Competition: 2nd prize in Romanian National Finals (2009, 2010)
Teaching Experience
-
Spring 2018
Teaching Assistant for Graduate Machine Learning
- Graduate level introduction to machine learning class 10-701 Graduate Machine Learning at Carnegie Mellon University
- Taught by Prof. Pradeep Ravikumar and Prof. Manuela Veloso
- I was awarded a Machine Learning Department Teaching Assistant Award
-
Fall 2017
Teaching Assistant for Topics in Deep Learning
- Graduate level deep learning class 10-707 Topics in Deep Learning at Carnegie Mellon University
- Taught by Prof. Ruslan Salakhutdinov
-
2013-14
Teaching algorithms for competitive programming
- Co-organized a competitive programming seminar at Politehnica University of Timisoara for university and high-school students interested to train for algorithmic competitions (e.g. ACM-ICPC, informatics olympiad).
- Taught algorithms and data structures used in competitive programming, designed and solved practice problems and internal competitions.
Computer skills
- ○ Programming languages: C, C++, Python, Matlab, Java.
- ○ Data Structures and Algorithms: Familiarity with concepts used in algorithmic competitions and machine learning research.
- ○ Frameworks: Tensorflow, NumPy, SciPy, Pandas.
- ○ Database Systems: MySQL.
Technical Projects
-
LiveX Learning Platform
- Tutoring system for kindergarten and school children based on a software platform that runs in the cloud, Windows Phone 7 devices and a set of electronic learning cubes called “IQubes” (our hardware invention).
- Project proposed by our team, called IQube, that competed in the world finals of the Microsoft Imagine Cup competition.
-
Face and Hand Gesture Recognition for Human - Computer Interaction
- Framework for C++ developers to extend their graphical user interfaces with more natural means of communication.
- Works in real-time using a computer web camera.
-
Public Transport Route Recommendation
- Python application for the Timisoara city public transport system using real-time information from GPS devices installed on public transport vehicles.
- Overlays optimal routes suggestions on Google Maps (before they supported such a feature).
-
Handwritten digits recognition
- C library implementing various linear algebra methods.
Leadership and Volunteering Activities
-
2019
- Organizing a workshop on Adaptive & Multitask Learning at ICML 2019.
-
2018 - now
- Founding member of the AI+ Club at Carnegie Mellon University (CMU).
-
2018 - now
- Program Committees: ICML (2019), AISTATS (2019, 2020), ICLR (2018, 2020), ICLR-LLD (2019), PLOS ONE (2019).
-
2018 - 2019
- Treasurer of the Romanian Students Association at CMU.
-
2016 - now
- Member of the Doctoral Review Committee of the Machine Learning Department at CMU.
-
2016 - now
- Member of the Education Review Committee of the Machine Learning Department at CMU, which aims to improve the PhD program.
-
2016 - 2018
- President of the Romanian Students Association at CMU.
-
2011 - 2012
- Student representative in the faculty leadership board at Politehnica University of Timisoara.
-
2010 - 2011
- Volunteer for AIESEC, international youth organization.
-
2010 - 2012
- Volunteer for Liga AC, student organization at Politehnica University.
Other Interests
- Sports: squash, volleyball, tennis, climbing, hiking
- Hobbies: traveling, painting, movies


VOTING ELECTORAL SYSTEM
BLOCKCHAIN tech
Vote
Statistics
Blockchain
Statistics
Load Statistics
{{ error }}
{{ success }}


{% load staticfiles %} {% load staticfiles %}
{% if id == 'index' %}Chronic kidney disease (CKD) is a phrase that embraces the majority of renal conditions. It can be thought of as a thief that works quietly at night, without creating any disturbance. CKD is quite often found by accident when the doctor carries out tests to investigate something else say a routine employment medical screening and then discovers signs of kidney disease at an early or moderate stage
If the problem is not discovered, eventually your body will let you know as well as being ill,the lifestyle you and your family enjoy changes, even your life could be at risk. By this stage it is often too late for any effective preventative measures and a form of renal replacement therapy becomes a life-saving treatment.
At the same time, diagnosis and prevention benefits the heart and circulatory system by controlling high blood pressure, high cholesterol in the blood and encouraging everyone to embrace a healthy lifestyle.
Too often we take our kidneys (like the rest of our bodies) for granted. Because our kidneys work quietly for us in the background, we tend to think this is always so and that our kidneys are indestructible. Without knowing the full implications of CKD it is so easy to be complacent about our precious health, sometimes with devastating consequences.
Just a few simple medical checks can lead to an early diagnosis of potential kidney problems and treatments can be extremely efficient. Improvements are frequent. In all cases the progress of these conditions can be very much reduced and possibly even halted.
{{ review.username }}
KDIGO guidelines are created, reviewed, published and implemented following a rigorous scientific process.
| Zone | No. Of Dialysis Centers | No. Of Dialysis Machines | No. Of Dialysis per Month | Cost Of Dialysis per Session | No. of Transplant Centers | No. of Transplant per Month |
|---|---|---|---|---|---|---|
| North | 229 | 1106 | 50,560 | 1250 | 26 | 85 |
| South | 306 | 1453 | 85,440 | 1100 | 88 | 117 |
| East | 108 | 430 | 27,050 | 1350 | 15 | 25 |
| West | 175 | 1000 | 90,000 | 1000 | 37 | 71 |
Lack of registries makes an accurate estimation of the number of individuals needing renal replacement therapy (RRT) impossible. Published data are hospital-based or based on individual experience. Reports prepared on the basis of those presenting to hospitals for RRT are likely to be significant underestimates. Many patients never come to medical attention.
An Indian population-based study determined the crude and age adjusted ESRD incidence rates at 151 and 232 per million population, respectively. If validated in other parts of this region, it would mean that about 220,000 to 275,000 new patients need RRT every year in this part of the world. It is estimated that there are about 55,000 patients on dialysis in India, and the dialysis population is growing at the rate of 10 to 20% annually.
Anyone can get CKD. Some people are more at risk than others. Some things that increase your risk for CKD include:
Chronic kidney disease (CKD) usually gets worse slowly, and symptoms may not appear until your kidneys are badly damaged. In the late stages of CKD, as you are nearing kidney failure (ESRD), you may notice symptoms that are caused by waste and extra fluid building up in your body.
You may notice one or more of the following symptoms if your kidneys are beginning to fail: patients on dialysis in India, and the dialysis population is growing at the rate of 10 to 20% annually.
If your kidneys stop working suddenly (acute kidney failure), you may notice one or more of the following symptoms:
In Stages 1 and 2, there are often few symptoms. If at this stage CKD is caught early, medications and lifestyle changes can slow down its progress and even stop or reverse CKD depending on its cause.
In Stage 3a and 3b CKD, anaemia (a shortage of red blood cells) and / or early bone disease may appear and should be treated immediately. You should also be having your kidney function checked every 6-12 months. When CKD progresses to stage four, you have more marked kidney changes and would normally be referred to a kidney specialist.
At Stage 5 as your kidneys begin to fail, it's time to have discussions about more active treatment and begin preparing for dialysis and / or a kidney transplant.
Diabetes and high blood pressure are the most common causes of CKD. If you have diabetes or high blood pressure, working with your doctor to keep your blood sugar and blood pressure under control is the best way to prevent kidney disease.
Living a healthy lifestyle can help prevent diabetes, high blood pressure and kidney disease, or help keep them under control. Follow these tips to lower your risk for kidney disease and the problems that cause it:


@Test
annotated methods inside the inheritor
of junit.framework.TestCase
. Mixing API of JUnit can lead to problems running the tests.
Example:
public class MyTest extends TestCase {
@Test //name doesn't start from "test", thus would be ignored
public void wouldBeIgnored() {}
@Test //name starts from "test"
@Ignore //thus would be executed despite @Ignore annotation
public void testWouldBeExecuted() {}
}
Provided fixes:
@Ignore
annotation and rename the test method, so the name doesn't start with "test".


Descendants of Unknown Weber
1 Unknown Weber
.. 2 Peter Weber b: 1780 d: February 25, 1865
...... +Sophia d: January 3, 1856
...… 3 Philip Weber b: 1822 d: March 12, 1896
.......... +Cassie Lemley b: 1825 d: 1918
........... 4 Peter Weber b: 1844 d: June 8, 1856
........... 4 Mary Weber b: May 28, 1846 d: December 20, 1932
............... +William Robinson b: October 27, 1841 d: July 11, 1927
........... 4 Margaret Weber b: December 2, 1848 d: September 5, 1849
........... 4 Catherine Weber b: ABT July 1852 d: May 10, 1853
........... 4 Maroline or Caroline Weber b: ABT July 1852 d: May 10, 1853
........... 4 Hassi or Cassi Weber b: ABT April 1853 d: August 20, 1855
........... 4 Jacob William Weber b: October 28, 1859 d: March 9, 1935
............... +Magdalena (Elaine) Christman m: 1877 b: 1858 d: 1943
.............… 5 William Jacob Weber b: December 9, 1878 d: January 8, 1928 1904
................... +Gertrude C. Claus 1904
................…... 6 Alfred Henry Weber b: October 21, 1904 d: May 18, 1955
....................... +Laura Ethel Hoff m: December 5, 1928 b: August 11, 1909 d: November 28, 1975
................…... 6 George William Weber b: March 2, 1907 d: September 10, 1951
....................... +Lina Gertrude Beardmore m: October 12, 1929
................…... 6 Marcella Viola Weber b: April 11, 1911 d: March 12, 2000 1954, 1996, 1996a, 1998
....................... +Ernest Frederick Hoff m: November 19, 1930 b: January 15, 1906 d: March 20, 1971
................... *2nd Husband of [26] Marcella Viola Weber:
....................... +Gilbert F. Weber m: February 3, 1973 b: September 28, 1896 d: December 24, 1976
................…... 6 Emma Iva Weber b: October 26, 1913
....................... +Clinton Elesworth m: November 18, 1939
................…... 6 William Jacob Weber b: June 20, 1920
....................... +Catherine Elizabeth Weber m: December 17, 1938
................…... 6 Robert Weber
................…... 6 Wesley Theodore Weber b: February 23, 1909 d: August 24, 1999
....................... +Emma Louise Hoff m: August 5, 1933 b: May 14, 1912 d: July 4, 1968
................... *2nd Wife of Wesley Theodore Weber:
....................... +Martha Penell Carpenter m: September 13, 1969 b: November 20, 1911
................... *3rd Wife of Wesley Theodore Weber:
....................... +Martha Lee Pennell Carpenter m: September 13, 1969
................…... 6 Margaret Gertrude Weber b: May 4, 1918 d: May 9, 2000
....................... +Willard David Weber b: April 3, 1915 d: August 1997
................…... 6 Emma Weber
........... *1st Wife of Jacob William Weber:
............... +Mary Ludwig m: Bef. 1883 b: August 21, 1862 d: December 9, 1899
.............… 5 Alonzo Weber b: April 7, 1883
.............… 5 Viola Weber b: February 11, 1885
........... *2nd Wife of Jacob William Weber:
............... +Caroline Ludwig m: Aft. 1899 b: April 10, 1852 d: April 21, 1942
........... 4 Charlotte Weber b: Aft. 1859
........... 4 Philip Weber b: Aft. 1859
........... 4 Matilda Louise Weber b: Aft. 1859
...… 3 John Christian Weber b: August 20, 1826 d: September 22, 1891
.......... +Caroline ? b: 1824 d: 1899
...… 3 Valentine Weber
........... 4 Philip Weber
........... 4 Jacob Weber
........... 4 William Weber
........... 4 Lavina Weber
...… 3 Dorothy Weber
...… 3 Barbara Weber b: October 22, 1819 d: December 25, 1840
........... 4 Catherine Weber b: ABT December 25, 1840 d: February 25, 1841
. . 2 David Weber b: 1784 d: April 8, 1846
...... +Margaret Schenk
...… 3 Frederick Peter Weber b: December 25, 1810 d: March 25, 1882
.......... +Margaret Eva Spiry b: August 10, 1810 d: March 25, 1882
........... 4 Ellen Weber b: 1836 d: 1917
............... +Frederick Rhines b: 1834 d: October 10, 1925
........... 4 Frederick Weber b: 1837
........... 4 Margaret Weber b: May 19, 1841
........... 4 Sarah Louise Weber
........... 4 Barbara Weber b: 1846
........... 4 Elizabeth Weber b: May 1845
........... 4 Philip J. Weber b: October 17, 1851
........... 4 Sarah Louisa Weber b: July 4, 1844
........... 4 Magdalena M. Weber b: 1833
...… 3 Charles Crichton (John) Weber b: 1824 d: February 22, 1894
.......... +Salone Meckling m: 1845 b: 1828 d: 1880
........... 4 Christian (Chris) Weber b: 1846 d: May 28, 1930 1925
............... +Civilla Keylor b: May 28, 1858 d: April 22, 1921 1920
.............… 5 Anna C. Weber b: December 20, 1870 d: May 28, 1951 1946, 1948
................... +Heinrich (Henry) Young m: September 1, 1897 b: February 9, 1859 d: December 7, 1946
................…... 6 George William Young b: November 11, 1898 d: January 31, 1976
....................... +Ella Mae Feiber m: December 20, 1916 b: March 3, 1895 d: March 20, 1990
................…... 6 Charles Alfred Young b: May 25, 1902 d: September 6, 1989
....................... +Mary Fishburn b: February 14, 1900
................…... 6 Frederick Young b: April 7, 1906
................…... 6 Ernest Frederick Young b: April 7, 1907
....................... +Dorothy M. Fishburn b: September 29, 1909
................... *2nd Wife of Ernest Frederick Young:
....................... +Carrie Isabelle Shambough m: April 27, 1968 b: February 26, 1916
................…... 6 Raymond F. Young b: February 14, 1914
.............… 5 John Western Weber b: July 28, 1872 d: December 17, 1946
................... +Elizabeth Hoff b: 1881 d: 1918
................…... 6 Stella Barbara Weber
................…... 6 Olive Weber
................…... 6 Lenora Weber
................…... 6 Pearl Anna Weber
............... *2nd Wife of John Western Weber:
................... +Amanda Caroline Keylor b: November 10, 1889 d: January 2, 1966
................…... 6 Stella Barbara Weber
................…... 6 Olive Weber
................…... 6 Lenora Weber
................…... 6 Pearl Anna Weber
................…... 6 Calvin Elwood Weber b: August 8, 1927
....................... +Eleanor Ruth Bates b: August 23, 1929
................…... 6 Martha Lea Weber
.............… 5 Daniel Edward Weber b: April 24, 1875 d: April 16, 1922
................... +Martha Catherine Fisher b: February 25, 1887 d: January 27, 1975
................…... 6 Edna Civilla Weber b: February 5, 1911
................…... 6 Rose Marie Weber b: December 16, 1913 1914
....................... +Earl Otis Harmon b: February 24, 1908
................…... 6 James Theodore Weber b: March 28, 1916 d: November 16, 1976
.............… 5 David H. Weber b: September 8, 1877 d: May 18, 1961
................... +Clara Matilda Yoho b: February 20, 1883 d: February 22, 1969
................…... 6 Raymond Everett Weber b: February 22, 1903 d: October 20, 1991
....................... +Marie Arnold b: July 29, 1912
................…... 6 Floyd Edward Weber b: September 4, 1904 d: January 15, 1990
....................... +Minnie L. Lisk b: October 30, 1909 d: July 28, 1991
................…... 6 Viola Louella Weber b: May 14, 1907 d: September 28, 1982 1922
....................... +Ben Winland b: July 27, 1904 d: June 28, 1972
................…... 6 Laura Marie Weber b: April 26, 1909 d: December 23, 1981
....................... +Elmer Merle Fisher m: June 12, 1929 b: May 1, 1907 d: August 15, 1995
................…... 6 Zelda Matilda Weber b: July 22, 1913
....................... +Elbert Wesley (Bert) Betts m: October 30, 1935 b: October 10, 1906 d: February 12, 1990
................…... 6 Willard David Weber b: April 3, 1915 d: August 1997
....................... +Margaret Gertrude Weber b: May 4, 1918 d: May 9, 2000
................…... 6 Irvin Ward Weber b: September 11, 1918 d: November 14, 1973
....................... +Eunice Friday
................... *2nd Wife of [18] Irvin Ward Weber:
....................... +Eleanor Lahue b: September 9, 1924 d: November 29, 1985
................…... 6 Lawrence Sylvester Weber b: September 7, 1920
....................... +Margaret Topton b: January 27, 1921
................…... 6 Earl Richard Weber b: May 22, 1925
....................... +Helen Stimpert b: July 24, 1925
.............… 5 Samuel D. Weber b: November 17, 1881 d: August 10, 1904
.............… 5 William Franklin Weber b: February 2, 1888 d: March 13, 1937
................... +Sara A. Pickens b: July 18, 1893 d: August 1958
................…... 6 Phyllis Irene Weber
................…... 6 Robert Franklin Weber
................…... 6 Virgina Lee Weber
.............… 5 David H. Weber b: September 9, 1877 d: May 18, 1961
................... +Clara Matilda Yoho m: May 28, 1902 b: February 20, 1883 d: February 22, 1969
................…... 6 Raymond Everett Weber b: February 22, 1903 d: October 20, 1991
....................... +Marie Arnold b: July 29, 1912
................…... 6 Floyd Edward Weber b: September 4, 1904 d: January 15, 1990
....................... +Minnie L. Lisk b: October 30, 1909 d: July 28, 1991
................…... 6 Viola Louella Weber b: May 14, 1907 d: September 28, 1982
....................... +Ben Winland b: July 27, 1904 d: June 28, 1972
................…... 6 Laura Marie Weber b: April 26, 1909 d: December 23, 1981
....................... +Elmer Merle Fisher m: June 12, 1929 b: May 1, 1907 d: August 15, 1995
................…... 6 Willard David Weber b: April 3, 1915 d: August 1997
....................... +Margaret Gertrude Weber b: May 4, 1918 d: May 9, 2000
................…... 6 Zelda Matilda Weber b: July 22, 1913
....................... +Elbert Wesley (Bert) Betts m: October 30, 1935 b: October 10, 1906 d: February 12, 1990
................…... 6 Irvin Ward Weber b: September 11, 1918 d: November 14, 1973
....................... +Eunice Friday
................... *2nd Wife of Irvin Ward Weber:
....................... + Eleanor Lahue b: September 9, 1924 d: November 29, 1985
................…... 6 Lawrence Sylvester Weber b: September 7, 1920
....................... +Margaret Topton b: January 27, 1921
................…... 6 Earl Richard Weber b: May 22, 1925
....................... +Helen Stimpert b: July 24, 1925
........... 4 Louisa Weber b: April 4, 1848
........... 4 Philip S. Weber b: 1849 d: 1936
............... +Matilda J. Brown b: 1860 d: 1945
.............… 5 Alfred Weber b: November 13, 1883
................... +Bessie Wheeler m: April 15, 1905
................…... 6 Florence Bessie Weber b: April 3, 1907
................…... 6 Harry Charles Weber b: June 6, 1909
................…... 6 Wilda Loretta Weber b: December 25, 1912
................…... 6 Ruth Matilda Weber b: February 28, 1916
................…... 6 Lucille Caroline Weber b: July 1, 1919
.............… 5 John Henry Weber b: October 30, 1884 d: December 20, 1976
................... +Jenny Wheeler b: December 4, 1889
................…... 6 Thelma Weber b: December 26, 1908
................…... 6 Roy Weber b: June 26, 1910 1924
................…... 6 Melba Weber b: January 14, 1912
................…... 6 Wilbur Weber b: November 24, 1914 d: March 12, 1999
....................... +Grethel Hupp
................…... 6 Lloyd H. Weber b: December 20, 1916 d: March 20, 2001 1929
....................... +Eva Gatten b: 1914
................…... 6 Eugene Weber b: February 8, 1919 1929
................…... 6 Dennis Weber b: February 17, 1922
....................... +Ruth Ridgway
................…... 6 Deloris Weber b: February 15, 1924
................…... 6 Vera Weber b: May 31, 1926
....................... +Richard Schreffler b: June 23, 1917
................…... 6 Francis Edgar Weber b: August 9, 1929
................…... 6 Eleanor Weber b: October 12, 1931
................…... 6 Jennie Eileen Weber b: July 4, 1933
.............… 5 Rosie Weber b: April 10, 1890 d: November 17, 1968
................... +Fred Fisher b: November 24, 1886 d: April 30, 1969
........... 4 Lena Weber b: January 15, 1856 d: June 26, 1933
........... 4 Dave Weber b: December 15, 1856 d: April 15, 1932
............... +Mary C. Barthenslaw b: February 5, 1863 d: November 11, 1923
.............… 5 William Charles Weber b: January 8, 1889
.............… 5 Emma Weber b: December 31, 1903
................... +Everett Stempert
................…... 6 Herbert Stempert b: March 29, 1929
................…... 6 Paul Stempert b: April 2, 1935
........... 4 Frederick Weber b: July 20, 1858 d: February 25, 1950
............... +Anna Christman b: January 2, 1875 d: April 27, 1962
.............… 5 Infant dau. Weber b: April 27, 1918
........... 4 Mary E. Weber b: August 8, 1860 d: April 1, 1900
............... +Frederick C. Neuhart b: May 23, 1858 d: 1907
.............… 5 Minnie Saloma Neuhart b: September 27, 1881
.............… 5 Charles Henry Neuhart b: September 27, 1883
.............… 5 Clara L. Neuhart b: May 9, 1886
.............… 5 Laura H. Neuhart b: June 10, 1888
.............… 5 Freda C. Neuhart b: January 14, 1891
.............… 5 Mary Josephine Neuhart b: June 8, 1893
.............… 5 Edna Catherine Neuhart b: January 17, 1895
.............… 5 Thurman F. D. Neuhart b: August 9, 1898
........... 4 George Lewis Weber b: May 20, 1862 d: September 27, 1943 1938
............... +Rose Anne Elisabeth Christman b: March 31, 1865 d: June 21, 1948 1938
.............… 5 Charles Solomon H. Weber b: October 4, 1886 d: May 1, 1973
................... +Ora Crum b: September 21, 1887 d: March 4, 1977
................…... 6 Frank Weber b: August 13, 1913 d: June 27, 1987
....................... +Marjorie Bauman b: March 15, 1918
................…... 6 Grace Ora Weber b: January 28, 1915 d: April 13, 1995
....................... +Virgil J. DeVoe b: March 7, 1905 d: January 5, 1988
................…... 6 Ralph Benjamin Weber b: July 15, 1916
....................... +Ellen Maibach m: 1940 b: June 13, 1918 d: March 16, 1994
................…... 6 Alton Weber b: May 13, 1918
....................... +Beatrice Beaver m: October 20, 1936 b: August 15, 1918 d: Deceased
................…... 6 Merle Weber b: June 25, 1924
....................... +Ella Mae Emch b: March 10, 1925
................…... 6 Edsel Weber b: June 18, 1926
....................... +Josephine Volpe b: January 11, 1929 d: June 15, 1977
................…... 6 Roger Weber b: July 28, 1927
....................... +Ruth Roberts b: December 25, 1928
................... *2nd Wife of Roger Weber:
....................... +Betty ?
.............… 5 Minnie Silonia Weber b: October 12, 1888
.............… 5 Walter Louis Weber b: September 26, 1889 d: February 12, 1975
................... +Mabel Diehl b: January 7, 1887 d: March 19, 1969
.............… 5 Benjamin Otto Weber b: November 18, 1891 d: December 4, 1965
................... +Nellie Catherine Walters m: February 19, 1913 b: September 28, 1889 d: October 4, 1981
................…... 6 Elmer G. Weber b: January 14, 1914 d: June 15, 1931
................…... 6 Lewis Eugene Weber b: March 24, 1916 d: October 2, 1990
....................... +Mary Lumbatis m: September 12, 1937 b: September 12, 1917
................…... 6 Catherine Elizabeth Weber b: October 15, 1920
....................... +William Weber b: June 20, 1920
................…... 6 Marjorie Irene Weber b: March 15, 1923
....................... +Donald L. Cadwallader b: April 19, 1929
................…... 6 Dorothy Eloise Weber b: December 25, 1925
....................... +Willis R. Pettit b: March 26, 1921
................…... 6 Paul L. Weber b: November 22, 1928
....................... +Mary Jane Bullock m: January 13, 1951 b: February 27, 1931
.............… 5 Freda Mary Weber b: November 16, 1893 d: November 25, 1987
................... +Alfred J. Landefeld m: August 10, 1915 b: March 19, 1891 d: August 11, 1926
................…... 6 Loretta Freda Landefeld b: November 16, 1916 d: January 19, 1947
....................... +Elridge Eddy m: January 7, 1942 d: June 1943
................…... 6 Leverne Alfred Landefeld b: May 10, 1918
....................... +Bonnie Ford m: September 6, 1944 b: June 19, 1920
.............… 5 Gilbert F. Weber b: September 28, 1896 d: December 24, 1976
................... +Edith Eaton m: March 20, 1918 b: August 11, 1895 d: July 27, 1972
............... *2nd Wife of [25] Gilbert F. Weber:
................... +Marcella Viola Weber m: February 3, 1973 b: April 11, 1911 d: March 12, 2000
.............… 5 Anna Magdalena Weber b: July 7, 1901 d: January 25, 1962
................... +Michael J. Kestner b: July 26, 1899 d: December 9, 1977
................…... 6 Evelyn Margarette Kestner b: July 5, 1925
....................... +Howard Duall b: December 13, 1924
................…... 6 Harlan Eugene Kestner b: June 5, 1927
....................... +Betty ? b: December 9, 1928
................…... 6 Marlene Rose Kestner b: June 9, 1935
....................... +Kenneth O'Brien b: November 2, 1929
................…... 6 Melvin Michael Kestner b: October 20, 1945
.............… 5 Homer Theodore Weber b: September 15, 1903 d: January 30, 1987 1927, 1927a, 1935, 1938, 1939, 1941, 1950, 1954, 1956, 1960, 1961, 1977a, 1977b, 1977c
................... +Leora Viola Young m: October 5, 1927 b: December 4, 1908 d: July 15, 1992
................…... 6 Wayne Edward Weber b: June 12, 1930
....................... +Mary Leverne Reynolds b: May 6, 1932
................... *2nd Wife of Wayne Edward Weber:
....................... +Lois Jean Ramsey b: February 14, 1940
................... *3rd Wife of Wayne Edward Weber:
....................... +Carolyn ?
........... 4 Charles Henry Weber b: May 9, 1865 d: March 1934
............... +Elizabeth Morter b: May 9, 1867 d: March 1927
.............… 5 Arnold Lewis Weber b: September 26, 1890
.............… 5 Clarence Charles Weber b: July 25, 1892
.............… 5 Lician Lawrence Weber b: September 19, 1895
.............… 5 Helen Elizabeth Weber b: January 13, 1901
................... +Boyd A. Smith b: April 28, 1893 d: June 16, 1956
........... 4 Jakob Wilhelm Weber b: August 5, 1866 d: May 27, 1945
............... +Mary H. Denbow b: July 10, 1868 d: January 18, 1925
.............… 5 Lula May Weber b: December 5, 1892
................... +Walter Monroe Foehrenbach b: May 12, 1891
................…... 6 Freda Mae Foehrenbach
................…... 6 Mildred Foehrenbach
................…... 6 Harold Monroe Foehrenbach
................…... 6 Lawrence Homer Foehrenbach
................…... 6 Ann Louise Foehrenbach
................…... 6 Roy Edmond Foehrenbach
................…... 6 Mary Foehrenbach
................…... 6 Cora Elizabeth Foehrenbach
................…... 6 Lillian Foehrenbach
................…... 6 Blanche Foehrenbach
................…... 6 Walter Raymond Foehrenbach
.............… 5 Lillian Weber b: January 22, 1895
.............… 5 Ernest Weber b: June 2, 1902
.............… 5 Elmer Weber b: June 25, 1903
.............… 5 Minnie Weber b: July 31, 1905
.............… 5 Carl William (or Willard) Weber b: September 25, 1908
........... 4 Otto J. Weber b: May 25, 1870 d: February 6, 1953
........... 4 Barbara Weber b: Infant
...… 3 Margaret Weber b: February 16, 1832 d: August 1910
.......... +Balsar Bott b: February 16, 1830 d: December 1897
........... 4 Jane Bott
........... 4 Celeina Bott
........... 4 Mary Bott
........... 4 Jacob Bott
........... 4 John Bott
........... 4 George Bott
........... 4 Charles Bott
........... 4 Nettie Bott
Photo provided by Richard
Harrington -- e-mail<EMAIL_ADDRESS>Click on one
of the following to return to:
Marriages, Births, Reunions, Events


Foresee helps teams quickly reach a concensus on what needs to be done, how long it will take, and any assumptions made along the way.
Estimate. Simple.


Name
Email
Salary
set
Tom
<EMAIL_ADDRESS>5000
Delete
jerry
<EMAIL_ADDRESS>2000
Delete
stick
<EMAIL_ADDRESS>9000
Delete
添加新员工
name:
email:
salary:
submit


#assign page_edit_href="/support.html"> <#assign n0_support="active">
For help post questions and issues to the Ebean github discussions or Ebean google group.
These are monitored by Ebean developers and it's most experienced users and here you will get the best help.
You can alternatively post questions on Stack Overflow
tagged with ebean
. Note that stackoverflow is more casually monitored due to time constraints.
It is fine if you want to post first to stackoverflow and then if you don't get an answer to post onto the
google group.
For this project we want to use Github issues for Bugs
, Enhancements
and
Refactoring
changes. That is, things that mostly tie back to a specific commit change in code.
Complex issues should be discussed on Ebean google group or Ebean github discussions first.
The ebean-orm-examples group contains several example applications from absolute minimal, spring-boot to jax-rs web apps so you can look at those for example code.
Checkout of the videos for a quick view on how certain features work.


All Classes
Packages
org.drip.analytics.core
org.drip.analytics.curve
org.drip.analytics.daycount
org.drip.analytics.holset
org.drip.analytics.period
org.drip.calc.output
org.drip.curve.calibration
org.drip.feed.historical
org.drip.feed.reference
org.drip.param.config
org.drip.param.market
org.drip.param.pricer
org.drip.param.product
org.drip.param.valuation
org.drip.product.common
org.drip.product.creator
org.drip.product.credit
org.drip.product.fx
org.drip.product.quote
org.drip.product.rates
org.drip.service.api
org.drip.service.env
org.drip.service.external
org.drip.service.sample
org.drip.tester.product
org.drip.tester.regression
org.drip.util.common
org.drip.util.date
org.drip.util.internal


Helper Bot
Discord's Most Powerful Moderation Bot! 🤖
Incredible moderation bot for your Discord server!
Commands
Invite Me
Support Server


ALLOCA
Section: Linux Programmer's Manual (3)
Updated: 2013-10-07
Index
Return to Main Contents
NAME
alloca - allocate memory that is automatically freed
SYNOPSIS
#include <alloca.h>
void *alloca(size_t size);
DESCRIPTION
The
alloca()
function allocates
size
bytes of space in the stack frame of the caller.
This temporary space is
automatically freed when the function that called
alloca()
returns to its caller.
RETURN VALUE
The
alloca()
function returns a pointer to the beginning of the allocated space.
If the allocation causes stack overflow, program behavior is undefined.
ATTRIBUTES
Multithreading (see pthreads(7))
The
alloca()
function is thread-safe.
CONFORMING TO
This function is not in POSIX.1-2001.
There is evidence that the
alloca()
function appeared in 32V, PWB, PWB.2, 3BSD, and 4BSD.
There is a man page for it in 4.3BSD.
Linux uses the GNU version.
NOTES
The
alloca()
function is machine- and compiler-dependent.
For certain applications,
its use can improve efficiency compared to the use of
malloc(3)
plus
free(3).
In certain cases,
it can also simplify memory deallocation in applications that use
longjmp(3)
or
siglongjmp(3).
Otherwise, its use is discouraged.
Because the space allocated by
alloca()
is allocated within the stack frame,
that space is automatically freed if the function return
is jumped over by a call to
longjmp(3)
or
siglongjmp(3).
Do not attempt to
free(3)
space allocated by
alloca()!
Notes on the GNU version
Normally,
gcc(1)
translates calls to
alloca()
with inlined code.
This is not done when either the
-ansi,
-std=c89,
-std=c99,
or the
-std=c11
option is given
and
the header
<alloca.h>
is not included.
Otherwise, (without an -ansi or -std=c* option) the glibc version of
<stdlib.h>
includes
<alloca.h>
and that contains the lines:
#ifdef __GNUC__
#define alloca(size) __builtin_alloca (size)
#endif
with messy consequences if one has a private version of this function.
The fact that the code is inlined means that it is impossible
to take the address of this function, or to change its behavior
by linking with a different library.
The inlined code often consists of a single instruction adjusting
the stack pointer, and does not check for stack overflow.
Thus, there is no NULL error return.
BUGS
There is no error indication if the stack frame cannot be extended.
(However, after a failed allocation, the program is likely to receive a
SIGSEGV
signal if it attempts to access the unallocated space.)
On many systems
alloca()
cannot be used inside the list of arguments of a function call, because
the stack space reserved by
alloca()
would appear on the stack in the middle of the space for the
function arguments.
SEE ALSO
brk(2),
longjmp(3),
malloc(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ATTRIBUTES
-
- Multithreading (see pthreads(7))
-
- CONFORMING TO
-
- NOTES
-
- Notes on the GNU version
-
- BUGS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 02:55:18 GMT, September 18, 2014


TUrlManager class
TUrlManager is the base class for managing URLs that can be recognized by PRADO applications. It provides the default implementation for parsing and constructing URLs.
Derived classes may override constructUrl and parseUrl to provide customized URL schemes.
By default, THttpRequest uses TUrlManager as its URL manager. If you want to use your customized URL manager, load your manager class as an application module and set THttpRequest::setUrlManager with the ID of your URL manager module.
Located in /Web/TUrlManager.php (line 33)
TComponent | --TApplicationComponent | --TModule | --TUrlManager
| Class | Description |
|---|---|
| TUrlMapping | TUrlMapping Class |
Constructs a URL that can be recognized by PRADO.
This method provides the actual implementation used by THttpRequest::constructUrl. Override this method if you want to provide your own way of URL formatting. If you do so, you may also need to override parseUrl so that the URL can be properly parsed.
The URL is constructed as the following format: /entryscript.php?serviceID=serviceParameter&get1=value1&... If THttpRequest::setUrlFormat is 'Path', the following format is used instead: /entryscript.php/serviceID/serviceParameter/get1,value1/get2,value2...
Parses the request URL and returns an array of input parameters.
This method is automatically invoked by THttpRequest when handling a user request.
In general, this method should parse the path info part of the requesting URL and generate an array of name-value pairs according to some scheme. The current implementation deals with both 'Get' and 'Path' URL formats.
You may override this method to support customized URL format.
Inherited From TModule
TModule::getID()
TModule::init()
TModule::setID()
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Fri, 03 Jun 2011 16:26:26 +0200 by phpDocumentor 1.3.0RC4


| DOSE: |
8 g |
oral |
Kratom |
(powder / crystals) |
I have used Kratom a couple of times and loved it each time. I have experimented with weed, percocet, xanax and alcohol and I have to say that Kratom is my favorite drug by far.
I usually use around 8 grams of powder. I take dissolve it in warm water than pour orange juice over it to diffuse the taste which I find works rather well.
In all my experiences I have found Kratom to induce a very relaxing and calm feeling. Also, I experience pretty intense euphoria for about 3 hours. After the 3 hour mark the effects start to fade and usually take another 3 hours to completely wear off.
 All in all, Kratom is awesome!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


network
— network configuration¶
This module provides network drivers and routing configuration. To use this
module, a MicroPython variant/build with network capabilities must be installed.
Network drivers for specific hardware are available within this module and are
used to configure hardware network interface(s). Network services provided
by configured interfaces are then available for use via the socket
module.
For example:
# connect/ show IP config a specific network interface
# see below for examples of specific drivers
import network
import time
nic = network.Driver(...)
if not nic.isconnected():
nic.connect()
print("Waiting for connection...")
while not nic.isconnected():
time.sleep(1)
print(nic.ifconfig())
# now use socket as usual
import socket
addr = socket.getaddrinfo('micropython.org', 80)[0][-1]
s = socket.socket()
s.connect(addr)
s.send(b'GET / HTTP/1.1\r\nHost: micropython.org\r\n\r\n')
data = s.recv(1000)
s.close()
Common network adapter interface¶
This section describes an (implied) abstract base class for all network
interface classes implemented by MicroPython ports
for different hardware. This means that MicroPython does not actually
provide AbstractNIC
class, but any actual NIC class, as described
in the following sections, implements methods as described here.
- class network.AbstractNIC(id=None, ...)¶
Instantiate a network interface object. Parameters are network interface
dependent. If there are more than one interface of the same type, the first
parameter should be id
.
- AbstractNIC.active([is_active])¶
Activate (“up”) or deactivate (“down”) the network interface, if a boolean argument is passed. Otherwise, query current state if no argument is provided. Most other methods require an active interface (behaviour of calling them on inactive interface is undefined).
- AbstractNIC.connect([service_id, key=None, *, ...])¶
Connect the interface to a network. This method is optional, and available only for interfaces which are not “always connected”. If no parameters are given, connect to the default (or the only) service. If a single parameter is given, it is the primary identifier of a service to connect to. It may be accompanied by a key (password) required to access said service. There can be further arbitrary keyword-only parameters, depending on the networking medium type and/or particular device. Parameters can be used to: a) specify alternative service identifier types; b) provide additional connection parameters. For various medium types, there are different sets of predefined/recommended parameters, among them:
WiFi: bssid keyword to connect to a specific BSSID (MAC address)
- AbstractNIC.disconnect()¶
Disconnect from network.
- AbstractNIC.isconnected()¶
Returns
True
if connected to network, otherwise returnsFalse
.
- AbstractNIC.scan(*, ...)¶
Scan for the available network services/connections. Returns a list of tuples with discovered service parameters. For various network media, there are different variants of predefined/ recommended tuple formats, among them:
WiFi: (ssid, bssid, channel, RSSI, security, hidden). There may be further fields, specific to a particular device.
The function may accept additional keyword arguments to filter scan results (e.g. scan for a particular service, on a particular channel, for services of a particular set, etc.), and to affect scan duration and other parameters. Where possible, parameter names should match those in connect().
- AbstractNIC.status([param])¶
Query dynamic status information of the interface. When called with no argument the return value describes the network link status. Otherwise param should be a string naming the particular status parameter to retrieve.
The return types and values are dependent on the network medium/technology. Some of the parameters that may be supported are:
WiFi STA: use
'rssi'
to retrieve the RSSI of the AP signalWiFi AP: use
'stations'
to retrieve a list of all the STAs connected to the AP. The list contains tuples of the form (MAC, RSSI).
- AbstractNIC.ifconfig([(ip, subnet, gateway, dns)])¶
Get/set IP-level network interface parameters: IP address, subnet mask, gateway and DNS server. When called with no arguments, this method returns a 4-tuple with the above information. To set the above values, pass a 4-tuple with the required information. For example:
nic.ifconfig(('<IP_ADDRESS>', '<IP_ADDRESS>', '<IP_ADDRESS>', '<IP_ADDRESS>'))
- AbstractNIC.config('param')¶
- AbstractNIC.config(param=value, ...)
Get or set general network interface parameters. These methods allow to work with additional parameters beyond standard IP configuration (as dealt with by
ifconfig()
). These include network-specific and hardware-specific parameters. For setting parameters, the keyword argument syntax should be used, and multiple parameters can be set at once. For querying, a parameter name should be quoted as a string, and only one parameter can be queried at a time:# Set WiFi access point name (formally known as SSID) and WiFi channel ap.config(ssid='My AP', channel=11) # Query params one by one print(ap.config('ssid')) print(ap.config('channel'))
Specific network class implementations¶
The following concrete classes implement the AbstractNIC interface and provide a way to control networking interfaces of various kinds.
Network functions¶
The following are functions available in the network module.
- network.country([code])¶
Get or set the two-letter ISO 3166-1 Alpha-2 country code to be used for radio compliance.
If the code parameter is provided, the country will be set to this value. If the function is called without parameters, it returns the current country.
The default code
"XX"
represents the “worldwide” region.
- network.hostname([name])¶
Get or set the hostname that will identify this device on the network. It is applied to all interfaces.
- This hostname is used for:
Sending to the DHCP server in the client request. (If using DHCP)
Broadcasting via mDNS. (If enabled)
If the name parameter is provided, the hostname will be set to this value. If the function is called without parameters, it returns the current hostname.
The default hostname is typically the name of the board.
- network.phy_mode([mode])¶
Get or set the PHY mode.
If the mode parameter is provided, the PHY mode will be set to this value. If the function is called without parameters, it returns the current PHY mode.
- The possible modes are defined as constants:
MODE_11B
– IEEE 802.11b,MODE_11G
– IEEE 802.11g,MODE_11N
– IEEE 802.11n.
Availability: ESP8266.