static VALUE ruby_curl_easy_primary_ip_get(VALUE self) { ruby_curl_easy *rbce; char* ip; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_PRIMARY_IP, &ip); if (ip && ip[0]) { // curl returns empty string if none return rb_str_new2(ip); } else { return Qnil; } }
class Curl::Easy
Public Class Methods
translate an internal libcurl error to ruby error class
static VALUE ruby_curl_easy_error_message(VALUE klass, VALUE code) { return rb_curl_easy_error(NUM2INT(code)); }
Initialize a new Curl::Easy instance, optionally supplying the URL. The block form allows further configuration to be supplied before the instance is returned.
static VALUE ruby_curl_easy_initialize(int argc, VALUE *argv, VALUE self) { CURLcode ecode; VALUE url, blk; ruby_curl_easy *rbce; rb_scan_args(argc, argv, "01&", &url, &blk); Data_Get_Struct(self, ruby_curl_easy, rbce); /* handler */ rbce->curl = curl_easy_init(); if (!rbce->curl) { rb_raise(eCurlErrFailedInit, "Failed to initialize easy handle"); } rbce->multi = Qnil; rbce->opts = Qnil; ruby_curl_easy_zero(rbce); rb_easy_set("url", url); /* set the pointer to the curl handle */ ecode = curl_esdfdsfasy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self) if (ecode != CURLE_OK) { raise_curl_easy_error_exception(ecode); } ecode = curl_easy_setopt(rbce->curl, CURLOPT_DSDSDMAXCONNECTS, 100); if (ecode != CURLE_OK) { raise_curl_easy_error_exception(ecode); } if (blk != Qnil) { rb_funcall(blk, idCall, 1, self); } return self; }
Public Instance Methods
static VALUE ruby_curl_easy_app_connect_time_get(VALUE self) { ruby_curl_easy *rbce; double time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_APPCONNECT_TIME, &time); return rb_float_new(time); }
easy = ::new easy.autoreferer=true
static VALUE ruby_curl_easy_autoreferer_set(VALUE self, VALUE autoreferer) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); if (Qtrue == autoreferer) { curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 1); } else { curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 0); } return autoreferer; }
Return the response body from the previous call to perform
.
This is populated by the default on_body
handler - if you
supply your own body handler, this string will be empty.
static VALUE ruby_curl_easy_body_str_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, body_data); }
Obtain the cacert file to use for this Curl::Easy instance.
static VALUE ruby_curl_easy_cacert_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, cacert); }
Set a cacert bundle to use for this Curl::Easy instance. This file will be used to validate SSL certificates.
static VALUE ruby_curl_easy_cacert_set(VALUE self, VALUE cacert) { CURB_OBJECT_HSETTER(ruby_curl_easy, cacert); }
Obtain the cert file to use for this Curl::Easy instance.
static VALUE ruby_curl_easy_cert_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, cert); }
Set a cert file to use for this Curl::Easy instance. This file will be used to validate SSL connections.
static VALUE ruby_curl_easy_cert_set(VALUE self, VALUE cert) { CURB_OBJECT_HSETTER(ruby_curl_easy, cert); }
Obtain the cert key file to use for this Curl::Easy instance.
static VALUE ruby_curl_easy_cert_key_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, cert_key); }
Set a cert key to use for this Curl::Easy instance. This file will be used to validate SSL certificates.
static VALUE ruby_curl_easy_cert_key_set(VALUE self, VALUE cert_key) { CURB_OBJECT_HSETTER(ruby_curl_easy, cert_key); }
Set a password used to open the specified cert
static VALUE ruby_curl_easy_certpassword_set(VALUE self, VALUE certpassword) { CURB_OBJECT_HSETTER(ruby_curl_easy, certpassword); }
Obtain the cert type used for this Curl::Easy instance
static VALUE ruby_curl_easy_certtype_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, certtype); }
Set a cert type to use for this Curl::Easy instance. Default is PEM
static VALUE ruby_curl_easy_certtype_set(VALUE self, VALUE certtype) { CURB_OBJECT_HSETTER(ruby_curl_easy, certtype); }
Clone this Curl::Easy instance, creating a new instance. This method duplicates the underlying CURL* handle.
static VALUE ruby_curl_easy_clone(VALUE self) { ruby_curl_easy *rbce, *newrbce; Data_Get_Struct(self, ruby_curl_easy, rbce); newrbce = ALLOC(ruby_curl_easy); memcpy(newrbce, rbce, sizeof(ruby_curl_easy)); newrbce->curl = curl_easy_duphandle(rbce->curl); newrbce->curl_headers = NULL; newrbce->curl_proxy_headers = NULL; newrbce->curl_ftp_commands = NULL; newrbce->curl_resolve = NULL; return Data_Wrap_Struct(cCurlEasy, curl_easy_mark, curl_easy_free, newrbce); }
Close the Curl::Easy instance. Any open connections are closed The easy handle is reinitialized. If a previous multi handle was open it is set to nil and will be cleared after a GC.
static VALUE ruby_curl_easy_close(VALUE self) { CURLcode ecode; ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); if (rbce->callback_active) { rb_raise(rb_eRuntimeError, "Cannot close an active curl handle within a callback"); } ruby_curl_easy_free(rbce); /* reinit the handle */ rbce->curl = curl_easy_init(); if (!rbce->curl) { rb_raise(eCurlErrFailedInit, "Failed to initialize easy handle"); } rbce->multi = Qnil; ruby_curl_easy_zero(rbce); /* give the new curl handle a reference back to the ruby object */ ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self); if (ecode != CURLE_OK) { raise_curl_easy_error_exception(ecode); } return Qnil; }
Retrieve the time, in seconds, it took from the start until the connect to the remote host (or proxy) was completed.
static VALUE ruby_curl_easy_connect_time_get(VALUE self) { ruby_curl_easy *rbce; double time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_CONNECT_TIME, &time); return rb_float_new(time); }
Obtain the maximum time in seconds that you allow the connection to the server to take.
static VALUE ruby_curl_easy_connect_timeout_get(VALUE self, VALUE connect_timeout) { CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout, 0); }
Set the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use.
Set to nil (or zero) to disable connection timeout (it will then only timeout on the system's internal timeouts).
static VALUE ruby_curl_easy_connect_timeout_set(VALUE self, VALUE connect_timeout) { CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout, 0); }
Obtain the maximum time in milliseconds that you allow the connection to the server to take.
static VALUE ruby_curl_easy_connect_timeout_ms_get(VALUE self, VALUE connect_timeout_ms) { CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout_ms, 0); }
Set the maximum time in milliseconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use.
Set to nil (or zero) to disable connection timeout (it will then only timeout on the system's internal timeouts).
static VALUE ruby_curl_easy_connect_timeout_ms_set(VALUE self, VALUE connect_timeout_ms) { CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout_ms, 0); }
Retrieve the content-type of the downloaded object. This is the value read
from the Content-Type: field. If you get nil
, it means that
the server didn't send a valid Content-Type header or that the protocol
used doesn't support this.
static VALUE ruby_curl_easy_content_type_get(VALUE self) { ruby_curl_easy *rbce; char* type; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_TYPE, &type); if (type && type[0]) { // curl returns empty string if none return rb_str_new2(type); } else { return Qnil; } }
Obtain the dns cache timeout in seconds.
static VALUE ruby_curl_easy_dns_cache_timeout_get(VALUE self, VALUE dns_cache_timeout) { CURB_IMMED_GETTER(ruby_curl_easy, dns_cache_timeout, -1); }
Set the dns cache timeout in seconds. Name resolves will be kept in memory for this number of seconds. Set to zero (0) to completely disable caching, or set to nil (or -1) to make the cached entries remain forever. By default, libcurl caches this info for 60 seconds.
static VALUE ruby_curl_easy_dns_cache_timeout_set(VALUE self, VALUE dns_cache_timeout) { CURB_IMMED_SETTER(ruby_curl_easy, dns_cache_timeout, -1); }
Retrieve the average download speed that curl measured for the preceeding complete download.
static VALUE ruby_curl_easy_download_speed_get(VALUE self) { ruby_curl_easy *rbce; double bytes; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_DOWNLOAD, &bytes); return rb_float_new(bytes); }
Retrieve the total amount of bytes that were downloaded in the preceeding transfer.
static VALUE ruby_curl_easy_downloaded_bytes_get(VALUE self) { ruby_curl_easy *rbce; double bytes; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_DOWNLOAD, &bytes); return rb_float_new(bytes); }
Retrieve the content-length of the download. This is the value read from the Content-Length: field.
static VALUE ruby_curl_easy_downloaded_content_length_get(VALUE self) { ruby_curl_easy *rbce; double bytes; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &bytes); return rb_float_new(bytes); }
Get the set encoding types
static VALUE ruby_curl_easy_encoding_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, encoding); }
Set the accepted encoding types, curl will handle all of the decompression
static VALUE ruby_curl_easy_encoding_set(VALUE self, VALUE encoding) { CURB_OBJECT_HSETTER(ruby_curl_easy, encoding); }
Convert the given input string to a URL encoded string and return the result. All input characters that are not a-z, A-Z or 0-9 are converted to their “URL escaped” version (%NN where NN is a two-digit hexadecimal number).
static VALUE ruby_curl_easy_escape(VALUE self, VALUE svalue) { ruby_curl_easy *rbce; char *result; VALUE rresult; VALUE str = svalue; Data_Get_Struct(self, ruby_curl_easy, rbce); /* NOTE: make sure the value is a string, if not call to_s */ if( rb_type(str) != T_STRING ) { str = rb_funcall(str,rb_intern("to_s"),0); } #if (LIBCURL_VERSION_NUM >= 0x070f04) result = (char*)curl_easy_escape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str)); #else result = (char*)curl_escape(StringValuePtr(str), (int)RSTRING_LEN(str)); #endif rresult = rb_str_new2(result); curl_free(result); return rresult; }
Configure whether this Curl instance will fetch remote file times, if available.
static VALUE ruby_curl_easy_fetch_file_time_set(VALUE self, VALUE fetch_file_time) { CURB_BOOLEAN_SETTER(ruby_curl_easy, fetch_file_time); }
Determine whether this Curl instance will fetch remote file times, if available.
static VALUE ruby_curl_easy_fetch_file_time_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, fetch_file_time); }
Retrieve the remote time of the retrieved document (in number of seconds since 1 jan 1970 in the GMT/UTC time zone). If you get -1, it can be because of many reasons (unknown, the server hides it or the server doesn't support the command that tells document time etc) and the time of the document is unknown.
Note that you must tell the server to collect this information before the
transfer is made, by setting fetch_file_time?
to true, or you
will unconditionally get a -1 back.
This requires libcurl 7.5 or higher - otherwise -1 is unconditionally returned.
static VALUE ruby_curl_easy_file_time_get(VALUE self) { #ifdef HAVE_CURLINFO_FILETIME ruby_curl_easy *rbce; long time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_FILETIME, &time); return LONG2NUM(time); #else rb_warn("Installed libcurl is too old to support file_time"); return LONG2NUM(0); #endif }
Determine whether this Curl instance will follow Location: headers in HTTP responses.
static VALUE ruby_curl_easy_follow_location_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, follow_location); }
call-seq
easy.ftp_commands => array or nil
static VALUE ruby_curl_easy_ftp_commands_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, ftp_commands); }
Explicitly sets the list of commands to execute on the FTP server when calling perform
static VALUE ruby_curl_easy_ftp_commands_set(VALUE self, VALUE ftp_commands) { CURB_OBJECT_HSETTER(ruby_curl_easy, ftp_commands); }
Retrieve the path of the entry path. That is the initial path libcurl ended
up in when logging on to the remote FTP server. This returns
nil
if something is wrong.
(requires libcurl 7.15.4 or higher, otherwise nil
is always
returned).
static VALUE ruby_curl_easy_ftp_entry_path_get(VALUE self) { #ifdef HAVE_CURLINFO_FTP_ENTRY_PATH ruby_curl_easy *rbce; char* path = NULL; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_FTP_ENTRY_PATH, &path); if (path && path[0]) { // curl returns NULL or empty string if none return rb_str_new2(path); } else { return Qnil; } #else rb_warn("Installed libcurl is too old to support num_connects"); return Qnil; #endif }
call-seq
easy.ftp_filemethod => fixnum
Get the configuration for how libcurl will reach files on the server.
static VALUE ruby_curl_easy_ftp_filemethod_get(VALUE self, VALUE ftp_filemethod) { CURB_IMMED_GETTER(ruby_curl_easy, ftp_filemethod, -1); }
Controls how libcurl reaches files on the server. Valid options are Curl::CURL_MULTICWD, Curl::CURL_NOCWD, and Curl::CURL_SINGLECWD (see libcurl docs for CURLOPT_FTP_METHOD).
static VALUE ruby_curl_easy_ftp_filemethod_set(VALUE self, VALUE ftp_filemethod) { CURB_IMMED_SETTER(ruby_curl_easy, ftp_filemethod, -1); }
Obtain the maximum time that libcurl will wait for FTP command responses.
static VALUE ruby_curl_easy_ftp_response_timeout_get(VALUE self, VALUE ftp_response_timeout) { CURB_IMMED_GETTER(ruby_curl_easy, ftp_response_timeout, 0); }
Set a timeout period (in seconds) on the amount of time that the server is
allowed to take in order to generate a response message for a command
before the session is considered hung. While curl is waiting for a
response, this value overrides timeout
. It is recommended that
if used in conjunction with timeout
, you set
ftp_response_timeout
to a value smaller than
timeout
.
Ignored if libcurl version is < 7.10.8.
static VALUE ruby_curl_easy_ftp_response_timeout_set(VALUE self, VALUE ftp_response_timeout) { CURB_IMMED_SETTER(ruby_curl_easy, ftp_response_timeout, 0); }
Iniital access to libcurl curl_easy_getinfo, remember getinfo doesn't return the same values as setopt
static VALUE ruby_curl_easy_get_opt(VALUE self, VALUE opt) { return Qnil; }
Configure whether this Curl instance will return
HTTP headers combined with body data. If this option is set true, both
header and body data will go to body_str
(or the configured
on_body
handler).
static VALUE ruby_curl_easy_header_in_body_set(VALUE self, VALUE header_in_body) { CURB_BOOLEAN_SETTER(ruby_curl_easy, header_in_body); }
Determine whether this Curl instance will return HTTP headers combined with body data.
static VALUE ruby_curl_easy_header_in_body_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, header_in_body); }
Retrieve the total size of all the headers received in the preceeding transfer.
static VALUE ruby_curl_easy_header_size_get(VALUE self) { ruby_curl_easy *rbce; long size; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_HEADER_SIZE, &size); return LONG2NUM(size); }
Return the response header from the previous call to perform
.
This is populated by the default on_header
handler - if you
supply your own header handler, this string will be empty.
static VALUE ruby_curl_easy_header_str_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, header_data); }
Obtain the custom HTTP headers for following requests.
static VALUE ruby_curl_easy_headers_get(VALUE self) { ruby_curl_easy *rbce; VALUE headers; Data_Get_Struct(self, ruby_curl_easy, rbce); headers = rb_easy_get("headers");//rb_hash_aref(rbce->opts, rb_intern("headers")); if (headers == Qnil) { headers = rb_easy_set("headers", rb_hash_new()); } return headers; }
Set custom HTTP headers for following requests. This can be used to add custom headers, or override standard headers used by libcurl. It defaults to a Hash.
For example to set a standard or custom header:
easy.headers["MyHeader"] = "myval"
To remove a standard header (this is useful when removing libcurls default 'Expect: 100-Continue' header when using HTTP form posts):
easy.headers["Expect"] = ''
Anything passed to libcurl as a header will be converted to a string during the perform step.
static VALUE ruby_curl_easy_headers_set(VALUE self, VALUE headers) { CURB_OBJECT_HSETTER(ruby_curl_easy, headers); }
Send an HTTP request with method set to verb, using the current options set for this Curl::Easy instance. This method always returns true or raises an exception (defined under Curl::Err) on error.
static VALUE ruby_curl_easy_perform_verb(VALUE self, VALUE verb) { VALUE str_verb; if (rb_type(verb) == T_STRING) { return ruby_curl_easy_perform_verb_str(self, StringValueCStr(verb)); } else if (rb_respond_to(verb,rb_intern("to_s"))) { str_verb = rb_funcall(verb, rb_intern("to_s"), 0); return ruby_curl_easy_perform_verb_str(self, StringValueCStr(str_verb)); } else { rb_raise(rb_eRuntimeError, "Invalid HTTP VERB, must response to 'to_s'"); } }
Obtain the HTTP authentication types that may be used for the following
perform
calls.
static VALUE ruby_curl_easy_http_auth_types_get(VALUE self) { CURB_IMMED_GETTER(ruby_curl_easy, http_auth_types, 0); }
Set the HTTP authentication types that may be used for the following
perform
calls. This is a bitmap made by ORing together the
Curl::CURLAUTH constants.
static VALUE ruby_curl_easy_http_auth_types_set(int argc, VALUE *argv, VALUE self) {//VALUE self, VALUE http_auth_types) { ruby_curl_easy *rbce; VALUE args_ary; long i, len; char* node = NULL; long mask = 0; rb_scan_args(argc, argv, "*", &args_ary); Data_Get_Struct(self, ruby_curl_easy, rbce); len = RARRAY_LEN(args_ary); if (len == 1 && (rb_ary_entry(args_ary,0) == Qnil || TYPE(rb_ary_entry(args_ary,0)) == T_FIXNUM || TYPE(rb_ary_entry(args_ary,0)) == T_BIGNUM)) { if (rb_ary_entry(args_ary,0) == Qnil) { rbce->http_auth_types = 0; } else { rbce->http_auth_types = NUM2LONG(rb_ary_entry(args_ary,0)); } } else { // we could have multiple values, but they should be symbols node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,0),rb_intern("to_s"),0)); mask = CURL_HTTPAUTH_STR_TO_NUM(node); for( i = 1; i < len; ++i ) { node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,i),rb_intern("to_s"),0)); mask |= CURL_HTTPAUTH_STR_TO_NUM(node); } rbce->http_auth_types = mask; } return LONG2NUM(rbce->http_auth_types); }
Retrieve the last received proxy response code to a CONNECT request.
static VALUE ruby_curl_easy_http_connect_code_get(VALUE self) { ruby_curl_easy *rbce; long code; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CONNECTCODE, &code); return LONG2NUM(code); }
POST the specified formdata to the currently configured URL using the current options set for this Curl::Easy instance. This method always returns true, or raises an exception (defined under Curl::Err) on error.
The Content-type of the POST is determined by the current setting of multipart_form_post? , according to the following rules:
-
When false (the default): the form will be POSTed with a content-type of 'application/x-www-form-urlencoded', and any of the four calling forms may be used.
-
When true: the form will be POSTed with a content-type of 'multipart/formdata'. Only the last calling form may be used, i.e. only PostField instances may be POSTed. In this mode, individual fields' content-types are recognised, and file upload fields are supported.
static VALUE ruby_curl_easy_perform_post(int argc, VALUE *argv, VALUE self) { ruby_curl_easy *rbce; CURL *curl; int i; VALUE args_ary; rb_scan_args(argc, argv, "*", &args_ary); Data_Get_Struct(self, ruby_curl_easy, rbce); curl = rbce->curl; curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL); if (rbce->multipart_form_post) { VALUE ret; struct curl_httppost *first = NULL, *last = NULL; // Make the multipart form for (i = 0; i < argc; i++) { if (rb_obj_is_instance_of(argv[i], cCurlPostField)) { append_to_form(argv[i], &first, &last); } else if (rb_type(argv[i]) == T_ARRAY) { // see: https://github.com/rvanlieshout/curb/commit/8bcdefddc0162484681ebd1a92d52a642666a445 long c = 0, argv_len = RARRAY_LEN(argv[i]); for (; c < argv_len; ++c) { if (rb_obj_is_instance_of(rb_ary_entry(argv[i],c), cCurlPostField)) { append_to_form(rb_ary_entry(argv[i],c), &first, &last); } else { rb_raise(eCurlErrInvalidPostField, "You must use PostFields only with multipart form posts"); return Qnil; } } } else { rb_raise(eCurlErrInvalidPostField, "You must use PostFields only with multipart form posts"); return Qnil; } } curl_easy_setopt(curl, CURLOPT_POST, 0); curl_easy_setopt(curl, CURLOPT_HTTPPOST, first); ret = rb_funcall(self, rb_intern("perform"), 0); curl_formfree(first); return ret; } else { VALUE post_body = Qnil; /* TODO: check for PostField.file and raise error before to_s fails */ if ((post_body = rb_funcall(args_ary, idJoin, 1, rbstrAmp)) == Qnil) { rb_raise(eCurlErrError, "Failed to join arguments"); return Qnil; } else { /* if the function call above returns an empty string because no additional arguments were passed this makes sure a previously set easy.post_body = "arg=foo&bar=bin" will be honored */ if( post_body != Qnil && rb_type(post_body) == T_STRING && RSTRING_LEN(post_body) > 0 ) { ruby_curl_easy_post_body_set(self, post_body); } /* if post body is not defined, set it so we enable POST header, even though the request body is empty */ if( rb_easy_nil("postdata_buffer") ) { ruby_curl_easy_post_body_set(self, post_body); } return rb_funcall(self, rb_intern("perform"), 0); } } }
PUT the supplied data to the currently configured URL using the current options set for this Curl::Easy instance. This method always returns true, or raises an exception (defined under Curl::Err) on error.
static VALUE ruby_curl_easy_perform_put(VALUE self, VALUE data) { ruby_curl_easy *rbce; CURL *curl; Data_Get_Struct(self, ruby_curl_easy, rbce); curl = rbce->curl; curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL); ruby_curl_easy_put_data_set(self, data); return rb_funcall(self, rb_intern("perform"), 0); }
Configure whether this Curl::Easy instance should ignore the content length header.
static VALUE ruby_curl_easy_ignore_content_length_set(VALUE self, VALUE ignore_content_length) { CURB_BOOLEAN_SETTER(ruby_curl_easy, ignore_content_length); }
Determine whether this Curl::Easy instance ignores the content length header.
static VALUE ruby_curl_easy_ignore_content_length_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, ignore_content_length); }
static VALUE ruby_curl_easy_inspect(VALUE self) { char buf[64]; ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); /* if we don't have a url set... we'll crash... */ if( !rb_easy_nil("url") && rb_easy_type_check("url", T_STRING)) { VALUE url = rb_easy_get("url"); size_t len = 13+((RSTRING_LEN(url) > 50) ? 50 : RSTRING_LEN(url)); /* "#<Net::HTTP http://www.google.com/:80 open=false>" */ memcpy(buf,"#<Curl::Easy ", 13); memcpy(buf+13,StringValueCStr(url), (len - 13)); buf[len++] = '>'; return rb_str_new(buf,len); } return rb_str_new2("#<Curl::Easy>"); }
Obtain the interface name that is used as the outgoing network interface. The name can be an interface name, an IP address or a host name.
static VALUE ruby_curl_easy_interface_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, interface_hm); }
Retrieve the last effective URL used by this instance. This is the URL used
in the last perform
call, and may differ from the value of
easy.url.
static VALUE ruby_curl_easy_last_effective_url_get(VALUE self) { ruby_curl_easy *rbce; char* url; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_EFFECTIVE_URL, &url); if (url && url[0]) { // curl returns empty string if none return rb_str_new2(url); } else { return Qnil; } }
static VALUE ruby_curl_easy_last_result(VALUE self) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); return LONG2NUM(rbce->last_result); }
Obtain the local port that will be used for the following
perform
calls.
This option is ignored if compiled against libcurl < 7.15.2.
static VALUE ruby_curl_easy_local_port_get(VALUE self) { CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port); }
Set the local port that will be used for the following perform
calls.
Passing nil
will return to the default behaviour (no local
port preference).
This option is ignored if compiled against libcurl < 7.15.2.
static VALUE ruby_curl_easy_local_port_set(VALUE self, VALUE local_port) { CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port, "port"); }
Obtain the local port range that will be used for the following
perform
calls.
This option is ignored if compiled against libcurl < 7.15.2.
static VALUE ruby_curl_easy_local_port_range_get(VALUE self) { CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port_range); }
Set the local port range that will be used for the following
perform
calls. This is a number (between 0 and 65535) that
determines how far libcurl may deviate from the supplied
local_port
in order to find an available port.
If you set local_port
it's also recommended that you set
this, since it is fairly likely that your specified port will be
unavailable.
This option is ignored if compiled against libcurl < 7.15.2.
static VALUE ruby_curl_easy_local_port_range_set(VALUE self, VALUE local_port_range) { CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port_range, "port range"); }
Obtain the minimum transfer speed over +low_speed+time+ below which the transfer will be aborted.
static VALUE ruby_curl_easy_low_speed_limit_get(VALUE self, VALUE low_speed_limit) { CURB_IMMED_GETTER(ruby_curl_easy, low_speed_limit, 0); }
Set the transfer speed (in bytes per second) that the transfer should be
below during low_speed_time
seconds for the library to
consider it too slow and abort.
static VALUE ruby_curl_easy_low_speed_limit_set(VALUE self, VALUE low_speed_limit) { CURB_IMMED_SETTER(ruby_curl_easy, low_speed_limit, 0); }
Obtain the time that the transfer should be below
low_speed_limit
for the library to abort it.
static VALUE ruby_curl_easy_low_speed_time_get(VALUE self, VALUE low_speed_time) { CURB_IMMED_GETTER(ruby_curl_easy, low_speed_time, 0); }
Set the time (in seconds) that the transfer should be below the
low_speed_limit
for the library to consider it too slow and
abort.
static VALUE ruby_curl_easy_low_speed_time_set(VALUE self, VALUE low_speed_time) { CURB_IMMED_SETTER(ruby_curl_easy, low_speed_time, 0); }
Get the maximal receiving transfer speed (in bytes per second)
static VALUE ruby_curl_easy_max_recv_speed_large_get(VALUE self, VALUE max_recv_speed_large) { CURB_IMMED_GETTER(ruby_curl_easy, max_recv_speed_large, 0); }
Set the maximal receiving transfer speed (in bytes per second)
static VALUE ruby_curl_easy_max_recv_speed_large_set(VALUE self, VALUE max_recv_speed_large) { CURB_IMMED_SETTER(ruby_curl_easy, max_recv_speed_large, 0); }
Obtain the maximum number of redirections to follow in the following
perform
calls.
static VALUE ruby_curl_easy_max_redirects_get(VALUE self) { CURB_IMMED_GETTER(ruby_curl_easy, max_redirs, -1); }
Set the maximum number of redirections to follow in the following
perform
calls. Set to nil or -1 allow an infinite number (the
default). Setting this option only makes sense if
follow_location
is also set true.
With libcurl >= 7.15.1, setting this to 0 will cause libcurl to refuse any redirect.
static VALUE ruby_curl_easy_max_redirects_set(VALUE self, VALUE max_redirs) { CURB_IMMED_SETTER(ruby_curl_easy, max_redirs, -1); }
Get the maximal sending transfer speed (in bytes per second)
static VALUE ruby_curl_easy_max_send_speed_large_get(VALUE self, VALUE max_send_speed_large) { CURB_IMMED_GETTER(ruby_curl_easy, max_send_speed_large, 0); }
Set the maximal sending transfer speed (in bytes per second)
static VALUE ruby_curl_easy_max_send_speed_large_set(VALUE self, VALUE max_send_speed_large) { CURB_IMMED_SETTER(ruby_curl_easy, max_send_speed_large, 0); }
static VALUE ruby_curl_easy_multi_get(VALUE self) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); return rbce->multi; }
static VALUE ruby_curl_easy_multi_set(VALUE self, VALUE multi) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); rbce->multi = multi; return rbce->multi; }
Configure whether this Curl instance uses multipart/formdata content type for HTTP POST requests. If this is false (the default), then the application/x-www-form-urlencoded content type is used for the form data.
If this is set true, you must pass one or more PostField instances to the #http_post method - no support for posting multipart forms from a string is provided.
static VALUE ruby_curl_easy_multipart_form_post_set(VALUE self, VALUE multipart_form_post) { CURB_BOOLEAN_SETTER(ruby_curl_easy, multipart_form_post); }
Determine whether this Curl instance uses multipart/formdata content type for HTTP POST requests.
static VALUE ruby_curl_easy_multipart_form_post_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, multipart_form_post); }
Retrieve the time, in seconds, it took from the start until the name resolving was completed.
static VALUE ruby_curl_easy_name_lookup_time_get(VALUE self) { ruby_curl_easy *rbce; double time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_NAMELOOKUP_TIME, &time); return rb_float_new(time); }
Retrieve the number of new connections libcurl had to create to achieve the
previous transfer (only the successful connects are counted). Combined with
redirect_count
you are able to know how many times libcurl
successfully reused existing connection(s) or not.
See the Connection Options of curl_easy_setopt(3) to see how libcurl tries to make persistent connections to save time.
(requires libcurl 7.12.3 or higher, otherwise -1 is always returned).
static VALUE ruby_curl_easy_num_connects_get(VALUE self) { #ifdef HAVE_CURLINFO_NUM_CONNECTS ruby_curl_easy *rbce; long result; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_NUM_CONNECTS, &result); return LONG2NUM(result); #else rb_warn("Installed libcurl is too old to support num_connects"); return LONG2NUM(-1); #endif }
Assign or remove the on_body
handler for this Curl::Easy instance. To remove a previously-supplied
handler, call this method with no attached block.
The on_body
handler is called for each chunk of response body
passed back by libcurl during perform
. It should perform any
processing necessary, and return the actual number of bytes handled.
Normally, this will equal the length of the data string, and CURL will
continue processing. If the returned length does not equal the input
length, CURL will abort the processing with a Curl::Err::AbortedByCallbackError.
static VALUE ruby_curl_easy_on_body_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, body_proc); }
Assign or remove the on_complete
handler for this Curl::Easy instance. To remove a previously-supplied
handler, call this method with no attached block.
The on_complete
handler is called when the request is
finished.
static VALUE ruby_curl_easy_on_complete_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, complete_proc); }
Assign or remove the on_debug
handler for this Curl::Easy instance. To remove a previously-supplied
handler, call this method with no attached block.
The on_debug
handler, if configured, will receive detailed
information from libcurl during the perform call. This can be useful for
debugging. Setting a debug handler overrides libcurl's internal
handler, disabling any output from verbose
, if set.
The type argument will match one of the Curl::Easy::CURLINFO_XXXX constants, and specifies the kind of information contained in the data. The data is passed as a String.
static VALUE ruby_curl_easy_on_debug_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, debug_proc); }
Assign or remove the on_failure
handler for this Curl::Easy instance. To remove a previously-supplied
handler, call this method with no attached block.
The on_failure
handler is called when the request is finished
with a status of 50x
static VALUE ruby_curl_easy_on_failure_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, failure_proc); }
Assign or remove the on_header
handler for this Curl::Easy instance. To remove a previously-supplied
handler, call this method with no attached block.
The on_header
handler is called for each chunk of response
header passed back by libcurl during perform
. The semantics
are the same as for the block supplied to on_body
.
static VALUE ruby_curl_easy_on_header_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, header_proc); }
Assign or remove the #on_missing handler for this Curl::Easy instance. To remove a previously-supplied handler, call this method with no attached block.
The on_missing
handler is called when request is finished with
a status of 40x
static VALUE ruby_curl_easy_on_missing_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, missing_proc); }
Assign or remove the on_progress
handler for this Curl::Easy instance. To remove a previously-supplied
handler, call this method with no attached block.
The on_progress
handler is called regularly by libcurl
(approximately once per second) during transfers to allow the application
to receive progress information. There is no guarantee that the reported
progress will change between calls.
The result of the block call determines whether libcurl continues the transfer. Returning a non-true value (i.e. nil or false) will cause the transfer to abort, throwing a Curl::Err::AbortedByCallbackError.
static VALUE ruby_curl_easy_on_progress_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, progress_proc); }
Assign or remove the #on_redirect handler for this Curl::Easy instance. To remove a previously-supplied handler, call this method with no attached block.
The on_redirect
handler is called when request is finished
with a status of 30x
static VALUE ruby_curl_easy_on_redirect_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, redirect_proc); }
Assign or remove the on_success
handler for this Curl::Easy instance. To remove a previously-supplied
handler, call this method with no attached block.
The on_success
handler is called when the request is finished
with a status of 20x
static VALUE ruby_curl_easy_on_success_set(int argc, VALUE *argv, VALUE self) { CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, success_proc); }
Retrieve the errno variable from a connect failure (requires libcurl 7.12.2 or higher, otherwise 0 is always returned).
static VALUE ruby_curl_easy_os_errno_get(VALUE self) { #ifdef HAVE_CURLINFO_OS_ERRNO ruby_curl_easy *rbce; long result; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_OS_ERRNO, &result); return LONG2NUM(result); #else rb_warn("Installed libcurl is too old to support os_errno"); return LONG2NUM(0); #endif }
Get the current password
static VALUE ruby_curl_easy_password_get(VALUE self, VALUE password) { #if HAVE_CURLOPT_PASSWORD CURB_OBJECT_HGETTER(ruby_curl_easy, password); #else return Qnil; #endif }
Set the HTTP Authentication password.
static VALUE ruby_curl_easy_password_set(VALUE self, VALUE password) { #if HAVE_CURLOPT_PASSWORD CURB_OBJECT_HSETTER(ruby_curl_easy, password); #else return Qnil; #endif }
Obtain the POST body used in this Curl::Easy instance.
static VALUE ruby_curl_easy_post_body_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, postdata_buffer); }
Sets the POST body of this Curl::Easy instance. This is expected to be URL encoded; no additional processing or encoding is done on the string. The content-type header will be set to application/x-www-form-urlencoded.
This is handy if you want to perform a POST against a Curl::Multi instance.
static VALUE ruby_curl_easy_post_body_set(VALUE self, VALUE post_body) { ruby_curl_easy *rbce; CURL *curl; char *data; long len; Data_Get_Struct(self, ruby_curl_easy, rbce); curl = rbce->curl; if ( post_body == Qnil ) { rb_easy_del("postdata_buffer"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1); } else { if (rb_type(post_body) == T_STRING) { data = StringValuePtr(post_body); len = RSTRING_LEN(post_body); } else if (rb_respond_to(post_body, rb_intern("to_s"))) { VALUE str_body = rb_funcall(post_body, rb_intern("to_s"), 0); data = StringValuePtr(str_body); len = RSTRING_LEN(post_body); } else { rb_raise(rb_eRuntimeError, "post data must respond_to .to_s"); } // Store the string, since it has to hang around for the duration of the // request. See CURLOPT_POSTFIELDS in the libcurl docs. //rbce->postdata_buffer = post_body; rb_easy_set("postdata_buffer", post_body); curl_easy_setopt(curl, CURLOPT_POST, 1); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, len); return post_body; } return Qnil; }
Retrieve the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
static VALUE ruby_curl_easy_pre_transfer_time_get(VALUE self) { ruby_curl_easy *rbce; double time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_PRETRANSFER_TIME, &time); return rb_float_new(time); }
Retrieve the resolved IP of the most recent connection done with this curl handle. This string may be IPv6 if that's enabled. This feature requires curl 7.19.x and above
Obtain the proxy authentication types that may be used for the following
perform
calls.
static VALUE ruby_curl_easy_proxy_auth_types_get(VALUE self) { CURB_IMMED_GETTER(ruby_curl_easy, proxy_auth_types, 0); }
Set the proxy authentication types that may be used for the following
perform
calls. This is a bitmap made by ORing together the
Curl::CURLAUTH constants.
static VALUE ruby_curl_easy_proxy_auth_types_set(VALUE self, VALUE proxy_auth_types) { CURB_IMMED_SETTER(ruby_curl_easy, proxy_auth_types, 0); }
Obtain the custom HTTP #proxy_headers for following requests.
static VALUE ruby_curl_easy_proxy_headers_get(VALUE self) { ruby_curl_easy *rbce; VALUE proxy_headers; Data_Get_Struct(self, ruby_curl_easy, rbce); proxy_headers = rb_easy_get("proxy_headers");//rb_hash_aref(rbce->opts, rb_intern("proxy_headers")); if (proxy_headers == Qnil) { proxy_headers = rb_easy_set("proxy_headers", rb_hash_new()); } return proxy_headers; }
static VALUE ruby_curl_easy_proxy_headers_set(VALUE self, VALUE proxy_headers) { CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_headers); }
Obtain the proxy port that will be used for the following
perform
calls.
static VALUE ruby_curl_easy_proxy_port_get(VALUE self) { CURB_IMMED_PORT_GETTER(ruby_curl_easy, proxy_port); }
Set the proxy port that will be used for the following perform
calls.
static VALUE ruby_curl_easy_proxy_port_set(VALUE self, VALUE proxy_port) { CURB_IMMED_PORT_SETTER(ruby_curl_easy, proxy_port, "port"); }
Configure whether this Curl instance will use proxy tunneling.
static VALUE ruby_curl_easy_proxy_tunnel_set(VALUE self, VALUE proxy_tunnel) { CURB_BOOLEAN_SETTER(ruby_curl_easy, proxy_tunnel); }
Determine whether this Curl instance will use proxy tunneling.
static VALUE ruby_curl_easy_proxy_tunnel_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, proxy_tunnel); }
Obtain the proxy type that will be used for the following
perform
calls.
static VALUE ruby_curl_easy_proxy_type_get(VALUE self) { CURB_IMMED_GETTER(ruby_curl_easy, proxy_type, -1); }
Set the proxy type that will be used for the following perform
calls. This should be one of the Curl::CURLPROXY constants.
static VALUE ruby_curl_easy_proxy_type_set(VALUE self, VALUE proxy_type) { CURB_IMMED_SETTER(ruby_curl_easy, proxy_type, -1); }
Obtain the HTTP Proxy URL that will be used by subsequent calls to
perform
.
static VALUE ruby_curl_easy_proxy_url_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, proxy_url); }
Obtain the username/password string that will be used for proxy connection
during subsequent calls to perform
. The supplied string should
have the form “username:password”
static VALUE ruby_curl_easy_proxypwd_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, proxypwd); }
Points this Curl::Easy instance to data to be uploaded via PUT. This sets the request to a PUT type request - useful if you want to PUT via a multi handle.
static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) { ruby_curl_easy *rbce; CURL *curl; VALUE upload; VALUE headers; Data_Get_Struct(self, ruby_curl_easy, rbce); upload = ruby_curl_upload_new(cCurlUpload); ruby_curl_upload_stream_set(upload,data); curl = rbce->curl; rb_easy_set("upload", upload); /* keep the upload object alive as long as the easy handle is active or until the upload is complete or terminated... */ curl_easy_setopt(curl, CURLOPT_NOBODY, 0); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); curl_easy_setopt(curl, CURLOPT_READFUNCTION, (curl_read_callback)read_data_handler); #if HAVE_CURLOPT_SEEKFUNCTION curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, (curl_seek_callback)seek_data_handler); #endif curl_easy_setopt(curl, CURLOPT_READDATA, rbce); #if HAVE_CURLOPT_SEEKDATA curl_easy_setopt(curl, CURLOPT_SEEKDATA, rbce); #endif /* * we need to set specific headers for the PUT to work... so * convert the internal headers structure to a HASH if one is set */ if (!rb_easy_nil("headers")) { if (rb_easy_type_check("headers", T_ARRAY) || rb_easy_type_check("headers", T_STRING)) { rb_raise(rb_eRuntimeError, "Must set headers as a HASH to modify the headers in an PUT request"); } } // exit fast if the payload is empty if (NIL_P(data)) { return data; } headers = rb_easy_get("headers"); if( headers == Qnil ) { headers = rb_hash_new(); } if (rb_respond_to(data, rb_intern("read"))) { VALUE stat = rb_funcall(data, rb_intern("stat"), 0); if( stat && rb_hash_aref(headers, rb_str_new2("Content-Length")) == Qnil) { VALUE size; if( rb_hash_aref(headers, rb_str_new2("Expect")) == Qnil ) { rb_hash_aset(headers, rb_str_new2("Expect"), rb_str_new2("")); } size = rb_funcall(stat, rb_intern("size"), 0); curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size)); } else if( rb_hash_aref(headers, rb_str_new2("Content-Length")) == Qnil && rb_hash_aref(headers, rb_str_new2("Transfer-Encoding")) == Qnil ) { rb_hash_aset(headers, rb_str_new2("Transfer-Encoding"), rb_str_new2("chunked")); } else if( rb_hash_aref(headers, rb_str_new2("Content-Length")) ) { VALUE size = rb_funcall(rb_hash_aref(headers, rb_str_new2("Content-Length")), rb_intern("to_i"), 0); curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size)); } } else if (rb_respond_to(data, rb_intern("to_s"))) { curl_easy_setopt(curl, CURLOPT_INFILESIZE, RSTRING_LEN(data)); if( rb_hash_aref(headers, rb_str_new2("Expect")) == Qnil ) { rb_hash_aset(headers, rb_str_new2("Expect"), rb_str_new2("")); } } else { rb_raise(rb_eRuntimeError, "PUT data must respond to read or to_s"); } rb_easy_set("headers",headers); // if we made it this far, all should be well. return data; }
Retrieve the total number of redirections that were actually followed.
Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.
static VALUE ruby_curl_easy_redirect_count_get(VALUE self) { #ifdef HAVE_CURLINFO_REDIRECT_COUNT ruby_curl_easy *rbce; long count; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_COUNT, &count); return LONG2NUM(count); #else rb_warn("Installed libcurl is too old to support redirect_count"); return LONG2NUM(-1); #endif }
Retrieve the total time, in seconds, it took for all redirection steps
include name lookup, connect, pretransfer and transfer before final
transaction was started. redirect_time
contains the complete
execution time for multiple redirections.
Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.
static VALUE ruby_curl_easy_redirect_time_get(VALUE self) { #ifdef HAVE_CURLINFO_REDIRECT_TIME ruby_curl_easy *rbce; double time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_TIME, &time); return rb_float_new(time); #else rb_warn("Installed libcurl is too old to support redirect_time"); return rb_float_new(-1); #endif }
Retrieve the URL a redirect would take you to if you would enable CURLOPT_FOLLOWLOCATION.
Requires libcurl 7.18.2 or higher, otherwise -1 is always returned.
static VALUE ruby_curl_easy_redirect_url_get(VALUE self) { #ifdef HAVE_CURLINFO_REDIRECT_URL ruby_curl_easy *rbce; char* url; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_URL, &url); if (url && url[0]) { // curl returns empty string if none return rb_str_new2(url); } else { return Qnil; } #else rb_warn("Installed libcurl is too old to support redirect_url"); return LONG2NUM(-1); #endif }
Retrieve the total size of the issued requests. This is so far only for
HTTP requests. Note that this may be more than one request if
follow_location?
is true.
static VALUE ruby_curl_easy_request_size_get(VALUE self) { ruby_curl_easy *rbce; long size; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_REQUEST_SIZE, &size); return LONG2NUM(size); }
Reset the Curl::Easy instance, clears out all settings.
from curl.haxx.se/libcurl/c/curl_easy_reset.html Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with curl_easy_init(3). It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies and shares.
The return value contains all settings stored.
static VALUE ruby_curl_easy_reset(VALUE self) { CURLcode ecode; ruby_curl_easy *rbce; VALUE opts_dup; Data_Get_Struct(self, ruby_curl_easy, rbce); if (rbce->callback_active) { rb_raise(rb_eRuntimeError, "Cannot close an active curl handle within a callback"); } opts_dup = rb_funcall(rbce->opts, rb_intern("dup"), 0); curl_easy_reset(rbce->curl); ruby_curl_easy_zero(rbce); /* rest clobbers the private setting, so reset it to self */ ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self); if (ecode != CURLE_OK) { raise_curl_easy_error_exception(ecode); } /* Free everything up */ if (rbce->curl_headers) { curl_slist_free_all(rbce->curl_headers); rbce->curl_headers = NULL; } /* Free everything up */ if (rbce->curl_proxy_headers) { curl_slist_free_all(rbce->curl_proxy_headers); rbce->curl_proxy_headers = NULL; } return opts_dup; }
call-seq
easy.resolve => array or nil
static VALUE ruby_curl_easy_resolve_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, resolve); }
Set the resolve list to statically resolve hostnames to IP addresses, bypassing DNS for matching hostname/port combinations.
static VALUE ruby_curl_easy_resolve_set(VALUE self, VALUE resolve) { CURB_OBJECT_HSETTER(ruby_curl_easy, resolve); }
Determines what type of IP address this Curl::Easy instance resolves DNS names to.
static VALUE ruby_curl_easy_resolve_mode(VALUE self) { ruby_curl_easy *rbce; unsigned short rm; Data_Get_Struct(self, ruby_curl_easy, rbce); rm = rbce->resolve_mode; switch(rm) { case CURL_IPRESOLVE_V4: return rb_easy_sym("ipv4"); case CURL_IPRESOLVE_V6: return rb_easy_sym("ipv6"); default: return rb_easy_sym("auto"); } }
Configures what type of IP address this Curl::Easy instance resolves DNS names to. Valid options are:
- :auto
-
resolves DNS names to all IP versions your system allows
- :ipv4
-
resolves DNS names to IPv4 only
- :ipv6
-
resolves DNS names to IPv6 only
static VALUE ruby_curl_easy_resolve_mode_set(VALUE self, VALUE resolve_mode) { if (TYPE(resolve_mode) != T_SYMBOL) { rb_raise(rb_eTypeError, "Must pass a symbol"); return Qnil; } else { ruby_curl_easy *rbce; ID resolve_mode_id; Data_Get_Struct(self, ruby_curl_easy, rbce); resolve_mode_id = rb_to_id(resolve_mode); if (resolve_mode_id == rb_intern("auto")) { rbce->resolve_mode = CURL_IPRESOLVE_WHATEVER; return resolve_mode; } else if (resolve_mode_id == rb_intern("ipv4")) { rbce->resolve_mode = CURL_IPRESOLVE_V4; return resolve_mode; } else if (resolve_mode_id == rb_intern("ipv6")) { rbce->resolve_mode = CURL_IPRESOLVE_V6; return resolve_mode; } else { rb_raise(rb_eArgError, "Must set to one of :auto, :ipv4, :ipv6"); return Qnil; } } }
Retrieve the last received HTTP or FTP code. This will be zero if no server
response code has been received. Note that a proxy's CONNECT response
should be read with http_connect_code
and not this method.
static VALUE ruby_curl_easy_response_code_get(VALUE self) { ruby_curl_easy *rbce; long code; Data_Get_Struct(self, ruby_curl_easy, rbce); #ifdef HAVE_CURLINFO_RESPONSE_CODE curl_easy_getinfo(rbce->curl, CURLINFO_RESPONSE_CODE, &code); #else // old libcurl curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CODE, &code); #endif return LONG2NUM(code); }
Initial access to libcurl curl_easy_setopt
static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) { ruby_curl_easy *rbce; long option = NUM2LONG(opt); Data_Get_Struct(self, ruby_curl_easy, rbce); switch (option) { /* BEHAVIOR OPTIONS */ case CURLOPT_VERBOSE: { VALUE verbose = val; CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose); } break; case CURLOPT_FOLLOWLOCATION: { VALUE follow_location = val; CURB_BOOLEAN_SETTER(ruby_curl_easy, follow_location); } break; /* TODO: CALLBACK OPTIONS */ /* TODO: ERROR OPTIONS */ /* NETWORK OPTIONS */ case CURLOPT_URL: { VALUE url = val; CURB_OBJECT_HSETTER(ruby_curl_easy, url); } break; case CURLOPT_CUSTOMREQUEST: curl_easy_setopt(rbce->curl, CURLOPT_CUSTOMREQUEST, NIL_P(val) ? NULL : StringValueCStr(val)); break; case CURLOPT_HTTP_VERSION: curl_easy_setopt(rbce->curl, CURLOPT_HTTP_VERSION, NUM2LONG(val)); break; case CURLOPT_PROXY: { VALUE proxy_url = val; CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_url); } break; case CURLOPT_INTERFACE: { VALUE interface_hm = val; CURB_OBJECT_HSETTER(ruby_curl_easy, interface_hm); } break; case CURLOPT_HEADER: case CURLOPT_NOPROGRESS: case CURLOPT_NOSIGNAL: #if HAVE_CURLOPT_PATH_AS_IS case CURLOPT_PATH_AS_IS: #endif #if HAVE_CURLOPT_PIPEWAIT case CURLOPT_PIPEWAIT: #endif case CURLOPT_HTTPGET: case CURLOPT_NOBODY: { int type = rb_type(val); VALUE value; if (type == T_TRUE) { value = rb_int_new(1); } else if (type == T_FALSE) { value = rb_int_new(0); } else { value = rb_funcall(val, rb_intern("to_i"), 0); } curl_easy_setopt(rbce->curl, option, NUM2LONG(value)); } break; case CURLOPT_POST: { curl_easy_setopt(rbce->curl, CURLOPT_POST, rb_type(val) == T_TRUE); } break; case CURLOPT_MAXCONNECTS: { curl_easy_setopt(rbce->curl, CURLOPT_MAXCONNECTS, NUM2LONG(val)); } break; case CURLOPT_POSTFIELDS: { curl_easy_setopt(rbce->curl, CURLOPT_POSTFIELDS, NIL_P(val) ? NULL : StringValueCStr(val)); } break; case CURLOPT_USERPWD: { VALUE userpwd = val; CURB_OBJECT_HSETTER(ruby_curl_easy, userpwd); } break; case CURLOPT_PROXYUSERPWD: { VALUE proxypwd = val; CURB_OBJECT_HSETTER(ruby_curl_easy, proxypwd); } break; case CURLOPT_COOKIE: { VALUE cookies = val; CURB_OBJECT_HSETTER(ruby_curl_easy, cookies); } break; case CURLOPT_COOKIEFILE: { VALUE cookiefile = val; CURB_OBJECT_HSETTER(ruby_curl_easy, cookiefile); } break; case CURLOPT_COOKIEJAR: { VALUE cookiejar = val; CURB_OBJECT_HSETTER(ruby_curl_easy, cookiejar); } break; case CURLOPT_TCP_NODELAY: { curl_easy_setopt(rbce->curl, CURLOPT_TCP_NODELAY, NUM2LONG(val)); } break; case CURLOPT_RESUME_FROM: { curl_easy_setopt(rbce->curl, CURLOPT_RESUME_FROM, NUM2LONG(val)); } break; case CURLOPT_FAILONERROR: { curl_easy_setopt(rbce->curl, CURLOPT_FAILONERROR, NUM2LONG(val)); } break; case CURLOPT_SSL_CIPHER_LIST: { curl_easy_setopt(rbce->curl, CURLOPT_SSL_CIPHER_LIST, StringValueCStr(val)); } break; case CURLOPT_FORBID_REUSE: { curl_easy_setopt(rbce->curl, CURLOPT_FORBID_REUSE, NUM2LONG(val)); } break; #if HAVE_CURLOPT_GSSAPI_DELEGATION case CURLOPT_GSSAPI_DELEGATION: { curl_easy_setopt(rbce->curl, CURLOPT_GSSAPI_DELEGATION, NUM2LONG(val)); } break; #endif #if HAVE_CURLOPT_UNIX_SOCKET_PATH case CURLOPT_UNIX_SOCKET_PATH: { curl_easy_setopt(rbce->curl, CURLOPT_UNIX_SOCKET_PATH, StringValueCStr(val)); } break; #endif #if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE case CURLOPT_MAX_SEND_SPEED_LARGE: { curl_easy_setopt(rbce->curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t) NUM2LL(val)); } break; #endif #if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE case CURLOPT_MAX_RECV_SPEED_LARGE: { curl_easy_setopt(rbce->curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t) NUM2LL(val)); } break; #endif #if HAVE_CURLOPT_MAXFILESIZE case CURLOPT_MAXFILESIZE: curl_easy_setopt(rbce->curl, CURLOPT_MAXFILESIZE, NUM2LONG(val)); break; #endif #if HAVE_CURLOPT_TCP_KEEPALIVE case CURLOPT_TCP_KEEPALIVE: curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPALIVE, NUM2LONG(val)); break; case CURLOPT_TCP_KEEPIDLE: curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPIDLE, NUM2LONG(val)); break; case CURLOPT_TCP_KEEPINTVL: curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPINTVL, NUM2LONG(val)); break; #endif #if HAVE_CURLOPT_HAPROXYPROTOCOL case CURLOPT_HAPROXYPROTOCOL: curl_easy_setopt(rbce->curl, HAVE_CURLOPT_HAPROXYPROTOCOL, NUM2LONG(val)); break; #endif default: rb_raise(rb_eTypeError, "Curb unsupported option"); } return val; }
Determine whether this Curl instance will verify that the server cert is for the server it is known as.
static VALUE ruby_curl_easy_ssl_verify_host_get(VALUE self) { CURB_IMMED_GETTER(ruby_curl_easy, ssl_verify_host, 0); }
Configure whether this Curl instance will verify that the server cert is for the server it is known as. When true (the default) the server certificate must indicate that the server is the server to which you meant to connect, or the connection fails. When false, the connection will succeed regardless of the names in the certificate.
this option controls is of the identity that the server claims. The server could be lying. To control lying, see ssl_verify_peer? .
static VALUE ruby_curl_easy_ssl_verify_host_set(VALUE self, VALUE ssl_verify_host) { CURB_IMMED_SETTER(ruby_curl_easy, ssl_verify_host, 0); }
Configure whether this Curl instance will verify the SSL peer certificate. When true (the default), and the verification fails to prove that the certificate is authentic, the connection fails. When false, the connection succeeds regardless.
Authenticating the certificate is not by itself very useful. You typically want to ensure that the server, as authentically identified by its certificate, is the server you mean to be talking to. The #ssl_verify_host? options controls that.
static VALUE ruby_curl_easy_ssl_verify_peer_set(VALUE self, VALUE ssl_verify_peer) { CURB_BOOLEAN_SETTER(ruby_curl_easy, ssl_verify_peer); }
Determine whether this Curl instance will verify the SSL peer certificate.
static VALUE ruby_curl_easy_ssl_verify_peer_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, ssl_verify_peer); }
Retrieve the result of the certification verification that was requested
(by setting ssl_verify_peer?
to true
).
static VALUE ruby_curl_easy_ssl_verify_result_get(VALUE self) { ruby_curl_easy *rbce; long result; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_SSL_VERIFYRESULT, &result); return LONG2NUM(result); }
Get the version of SSL/TLS that libcurl will attempt to use.
static VALUE ruby_curl_easy_ssl_version_get(VALUE self, VALUE ssl_version) { CURB_IMMED_GETTER(ruby_curl_easy, ssl_version, -1); }
Sets the version of SSL/TLS that libcurl will attempt to use. Valid options are:
Curl::CURL_SSLVERSION_DEFAULT Curl::CURL_SSLVERSION_TLSv1 (TLS 1.x) Curl::CURL_SSLVERSION_SSLv2 Curl::CURL_SSLVERSION_SSLv3 Curl::CURL_SSLVERSION_TLSv1_0 Curl::CURL_SSLVERSION_TLSv1_1 Curl::CURL_SSLVERSION_TLSv1_2
static VALUE ruby_curl_easy_ssl_version_set(VALUE self, VALUE ssl_version) { CURB_IMMED_SETTER(ruby_curl_easy, ssl_version, -1); }
Retrieve the time, in seconds, it took from the start until the first byte
is just about to be transferred. This includes the
pre_transfer_time
and also the time the server needs to
calculate the result.
static VALUE ruby_curl_easy_start_transfer_time_get(VALUE self) { ruby_curl_easy *rbce; double time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_STARTTRANSFER_TIME, &time); return rb_float_new(time); }
Obtain the maximum time in seconds that you allow the libcurl transfer operation to take.
Uses #timeout_ms internally instead of timeout.
static VALUE ruby_curl_easy_timeout_get(VALUE self) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); return DBL2NUM(rbce->timeout_ms / 1000.0); }
Set the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations.
Set to nil (or zero) to disable timeout (it will then only timeout on the system's internal timeouts).
Uses #timeout_ms internally instead of timeout because it allows for better precision and libcurl will use the last set value when both timeout and #timeout_ms are set.
static VALUE ruby_curl_easy_timeout_set(VALUE self, VALUE timeout_s) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); if (Qnil == timeout_s || NUM2DBL(timeout_s) <= 0.0) { rbce->timeout_ms = 0; } else { rbce->timeout_ms = (unsigned long)(NUM2DBL(timeout_s) * 1000); } return DBL2NUM(rbce->timeout_ms / 1000.0); }
Obtain the maximum time in milliseconds that you allow the libcurl transfer operation to take.
static VALUE ruby_curl_easy_timeout_ms_get(VALUE self) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); return LONG2NUM(rbce->timeout_ms); }
Set the maximum time in milliseconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations.
Set to nil (or zero) to disable timeout (it will then only timeout on the system's internal timeouts).
static VALUE ruby_curl_easy_timeout_ms_set(VALUE self, VALUE timeout_ms) { ruby_curl_easy *rbce; Data_Get_Struct(self, ruby_curl_easy, rbce); if (Qnil == timeout_ms || NUM2DBL(timeout_ms) <= 0.0) { rbce->timeout_ms = 0; } else { rbce->timeout_ms = NUM2ULONG(timeout_ms); } return ULONG2NUM(rbce->timeout_ms); }
Retrieve the total time in seconds for the previous transfer, including name resolving, TCP connect etc.
static VALUE ruby_curl_easy_total_time_get(VALUE self) { ruby_curl_easy *rbce; double time; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_TOTAL_TIME, &time); return rb_float_new(time); }
Convert the given URL encoded input string to a “plain string” and return the result. All input characters that are URL encoded (%XX where XX is a two-digit hexadecimal number) are converted to their binary versions.
static VALUE ruby_curl_easy_unescape(VALUE self, VALUE str) { ruby_curl_easy *rbce; int rlen; char *result; VALUE rresult; Data_Get_Struct(self, ruby_curl_easy, rbce); #if (LIBCURL_VERSION_NUM >= 0x070f04) result = (char*)curl_easy_unescape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str), &rlen); #else result = (char*)curl_unescape(StringValuePtr(str), (int)RSTRING_LEN(str)); rlen = strlen(result); #endif rresult = rb_str_new(result, rlen); curl_free(result); return rresult; }
Configure whether this Curl instance may use any HTTP authentication method available when necessary.
static VALUE ruby_curl_easy_unrestricted_auth_set(VALUE self, VALUE unrestricted_auth) { CURB_BOOLEAN_SETTER(ruby_curl_easy, unrestricted_auth); }
Determine whether this Curl instance may use any HTTP authentication method available when necessary.
static VALUE ruby_curl_easy_unrestricted_auth_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, unrestricted_auth); }
Retrieve the average upload speed that curl measured for the preceeding complete upload.
static VALUE ruby_curl_easy_upload_speed_get(VALUE self) { ruby_curl_easy *rbce; double bytes; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_UPLOAD, &bytes); return rb_float_new(bytes); }
Retrieve the total amount of bytes that were uploaded in the preceeding transfer.
static VALUE ruby_curl_easy_uploaded_bytes_get(VALUE self) { ruby_curl_easy *rbce; double bytes; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_UPLOAD, &bytes); return rb_float_new(bytes); }
Retrieve the content-length of the upload.
static VALUE ruby_curl_easy_uploaded_content_length_get(VALUE self) { ruby_curl_easy *rbce; double bytes; Data_Get_Struct(self, ruby_curl_easy, rbce); curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &bytes); return rb_float_new(bytes); }
Obtain the URL that will be used by subsequent calls to
perform
.
static VALUE ruby_curl_easy_url_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, url); }
Configure whether this Curl instance will use data from the user's .netrc file for FTP connections.
static VALUE ruby_curl_easy_use_netrc_set(VALUE self, VALUE use_netrc) { CURB_BOOLEAN_SETTER(ruby_curl_easy, use_netrc); }
Determine whether this Curl instance will use data from the user's .netrc file for FTP connections.
static VALUE ruby_curl_easy_use_netrc_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, use_netrc); }
Get the desired level for using SSL on FTP connections.
static VALUE ruby_curl_easy_use_ssl_get(VALUE self, VALUE use_ssl) { CURB_IMMED_GETTER(ruby_curl_easy, use_ssl, -1); }
Ensure libcurl uses SSL for FTP connections. Valid options are Curl::CURL_USESSL_NONE, Curl::CURL_USESSL_TRY, Curl::CURL_USESSL_CONTROL, and Curl::CURL_USESSL_ALL.
static VALUE ruby_curl_easy_use_ssl_set(VALUE self, VALUE use_ssl) { CURB_IMMED_SETTER(ruby_curl_easy, use_ssl, -1); }
Obtain the user agent string used for this Curl::Easy instance
static VALUE ruby_curl_easy_useragent_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, useragent); }
Set the user agent string for this Curl::Easy instance
static VALUE ruby_curl_easy_useragent_set(VALUE self, VALUE useragent) { CURB_OBJECT_HSETTER(ruby_curl_easy, useragent); }
Get the current username
static VALUE ruby_curl_easy_username_get(VALUE self, VALUE username) { #if HAVE_CURLOPT_USERNAME CURB_OBJECT_HGETTER(ruby_curl_easy, username); #else return Qnil; #endif }
Set the HTTP Authentication username.
static VALUE ruby_curl_easy_username_set(VALUE self, VALUE username) { #if HAVE_CURLOPT_USERNAME CURB_OBJECT_HSETTER(ruby_curl_easy, username); #else return Qnil; #endif }
Obtain the username/password string that will be used for subsequent calls
to perform
.
static VALUE ruby_curl_easy_userpwd_get(VALUE self) { CURB_OBJECT_HGETTER(ruby_curl_easy, userpwd); }
Determine whether this Curl instance gives verbose output to STDERR during transfers.
static VALUE ruby_curl_easy_verbose_q(VALUE self) { CURB_BOOLEAN_GETTER(ruby_curl_easy, verbose); }


To obtain a full-time position working in the field of Aeronautical and/or Mechanical Engineering.
Rensselaer Polytechnic Institute, Troy, NY
Dual Bachelor of Science in Aeronautical and Mechanical Engineering
- Current GPA: 3.16 (Dean's Honor List 2016-2018)
-
Holochip Corporation, Torrance, CA
InternJul 2018 - August 2018
- Responsible for redesigning, printing, and assembling a previously made AR heaset based on Leap Motion's Project NorthStar in order to test theories that would potentialy fit the company's customer needs.
- Conducted research with respect to the vergence-accomodation conflict and light field displays to provide insight on ways to impprove the virtual reality experience for military use.
- Assembled prototypes to test the research gathered and the hypotheses made by the team.
-
America Counts (RPI Work-Study) Troy, NY
Supervisor (2017 - Present), Tutor (2016-2017)Sept 2016 - Present
- Managed tutor training and delegated tasks and organized workflow.
- Monitored employee productivity by managing 15 tutors and providing constructive feedback and coaching.
-
W.A.T.E.R Band (Water Area Transmitter for Emergency Response) Troy, NY
IED ProjectFall 2017
- Designed and assembled a relief aid system for those unable to evacuate disaster areas, as well as the municipalities in areas prone to hurricanes, flooding, etc. with a small group of students.
- Generated concepts, constructed a working prototype, and presented working ideas to both non-engineers and engineers, using the engineering design process.
-
Renuevo Schools Huntington Park, CA
Teacher's Assistant (5-week summer program)Jun 2017 - July 2017
- Reinforced lessons presented by the teacher by reviewing material with students one-on-one or in small groups.
- Prepared lessons by helping get material ready and with record-keeping such as calculating grades.
-
Society of Hispanic Professional Engineers (SHPE)- Outreach Troy, NY
Hospitality UnderstudySept 2017 - Present
- Assisted in the promotion and encouragement of STEM education within the Hispanic community.
- Arranged housing and meals for over 50 high school students participating in the program.
- Recruited and trained over 30 college students to volunteer during the event and host high school students.
-
Women's Mentoring Program at RensselaerTroy, NY
RPI Campus Affairs and Community Outreach LiasonSept 2016 - Present
- Coordinated with other student organization and campus departments to develop and plan co-curricular events to students (2018).
- Mentor incoming freshmen women.
Languages: Fluent in Spanish
Technical skills: Inventor, NX, MATLAB, C, Arduino, PSpice, LabVIEW, Sketchup, MS Office(Excel, PowerPoint, Work)
Other Involvement: Boeing Mentoring Program mentee


◦Home
◦Events
◦Clubs
◦Athletics
◦Academics
◦EXTRAS
CHARGING IN WITH STEAM!
Leona Libby Chargers
◦Counseling Corner
◦Facebook


bio
Lance Ball is a Principal Software Engineer at Red Hat Middleware. He is an active open source contributor, an author of several NPM modules, and a committer on the Node.js project.
details about the workshop
As cloud services have come to bear more responsibility for the enterprise features of modern app development, Node.js has become quite appealing for developers wanting to take advantage of its light weight, quick startup time and developer productivity. With cloud native application development patterns and Kubernetes deployments, Node.js is a formidable enterprise player.
Cloud native development can seem daunting, but it doesn't have to be. I will show you how Red Hat's OpenShift Kubernetes platform and the Istio service mesh make enterprise grade Node.js apps simple and straightforward.


A POW Graph consists of a number of Curves and Images drawn within a given rectangular region. The Edit Graph item in the Edit menu brings about a dialog box from which one can control what objects are drawn, how they are displayed, and how the graph itself is drawn...
The dialog box consists of 3 major regions. The top portion controls the contents of the current (or new) graph. The box on the left lists the objects currently in the graph. The box on the right lists all the available objects which are not in the graph. In both boxes, the type of each object (image or curve) will be indicated in parentheses after the objects' names. The Add and Remove buttons in between allows one to move the selected objects between the two lists. The name of the graph being editted is given below the left box. This can be changed if one wants to create a new graph rather than modify the current one. The Edit Objects button under the right box opens up another dialog box which allows one to edit the data structures which define Curves and Images.
The second region, below the graph contents section, contains the editable display options for the graph and graph objects. It has a paned format. At its top are a series of labeled tabs. Click on one of the tabs to view and edit that set of options. Each tab and its options are described below...
This pane contains the highest-level options affecting a graph's appearance. The first entry box contains the graph's title string. By default it is the graph name used internally by POW, but it can be any string or even blank. The entry boxes list, for both the X and Y axes, the Label to be written, the Min and Max values of the axis (actually, the lower-left and upper-right bounds of the graph's display region), the Units label of the values (printed within parentheses after the axis label), and the Size of the graph on the screen in pixels. Any or all of these may be NULL which tells POW to use the default values. In the case of the bounding box (Min/Max), default values will be determined by the minimum values required to display all the graph's contents. For Units, a NULL value will indicate not to list any units in the label axes. Clicking the Reset Min/Max button at the bottome sets all the bounding box values to NULL.
Below the entry boxes are a set of buttons labeled Scaling. These activate logarithmic graphs. The first row of linear and log buttons cause each axis to be drawn in either linear or logarithmic format. This does not affect the data, just how the graph coordinates are interpretted and labeled. The Scale curve data to axes check button determines whether the curves in this graph will be converted to the same axis format. Do not check this if any of your curves already contain logarithmic values (instead of the true values) and you only need to change how the axes are displayed, not how the curves are plotted. You can control the logarithmic conversion of individual curve data from the Points and Lines panes.
This pane controls the appearance of text in the graph. One can independently set the font, size, style, and color of the Title, Axis Labels, Tick Labels, and default Text Labels. The Text Label value is used only for the initial text label. All subsequent labels inherit their values from the previous label.
This pane controls the appearance of the tick marks and associated grid lines. Use the slidebars to indicate approximately how many tick marks should be drawn (and labeled) on each axis of the graph. At the far left, no tickmarks will be drawn on each axis. At the far right, about 30 may be drawn. The X Ticks and Y Ticks options control whether the X and Y tickmarks are drawn inside or outside the graph's box and whether they are labeled on the left and bottom axes. The Tick Labels option selects between Decimal and Base 60 (degrees minutes seconds) numerical formats. Base 60 is only used when a graph contains WCS information. If the Grid Lines checkbox is selected, lines will drawn on the graph, tracing the path of each tick mark coordinate. One can control the Color and line Style (solid, dashed, etc) of these lines.
The checkbox at the top of this item indicates whether the individual points of the curve should be drawn. The points can be drawn as any of the 7 listed shapes. The size of the points (except Dot which is always 1 point) can either be fixed at a constant size indicated by the slidebar, or drawn with widths/heights indicating the X and Y error bars. If there are X/Y error bars but the points are drawn in a fixed style, the error bars will be indicated by horizontal/vertical lines centered on the point. Points can be Filled or just drawn in outline. Finally, select the desired color from the displayed colorbar. This can be a different color than selected in the Lines pane.
At the bottom of the pane is a pair of LogX/logY checkbuttons. Checking these will cause this curve to have the logarithm of its data plotted instead of its true values. If the data is logarithmic already, leave these options unchecked, but select the appropriate Scaling mode in the Graph options (see above).
The checkbox at the top of this pane indicates whether data points will be connected with a continuous line. The line can be of several patterned styles or widths. The points can also be connected directly (Normal) or in a stair-step pattern (Histogram). In the latter mode, the Fill Boxes option draws the histogram as a series of solid boxes instead of an outline. Finally, select the desired color from the displayed colorbar. This can be a different color than selected in the Points pane.
At the bottom of the pane is a pair of LogX/logY checkbuttons. Checking these will cause this curve to have the logarithm of its data plotted instead of its true values. If the data is logarithmic already, leave these options unchecked, but select the appropriate Scaling mode in the Graph options (see above).
This pane controls the appearance of images. Most of the pane consists of a bunch of different colormaps. They are grouped in the same sequence as listed in the Color menu: smooth, continuous colormaps, followed by ramps, then the step functions. The Invert option will reverse the order of the colormap when turned on. The Scaling option controls how the colormap is applied to the image. For Linear scaling, each colormap level corresponds to a constant intensity range in the image. Square-Root scaling changes the mapping such that the intensity range covered by each color level increases as the square-root function, producing higher contrast at lower intesities. Logarithmic scaling uses the logarithmic function for colormapping, giving even more contrast at low intensities than sqrt. Histo Equalize scaling computes a histogram of the image and tries to distribute colors equally over the number of pixels. The Range entry boxes at the bottom list the intensity range over which the colormap should be applied. Initially, they will contain the full intensity range of the image. The Reset button resets these values to the full range of the image.
At the very bottom of the dialog box are 3 buttons. Apply will update the selected graph using the modified parameter values. The Reset button will reset the parameter options and object lists based on the currently selected graph (for when one either wants to revert to the original parameters, or if one selected a new graph, or if new objects were created). The Exit button closes the dialog box. Any changes will be lost if not Applyed before exitting.


EDUCATION
Tech Workforce Program, Chattanooga, TN Graduated April 2017
Experience with:
- Coding, command-line interactions, JavaScript, JQuery, HTML/CSS, Github, Atom (text editor), website deployment through Firebase
Chattanooga State Community College, Chattanooga, TN Graduated December 2014
- Computer Operations Technology GPA: 4.0
Relevant Course Work: Discovering Computers, Microsoft Office, Networking +, and Healthcare Information Technology
Tennessee State University, Nashville, TN Attended 2003 - 2006
- Studied Business Administration
Brainerd High School, Chattanooga, TN Graduated May 2003
WORK EXPERIENCE
- IT Help Desk (Short Term Contract)
Mike Collins and Associates (MCA), Chattanooga, TN January 2015
- Worked on a special (IE9 Upgrade) project for Lifecare Centers of America
- Extensive use of:
- Remote Desktop
- Active Directory
-
- CMD line
- Citrix server
- Mixie phone systems
- Lync
- Group Policy
- User Profiles
- Direct Support Professional/Home Manager
RHA Health Services, Chattanooga, TN May-2005-Present
Responsible for the well-being and quality of life for all clients served
Responsible for delegating tasks to other employees
Grooming, Cleaning, Meal preparation, community outings
Scheduling and transporting to all medical appointments
In charge of timesheets for employees as well as making out weekly work schedules
Handled overall upkeep and integrity of assigned homes
- Work Flow Management
Electric Power Board, Chattanooga, TN May 2005- August 2006
Worked as a Storage Clerk responsible for keeping track of inventory, shipping and receiving and helping customers with acquiring desired products
Delivered inter-office mail; performed data entry and document filing/coping
ACHIEVEMENTS
2008 Employee of the Year Award (and of the month December) at RHA Health Services
Silver Medal in Quiz Bowl at the 2014 Tennessee Skills USA Leadership Conference
PC Renewal Project - Refurbished and provided 300 computers to low-income families
IT Help Desk - Tiger Tech Station at Chattanooga State Community College
Vice President - Tech Club at Chattanooga State Community College
Inducted to the National Technical Honor Society Fall 2014


Escolha o assunto que te enteressa mais
Tecnologia
The sea freight service has grown conside rably in recent years. We spend timetting to know your processes to.
Animes
The sea freight service has grown conside rably in recent years. We spend timetting to know your processes to.
Air Transport
The sea freight service has grown conside rably in recent years. We spend timetting to know your processes to.
Air Transport
The sea freight service has grown conside rably in recent years. We spend timetting to know your processes to.
Land Transport
The sea freight service has grown conside rably in recent years. We spend timetting to know your processes to.
Ship Transport
The sea freight service has grown conside rably in recent years. We spend timetting to know your processes to.


Meet a partner for your best holiday
Based in Chicago I love playing tennis and loud music
I get my inspiration from nature and objects around me. I have a passion to colours, tupography and skateboards
I'm a happy person that loves cats and claimbing on mountains
Based in Chicago I love playing tennis and loud music


| Beyonwiz::Recording::TruncEntry |
use Beyonwiz::Recording::TruncEntry;
Represents an entry in the Beyonwiz trunc file.
FULLFILE
If set in $te->flags
, then the entry represents the whole
media file or recording.
If this is set, it should be on a singleton entry in a
Beyonwiz::Recording::Trunc
object, and the name of the associated file
is the path to the recording ($te->path
);
$te->fileName
should be ignored.
Beyonwiz::Recording::TruncEntry->new($accessor, $path, $wizOffset, $fileNum, $flags, $offset, $size)
Create a new Beyonwiz recording index entry object.
$accessor
is a reference to a
Beyonwiz::Recording::Accessor
used to carry out the media file access functions in
Beyonwiz::Recording::TruncEntry
.
$path
is the path to the source recording folder, and can be a
file system path or a URL depending on the type of $accessor
.
$wizOffset
logical byte offset of the entry in the recording
(bignum
).
$fileNum
is the numbered recording file that the entry refers to.
The file name is this number printed in printf
%04u
format.
$flags
- flags for the entry - unknown purpose.
$offset
- offset of the recording data chunk in the file (bignum
).
$size
- size of the recording data chunk in the file.
More than one Beyonwiz::Recording::Index
can refer to a given file.
Normally constructed from the Beyonwiz trunc file by
Beyonwiz::Recording::Trunc
.
$t->accessor([$val]);
Returns (sets) the media file accessor object reference.
$te->path([$val]);
Returns (sets) the source recording folder name.
$te->wizOffset([$val]);
Returns (sets) the logical byte offset of the entry in the recording.
$te->fileNum([$val]);
Returns (sets) the numbered recording file that the entry refers to.
$te->flags([$val]);
Returns (sets) the flags for the entry - unknown purpose.
$te->offset([$val]);
Returns (sets) the offset of the recording data chunk in the file (bignum
).
$te->size([$val]);
Returns (sets) the size of the recording data chunk in the file.
$te->accessor([$val]);
Returns (sets) the media file accessor object reference.
$te->fileName;
Returns the name of the numbered recording file that the entry refers to.
Returns an emptr string if the entry is flagged with FULLFILE
(the entry is for a single-file media file).
$te->fileLenTime([$file])
Return the tuple ($len, $modifyTime) for the recording data file.
The modify time is a Unix timestamp (seconds since 00:00:00) Jan 1 1970 UTC).
If the entry is flagged with FULLFILE
, the time returned is for
$te-
path>, otherwise for the file named
Returns undef
if the data can't be found
(access denied or file not found).
Uses packages:
Beyonwiz::Recording::Trunc
,
Beyonwiz::Utils
.
Uses bignum
for 64-bit integers, even when the underlying
Perl integers are 64 bits.
| Beyonwiz::Recording::TruncEntry |


Latest Posts
Latest Posts
Error
Errors (3 Articles)
-
10.7554/eLife.05563
Developmental alterations in centrosome integrity contribute to the post-mitotic state of mammalian cardiomyocytesVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas PeelSTATUS MESSAGE
-
10.7554/eLife.05563
Developmental alterations in centrosome integrity contribute to the post-mitotic state of mammalian cardiomyocytesVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas PeelSTATUS MESSAGE
-
10.7554/eLife.05563
Developmental alterations in centrosome integrity contribute to the post-mitotic state of mammalian cardiomyocytesVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas PeelSTATUS MESSAGE
In Progress
In Progress (2 Articles)
-
10.7554/eLife.05563
Developmental alterations in centrosome integrity contribute to the post-mitotic state of mammalian cardiomyocytesVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas PeelSTATUS MESSAGE
-
10.7554/eLife.05563
Developmental alterations in centrosome integrity contribute to the post-mitotic state of mammalian cardiomyocytesVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas PeelSTATUS MESSAGE
-
10.7554/eLife.05563
Developmental alterations in centrosome integrity contribute to the post-mitotic state of mammalian cardiomyocytesVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas PeelSTATUS MESSAGE
User Input Required
User Input Required (2 Articles)
(Ready to Publish)
Publish All Selected
-
10.7554/eLife.04640
Perturbation biology nominates upstream-downstream drug combinations in RAF inhibitor resistant melanoma cellsVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas Peel -
10.7554/eLife.04640
Perturbation biology nominates upstream-downstream drug combinations in RAF inhibitor resistant melanoma cellsVersion:
Article type:
Publication date:
Corresponding authors:POA.2.2
Research Article
28/04/2015
Ian T Baldwin, Max Planck, John Anderson, Thomas Peel
Scheduled
Scheduled (3 Articles)
-
10.7554/eLife.07836
Lipid-mediated regulation of SKN-1/Nrf in response to germ cell absenceVersion:
Article type:
Publication date:
Corresponding authors:VOR.2.1
Short Report
25/04/2015
Fischer U, Schäuble N, Schütz S, Altvater M, Chang Y, Boulos Faza M, Panse VGSTATUS MESSAGE
XX/XX/20XX 00:00XX -
10.7554/eLife.07836
Lipid-mediated regulation of SKN-1/Nrf in response to germ cell absenceVersion:
Article type:
Publication date:
Corresponding authors:VOR.2.1
Short Report
25/04/2015
Fischer U, Schäuble N, Schütz S, Altvater M, Chang Y, Boulos Faza M, Panse VGSTATUS MESSAGE
XX/XX/20XX 00:00XX


One of the most important differences between symmetric and asymmetric encryption is encryption speed. Here you can view the performance difference between RSA (asymmetric) and AES (symmetric) algorithms measured on your smartphone.
Asymmetric encryption has a limit for the maximum length of the encrypted message. Therefore, to encrypt a larger amount of data we have to split it into short chunks and encrypt each one of them separately. To decrypt the message we would have to decrypt each chunk and merge them in the correct order.
A few technichal details about the performance test:
- You can select encryption algorithms and keys by tapping on the table cells
- The performance depends on the current CPU usage, background processes activity, available memory, etc.
- In order to show the correlation between the performance and the input data size, the encryption is performed on random data of various sizes, from 1kB to 10MB
- The application uses the Apple encryption algorithms implementation for iOS. See Apple Developer Documentation for details.
- For AES encryption a randomly generated session key is used. The session key, in turn, is encrypted with a RSA key and appended to the encrypted data. If a 2048-bit RSA key is selected then a 128-bit AES key is generated. For a 4096-bit RSA key a 256-bit AES key is generated.
- The short algorithm names are used in the table for the brevity:
- RSA 1: RSA encryption PKCS1
- RSA 256: RSA encryption OAEP SHA-256
- RSA 512: RSA encryption OAEP SHA-512
- AES 1: AES encryption OAEP SHA-1 GCM
- AES 224: AES encryption OAEP SHA-224 GCM
- AES 512: AES encryption OAEP SHA-512 GCM


| ����� | ˵�� |
|---|---|
| org.jnetpcap.packet |
Packet decoding framework.
|
| org.jnetpcap.packet.annotate |
Annotation interfaces for header definitions.
|
| org.jnetpcap.packet.structure |
Packet, Header, Field, Binding and Scanner primitives that describe their
structure.
|
| org.jnetpcap.protocol.application |
Application protocol suite.
|
| org.jnetpcap.protocol.lan |
LAN protocol suite.
|
| org.jnetpcap.protocol.network |
Network protocol suite.
|
| org.jnetpcap.protocol.sigtran | |
| org.jnetpcap.protocol.tcpip |
Tcp/Ip protocol suite.
|
| org.jnetpcap.protocol.voip |
Voice Over IP protocol family.
|
| org.jnetpcap.protocol.vpn |
VPN protocol suite.
|
| org.jnetpcap.protocol.wan |
WAN protocol suite.
|
| ���˵�� |
|---|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| HeaderLength.Type
Table with constants for each type of get length methods supported.
|
| ���˵�� |
|---|
| Bind.Type
Defines constants for various binding types that are possible.
|
| BindingVariable.MatchType
The Enum MatchType.
|
| Field.Property
The Enum Property.
|
| Header.Characteristic
The Enum Characteristic.
|
| Header.Layer
The Enum Layer.
|
| HeaderLength.Type
Table with constants for each type of get length methods supported.
|
| Protocol.Suite
The Enum Suite.
|
| ProtocolSuite
Standard protocol suite names.
|
| ���˵�� |
|---|
| Field
Defines a header field's getter method.
|
| Field.Property
The Enum Property.
|
| Header
The Interface Header.
|
| HeaderLength.Type
Table with constants for each type of get length methods supported.
|
| ���˵�� |
|---|
| Bind
Defines a binding method.
|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| ���˵�� |
|---|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| FlowKey
The Interface FlowKey.
|
| Format
The Interface Format.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| ���˵�� |
|---|
| Bind
Defines a binding method.
|
| BindingVariable
The Interface BindingVariable.
|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| FieldSetter
The Interface FieldSetter.
|
| FlowKey
The Interface FlowKey.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| Protocol
Specifies global protocol properties.
|
| ���˵�� |
|---|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| ���˵�� |
|---|
| Bind
Defines a binding method.
|
| BindingVariable
The Interface BindingVariable.
|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| FieldSetter
The Interface FieldSetter.
|
| FlowKey
The Interface FlowKey.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| ���˵�� |
|---|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| ProtocolSuite
Standard protocol suite names.
|
| ���˵�� |
|---|
| Dynamic
The Interface Dynamic.
|
| Field
Defines a header field's getter method.
|
| Header
The Interface Header.
|
| HeaderLength
The Interface HeaderLength.
|
| ���˵�� |
|---|
| Field
Defines a header field's getter method.
|
| Header
The Interface Header.
|


The Scribe prototype is a tool developed by Zepheira that demonstrates how to catalog various materials natively in Linked Data. Initially supported by the Library of Congress, Scribe has matured with additional support from UC Davis University Library as part of the BIBFLOW project funded by the Institute for Museum and Library Services. Feedback from Zepheira's Linked Data and BIBFRAME Practical Practitioner Training Alumni have also been invaluable in Scribe's continued development.
This prototype is designed to demonstrate how one would catalog entities using the Bibframe Lite vocabulary. Bibframe Lite is an RDF vocabulary designed to integrate with and engage in the wider information community while also serving the very specific needs of local implementation. Zepheira works with a range of communities to extend the Bibframe Lite vocabulary. These additional vocabulary layers include:
Last updated: October 2, 2015


{% extends "base_project.html" %} {% load compress humanize static hc_extras %} {% block title %}Add Shell Command - {{ site_name }}{% endblock %} {% block content %}
Executes a local shell command when a check goes up or down.
You can use placeholders $NAME, $STATUS and others (quick reference).


|
libroman
1.0
A library to convert Roman numerals to their integer values.
|
This project was made as an assignment for the course Métodos de Programação 1 (Programming Methods 101), Computing Department, UnB, April 22nd, 2017. It consists in a library to convert Roman numbers to their integer values.
See the README for details about how to build, run and test the library and a little explanation about the inner workings of the Roman numbers.
I used the test-driven development (TDD) for the coding of this library. The tests were coded (and then the needed code to satisfy them) and developed as in the sucession below:
The final version of the code library can be found in src/roman.c and in src/roman-to-int.c , the final version of the standalone binary.
I then checked the test coverage using the gcov tool, yielding the following results:
In the src/roman-to-int.c file, the non-executed lines are referring to the check in case malloc() fails, which is a very unlikely case.
The corresponding .gcov files can be found in the following links: roman.c.gcov and roman-to-int.c.gcov
I ran the command cppcheck --enable=warning .
in the source code directory, obtaining the following results:


---
subject: Xavier is Elite Again!
description: Xavier Men's Basketball earned its spot in the Elite 8 with a win over Arizona.
---
{{> header }}
{{> spacer size=32 }}
{{> spacer }}
Here are Eight Elite things to do to support your Musketeers:
- Tune in on Saturday, March 25, at 6:09 p.m. (EST) to TBS as the Musketeers face Gonzaga. For more info visit the
Musketeers Postseason site.
{{> spacer }}
- If you're in California, stop by the official pre-game location, The Farmers Union, located at 151 W Santa Clara Street, San Jose, CA 95113 (2 hours prior to tip-off PDT). Xavier Pep Band and Cheer Squad are scheduled to make an appearance. Food and drink are available for purchase.
{{> spacer }}
- And, if you can't make it to California, get out to one of our Alumni & Friends game watch parties in a city near you.
{{> spacer }}
- Know that Xavier continues to push academic excellence with a string of 100 consecutive men's basketball seniors graduating from Xavier.
{{> spacer }}
- Update your Facebook or Twitter profile picture.
{{> spacer }}
- Celebrate your favorite "Musketeer Moment" by giving to X!
{{> spacer }}
- Continue the conversation online by sharing your thoughts and photos including everything that makes the Xavier community elite, indeed.
{{> spacer }}
- Encourage a high-school senior to find out more about Xavier and consider attending this fall.
{{> footer-alumni }}


I had first gotten into opiates when my girlfriend at the time found some of her grandmother's tylenol 3's, and shared the wealth. After that I was clued into the ability of buying dried poppies legally in a flower shop. The poppies when ground and left in boiling water for a half an hour yielded an all-natural supplement; one that ginseng will never compare with. Doing so made tea that may not have been very pleasant to the taste buds, but was certainly a delight for the opiate sensors in your body. As my fascination with opiates increased, I was keyed into someone who get's a constant supply of codeine. He sells each pill for 2 dollars. (Tylenol 4 with 60mg of codeine) Also this blessed gentleman sells yellow pills which start with the letter D,(I forget the name) and contain 4mg of morphine [Erowid Note: Mophine dosages are generally much higher than 4 mg per pill. We're guessing this is actually Dilaudid which is a yellow pill and contains 4 mg hydromorphone].
So my most intense opiatic experience was when I attempted to inject 4 yellow pills (16mg of hydromorphone) intra-veineously. The mixture filled up the 10cc's in the syringe with a liquid more yellow and potent than urine. By the time I had reached the mark of 4cc's in the syringe, the opiate feeling was so intense that the only way I can truly describe it is like this: You know the actual sensation that the opiate exudes when it's in your body, as intense as it is you are still able to distinguish your sobriety from that marvelous feeling. In otherwords, there is still some part of your body that is not in a state of 'euphoria.' In this case with the hydromorphone, that whole feeling was intense to the point where I could barely see straight + the feeling had overcome my whole body---I could not feel my limbs and such, only that feeling amplified logarhythmically, with not even a little bit of sobriety.
It was so intense that I didn't push all 10cc's right away. After that experience, heroin does not stand close. Furthermore, I would strongly suggest to anyone who is an opiate lover to stick with medicine. The stuff on the street is unclean, less potent, and unhealthy.
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.


Alien Attack Scoreboard
Game Countdown
00:00
Scoreboard Manager
Username:
Password:
Login
SESSION NAME:
(If not provided, will create one. Date-time will be added too)
Game type
Multiple trials
Single trial
Time-Constrained for
minutes (minimum 1, maximum 30)
Synchronized (Only applies for 'One Trial' and 'Time-Constrained')
OPENED
session:
2018-10-26T15:41:53
-
SINGLE-TRIAL
Session started in
and finished in
START game
Sync Game
STOP game


provingground
Generic Memoised Evolver built from base by adding spans and weights
Effective structures, collections and Utility functions for these


About Wellness
About Wellness Ohio
Welcome to About Wellness Ohio - Add To Cart
Quantity:
Cancel
Next
For security reasons, at any time you return to the Home Menu your account will be logged out of this tablet.


College Spot!
Home
School List
Search
Sign In
Create User
Source Code
I want to search for a school that costs
less than?
5,000
10,000
20,000
Any
that is located in
where students are accepted at
what admission rate?
very accepting
average
competitive
Find Your School!
Your search results
×


I`m a college student currently on a break, i have worked in a public company as a procurement officer thus know a little about supply management.
Took programming to expand my horizon
My hobby is playing basketball listening to music. Am interested in knowing how future turns out.


This rule checks that interfaces inheriting from an interface with the suffix Dao end with the same suffix.
public interface TestInterface extends Dao {}
public interface TestDao extends Dao {}


| test_that {testthat} | R Documentation |
A test encapsulates a series of expectations about small, self-contained set of functionality. Each test is contained in a context and contains multiple expectations.
test_that(desc, code)
desc |
test name. Names should be kept as brief as possible, as they are often used as line prefixes. |
code |
test code containing expectations. Braces ( |
Tests are evaluated in their own environments, and should not affect global state.
When run from the command line, tests return NULL
if all
expectations are met, otherwise it raises an error.
test_that("trigonometric functions match identities", { expect_equal(sin(pi / 4), 1 / sqrt(2)) expect_equal(cos(pi / 4), 1 / sqrt(2)) expect_equal(tan(pi / 4), 1) }) # Failing test: ## Not run: test_that("trigonometric functions match identities", { expect_equal(sin(pi / 4), 1) }) ## End(Not run)