Teaching or learning stats can be a challenging endeavor. In my experience, starting with concrete (as opposed to abstract) examples helps many a learner. What also helps (for me) is visualizing.
As p-values are still part and parcel of probably any given stats curriculum, here is a convenient function to simulate p-values and to plot them.
“Simulating p-values” amounts to drawing many samples from a given, specified population (eg., µ=100, s=15, normally distributed). We could ourselves go out and draw samples (eg., testing IQ of strangers). As the computer can do that too and does not mourn about repetitive tasks, let’s leave that task to the machine.
Simulation can be easier to comprehend than working with theoretical distributions. It is more tangible to say “we are drawing many samples” then to speak about some theoretical distribution. That’s why simulation can be of didactic value.
So, here you can source
an R function which will do the simulation plus plotting job for you.
source("https://sebastiansauer.github.io/Rcode/clt_1.R")
Note that dplyr
and ggplot
need to installed.
Use the function simu_p()
. It can be run without parameters:
s1 <- simu_p()
The plot shows the sampling distribution, the 5% sample means with highest values, the p-value, and the mean of the sample actual drawn (dashed line)
However, one is free to adapt the parameters, eg., experimenting with smaller or larger samples sizes, or a different sample mean:
s2 <- simu_p(n_samples = 1000, mean = 100, sd = 15, n = 5, distribution = "normal", sample_mean = 104)
Note that two types of distribution to draw from are implemented: normal
and uniform
:
s3 <- simu_p(distribution = "uniform", sample_mean = .6)
Initially, I wrote the function to demonstrate the central limit theorem. That’s why two different distributions (normal and uniform) are implemented.
Note that the p-value presented here is of type greater than
only, for didactic reasons.
The object returned, eg. s2
contains the values, a cumulative percentage, and an indication whether a certain sample mean was smaller or larger than the significance level, or the sample mean, respectively:
head(s1)
## samples perc_num max_5perc greater_than_sample
## 1 101.73581 0.74374374 0 0
## 2 102.74671 0.84484484 0 0
## 3 93.98155 0.01501502 0 0
## 4 98.10223 0.25825826 0 0
## 5 100.50964 0.56456456 0 0
## 6 100.17396 0.52152152 0 0
Here is the source code of the function simu_p()
:
simu_p <- function(n_samples = 1000, mean = 100, sd = 15, n = 30, distribution = "normal", sample_mean = 107){
library(ggplot2)
library(dplyr)
if (distribution == "normal") {
samples <- replicate(n_samples, mean(rnorm(n = n, mean = mean, sd = sd)))
df <- data.frame(samples = samples)
df %>%
mutate(perc_num = percent_rank(samples),
max_5perc = ifelse(perc_num > 950, 1, 0),
greater_than_sample = ifelse(samples > sample_mean, 1, 0)) -> df
p_value <- round(mean(df$greater_than_sample), 3)
p <- ggplot(df) +
aes(x = samples) +
geom_histogram() +
labs(title = paste("Histogram of ", n_samples, " samples", "\n from a normal distribution", sep = ""),
caption = paste("mean-pop=", mean, ", sd-pop=",sd, sep = "", ", mean in sample=", sample_mean),
x = "sample means") +
geom_histogram(data = dplyr::filter(df, perc_num > .95), fill = "red") +
theme(plot.title = element_text(hjust = 0.5)) +
geom_vline(xintercept = sample_mean, linetype = "dashed", color = "grey40") +
ggplot2::annotate("text", x = Inf, y = Inf, label = paste("p =",p_value), hjust = 1, vjust = 1)
print(p)
}
if (distribution == "uniform") {
samples <- replicate(n_samples, mean(runif(n = n, min=0, max=1)))
df <- data.frame(samples = samples)
if (sample_mean > 1) sample_mean <- .99
df %>%
mutate(perc_num = percent_rank(samples),
max_5perc = ifelse(perc_num > 950, 1, 0),
greater_than_sample = ifelse(samples > sample_mean, 1, 0)) -> df
p_value <- round(mean(df$greater_than_sample), 3)
p <- ggplot(df) +
aes(x = samples) +
geom_histogram() +
labs(title = paste("Histogram of ", n_samples, " samples", "\n from a uniform distribution", sep = ""),
caption = paste("sample mean =", sample_mean, ", min-pop = 0, max-pop = 1"),
x = "sample means") +
geom_histogram(data = dplyr::filter(df, perc_num > .95), fill = "red") +
theme(plot.title = element_text(hjust = 0.5)) +
geom_vline(xintercept = sample_mean, linetype = "dashed", color = "grey40") +
ggplot2::annotate("text", x = Inf, y = Inf, label = paste("p =",p_value), hjust = 1, vjust = 1)
print(p)
}
return(df)
}


@* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import views.helper.FurloughCapHelper @import java.time.Month @this( h4: components.h4, p: components.p, helper: FurloughCapHelper, referencePayBreakdown: phaseTwoReferencePayBreakdown, appConfig: config.FrontendAppConfig ) @( breakdown: PhaseTwoFurloughBreakdown, period: Periods, isNewStarterType5:Boolean, month: Month, furloughRate: FurloughGrantRate )(implicit messages: Messages) @referencePayBreakdown(breakdown.paymentWithPeriod, period, isNewStarterType5) @h4(messages("phaseTwoFurloughBreakdown.h4"))


Great Plant Pick: Pinus parviflora, blue-needled Japanese white pine
Glauca Group represents blue-needled selections of the Japanese white pine. Each blue needle has a white stripe.
by Richie SteffenWhat: The name Pinus parviflora Glauca Group represents blue-needled selections of the lovely Japanese white pine. Each of their blue needles has a white stripe. These slow-growing evergreen trees form a dense pyramid when they are young and gradually develop wide-spreading branches and a flat-topped shape with maturity. The combination of handsome foliage and attractive overall shape make blue-needled Japanese white pines outstanding garden trees.
Where: Japanese white pine grows best in full sun to light or open shade. It prefers well-drained or sandy soil, but will tolerate clay if the drainage is adequate.
Size: The pyramidal conifer will grow to be 50 feet tall with a 30-foot spread when mature.
Care: Once established, it is completely drought tolerant. The roots are tolerant of restricted zones, making it great for patio planters and large containers. Little pruning is needed to maintain its twisted habit — solely remove dead, broken or poorly formed limbs. New growth can be broken in half or pinched out to create a denser more compact tree.
— Richie Steffen, Great Plant Picks


This tutorial shows how to use Generalized Linear Modeling in H2O for model training and classification.
GLM is a regression algorithm which finds a best-fit hyper-plane through the training data; GLM models have coefficients for each feature. Logistic Regression is a variant of GLM where the magnitude of the coefficients is related to the features' predictive ability; large (absolute) magnitude means the feature predicts more strongly.
Vocabulary:


All you have to do, is to replace this file with your own index.html
It is stored in application/views/index.html
application/views/index.html
If your application isn't configured yet, go to admin section and set your user and password


This text is in an H2 tag
This is a paragraph. It's not a very long paragraph, but you can use it to write CSS that targets paragraphs all the same. This page is very self-descriptive. Try writing some CSS involving the tags, classes, and IDs below!
This H2 has a class named "awesome-class"
This paragraph also has the "awesome-class" class attached to it!
This is an H3 in a div
This div, but not the H3 or the paragraph, has a class called "div-spam".
This is another H3 in another div
This div doesn't have a class, though
Below is a list of vegetables
- Lettuce
- Radish
- Onion
- Brussels Sprouts
- Tomato
- Potato
This paragraph has an ID called "ingredients", and the vegetables I like on my sandwiches have the class "hoagie".


Class: Aws::SecretsManager::Types::PutSecretValueRequest
| 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-secretsmanager/lib/aws-sdk-secretsmanager/types.rb |
Overview
Constant Summary
Instance Attribute Summary
-
#client_request_token ⇒ String
rw
A unique identifier for the new version of the secret.
-
#secret_binary ⇒ String
rw
The binary data to encrypt and store in the new version of the secret.
-
#secret_id ⇒ String
rw
The ARN or name of the secret to add a new version to.
-
#secret_string ⇒ String
rw
The text to encrypt and store in the new version of the secret.
-
#version_stages ⇒ Array<String>
rw
A list of staging labels to attach to this version of the secret.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Aws::Structure#to_h. |
Instance Attribute Details
#client_request_token ⇒ String
(rw)
A unique identifier for the new version of the secret.
ClientRequestToken
yourself for new versions and include that
value in the request.
This value helps ensure idempotency. Secrets Manager uses this value
to prevent the accidental creation of duplicate versions if there
are failures and retries during the ::Aws::Lambda
rotation function
processing. We recommend that you generate a UUID-type value to
ensure uniqueness within the specified secret.
If the
ClientRequestToken
value isn't already associated with a version of the secret then a new version of the secret is created.If a version with this value already exists and that version's
SecretString
orSecretBinary
values are the same as those in the request then the request is ignored. The operation is idempotent.If a version with this value already exists and the version of the
SecretString
andSecretBinary
values are different from those in the request, then the request fails because you can't modify a secret version. You can only create new versions to store new secret values.
This value becomes the VersionId
of the new version.
A suitable default value is auto-generated. You should normally not need to pass this option.
# File 'gems/aws-sdk-secretsmanager/lib/aws-sdk-secretsmanager/types.rb', line 1294
class PutSecretValueRequest < Struct.new( :secret_id, :client_request_token, :secret_binary, :secret_string, :version_stages) SENSITIVE = [:secret_binary, :secret_string] include Aws::Structure end
#secret_binary ⇒ String
(rw)
The binary data to encrypt and store in the new version of the secret. To use this parameter in the command-line tools, we recommend that you store your binary data in a file and then pass the contents of the file as a parameter.
You must include SecretBinary
or SecretString
, but not both.
You can't access this value from the Secrets Manager console.
# File 'gems/aws-sdk-secretsmanager/lib/aws-sdk-secretsmanager/types.rb', line 1294
class PutSecretValueRequest < Struct.new( :secret_id, :client_request_token, :secret_binary, :secret_string, :version_stages) SENSITIVE = [:secret_binary, :secret_string] include Aws::Structure end
#secret_id ⇒ String
(rw)
The ARN or name of the secret to add a new version to.
For an ::Aws::ARN
, we recommend that you specify a complete ::Aws::ARN
rather than
a partial ::Aws::ARN
. See Finding a secret from a partial ARN.
If the secret doesn't already exist, use CreateSecret
instead.
# File 'gems/aws-sdk-secretsmanager/lib/aws-sdk-secretsmanager/types.rb', line 1294
class PutSecretValueRequest < Struct.new( :secret_id, :client_request_token, :secret_binary, :secret_string, :version_stages) SENSITIVE = [:secret_binary, :secret_string] include Aws::Structure end
#secret_string ⇒ String
(rw)
The text to encrypt and store in the new version of the secret.
You must include SecretBinary
or SecretString
, but not both.
We recommend you create the secret string as JSON key/value pairs, as shown in the example.
# File 'gems/aws-sdk-secretsmanager/lib/aws-sdk-secretsmanager/types.rb', line 1294
class PutSecretValueRequest < Struct.new( :secret_id, :client_request_token, :secret_binary, :secret_string, :version_stages) SENSITIVE = [:secret_binary, :secret_string] include Aws::Structure end
#version_stages ⇒ Array
<String
> (rw)
A list of staging labels to attach to this version of the secret. Secrets Manager uses staging labels to track versions of a secret through the rotation process.
If you specify a staging label that's already associated with a
different version of the same secret, then Secrets Manager removes
the label from the other version and attaches it to this version. If
you specify AWSCURRENT
, and it is already attached to another
version, then Secrets Manager also moves the staging label
AWSPREVIOUS
to the version that AWSCURRENT
was removed from.
If you don't include VersionStages
, then Secrets Manager
automatically moves the staging label AWSCURRENT
to this version.
# File 'gems/aws-sdk-secretsmanager/lib/aws-sdk-secretsmanager/types.rb', line 1294
class PutSecretValueRequest < Struct.new( :secret_id, :client_request_token, :secret_binary, :secret_string, :version_stages) SENSITIVE = [:secret_binary, :secret_string] include Aws::Structure end


|
gtsam 4.1.1
gtsam
|
Compute maximum Eigenpair with accelerated power method.
References : 1) G. Golub and C. V. Loan, Matrix Computations, 3rd ed. Baltimore, Johns Hopkins University Press, 1996, pp.405-411 2) Rosen, D. and Carlone, L., 2017, September. Computational enhancements for certifiably correct SLAM. In Proceedings of the International Conference on Intelligent Robots and Systems. 3) Yulun Tian and Kasra Khosoussi and David M. Rosen and Jonathan P. How, 2020, Aug, Distributed Certifiably Correct Pose-Graph Optimization, Arxiv 4) C. de Sa, B. He, I. Mitliagkas, C. Ré, and P. Xu, “Accelerated stochastic power iteration,” in Proc. Mach. Learn. Res., no. 84, 2018, pp. 58–67
It performs the following iteration: \( x_{k+1} = A * x_k - \beta * x_{k-1} \) where A is the aim matrix we want to get eigenpair of, x is the Ritz vector
Template argument Operator just needs multiplication operator
Public Member Functions | |
| AcceleratedPowerMethod (const Operator &A, const boost::optional< Vector > initial=boost::none, double initialBeta=0.0) | |
| Constructor from aim matrix A (given as Matrix or Sparse), optional intial vector as ritzVector. | |
| Vector | acceleratedPowerIteration (const Vector &x1, const Vector &x0, const double beta) const |
| Run accelerated power iteration to get ritzVector with beta and previous two ritzVector x0 and x00, and return y = (A * x0 - \beta * x00) / || A * x0. More... | |
| Vector | acceleratedPowerIteration () const |
| Run accelerated power iteration to get ritzVector with beta and previous two ritzVector x0 and x00, and return y = (A * x0 - \beta * x00) / || A * x0. More... | |
| double | estimateBeta (const size_t T=10) const |
| Tuning the momentum beta using the Best Heavy Ball algorithm in Ref(3), T is the iteration time to find beta with largest Rayleigh quotient. | |
| bool | compute (size_t maxIterations, double tol) |
| Start the accelerated iteration, after performing the accelerated iteration, calculate the ritz error, repeat this operation until the ritz error converge. More... | |
| Public Member Functions inherited from gtsam::PowerMethod< Operator > | |
| PowerMethod (const Operator &A, const boost::optional< Vector > initial=boost::none) | |
| Construct from the aim matrix and intial ritz vector. | |
| Vector | powerIteration (const Vector &x) const |
| Run power iteration to get ritzVector with previous ritzVector x, and return A * x / || A * x ||. | |
| Vector | powerIteration () const |
| Run power iteration to get ritzVector with previous ritzVector x, and return A * x / || A * x ||. | |
| bool | converged (double tol) const |
| After Perform power iteration on a single Ritz value, check if the Ritz residual for the current Ritz pair is less than the required convergence tol, return true if yes, else false. | |
| size_t | nrIterations () const |
| Return the number of iterations. | |
| bool | compute (size_t maxIterations, double tol) |
| Start the power/accelerated iteration, after performing the power/accelerated iteration, calculate the ritz error, repeat this operation until the ritz error converge. More... | |
| double | eigenvalue () const |
| Return the eigenvalue. | |
| Vector | eigenvector () const |
| Return the eigenvector. | |
Additional Inherited Members | |
| Protected Attributes inherited from gtsam::PowerMethod< Operator > | |
| const Operator & | A_ |
| Const reference to an externally-held matrix whose minimum-eigenvalue we want to compute. | |
| const int | dim_ |
| size_t | nrIterations_ |
| double | ritzValue_ |
| Vector | ritzVector_ |
|
inline |
Run accelerated power iteration to get ritzVector with beta and previous two ritzVector x0 and x00, and return y = (A * x0 - \beta * x00) / || A * x0.
|
inline |
Run accelerated power iteration to get ritzVector with beta and previous two ritzVector x0 and x00, and return y = (A * x0 - \beta * x00) / || A * x0.
|
inline |
Start the accelerated iteration, after performing the accelerated iteration, calculate the ritz error, repeat this operation until the ritz error converge.
If converged return true, else false.


Is it possible to post long values instead of int values?
My Power meter provides kWh with three digits which gives me 7 digits in total ex. (4858.002). If I multiple it by 1000 this is 4858002 which is too big for an int (32768) or even an unsigned int (65535). When I post a long value to the emonHub via the RF12 if is corrupted, is this solvable?
Alternative is to post two int values and do some magic tricks in emonCMS?
Re: Post long values
Are you using emoncms.org or your own emoncms? If your own emoncms, see http://openenergymonitor.org/emon/node/5289
Re: Post long values
I'm using emoncms.org but might change it to my own. Your proposed solution looks pretty complex, I'll park it for now.
Re: Post long values
You could look at the "Node" input in emonCMS. It is an alternative to the "Input" page, but I found that the editing options were quite restricted once I has created the input (I could not delete it, nor extend it to more variables, nor in fact do anything other than rename it, add or change the units and switch between int and ulong variable type.
Re: Post long values
The topic of "datacodes" and how it works can be quite complex, but what it basically boils down to is that if you are using emonhub you can define your own data payload in emonhub.conf to overrule the default standard of "byte-pair integers".
If you look at the bottom of your emonhub.conf there is an example template using (an out of scope) node id of 99,
The "datacodes" need to match the sketches typedef struct using the letters in this table
by default emonhub assumes incoming data is a unknown number of 'h' (signed ints). If you wanted to define for example node 10 as 5x signed ints you would have "datacodes = h, h, h, h, h" however if if fact the last 4 bytes were actually 1x unsigned long rather than 2x signed ints you would define "datacodes = h, h, h, L"
at the bottom of emonhub.conf in the [nodes] section you would have
[[10]]
datacodes = h, h, h, L
node id and one line, so once you know your required format it's very easy, the complexity is mainly due to conveying the info needed to understand all flexibility and options. If you just want to "decode" a particular payload, tell us what format that is and we can tell you what you need in that one line.
I do intend to make a tool that does exactly that soon. A webpage that you can select your payload either by sketch name or by defining the typedef struct variables and that will give you a "datacodes" string for emonhub and if you need it a typedef struct to cut and paste into a sketch.
Paul
Re: Post long values
That's it! I changed the datacodes to L (unsigned long) to accommodate for a value that could reach in ten-thousands but still includes three digits.
I'll monitor for the coming days to see how the data is captured.
Re: Post long values
Finally found Paul B's post describing the valid values for EmonHub datacodes, posted on 29/12/2014. Could this table be added to the EmonPi setup guide? Most of the other node keywords are reasonably understandable as they stand. Still looking whether anything needs to be added to the interfacer section to accept data from an HTTP call. I am trying to add data derived from micro inverters. I have code to decrypt and format the data into a number of nodes each with several fields , but wish to add to the Emoncms database.
Any help appreciated
Paul G.
Re: Post long values
Node module was deprecated recently.
Re: Post long values
Hi Paul, Your right that table does need to be in a more prominent position, The datacodes are primarily to decode data from the rfm network, that's not to say they cannot be used elsewhere but the decoding obviously needs to match the encoding to work.
You should start a new thread for your topic and supply some more detail, what is making the call?, what is the data and format?
@ chaveiro - The node module was depreciated recently but it has returned in a different form on the emonPi (and therefore the 'latest' SDcard image) replacing the input module completely in the 'low-write v8.5' .
Image below is from the emonPi /emonBase setup guide
Paul
Re: Post long values
pb66 see http://openenergymonitor.org/emon/node/10934


JHAVEPOP Exercise 5
Use a single assignment statement to set the info of the Node referred to by p equal to the info of the Node referred to by r (you must access this info through r; do not refer to the character '3' directly). Ready to solve it?
Initial Configuration
Final Output
Java
C++
Node p = Utils.createList('1' , '2', '3' , "r");
Feed Back:


Here is the documentation on how this plugin can be amazing !
bold text
italic text
There should be an image below :


RbObjectAccess
public class RbObjectAccess
Provides services to manipulate a Ruby object:
- Call methods;
- Access properties and instance variables;
- Access class variables;
- Access global variables;
- Find constants, classes, and modules.
The class is abstract. You use it via RbObject
and the global Ruby
instance
of RbGateway
.
By default all methods throw RbError
s if anything goes wrong including
when Ruby raises an exception. Use the RbObjectAccess.failable
adapter to
access an alternative API that returns nil
on errors instead. You can still
see any Ruby exceptions via RbError.history
.
 The degrees of freedom are:
- Call method by name or by symbol;
- Pass positional and/or keyword arguments;
- Optionally pass a block that can be expressed as a Swift function or a Ruby Proc.
- Method can either raise an exception or return a value.
From the simple:
try! obj.call("myMethod")
…to more baroque:
do {
let result =
try obj.call(symbol: myMethodSymbol,
args: [1, "3.5", myHash],
kwArgs: [("mode", RbSymbol("debug")]) { blockArgs in
blockArgs.forEach {
process($0)
}
return .nilObject
}
} catch RbError.rubyException(let exn) {
handleErrors(error)
} catch {
...
}
Topics
Instance Variables
func getInstanceVar(String) -> RbObject
func getInstanceVar(String) -> RbObject
Get the value of a Ruby instance variable. Creates a new one with a nil
value
if it doesn’t exist yet.
For a version that does not throw, see failable
.
Declaration
Parameters
name |
Name of IVar to get. Must begin with a single ‘@’. |
Throws
RbError.badIdentifier(type:id:)
if name
looks wrong.
RbError.rubyException(_:)
if Ruby has a problem.
Return Value
Value of the IVar or Ruby nil
if it has not been assigned yet.
func setInstanceVar(String, newValue: RbObjectConvertible?) -> RbObject
func setInstanceVar(String, newValue: RbObjectConvertible?) -> RbObject
Set a Ruby instance variable. Creates a new one if it doesn’t exist yet.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func setInstanceVar(_ name: String, newValue: RbObjectConvertible?)
throws -> RbObject
Parameters
name |
Name of Ivar to set. Must begin with a single ‘@’. |
newValue |
New value to set. |
Throws
RbError.badIdentifier(type:id:)
if name
looks wrong.
RbError.rubyException(_:)
if Ruby has a problem.
Return Value
The value that was set.
Failable Access
var failable: RbFailableAccess
var failable: RbFailableAccess
Get a version of this API that returns nil
instead of throwing errors.
See RbFailableAccess
.
Declaration
public var failable: RbFailableAccess { get }
Constants
func getConstant(String) -> RbObject
func getConstant(String) -> RbObject
Get an RbObject
that represents a Ruby constant.
In Ruby constants include things that users think of as constants like
Math::PI
, classes, and modules. You can use this routine with
any kind of constant, but see getClass(...)
for a little more sugar.
let rubyPi = Ruby.getConstant("Math::PI")
let crumbs = rubyPi - Double.pi
This is a dynamic call into Ruby that can cause calls to const_missing
and autoloading.
For a version that does not throw, see failable
.
Declaration
Parameters
name |
The name of the constant to look up. Can contain ‘::’ sequences to drill down through nested classes and modules. If you call this method on an |
Throws
RbError.rubyException(_:)
if the constant cannot be found.
Return Value
An RbObject
for the constant.
func setConstant(String, newValue: RbObjectConvertible?) -> RbObject
func setConstant(String, newValue: RbObjectConvertible?) -> RbObject
Bind an object to a constant name.
Use this to add value-constants to the class/module name hierarchy. For example:
let defaultInvader = RbObject(ofClass: "Invader", kwArgs: ["name" : "Zaltor"])
try Ruby.setConstant("Game::Invaders::DEFAULT", defaultInvader)
To define new classes and modules, use RbGateway.defineClass(...)
and
RbGateway.defineModule(...)
instead of this method.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func setConstant(_ name: String, newValue: RbObjectConvertible?) throws
-> RbObject
Parameters
name |
The name of the constant to create or replace. Can contain ‘::’ sequences to drill down through nested classes and modules. |
newValue |
The value for the constant. |
Throws
RbError.badIdentifier(type:id:)
if name
looks wrong.
rubyException(_:)
if there is a Ruby exception.
RbError.badType(_:)
if the current object is not a class or module.
Return Value
The value set for the constant.
func getClass(String) -> RbObject
func getClass(String) -> RbObject
Get an RbObject
that represents a Ruby class.
This is a dynamic call into Ruby that can cause calls to const_missing
and autoloading.
One way of creating an instance of a class:
let myClass = try Ruby.getClass("MyModule::MyClass")
let myObj = try myClass.call("new")
Although it is easier to write:
let myObj = try RbObject(ofClass: "MyModule::MyClass")
For a version that does not throw, see failable
.
Declaration
Parameters
name |
The name of the class to look up. Can contain ‘::’ sequences to drill down through nested classes and modules. If you call this method on an |
Throws
RbError.rubyException(_:)
if the constant cannot be found.
RbError.badType(_:)
if the constant is found but is not a class.
Return Value
An RbObject
for the class.
Method Call
func call(String, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>) -> RbObject
func call(String, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>) -> RbObject
Call a Ruby object method.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func call(
_ methodName: String,
args: [RbObjectConvertible?] = [],
kwArgs: KeyValuePairs<String, RbObjectConvertible?> = [:]
) throws -> RbObject
Parameters
methodName |
The name of the method to call. |
args |
The positional arguments to the method. None by default. |
kwArgs |
The keyword arguments to the method. None by default. |
Throws
RbError.rubyException(_:)
if there is a Ruby exception.
RbError.duplicateKwArg(_:)
if there are duplicate keywords in kwArgs
.
Return Value
The result of calling the method.
func call(String, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, blockRetention: RbBlockRetention, blockCall: RbBlockCallback) -> RbObject
func call(String, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, blockRetention: RbBlockRetention, blockCall: RbBlockCallback) -> RbObject
Call a Ruby object method passing Swift code as a block.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func call(
_ methodName: String,
args: [RbObjectConvertible?] = [],
kwArgs: KeyValuePairs<String, RbObjectConvertible?> = [:],
blockRetention: RbBlockRetention = .none,
blockCall: @escaping RbBlockCallback
) throws -> RbObject
Parameters
methodName |
The name of the method to call. |
args |
The positional arguments to the method. None by default. |
kwArgs |
The keyword arguments to the method. None by default. |
blockRetention |
Should the |
blockCall |
Swift code to pass as a block to the method. |
Throws
RbError.rubyException(_:)
if there is a Ruby exception.
RbError.duplicateKwArg(_:)
if there are duplicate keywords in kwArgs
.
Return Value
The result of calling the method.
func call(String, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, block: RbObjectConvertible) -> RbObject
func call(String, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, block: RbObjectConvertible) -> RbObject
Call a Ruby object method passing a Ruby Proc as a block.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func call(
_ methodName: String,
args: [RbObjectConvertible?] = [],
kwArgs: KeyValuePairs<String, RbObjectConvertible?> = [:],
block: RbObjectConvertible
) throws -> RbObject
Parameters
methodName |
The name of the method to call. |
args |
The positional arguments to the method. None by default. |
kwArgs |
The keyword arguments to the method. None by default. |
block |
A Ruby proc to pass as a block to the method. |
Throws
RbError.rubyException(_:)
if there is a Ruby exception.
RbError.duplicateKwArg(_:)
if there are duplicate keywords in kwArgs
.
RbError.badType(_:)
if block
does not convert to a Proc.
Return Value
The result of calling the method.
func call(symbol: RbObjectConvertible, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>) -> RbObject
func call(symbol: RbObjectConvertible, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>) -> RbObject
Call a Ruby object method using a symbol.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func call(
symbol: RbObjectConvertible,
args: [RbObjectConvertible?] = [],
kwArgs: KeyValuePairs<String, RbObjectConvertible?> = [:]
) throws -> RbObject
Parameters
symbol |
The symbol for the name of the method to call. |
args |
The positional arguments to the method. None by default. |
kwArgs |
The keyword arguments to the method. None by default. |
Throws
RbError.rubyException(_:)
if there is a Ruby exception.
RbError.badType(_:)
if symbol
is not a symbol.
RbError.duplicateKwArg(_:)
if there are duplicate keywords in kwArgs
.
Return Value
The result of calling the method.
func call(symbol: RbObjectConvertible, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, blockRetention: RbBlockRetention, blockCall: RbBlockCallback) -> RbObject
func call(symbol: RbObjectConvertible, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, blockRetention: RbBlockRetention, blockCall: RbBlockCallback) -> RbObject
Call a Ruby object method using a symbol passing Swift code as a block.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func call(
symbol: RbObjectConvertible,
args: [RbObjectConvertible?] = [],
kwArgs: KeyValuePairs<String, RbObjectConvertible?> = [:],
blockRetention: RbBlockRetention = .none,
blockCall: @escaping RbBlockCallback
) throws -> RbObject
Parameters
symbol |
The symbol for the name of the method to call. |
args |
The positional arguments to the method. None by default. |
kwArgs |
The keyword arguments to the method. None by default. |
blockRetention |
Should the |
blockCall |
Swift code to pass as a block to the method. |
Throws
RbError.rubyException(_:)
if there is a Ruby exception.
RbError.badType(_:)
if symbol
is not a symbol.
RbError.duplicateKwArg(_:)
if there are duplicate keywords in kwArgs
.
Return Value
The result of calling the method.
func call(symbol: RbObjectConvertible, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, block: RbObjectConvertible) -> RbObject
func call(symbol: RbObjectConvertible, args: [RbObjectConvertible?], kwArgs: KeyValuePairs<String, RbObjectConvertible?>, block: RbObjectConvertible) -> RbObject
Call a Ruby object method using a symbol passing a Ruby Proc as a block.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func call(
symbol: RbObjectConvertible,
args: [RbObjectConvertible?] = [],
kwArgs: KeyValuePairs<String, RbObjectConvertible?> = [:],
block: RbObjectConvertible
) throws -> RbObject
Parameters
symbol |
The symbol for the name of the method to call. |
args |
The positional arguments to the method. None by default. |
kwArgs |
The keyword arguments to the method. None by default. |
block |
A Ruby proc to pass as a block to the method. |
Throws
RbError.rubyException(_:)
if there is a Ruby exception.
RbError.badType(_:)
if symbol
is not a symbol.
RbError.duplicateKwArg(_:)
if there are duplicate keywords in kwArgs
.
RbError.badType(_:)
if block
does not convert to a Proc.
Return Value
The result of calling the method.
Attributes
func getAttribute(String) -> RbObject
func getAttribute(String) -> RbObject
Get an attribute of a Ruby object.
Attributes are declared with :attr_accessor
and so on – this routine is a
simple wrapper around call(...)
for symmetry with setAttribute(...)
.
For a version that does not throw, see failable
.
Declaration
Parameters
name |
The name of the attribute to get. |
Throws
RbError.badIdentifier(type:id:)
if name
looks wrong.
RbError.rubyException(_:)
if Ruby has a problem, probably means
attribute
doesn’t exist.
Return Value
The value of the attribute.
func setAttribute(String, newValue: RbObjectConvertible?) -> RbObject
func setAttribute(String, newValue: RbObjectConvertible?) -> RbObject
Set an attribute of a Ruby object.
Attributes are declared with :attr_accessor
and so on – this routine is a
wrapper around a call to the attrname=
method.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func setAttribute(_ name: String, newValue: RbObjectConvertible?) throws
-> RbObject
Parameters
name |
The name of the attribute to set. |
value |
The new value of the attribute. |
Throws
RbError.badIdentifier(type:id:)
if name
looks wrong.
RbError.rubyException(_:)
if Ruby has a problem, probably means
attribute
doesn’t exist.
Return Value
Whatever the attribute setter returns, typically the new value.
Class Variables
func getClassVar(String) -> RbObject
func getClassVar(String) -> RbObject
Get the value of a Ruby class variable that has already been written.
Must be called on an RbObject
for a class, or RbGateway
. Note this
is different from Ruby as-written where you write @@fred
in an object
context to get a CVar on the object’s class.
The behavior of accessing a non-existent CVar is not consistent with IVars or GVars. This is how Ruby works; one more reason to avoid CVars.
For a version that does not throw, see failable
.
Declaration
Parameters
name |
Name of CVar to get. Must begin with ‘@@’. |
Throws
RbError.badIdentifier(type:id:)
if name
looks wrong.
RbError.badType(_:)
if the object is not a class.
RbError.rubyException(_:)
if Ruby has a problem – in particular,
if the CVar does not exist.
Return Value
The value of the CVar.
func setClassVar(String, newValue: RbObjectConvertible?) -> RbObject
func setClassVar(String, newValue: RbObjectConvertible?) -> RbObject
Set a Ruby class variable. Creates a new one if it doesn’t exist yet.
Must be called on an RbObject
for a class, or RbGateway
. Note this
is different from Ruby as-written where you write @@fred = thing
in an
object context to set a CVar on the object’s class.
For a version that does not throw, see failable
.
Declaration
@discardableResult
public func setClassVar(_ name: String, newValue: RbObjectConvertible?) throws
-> RbObject
Parameters
name |
Name of the CVar to set. Must begin with ‘@@’. |
newValue |
The new value to set. |
Throws
RbError.badIdentifier(type:id:)
if name
looks wrong.
RbError.badType(_:)
if the object is not a class.
RbError.rubyException(_:)
if Ruby has a problem.
Return Value
The value that was set.
Global Variables
func getGlobalVar(String) -> RbObject
func getGlobalVar(String) -> RbObject
Get the value of a Ruby global variable.
For a version that does not throw, see failable
.
(This method is present in this class meaning you can call it on any
RbObject
as well as RbGateway
without any difference in effect. This is
purely convenience to put all these getter/setter pairs in the same place and
make construction of RbFailableAccess
a bit easier. Best practice probably
to avoid calling the RbObject
version.)
Declaration
Parameters
name |
Name of global variable to get. Must begin with ‘$’. |
Throws
RbError
if name
looks wrong.
Return Value
Value of the variable, or Ruby nil if not set before.
func setGlobalVar(String, newValue: RbObjectConvertible?) -> RbObject
func setGlobalVar(String, newValue: RbObjectConvertible?) -> RbObject
Set a Ruby global variable. Creates a new one if it doesn’t exist yet.
For a version that does not throw, see failable
.
(This method is present in this class meaning you can call it on any
RbObject
as well as RbGateway
without any difference in effect. This is
purely convenience to put all these getter/setter pairs in the same place and
make construction of RbFailableAccess
a bit easier. Best practice probably
to avoid calling the RbObject
version.)
Declaration
@discardableResult
public func setGlobalVar(_ name: String, newValue: RbObjectConvertible?) throws
-> RbObject
Parameters
name |
Name of global variable to set. Must begin with ‘$’. |
newValue |
New value to set. |
Throws
RbError
if name
looks wrong.
Return Value
The value that was set.
Polymorphic Getter
func get(String) -> RbObject
func get(String) -> RbObject
Get some kind of Ruby object based on the name
parameter:
- If
name
starts with a capital letter then access a constant under this object; - If
name
starts with ‘@’ or ‘@@’ then access an IVar/CVar for a class object; - If
name
starts with ‘$’ then access a global variable; - Otherwise call a zero-args method.
This is a convenience helper to let you access Ruby structures without worrying about precisely what they are.
For a version that does not throw, see failable
.
Declaration
Parameters
name |
Name of thing to access. |
Throws
RbError.rubyException(_:)
if Ruby has a problem.
RbError
of some other kind if name
looks wrong in some way.
Return Value
The accessed thing .


'Our fallen would be disappointed' by Don Cherry's comments: Sajjan
by Ryan Flanagan, CTVNews.ca WriterTORONTO – Canada’s minister of national defence has a message for Don Cherry: Take a history class.
Harjit Sajjan said Monday that the comments about immigrants and poppies that led to the hockey commentator’s firing are “a reminder to all of us that there’s a lot more education that we need to do.”
“I think our fallen would be disappointed to hear comments like this,” he added.
Cherry was fired by Sportsnet on Monday, two days after he claimed on a national broadcast that immigrants do not wear poppies.
“You people … that come here, whatever it is, you love our way of life, you love our milk and honey, at least you can pay a couple bucks for a poppy or something like that.”
Speaking on CTV’s Power Play, Sajjan said that the popular commentator’s remarks were “extremely disappointing” and suggested that the online outrage they provoked was justified.
“I think Canadians have reacted in a fair way,” he said.
“How can we now, as a government, as communities, teach people about the tremendous sacrifices that have been made by all, so that comments like this are not made? Because if anybody knew the history, these comments, I think, wouldn’t be made.”
Sajjan was the latest in a series of military and political leaders to criticize Cherry’s remarks.
Veterans Affairs Minister Lawrence MacAulay called the comments “totally inappropriate,” while defence chief Gen. Jonathan Vance said that “nobody should be shamed into wearing a poppy.”
Sajjan, who was born in India and moved to Canada at the age of five, spent time in the Canadian Armed Forces including serving in Bosnia and Herzegovina, and in Afghanistan.
The defence minister said he attended two Remembrance Day ceremonies on Monday where he saw “Canadians of all backgrounds” taking part, and wanted to make sure that diversity was highlighted.
He likened that experience to when he was attempting to recruit more people from visible minority groups into the military. He said many new recruits told him that they were enlisting as a way of repaying the country that had taken them in.
“The ones that joined, I would ask them ‘Why’d you join?’ – and a countless number of people would say, ‘It is my way of saying thank you,’” he said.
With files from The Canadian Press


--- layout: single title: Diorama sidebar: nav: "art" permalink: /art/diorama header: overlay_color: "#000" overlay_filter: "0.0" overlay_image: /assets/images/art_banner_canyon.jpg --- Your browser does not support the video tag. Your browser does not support the video tag. Your browser does not support the video tag.


Processing
Group RedBlade has released dvdrip of 2013 movie “Canopy”. Enjoy!
Could not find Issue 5 of Abe Sapien(2013)
Uncaught exception: Traceback (most recent call last
Check Format
Delete
Search ComicVine Logs
Search ComicVine Logs
X
Oct 30, 2014 14:30
warning
Failed to find issue
Oct 30, 2014 14:30
info
queryForSeries - Search Failed
Oct 30, 2014 14:30
error
Requesting: http://comicvine.gamespot.com/api/search/?api_key=[key]&format=json&resources=volume&query=Steampunk+Battlestar+Galactica+1880&field_list=name,id,start_year,publisher,image,description,count_of_issues
Oct 30, 2014 14:30
error
Requesting: http://comicvine.gamespot.com/api/search/?api_key=[key]&format=json&resources=volume&query=Steampunk+Battlestar+Galactica+1880&field_list=name,id,start_year,publisher,image,description,count_of_issues


Check out my GitHub.
Follow me on Instagram.
Connect with me on LinkedIn.
Check out my photographery on Lensdump.


| /// File Name: |
wchannelPriv.txt |
Description:
|
Local user input handling vulnerabilities exist in WCI's TC-IDE Embedded Linux that allow local users with access to the tools provided with the system to spawn a root console, gaining full control over the running Linux operating system.
| | Author: | Yuri Gushin, Alex Behar, Valentin Slalov | | File Size: | 2091 | | Last Modified: | Dec 11 19:04:53 2004 |
| MD5 Checksum: | 35ed88030fee586dc75fd7aed730ad46 |
|


There is no true success without emotional success.
Yet of the more than three thousand emotions that we have words to describe.
The average person experience is only about a dozen different ones in the course of an average week.
We must remember that this doesn't reflect our emotional capacity;
but rather the limitations of our present patterns of focus.
There are 3,000 words in the English thesaurus that describe various emotions.
In that 1051 words describe positive emotions,
while 2086 almost twice as many describe negative emotions.
But what this means is that we've made so many words to describe an unpleasant emotion.
And we tend to focus more on what is unpleasant about life than looking at the bright side.
笔记：这里侧重讲负面情绪。
Life is an emotional experience.
The quality of emotion you experience every day ultimately determines the quality of your life.
And above all, your happiness depends on it.
笔记：生活，就是情绪体验。这句话讲的太好了。
One key problem with most people is that
they're not able to understand what they feel or
they find it hard to name their emotions.
This is a place where you need to become emotionally intelligent and
become emotionally aware of the feelings you're experiencing.
Emotional intelligence is your ability to identify what you're feeling,
why you're feeling it and how your feelings not only affect you but all those around you.
So when we learn to become more emotionally intelligent, we begin to master self -
really know thyself, and understand what it is that is keeping you stuck.

So when you are improving your emotional intelligence,
what that will allow you to do is become less reactive and more interactive with conversations.
When you're in control of your emotions, you're emotionally intelligent.
When emotions are controlling you, you're acting irrational and emotionally enslaved.
The only way to effectively use your emotions is to understand how they all serve you.
You must learn from your emotions and use them to create the results you want.
Emotions are action signals.
Very often their meanings are hidden.
And we seldom ignore these hidden messages.
There's so much to learn from an emotion, even the unpleasant emotions.
All emotions are a call for action.
Once you're familiar with the hidden messages in emotion and it's action signal,
your unpleasant emotions can become your ally.
笔记：emotion --> hidden message --> action signal
Learning to use these signals frees you from the fears and
allows you to experience all the richness of which we humans are capable.
There are hidden messages in every emotion.
We're aware of the messages behind our pleasant emotions,
but we're not well aware of the messages behind our unpleasant emotions.
When we do not understand our emotions,
they become unpleasant experiences to us.
All negative emotions contain within them positive messages or instructions that
can help us grow as better human beings.
笔记：negative emotions --> positive messages
We experience emotions for several reasons.
We experience them because emotions are the language of the subconscious mind.
We can master our negative, unpleasant emotions
when we learn how they serve us rather than enslave us.
Let's look at the emotion HURT for example.
As we make our journey through life none of us escapes being hurt.
These painful feelings arise when we experience loss.
It could be a loss of trust or an expectation
that is not being met by us or by others who are dear to us.
You're likely to feel hurt
when you're betrayed badly treated or ignored by people you care about.
It hurts when they're insensitive to your needs.
Therefore we feel disappointed and we communicate the feeling of hurt
through various emotions like pain or anger.
笔记：loss --> hurt
What is the hidden message in HURT.
Benjamin Franklin said "those things that hurt instruct".
The message in hurt is that your expectations have not been met.
笔记：hurt --> hidden message --> your expectations have not been met
Many times this feeling arises
when we've expected somebody to keep their word and they didn't.
In this case you feel a loss of intimacy with this person.
Maybe a loss of trust.
This sense of loss is what creates the feeling of hurt.
The solution is to realize that, in reality you may not have lost anything.
Maybe what you need to lose is the false perception
that this person is trying to wound you or hurt you.
Maybe they don't realize the impact of their actions on your life.

笔记：第一个解决方法，别人没有达成你的期望，你没有获得某种东西，但重点是实际上你并不失去什么。
Secondly, communicate with the individuals who's hurting you and tell them how you feel.
Communicate your expectations with other people.
People will not know your expectations until you tell them.
笔记：第二个解决方法，就是进行沟通，把你的感受告诉别人。
Certain things are valuable to you but they may not be valuable to other people.
Our values are different.

Let them know what's important to you and what your expectations of others are.
We feel angry when we're hurt.
What does anger teach us?
How can anger serve us rather than aggravate more chaos?
You feel angry when you take offense at being hurt or experiencing loss.
Angry feelings arise when you feel helpless, threatened, deprived or unfairly treated.
Anger is a physiological sensation due to the biochemical reaction in your body.
Adrenaline is created in the body as a protective mechanism
that prepares our body to fight against the attack.
Bodily tension and other disturbing emotions often accompany anger.
You can experience frustration, irritability, annoyance,
resentment, hatred or even rage at various levels.
You may be choosing to react with anger in a dominating manner rather than feel hurt.
Because you perceive hurt as a sign of vulnerability.
Anger keeps people at a distance.

Inside a short-tempered person there is unsettling hurt, frustration and a cry for help.
The hidden message in anger is that an important rule or standard
that you hold for your life has been violated by someone else, or maybe even by you.
You feel angry with certain standards on that.
When some of the rules you have about life are violated you feel angry and rage.
Most anger isn't happening in the actual context of what's going on.

Am I respected enough?
Am I cared for enough?
How dare they?
All these things are the Child Mind, they're the Ego Mind, I just call it the Drama Mind.
The thing that wants to make something a bigger problem than it really is!.

About that as you've traveled or you've experienced more in life;
you've realized a lot of people have a very difficulty in life.
You've realized, there's a lot of poverty.
Realize, there's a lot of struggles,
you realize there's a lot of hurt and pain.

Because here's the reality,
especially if you keep getting angry about the same thing over and over and over again:
you are a victim of the "drama mind".
And that victim is you. You have the ability to turn that off.
And the way you do is WAIT.
You enlarge the gap of time between stimulus and response.
That's where all self mastery comes from -
enlarging the time between stimulus and response.
So now it's not the drama mind, it's not the impulsive mind,
it's the intentional mind.
Anger is no way of telling other people that you're right and others are wrong.
Anger is not the display of superiority.
Anger is the loud cry of an unsettling hurt.
See anger is a secondary emotion.
The primary emotion is frustration.
Primary emotion is frustration.
Frustration is wanting something and not getting it.
I want to have a certain thing happen.
I want to get this thing.
I want to experience a certain opportunity or a thing happen in my life.
If you want to get past anger you have to stop it at frustration.

See, the moment you start to make that demand "I've got to have my way" and
then blaming them "you're the problem, you're what's wrong here".
When you do that you automatically get sucked into the drama.
You experience the emotion of frustration due to your rigid beliefs and thinking.
When frustrations hit you and surely they will on many occasions,
remember to become more flexible and adaptive to change your viewpoints on something
that are currently producing negative results.
The message in frustration and disappointment is that
your brain believes you could be doing better than you currently are.
Frustration is very different from disappointment
which is the feeling that there's something you want in your life
which you'll never get it.
Constant frustration means that the solution to your problem is within range,
but what you are currently doing isn't working.
And you need to change your approach in order to achieve your goal.

It's a way life is teaching you that your life is 'off the track' and 'off the course'.
When you're not using your talents gifts and resources to the full extent, you become frustrated.
When you don't get the results you want, you get frustrated.
Sometimes you can experience this emotion without any trigger.
When you focus too much on life's problems, you can get frustrated.
Constant irritability, feeling of annoyance, discomfort,
and a state of unhappiness stems up as a result of continuing frustrations.
As frustration grows and when you begin to accept helplessness as a result,
another major emotional state strikes you.
That's called the Big D - Depression.
When you suffer pain and loss and
do not express and resolve your feelings of helplessness, hurt, anger, and grief
you will eventually experience depression.
When you're depressed, you tend to focus on your losses,
your inner emptiness, unfulfilled dreams, and problems.
You may experience a feeling of helplessness and worthlessness.
According to Martin Seligman, the father of positive psychology in his book 'Learned Optimism'
he writes: "a pessimistic explanatory style is it the core of all depressed thinking".
A negative concept of the future, the self in the world stems from
seeing the causes of bad events as permanent, pervasive, and personal and
seeing the causes of good events in the opposite way.
The state of depression is sending a strong message.
The hidden message in depression is to find a purpose in life.
The message is invoking the depressed to reevaluate what is absolutely important to them.
If anyone is paying more attention to minor things in life
ignoring the majors then that is the primary reason to make someone feel depressed in the first place.
Depression sends the message to prioritize what is important to you.

People who are depressed are the most ungrateful people on earth.
They don't focus on their blessings.
They look at what's missing and
they whine about what's lost and seldom think about what can be gained.
We tend to experience depression when another emotion is not well handled by us.
That emotion is grief.
Grief occurs when we experience a major loss.
Grief happens when you feel like there's no empowering meaning for
something that has happened or that your life is being negatively impacted by people,
events or forces that are outside your control.
The excruciating pain of losing a loved one can be most severe suffering we ever endure.
The answer to grief is acceptance.
Accept the things that can't be changed and change the things that can't be accepted.
When you feel that it's appropriate to start letting go of grief;
start focusing on what you can control and realize that
there must be some empowering meaning to it all
even though you can't comprehend it yet.
What stops us from expressing the emotion of grieving is the emotion of fear.
Fear is nature's way of protecting you from real and current danger.
It prepares you to escape from harm.
Fearful emotions include everything from low levels of concern and apprehension,
to intense worry, anxiety, fright and even terror.
The message is: fear is simply the anticipation
that's something that's going to happen soon needs to be prepared for.
Fear is telling you to be prepared,
to deal with something negative or uncomfortable from happening.
It's telling you to prepare for your plan B or the worst case scenario.
Don't permit fear to control your life.
Absolutely refuse to it.
Someone said "fear knock on the door, faith opened it and there was no one there".
You see you eliminate fear through intelligent action.
Face the thing you fear and fear will leave you.
Fears caused by the unknown.
If there's something you're afraid of, go study it, understand it,
talk to someone who's a professional in that particular area.
But for goodness sake don't let it control your life anymore.
Think of the people that are afraid to go into their own business.
They're afraid to move to the place they'd really like to go.
They're afraid to ask the girl or the guy for a date.
What are they doing?!
Their life is drying up and shrinking.
We're only here for a short time.
Make it a good time.
Get rid of the fear. Face it.
A state of emotion that can disconnect us from the rest of the world is the emotion of loneliness.
We all suffer the misery of loneliness at some time in our lives.
You feel lonely when you experience yourself as separate and disconnected from others.
When the pain of isolation is overwhelming, you feel heartbroken.
Loneliness is an authentic sign of unfulfilled social and intimacy needs.
When you are emotionally unavailable to people, you detach yourself from people,
and as a result you'll experience loneliness and boredom.
You have the urge to connect with other people,
but you have fears that stop you from connecting with other people.
As a result, you withdraw into yourselves making yourself
unreachable and unavailable to people who love you.
Many irrational ideas and assumptions lead to the feelings of loneliness,
including thoughts like 'no one likes me', 'there's no one available'
and 'everyone is busy and selfish with their lives' and 'they have no time for me'.
Loneliness can be temporary but emotional isolation and social phobia can become clinical cases.
The message of loneliness is that it's time to connect with people.
It means you really care about people and you love to be with them.
You need to find out what kind of connection you need with somebody right now
and then take action immediately to make that happen.
It means you need to start enjoying the pleasure of companionship.
Loneliness is telling you to overcome all your fears about trusting people.
All negative emotions ask you to change your perceptions.
They tell you to change the meaning you associate with things, events or people.

If you can change the meaning attached to almost anything
then you can change the experience itself.
One of the dangerous emotions that can take away your drive to live a fuller life
is the emotion of self inadequacy or unworthiness.
The feeling of unworthiness occurs anytime
we feel we can't do something we should be able to do.
This emotion of self inadequacy is sending you a strong message, pleading you to work on yourself. 笔记：这里所带来的信息就是“低价值感，意味着要提升自己的能力”。
This is a personal development message that if you work on certain areas;
you'll become better at it.
And you can achieve your desired outcome.
The message of unworthy feelings is that
you don't presently have a level of skill or aptitude necessary for the task at hand.
It's telling you that you need more information, understanding, knowledge, strategies, tools, and confidence.
It's an invitation to build skills to tackle challenges that are overwhelming.
One of the fastest ways to build self-confidence is to think through clearly who you are and what you want.
To think about the skills that you will need to build a wonderful life and career and
then to work every day on becoming better and better at something that is important to you.
What happens is as as you feel better and better in these skill areas,
people will compliment you and say 'you know you're very good at that' or
'you did a good job at that' or they'll stand back and be amazed.
And as they admire you for your improving skills,
your self confidence in your ability to do that thing goes up and up.
When you stop focusing on your growth and
start getting bothered about other people's growth,
a person will become envious.
Envy is a self destructive emotion.
Envy results from feeling deprived not necessarily because you don't have enough;
but because someone has more.
Being around people who are happy, healthy or wealthy;
when you are in pain stricken with a debilitating illness or deprived of an income can easily stir feelings of envy.
When you feel envious, interrogate yourself.
Unlock the boons from this unpleasant emotion.
Ask yourself, some self-improvement questions.
How can I make my life better than what it used to be?
What are my new goals and what course of action must I take to fulfill my goals?
What skills must I develop in order to succeed?
What is it that I can do to contribute to the world?
笔记：感到嫉妒，应该从自己身上寻找，寻找可以提升能力的空间。
The emotion of guilt, regret and remorse are among the emotions human beings do most to avoid in life. And this is valuable.
Healthy guilt occurs when you hurt or wronged another person or yourself.

It occurs when your anger is turned inward.
When you experience the emotion of guilt;
it tells you to fix certain things in life that are fixable and solvable.
It invokes your commitment to rise above your expectations.
It tells you never again.
It tells you no more of this or enough is enough.
You feel regretful when you didn't take the action you should have or
you took the wrong move violating your gut feelings.
Guilt tells you that you violated one of your own highest standards and
that you must do something immediately to ensure that
you're not going to violate that standard again in the future.
When guilt is not handled properly it can turn into resentment.
Unforgiveness is a toxic emotion because it does more harm to the person who is not willing to forgive.
Forgiveness can be a very difficult step but one that may be essential to your getting emotional closure.
Forgiveness is a liberating experience.
Forgiveness sets you free.
Remember to analyze these.
You haven't forgiven:
when you still have regrets,
when you're not on talking terms with someone,
when you still hold grudges towards someone,
when you still hold someone responsible for all your problems,
when you still have not accepted the reality,
when you hold negative energy towards someone or something,
or when you say 'I can't forget the things he or she has done to me'.
Forgiveness really means letting go.
Well the reality is: If you go through life you're going to be hurt.
The reality is every single one of us as human being has our weaknesses and
we do the best that we can do
based on where we are at in our level of consciousness and there level of humanity.
And so if someone has hurt you and we've all been hurt.
If someone has hurt you, please first of all,
just remember they were doing the best
that they knew how to do based on where they are at in their journey through life.
So forgiving them is something that not only do they deserve
but forgiving them as a gift you give yourself.

Forgiveness is not a feeling that you must passively wait to wash over you.
It is a deliberate choice to free yourself from the burden of bitterness, anger and hatred.
When you forgive someone, you're literally setting a prisoner free.
The greatest human goal is peace of mind and
the greatest obstacle to peace of mind is anger and blame aimed at other people.
In order to eliminate anger and blame you have to learn to forgive.
And there are four people that you need to forgive
if you're really serious about changing your life and learning how to live in the present.
The first people you have to forgive are your parents living or dead.
You must absolutely forgive them for every mistake they ever made in bringing you up.
At the very least you should be grateful to them for giving you life.
They got you here.
If you're happy to be alive you can forgive them for everything else.
Never complain about them again.
The second persons you must forgive are the people from your marriages or relationships that didn't work out.
These intimate relationships can be so intense and so threatening to your feelings of self-esteem and self-worth
that you can become angry and unforgiving toward these people for years.
But remember you were at least partially responsible for the relationships in your life that didn't work out.
Have the personal strength and integrity to say those magic words 'I am responsible' and
then think of ways that you were responsible for the relationship rather than
thinking of reasons why the other person is to blame.
Forgive the other person and let him or her go.
Say these words 'I forgive him or her for everything and I wish him or her well'.
Each time you repeat this but negative emotion attached to the memory will be diminished,
almost like turning down the heat on a pot.
It gets cooler and cooler and soon it will be gone forever.
Now the third person you must forgive is everyone else in your life who has ever hurt you in any way.
Let them go.
Forgive every boss, every business partner, friend or crook or betrayer who has ever caused you grief of any kind.
Clean the slate and forgive and forget.
Wipe away each of their names and wipe the images off by just saying
whenever you think of "I forgive him or her for everything, I wish them well".
I forgive them for everything and I wish them well.
The fourth and final person you have to forgive is yourself.
You must absolutely forgive yourself for every silly, senseless, wicked,
brainless, thoughtless, or cool thing that you've ever done or said.
Stop carrying these past mistakes around with you.
That was then, and this is now.
Think of it this way.
When you did those things in the past, that you still feel badly about,
you were not the person that you are today.

You're younger and less experienced.
You are not your true self- as you are today.
You were an immature version of the person that you have become, with experience.
So stop beating yourself up for something that occurred in the past-
something that a different person did.
Not you and something that you cannot change.
Take control of your emotions.
Name them, tame them and use them to direct your life to greater advantage.
When you feel an unpleasant emotion, talk back to that emotion.
When you feel angry, ask yourself a question- what am i angry about?
When you feel low, ask yourself: What am I sad about?
How can I be joyful at this very moment? What are these feelings trying to teach me?
What is the hidden message in this emotion?
You are the source of all your feelings and always responsible for your emotional responses.
So make your primary focus internal.
Blaming others for your feelings is a waste of your energy.
Remember people and situations can only trigger what is already inside you.
When you get angry people are triggering the existing anger inside you.
When you feel sad, people and situations are already triggering the sadness inside you you.

Next time when you're triggered to experience an unpleasant emotion,
you can ask: What do I need and want above all else here? What are my options here?
What's the best way to deal with these feelings right now?
What's the best way to resolve these recurring feelings?
When you intelligently respond to your emotions,
you can find the hidden messages of what that emotion is trying to communicate to you.


06 December 1996
Disease Outbreak Reported
The Ministry of Health Disease Control Unit together with a WHO epidemiologist confirmed the yellow fever outbreak in the Upper East Region of the country. A vaccination campaign has been initiated in the areas affected and the Ministry of Health has requested WHO experts to assist in assessing the extent of the outbreak and to advise on control measures.
A total of 90 000 doses of yellow fever vaccine was required immediately for coverage of the affected villages and WHO has already supplied 30 000 doses. However, a further 1.4 million doses of vaccine as well as syringes and needles would be required to cover the estimated at-risk population. Children of 1-15 years of age would be targeted in the Upper East Region which would amount to 600 000. In the Northern Region which borders the Upper East Region, the target population would be children aged 1-10 years and would amount to 800 000. Laboratory supplies would also be needed.


Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Authentication Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Authentication.php" has no page-level DocBlock, use @package in the first DocBlock to create one
BadGateway.php
Warnings:
Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/BadGateway.php" has no page-level DocBlock, use @package in the first DocBlock to create one Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_BadGateway
BadRequest.php
Warnings:
Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/BadRequest.php" has no page-level DocBlock, use @package in the first DocBlock to create one Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_BadRequest
Conflict.php
Warnings:
Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/Conflict.php" has no page-level DocBlock, use @package in the first DocBlock to create one Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_Conflict
Container.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Container Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Container.php" has no page-level DocBlock, use @package in the first DocBlock to create one Warning on line 10 - DocBlock would be page-level, but precedes class "ObjectStorage_Container", use another DocBlock to document the file
Exception.php
Warnings:
Warning on line 10 - DocBlock would be page-level, but precedes class "ObjectStorage_Exception", use another DocBlock to document the file
File.php
Warnings:
Warning on line 10 - DocBlock would be page-level, but precedes class "ObjectStorage_TokenStore_File", use another DocBlock to document the file
Forbidden.php
Warnings:
Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/Forbidden.php" has no page-level DocBlock, use @package in the first DocBlock to create one Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_Forbidden
Http.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http Warning on line 79 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http.php" has no page-level DocBlock, use @package in the first DocBlock to create one
Interface.php
Warnings:
Warning on line 10 - DocBlock would be page-level, but precedes class "ObjectStorage_TokenStore_Interface", use another DocBlock to document the file
InternalServerError.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_InternalServerError Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/InternalServerError.php" has no page-level DocBlock, use @package in the first DocBlock to create one
Memory.php
Warnings:
Warning on line 12 - DocBlock would be page-level, but precedes class "ObjectStorage_TokenStore_Memory", use another DocBlock to document the file
MethodNotAllowed.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_MethodNotAllowed Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/MethodNotAllowed.php" has no page-level DocBlock, use @package in the first DocBlock to create one
NotAcceptable.php
Warnings:
Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/NotAcceptable.php" has no page-level DocBlock, use @package in the first DocBlock to create one Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_NotAcceptable
NotFound.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_NotFound Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/NotFound.php" has no page-level DocBlock, use @package in the first DocBlock to create one
NotImplemented.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_NotImplemented Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/NotImplemented.php" has no page-level DocBlock, use @package in the first DocBlock to create one
Object.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Object Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Object.php" has no page-level DocBlock, use @package in the first DocBlock to create one
ObjectStorage.php
Warnings:
Warning on line 11 - DocBlock would be page-level, but precedes class "ObjectStorage", use another DocBlock to document the file
ProxyAuthenticationRequired.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_ProxyAuthenticationRequired Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/ProxyAuthenticationRequired.php" has no page-level DocBlock, use @package in the first DocBlock to create one
RequestTimeout.php
Warnings:
Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/RequestTimeout.php" has no page-level DocBlock, use @package in the first DocBlock to create one Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_RequestTimeout
TokenStore.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_TokenStore Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/TokenStore.php" has no page-level DocBlock, use @package in the first DocBlock to create one
Unauthorized.php
Warnings:
Warning on line 3 - no @package tag was used in a DocBlock for class ObjectStorage_Exception_Http_Unauthorized Warning on line 3 - File "/media/sf_softlayer-object-storage-php/lib/ObjectStorage/Exception/Http/Unauthorized.php" has no page-level DocBlock, use @package in the first DocBlock to create one
Util.php
Warnings:
Warning on line 14 - no @package tag was used in a DocBlock for file /media/sf_softlayer-object-storage-php/lib/ObjectStorage/Util.php
Documentation generated on Wed, 23 May 2012 09:58:46 -0500 by phpDocumentor 1.4.4


| # | Sta | Rlx | Name | Row Text |
| 0 | | 0 | autoRow0 | the "hypothalamus" "gland" is a part of "endocrine system" (98b8-98a2-26ca-8eff) |
| 1 | | 0 | autoRow1 | "regulating" is a kind of "function" (1498-f901-a5e6-d4bf) |
| 2 | ST | 0 | autoRow2 | the endocrine system carries messages from the body to the brain (ff29-d9eb-b123-44c9) |
| 3 | ST | 0 | autoRow3 | hormones regulate body functions (ec83-cfcf-d106-10c1) |
| 4 | ST | 0 | autoRow4 | the endocrine system is a kind of body ; organ system (2cb6-1dce-a7fd-b13a) |
| 5 | ST | 0 | autoRow5 | the endocrine system is a source of hormones (8384-88a1-bba6-dade) |
| 6 | ST | 0 | autoRow6 | some hormones regulate growth (5dd1-fe47-22b1-5587) |
| 7 | ST | 0 | autoRow7 | a source of something emits ; produces ; generates ; provides that something (b877-a58b-f75a-3998) |
| 8 | ST | 0 | autoRow8 | if something is a part of something else then that something else contains that something (7bfe-4561-00c1-0ba1) |
| # | Sta | Rlx | Name | Row Text |
| 0 | | 0 | autoRow0 | the "thyroid" "gland" is a part of "endocrine system" (4f30-5c33-289c-cb13) |
| 1 | | 0 | autoRow1 | "regulating" is a kind of "function" (1498-f901-a5e6-d4bf) |
| 2 | ST | 0 | autoRow2 | the endocrine system carries messages from the body to the brain (ff29-d9eb-b123-44c9) |
| 3 | ST | 0 | autoRow3 | hormones regulate body functions (ec83-cfcf-d106-10c1) |
| 4 | ST | 0 | autoRow4 | the endocrine system is a kind of body ; organ system (2cb6-1dce-a7fd-b13a) |
| 5 | ST | 0 | autoRow5 | the endocrine system is a source of hormones (8384-88a1-bba6-dade) |
| 6 | ST | 0 | autoRow6 | some hormones regulate growth (5dd1-fe47-22b1-5587) |
| 7 | ST | 0 | autoRow7 | a source of something emits ; produces ; generates ; provides that something (b877-a58b-f75a-3998) |
| 8 | ST | 0 | autoRow8 | if something is a part of something else then that something else contains that something (7bfe-4561-00c1-0ba1) |


This app calculates the number of days between the entered date and today's date. I prepared an example application below.👇🏻
We promise to dibble for each day that we are in active in where you live!


Parable is built over a byte coded virtual machine.
In memory, the byte codes are stored sequentially in a slice. E.g., given a tiny definition:
[ #1 #2 + #3 * ]
The compiler will allocate a slice, and compile the following byte code:
BC_PUSH_N
1
BC_PUSH_N
2
BC_ADD
BC_PUSH_N
3
BC_MULTIPLY
BC_FLOW_RETURN
Most byte codes are single values and occupy a single cell. The few exceptions to this are the instructions which push values to the stack or directly call a function. Where the byte codes require more than one cell, a diagram with the expected structure is provided.
The descriptions of the byte codes will also include a stack comment. This is a single line that indicates what stack values are consumed, and what is returned after execution. A typical stack comment will look like:
character string -- number
In this case, the input is on the left side of the --, and the results are on the right. On each side, the item to the right is the top of stack.
Opcode: 100
This pushes the value in the next memory cell to the stack. The type is set to NUMBER.
In memory, this is structured as:
+-----------+
| BC_PUSH_N |
+-----------+
| value |
+-----------+
Stack Effect:
-- number
Opcode: 101
This pushes the value in the next memory cell to the stack. The type is set to STRING.
In memory, this is structured as:
+-----------+
| BC_PUSH_S |
+-----------+
| pointer |
+-----------+
Stack Effect:
-- string
Opcode: 102
This pushes the value in the next memory cell to the stack. The type is set to CHARACTER.
In memory, this is structured as:
+-------------+
| BC_PUSH_C |
+-------------+
| ASCII value |
+-------------+
Stack Effect:
-- character
Opcode: 103
This pushes the value in the next memory cell to the stack. The type is set to FUNCTION.
In memory, this is structured as:
+-----------+
| BC_PUSH_F |
+-----------+
| pointer |
+-----------+
Stack Effect:
-- pointer
Opcode: 104
This ignores the value in the next cell. The following cell will contain a pointer to a comment.
In memory, this is structured as:
+-----------------+
| BC_PUSH_COMMENT |
+-----------------+
| pointer |
+-----------------+
Comments are kept by the compiler, but ignored at runtime. This allows for easier decompilation, at a slight performance hit if you use them extensively.
Stack Effect:
--
Opcode: 110
Convert the value on the stack to a NUMBER.
If the value is a STRING, it is parsed as a number and the result is pushed.
If the value is a CHARACTER, it is converted to the corresponding ASCII code.
If the value is a POINTER, the type is converted to number.
If the value is a FLAG, one of the following is returned: -1 for true, 0 for false, or 1 for malformed flag.
If the value is a NUMBER, no change occurs.
Stack Effect:
value -- number
Opcode: 111
Convert the value on the stack to a new STRING. If the value is already a STRING this does nothing.
Stack Effect:
value -- string
Opcode: 112
Convert the value on the stack to a CHARACTER.
Stack Effect:
value -- character
Opcode: 113
Convert the value on the stack to a POINTER.
Stack Effect:
value -- pointer
Opcode: 114
Convert the value on the stack to a FLAG.
If value is a NUMBER, the following applies:
+--------+----------------+
| -1 | true |
+--------+----------------+
| 0 | false |
+--------+----------------+
| others | malformed flag |
+--------+----------------+
If the value is a STRING, the following applies:
+---------+----------------+
| 'true' | true |
+---------+----------------+
| 'false' | false |
+---------+----------------+
| others | malformed flag |
+---------+----------------+
Behaviour for CHARACTER and POINTER types is not defined.
Stack Effect:
value -- flag
Opcode: 120
Pushes a NUMBER to the stack indicating the data type of the top element. Valid types are:
+-----+-------------+
| 100 | *NUMBER* |
+-----+-------------+
| 200 | *STRING* |
+-----+-------------+
| 300 | *CHARACTER* |
+-----+-------------+
| 400 | *POINTER* |
+-----+-------------+
| 500 | *FLAG* |
+-----+-------------+
Stack Effect:
value -- value number:type
Opcode: 200
If the top two values are NUMBER, pop them off the stack, add them together, and push the resulting NUMBER back to the stack.
If the top two values are STRING, pop them off, concatencate them together, and push the new STRING to the stack.
The use of this instruction is not defined for other types of values.
Stack Effect:
number:A number:B -- number:(A+B)
Opcode: 201
Pop two NUMBER values off the stack, subtract them, and push the resulting NUMBER back to the stack.
The use of this instruction is not defined for other types of values.
Stack Effect:
number:A number:B -- number:(A-B)
Opcode: 202
Pop two NUMBER values off the stack, multiply them, and push the resulting NUMBER back to the stack.
The use of this instruction is not defined for other types of values.
Stack Effect:
number:A number:B -- number:(A*B)
Opcode: 203
Pop two NUMBER values off the stack, divide them, and push the resulting NUMBER back to the stack.
The use of this instruction is not defined for other types of values.
Stack Effect:
number:A number:B -- number:(A/B)
Opcode: 204
Pop two NUMBER values off the stack, find the remainder, and push the resulting NUMBER back to the stack.
The use of this instruction is not defined for other types of values.
Stack Effect:
number:A number:B -- number:(A % B)
Opcode: 205
Round the NUMBER on top of stack down to the nearest integer value.
The use of this instruction is not defined for other types of values.
Stack Effect:
number -- number
Opcode: 206
... TODO ...
Opcode: 207
Return the natural logarithm of a value (to base e)
Stack Effect:
number -- log(number)
Opcode: 208
Return the base 10 logarithm of a value
Stack Effect:
number -- log10(number)
Opcode: 209
Given a stack:
+--------------+-----+
| number:base | TOS |
+--------------+-----+
| number:value | |
+--------------+-----+
Return the logarithm of a value to a given base
Stack Effect:
number:value number:base -- number:log(base, value)
Opcode: 210
Shifts a value left or right by the specified number of bits. Shifts right if positive, or left if negative.
Opcode: 211
Perform a bitwise AND operation on two NUMBER values.
Stack Effect:
number:A number:B -- number
Opcode: 212
Perform a bitwise OR operation on two NUMBER values.
Stack Effect:
number:A number:B -- number
Opcode: 213
Perform a bitwise XOR operation on two NUMBER values.
Stack Effect:
number:A number:B -- number
Opcode: 214
Return a random value between 0 and 1.
Stack Effect:
-- number
Opcode: 215
Returns the square root of a value.
Stack Effect:
number -- number
Opcode: 220
Compare two values to see if one is less than the other.
Given a stack:
+----+-----+
| B | TOS |
+----+-----+
| A | |
+----+-----+
This will compare A < B, and return a flag
Stack Effect:
value:A value:B -- flag
Opcode: 221
Compare two values to see if one is greater than the other.
Given a stack:
+----+-----+
| B | TOS |
+----+-----+
| A | |
+----+-----+
This will compare A > B, and return a flag
Stack Effect:
value:A value:B -- flag
Opcode: 222
Compare two values to see if one is less than or equal to the other.
Given a stack:
+----+-----+
| B | TOS |
+----+-----+
| A | |
+----+-----+
This will compare A <= B, and return a flag
Stack Effect:
value:A value:B -- flag
Opcode: 223
Compare two values to see if one is less than or equal to the other.
Given a stack:
+----+-----+
| n0 | TOS |
+----+-----+
| n1 | |
+----+-----+
This will compare n1 >= n0, and return a flag
Stack Effect:
value:A value:B -- flag
Opcode: 224
Compare two values for equality.
If the values are strings, it compares the actual strings, not their pointers.
Stack Effect:
value:A value:B -- flag
Opcode: 225
Compare two values for inequality.
If the values are strings, it compares the actual strings, not their pointers.
Stack Effect:
value:A value:B -- flag
Opcode: 300
Takes three elements (two quotes, and a flag), and conditionally executes one of the quotes based on the flag.
Example stack:
+------+-----+
| q0 | TOS |
+------+-----+
| q1 | |
+------+-----+
| flag | |
+------+-----+
If FLAG is true, executes q1. If false, executes q0.
Stack Effect:
flag quote:true quote:false --
Opcode: 301
Takes a quote from the stack, and executes the quote. If the quote returns a true FLAG, executes it again until the returned flag is false.
Stack Effect:
quote --
Opcode: 302
Takes a quote from the stack, and executes the quote. If the quote returns a false FLAG, executes it again until the returned flag is true.
Stack Effect:
quote --
Opcode: 303
Execute the code in quote the specified number of times.
Stack Effect:
number quote --
Opcode: 304
Calls a function.
In memory, this is structured as:
+--------------+
| BC_FLOW_CALL |
+--------------+
| pointer |
+--------------+
Stack Effect:
--
Opcode: 305
Call a function. Takes a pointer to the function from the stack.
Stack Effect:
pointer --
Opcode: 306
Execute a quotation with a value temporarily removed from the stack.
In a traditional Forth this would be the equivilent of:
>r ... r>
Stack Effect:
value quote -- value
Opcode: 307
Execute a quotation with a value on the stack that will be restored after execution completes.
In a traditional Forth this would be the equivilent of:
dup >r ... r>
Stack Effect:
value quote -- value
Opcode: 308
Opcode: 309
Opcode: 399
Return from the current function. This is generally stored as the last value in a function definition.
Stack Effect:
--
Opcode: 400
Opcode: 401
Fetch a value from a specified location in a slice.
Stack Effect:
pointer number:offset -- number
Opcode: 402
Store a value into a slice at the specified location.
Stack Effect:
number:value pointer number:offset --
Opcode: 403
Request a memory slice. Pushes a pointer to the stack.
Stack Effect:
-- pointer
Opcode: 404
Remove a pointer from the stack and release the corresponding slice.
Stack Effect:
pointer --
Opcode: 405
Scan memory and recover unused slices where possible.
The approach I used was to:
Stack Effect:
--
Opcode: 406
Return the last valid index in a slice. This is the length, minus 1 (since addressing is zero based)
Stack Effect:
pointer -- number
Opcode: 407
Set the last valid index in a slice.
Stack Effect:
number pointer --
Opcode: 500
Make a copy of the top item on the stack. (For STRING values, this creates a copy of the original string).
Stack Effect:
value -- value value
Opcode: 501
Remove the top value from the stack.
Stack Effect:
value --
Opcode: 502
Exchange the positions of the top two items on the stack.
Stack Effect:
value:A value:B -- value:B value:A
Opcode: 503
Stack Effect:
value:A value:B -- value:A value:B value:A
Opcode: 504
Stack Effect:
value:A value:B -- value:B value:A value:B
Opcode: 505
Remove the second item on the stack.
Stack Effect:
value:A value:B -- value:B
Opcode: 506
Pushes the a NUMBER indicating the number of items on the stack.
Stack Effect:
-- number
Opcode: 507
Removes all values from the stack.
Stack Effect:
... --
Opcode: 600
Attaches a name to a quotation. This is mapped to define by the core language, and is considered a built-in part of the core language (along with the core syntax).
Stack Effect:
pointer string:name --
Opcode: 601
Given a string, returns a flag of true if the function exists in the dictionary, or false if it does not.
Stack Effect:
string -- flag
Opcode: 602
Given a string, returns a pointer to the slice corresponding to it. If the function does not exist, a pointer to slice -1 will be returned.
Stack Effect:
string -- pointer
Opcode: 603
Remove a function name from the dictionary. Takes a string, returns nothing.
Stack Effect:
string --
Opcode: 700
Find needle in haystack, return a pointer to it, or -1 if not found.
Stack Effect:
string:haystack string:needle -- number
Opcode: 701
Extract a portion of a slice, starting at start and ending at (but not including) end.
slice, start, end
returns new-slice
Stack Effect:
pointer number:start number:end -- pointer
Opcode: 702
Returns a TRUE flag if the string on TOS can be parsed as a NUMBER, or FALSE otherwise. This consumes the string.
Stack Effect:
string -- flag
Opcode: 800
Convert the CHARACTER or STRING value on the stack to lower case. If the value is a STRING, returns a new STRING.
Stack Effect:
value -- value
Opcode: 801
Convert the CHARACTER or STRING value on the stack to upper case. If the value is a STRING, returns a new STRING.
Stack Effect:
value -- value
Opcode: 900
Takes a string, and adds it to the error log.
Stack Effect:
string --
Opcode: 1000
Calculate and return the sine of a radian value
Stack Effect:
number -- number
Opcode: 1001
Calculate and return the cosine of a radian value
Stack Effect:
number -- number
Opcode: 1002
Calculate and return the tangent of a radian value
Stack Effect:
number -- number
Opcode: 1003
Calculate and return the arc sine of a radian value
Stack Effect:
number -- number
Opcode: 1004
Calculate and return the arc cosine of a radian value
Stack Effect:
number -- number
Opcode: 1005
Calculate and return the arc tangent of a radian value
Stack Effect:
number -- number
Opcode: 1006
Calculate and return atan(y / x) in radians