swiplserver
Python library, but starting manually can be useful when debugging Prolog code in some scenarios. See the documentation on "Standalone Mode" for more information.
Once started, the server listens for TCP/IP or Unix Domain Socket connections and authenticates them using the password provided before processing any messages. The messages processed by the server are described below.
For debugging, the server outputs traces using the debug/3 predicate so that the server operation can be observed by using the debug/1 predicate. Run the following commands to see them:
debug(language_server(protocol))
: Traces protocol messages to show the flow of commands and connections. It is designed to avoid filling the screen with large queries and results to make it easier to read.debug(language_server(query))
: Traces messages that involve each query and its results. Therefore it can be quite verbose depending on the query.Options is a list containing any combination of the following options. When used in the Prolog top level (i.e. in Standalone Mode), these are specified as normal Prolog options like this:
language_server([unix_domain_socket(Socket), password('a password')])
When using "Embedded Mode" they are passed using the same name but as normal command line arguments like this:
swipl --quiet -g language_server -t halt -- --write_connection_values=true --password="a password" --create_unix_domain_socket=true
Note the use of quotes around values that could confuse command line processing like spaces (e.g. "a password") and that unix_domain_socket(Variable)
is written as --create_unix_domain_socket=true
on the command line. See below for more information.
write_connection_values(true)
is set, the selected port is output to STDOUT followed by \n
on startup to allow the client language library to retrieve it in "Embedded Mode".
To have one generated instead (recommended), pass Unix_Domain_Socket_Path_And_File as a variable when calling from the Prolog top level and the variable will be unified with a created filename. If launching in "Embedded Mode", instead pass --create_unix_domain_socket=true
since there isn't a way to specify variables from the command line. When generating the file, a temporary directory will be created using tmp_file/2 and a socket file will be created within that directory following the below requirements. If the directory and file are unable to be created for some reason, language_server/1 fails.
Regardless of whether the file is specified or generated, if the option write_connection_values(true)
is set, the fully qualified path to the generated file is output to STDOUT followed by \n
on startup to allow the client language library to retrieve it.
Specifying a file to use should follow the same guidelines as the generated file:
write_connection_values(true)
is set, the password is output to STDOUT followed by \n
on startup to allow the client language library to retrieve it. This is the recommended way to integrate the server with a language as it avoids including the password as source code. This option is only included so that a known password can be supplied for when the server is running in Standalone Mode.-1
).5
.true
when running in "Embedded Mode" so that the SWI Prolog process can exit properly. If not set, the default is true
.run_server_on_thread(true)
. Passing in an atom for Server_Thread will only set the server thread name if run_server_on_thread(true)
. If Server_Thread is a variable, it is unified with a generated name.false
.The messages the server responds to are described below. A few things are true for all of them:
close
and waiting for a response will halt the process if running in "Embedded Mode". This is so that stopping a debugger doesn't leave the process orphaned.-1
means no timeout.user
. module/1 has no effect.
Every language server message is a single valid Prolog term. Those that run queries have an argument which represents the query as a single term. To run several goals at once use (goal1, goal2, ...)
as the goal term.
The format of sent and received messages is identical (\n
stands for the ASCII newline character which is a single byte):
<stringByteLength>.\n<stringBytes>.\n.
For example, to send hello
as a message you would send this:
7.\nhello.\n
<stringByteLength>
is the number of bytes of the string to follow (including the .\n
), in human readable numbers, such as 15
for a 15 byte string. It must be followed by .\n
.<stringBytes>
is the actual message string being sent, such as run(atom(a), -1).\n
. It must always end with .\n
. The character encoding used to decode and encode the string is UTF-8.
To send a message to the server, send a message using the message format above to the localhost port or Unix Domain Socket that the server is listening on. For example, to run the synchronous goal atom(a)
, send the following message:
18.\nrun(atom(a), -1).\n<end of stream>
You will receive the response below on the receive stream of the same connection you sent on. Note that the answer is in JSON format. If a message takes longer than 2 seconds, there will be "heartbeat" characters (".") at the beginning of the response message, approximately 1 every 2 seconds. So, if the query takes 6 seconds for some reason, there will be three "." characters first:
...12\ntrue([[]]).\n
The full list of language server messages are described below:
Timeout is in seconds and indicates a timeout for generating all results for the query. Sending a variable (e.g. _) will use the default timeout passed to the initial language_server/1 predicate and -1
means no timeout.
While it is waiting for the query to complete, sends a "." character not in message format, just as a single character, once every two seconds to proactively ensure that the client is alive. Those should be read and discarded by the client.
If a communication failure happens (during a heartbeat or otherwise), the connection is terminated, the query is aborted and (if running in "Embedded Mode") the SWI Prolog process shuts down.
When completed, sends a response message using the normal message format indicating the result.
Response:
true([Answer1, Answer2, ... ]) | The goal succeeded at least once. The response always includes all answers as if run with findall() (see run_async/3 below to get individual results back iteratively). Each Answer is a list of the assignments of free variables in the answer. If there are no free variables, Answer is an empty list. |
false | The goal failed. |
exception(time_limit_exceeded) | The query timed out. |
exception(Exception) | An arbitrary exception was not caught while running the goal. |
exception(connection_failed) | The query thread unexpectedly exited. The server will no longer be listening after this exception. |
async_result
message (described below). The query can be cancelled by sending the cancel_async
message. If a previous query is still in progress, waits until that query finishes (discarding that query's results) before responding.
Timeout is in seconds and indicates a timeout for generating all results for the query. Sending a variable (e.g. _) will use the default timeout passed to the initial language_server/1 predicate and -1
means no timeout.
If the socket closes before a response is sent, the connection is terminated, the query is aborted and (if running in "Embedded Mode") the SWI Prolog process shuts down.
If it needs to wait for the previous query to complete, it will send heartbeat messages (see "Language Server Message Format") while it waits. After it responds, however, it does not send more heartbeats. This is so that it can begin accepting new commands immediately after responding so the client.
Find_All == true
means generate one response to an async_result
message with all of the answers to the query (as in the run
message above). Find_All == false
generates a single response to an async_result
message per answer.
Response:
true([[]]) | The goal was successfully parsed. |
exception(Exception) | An error occurred parsing the goal. |
exception(connection_failed) | The goal thread unexpectedly shut down. The server will no longer be listening after this exception. |
run_async
message in a way that allows further queries to be run on this Prolog thread afterwards.
If there is a goal running, injects a throw(cancel_goal)
into the executing goal to attempt to stop the goal's execution. Begins accepting new commands immediately after responding. Does not inject abort/0 because this would kill the connection's designated thread and the system is designed to maintain thread local data for the client. This does mean it is a "best effort" cancel since the exception can be caught.
cancel_async
is guaranteed to either respond with an exception (if there is no query or pending results from the last query), or safely attempt to stop the last executed query even if it has already finished.
To guarantee that a query is cancelled, send close
and close the socket.
It is not necessary to determine the outcome of cancel_async
after sending it and receiving a response. Further queries can be immediately run. They will start after the current query stops.
However, if you do need to determine the outcome or determine when the query stops, send async_result
. Using Timeout = 0
is recommended since the query might have caught the exception or still be running. Sending async_result
will find out the "natural" result of the goal's execution. The "natural" result depends on the particulars of what the code actually did. The response could be:
exception(cancel_goal) | The query was running and did not catch the exception. I.e. the goal was successfully cancelled. |
exception(time_limit_exceeded) | The query timed out before getting cancelled. |
exception(Exception) | They query hits another exception before it has a chance to be cancelled. |
| A valid answer | The query finished before being cancelled. |
Note that you will need to continue sending async_result
until you receive an exception(Exception)
message if you want to be sure the query is finished (see documentation for async_result
).
Response:
true([[]]) | There is a query running or there are pending results for the last query. |
exception(no_query) | There is no query or pending results from a query to cancel. |
exception(connection_failed) | The connection has been unexpectedly shut down. The server will no longer be listening after this exception. |
run_async
message. Used to get results for all cases: if the query terminates normally, is cancelled by sending a cancel_async
message, or times out.
Each response to an async_result
message responds with one result and, when there are no more results, responds with exception(no_more_results)
or whatever exception stopped the query. Receiving any exception
response except exception(result_not_available)
means there are no more results. If run_async
was run with Find_All == false
, multiple async_result
messages may be required before receiving the final exception.
Waits Timeout seconds for a result. Timeout == -1
or sending a variable for Timeout indicates no timeout. If the timeout is exceeded and no results are ready, sends exception(result_not_available)
.
Some examples:
| If the query succeeds with N answers... | async_result messages 1 to N will receive each answer, in order, and async_result message N+1 will receive exception(no_more_results) |
| If the query fails (i.e. has no answers)... | async_result message 1 will receive false and async_result message 2 will receive exception(no_more_results) |
| If the query times out after one answer... | async_result message 1 will receive the first answer and async_result message 2 will receive exception(time_limit_exceeded) |
| If the query is cancelled after it had a chance to get 3 answers... | async_result messages 1 to 3 will receive each answer, in order, and async_result message 4 will receive exception(cancel_goal) |
| If the query throws an exception before returning any results... | async_result message 1 will receive exception(Exception) |
Note that, after sending cancel_async
, calling async_result
will return the "natural" result of the goal's execution. The "natural" result depends on the particulars of what the code actually did since this is multi-threaded and there are race conditions. This is described more below in the response section and above in cancel_async
.
Response:
true([Answer1, Answer2, ... ]) | The next answer from the query is a successful answer. Whether there are more than one Answer in the response depends on the findall setting. Each Answer is a list of the assignments of free variables in the answer. If there are no free variables, Answer is an empty list. |
false | The query failed with no answers. |
exception(no_query) | There is no query in progress. |
exception(result_not_available) | There is a running query and no results were available in Timeout seconds. |
exception(no_more_results) | There are no more answers and no other exception occurred. |
exception(cancel_goal) | The next answer is an exception caused by cancel_async . Indicates no more answers. |
exception(time_limit_exceeded) | The query timed out generating the next answer (possibly in a race condition before getting cancelled). Indicates no more answers. |
exception(Exception) | The next answer is an arbitrary exception. This can happen after cancel_async if the cancel_async exception is caught or the code hits another exception first. Indicates no more answers. |
exception(connection_failed) | The goal thread unexpectedly exited. The server will no longer be listening after this exception. |
Any asynchronous query that is still running will be halted by using abort/0 in the connection's query thread.
Response:
true([[]])
Response:
true([[]])
To launch embedded mode:
swipl --quiet -g language_server -t halt -- --write_connection_values=true
This will start SWI Prolog and invoke the language_server/0 predicate and exit the process when that predicate stops. Any command line arguments after the standalone --
will be passed as Options. These are the same Options that language_server/1 accepts and are passed to it directly. Some options are expressed differently due to command line limitations, see language_server/1 Options for more information.
Any Option values that causes issues during command line parsing (such as spaces) should be passed with ""
like this:
swipl --quiet -g language_server -t halt -- --write_connection_values=true --password="HGJ SOWLWW WNDSJD"
Always succeeds.


Hi there, this is the Emerging Experience R&D Bot.
This is an R&D bot that lives in the Emerging Experiences Slack team and other channels.
It is used to experiment
and learn how bots work, how to interact with them, what works
and what doesn't.
For more info, please see the GitHub project.


Institution Information
Name:
Phone:
Title:
Email:
Contact Information Change Request
Department:
Cell Phone:
Address:
City:
State:
...
AK
AL
AR
AZ
CA
CO
CT
DE
DC
FL
GA
HI
IA
ID
IL
IN
KS
KY
LA
MA
MD
ME
MI
MN
MS
MO
MT
NC
ND
NE
NH
NJ
NM
NV
NY
OH
OK
OR
PA
RI
SC
SD
TN
TX
UT
VA
VT
WA
WI
WV
WY
Zip:
Please indicate whether you want to receive notice of the following items. Leave unchanged items blank.
Business Partner Meetings:
Yes
No
Client Events:
Yes
No
FYIs/Alerts:
Yes
No
Teleconferences:
Yes
No
Additional Comments


|
cds
2.3.1
|
Different backoff schemes. More...
Data Structures | |
| class | delay |
| Delay back-off strategy. More... | |
| struct | delay_const_traits |
| Constant traits for delay back-off strategy. More... | |
| struct | delay_runtime_traits |
| Runtime traits for delay back-off strategy. More... | |
| struct | empty |
| Empty backoff strategy. Do nothing. More... | |
| class | exponential |
| Exponential back-off. More... | |
| struct | exponential_const_traits |
backoff::exponential const traits More... | |
| struct | exponential_runtime_traits |
nackoff::exponential runtime traits More... | |
| struct | hint |
| Processor hint back-off. More... | |
| struct | pause |
| Random pause. More... | |
| struct | yield |
| Switch to another thread (yield). Good for thread preemption architecture. More... | |
Typedefs | |
| template<unsigned int Timeout, class Duration = std::chrono::milliseconds> | |
| using | delay_of = typename make_delay_of< Timeout, Duration >::type |
| Delay back-off strategy, template version. More... | |
| typedef exponential< exponential_const_traits > | Default |
| Default backoff strategy. | |
| typedef exponential< exponential_const_traits > | LockDefault |
| Default back-off strategy for lock primitives. | |
Different backoff schemes.
Back-off schema may be used in lock-free algorithms when the algorithm cannot perform some action because a conflict with the other concurrent operation is encountered. In this case current thread can do another work or can call processor's performance hint.
The interface of back-off strategy is following:
operator()
operator calls back-off strategy's action. It is main part of back-off strategy.
Interruptible back-off template < typename Predicate > bool operator()( Predicate pr )
allows to interrupt back-off spinning if pr
predicate returns true
. Predicate
is a functor with the following interface:
reset()
function resets internal state of back-off strategy to initial state. It is required for some back-off strategies, for example, exponential back-off.
| using cds::backoff::delay_of = typedef typename make_delay_of< Timeout, Duration >::type |
Delay back-off strategy, template version.
This is a simplified version of backoff::delay
class. Template parameter Timeout
sets a delay timeout of Duration
unit.


Rails app where a user records three good things each day, an exercise proven to increase happiness. Implemented Omniauth login feature and Chartkick line graphs using collected data from users over time.
A Jukebox Javascript object that can take in playlists.
A simple sass toolkit that comes with a responsive grid system.
Ruby on Rails pirate game during NYCDA Intensive Course. Argh!
Live
Micro blog app built on Sinatra framework. All posts are mumble-fied(every other vowel removed).
Fictional business website booking trips to Mars.
Ruby on Rails blogging app that used a database of users, posts, comments, and followers.


| Crash/Dynamics/Impact |
LS-DYNA®, PAM-CRASH®, Abaqus/Explicit®, RADIOSS® |
| CFD |
AcuSolve®, Abaqus®, Fluent®, STAR-CCM+®, OpenFOAM®, ANSYS CFX® |
| Structural |
Abaqus/Standard®, OptiStruct®, ANSYS Mechanical®, MSC NASTRAN® |
| Visualization |
Paraview®, Blender®, CEI®, Fieldview® |
Pricing
Network optimized: fast networking with InifiniBand support
The A8 and A9 virtual machines feature Intel® Xeon® E5 processors, with 32 Gbit/s Infiniband network and remote direct memory access (RDMA) technology. These instances are ideal for Message Passing Interface (MPI) applications, high-performance clusters for modeling and simulations, video encoding, and other compute or network intensive scenarios. These instances are available in select data centers.
A8 |
8 |
56 GB |
382 GB |
$0.975/hr (~$725/mo) |
A9 |
16 |
112 GB |
382 GB |
$1.95/hr (~$1,451/mo) |
Compute Intensive
The A10 and A11 virtual machines feature Intel® Xeon® E5 processors. These are ideal for high-performance clusters for modeling and simulations, video encoding, and other compute intensive scenarios. They are similar to A8 and A9 instance configuration without the Inifiband network and RDMA technology. These instances are available in select data centers.
A10 |
8 |
56 GB |
382 GB |
$0.78/hr (~$580/mo) |
A11 |
16 |
112 GB |
382 GB |
$1.56/hr (~$1,161/mo) |
See more pricing options
Prices do not include tax. Monthly price estimates are based on 744 hours of usage.


Represents a OpenGL shader program. Not in use, as I'm using nanogui's shaders right now.
More...
#include <ShaderProgram.hpp>
Represents a OpenGL shader program. Not in use, as I'm using nanogui's shaders right now.
◆ ShaderProgram()
| st::ShaderProgram::ShaderProgram |
( |
| ) |
|
◆ compileShader()
| GLuint st::ShaderProgram::compileShader |
( |
shared_ptr< Shader > |
shader | ) |
|
◆ disable()
| void st::ShaderProgram::disable |
( |
| ) |
|
|
inline |
◆ show_compilation_error()
| void st::ShaderProgram::show_compilation_error |
( |
GLuint |
shader_id | ) |
|
|
private |
◆ show_linkage_error()
| void st::ShaderProgram::show_linkage_error |
( |
GLuint |
program_id | ) |
|
|
private |
◆ use()
| void st::ShaderProgram::use |
( |
| ) |
|
|
inline |
◆ fragment_shader_code
| std::string st::ShaderProgram::fragment_shader_code |
|
private |
◆ shader_program_id
| GLint st::ShaderProgram::shader_program_id |
|
private |
◆ vertex_shader_code
| std::string st::ShaderProgram::vertex_shader_code |
|
private |
The documentation for this class was generated from the following files:


Class: Aws::APIGateway::Types::Method
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb |
Overview
Represents a client-facing interface by which the client calls the API
to access back-end resources. A Method resource is integrated with an
Integration
resource. Both consist of a request and one or more
responses. The method request takes the client input that is passed to
the back end through the integration request. A method response
returns the output from the back end to the client through an
integration response. A method request is embodied in a Method
resource, whereas an integration request is embodied in an Integration
resource. On the other hand, a method response is represented by a
MethodResponse
resource, whereas an integration response is
represented by an IntegrationResponse
resource.
Constant Summary
Instance Attribute Summary
-
#api_key_required ⇒ Boolean
rw
A boolean flag specifying whether a valid
ApiKey
is required to invoke this method. -
#authorization_scopes ⇒ Array<String>
rw
A list of authorization scopes configured on the method.
-
#authorization_type ⇒ String
rw
The method's authorization type.
-
#authorizer_id ⇒ String
rw
The identifier of an
Authorizer
to use on this method. -
#http_method ⇒ String
rw
The method's HTTP verb.
-
#method_integration ⇒ Types::Integration
rw
Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.
-
#method_responses ⇒ Hash<String,Types::MethodResponse>
rw
Gets a method response associated with a given HTTP status code.
-
#operation_name ⇒ String
rw
A human-friendly operation identifier for the method.
-
#request_models ⇒ Hash<String,String>
rw
A key-value map specifying data schemas, represented by
Model
resources, (as the mapped value) of the request payloads of given content types (as the mapping key). -
#request_parameters ⇒ Hash<String,Boolean>
rw
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.
-
#request_validator_id ⇒ String
rw
The identifier of a
RequestValidator
for request validation.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#api_key_required ⇒ Boolean
(rw)
A boolean flag specifying whether a valid ApiKey
is required to
invoke this method.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#authorization_scopes ⇒ Array
<String
> (rw)
A list of authorization scopes configured on the method. The scopes
are used with a COGNITO_USER_POOLS
authorizer to authorize the
method invocation. The authorization works by matching the method
scopes against the scopes parsed from the access token in the
incoming request. The method invocation is authorized if any method
scopes matches a claimed scope in the access token. Otherwise, the
invocation is not authorized. When the method scope is configured,
the client must provide an access token instead of an identity token
for authorization purposes.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#authorization_type ⇒ String
(rw)
The method's authorization type. Valid values are NONE
for open
access, AWS_IAM
for using AWS IAM permissions, CUSTOM
for using
a custom authorizer, or COGNITO_USER_POOLS
for using a Cognito
user pool.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#authorizer_id ⇒ String
(rw)
The identifier of an Authorizer
to use on this method. The
authorizationType
must be CUSTOM
.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#http_method ⇒ String
(rw)
The method's HTTP verb.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#method_integration ⇒ Types::Integration (rw)
Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#method_responses ⇒ Hash
<String
,Types::MethodResponse> (rw)
Gets a method response associated with a given HTTP status code.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#operation_name ⇒ String
(rw)
A human-friendly operation identifier for the method. For example,
you can assign the operationName
of ListPets
for the GET /pets
method in the PetStore
example.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#request_models ⇒ Hash
<String
,String
> (rw)
A key-value map specifying data schemas, represented by Model
resources, (as the mapped value) of the request payloads of given
content types (as the mapping key).
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#request_parameters ⇒ Hash
<String
,Boolean
> (rw)
A key-value map defining required or optional method request
parameters that can be accepted by API Gateway. A key is a method
request parameter name matching the pattern of
method.request.\{location\}.\{name\}
, where location
is
querystring
, path
, or header
and name
is a valid and unique
parameter name. The value associated with the key is a Boolean flag
indicating whether the parameter is required (true
) or optional
(false
). The method request parameter names defined here are
available in Integration
to be mapped to integration request
parameters or templates.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end
#request_validator_id ⇒ String
(rw)
The identifier of a RequestValidator
for request validation.
# File 'gems/aws-sdk-apigateway/lib/aws-sdk-apigateway/types.rb', line 3601
class Method < Struct.new( :http_method, :, :, :api_key_required, :request_validator_id, :operation_name, :request_parameters, :request_models, :method_responses, :method_integration, : ) SENSITIVE = [] include Aws::Structure end


Watson is
Loading..., Perceiving, Parsing Intents, Processing Dialogues, Getting Possibilities
. Please wait!


| cli_progress_along {cli} | R Documentation |
Note that this function is currently experimental!
Use cli_progress_along()
in a mapping function or in a for loop, to add a
progress bar. It uses cli_progress_bar()
internally.
cli_progress_along( x, name = NULL, total = length(x), ..., .envir = parent.frame() )
x |
Sequence to add the progress bar to. |
name |
Name of the progtess bar, a label, passed to
|
total |
Passed to |
... |
Passed to |
.envir |
Passed to |
Usage:
lapply(cli_progress_along(X), function(i) ...)
for (i in cli_progress_along(seq)) { ... }
Note that if you use break
in the for
loop, you probably want to
terminate the progress bar explicitly when breaking out of the loop,
or right after the loop:
for (i in cli_progress_along(seq)) { ... if (cond) cli_progress_done() && break ... }
An index vector from 1 to length(x)
that triggers progress
updates as you iterate over it.
cli_progress_bar()
and the traditional progress bar API.


Chapter 7 Matrix Applications
7.1 Cobb Douglas Profit Maximization
Go back to fan’s MEconTools Package, Matlab Code Examples Repository (bookdown site), or Math for Econ with Matlab Repository (bookdown site).
In the example here, we will solve a firm optimization problem using a system of linear equations (2 equations and 2 unknowns). The solution method is the same for N inputs with Cobb-Douglas Production Function.
7.1.1 Firm and Capital and Labor
Assume that the firm can choose capital and labor inputs. At the start of a period, a firm rents capital inputs and combines capital with labor to produce. At the end of the period, the firm sells its output and pays interest rates based on how much capital it rented, and also pays wage. Total wage bill is \(L\cdot w\), interest payment is \(K\cdot r\) (Here we assume that there is no depreciation of capital, so firm can repay principle by returning capital and just pay interest rate). Profit is denoted by \(\pi\), period interest rate is \(r\), the price of output is \(p\), the firm makes \(y\) units of output, and the production function is Cobb-Douglas: \(A\cdot K^{\alpha } \cdot L^{\beta }\)
The profit maximization problem is:
- \(\displaystyle \max_{K,L} \left(p\cdot A\cdot K^{\alpha } \cdot L^{\beta } -r\cdot K-w\cdot L\right)\)
To find optimal choices, we will assume that \(\alpha +\beta <1\)
7.1.2 Two First Order Conditions
\(\displaystyle \frac{\partial \Pi }{\partial K}=\alpha \cdot p\cdot A\cdot K^{\alpha -1} \cdot L^{\beta } -r\)
\(\displaystyle \frac{\partial \Pi }{\partial L}=\beta \cdot p\cdot A\cdot K^{\alpha } \cdot L^{\beta -1} -w\)
Components of profit first oder conditions: \(MPL\) and \(MPK\) are always both positive, but they are decreasing with higher \(L\) and higher \(K\) respectively. On the other hand, the marginal cost of capital and labor are fixed.
\(\displaystyle \textrm{MPK}=\alpha \cdot A\cdot K^{\alpha -1} \cdot L^{\beta }\)
\(\displaystyle \textrm{MPL}=\beta \cdot A\cdot K^{\alpha } \cdot L^{\beta -1}\)
\(\displaystyle {\textrm{MC}}_K =r\)
\(\displaystyle {\textrm{MC}}_L =w\)
7.1.3 Log Linearizing Optimality Conditions
To find optimal choices, set the first order conditions you obtained above to be equal to zero.
\(\displaystyle \alpha \cdot p\cdot A\cdot K^{\alpha -1} \cdot L^{\beta } =r\)
\(\displaystyle \beta \cdot p\cdot A\cdot K^{\alpha } \cdot L^{\beta -1} =w\)
A generic system of 2 linear equations and 2 unknowns:
- \(\displaystyle \left\lbrack \begin{array}{cc} a & b\\ d & e \end{array}\right\rbrack \cdot \left\lbrack \begin{array}{c} x_1 \\ x_2 \end{array}\right\rbrack =\left\lbrack \begin{array}{cc} a\cdot x_1 +b\cdot x_2 \\ d\cdot x_1 +e\cdot x_2 \end{array}\right\rbrack =\left\lbrack \begin{array}{c} o\\ p \end{array}\right\rbrack\)
Take log of the first order conditions (log linearize), and the two equations above become (Now we can solve for optimal choices using linsolve. Note that log linearizing works regardless of how many terms there are in the cobb-douglas production function):
- \(\displaystyle \left\lbrack \begin{array}{cc} (\alpha -1) & \beta \\ \alpha & (\beta -1) \end{array}\right\rbrack \cdot \left\lbrack \begin{array}{c} \log (K)\\ \log (L) \end{array}\right\rbrack =\left\lbrack \begin{array}{cc} (\alpha -1)\cdot \log (K)+\beta \cdot \log (L)\\ \alpha \cdot \log (K)+(\beta -1)\cdot \log (L) \end{array}\right\rbrack =\left\lbrack \begin{array}{c} \log \left(\frac{r}{\alpha pA}\right)\\ \log \left(\frac{w}{\beta pA}\right) \end{array}\right\rbrack\)
We can by hand solve by elementary row operation (linsolve).
7.1.4 Solving Linear System to find Optimal Choices
The solution to the problem, with parameter values filled in could be obtained like this:
clear all
% Parameters
w = 1;
r = 1.05;
p = 5;
alpha = 0.3;
beta = 0.5;
A = 1.0;
%% Matrix Form of linear system
B = [log(r/(p*A*alpha)); log(w/(p*A*beta))];
A = [(alpha-1), beta;alpha, beta-1];
%% Solve linear equations, and then exponentiate
linSolu = exp(linsolve(A, B));
%% Solution was for log(K*) and log(L*), exponentiate to get K* and L*
KOpti = linSolu(1)
KOpti = 24.1049
LOpti = linSolu(2)
LOpti = 42.1835
7.1.5 Relative Choices
For Cobb-Douglas production functions, how do optimal capital and labor choices relate to each other?
syms w r p alpha beta A
% Matrix Form of linear system, same as before
B = [log(r/(p*A*alpha)); log(w/(p*A*beta))];
A = [(alpha-1), beta;alpha, beta-1];
% Solve linear equations, and then exponentiate, same as before
% We can use the simplify command to simplify this solution, get rid of exp and log:
linSolu = simplify(exp(linsolve(A, B)))
linSolu =
1em \(\displaystyle \left(\begin{array}{c} {\mathrm{e}}^{\frac{\log \left(\frac{r}{A\,\alpha \,p}\right)-\beta \,\log \left(\frac{r}{A\,\alpha \,p}\right)+\beta \,\log \left(\frac{w}{A\,\beta \,p}\right)}{\alpha +\beta -1}} \\ {\mathrm{e}}^{\frac{\log \left(\frac{w}{A\,\beta \,p}\right)+\alpha \,\log \left(\frac{r}{A\,\alpha \,p}\right)-\alpha \,\log \left(\frac{w}{A\,\beta \,p}\right)}{\alpha +\beta -1}} \end{array}\right)\)
KOpti = linSolu(1)
KOpti =
1em \(\displaystyle {\mathrm{e}}^{\frac{\log \left(\frac{r}{A\,\alpha \,p}\right)-\beta \,\log \left(\frac{r}{A\,\alpha \,p}\right)+\beta \,\log \left(\frac{w}{A\,\beta \,p}\right)}{\alpha +\beta -1}}\)
LOpti = linSolu(2)
LOpti =
1em \(\displaystyle {\mathrm{e}}^{\frac{\log \left(\frac{w}{A\,\beta \,p}\right)+\alpha \,\log \left(\frac{r}{A\,\alpha \,p}\right)-\alpha \,\log \left(\frac{w}{A\,\beta \,p}\right)}{\alpha +\beta -1}}\)
KOpti/LOpti
ans =
1em \(\displaystyle {\mathrm{e}}^{\frac{\log \left(\frac{r}{A\,\alpha \,p}\right)-\beta \,\log \left(\frac{r}{A\,\alpha \,p}\right)+\beta \,\log \left(\frac{w}{A\,\beta \,p}\right)}{\alpha +\beta -1}} \,{\mathrm{e}}^{-\frac{\log \left(\frac{w}{A\,\beta \,p}\right)+\alpha \,\log \left(\frac{r}{A\,\alpha \,p}\right)-\alpha \,\log \left(\frac{w}{A\,\beta \,p}\right)}{\alpha +\beta -1}}\)
The expressions from Matlab look a little convoluted, but you will notice a lot of similar terms inside the equation. If you try to simplify things a little bit, you will end up with a simple fraction below, which says the ratio of optimal capital to labor choices is not related to \(A\) and \(p\), but determined by the elasticity parameters \(\alpha\) and \(\beta\) as well as prices \(w\) and \(r\). If wage increases, you will increase the relative demand of capital vs labor. Similarly, if \(\alpha\) is higher (each unit of capital is more productive), you will have higher relative demand for capital vs labor as well.
- \(\displaystyle \frac{K^* (r,w,A,\alpha ,\beta ,p)}{L^* (r,w,A,\alpha ,\beta ,p)}=\frac{w}{r}\cdot \frac{\alpha }{\beta }\)
7.1.6 Choices as a Function of \(w\) and \(r\)
How do we solve for demand for capital and labor as a function of prices? We can use the code above, except replace numerical values of \(r\) and \(w\) with symbols. And we can easily derive demand elasticities of prices (which are constant for cobb-douglas production functions)
p = 5;
alpha = 0.3;
beta = 0.5;
A = 1.0;
syms w r
% Matrix Form of linear system, same as before
B = [log(r/(p*A*alpha)); log(w/(p*A*beta))];
A = [(alpha-1), beta;alpha, beta-1];
% Solve linear equations, and then exponentiate, same as before
% We can use the simplify command to simplify this solution, get rid of exp and log:
linSolu = simplify(exp(linsolve(A, B)));
% The solution we get here is in terms of fractions, let's write them out:
KOpti = linSolu(1)
KOpti =
1em \(\displaystyle \frac{225\,\sqrt{15}}{32\,r^{5/2} \,w^{5/2} }\)
LOpti = linSolu(2)
LOpti =
1em \(\displaystyle \frac{375\,\sqrt{15}}{32\,r^{3/2} \,w^{7/2} }\)
7.1.7 Own and Cross Price Elasticity
The price of labor and capital both impact the demand for labor as well as for capital.
The elasticity of capital demand with respect to interest rate is the own price elasticity of demand, and the elasticity of demand for capital with respect to wage is the cross price elasticity of demand. Similarly the elasticity of labor demand with respect to wage is the own price elasticity of demand, and the elasticity of labor demand with respect to interest rate is the cross price elasticity of demand.
- If the own and cross price elastcities are in the same direction, then the two inputs are complements.
That is the case here as shown below. This means that with Cobb-Douglas production function labor and capital are complements. When the price of labor, wage increases, the demand for both labor and capital will decrease. If they were substitutes, when labor price increases, capital demand would increase.
Note that the elasticities below are not a function of anything, just a constant. This is a feature of Cobb-Douglas production function, which has constant demand elasticities of demand of inputs with respect to prices (also constant elasticity of output with respect to inputs). This means that capital and labor are always completements.
Note also that earlier on this page, we showed that with changes in prices, relative choice for capital and labor will shift, that does not contradict the fact that they are complements. In another word, as wage increases, firms demand both less capital and less labor, but the effect is greater on labor, leading to higher share of optimal capital choice.
% Elasticity of KOpti with respect to prices?
elasKoptiW = simplify((diff(KOpti, w)*w)/KOpti)
elasKoptiW =
1em \(\displaystyle -\frac{5}{2}\)
% elasKoptiW = -5/2 for alpha = 0.3 and A = 1.0
elasKoptiR = simplify((diff(KOpti, r)*r)/KOpti)
elasKoptiR =
1em \(\displaystyle -\frac{5}{2}\)
% elasKoptiR = -5/2 for alpha = 0.3 and A = 1.0
elasLoptiW = simplify((diff(LOpti, w)*w)/LOpti)
elasLoptiW =
1em \(\displaystyle -\frac{7}{2}\)
% elasLoptiW = -7/2 for alpha = 0.3 and A = 1.0
elasLoptiR = simplify((diff(LOpti, r)*r)/LOpti)
elasLoptiR =
1em \(\displaystyle -\frac{3}{2}\)
% elasLoptiR = -3/2 for alpha = 0.3 and A = 1.0
7.1.8 Graphical Results for Optimal Choices
We can visualize the optimal choices with these codes below using mesh plot and contour plot
% Number of grid points (points along x and y axis)
grid_points = 100;
% Cobb Douglas Utility
alpha = 0.30;
beta = 0.5;
% Budget
p0 = 5; % p0 is price of output
p1 = 1.05; % p1 is r
p2 = 1; % p2 is wage
maxX1 = 50; % this is max domain of capital to plot
maxX2 = 80; % this is max domain of labor to plot
% This generates a vector between 0 and 10 with grid_points number of points
x1 = linspace(0,maxX1,grid_points);
% This generates another vector between 0 and 10 with grid_points number of points
x2 = linspace(0,maxX2,grid_points);
% This creates all possible combinations of the x1 and x2 vectors, fills up the grid
[x1mesh, x2mesh] = meshgrid(x1,x2);
% Evaluate the utility function at all x1 and x2 combination points
PI = p0*(x1mesh.^alpha).*(x2mesh.^beta) - p1.*x1mesh - p2.*x2mesh;
% Graph "hi35ll" using mesh
close all;
figure();
mesh(x1mesh,x2mesh,PI);
% Labeling
xlabel('Capital');
ylabel('Labor');
zlabel('Cobb Douglas Firm Profit');
title('Profit Function for Labor and Capital Choices')
%% To see the results more easily, contour plot
figure();
hold on;
% contour plot, 100 is how many contour lines
contour = contourf(x1mesh, x2mesh, PI, 100);
clabel(contour);
% Labeling
xlabel('Capital');
ylabel('Labor');
zlabel('Cobb Douglas Firm Profit');
title('Profit Function for Labor and Capital Choices')
7.2 Cobb Douglas Utility Maximization
Go back to fan’s MEconTools Package, Matlab Code Examples Repository (bookdown site), or Math for Econ with Matlab Repository (bookdown site).
7.2.1 A Model with Two Goods
A consumer, with preference \(U(x_1 ,x_2 )\) and \(M\) dollars, chooses between two goods, \(x_1\) and \(x_2\), that cost \(p_1\) and \(p_2\) per unit of good.
Below, we will draw the utility surface, budget set, and indifference curves.
7.2.2 Model Parameters
% Number of grid points (points along x and y axis)
grid_points = 100;
% Cobb Douglas Utility
alpha = 0.5;
beta = 1-alpha;
% Budget
M = 100;
p1 = 15;
p2 = 10;
maxX1 = M/p1;
maxX2 = M/p2;
7.2.3 Preference
Consumers have preference over the two goods, and \(U(x_1 ,x_2 )\) represents the utility assigned to the goods bundle \((x_1 ,x_2 )\)
If households enjoy both goods as complements, we could use this Cobb-Douglas form with Constant Return to Scale to represent the utility function:
\[U(x_1 ,x_2 )=x_1^{\alpha } \cdot x_2^{1-\alpha }\]
We can use matlab to graph the utility function as a "hill":
% This generates a vector between 0 and 10 with grid_points number of points
x1 = linspace(0,maxX1,grid_points);
% This generates another vector between 0 and 10 with grid_points number of points
x2 = linspace(0,maxX2,grid_points);
% This creates all possible combinations of the x1 and x2 vectors, fills up the grid
[x1mesh, x2mesh] = meshgrid(x1,x2);
% Evaluate the utility function at all x1 and x2 combination points
U = (x1mesh.^alpha).*(x2mesh.^beta);
% Graph "hill" using mesh
close all;
figure();
mesh(x1mesh,x2mesh,U);
% Labeling
xlabel('good 1');
ylabel('good 2');
zlabel('Cobb Douglas Utility');
title('Utility Function Along Two Goods Dimensions')
7.2.4 Budget
The budget (choice) set facing the household could be written as:
\[B=\lbrace (x_1 ,x_2 ):x_1 \ge 0,x_2 \ge 0,p_1 x_1 +p_2 x_2 \le M\rbrace\]
where \(M\) is the total resource available for the household.
We can plot out the budget set graphically:
% Same as before, generating grid, and creating all possible combinations using meshgrid
x1 = linspace(0,maxX1,grid_points);
x2 = linspace(0,maxX2,grid_points);
[x1mesh_cost, x2mesh_cost] = meshgrid(x1,x2);
% Evaluate the cost of bundles of goods
bundle_cost = x1mesh_cost*p1 + x2mesh_cost*p2;
% Graph
figure();
contour = contourf(x1mesh_cost, x2mesh_cost, bundle_cost, 10);
clabel(contour);
% Labeling
xlabel('good 1');
ylabel('good 2');
zlabel('Cost');
title('Contour Plot of Budget Set over two goods')
7.2.5 Budget and Preference: Indifference Curves
Budget and Utility together. Use contour plot for utility. These are the altitude graphs you have seen in your geography classes. Rather than graphing out the "hill" as earlier, we can represent the heights of the hill with contours, the show where the "hill" is higher and lower.
figure();
% Contour plot, the fourth parameter are at what utility values we want to see the contour lines.
% All consumption bundle along the same contour line gives the same utility, hence they are: Indifference Curves.
contour_u = contourf(x1mesh, x2mesh, U, [0.1, 0.6, 1.1, 2.1,3.1,4.1,5,1,6.1,7.1,8.1,9.1,20,30,40,50,60,70,80,90,100]);
clabel(contour_u);
% Labeling
colormap('white')
xlabel('good 1');
ylabel('good 2');
zlabel('Cobb Douglas Utility');
title('Utility Function Along Two Goods Dimensions and Budget')
% Budget Line
% From 0 to max x1 given budget and p1
x1_M = linspace(0, M/p1, grid_points);
% Given x1 bought, what are the X2s
x2_M = (M-x1_M*p1)/p2;
hold on;
plot(x1_M, x2_M, 'LineWidth', 3);
7.3 Equilibrium Interest Rate
Go back to fan’s MEconTools Package, Matlab Code Examples Repository (bookdown site), or Math for Econ with Matlab Repository (bookdown site).
We derived demand and supply for credit here: Demand and Supply Derivation and Graphs.
We rewrite here the supply curve for credit which is a function of interest rate \(r\):
- \(\displaystyle \textrm{Supply}(R)=Q_s =a-\frac{b}{(1+r)}\)
We can also rewrite the demand curve for credit which is a function of interest rate \(r\):
- \(\displaystyle \textrm{Demand}(r)=Q_d =\frac{h}{r^k }\)
At equilibrium, demand equals to supply, shown graphically as the intersection point in Demand and Supply Derivation and Graphs.
We can solve for equilibrium by trying out a vector of interest rate points, or using nonlinear solution methods.
Alternatively, although this is not a system of linear equations, we can approximate these equations using first order taylor approximation, then they become a system of linear equations. We can then using linsolve to find approximate equilibrium \(Q\) and \(r\).
7.3.1 First Order Taylor Approximation
Here, we discussed the formula for First Order Taylor Approximation: Definition of Differentials. Using the formula we have from there:
- \(\displaystyle f(x)\approx f(a)+f^{\prime } (a)\cdot (x-a)\)
We approximate the demand and Supply curves. Now \(x\) is the interest rate, \(f(x)\) is the demand or supply at interest rate \(x\) we are interested in. \(a\) is the interest rate level where we solve for actual demand or supply. We approximate the \(f(x)\) by using information from \(f(a)\).
For the problem here, let us approximate around \(a=r_0 =1\), this is 100 percent interest rate.
Note the demand and supply curves are monotonic, and they are somewhat linear for segments of \(r\) values. If they are not monotonically increasing or decreasing, we should not use taylor approximation.
7.3.2 Approximate the Supply
The Supply equation comes from Optimal Savings Choice in a 2 period Model with initial Wealth, applying the formula above with \(a=r_0 =1\):
clear all
syms a b r
% Supply equation
S = a - b/(1+r);
% For Approximation, need to get the derivative with respect to R
SDiffR = diff(S, r)
SDiffR =
1em \(\displaystyle \frac{b}{{{\left(r+1\right)}}^2 }\)
% Now evaluate S at r = 1 and evaluate S'(r) also at r = 1
SatRis1 = subs(S, r, 1)
SatRis1 =
1em \(\displaystyle a-\frac{b}{2}\)
SDiffRris1 = subs(SDiffR, r, 1)
SDiffRris1 =
1em \(\displaystyle \frac{b}{4}\)
% We now have an equation that approximates supply
SupplyApproximate = SatRis1 + SDiffRris1*(r-1)
SupplyApproximate =
1em \(\displaystyle a-\frac{b}{2}+\frac{b\,{\left(r-1\right)}}{4}\)
7.3.3 Approximate the Demand
The Demand equation comes from Optimal Borrowing Choice Firm Maximization, Applying the formula above with \(a=r_0 =1\):
clear all
syms h k r
% Supply equation
D = h/r^k;
% For Approximation, need to get the derivative with respect to R
DDiffR = diff(D, r)
DDiffR =
1em \(\displaystyle -\frac{h\,k}{r^{k+1} }\)
% Now evaluate D at r = 1 and evaluate D'(r) also at r = 1
DatRis1 = subs(D, r, 1)
DatRis1 =
1em \(\displaystyle h\)
DDiffRris1 = subs(DDiffR, r, 1)
DDiffRris1 =
1em \(\displaystyle -h\,k\)
% We now have an equation that approximates supply
DemandApproximate = DatRis1 + DDiffRris1*(r-1)
DemandApproximate =
1em \(\displaystyle h-h\,k\,{\left(r-1\right)}\)
7.3.4 Solve approximate Demand and Supply using a System of Linear Equations
Now we have two linear equations with two unknowns, we can rearrange the terms. Note that only \(r\) and \(Q=Q_d =Q_s\) are unknowns, the other letters are parameters.
Starting with the equations from above:
\(\displaystyle S(r)\approx (a-\frac{b}{2})+\frac{b}{4}(r-1)\)
\(\displaystyle D(r)\approx h-k\cdot h(r-1)\)
we end up with this system of two equations and two unknowns (Solving for Two Equations and Two Unknowns):
- \(\displaystyle \left\lbrack \begin{array}{cc} 1 & -\frac{b}{4}\\ 1 & k\cdot h \end{array}\right\rbrack \cdot \left\lbrack \begin{array}{c} Q\\ r \end{array}\right\rbrack =\left\lbrack \begin{array}{c} a-\frac{3}{4}b\\ h+k\cdot h \end{array}\right\rbrack\)
We can plug this into matlab and solve for it
syms a b h k r
COEFMAT = [1, -b/4;1, k*h];
OUTVEC = [a-(3*b)/4; h + k*h];
approximateSolution = linsolve(COEFMAT, OUTVEC);
QEquiApproximate = approximateSolution(1)
QEquiApproximate =
1em \(\displaystyle \frac{b\,h+4\,a\,h\,k-2\,b\,h\,k}{b+4\,h\,k}\)
REquiApproximate = approximateSolution(2)
REquiApproximate =
1em \(\displaystyle \frac{3\,b-4\,a+4\,h+4\,h\,k}{b+4\,h\,k}\)
Now we have approximate analytical equations for demand and supply. If our \(a=r_0 =1\) was close to true equilibrium rate, we would have a good approximation of how parameters of the model, the \(a,b,h,k\) constants, impact the equilibrium interest rate and quantity demanded and supplied.
See this page for how this is applied to the credit demand and supply example: First Order Taylor Approximation of Demand and Supply for Capital
7.4 First Order Taylor Approximation
Go back to fan’s MEconTools Package, Matlab Code Examples Repository (bookdown site), or Math for Econ with Matlab Repository (bookdown site).
7.4.1 Demand and Supply for Credit and \(a,b,h,k\)
We derived the demand and supply for credit here: Credit Demand and Supply.
The actual demand and supply equations as we derived were:
Supply: \(Q_s =\frac{z\cdot \beta \cdot (1+r)-(\frac{Z}{2})}{((1+r)\cdot (1+\beta ))}\)
Demand: \(Q_d ={\left(\frac{r}{p\cdot A\cdot \alpha \cdot L^{0.5} }\right)}^{\frac{1}{\alpha -1}}\)
We used these equations to represent supply and demand here: First Order Approximate Demand and Supply
\(\displaystyle \textrm{Supply}(R)=Q_s =a-\frac{b}{(1+r)}\)
\(\displaystyle \textrm{Demand}(r)=Q_d =\frac{h}{r^k }\)
7.4.2 What are \(a,b,h,k\)?
So a general trick we use is to first simplify the equations so that we
isolate what are the parameters of the model and what are the
equilibrium variables we are solving for. In this problem, we are
solving for \(Q^{equi}\) and \(r^{equi}\), all other values are parameters.
In fact these two equations are exactly in the form specified here,
why?
Supply simplifies to:
- \(\displaystyle Q_s =\frac{z\beta }{1+\beta }-\frac{Z}{2\cdot (1+\beta )}\cdot \frac{1}{1+r}\)
which means: \(a=\frac{z\beta }{1+\beta }\), and, \(b=\frac{Z}{2\cdot (1+\beta )}\)
Demand can be written as:
- \(\displaystyle Q_d ={\left(p\cdot A\cdot \alpha \cdot L^{0.5} \right)}^{\frac{1}{1-\alpha }} \cdot {\left(\frac{1}{r}\right)}^{\frac{1}{1-\alpha }}\)
which means: \(h={\left(p\cdot A\cdot \alpha \cdot L^{0.5} \right)}^{\frac{1}{1-\alpha }}\), and \(k=\frac{1}{1-\alpha }\)
7.4.3 Exact Equlibrium Interest Rate
I copy below the parameters from Credit Demand and Supply
clear all
Z=10;% from household problem
beta=0.80; % from household problem
p=1.15; %From the question.
L=2; %From the question.
A=3; %You can pick a random number.
alpha=0.45; %You can pick a random number.
Here are our actual demand supply equations typed up, we can use fzero to find their intersection
syms r
% Demand Curve
Demand = (r/(p*A*alpha*(L^0.5))).^(1/(alpha-1));
Supply = (Z*beta*(1+r)-(Z/2))./((1+r)*(1+beta));
% fzero to find exact intersection
% nonlinear method, this works here and is fast, but when
% we have more nonlinear equations, could be very time consuming
% to solve, but linear approximation instantaneous to solve
DemandMinusSupply = Demand - Supply;
exactREqui = fzero(matlabFunction(DemandMinusSupply), 1)
exactREqui = 1.1657
7.4.4 Approximating Demand and Supply for Credit
Typing in what \(k,k,a,b\) are in terms of model parameters:
h = (p * A * alpha * L^(0.5))^(1/(1-alpha));
k = 1/(1-alpha);
a = (Z*beta)/(1+beta);
b = Z/(2*(1+beta));
And now type in the matrix we derived from First Order Approximate Demand and Supply, approximating demand and supply around \(r_0 =1\):
- \(\displaystyle \left\lbrack \begin{array}{cc} 1 & -\frac{b}{4}\\ 1 & k\cdot h \end{array}\right\rbrack \cdot \left\lbrack \begin{array}{c} Q\\ r \end{array}\right\rbrack =\left\lbrack \begin{array}{c} a-\frac{3}{4}b\\ h+k\cdot h \end{array}\right\rbrack\)
COEFMAT = [1, -b/4;1, k*h];
OUTVEC = [a-(3*b)/4; h + k*h];
approximateSolution = linsolve(COEFMAT, OUTVEC);
QEquiApproximate = approximateSolution(1)
QEquiApproximate = 3.1496
REquiApproximate = approximateSolution(2)
REquiApproximate = 1.1354
Given the parameters here, our linear approximation to demand and supply gave us approximate interest rate: \(1.13\), and the actual equilibrium interest rate is \(1.16\), fairly close.
7.4.5 Graphical Ilustration
Let’s see what is happening graphically.
FIrst parameters:
% from household problem
Z=10;
beta=0.80;
% from the firm problem
p=1.15;
L=2;
A=3;
alpha=0.45;
Now I type in the Taylor approximation structure again:
syms r
% the r0 around which we approximate
r0 = 1;
% Our equation from before for demand
D = h/r^k;
D_at_ris1 = subs(D, r, r0);
D_diff_r_ris1 = subs(diff(D, r), r, r0);
Demand_Approximate = D_at_ris1 + D_diff_r_ris1*(r-r0);
% Our equation from before for supply
S = a - b/(1+r);
S_at_ris1 = subs(S, r, r0);
S_diff_r_ris1 = subs(diff(S, r), r, r0);
Supply_Approximate = S_at_ris1 + S_diff_r_ris1*(r-r0);
Now let’s create a vector of interest rates, and just plot our actual demand and supply and the approximate demand and supply together
grid_points = 21;
% Vector of interest rates
rvec = linspace(1.0,1.2,grid_points);
% Create Figure
figure();
hold on
% Plot Demand and Supplies
plot(double(subs(Demand, r, rvec)), rvec, '-b')
plot(double(subs(Demand_Approximate, r, rvec)), rvec, '--b');
plot(double(subs(Supply, r, rvec)), rvec, '-r')
plot(double(subs(Supply_Approximate, r, rvec)), rvec, '--r');
% Add in equilibrium lines
hline = refline([0 exactREqui]);
hline.Color = 'k';
hline.LineStyle = '-';
hline = refline([0 REquiApproximate]);
hline.Color = 'k';
hline.LineStyle = '--';
% Legends
xlabel('Capital Demand and Supply');
ylabel('Interest Rate');
title({'Inverse Demand and Supply For Capital'});
legend({'Demand','Taylor Approxi. Demand',...
'Supply','Taylor Approxi. Supply',...
'Exact Equi. R', 'Approxi. Equi. R'});
grid on
7.4.6 Approximate Equilibrium in terms of Parameters
One nice features of the first order taylor linear approximation is that the solution for approximate equilibrium is analytical, so we can take derivatives of the approximate equilibrium with respect to parameters to analyze the effects of parameter changes on equilibrium approximately. We have to be careful though, we should not try ranges of parameter values too different from what we used in the example above, because then the approximating equation derived around \(r_0 =1\) might be very bad approximations.
Remember we had these numerical values:
% Numerical values (do not deviate too far away from these, approximate would be bad if you do)
Z_num=10;
beta_num=0.80;
A_num=3;
alpha_num=0.45;
First, let solve for the approximate equilibrium with \(A\), \(\alpha\), \(\beta\), \(Z\) as symbols:
% We keep all else as numbers, but make A alpha beta Z as symbols
syms A alpha beta Z
% Type in our h, k, a, b again
h = (p * A * alpha * L^(0.5))^(1/(1-alpha));
k = 1/(1-alpha);
a = (Z*beta)/(1+beta);
b = Z/(2*(1+beta));
% Coefficient Matrix
COEFMAT = [1, -b/4;1, k*h];
OUTVEC = [a-(3*b)/4; h + k*h];
% Analytical solutions
approximateSolution = linsolve(COEFMAT, OUTVEC);
QEquiApproximate = approximateSolution(1)
QEquiApproximate =
1em \(\displaystyle -\frac{Z\,{\left(\alpha -8\,\beta +1\right)}}{8\,\beta +Z\,{{\left(\frac{23\,\sqrt{2}\,A\,\alpha }{20}\right)}}^{\frac{1}{\alpha -1}} -Z\,\alpha \,{{\left(\frac{23\,\sqrt{2}\,A\,\alpha }{20}\right)}}^{\frac{1}{\alpha -1}} +8}\)
REquiApproximate = approximateSolution(2)
REquiApproximate =
1em \(\displaystyle \begin{array}{l} -\frac{8\,\alpha -16\,\beta +8\,\alpha \,\beta -3\,Z\,\sigma_1 +3\,Z\,\alpha \,\sigma_1 +8\,Z\,\beta \,\sigma_1 -8\,Z\,\alpha \,\beta \,\sigma_1 -16}{8\,\beta +Z\,\sigma_1 -Z\,\alpha \,\sigma_1 +8}\\ \mathrm{}\\ \textrm{where}\\ \mathrm{}\\ \;\;\sigma_1 ={{\left(\frac{23\,\sqrt{2}\,A\,\alpha }{20}\right)}}^{\frac{1}{\alpha -1}} \end{array}\)
So we get these complicated looing equations from matlab in terms of A, alpha, beta and Z, we can analyze them graphically, each time fixing three of the four syms at numerical values.
7.4.7 Parameter Impacts on Equilibrium–Effects of changing \(A\)
How does A impact equilibrium? If A is larger, firms should demand more capital. This holds the supply curve constant, and shifts just the demand curve outwards. Interest rate in equilibrium should increase along with equilibrium quantity:
% We can simply use fplot to plot the results out,
% around a range of A values close to what we used earlier: A=3
% we will plot below R as a function of A and also
REquiApproximate_A = subs(REquiApproximate, {Z, beta, alpha}, {Z_num, beta_num, alpha_num});
QEquiApproximate_A = subs(QEquiApproximate, {Z, beta, alpha}, {Z_num, beta_num, alpha_num});
figure();
subplot(2,2,1);
fplot(REquiApproximate_A, [2.5, 3.5])
xlabel('A from Firm Problem');
ylabel('Approxi. Equi. R');
title('plot approximate r(A)')
grid on
subplot(2,2,2);
fplot(diff(REquiApproximate_A, A), [2.5, 3.5])
xlabel('A from Firm Problem');
ylabel('Marginal effect');
title('Derivative d(r(A))/dA ')
grid on
subplot(2,2,3);
fplot(QEquiApproximate_A, [2.5, 3.5])
xlabel('A from Firm Problem');
ylabel('Approxi. Equi. Q');
title('plot approximate Q(A)')
grid on
subplot(2,2,4);
fplot(diff(QEquiApproximate_A, A), [2.5, 3.5])
xlabel('A from Firm Problem');
ylabel('Marginal effect');
title('Derivative d(Q(A))/dA ')
grid on
7.4.8 Parameter Impacts on Equilibrium–Effects of changing \(Z\)
How does \(Z\) impact equilibrium? If \(Z\) is larger, households’ resource difference between today and tomorrow increases (the ratio is the same 1/2, but difference is increasing), they should want to save more. This holds demand constant, and shifts supply out. So there should be higher equilibrium quantity, and lower equilibrium \(r\).
% We can simply use fplot to plot the results out,
REquiApproximate_Z = subs(REquiApproximate, {A, beta, alpha}, {A_num, beta_num, alpha_num});
QEquiApproximate_Z = subs(QEquiApproximate, {A, beta, alpha}, {A_num, beta_num, alpha_num});
figure();
subplot(2,2,1);
fplot(REquiApproximate_Z, [1 30])
xlabel('Z from Household Problem');
ylabel('Approxi. Equi. R');
title('plot approximate r(Z)')
grid on
subplot(2,2,2);
fplot(diff(REquiApproximate_Z, Z), [1 30])
xlabel('Z from Household Problem');
ylabel('Marginal effect');
title('Derivative d(r(Z))/dZ ')
grid on
subplot(2,2,3);
fplot(QEquiApproximate_Z, [1 30])
xlabel('Z from Household Problem');
ylabel('Approxi. Equi. Q');
title('plot approximate Q(Z)')
grid on
subplot(2,2,4);
fplot(diff(QEquiApproximate_Z, Z), [1 30])
xlabel('Z from Household Problem');
ylabel('Marginal effect');
title('Derivative d(Q(Z))/dZ ')
grid on
7.4.9 Parameter Impacts on Equilibrium–Effects of changing \(\beta\)
How does \(\beta\) impact equilibrium? If \(\beta\) is larger, households like the future more, and should want to save more as well. This holds demand constant, and shifts supply out. So there should be higher equilibrium quantity, and lower equilibrium \(r\).
% We can simply use fplot to plot the results out,
REquiApproximate_beta = subs(REquiApproximate, {A, Z, alpha}, {A_num, Z_num, alpha_num});
QEquiApproximate_beta = subs(QEquiApproximate, {A, Z, alpha}, {A_num, Z_num, alpha_num});
figure();
subplot(2,2,1);
fplot(REquiApproximate_beta, [0.75, 0.99])
xlabel('beta from Household Problem');
ylabel('Approxi. Equi. R');
title('plot approximate r(beta)')
grid on
subplot(2,2,2);
fplot(diff(REquiApproximate_beta, beta), [0.75, 0.99])
xlabel('beta from Household Problem');
ylabel('Marginal effect');
title('Derivative d(r(beta))/dbeta ')
grid on
subplot(2,2,3);
fplot(QEquiApproximate_beta, [0.75, 0.99])
xlabel('beta from Household Problem');
ylabel('Approxi. Equi. Q');
title('plot approximate Q(beta)')
grid on
subplot(2,2,4);
fplot(diff(QEquiApproximate_beta, beta), [0.75, 0.99])
xlabel('beta from Household Problem');
ylabel('Marginal effect');
title('Derivative d(Q(beta))/dbeta ')
grid on
7.4.10 Parameter Impacts on Equilibrium–Effects of changing \(\alpha\)
How does \(\alpha\) impact equilibrium? If \(\alpha\) is larger, the elasticity of output with respect to capital is greater, holding price fixed, do firms increase demand or decrease? For these range of approximating values below, they increase demand
% We can simply use fplot to plot the results out,
REquiApproximate_alpha = subs(REquiApproximate, {A, Z, beta}, {A_num, Z_num, beta_num});
QEquiApproximate_alpha = subs(QEquiApproximate, {A, Z, beta}, {A_num, Z_num, beta_num});
figure();
subplot(2,2,1);
fplot(REquiApproximate_alpha, [0.30, 0.60])
xlabel('alpha from Household Problem');
ylabel('Approxi. Equi. R');
title('plot approximate r(alpha)')
grid on
subplot(2,2,2);
fplot(diff(REquiApproximate_alpha, alpha), [0.30, 0.60])
xlabel('alpha from Household Problem');
ylabel('Marginal effect');
title('Derivative d(r(beta))/dalpha ')
grid on
subplot(2,2,3);
fplot(QEquiApproximate_alpha, [0.30, 0.60])
xlabel('alpha from Household Problem');
ylabel('Approxi. Equi. Q');
title('plot approximate Q(alpha)')
grid on
subplot(2,2,4);
fplot(diff(QEquiApproximate_alpha, alpha), [0.30, 0.60])
xlabel('alpha from Household Problem');
ylabel('Marginal effect');
title('Derivative d(Q(alpha))/dalpha ')
grid on


Mouser supports automotive design with TI’s mmWave sensor
by Caroline HayesBuilt using Texas Instruments low power, 45nm RFCMOS process, the AWR1843 is the latest wideband mmWave sensor available from Mouser Electronics.
It is AEC-Q100-qualified for automotive design, where its small form factor is suitable for radar systems in vehicles.
According to the distributor, the RFCMOS process enables a monolithic implementation of a system with three transmit and four receive channels, PLL and ADCs. The integrated frequency-modulated continuous-wave (FMCW) radar sensor operates in the 76GHz to 81GHz mmWave spectrum. It has a DSP subsystem, based on TI’s C674x DSP, for radar signal processing, as well as a built-in self-test (BIST) processor subsystem for radio configuration, control, and calibration.
An onboard user-programmable Arm Cortex-R4F processor tracks and classifies objects, AutoSAR, and interface control.
The distributor also stocks an evaluation board, the AWR1843 BoosterPack. This connects directly to the manufacturer’s LaunchPad development kits and contains everything required to start developing software for the on-chip C67x DSP core and Cortex-R4F controller, including onboard emulation for programming and debugging, buttons and LEDs for a simple user interface.


Quantity:
from:
milliliter
liter
teaspoon
tablespoon
ounce
cup
pint
quart
to:
milliliter
liter
teaspoon
tablespoon
ounce
cup
pint
quart
Convertion result:


Home
Trees
Indices
Help
Keyczar
[
hide private
]
[
frames
] |
no frames
]
Identifier Index
[
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y Z
_
]
A
ACTIVE
(in
keyczar.keyinfo
)
AddVersion()
(in
KeyMetadata
)
ASYMMETRIC
(in
keyczar.keyczart
)
ADDKEY
(in
keyczar.keyczart
)
AES
(in
keyczar.keyinfo
)
AsymmetricKey
(in
keyczar.keys
)
AddKey()
(in
keyczar.keyczart
)
AesKey
(in
keyczar.keys
)
AddVersion()
(in
GenericKeyczar
)
ASN1Sequence()
(in
keyczar.util
)
B
BadVersionError
(in
keyczar.errors
)
BigIntToBytes()
(in
keyczar.util
)
BytesToBin()
(in
keyczar.util
)
Base64DecodingError
(in
keyczar.errors
)
BinToBytes()
(in
keyczar.util
)
BytesToInt()
(in
keyczar.util
)
C
CBC
(in
keyczar.keyinfo
)
commands
(in
keyczar.keyczart
)
Crypter
(in
keyczar.keyczar
)
CipherMode
(in
keyczar.keyinfo
)
CREATE
(in
keyczar.keyczart
)
CRYPTER
(in
keyczar.keyczart
)
Clean()
(in
keyczar.keyczart
)
Create()
(in
keyczar.keyczart
)
CTR
(in
keyczar.keyinfo
)
Command
(in
keyczar.keyczart
)
CreateGenericKeyczar()
(in
keyczar.keyczart
)
D
Decode()
(in
keyczar.util
)
Demote()
(in
GenericKeyczar
)
DSA_PRIV
(in
keyczar.keyinfo
)
Decrypt()
(in
Crypter
)
Demote()
(in
keyczar.keyczart
)
DSA_PUB
(in
keyczar.keyinfo
)
Decrypt()
(in
AesKey
)
DESTINATION
(in
keyczar.keyczart
)
DsaPrivateKey
(in
keyczar.keys
)
Decrypt()
(in
RsaPrivateKey
)
DET_CBC
(in
keyczar.keyinfo
)
DsaPublicKey
(in
keyczar.keys
)
DECRYPT_AND_ENCRYPT
(in
keyczar.keyinfo
)
DSA_OID
(in
keyczar.util
)
DEMOTE
(in
keyczar.keyczart
)
DSA_PARAMS
(in
keyczar.util
)
E
ECB
(in
keyczar.keyinfo
)
Encrypt()
(in
RsaPrivateKey
)
ExportDsaPkcs8()
(in
keyczar.util
)
Encode()
(in
keyczar.util
)
Encrypt()
(in
RsaPublicKey
)
ExportDsaX509()
(in
keyczar.util
)
ENCRYPT
(in
keyczar.keyinfo
)
EncryptedReader
(in
keyczar.readers
)
ExportRsaPkcs8()
(in
keyczar.util
)
Encrypt()
(in
Encrypter
)
Encrypter
(in
keyczar.keyczar
)
ExportRsaX509()
(in
keyczar.util
)
Encrypt()
(in
AesKey
)
errors
(in
keyczar
)
F
FileReader
(in
keyczar.readers
)
Flag
(in
keyczar.keyczart
)
flags
(in
keyczar.keyczart
)
G
Generate()
(in
AesKey
)
GetCommand()
(in
keyczar.keyczart
)
GetMetadata()
(in
Reader
)
Generate()
(in
DsaPrivateKey
)
GetFlag()
(in
keyczar.keyczart
)
GetMode()
(in
keyczar.keyinfo
)
Generate()
(in
HmacKey
)
GetKey()
(in
Keyczar
)
GetPurpose()
(in
keyczar.keyinfo
)
Generate()
(in
RsaPrivateKey
)
GetKey()
(in
EncryptedReader
)
GetStatus()
(in
keyczar.keyinfo
)
GenericKeyczar
(in
keyczar.keyczar
)
GetKey()
(in
FileReader
)
GetType()
(in
keyczar.keyinfo
)
GENKEY
(in
keyczar.keyczart
)
GetKey()
(in
Reader
)
GetVersion()
(in
KeyMetadata
)
GenKey()
(in
keyczar.keys
)
GetMetadata()
(in
EncryptedReader
)
GenKeySet()
(in
keyczar.keyczart
)
GetMetadata()
(in
FileReader
)
H
hash
(in
Key
)
HEADER_SIZE
(in
keyczar.keyczar
)
HmacKey
(in
keyczar.keys
)
Hash()
(in
keyczar.util
)
HLEN
(in
keyczar.util
)
Header()
(in
Key
)
HMAC_SHA1
(in
keyczar.keyinfo
)
I
INACTIVE
(in
keyczar.keyinfo
)
IsAcceptablePurpose()
(in
Crypter
)
IsAcceptablePurpose()
(in
Signer
)
IntToBin()
(in
keyczar.util
)
IsAcceptablePurpose()
(in
Encrypter
)
IsAcceptablePurpose()
(in
Verifier
)
IntToBytes()
(in
keyczar.util
)
IsAcceptablePurpose()
(in
GenericKeyczar
)
IsValidSize()
(in
KeyType
)
InvalidSignatureError
(in
keyczar.errors
)
IsAcceptablePurpose()
(in
Keyczar
)
K
Key
(in
keyczar.keys
)
KeyczarError
(in
keyczar.errors
)
keys
(in
keyczar
)
key_bytes
(in
Key
)
keyczart
(in
keyczar
)
KEYSETS
(in
keyczar.keyczart
)
KEY_HASH_SIZE
(in
keyczar.keyczar
)
keydata
(in
keyczar
)
KeyStatus
(in
keyczar.keyinfo
)
key_string
(in
Key
)
keyinfo
(in
keyczar
)
KeyType
(in
keyczar.keyinfo
)
keyczar
KeyMetadata
(in
keyczar.keydata
)
KeyVersion
(in
keyczar.keydata
)
keyczar
(in
keyczar
)
KeyNotFoundError
(in
keyczar.errors
)
Keyczar
(in
keyczar.keyczar
)
KeyPurpose
(in
keyczar.keyinfo
)
L
LOCATION
(in
keyczar.keyczart
)
M
main()
(in
keyczar.keyczart
)
MakeEmsaMessage()
(in
keyczar.util
)
modes
(in
keyczar.keyinfo
)
MakeDsaSig()
(in
keyczar.util
)
MGF()
(in
keyczar.util
)
N
NAME
(in
keyczar.keyczart
)
NoPrimaryKeyError
(in
keyczar.errors
)
P
ParseASN1Sequence()
(in
keyczar.util
)
PrivateKey
(in
keyczar.keys
)
PublicKey
(in
keyczar.keys
)
ParseDsaSig()
(in
keyczar.util
)
PROMOTE
(in
keyczar.keyczart
)
PublicKeyExport()
(in
GenericKeyczar
)
ParsePkcs8()
(in
keyczar.util
)
Promote()
(in
GenericKeyczar
)
PURPOSE
(in
keyczar.keyczart
)
ParseX509()
(in
keyczar.util
)
Promote()
(in
keyczar.keyczart
)
purposes
(in
keyczar.keyinfo
)
PRIMARY
(in
keyczar.keyinfo
)
PUBKEY
(in
keyczar.keyczart
)
primary_key
(in
Keyczar
)
PubKey()
(in
keyczar.keyczart
)
R
RandBytes()
(in
keyczar.util
)
Read()
(in
DsaPrivateKey
)
REVOKE
(in
keyczar.keyczart
)
Read()
(in
Crypter
)
Read()
(in
DsaPublicKey
)
Revoke()
(in
GenericKeyczar
)
Read()
(in
Encrypter
)
Read()
(in
HmacKey
)
Revoke()
(in
keyczar.keyczart
)
Read()
(in
GenericKeyczar
)
Read()
(in
RsaPrivateKey
)
RSA_OID
(in
keyczar.util
)
Read()
(in
Keyczar
)
Read()
(in
RsaPublicKey
)
RSA_PARAMS
(in
keyczar.util
)
Read()
(in
Signer
)
Reader
(in
keyczar.readers
)
RSA_PRIV
(in
keyczar.keyinfo
)
Read()
(in
Verifier
)
readers
(in
keyczar
)
RSA_PUB
(in
keyczar.keyinfo
)
Read()
(in
KeyMetadata
)
ReadFile()
(in
keyczar.util
)
RsaPrivateKey
(in
keyczar.keys
)
Read()
(in
KeyVersion
)
ReadKey()
(in
keyczar.keys
)
RsaPublicKey
(in
keyczar.keys
)
Read()
(in
AesKey
)
RemoveVersion()
(in
KeyMetadata
)
S
SHA1_OID
(in
keyczar.util
)
Sign()
(in
HmacKey
)
sizes
(in
KeyType
)
SHA1RSA_OID
(in
keyczar.util
)
Sign()
(in
RsaPrivateKey
)
STATUS
(in
keyczar.keyczart
)
ShortCiphertextError
(in
keyczar.errors
)
SIGN_AND_VERIFY
(in
keyczar.keyinfo
)
status
(in
KeyVersion
)
ShortSignatureError
(in
keyczar.errors
)
Signer
(in
keyczar.keyczar
)
statuses
(in
keyczar.keyinfo
)
Sign()
(in
Signer
)
SIZE
(in
keyczar.keyczart
)
SymmetricKey
(in
keyczar.keys
)
Sign()
(in
DsaPrivateKey
)
size
(in
Key
)
T
types
(in
keyczar.keyinfo
)
U
UpdateGenericKeyczar()
(in
keyczar.keyczart
)
UseKey()
(in
keyczar.keyczart
)
Usage()
(in
keyczar.keyczart
)
util
(in
keyczar
)
V
Verifier
(in
keyczar.keyczar
)
Verify()
(in
DsaPublicKey
)
VERSION
(in
keyczar.keyczar
)
VERIFY
(in
keyczar.keyinfo
)
Verify()
(in
HmacKey
)
VERSION
(in
keyczar.keyczart
)
Verify()
(in
Verifier
)
Verify()
(in
RsaPrivateKey
)
versions
(in
Keyczar
)
Verify()
(in
DsaPrivateKey
)
Verify()
(in
RsaPublicKey
)
versions
(in
KeyMetadata
)
W
Write()
(in
GenericKeyczar
)
WriteFile()
(in
keyczar.util
)
X
Xor()
(in
keyczar.util
)
_
__Decode()
(in
RsaPrivateKey
)
__init__()
(in
DsaPrivateKey
)
__str__()
(in
AesKey
)
__Encode()
(in
RsaPublicKey
)
__init__()
(in
DsaPublicKey
)
__str__()
(in
HmacKey
)
__GetKeyString()
(in
Key
)
__init__()
(in
HmacKey
)
__str__()
(in
PrivateKey
)
__Hash()
(in
Key
)
__init__()
(in
Key
)
__str__()
(in
PublicKey
)
__init__()
(in
BadVersionError
)
__init__()
(in
PrivateKey
)
__UnPad()
(in
AesKey
)
__init__()
(in
InvalidSignatureError
)
__init__()
(in
PublicKey
)
_AddKey()
(in
Keyczar
)
__init__()
(in
KeyNotFoundError
)
__init__()
(in
RsaPrivateKey
)
_GetKeyString()
(in
Key
)
__init__()
(in
NoPrimaryKeyError
)
__init__()
(in
RsaPublicKey
)
_GetKeyString()
(in
PrivateKey
)
__init__()
(in
ShortCiphertextError
)
__init__()
(in
SymmetricKey
)
_GetKeyString()
(in
PublicKey
)
__init__()
(in
ShortSignatureError
)
__init__()
(in
EncryptedReader
)
_GetKeyString()
(in
SymmetricKey
)
__init__()
(in
Keyczar
)
__init__()
(in
FileReader
)
_Hash()
(in
AesKey
)
__init__()
(in
_Name
)
__Pad()
(in
AesKey
)
_Hash()
(in
Key
)
__init__()
(in
KeyMetadata
)
__SetSize()
(in
Key
)
_Hash()
(in
PrivateKey
)
__init__()
(in
KeyVersion
)
__SetStatus()
(in
KeyVersion
)
_Name
(in
keyczar.keyczart
)
__init__()
(in
CipherMode
)
__str__()
(in
Keyczar
)
_NameId
(in
keyczar.keyinfo
)
__init__()
(in
KeyType
)
__str__()
(in
_Name
)
_PadByte()
(in
keyczar.util
)
__init__()
(in
_NameId
)
__str__()
(in
KeyMetadata
)
_PadBytes()
(in
keyczar.util
)
__init__()
(in
AesKey
)
__str__()
(in
KeyVersion
)
_ParseHeader()
(in
Keyczar
)
__init__()
(in
AsymmetricKey
)
__str__()
(in
_NameId
)
_TrimBytes()
(in
keyczar.util
)
Home
Trees
Indices
Help
Keyczar
Generated by Epydoc 3.0.1 on Sun Aug 10 17:05:05 2008
http://epydoc.sourceforge.net


Touch Me.
Hardware accelerated using
CSS3 for supported iOS,
Android and WebKit
Responsive.
Respond to change in browser
width and adjust automatically
Flexible.
Run multiple sliders on
the same web page


No anti aliasing
Jittered anti aliasing with 5x5 cells per pixel, 25 rays in total per cell
Using 50 rays per pixel
Aperture: 0.3, focal length: 5
Aperture: 0.3, focal length: 7
Lighting with different intensities form different angles
Soft shadows off
Soft shadows on, using 50 shadow rays per hit
These are the rendering times of a scenes with randomly generated spheres.
The left graph has a linear scale for time, the right has a logarithmic scale.
The rendered scenes


{{Refimprove|auto=yes|date=December 2009}}
Moronga, rellena, or morcilla is a sausage made of pig's blood. It is found in Cuba, Puerto Rico, Central America and Mexican cuisine. Spices, herbs (such as ruda{{what|date=November 2014}}, oregano, and mint), onions and chili peppers are added and then boiled in the pig's intestines for several hours. It is served in a sauce, either "chile rojo" or "chile verde". Considered a delicacy, it is also served in Mexico as a filling in gorditas after it has been pan-fried with fresh onions and jalapeño peppers.
{{reflist}}
{{Mexican cuisine}}
{{Meat-stub}}


Ocean [aj49], ocean, in The Inner Sea
Last updated Turn #97
Ocean [aj49], ocean, in The Inner Sea
------------------------------------------------------------------------
11: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
11: 25% damaged, arrived from Ocean [aj50], owner:
11: Phantasm [n4b], Imperial Empire, duke, with eight sailors
12: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
12: 25% damaged, departed for Ocean [aj48].
30: It has stopped raining.
Routes leaving Ocean:
North, to Ocean [ai49], 6 days
East, to Ocean [aj50], 6 days
South, to Ocean [ak49], 6 days
West, to Ocean [aj48], 6 days


Filters:
Status
In Progress
Put Away
Failed
Scrapped
Lot Number:
Lot Sequence:
WO Number:
Product Option:
Route Version:
Route ID:
Configured Code:
Serial Number:
Date:
Search
Clear


RAMADDA provides an interactive facility to transform CSV, JSON, XML or HTML files and create structured
point data files and databases.
To start, upload the CSV/JSON/XML/HTML file into RAMADDA. Go to the menu to see the conversion interface below. Here is the convert page for the below example.
Image 1: CSV Conversion Interface
A pipeline of commands are defined for manipulating the rows and columns of the source file.
These commands can be on the same line or on multiple lines. If on multiple lines then the intermediate processing results of each line of commands is available. Prefix a line with "#" to comment out the line.
- The button allows you to add a new command. Once added you can edit the command in place or right click on the command to bring up the command editor dialog (see below).
- The button allows you to insert a reference to another file in RAMADDA for those c
ommands (e.g., join) that require other files.
- The button allows you to specify settings -
- The button displays help.
- The Header, Table, Records, etc., buttons runs the commands and produces different output.
The Save checkbox saves the command text when you run the commands so you can return to it later.
The Do Commands checkbox applies the commands when you press one of the run buttons.


"ZEEB "the wolf, one of the two leaders of the great Midianite host which invaded Israel and was utterly routed by Gideon. The division of that host, which attempted to escape across the Jordan, under Oreb and Zeeb, was overtaken by the Ephraimites, who, in a great battle, completely vanquished them, their leaders being taken and slain (Judges 7:25; Psalm 83:11; Isaiah 10:26).
"ZEEB "the wolf, one of the two leaders of the great Midianite host which invaded Israel and was utterly routed by Gideon. The division of that host, which attempted to escape across the Jordan, under Oreb and Zeeb, was overtaken by the Ephraimites, who, in a great battle, completely vanquished them, their leaders being taken and slain (Judges 7:25; Psalm 83:11; Isaiah 10:26).


func IPv6PseudoHeader(src, dst net.IP) []byte
IPv6PseudoHeader returns an IPv6 pseudo header for checksum calculation.
func ParseIPv4Header(b []byte) (*ipv4.Header, error)
ParseIPv4Header returns the IPv4 header of the IPv4 packet that triggered an ICMP error message. This is found in the Data field of the ICMP error message body.
The provided b must be in the format used by a raw ICMP socket on the local system. This may differ from the wire format, and the format used by a raw IP socket, depending on the system.
To parse an IPv6 header, use ipv6.ParseHeader.
A DefaultMessageBody represents the default message body.
type DefaultMessageBody struct { Data []byte // data }
func (p *DefaultMessageBody) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *DefaultMessageBody) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
A DstUnreach represents an ICMP destination unreachable message body.
type DstUnreach struct { Data []byte // data, known as original datagram field Extensions []Extension // extensions }
func (p *DstUnreach) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *DstUnreach) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
An Echo represents an ICMP echo request or reply message body.
type Echo struct { ID int // identifier Seq int // sequence number Data []byte // data }
func (p *Echo) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *Echo) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
An ExtendedEchoReply represents an ICMP extended echo reply message body.
type ExtendedEchoReply struct { ID int // identifier Seq int // sequence number State int // 3-bit state working together with Message.Code Active bool // probed interface is active IPv4 bool // probed interface runs IPv4 IPv6 bool // probed interface runs IPv6 }
func (p *ExtendedEchoReply) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *ExtendedEchoReply) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
An ExtendedEchoRequest represents an ICMP extended echo request message body.
type ExtendedEchoRequest struct { ID int // identifier Seq int // sequence number Local bool // must be true when identifying by name or index Extensions []Extension // extensions }
func (p *ExtendedEchoRequest) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *ExtendedEchoRequest) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
An Extension represents an ICMP extension.
type Extension interface { // Len returns the length of ICMP extension. // The provided proto must be either the ICMPv4 or ICMPv6 // protocol number. Len(proto int) int // Marshal returns the binary encoding of ICMP extension. // The provided proto must be either the ICMPv4 or ICMPv6 // protocol number. Marshal(proto int) ([]byte, error) }
An InterfaceIdent represents interface identification.
type InterfaceIdent struct { Class int // extension object class number Type int // extension object sub-type Name string // interface name Index int // interface index AFI int // address family identifier; see address family numbers in IANA registry Addr []byte // address }
func (ifi *InterfaceIdent) Len(_ int) int
Len implements the Len method of Extension interface.
func (ifi *InterfaceIdent) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of Extension interface.
An InterfaceInfo represents interface and next-hop identification.
type InterfaceInfo struct { Class int // extension object class number Type int // extension object sub-type Interface *net.Interface Addr *net.IPAddr }
func (ifi *InterfaceInfo) Len(proto int) int
Len implements the Len method of Extension interface.
func (ifi *InterfaceInfo) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of Extension interface.
MPLSLabel represents an MPLS label stack entry.
type MPLSLabel struct { Label int // label value TC int // traffic class; formerly experimental use S bool // bottom of stack TTL int // time to live }
MPLSLabelStack represents an MPLS label stack.
type MPLSLabelStack struct { Class int // extension object class number Type int // extension object sub-type Labels []MPLSLabel }
func (ls *MPLSLabelStack) Len(proto int) int
Len implements the Len method of Extension interface.
func (ls *MPLSLabelStack) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of Extension interface.
A Message represents an ICMP message.
type Message struct { Type Type // type, either ipv4.ICMPType or ipv6.ICMPType Code int // code Checksum int // checksum Body MessageBody // body }
func ParseMessage(proto int, b []byte) (*Message, error)
ParseMessage parses b as an ICMP message. The provided proto must be either the ICMPv4 or ICMPv6 protocol number.
func (m *Message) Marshal(psh []byte) ([]byte, error)
Marshal returns the binary encoding of the ICMP message m.
For an ICMPv4 message, the returned message always contains the calculated checksum field.
For an ICMPv6 message, the returned message contains the calculated checksum field when psh is not nil, otherwise the kernel will compute the checksum field during the message transmission. When psh is not nil, it must be the pseudo header for IPv6.
A MessageBody represents an ICMP message body.
type MessageBody interface { // Len returns the length of ICMP message body. // The provided proto must be either the ICMPv4 or ICMPv6 // protocol number. Len(proto int) int // Marshal returns the binary encoding of ICMP message body. // The provided proto must be either the ICMPv4 or ICMPv6 // protocol number. Marshal(proto int) ([]byte, error) }
A PacketConn represents a packet network endpoint that uses either ICMPv4 or ICMPv6.
type PacketConn struct {
// contains filtered or unexported fields
}
▹ Example (NonPrivilegedPing)
func ListenPacket(network, address string) (*PacketConn, error)
ListenPacket listens for incoming ICMP packets addressed to address. See net.Dial for the syntax of address.
For non-privileged datagram-oriented ICMP endpoints, network must be "udp4" or "udp6". The endpoint allows to read, write a few limited ICMP messages such as echo request and echo reply. Currently only Darwin and Linux support this.
Examples:
ListenPacket("udp4", "<IP_ADDRESS>") ListenPacket("udp4", "<IP_ADDRESS>") ListenPacket("udp6", "fe80::1%en0") ListenPacket("udp6", "::")
For privileged raw ICMP endpoints, network must be "ip4" or "ip6" followed by a colon and an ICMP protocol number or name.
Examples:
ListenPacket("ip4:icmp", "<IP_ADDRESS>") ListenPacket("ip4:1", "<IP_ADDRESS>") ListenPacket("ip6:ipv6-icmp", "fe80::1%en0") ListenPacket("ip6:58", "::")
func (c *PacketConn) Close() error
Close closes the endpoint.
func (c *PacketConn) IPv4PacketConn() *ipv4.PacketConn
IPv4PacketConn returns the ipv4.PacketConn of c. It returns nil when c is not created as the endpoint for ICMPv4.
func (c *PacketConn) IPv6PacketConn() *ipv6.PacketConn
IPv6PacketConn returns the ipv6.PacketConn of c. It returns nil when c is not created as the endpoint for ICMPv6.
func (c *PacketConn) LocalAddr() net.Addr
LocalAddr returns the local network address.
func (c *PacketConn) ReadFrom(b []byte) (int, net.Addr, error)
ReadFrom reads an ICMP message from the connection.
func (c *PacketConn) SetDeadline(t time.Time) error
SetDeadline sets the read and write deadlines associated with the endpoint.
func (c *PacketConn) SetReadDeadline(t time.Time) error
SetReadDeadline sets the read deadline associated with the endpoint.
func (c *PacketConn) SetWriteDeadline(t time.Time) error
SetWriteDeadline sets the write deadline associated with the endpoint.
func (c *PacketConn) WriteTo(b []byte, dst net.Addr) (int, error)
WriteTo writes the ICMP message b to dst. The provided dst must be net.UDPAddr when c is a non-privileged datagram-oriented ICMP endpoint. Otherwise it must be net.IPAddr.
A PacketTooBig represents an ICMP packet too big message body.
type PacketTooBig struct { MTU int // maximum transmission unit of the nexthop link Data []byte // data, known as original datagram field }
func (p *PacketTooBig) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *PacketTooBig) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
A ParamProb represents an ICMP parameter problem message body.
type ParamProb struct { Pointer uintptr // offset within the data where the error was detected Data []byte // data, known as original datagram field Extensions []Extension // extensions }
func (p *ParamProb) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *ParamProb) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
A TimeExceeded represents an ICMP time exceeded message body.
type TimeExceeded struct { Data []byte // data, known as original datagram field Extensions []Extension // extensions }
func (p *TimeExceeded) Len(proto int) int
Len implements the Len method of MessageBody interface.
func (p *TimeExceeded) Marshal(proto int) ([]byte, error)
Marshal implements the Marshal method of MessageBody interface.
A Type represents an ICMP message type.
type Type interface { Protocol() int }
This package is not implemented on AIX, JS, NaCl and Plan 9.


What is Deep Brain Stimulation?
DBS is a surgical procedure in which thin, insulated electrodes are inserted into the brain. These electrodes are then connected by a wire under the skin to a battery usually implanted in the chest or in the abdomen. The battery operates similarly to a pacemaker delivering targeted electrical pulses that block the signals that cause the symptoms of dystonia. The battery is implanted below the skin on the chest wall (or sometimes the lower abdominal wall) so is barely visible but an outline of its shape and of the wires connecting it to the brain may be visible.
- The procedure is also used to treat essential tremor, a common neurological movement disorder.
- DBS does not damage healthy brain tissue by destroying nerve cells. Instead the procedure blocks electrical signals from targeted areas in the brain.
- At present, the procedure is used only for patients whose symptoms cannot be adequately controlled with medications.DBS uses a surgically implanted, battery-operated medical device called a neurostimulator—similar to a heart pacemaker and approximately the size of a stopwatch—to deliver electrical stimulation to targeted areas in the brain that control movement, blocking the abnormal nerve signals that cause tremor and PD symptoms. Before the procedure, a neurosurgeon uses magnetic resonance imaging (MRI) or computed tomography (CT) scanning to identify and locate the exact target within the brain where electrical nerve signals generate the PD symptoms read more


We are Old Spice beers, an innovative company that listens to the Community and responses to its needs.Our line of beverages can enhance and fight user's body odor. Thus leaving users feeling fresh, simply by drinking it away.
Our Company partners include , Rugby7s , StadiumX Cloud9 Events and many more! Click "learn More" to find out how you can be a partner of Old Spice Beers.


nips nips2003 nips2003-148 nips2003-148-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Shai Shalev-shwartz, Koby Crammer, Ofer Dekel, Yoram Singer
Abstract: We present a uniﬁed view for online classiﬁcation, regression, and uniclass problems. This view leads to a single algorithmic framework for the three problems. We prove worst case loss bounds for various algorithms for both the realizable case and the non-realizable case. A conversion of our main online algorithm to the setting of batch learning is also discussed. The end result is new algorithms and accompanying loss bounds for the hinge-loss. 1
[1] H. H. Bauschke and J. M. Borwein. On projection algorithms for solving convex feasibility problems. SIAM Review, 1996.
[2] Y. Censor and S. A. Zenios. Parallel Optimization.. Oxford University Press, 1997.
[3] K. Crammer and Y. Singer. Ultraconservative online algorithms for multiclass problems. Jornal of Machine Learning Research, 3:951–991, 2003.
[4] Y. Freund and R. E. Schapire. Large margin classiﬁcation using the perceptron algorithm. Machine Learning, 37(3):277–296, 1999.
[5] C. Gentile. A new approximate maximal margin classiﬁcation algorithm. Journal of Machine Learning Research, 2:213–242, 2001.
[6] C. Gentile and M. Warmuth. Linear hinge loss and average margin. In NIPS’98.
[7] D. P. Helmbold, R. E. Schapire, Y. Singer, and M. K. Warmuth. A comparison of new and old algorithms for a mixture estimation problem. In COLT’95.
[8] M. Herbster. COLT’01. Learning additive models online with fast evaluating kernels. In
[9] J. Kivinen, D. P. Helmbold, and M. Warmuth. Relative loss bounds for single neurons. IEEE Transactions on Neural Networks, 10(6):1291–1304, 1999.
[10] J. Kivinen, A. J. Smola, and R. C. Williamson. Online learning with kernels. In NIPS’02.
[11] J. Kivinen and M. K. Warmuth. Exponentiated gradient versus gradient descent for linear predictors. Information and Computation, 132(1):1–64, January 1997.
[12] J. Kivinen and M. K. Warmuth. Relative loss bounds for multidimensional regression problems. Journal of Machine Learning, 45(3):301–329, July 2001.
[13] N. Klasner and H. U. Simon. From noise-free to noise-tolerant and from on-line to batch learning. In COLT’95.
[14] Y. Li and P. M. Long. The relaxed online maximum margin algorithm. Machine Learning, 46(1–3):361–387, 2002.
[15] V. N. Vapnik. Statistical Learning Theory. Wiley, 1998.
[16] E. Xing, A. Y. Ng, M. Jordan, and S. Russel. Distance metric learning, with application to clustering with side-information. In NIPS’03.
[17] M. Zinkevich. Online convex programming and generalized inﬁnitesimal gradient ascent. In ICML’03.


Play via API Link
Play using your last saved API link or manually input one if you have it
Refresh API Link
Opens the DMM play page where we'll auto-extract your new API link
Play on DMM Website
Natural DMM Netgame Portal gameplay, for our cautious friends. Absolute Safe.
Activate Cookies
Use this anytime you encounter the "Error Area" screen on DMM.com
Strategy Room
Various tools to help you analyze and strategize, or just manage your fleet
Settings
Various extension confguration which applies on the next game session
About KC3改 / Developers
Information on KC3改, and its teams of developers, writers and testers.
You are using v010 BETA!


- Supervise children under 5 years old within arms' reach
- Don't let older children supervise younger children
- Keep an eye on your children's pool party
- Make sure the product suit your kids' age
- Deflate and store the pool toy after use
- Pool toys are used for recommended purpose only
- Read the instructions before use


| curl_download {curl} | R Documentation |
Libcurl implementation of C_download
(the "internal" download method)
with added support for https, ftps, gzip, etc. Default behavior is identical
to download.file
, but request can be fully configured by passing
a custom handle
.
curl_download(url, destfile, quiet = TRUE, mode = "wb", handle = new_handle())
url |
A character string naming the URL of a resource to be downloaded. |
destfile |
A character string with the name where the downloaded file is saved. Tilde-expansion is performed. |
quiet |
If |
mode |
A character string specifying the mode with which to write the file.
Useful values are |
handle |
a curl handle object |
The main difference between curl_download
and curl_fetch_disk
is that curl_download
checks the http status code before starting the
download, and raises an error when status is non-successful. The behavior of
curl_fetch_disk
on the other hand is to proceed as normal and write
the error page to disk in case of a non success response.
Path of downloaded file (invisibly).
# Download large file ## Not run: url <- "http://www2.census.gov/acs2011_5yr/pums/csv_pus.zip" tmp <- tempfile() curl_download(url, tmp) ## End(Not run)


--- title: The Early Spring Continues date: 2015-02-20 00:00:00 -06:00 categories: - whats-blooming layout: post blog-banner: whats-blooming-now-winter.jpg post-date: February 20, 2015 post-time: 2:41 PM blog-image: wbn-default.jpg ---
Green Heron Lenten Rose Helleborus x nigercors 'Green Heron'
These nodding greenish flowers could easily be overlooked, but keep an eye out along the floral walk and you will be rewarded with a number of buds that are beginning to bloom.
Amethyst Witch Hazel Hamamelis 'Amethyst'
A spicy fragrance emanates from the burgundy flowers of this rounded shrub, which is flowering right now in the Fragrance Garden.
Pacific Stonecrop Sedum spathulifolium 'Cape Blanco'
Cooler weathers create an almost iridescent, purplish tinge in the leaves of this otherwise dusty-green groundcover.
Hybrid Christmas Rose Helleborus x ericsmithii 'Ruby Glow'
A little further down the Floral Walk from the Stinking Hellebore is this much more colorful, ruby-hued, cultivar.
Winter Jasmine Jaminum nudiflorum
This shrub came to life this week with a brilliant display of fragrant blooms coating it's arching stems.
Leonard Messel Magnolia Magnolia x loebneri 'Leonard Messel'
A promise of more flowers to come is seen in some of the Garden's buds. This Magnolia just outside the Visitors' Center is starting to open!
With snow back on the forecast for next week, this weekend could be a great time to enjoy the warm weather and ever-increasing variety of blooms decorating the Garden. From hawks in the Natural Area, to chickadees and blue jays in the lower gardens, you will likely have a soundtrack to your stroll.


Alpha Static Class
Definition
Line
8
of
Delegate/delegate.cm
Member Functions
public
static
void
bar
(
int
x)
Member Function Details
bar Static Member Function
public
static
void
bar(
int
x)
Definition
Line
10
of
Delegate/delegate.cm


object LoggerCoreComponent
Factory for library logger
Author
Dmitriy Bushuev
LogLevel |
Contains all possible configurations of events logging enum class LogLevel |
create |
Creates logger Logger with specified LogLevel fun create(name: String): Logger |


Module: ActionCable::Helpers::ActionCableHelper
| Relationships & Source Files | |
| Defined in: | actioncable/lib/action_cable/helpers/action_cable_helper.rb |
Instance Method Summary
-
#action_cable_meta_tag
Returns an “action-cable-url” meta tag with the value of the URL specified in your configuration.
Instance Method Details
#action_cable_meta_tag
Returns an “action-cable-url” meta tag with the value of the URL specified in your configuration. Ensure this is above your JavaScript tag:
<head>
<%= action_cable_meta_tag %>
<%= javascript_include_tag 'application', 'data-turbo-track' => 'reload' %>
</head>
This is then used by Action Cable to determine the URL of your WebSocket server. Your JavaScript can then connect to the server without needing to specify the URL directly:
import Cable from "@rails/actioncable"
window.Cable = Cable
window.App = {}
App.cable = Cable.createConsumer()
Make sure to specify the correct server location in each of your environment config files:
config.action_cable.mount_path = "/cable123"
<%= action_cable_meta_tag %> would render:
#=> <meta name="action-cable-url" content="/cable123" />
config.action_cable.url = "ws://actioncable.com"
<%= action_cable_meta_tag %> would render:
#=> <meta name="action-cable-url" content="ws://actioncable.com" />
# File 'actioncable/lib/action_cable/helpers/action_cable_helper.rb', line 34
def tag "meta", name: "action-cable-url", content: ( ActionCable.server.config.url || ActionCable.server.config.mount_path || raise("No Action Cable URL configured -- please configure this at config.action_cable.url") ) end


|
Support Class Library
A set of tools providing classes and utility
|
An adapter for STL-like iterators from stream iterators. More...
#include <StlAdapter.h>
Public Types | |
| using | iterator_type = StreamIterator< T > |
| The type of stream iterator handled. | |
| using | payload_type = typename iterator_type::payload_type |
| The type of stream iterator payload. | |
| using | iterator_category = std::forward_iterator_tag |
| The category of this iterator type. | |
| using | value_type = payload_type |
| The type of value provided by the iterators. | |
| using | difference_type = std::ptrdiff_t |
| The type of the difference in size between iterators. | |
| using | pointer = value_type * |
| Pointer type for the value type. | |
| using | reference = value_type & |
| Reference type for the value type. | |
Public Member Functions | |
| StlAdapter (iterator_type *sit=nullptr) | |
| Construct an adapter from an iterator. More... | |
| StlAdapter (iterator_type *sit, payload_type payload) | |
| Construt an adapter from an iterator and a specific payload. More... | |
| StlAdapter & | operator++ () |
| Pre-increment operator. More... | |
| StlAdapter | operator++ (int) |
| Post-increment operator. More... | |
| bool | operator== (const StlAdapter &rhs) const |
| Equality operator. More... | |
| bool | operator!= (const StlAdapter &rhs) const |
| Difference operator. More... | |
| payload_type | operator* () const |
| Dereference operator. More... | |
Protected Attributes | |
| iterator_type * | it |
| A pointer to the iterator handled by this adapter. More... | |
| payload_type | payload |
| The current payload. | |
An adapter for STL-like iterators from stream iterators.
| T | being the type of value handled |
Definition at line 17 of file StlAdapter.h.
|
inlineexplicit |
Construct an adapter from an iterator.
| sit | being the stream iterator to construct from (nullptr for end iterator) |
Definition at line 83 of file StlAdapter.h.
|
inline |
Construt an adapter from an iterator and a specific payload.
| sit | being the stream iterator to construct from (nullptr for end iterator) |
| payload | being the initial payload |
Definition at line 91 of file StlAdapter.h.
|
inline |
Difference operator.
| rhs | being the adapter to compare to |
Definition at line 144 of file StlAdapter.h.
|
inline |
|
inline |
Pre-increment operator.
Definition at line 99 of file StlAdapter.h.
|
inline |
Post-increment operator.
Definition at line 114 of file StlAdapter.h.
|
inline |
Equality operator.
| rhs | being the adapter to compare to |
Definition at line 128 of file StlAdapter.h.
|
protected |
A pointer to the iterator handled by this adapter.
Definition at line 70 of file StlAdapter.h.