text:
Installation
============

go into the node-logstash directory and execute `npm install geoip-lite`

This install the [geoip-lite](https://github.com/bluesmoon/node-geoip) package.

Updating/retrieving the geoip databases is simple. cd to `node_modules/geoip-lite/` and execute `npm run-script updatedb`.
this will fetch the latest maxmind database files.

Usage
=====

by default, all data available in stored. This data is prefixed by the `use_attr` value. For ex. if `use_attr=postfix_source`
the variable containing the country code will be `postfix_source_geoipcountry` .

the saved data is as follows:

* _geoipcountry: the country code
* _geoipregion: the region
* _geoipcity: the city
* _geoiplonlat: an array containing the lat an lon (for use with bettermap in Kibana)

an example filter:

`filter://geoip://?use_attr=postfix_source`

this filter saves all the data into attributes beginning with `postfix_source_`.

repository: subutux/node-logstash

repo_name: subutux/node-logstash


text:
---
title: Rental Car Insurance
subtitle: Demystified
layout: default
modal-id: 3
date: 2019-12-12
img: escape.png
thumbnail: car-insurance-thumbnail.png
author: Jen
alt: rental-car
project-date: December 12, 2019
category: Web Development
description: We've all been there. The agent at the car rental agency asks you if you want to buy their insurance package. And after declining it, they make you feel guilty about doing so. We'll demystify what they're actually selling you.
---

You've booked your trip to Florida. A week of sand and sun is going to be amazing! You've rented a car for the week through Priceline because you want the flexibility to go to and from the beach, go shopping, and out to eat. When you arrive at the rental counter at the airport you are presented with the menu of car insurance. You decline, but in the back of your mind you didn't really know what you were declining. You're not sure if you're going to be fully covered while driving this vehicle.

If you own a car and have it insured, it's always a good idea to check with your broker what kind of coverage you have on rental cars. You could be already covered for everything you need. Here, we will outline what your options are if you are **not** already covered.

#### Third-Party Car Rental Insurance

Most of us book our car rentals through online travel agencies such as Priceline, Kayak or Hotwire. When you make your booking, you'll be prompted to purchase car insurance. What they're selling you is collision damage coverage. This insurance will cover you if there is any damage to the vehicle while you have it. This won't cover any personal injury or third part liability.

#### Credit Card Insurance

Many credit cards these days offer rental car insurance when you pay for the balance on the card, as long as you decline the insurance coverage offered by the rental agency. Similar to the third party option, this probably only covers damage and not liability or personal injury.

#### At The Rental Counter

At the rental counter they will offer you different options for coverage. There are 4 main categories.

1. Loss Damage Waiver or Collision Damage Waiver
- This is the same thing as what you're getting from Priceline or your credit card. No need to have more than one of these.
2. Liability Coverage
- In the case you were at fault in a collision and the other party makes a claim against you for their injuries or damage. Coverage is usually on the order of 1-2 million.
3. Personal Accident Coverage
- Covers any medical treatments you incur after a collision.
4. Personal Effects Coverage
- Covers your lost/stolen personal belongings if the vehicle was broken into.

Depending on the rental agency they might offer packages, or they might have options a la carte.  Don't let any agent pressure you into something you don't understand.

One thing to consider is that if you decline the insurance offered at the counter, you will need to submit a claim through your credit card or Priceline. Meaning, if there is damage to the car you'll have to pay the car rental agency and file for reimbursement from your credit card provider.

To conclude, no one should be driving without car insurance no matter the circumstances. But it's also important to be informed of your options when you're traveling!

branch_name: refs/heads/master

extension: markdown

gha_language: JavaScript

license_type: permissive


text:
# Embed Visualizer

![demo gif](http://i.imgur.com/2wAb2d3.gif)

### Code snippet generators

The general structure for them looks like this:

```js
export default {
  // for displaying on the <select> dropdown
  name: 'Cool Discord Lib (Cool Programming Language)',

  // for highlight.js
  // see https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html#language-names-and-aliases
  language: 'coolprogramminglanguage',

  // Decides if the library has webhook support or not.
  // If not set to false and a info will be displayed
  webhook_support: true,

  // actual generator
  // If webhook mode is enabled and supported the list of provided embeds will be in the "embeds" property, otherwise the single embed will be in "embed"
  // data is just a javascript object that looks like this:
  // { "content": "message content...", "embed": { ... }, "embeds": [ { ... }, { ...}] }
  // isWebhook will (if webhook mode is supported) be a boolean indicating if the mode is set to webhook(true) or normal(false).
  // if theres no support, this param may be omited
  generateFrom(data, isWebhook) {
    ...
  },
};
```

[embed docs]: https://discordapp.com/developers/docs/resources/channel#embed-object

license: MIT

extension: md

gha_license_id: MIT


text:
---
layout: post
title: "There's No Magic In Design Thinking"
excerpt: "A great post by Jared Spool"
date: 2017-02-02 17:33:53 -0600
comments: true
categories: design
---

[Shh! Don’t Tell Them There’s No Magic In Design Thinking](https://medium.com/ux-immersion-interactions/ssh-dont-tell-them-there-s-no-magic-in-design-thinking-b95f33867656)

> when I asked them what they thought [design thinking] meant, their answer puzzled me. They told me it was a new approach to design, focusing on problem solving with multidisciplinary teams, producing competitive end-to-end solutions that delight customers, users, and employees.
>
> _Problem solving? Multidisciplinary teams? End-to-end solutions? Delighting users?_ I’d been researching and writing about integrating these elements for decades. What’s new here?

I've had the same problem. While I'm excited about the way design thinking has been injected into a lot of different domains, in my own domain of web product development I still considered this just _design_.

> For decades, I’ve needed to do what every seasoned design professional has found themselves doing: explaining why design is more than just making something pretty. When I’ve worked with other designers, they get it.
>
> But once someone who isn’t a designer — someone who is a layperson — is introduced into the mix, I’ve found I need to convince them that design isn’t only about making the thing pretty. That’s it’s about solving problems. That’s it’s about end-to-end solutions.
>
> Some of the make-it-pretty meme comes from the way design is framed inside our society. TV shows, like Project Runway or This Old House, talk about design as the end stage, where the colors and decorations are added in. Go into a Home Depot or a Lowe’s and you’ll find a section of the store called the Design Center, where they sell paint and decorative knickknacks to complete your rooms. There’s no discussion of problem solving or end-to-end solutions in that world of design.
>
> It’s important to bring design into a project early, before the team settles on a solution, so they can truly explore the needs of the users. Yet, when we would propose this, we’d get these funny looks. Why should we care about the design that early? We haven’t even figured out what we’re doing yet? They’d always push back and tell us to come back later, when it was time for design to clean things up.
>
> That’s been the fight for decades. We’ve spent so much time trying to get the laypeople to try to think about design in a bigger definition. Yet, they always come back to the notion that design is only about making it pretty.
>
> **Design Thinking is a Reframing of Design**
>
> The phrase design thinking changed all that. To a layperson, it was completely new. While it was made up of words they thought they knew, the combination was novel. “Design thinking? What’s that?”
>
> Adding the word ‘thinking’ to ‘design’ was a brilliant move. David Kelley and Tim Brown, the founders of IDEO who popularized the term, were smart to take advantage of the unfamiliarity of the phrase.
>
> To those of us who’ve been doing this for a long time, design thinking doesn’t mean anything new. But it also doesn’t mean ‘make it pretty.’ And that’s why it works.

...go read the whole thing. I preserve so much of it here only because I don't trust Medium to...

repository: dealingwith/poole

gha_language: CSS

repo_name: dealingwith/poole


text:
This is my IRC bot. It's pretty simple.

This bot requires Python 2.7.

To get it running, copy the example config to `config/config.yaml` and put in
your own configuration. The config file is pretty self-explanatory.

Once configured, run `./bin/bot`.

repository: brlafreniere/nickenbot

repo_name: brlafreniere/nickenbot


text:
---
title: "Doctrine of Sin"
indexTitle: "Sin, Doctrine of"
pdf: "sin.pdf"
description: "Sin, Doctrine of -  a comprehensive topic study of the Doctrine of Sin."
tableOfContents: true
template: topic.jade
---

DEFINITION AND OBJECTIVES
=========================

The Bible uses the word “sin” to refer to any activity or pattern of
thinking that is independent of God’s standards or of His provisions for
human life. God loves you, and He has your best interests in mind all
the time. Because He has always known what is best for any individual,
and for our communities and nation, He has laid out standards by which
people can have lives of great happiness and productivity. These
standards are known as the Plan of God, or the Christian Way of Life.

Because it is so important that people adjust themselves to the Plan of
God, the subject of sin is found in most Bible passages in some form.
These authoritative declarations of the Word of God are in stark
contrast to the relativism and permissiveness of modern society.

This study deals categorically with many of the specific sin areas which
are dealt with in the Bible. The problem of personal sin in discussed in
detail with the objective of providing the Christian believer with
information about how to have personal victory over sin in the life.

You may want to read this paper through fairly quickly, at first, in
order to get an overview of the subject matter. But to get the most out
of a study like this, you should read and meditate upon each Bible
passage cited in this paper, using the comments as study aids. By
studying as much as possible about God’s standards, and His plan for
living the Christian life, you can learn how to profit as much as
possible from a close walk with the Lord, while being hindered as little
as possible by the consequences of acts of personal sin.

You can gain victory over the dominating influence of sin by becoming
skilled in the mechanics of Christian living. Victorious Christian
living requires the regular intake of Bible truth and the constant
filling and control of the Holy Spirit. As you grow in grace, you become
an “edified” believer, and your life begins to “conform to the image of
Christ”. This spiritual growth is the basis for victory over sin.

THE SEQUENCE OF SIN
===================

In the Bible, sin is discussed under three types. The first type of sin
is called Imputed Sin. This is the concept that, when Adam sinned, the
whole human race sinned. Thus, when Adam was counted guilty, every human
being shares his guilt. These things are mentioned in 1 Cor. 15:22; Rom.
5:12; and Rom. 3:23.

The second part of the sin “package” is known as Inherited Sin. Adam
acquired a Sin Nature when he sinned. Since then, every human being has
inherited a Sin Nature at the time of birth – we are born sinners. Rom.
5:12; Psalm 51:5. The Sin Nature is described in detail in Section 2.0.

Third, the result of having a Sin Nature is that each person leads a
life in which he commits Personal Sins, both before and after being born
again. These personal sins are the result and manifestation of the Sin
Nature and occur whenever a person decides to think or act independently
of the will of the Father.

CHRIST’S WORK REGARDING SIN
===========================

The Lord Jesus Christ bore the penalty for all the sin of the human
race, including each aspect of sin mentioned in the previous section.

As far as Imputed Sin is concerned, although in Adam we are counted
“guilty” and spiritually dead, in Jesus Christ we are counted “not
guilty” and spiritually alive. 1 Cor. 15:22; Eph 2:1,5,6.

The problem of Inherited Sin was also dealt with at the Cross, as Jesus
died to provide for the Sin Nature. 1  John 1:7. Human good, which is a
product of the Sin Nature, was rejected at the Cross, making salvation
and all other spiritual benefits to be total products of the Grace of
God, “not of works lest any man should boast”. Eph. 2:8,9; Rom. 4:4;
6:10.

And, Christ bore everyone’s personal sins (1 John 2:2) because He was
judged for the sins of the whole world. His spiritual death on the Cross
was substituted for our spiritual death, making it possible for anyone
to become spiritually alive. The sin issue is resolved for all of us by
the work of Christ. So the issue for anyone is simply faith in Christ
and in His finished work of salvation. John 3:18,36.

THE SLAVE MARKET OF SIN
=======================

A person is born into the world spiritually dead because of the sin
passed on through human procreation. Rom. 5:12. The sin of Adam is
imputed to all mankind. 1 Cor. 15:22. There are three categories of
people in the world, all of whom are born in sin and all of whom have
sinful natures. They are: (1) the immoral person, Rom. 1:18-32; (2) the
moral person, Rom. 2:1-6 and Isa. 64:6; and (3) the religious person,
Rom. 2:17-29 and 4:4.

Every human being is born into the slave market of sin, according to
John 8:34,35 and Gal. 3:31. The Law cannot free a person from the slave
market of sin. Only a free man can free a slave. Jesus Christ was born
free from sin, without a sin nature, and He never committed personal
sin. 2 Cor. 5:21. He was therefore a free man and not in the slave
market with us.

The Lord Jesus Christ purchased us from the slave market of sin and set
us free. 1 Pet. 1:18,19; 1 Cor. 6:20; Eph. 1:7. The gate to the slave
market has been removed for all people; but actual freedom depends on
whether the individual exercises his free will in accepting the offer of
freedom. The only way out of the slave market of sin is through Jesus
Christ. John 14:6; 8:36

THE SIN NATURE
==============

The Sin Nature is that part of the essence of the soul acquired at
Adam’s fall and subsequently passed on to every person at birth. The Sin
Nature is the center of the soul’s rebellion against God. The essence of
the soul contains:

* Self-consciousness

* Mentality

* Volition

* Emotion

* The Sin Nature

The Essence of the Sin Nature
-----------------------------

The Sin Nature has an “area” of strengths in which human good is
produced, that is, those good deeds and thoughts which are acceptable to
man but which are unacceptable to God for purposes of salvation or
spiritual growth. Isa. 64:6; Rom. 8:8. In the Bible, human good is
contrasted with divine good, which is the work produced by the Spirit of
God in the life of a believer who is walking in daily fellowship with
the Lord under the control of the Holy Spirit.

The Sin Nature also has an “area” of weakness which directs the
production of all personal sin. Heb. 12:1. Three types of personal sin
are produced here: mental attitude sins, sins of the tongue, and open
sinful activity.

The Sin Nature has patterns of lusts, or desires, the basic motivators
of all the activities of human life. The basic drives include the desire
for power, approbation, ego satisfaction, sexual satisfaction, material
satisfaction, and so forth.

The Sin Nature has a system of trends, or inclinations, which vary among
individuals. Some people have an inclination toward immorality or
lasciviousness. Rom. 1. Others have trends toward morality or
asceticism. Either trend is a product of Sin Nature activity.

Bible Synonyms for the Sin Nature
---------------------------------

There are several terms used in scripture to refer to what is known as
the Sin Nature.

Sin (in the singular) – Ps. 51:5; Rom. 5:12; 7:14; 1 John 1:8.

Flesh – the emphasis here is on the location of the Sin Nature in the
“flesh” or life of the individual. Rom. 8:8; 7:18; 13:14; Gal. 5:16-21;
Eph. 2.3.

Old Man – referring to the believer’s former manner of life as an
unbeliever. Eph. 4:22; Col.   3:5–9.

Heart – in some usages the word “heart” refers to a facet of the soul
which is the source of sin. Jer. 17:9; Mt. 12:34; 15:19; Mark 7:21-23;
Ps. 58:2-5.

Carnality – derived from the Latin for “flesh”. Rom. 7:14; 8:6-8; 1 Cor.
3:1-3.

Principles Related to the Sin Nature
------------------------------------

The Sin Nature is the source of spiritual death. Rom. 5:12; Eph. 2:1,5.

The Sin Nature is perpetuated in human beings through physical birth.
Ps. 51:5; 1 Tim. 2:13,14. The believer continues to have his Sin Nature
after salvation. 1 Cor. 3:1; 1 John 1:8. The believer under the control
of the Sin Nature is called “carnal”. Rom. 7:14; 1 Cor. 3:1ff

The Sin Nature frustrates the production of divine good. Rom. 7:15.

The Sin Nature is not found in the believer’s resurrection body. 1 Cor.
15:56; Phil. 3:21; Col. 3:4; 1 Thess. 5:23.

Solutions to the Problem of the Sin Nature
------------------------------------------

God has arranged to provide all that is needed to deal with the problems
caused by the Sin Nature in a believer’s life. The personal sins of the
individual were borne by Jesus Christ on the Cross. 1 Pet. 2:24. These
sins will never be mentioned again because they have already been judged
in Christ. Rev. 20:12.

Furthermore, Jesus Christ rejected the human good produced by the Sin
Nature in terms of its use as “currency” to purchase salvation, Eph.
2:8,9. This made the way clear for God to provide salvation by grace.
The unbeliever will be at the Great White Throne judgment because of his
rejection of this grace provision. Rev. 20:11-15.

The believer’s sins were borne on the Cross by the Lord, as were those
of all people. 2 Cor. 5:21. When a believer sins, Satan accuses him in
heaven. Jesus Christ is our Advocate; He pleads our case, and the case
is thrown out of court.

God has provided confession of sin as a means of restoring the broken
fellowship with God caused by the believer’s personal sin. The believer
can repent and confess and be filled with the Spirit. 1 John 1:9;
Prov. 1:23.

Human good, rejected by Jesus Christ (Eph. 2:8,9), is never acceptable
to God, and it does not produce blessing in the life of the believer. It
is contrary to the principle of Grace, in which God does the work. In
Christian growth, the Holy Spirit provides for the production of divine
good in the believer’s life, through His filling, control, and teaching
functions. God does the giving; man does the receiving.

Legalism is human good production for the purpose of earning and
receiving merit or blessing from God. In Legalism, man does the work and
receives the credit. Therefore, Legalism is a product of the Sin Nature
lust patterns. Under Grace, God does the work and receives the “credit”
(glory). Human good production of the Sin Nature will be judged at the
Judgment Seat of Christ. It is called “wood, hay, and stubble” and will
be burned. The “gold, silver, and precious stones”, of divine good
production of the Holy Spirit, will remain. 1 Cor. 3:10-15

The Hazards of Negative Volition
--------------------------------

The Apostle Paul issued a stern warning to mature Christian believers
living at Ephesus when he told them to beware of falling into a state of
indifference to, or antagonism to, the Word of God. He stated that if
they were to become to become negative to the Lord’s teachings, their
lives would very quickly become indistinguishable from those of
unbelievers in terms of fruitfulness and Christian character.

**Ephesians 4:17-19, “This I say, therefore, and testify in the Lord,
that ye henceforth walk not as other Gentiles walk, in the vanity
(emptiness) of their minds, having the understanding darkened, being
alienated from the life of God through the ignorance that is in them,
because of the blindness of their heart: who being past feeling have
given themselves over unto lasciviousness, to work all uncleanness with
greediness.”**

The “darkness” referred to in these verses begins with a negative
disposition toward the Word of God. This volitional decision not to
follow the Scriptures leads immediately to a breakdown in the faith
system of understanding divine viewpoint. There is a cessation in the
spiritual growth process; and there is actually a total reversal in
progress in the Christian life (backsliding, or reversion).

As a result of the lack of divine viewpoint in the soul, the negative
person begins to entertain human standards, human criteria, human
doctrine, human programs – these thing, plus the full gamut of Satanic
doctrine, are substituted for the plan of God. The further result is
subjectivity, unhappiness, and deep frustration in trying to live by
techniques which do not work.

These conditions lead to a frantic search for happiness through details
of life such as riches, friendships, possessions, human approbation,
personal influence and power, and so forth. The believer on this
treadmill is a slave to these details of life rather than being a
servant of the Lord Jesus Christ. While the believer thus engaged is
still “in Christ” positionally, he is actually no better off that an
unbeliever as far as this life is concerned. In fact, he is destined to
be far unhappier than the unbeliever, as will be be shown in the
following paragraphs.

The time, energy, and emotional commitments to this person’s search for
happiness lead to further isolation from the teachings of the Word of
God. He is spending maximum effort to find happiness through other
means. Thus, the very method for reversing the downward trend is
ignored.

During this process, neuroses and psychoses are being developed,
aggravated by the self-induced misery which accompanies chronic and
unmitigated sins of the mind such as pride, jealousy, envy,
vindictiveness, worry, fear, mental adultery, implacability, and the
like, from which there is no relief outside of the plan of God.

Because of these sin patterns, divine discipline is compounded daily.
 His
“righteousness” (-r) has replaced the righteousness (+R) of God. This
whole miserable situation is avoidable, as you will see with further
study.

MENTAL ATTITUDE SINS
====================

As a believer progresses in his Christian life, he experiences many
profound changes in his thinking. His standards change gradually but
radically; his frame of reference changes; his mental attitude soon
becomes very different from what it once was. His previous way of
thinking is replaced by the “mind of Christ”, and God’s viewpoint is
becoming his own.

The greatest occupational hazard faced by a Christian is the failure to
grow in Christ. Persistent personal sin carried on without repentance
and confession keeps the Christian out of fellowship with the Lord and
hinders the work of the Holy Spirit in the life.

The normal Christian life is a supernatural life. This life cannot be
lived apart from the daily intake of spiritual food, the sustenance
which comes with the study of the Bible accompanied by the continuous
control and ministry of the Holy Spirit. Inattention to the teaching of
the Word of God concerning the mechanics of daily Christian living
results in failure to grow in Christ. The believer who will not overcome
these problems will not be able to enjoy the benefits and blessings of
the Christian life, and he will certainly not be productive as a child
of God.

This section of the study of the topic of Sin reviews several factors
relating to the subject of the believer’s mental attitude. First, we
note several categories of mental attitude sin which are the result of
“not thinking Grace”. Then we see the methods by which God arranges for
human viewpoint thinking to be replaced with divine viewpoint thinking.
This section will also show some of the important results in the life of
the Christian who develops a godly mental attitude.

The Sin of “Not Thinking Grace”
-------------------------------

A Christian decides many times every day whether he will follow God’s
plan for his life. In decisions great or small he expresses either his
dependence on the Lord or his desire to be independent of God’s
direction. A believer has access to the perfect plan of God for his
life, a plan which has certain predetermined divine standards by which
every situation can be measured, by which every decisive opportunity can
be judged. Many promises and blessings are available for use by the
person who orders his life according to the patterns laid out in the
Bible.

The person who is not positive to the plan of God, and who would apply
his own human standards to life situations, does not operate by divine
standards. He becomes involved in a variety of mental attitude sin
problems stemming from his original decision to be independent of God.
His life takes on the characteristics of one who does not “think Grace”.

The Grace of God is that characteristic of His which is an extension of
His love for the human race and which causes Him to provide for every
human need for time and eternity. The sacrificial death of Jesus Christ
on the Cross was the Work which made it possible for God to view every
person as free from the guilt of sin and as an object of God’s Grace
provisions.

Failure to order one’s thinking according to Grace involves several
aspects of mental attitude sin, including the following :

A spirit of pride – this is an exalted feeling based on personal success
or position, or based on good training or education, on personal
appearance, or on some natural gift or ability. Sinful pride is an inner
feeling of self-importance which does not take into account God’s
provision of every resource and quality which goes into one’s human
traits and capabilities.

Love of, or desire for, human approbation and praise – this is a secret
fondness for being noticed and recognized. It is a love of supremacy, or
it is the drawing of attention to oneself by various types of
exhibitionism or by spiritual one-upmanship.

Self will – this is the concept of the stubborn or unteachable nature,
or implacability. Self will is a disposition to be argumentative, harsh,
bitter, which causes one to be a “nit picker” or critical in the
extreme, or to mind the business of others, or to fail to recognize the
rights and privacy of others.

Sinful reaction to social pressures – these are the sins of anger,
impatience, touchiness, or of having a sensitive nature. There is often
resentment and retaliation when disapproved or contradicted. This area
of sin generates jealousy, sour grapes, envy, and the accompanying
bitterness, hatred, carrying of grudges, revenge tactics, and so forth.

Magnifying the faults and failings of others while emphasizing one’s own
virtues.

Negative disposition – this is peevishness, a fretful disposition, one
that loves to be coaxed and honored. It is a dishonest, deceitful
attitude. It is a disposition that tends toward discouragement and
despondency under pressure along with the attempt to solve one’s
problems by hysteria and tantrums.

Apathy – this sin is that of indifference to doctrine and to the Word of
God in general. It is indifferences to the lost condition of unbelievers
or to the carnal condition of other believers.

Characteristics of the Believer’s Mental Attitude
-------------------------------------------------

The true character of a believer in Jesus Christ is determined by his
mental attitude. Prov. 23:7, “As a man thinks in his heart, so is he”.
See also 1 Pet. 1:13; 4:1; Heb. 12:3; Col. 3:1,2; 1 Cor. 2:16; 2 Cor.
10:4,5.

 Heb. 4:12,13;
Prov. 21:2. The following are examples of mental attitude thinking.

 Worldliness is not the doing of
something wrong; it is the thinking which takes place independently of
God’s viewpoint. The remedy to the problem of worldliness is not in
turning over a new leaf. It is a change in thinking (repentance) rather
than a change in activity. Divine viewpoint must replace human viewpoint
before a change in character can be expected. One can have an outward
life which appears good, yet be filled with mental attitude sins. Col.
3:2; James 4:4.

 One is not
beaten until he gives up mentally.

True Christian inner peace is a mental attitude. It is the relaxed
mental state which enables one to enjoy the Christian life regardless of
people or outward circumstances. With a good mental attitude, the
believer can be joyful, relaxed, and can even enjoy the battle.

Mental stability is the result of thinking from a proper frame of
reference, that is, Biblical thinking. The Christian who has mental
fear, who is a chronic worrier, who cannot think clearly under pressure,
who blames others for his problems, who cannot make correct decisions –
that believer is unstable. His emotions interfere with his thinking.
Since emotion always follows thinking, emotional instability will always
follow from incorrect (HVP) thinking. But God’s Plan of Grace leads to
rock-solid mental and emotional stability.

Human vs Divine Viewpoint
-------------------------

Thinking requires words - vocabulary. Divine thinking requires divine
vocabulary. “Man shall not live by bread alone but by every word that
proceeds from the mouth of God.” Under any kind of spiritual pressure,
human vocabulary, or human thinking, is not adequate. Only God’s words
can give the ability to think correctly under pressure. The Christian’s
ability to think correctly is based on how much Bible teaching is
resident (applied) in the soul of the believer.

The Christian is commanded to have a new mental attitude. Col. 3:1,2; 2
Cor. 10:4,5; 1 Cor. 2:16; Phil. 2:5.

The warfare between two viewpoints in the believer’s soul must be fought
from within, first by knowledge of doctrine, and then by the application
of truth to the life. 2 Tim. 2:15; 1 John 1:9.

Every believer has a mind which is capable of looking at life from God’s
point of view. Rom. 1:18 ff. Mental attitude divine viewpoint is
obtained only through Bible study accompanied by the controlling
ministry of the Holy Spirit. The Christian who habitually studies the
Word learns to concentrate and to think from God’s point of view, and
thus he becomes stabilized. The “mind of Christ” (the source of God’s
viewpoint) is made clear in the Bible.

The Christian can be “transformed by the renewing of the mind” through
study, knowledge, and application of Bible truth. By this means his
decisions and actions are most likely to be in agreement with Bible
principle. And this is the only sure sign of Christian maturity and
victorious Christian living.

The Human Conscience
--------------------

The conscience is located in the mind and is the center for the
operating standards of the human soul. Titus 1:15. The conscience
convicts the Christian of evil or wrongdoing. John 8:9. The conscience
establishes standards for both human and divine relationships.
Acts 24:16.

The conscience functions on thinking; and the believer in fellowship has
a conscience which functions from resident (applied) divine viewpoint.
Rom. 2:15; 9:1, as related to applied Bible teaching. The conscience
establishes standards for serving God. 2 Tim. 1:3; Heb. 9:14. But false
operating standards in the conscience produce legalism. 1 Cor. 8:7.

The more the believer uses applied Bible doctrine, the stronger his
conscience becomes in using such thinks as the Law of Liberty and the
superseding laws of love and sacrifice. 1 Cor. 10:24-29. Conscience is
the basis for enduring mistreatment and misunderstanding without
defending oneself. 1 Pet. 2:19; 3:16. The conscience can be damaged or
destroyed with false doctrine and with a calloused soul. 1 Tim. 4:1,2.

The Mechanics of Replacing Human Thinking with Divine Viewpoint
---------------------------------------------------------------

The Christian life is a supernatural life and cannot be lived without
the filling of the Holy Spirit and the daily function of applied Bible
teaching. Rom. 8:2; 7:6; Gal. 5:25; Eph. 5:18. All changes must come
from within, and the Holy Spirit must originate divine good by applying
doctrine to the life.

We begin a change of viewpoint at the moment of salvation. At that time
we changed our mental attitude toward the Lord Jesus Christ. Acts 3:19.
That was repentance and faith, and it resulted in our regeneration.
John 3:16. At that moment many benefits were made available to us,
blessings and promises from God which enable us to live in a manner
which is both acceptable to the Lord and which also produces great
happiness for us. We are given the ability to think those things which
will bring honor to the Lord. Eph. 5:18; 4:23; Col. 3:2.

The choice of whether to make use of the divine operating assets is made
by the believer every day. The power or our walk with the Lord depends
on Bible teaching, the work of the Holy Spirit, and the believer’s
positive volition. Daily Bible teaching under the controlling ministry
of the Holy Spirit builds up divine standards in the human soul and
conscience. 1 Tim. 1:5,19; 3:9.

The Benefits of Having a Proper Mental Attitude
-----------------------------------------------

With the proper mental attitude, the Christian will have victory, peace,
power, and mental stability. Phil. 2:5; 2 Tim. 1:7. The Christian can
experience perfect inner peace, ever during times of difficulty and
suffering. Phil. 4:7. Inner peace comes from what we think. Isa. 26:3.
Divine viewpoint brings mental stability and eliminates discouragement,
anxiety, instability, fearfulness, and double-mindedness. Stability of
mind and character is a mental attitude of strength.

The believer with divine viewpoint has a gracious attitude toward
others. He is a mature believer characterized by mental attitude love
who is a channel of the Grace of God. Deut. 6:5; 11:13.

Mental Attitude and the Believer’s Ministry
-------------------------------------------

The mature believer “thinks Grace”, which is the “mind of Christ”.
Therefore, the Christian’s life and personality are characterized by
many of the qualities of the life of the Lord Jesus Christ. Rom. 8:29;
Gal. 5:22 ff. In every one of these characteristics the Christian has
one basic ingredient - correct thinking according to divine viewpoint.
1 Pet. 3:8

Therefore, the mature believer is gentle, compassionate, caring, and has
a gracious attitude toward others. These are essential life qualities in
any believer who is a good witness for Christ. With these qualities, and
with the knowledge of the Word of God being acquired on the way to
maturity, the believer cannot help but be an outstanding witness for
Christ and a skilful practitioner in the use of his spiritual gifts.

THE SINS THAT GOD HATES
=======================

In the Bible passage Proverbs 6:16-19 are listed seven things that God
the Father despises. The paragraph cited uses the phrase “an abomination
unto Him” to indicate God’s attitude of repugnance toward the sins
listed there. Four of the sins are sins of the tongue; two are mental
attitude sins; and one sin, murder, is an open sin.

“A proud look” is a sin manifested in the features of the face. This sin
reveals the mental attitude sin of pride, and it refers to arrogance
which is revealed in expression, attitude, and bearing.

“A lying tongue” refers to inveterate, habitual lying.

“Hands that shed innocent blood” refers to murder. It does not refer to
killing in battle, which is bona fide, but to the unlawful taking of a
life.

“A heart that devises wicked imaginations” is a sin in which the mind is
controlled by the emotions with the result that there is the mental
attitude sin of jealousy or suspicion, which cause a person to think the
worst.

“Feet that are swift in running to mischief” refers to sins of the
tongue plus overt sins. It relates to the person who goes out of his way
to make trouble through gossip, maligning, judging, vindictiveness,
tactics of revenge, and any overt tactic which will make trouble for
others.

“A false witness that spreads lies” refers to perjury, another form of
lying. Or, it means to downgrade someone.

“He that soweth discord among the brethren” indicates maligning,
carrying tales, backbiting, destructive criticism, and so forth.

SINS OF THE TONGUE
==================

READ Psalm 64:1-10.

Sins of the tongue have their origin in the Sin Nature. These sins are
among the most devastating of all of the categories of sin. Of the seven
sins mentioned in Proverbs 6:16-19 as being especially hated by God,
three are sins of the tongue. As a Christian believer, you must learn as
much as possible about this type of sin. And you must do everything
possible to gain victory over this in order to be able to make progress
in the Christian Way of Life.

Psalm 34:11-14.

Sins of the tongue are motivated by mental sins such as arrogance,
jealousy, bitterness, vindictiveness, implacability, hatred, mental
adultery, pettiness, envy, guilt feelings, etc. All of these sins are
focused at other people at one time or another. When someone reaches out
to attack another person, the tongue is used to voice the inner mental
sins which are already present. Such talk may be direct and scathing,
even vulgar. Or the talk may be subtle, refined, intellectual, even
couched in Christian terms. “There is a matter that I need to share with
you as a prayer request; this is just between us spiritual believers…”

NOTE : If you know something bad about a person, or you suspect
something, do not share it with anyone unless that person has a direct
hand in the solution of the problem. If in doubt, don’t talk about it!

Sins of the tongue are a sign of the believer’s reverting to the old way
of life, the condition of the carnal man. James 4:11; 5:9; 5:12, Romans
3:13,14. In fact, the believer who indulges in sins of the tongue cannot
be distinguished from an unbeliever. The believer is warned in Ephesians
4 not to fall into the life patterns of the unbeliever.

Eph. 4:17-22, 25, 29-32.

Verbal sins can destroy a family or a congregation. Things like gossip,
slander, maligning, judging, backbiting, and boasting are malicious,
venal, and destructive. James 3:5,6. Troublemakers are always
characterized by sins of the tongue. Psalm 52:2.

It is the duty of the pastor to warn against these things. 2
 Tim. 2:14-17. And believers are commanded to separate themselves from
such troublemakers. Rom. 16:17,18. This separation may be just a turning
away or refusal to comment or to reply in a conversation. Separation
does not mean ostracism or excommunication except in the worst cases. It
means, at first, refusal to participate. Teaching on this topic may
involve exhortation and rebuke, as in Titus 2:15. But such teaching,
plus the refusal of believers to participated in sins of the tongue,
will help the one who is having trouble with this to have victory.

Titus 1:10,11.

Sins of the tongue produce compounded divine discipline. Ps. 64:8; Matt.
7:1,2. First, there is discipline for the mental attitude sin which
motivates the verbal sin. Second, there is discipline for the verbal sin
itself. Third, there is discipline for the sins which one assigns to
another person in wrongly judging him - “with what measure you mete, it
shall be measured to you again.”

Types of Sins of the Tongue
---------------------------

*Backbiting* - slander, defamation of character, evil speech,
detraction. Found in several places in the Bible, including Rom. 1:30 as
one of the sins of the immoral person who has rejected God. READ Psalm
15:3; 50:20; 101:5; Proverbs 25:23; Jer. 9:4; Rom. 1:30; 2 Cor. 12:20.

*False Witness* - lying about people, especially while under oath.
Prov. 25:28; Exo. 32:1; Prov. 19:9. Examples of false witness:

- Against Stephen, Acts. 6:11

- Against Paul, Acts 25:7

- Against Christ, Matthew and Mark

*Perjury* - lying under oath. READ Lev. 6:3; 19:12; Zech. 5:4; Mal. 3:5;
1 Tim. 1:10

*Lying* - READ Prov. 12:22; 21:6; Col. 3:9; Lev. 19:11; Luke 20:20.

*Dissimulation* - Faking it, covering up, hypocrisy. Example: calling in
sick when not sick. READ 1 Sam. 21:13; Acts 23:12-15; 2 Sam. 14:2; 2
Kings 10:19; Luke 20:20.

*Busybody* - self-appointed monitor, or one who tries to straighten
others out. This word appears as a translation of several Greek
originals.

From περιεργαζομένους, part. of περιεργάζομαι “to do something useless
or unnecessary”. Literally, “to work around”. Also used in Greek to mean
“undue anxiety” over something which is not really a proper concern.

2 Thess. 3:11.

Also from ἀλλοτριεπίσκοπος, a combining form
from ἀλλότριος, “belonging to another”, and ἐπίσκοπος, “bishop”. Hence,
the busybody is “another man’s bishop”.

1 Pet. 4:15.

*Talebearing* - slandering, whispering behind backs. Prov. 11:13; 17:9;
18:8

*Evil Whispering* - Prov. 16:28.

*Slander*- Psalm 101:5; 50:20; Prov. 10:18; 11:9; 2 Sam. 10:3; Job 1:11;
Luke 7:33.

*False Accusation* - READ 1 Sam. 1:14; Neh. 6:7; Job 2:5; 22:6; Jer.
33:17; Matt. 5:11; 27:12; Luke 6:7; 1 Peter 3:16.

*Evil Speaking* - READ Ps. 5:9; 10:7; 36:3; 55:21: Prov. 12:18; 24:2;
Matt. 12:34; Rom. 3:13; James 3:6; 4:11.

God provides protection for the believer who is, himself, a victim of
sins of the tongue. Job. 5:19–21.

Control of the tongue, the absence of verbal sins, is a sign of
Christian edification in the believer, and it is a sign of considerable
growth in Grace. James 3:2; 4:11,12. By avoiding sins of the tongue, the
Christian can lengthen his life and find great happiness. Ps. 34:12,13.

How to Have Victory Over Sins of the Tongue
-------------------------------------------

1. Grow daily in conformity with the Lord Jesus Christ

2. Ask God the Father for provision and protection in this area.

3. Confess this sin each time you are convicted of it.

4. Learn to recognize all of the verbal sins – some are obvious, some
are subtle.

5. Keep silent during discussion of a bad situation.

6. Keep silent during discussion of another person.

7. Keep silent.

RULE: Do not pass on derogatory or uncomplimentary information about
anyone, unless the Word of God has given you the specific authority and
responsibility to do so, and the person you are informing likewise has
responsibility in the situation and a need-to-know the information.

THE SIN UNTO DEATH
==================

The phrase “sin unto death” describes the final stage of divine
discipline in which God removes from the earth the person who is totally
alienated from God. The “sin unto death” is not a particular sin; but it
is, rather, a mental attitude of total indifference to and rebellion
against the will and purpose of God.

The spiritual condition of the person who comes under the “sin unto
death” is characterized by continual and maximum carnality; and this
punishment represents God’s final step of chastisement to those who are
in maximum alienation from God. Only God can discern the true nature of
a person’s mind, attitude, or volition; and only God knows whether a
person is actually implacable and deserving of physical death.

The “sin unto death” is described as a principle in 1 John 5:16; Psalm
118:17,18; and Ezek. 18:21-32.

It is important for the Christian to understand the circumstances under
which sins are not “unto death”.

First, sin which is confessed is not “unto death”. 1 John 1:9;
1 Cor. 11:31; Ps. 32:5; Ps. 38.

Second, sin which is discontinued is not “unto death”. Heb. 12:1; Eze.
18:21-32.

Finally, the person who responds positively to divine discipline is not
involved in the “sin unto death”. Heb. 12:6, cf. 12:11-15.

There are definite characteristics by which to recognize the conditions
which lead to God’s applying the “sin unto death”. Persistent,
unconfessed sin, sin which continues unchecked with no repentance, may
bring a person under this category. Also, the person who persistently
ignores Grace, warnings, and discipline may come under the “sin unto
death”. Lev. 26. Then, sin which has a maximum adverse effect on other
people (causing stumbling) may lead a person into severe discipline.

Some case histories of the “sin unto death”:

* The case of “lying to the Holy Spirit” (Ananias and Sapphira).
Acts 5:1-10.

* The case of persistent carnality while sitting at the Lord’s Table,
1 Cor. 11:30,31.

* The case of disobedience to the Word of God.1 Chron.10:13,14;
1 Sam. 13:9–14. King Saul did not kill Agag although directly ordered to
do so by God; he insisted on personally offering sacrifices in the place
of divinely appointed priests; and he consulted a witch, itself a
capital offense.

* The case of self-righteousness and dependence on man which was
perpetuated (case of Hezekiah). Isa. 38.

* The case of apostasy on the part of a believer. Num. 31:8; 1 Tim.
1:19,20.

SIN’S VICIOUS CIRCLE
====================

One sin leads to another. Sins are chained together and tend to
reinforce each other. The Christian must make a conscious effort to halt
the progress of sin at the beginning.

 They touch off other mental
sins, sins of the tongue, and the overt or open sins. And a Christian
will experience great self-induced misery in his life unless he learns
how to nip sin in the bud through confession and victory. Learning how
to recognize certain sin patterns is very useful in helping the believer
to be forearmed in the conflict.

The following are some examples of types of “chain sinning” which are to
be avoided.

Bitterness is a sin that involves someone else and leads to a chain of
sins. Any sin may lead to divine discipline. Even when a sin is
confessed, suffering which was begun under discipline may continue (even
though the cursing has been turned to blessing in the case of actual
suffering). Bitterness may reappear as the hurt continues – bitterness
against God or against other people.

Bitterness has another person as an object. It leads to vindictiveness
and implacability. These, in turn, lead to antagonism and revenge
tactics. Revenge tactics can include sins of the tongue such as judging,
maligning, gossip. Overt sin is possible, including social ostracism
(snubbing, shunning, not speaking), harassment, even violence. Murder,
for example, is the end result of a chain of sins stemming from
bitterness. The Christian living in bitterness tries to sublimate in
various ways, alcohol, drugs, emotional experiences, trying to maintain
the rosy glow, but he is never satisfied.

Guilt Association is a guilt complex that involves various parts of the
soul. The believer keeps bringing up sins of his past; his depression
leads to guilt feelings. He begins to associate every trouble in the
past with an ‘unforgiven’ sin of the past. He feels that God is
permanently displeased with him. A guilt complex like this leads to
blasphemy, that is, accusing God and maligning Him. This sin leads to a
lack of faith, hatred toward God and toward others who might be thought
responsible. Remember, when a sin is confessed, God forgets it; and the
believer is wrong to remember it. God does not discipline us ten years
after the fact. David had 26 good years after the Bathsheba incident.

Public confession of sin is used by people to vent a guilt complex. But
the one who confesses publicly is giving out gossip, about himself if no
one else. He presents material for temptation to other believers,
temptations to judge, to hate, to malign, to gossip. Public confession
leads to chain sinning in one’s own life and in the lives of others.
This is a failure to preserve the privacy of the priesthood. A Christian
may reveal sin problems privately to an intimate and confidential friend
who is a believer and who is in a position to exhort or counsel from the
Word of God. Otherwise, confession is made to God alone.

Intrusion upon divine prerogatives occurs when a believer tries to do
the word of God in judging, condemning, disciplining other people. The
Bible instructs each person to judge himself; and he may judge and
discipline his own children. Otherwise, it’s “live and let live”.

Gossip, the discussion of problems with outside parties is similar to
public confession. It makes problems for people and encourages mental
attitude sins and sins of the tongue. It leads to cliques, divisions,
mutual admiration societies. This activity is an attempt to build one’s
happiness on someone else’s unhappiness.

Failure to maintain relaxed mental attitude toward others refers to the
development of pseudo-love in the life. It does not allow for other
peoples’ areas of weakness, does not exhibit true love for others. It
leads to a failure to forgive, which in turn makes it impossible for the
Christian to be in a position to help through example or exhortation.

The solution to all sin problems of this type is edification, spiritual
growth through a daily walking in fellowship and the intake of Bible
teaching. Also required is a thorough knowledge of the doctrine of
Grace, the application of God’s gracious assets to the life, and the
development thereby of a gracious mental attitude and outward
disposition toward other people.

THE PLACE OF CONFESSION IN SOLVING THE SIN PROBLEM
==================================================

The presence of the Sin Nature in the soul guarantees that the Christian
believer will have a problem with active personal sin for the rest of
his life on earth. This personal sin causes a deep disturbance in the
believer’s personal relationship with the Lord. The Holy Spirit is said
to be personally “grieved” by a Christian’s sin, and His work “quenched”
by a Christian’s human good. While the believer does not lose his
salvation each time he sins, his personal growth and effectiveness are
stifled as long as there is a rift in his fellowship with God. This rift
is healed by means of the act of personal confession to God of the sin
which caused the breach.

Confession of sins is not the basis of salvation. Jesus Christ was
judged once for our sins, on the Cross; and He does not need to be
judged repeatedly for our sins. The basis of salvation is the
individual’s personal trust in Christ and His work, rather than
confession or any other act which a person might perform to try to win
the favor of God. Acts 16:31; John 1:12; Eph. 1:13,14; 2:8,9; 1 Pet.
2:24; 2 Cor. 5:21.

A Christian is always “in Christ”. Eph. 1:3,5,7. So confession of
personal sin is extremely important to the personal spiritual
relationship that he has with God. God requires confession of sin as the
means of maintaining a close personal walk with Himself. He requires,
that is, a continual acknowledgement of His rulership; and confession of
sin is the means by which the believer expresses his yieldedness and
surrender to the sovereign will of God on a moment by moment basis. The
Lord wants the Christian to have a very useful and happy life, and part
of His plan for providing this sort of life is confession of sin.

God Encourages the Believer to Confess Sin
------------------------------------------

A believer may not be aware, initially, that he can live out of
fellowship and that he needs to confess sin. 1 John 1:6; 2:9,10; 2 Pet.
1:9. God both commands and pleads with us to judge ourselves, to
confess, and then to forget sins. Isa. 43:26; 1 Cor. 11:28,31;
1 John 1:9; Phil. 3:13,14; Prov. 1:23. Any person who reads the Bible
quickly becomes aware of God’s intentions in this matter.

Some Christians willfully ignore the commands to confess, leading God to
employ more persuasive measures to encourage compliance. These methods
include (1) loss of inner peace, Phil. 4:6,7; (2) chastening
(discipline), Heb. 12:6; (3) pricking of conscience, Heb. 13:18; and (4)
sorrow for sin, Psalm 32. A few Christians manage to ignore even severe
chastening for a long time, leading to God’s administering the “sin unto
death”, described in a previous section. The alternative to confession
is discipline. Heb. 12:1-5.

The Mechanics of Confession of Sin
----------------------------------

Confession does not provide the believer with a license to sin. The
attitude that says “I can sin and confess repeatedly because God will
always forgive” is sinful in itself because it indicates that the
believer does not actually think the same about his sin that God does.
That is, there is no real repentance or confession. Nor does confession
of sin remove the buildup of callousness or hardness in the soul of the
person who has lived apart from God for a long time. This removal of
scar tissue is accomplished through edification, the Biblical system for
understanding and applying the Word of God.

Confession of sin does not provide an emotional experience, not is it
accompanied by an emotional reaction. God’s forgiveness is based on His
promise to cleanse, not on how a person feels. And, confession does not
always remove the pain or suffering which is the result of the sin
itself or which came as a result of divine discipline. Although the
cursing is turned to blessing, the suffering may continue; but the
suffering may be endured to the glory of God instead.

Some Christians try to get on God’s good side through some means other
than the confession which is prescribed by God. Sometimes a person
thinks that a demonstration of sorrowfulness is called for, or that
weeping will impress God with one’s contrition. Others “compensate” for
their sin by increasing their religious activities.

Some will pray more often and longer and read their Bibles more. Some
will try to bribe God with additional tithes and offerings, or with acts
of self-denial, sacrifice, or service. Some will present themselves in
re-dedication services and attend church functions more often. But these
things cannot be substituted for confession of sin. God is interested
only in a person’s mental attitude toward the sin.

The word “confession” in the New Testament is taken from the Greek word
ὁμολογέω, meaning “to cite”, “to name”, “to classify in the same
manner”, “to agree with”, “to say the same thing as”. Confession
acknowledges God’s rulership in the matter and agrees with His judgment.
This is a method of dealing with the disharmony caused by sins which
causes no merit to accrue to the person who confesses.

Confession is strictly a Grace provision in which God makes a promise
and carries out the function of cleansing. The Christian must (1)
confess the sin, 1 John 1:9; (2) forget the sin, Phil. 3:13,14; and (3)
isolate the sin, Heb. 12:15.

 Upon the condition of confession,
forgiveness is guaranteed and cleansing from all unrighteousness is
administered (1 John 1:9). The word “cleanse” refers to the removal of
the guilt of the sin. Therefore, the cleansed individual is removed from
the condition of discipline, chastening is no longer being administered,
and the hindrances to the ministry of the Holy Spirit are removed.

There are several synonyms in the Bible for the word “confess”, as
follows":

* To “yield” means to confess. Rom. 6:13.

* “Putting off the old man”, is tantamount to confession. Eph. 5:14.

* Judging oneself is confession, or leads to it. 1 Cor. 11:31.

* Presenting one’s body is analogous to confession. Rom. 12:1.

repository: grace-notes/website

gha_language: CoffeeScript

repo_name: grace-notes/website


text:
# Simple Todo App

A Node app built with  LeanCloud and Angular. For personal purposes.

Node provides the RESTful API. Angular provides the frontend and accesses the API. LeanCloud provide the data storage .

## Requirements

- [Node and npm](http://nodejs.org)

## Installation

1. Clone the repository: `git clonegit @github.com:HeyDaniyar/SimpleTodo.git`
2. Install the application: `npm install`
3. Install the bower components in public folder: `bower install`
3. Start the server from the root: `node server.js`
4. View in browser at `http://localhost:8080`

## Tutorial Series

This to-do app is used for recording personal task item  which may finish in one day,
You can add tags or set level of each task to make you have a better overall for your daily job.
You may need to signup and login to your own todo list when you first time used,
the username and pwd is saved by Leancloud.

If you think the tiny app is cool for you to use or improve,
welcome!

Happy Todo-ing!

repository: HeyDaniyar/SimpleToDo

repo_name: HeyDaniyar/SimpleToDo


text:
Axinom DRM "Bearer" authorization license server proxy
======================================================

Implements the license request authorization protocol described in https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/300 and forwards license requests to the real Axinom DRM testing license server.

This is a temporary solution that can be used for R&D until the Axinom DRM license server itself supports the DASH-IF mechanism.

This software is deployed to https://axinom-drm-bearer-token-proxy.azurewebsites.net and may be used via the following URLs:

* https://axinom-drm-bearer-token-proxy.azurewebsites.net/PlayReady/AcquireLicense
* https://axinom-drm-bearer-token-proxy.azurewebsites.net/Widevine/AcquireLicense
* https://axinom-drm-bearer-token-proxy.azurewebsites.net/FairPlay/AcquireLicense


text:
## ATTENTION

python tests require prebuilded joque broker because they start/stop broker automatically

To build required broker goto __joque/go__ directory and run __go build -o joque.exe__. The name joque.exe is used on both Windows and Linux.

repository: sudachen/joque

repo_name: sudachen/joque


text:
# Roadside Payments Validation Package

## Description
An NPMJS package for centralised validation required by RSP. This package is built on Node.JS version 16.17.

This package is also available at: https://www.npmjs.com/package/@dvsa/rsp-validation

## Installation
If using Node.JS:

    npm i @dvsa/rsp-validation

## Instructions for running locally
### Set correct Node.JS version

    nvm use 16.17

### Install required dependencies

    npm i

### Build the the package

    npm run build

### Running unit tests

    npm test

## Publishing Package

Uses GitHub to package and release. GitHub will create a release job merge requests which bumps the version in the package.json based on the conventional commits. If there are breaking changes, make sure the commit specifies this.

Merging the release PR will trigger the release action which publishes a new version to NPM automatically. NPM token must be in GitHub with permission to publish to DVSA npm org.

repository: dvsa/rsp-validation-package

repo_name: dvsa/rsp-validation-package


text:
# Tao Tie (饕餮) - A curated collection of resources for astrophysical research

<img src="doc/taotie_logo.png" width="80%">

----

* “The taotie is a motif commonly found on Chinese ritual bronze vessels from the Shang and Zhou dynasty” - [Wikipedia](https://en.wikipedia.org/wiki/Taotie)

* Over the last few years, I have tried to collect useful resources for astrophysical research in several different ways.  Now, it seems a GitHub repo is the best solution. I will gradually transfer my notes and bookmarks here. This place is still heavily under construction. I will create a series of notes first, and I am thinking about what is the best way to organize them later.

* Please let me know if you have any suggestion or recommendation.

* **Under Construction**:
    - This repo is still under heavy and frequent development. I am currently working on this as a weekend project.
    - I am not 100% happy about the organization, so please forgive me if the structure is not perfect, I am working on it.

* **Website**: I am also thinking about making a document-style website out of this repo. Please stay tuned.

# Contents

## [Prepare yourself for scientific research](https://github.com/dr-guangtou/taotie/tree/master/research)

- [Start your life as a researcher in astronomy](https://github.com/dr-guangtou/taotie/blob/master/research/getting_started.md)
    * Research life 101
- [Getting a job inside or outside astronomy](https://github.com/dr-guangtou/taotie/blob/master/research/job_and_career.md)
- [Setup your computer for research](https://github.com/dr-guangtou/taotie/blob/master/research/computer_basics.md)
    * Shell, command line tool, and system related stuff.
- [On writing scientific papers](https://github.com/dr-guangtou/taotie/blob/master/research/writing_paper.md)
    * General advices, examples, and `LaTeX` related topics.
- [A little bit background in statistics](https://github.com/dr-guangtou/taotie/blob/master/research/stats_basic.md)
    * Courses and tutorials in statistics. Nowadays, you cannot get anywhere in astrophysics and cosmology without having enough knowledge of statistics.
- [A little bit background in data science](https://github.com/dr-guangtou/taotie/blob/master/research/data_science.md)
    * Data science related tutorial and cheatsheets.

## [Starting your journey as astronomer](https://github.com/dr-guangtou/taotie/tree/master/astro)

- [Good reference for all astronomers](https://github.com/dr-guangtou/taotie/blob/master/astro/astro_readme.md)
    * Reference and handbooks that will be handy in research.

- [Basic tools for astrophysical research](https://github.com/dr-guangtou/taotie/blob/master/astro/astro_research_basic.md)
    * Flux, extinction, coordinates, and planning your observations.  Whatever you need.

## [`Python` - the official language for astronomers...for now](https://github.com/dr-guangtou/taotie/tree/master/python)

- [Basic Python knowledges](https://github.com/dr-guangtou/taotie/blob/master/python/python_basic.md)

- [On writing your own Python package](https://github.com/dr-guangtou/taotie/blob/master/python/python_write_yourown_project.md)

- [On improving the performance of your Python code](https://github.com/dr-guangtou/taotie/blob/master/python/python_performance.md)

- [Data fitting, parameter optimization, model constraints...you know, astrophysics](https://github.com/dr-guangtou/taotie/blob/master/python/python_optimazaton.md)

- [Doing statistical analysis right in Python](https://github.com/dr-guangtou/taotie/blob/master/python/python_statistics.md)

- [Making pretty pictures and other visualizations in Python](https://github.com/dr-guangtou/taotie/blob/master/python/python_visualization.md)

## [Machine Learning, Deep Learning, and AI related](https://github.com/dr-guangtou/taotie/tree/master/mlearning)

* Since machine learning is becoming more and more important in astrophysics and cosmology, I am giving it an independent directory now.

- [Basics of machine learning](https://github.com/dr-guangtou/taotie/blob/master/mlearning/machine_learning_basic.md)
    * Online books, courses, handbooks...right now there are too many of them, so this might not be your best choice.

## [Resources for a Specific Topic in Astrophysics or Cosmology](https://github.com/dr-guangtou/taotie/tree/master/topics)

* There is no way this is even close to a complete list.  It only reflects the interests of the author.  Contributions are welcomed, and will try to organize it better.

- [Basic tools for cosmology research](https://github.com/dr-guangtou/taotie/blob/master/topics/cosmology_tools.md)
    * CMB, 2PCF, and dark matter halos. All the fancy words you need in cosmology.

- [List of important extragalactic surveys and data](https://github.com/dr-guangtou/taotie/blob/master/topics/extragalactic_projects_and_data.md)
    * This could be a really...really long list, and should be organized better.

- [Photometry of galaxies and stars](https://github.com/dr-guangtou/taotie/blob/master/topics/photometry.md)
    * The most fundamental and the most difficult task of astrophysical observations.

- [Stellar physics and stellar population synthesis](https://github.com/dr-guangtou/taotie/blob/master/topics/stellar_and_spops.md)
    * Isochrone, stellar libraries, and stellar population models.

- [Stars in the Milky Way](https://github.com/dr-guangtou/taotie/blob/master/topics/milky_way.md)
    * Galactic dynamic and chemical evolution. _Gaia_ and LAMOST.

- [What about ISM and Dust?](https://github.com/dr-guangtou/taotie/blob/master/topics/ism_and_dust.md)
    * And all the other inappropriate questions in astrophysics.

## [Readling List of Interesting Astrophysical Topics](https://github.com/dr-guangtou/taotie/tree/master/reference)

* Again, right now this is just a personal list of interesting topics.
* Now, it includes reading list on [galaxy cluster cosmology](https://github.com/dr-guangtou/taotie/blob/master/reference/cluster_cosmology.md), [halo splashback radius](https://github.com/dr-guangtou/taotie/blob/master/reference/halo_splashback_radius.md), [intrinsic alignment of galaxies](https://github.com/dr-guangtou/taotie/blob/master/reference/wl_intrinsic_alignment.md)

## [Key Astrophysical and Cosmological Projects](https://github.com/dr-guangtou/taotie/tree/master/projects)

* Provide key information about ambitious and complex on-going and future projects.
* **Under construction**. Including [JWST](https://github.com/dr-guangtou/taotie/blob/master/projects/jwst.md), [LSST](https://github.com/dr-guangtou/taotie/blob/master/projects/lsst.md)

Contribution
------------

Contribution from the community is highly welcomed! Please feel free to fork the repo and make you own change.  If you want your modifications be included in this repo, please submit a pull request (and make sure to describe the changes you made).

And if you notice anything wrong with the current content (wrong or unavailable link for example), please raise an issue.

Also, if your repo or project is included here and you are not comfortable with that, just let me know.

License
-------

Copyright 2019 Song Huang and contributors.

`taotie` is under the MIT License. For details see the LICENSE file.

repository: HappyAny/taotie

repo_name: HappyAny/taotie


text:
# Lifecycle of a physical machine

## About boot environment

Physical machines [network boot](network-booting.md) in an network boot environment with DHCP/TFTP/DNS services or with [poseidon/dnsmasq](../contrib/dnsmasq).

`matchbox` serves iPXE or GRUB configs via HTTP to machines based on Group selectors (e.g. UUID, MAC, region, etc.) and machine Profiles. Kernel and initrd images are fetched and booted with Ignition to install CoreOS Container Linux. The "first boot" Ignition config if fetched and Container Linux is installed.

Container Linux boots ("first boot" from disk) and runs Ignition to provision its disk with systemd units, files, keys, and more to become a cluster node. Systemd units may fetch metadata from a remote source if needed.

Coordinated auto-updates are enabled. Systems like [fleet](https://coreos.com/docs/#fleet) or [Kubernetes](http://kubernetes.io/docs/) coordinate container services. IPMI, vendor utilities, or first-boot are used to re-provision machines into new roles.

## Machine lifecycle

![Machine Lifecycle](img/machine-lifecycle.png)

repository: poseidon/matchbox

branch_name: refs/heads/main

gha_language: Go

repo_name: poseidon/matchbox


text:
---
title: Overview
page_title: Overview
description: Check our "Overview" documentation article for the RadTimeline {{ site.framework_name }} control.
slug: radtimeline-overview
tags: overview
published: True
position: 0
CTAControlName: RadTimeline
---

# {{ site.framework_name }} Timeline Overview

Thank you for choosing __RadTimeline__!

The RadTimeline control is used to visualize a sequence of events over a specified period of time. Its main purpose is to allow intuitive visualization of the events, lightweight scrolling and navigating through the period.

{% if site.has_cta_panels == true %}
{% include cta-panel-overview.html %}
{% endif %}

![{{ site.framework_name }} RadTimeline Overview](images/RadTimeLine_overview.jpg)

__RadTimeline's__ key features list:

* __Intervals__ - The developer can specify the possible time units for the timeline out of a predefined list of supported time units. The control chooses the best time unit from the collection according to the current zoom level.

* __Zoom__ - The user can zoom in and out in order to display a certain sub-period in greater detail or get a better overview of the whole period.

* __Two types of items__ - items with duration and instant items (events with no duration).

* __Item tooltip__ - The developer can specify a tooltip template for the event items, in order to display their details.

* __Customizeable templates__ - you can customize the appearance of the control through TimelineItemTemplate, TimelineInstantItemTemplate and ItemTemplateSelector.

repository: telerik/xaml-docs

gha_license_id: NOASSERTION

repo_name: telerik/xaml-docs


text:
**Advanced Lane Finding Project**

The goals / steps of this project are the following:

* Compute the camera calibration matrix and distortion coefficients given a set of chessboard images.
* Apply a distortion correction to raw images.
* Use color transforms, gradients, etc., to create a thresholded binary image.
* Apply a perspective transform to rectify binary image ("birds-eye view").
* Detect lane pixels and fit to find the lane boundary.
* Determine the curvature of the lane and vehicle position with respect to center.
* Warp the detected lane boundaries back onto the original image.
* Output visual display of the lane boundaries and numerical estimation of lane curvature and vehicle position.

[//]: # (Image References)

[image0]: ./camera_cal/calibration1.jpg "Distorted"
[image1]: ./output_images/undistorted.jpg "Undistorted Chessboard"
[image2]: ./output_images/undistorted_road.jpg "Undistorted Road"
[image3]: ./output_images/step1.jpg "Binary Example"
[image4]: ./output_images/step2.jpg "Warp Example"
[image5]: ./output_images/step3.jpg "Find Lane Lines"
[image6]: ./output_images/test5_out.jpg "Output"
[image7]: ./output_images/before_tf.jpg "Before Transform"
[image8]: ./output_images/after_tf.jpg "After Transform"
[video1]: ./output_video.mp4 "Video"

## [Rubric](https://review.udacity.com/#!/rubrics/571/view) Points

### Here I will consider the rubric points individually and describe how I addressed each point in my implementation.

---

### Writeup / README

#### 1. Provide a Writeup / README that includes all the rubric points and how you addressed each one.  You can submit your writeup as markdown or pdf.  [Here](https://github.com/udacity/CarND-Advanced-Lane-Lines/blob/master/writeup_template.md) is a template writeup for this project you can use as a guide and a starting point.

You're reading it!

### Camera Calibration

#### 1. Briefly state how you computed the camera matrix and distortion coefficients. Provide an example of a distortion corrected calibration image.

The code for this step is contained in `calibrate_camera()` between lines 31 and 65 in `p2_functions.py`.

I start by getting the file names for every calibration image I will use. Before I iterate through these images, I declare empty lists for my object points (the 3D coordinates of the chessboard corners on a flat plane), and image points (which will hold the actual detected 2D coordinates of the corners in the calibration image). These image and object points will be appended to their respective lists after the corners in the calibration image have been found, but not all calibration images have fully visible corners. Therefore the points are only appended if the chessboard corners are successfully found.

Once all calibration images have been inspected and their image and object points appended where appropriate, the use these points and the image shape to calibrate the camera. In `calibrate_camera.py`, I output the camera and distortion matrices so that I can hard-code them into my pipeline (line 369-372 of `p2_functions.py`)

The resulting matrices are as follows:

```python
mtx = np.array([[1.15777942e+03, 0.00000000e+00, 6.67111050e+02],
                [0.00000000e+00, 1.15282305e+03, 3.86129068e+02],
                [0.00000000e+00, 0.00000000e+00, 1.00000000e+00]])
dist = np.array([[-0.24688833, -0.02372817, -0.00109843,  0.00035105, -0.00259134]])
```
Before undistortion:
![alt text][image0]
After undistortion:
![alt text][image1]

### Pipeline (single images)

#### 1. Provide an example of a distortion-corrected image.

The undistortion, using the camera and distortion matrices mentioned above, looks like this when applied to an image of the road:
![alt text][image2]

#### 2. Describe how (and identify where in your code) you used color transforms, gradients or other methods to create a thresholded binary image.  Provide an example of a binary image result.

In the HLS colour space, I used a combination of thresholds from the L (light) and S (saturation) channels to produce my binary images. The steps for this are in the `thresholds()` function in `p2_functions.py`, lines 346-367. From the L channel I take the gradient in the x direction with the thresholds `(20, 100)`. From the S channel I apply colour selection with  thresholds `(170, 255)`.

![alt text][image3]

#### 3. Describe how (and identify where in your code) you performed a perspective transform and provide an example of a transformed image.

The code for my perspective transform was tested in the script `transform.py` before being copied over to lines 383-409 in `pipeline()` from `p2_functions.py`. I hand-picked my `src` and `dst` points for the tranformation by making sure the `src` points were equidistant from the middle of the undistorted image in the x-direction (midline at 640 px) and roughly approximated the lane lines in the images. The top points are +/- 47 px from the middle, while the bottom points are +/- 450 px from the middle. The `dst` points were selected to form a wide rectangle that maximised lane area and minimised interference from objects or boundaries outside of the lane This rectangle was centred in the frame.

This resulted in the following source and destination points:

| Source        | Destination   |
|:-------------:|:-------------:|
| 190, 720      | 260, 720      |
| 593, 450      | 260, 0        |
| 687, 450      | 1020, 0       |
| 1090, 720     | 1020, 720     |

I verified that my perspective transform was working as expected by drawing the `src` and `dst` points onto a test image and its warped counterpart to verify that the lines appear roughly parallel in the warped image.

Before transform:
![alt text][image7]
After transform:
![alt text][image8]

#### 4. Describe how (and identify where in your code) you identified lane-line pixels and fit their positions with a polynomial?

I used the sliding-window technique to identify lane pixels in the frames. By taking a histogram of the bottom half of the transofmed binary and identifying the maximums in the right and left sections, I designated the starting positions for the windows. The number of windows from top to bottom is 9, the margin (width) for each window is 100 px to each side, and the minimum number of pixels required to recentre the window is 50. Once the lane pixels have been detected, they are fit with a second-order polynomial to approximate the lane boundaries.

The result looks like this:

![alt text][image5]

The code for this is found in `find_lane_pixels()` and `fit_polynomial()` in `p2_functions.py` (lines 124-240).

#### 5. Describe how (and identify where in your code) you calculated the radius of curvature of the lane and the position of the vehicle with respect to center.

Using the knowledge that lanes are 3.7 metres wide and dashed lanes are 3 metres long, I manually measure these lengths from my perspective-transformed image. Since a dashed lane is 80 px long in the y-direction, I use:

```python
ym_per_pix = 3/80.0
```
And since the width of the lane is about 736 px (measured from the inside edge of each lane), I use:

```python
xm_per_pix = 3.7/736
```

I then make my calculates in `measure_curvature()` and `measure_position()` in `p2_functions.py` (lines 311-348).

NOTE: A negative distance from the centre of the lane indicates that the vehicle is left-of-centre, while a positive distance indicates that the vehicle is right-of-centre

#### 6. Provide an example image of your result plotted back down onto the road such that the lane area is identified clearly.

I reverse the perspective transform and overlay the annotations on the undistorted image in lines 421 and 424 of `p2_functions.py` (in the `pipeline()` function).

Here is an example of my result on a test image:

![alt text][image6]

---

### Pipeline (video)

#### 1. Provide a link to your final video output.  Your pipeline should perform reasonably well on the entire project video (wobbly lines are ok but no catastrophic failures that would cause the car to drive off the road!).

Here's a [link to my video result](./output_video.mp4)

---

### Discussion

#### 1. Briefly discuss any problems / issues you faced in your implementation of this project.  Where will your pipeline likely fail?  What could you do to make it more robust?

My pipeline can fail if lines parallel to the lane lines are detected after the perspective transform, causing the window searching to start int the wrong place. The can be fixed with smoothing and a sanity check, where previous values are used if the current ones seem dubious. This could also be remedied through further tweaking of the thresholding parameters, eliminating such errors as mistaking a shadow for a lane line.

There is also some jitter at certain places in the video. The could also be fixed with smoothing and sanity checks.


text:
# Assembly

## Instructions

### Int32

#### Constants

- `const [n:int]`: push `n`

#### Stack Operations
- `dup`: duplicate
- `get [n:int]`: get the `n`th element
  - if `n` is non-negative, count from the bottom of the stack
  - if `n` is negative, count from the top of the stack
- `set [n:int]`: set the `n`th element
  - if n is non-negative, count from the bottom of the stack
  - if n is negative, count from the top of the stack
- `drop`

#### Bitwise Operations

- `not`: bitwise not
- `and`: bitwise and
- `or`: bitwise or
- `xor`: bitwise xor
- `shl`: shift left
- `shr_u`: shift right (unsigned)
- `shr_s`: shift left (signed)

#### Arithmetic Operations

- `add`: add
- `sub`: subtract
- `mul10`: multiply 10, but faster than `mul`
- `mul`: multiply

#### Comparison Operations

- `eqz`: equal to 0
- `nez`: not equal to 0
- `eq`: equal to
- `lt_s`: less than (signed)
- `le_s`: less than or equal to (signed)
- `lt_u`: less than (unsigned)
- `le_u`: less than or equal to (unsigned)
- `gt_s`: greater than (signed)
- `ge_s`: greater than or equal to (signed)
- `gt_u`: greater than (unsigned)
- `ge_u`: greater than or equal to (unsigned)

#### Input/Output Operations

- `scan`
- `print`

#### Control Instructions

- `jump [l:label]`: jump to `l`
- `jz [l:label]`: jump if zero
- `jnz [l:label]`: jump if not zero
- `jeq [l:label]`: jump if equal

branch_name: refs/heads/develop

gha_language: Haskell


text:
Share-A-Secret API service
==========================

This project contains secret sharing REST API, as well as simple HTML5 frontend application, to be used with the API.

Hosted version of the service is available at [http://sas.toolbox.rs](http://sas.toolbox.rs).

repository: zmarko/share-a-secret-api

repo_name: zmarko/share-a-secret-api


text:
---
title: Styling the RadWindow
page_title: Styling the RadWindow
description: Check our "Styling the RadWindow" documentation article for the RadWindow {{ site.framework_name }} control.
slug: radwindow-styles-and-templates-styling-the-radwindow
tags: styling,the,radwindow
published: True
position: 2
---

# Styling the RadWindow

>tipBefore reading this topic, you might find it useful to get familiar with the [Template Structure of the RadWindow control]({%slug radwindow-styles-and-templates-template-structure%}).

The __RadWindow__ can be styled by creating an appropriate __Style__ and setting it to the __Style__ property of the control.

You have two options:

* To create an empty style and set it up on your own.

* To copy the default style of the control and modify it.

This topic will show you how to perform the second one.

## Modifying the Default Style

To copy the default style, load your project in Expression Blend and open the User Control that holds the __RadWindow__. From the 'Assets' pane select the RadWindow control and draw a dummy instance on the art board. In the 'Objects and Timeline' pane select the dummy __RadWindow__ and from the menu choose *Object -> Edit Style -> Edit a Copy*. You will be prompted for the name of the style and where to be placed.

>tipIf you choose to define the style in Application, it would be available for the entire application. This allows you to define a style only once and then reuse it where needed.

After clicking 'OK', Expression Blend will generate the default style of the __RadWindow__ control in the __Resources__ section of your User Control. The properties available for the style will be loaded in the 'Properties' pane and you will be able to modify their default values. You can also edit the generated XAML in the XAML View or in Visual Studio.

If you go to the 'Resources' pane, you will see an editable list of resources generated together with the style and used by it. In this list you will find the brushes, styles and templates needed to change the visual appearance of the __RadWindow__. Their names indicate to which part of the __RadWindow__ appearance they are assigned.

![](images/RadWindow_Styles_and_Templates_Styling_the_RadWindow_01.png)

* __WindowBackground__ - a brush that represents the background of the __RadWindow's__ content.

* __WindowOuterBorder__ - a brush that represents the outer border color of the __RadWindow__.

* __WindowBorderBackground__ - a brush that represents the border color of the __RadWindow__.

* __WindowModalBackground__ - a brush that represents the modal background behind the __RadWindow__.

* __WindowInnerBorder__ - a brush that represents the inner border color of the __RadWindow__.

* __WindowHeaderBackground__ - a brush that represents the background color of the __RadWindow's__ header.

* __WindowResizeThumbStyle__ - the style applied to the resize __Thumbs__.

* __WindowButtonPadding__ - the padding applied to the content in the __RadWindow's__ buttons.

* __WindowButtonMargin__ - the margin applied to the content in the __RadWindow's__ buttons.

* __WindowButtonStyle__ - the Style applied to the __RadWindow's__ buttons.

* __WindowButtonIconFill__ - a brush that represents, the fill of the icons in the __RadWindow's__ buttons.

* __WindowButtonIconStroke__ - a brush that represents the stroke around the icons in the __RadWindow's__ buttons.

* __RadWindowTemplate__ - the __ControlTemplate__ of the __RadWindow__.

* __RadWindowStyle__ - the default __Style__ applied to the __RadWindow__.

>tipChanging the value of the resources can be done by clicking on the color indicator or the icon next to them.

Modify the resource to bring the desired appearance of the __RadWindow__.

![](images/RadWindow_Styles_and_Templates_Styling_the_RadWindow_02.png)

Finally remove the __dummy__ instance of the __RadWindow__ form the XAML and set the __Style__ to the desired __RadWindow__ instance.

#### __C#__

{{region cs-radwindow-styles-and-templates-styling-the-radwindow_0}}
	RadWindow radWindow = new RadWindow();
	radWindow.Style = this.Resources["RadWindowStyle"] as Style;
{{endregion}}

#### __VB.NET__

{{region vb-radwindow-styles-and-templates-styling-the-radwindow_1}}
	Dim radWindow As New RadWindow()
	radWindow.Style = TryCast(Me.Resources("RadWindowStyle"), Style)
{{endregion}}

Here is a snapshot of the result.

![](images/RadWindow_Styles_and_Templates_Styling_the_RadWindow_03.png)

## See Also

 * [Template Structure]({%slug radwindow-styles-and-templates-template-structure%})

 * [Styling the Predefined Windows]({%slug radwindow-styles-and-templates-styling-the-predefined-windows%})

 * [Visual Structure]({%slug radwindow-visual-structure%})

repository: kylemurdoch/xaml-docs

repo_name: kylemurdoch/xaml-docs


text:
# API endpoints using Azure Functions

- [API endpoints using Azure Functions](#api-endpoints-using-azure-functions)
    - [RideShare APIs](#rideshare-apis)
    - [Durable Orchestrators](#durable-orchestrators)
  - [Next steps](#next-steps)

### RideShare APIs

The sample contains front-end APIs that are used to manage Drivers, Passengers and Trips:

- They are built on Azure Functions using RESTful design principles.
- They use an [Azure Cosmos DB](https://docs.microsoft.com/en-us/azure/cosmos-db/introduction) collection to store their respective data. **Please note**, however, that, due to cost constraints, the sample APIs share the same Cosmos DB collection.
- They use [Application Insights](https://docs.microsoft.com/en-us/azure/application-insights/app-insights-overview) to send traces, metrics and telemetry to.

As the macro architecture depicts, the APIs are implemented using C# Azure Functions. They have a simple architecture that can be illustrated as follows:

![APIs Architecture](media/function-apis-architecture.png)

Please note the following:

- The `Persistence Layer` implements the `IPersistenceService` interface. In the reference solution implementation, there are two implementations: `CosmosPersistenceLayer` and `SqlPersistenceService`. Only the `CosmosPersistenceLayer` is fully implemented in the reference implementation:

```csharp
public interface IPersistenceService
{
    // Drivers
    Task<DriverItem> RetrieveDriver(string code);
    Task<List<DriverItem>> RetrieveDrivers(int max = Constants.MAX_RETRIEVE_DOCS);
    Task<List<DriverItem>> RetrieveDrivers(double latitude, double longitude, double miles, int max = Constants.MAX_RETRIEVE_DOCS);
    Task<List<DriverItem>> RetrieveActiveDrivers(int max = Constants.MAX_RETRIEVE_DOCS);
    Task<int> RetrieveDriversCount();
    Task<DriverItem> UpsertDriver(DriverItem driver, bool isIgnoreChangeFeed = false);
    Task<string> UpsertDriverLocation(DriverLocationItem driver, bool isIgnoreChangeFeed = false);
    Task<List<DriverLocationItem>> RetrieveDriverLocations(string code, int max = Constants.MAX_RETRIEVE_DOCS);
    Task DeleteDriver(string code);

    // Trips
    Task<TripItem> RetrieveTrip(string code);
    Task<List<TripItem>> RetrieveTrips(int max = Constants.MAX_RETRIEVE_DOCS);
    Task<List<TripItem>> RetrieveTrips(double latitude, double longitude, double miles, int max = Constants.MAX_RETRIEVE_DOCS);
    Task<List<TripItem>> RetrieveActiveTrips(int max = Constants.MAX_RETRIEVE_DOCS);
    Task<int> RetrieveTripsCount();
    Task<int> RetrieveActiveTripsCount();
    Task<TripItem> UpsertTrip(TripItem trip, bool isIgnoreChangeFeed = false);
    Task DeleteTrip(string code);

    // High-level methods
    Task<TripItem> AssignTripAvailableDrivers(TripItem trip, List<DriverItem> drivers);
    Task<TripItem> AssignTripDriver(TripItem trip, string driverCode);
    Task RecycleTripDriver(TripItem trip);
    Task<TripItem> CheckTripCompletion(TripItem trip);
    Task<TripItem> AbortTrip(TripItem trip);
}
```

- To make things testable, the Functions are only a wrapper around the PersistenceLayer. Here is an example:

```csharp
[FunctionName("GetTrips")]
public static async Task<IActionResult> GetTrips([HttpTrigger(AuthorizationLevel.Function, "get", Route = "trips")] HttpRequest req,
    ILogger log)
{
    log.LogInformation("GetTrips triggered....");

    try
    {
        var persistenceService = ServiceFactory.GetPersistenceService();
        return (ActionResult)new OkObjectResult(await persistenceService.RetrieveTrips());
    }
    catch (Exception e)
    {
        var error = $"GetTrips failed: {e.Message}";
        log.LogError(error);
        return new BadRequestObjectResult(error);
    }
}
```

- The `PersistenceService` accepts an `IChangeNotifierService` as one of its dependencies. The purpose of this service is to handle entity changes:

```csharp
public interface IChangeNotifierService
{
    Task DriverChanged(DriverItem driver);
    Task TripCreated(TripItem trip, int activeTrips);
    Task TripDeleted(TripItem trip);
    Task PassengerChanged(PassengerItem trip);
}
```

When a trip is added, for example, the change notifier service implementation triggers the `TripManagerOrchestrator` so it creates and assigns a new instance to manage the newly created trip.

In addition, depending on whether the newly created trip is `normal` or `demo` mode, the change notifier service might trigger the `TripDemoOrchestrator` so it creates and assigns a new instance to mimic a demo/robot behavior such as accepting a driver, stepping through a driver route until the final destination is reached. More explanation about this in the [Durable Orchestrators](#durable-orchestrators) section:

```csharp
public async Task TripCreated(TripItem trip, int activeTrips)
{
    var error = "";

    try
    {
        // Start a trip manager
        var baseUrl = _settingService.GetStartTripManagerOrchestratorBaseUrl();
        var key = _settingService.GetStartTripManagerOrchestratorApiKey();
        if (string.IsNullOrEmpty(baseUrl) || string.IsNullOrEmpty(key))
            throw new Exception("Trip manager orchestrator base URL and key must be both provided");

        // Trigger the trip manager orchestrator
        // ...omitted for brevity

        if (trip.Type == TripTypes.Demo)
        {
            // Trigger the trip demo orchestrator
            // ...omitted for brevity
        }
    }
    catch (Exception ex)
    {
        error = $"Error while starting the trip manager: {ex.Message}";
        throw new Exception(error);
    }
    finally
    {
        _loggerService.Log($"{LOG_TAG} - TripCreated - Error: {error}");
    }
}
```

### Durable Orchestrators

Durable Orchestrators are the heart of the solution. They are made up of 3 orchestrators:

- Trip Manager
- Trip Monitor
- Trip Demo (optional)

In the RideShare solution, orchestrators are like Serverless [Actors](https://en.wikipedia.org/wiki/Actor_model). They are stateful instances running in the Azure Functions container and made persistent to a storage account automatically. Read more about [Azure Functions Durable Functions](https://docs.microsoft.com/azure/azure-functions/durable-functions-overview).

Each orchestrator has 3 sections:

- **HTTP Trigger Endpoints** - used to start, terminate and retrieve state of a particular orchestrator instance.
- **Orchestrator Function** - used to provide the orchestrator main body of execution and state management.
- **Activity Functions** - one or more activity functions that the orchestrator calls upon to run the different activities that make up the execution.

To make functions easily identifiable, the reference implementation follows a naming convention where the Trigger Functions start with a `T_` i.e. `T_StartTripManager`, the Orchestrator Functions start with an `O_` i.e. `O_ManageTrip` and the Activity Functions start with an `A_` and a 2-digit identifier i.e. `A_TM_AssignTripDriver`. The `_TM_` denotes Trip Manager, for example.

Orchestrator instances require application-level unique instance IDs. In the reference implementation, the Trip code is used as an instance ID for the Trip Manager. The Trip Monitor uses the trip code and appends `-M` to make it unique while the Trip Demo uses the trip code and appends `-D` to make it unique.

As the macro architecture depicts, the orchestrators are implemented in C#. The following illustrates their overall architecture:

![Orchestrators Architecture](media/orchestrators-architecture.png)

The following describes the process that newly created trips go through:

- The `ChangeNotifierService` triggers the Trip Manager Orchestrator to start a new Trip Manager instance.
- The new instance retrieves the available drivers (available & within x miles from trip's source location) and notifies them of a new trip
- The instance then waits for either an external event to arrive (driver accepts the trip) or time out to occur.
- If time out occurs, the instance aborts the trip and exits
- If a driver accepts the trip, the instance assigns the driver to the trip and enqueues the trip code to a storage queue
- The storage queue will trigger the Trip Monitor Orchestrator to start a new Trip Monitor instance.
- The new monitor instance starts the trip and waits for a configurable seconds
- The instance checks for a completion and re-waits until either the trip completes or the the configured number of iterations gets exhausted
- If the number of iterations is exhausted, the instance will abort the trip
- If the trip is in demo mode, the `ChangeNotifierService` triggers both the Trip Manager Orchestrator and the Trip Demo Orchestrator to start new instances

![Orchestrators Architecture (demo)](media/orchestrators-double-architecture.png)

- The `Trip Demo` instance acts like a bot to simulate accepting a driver and navigating through the locations of a random route

![Orchestrators Demo Architecture](media/orchestrators-demo-architecture.png)

**Please note** that, in the the reference implementation:

- The trip is considered `complete` if the trip's driver location matches the trip's destination location. While this is not realistic, it does provide a method to determine when the trip is complete. In reality though, there has to be a more reliable way of determining completion.
- The orchestrators currently use the persistence layer (described above) instead of calling the APIs to retrieve and persist trips. There is a setting in the `ISettingService` that controls this behavior i.e. `IsPersistDirectly`. More about this in the [source code](source-code-structure.md) document.
- The route locations that the `Demo` uses to step through the trip's source and destination locations is not really. It is basically the random number of locations made up from the trip's source location and destination location. In real scenarios, [Bing Route API](https://msdn.microsoft.com/library/ff701717.aspx?f=255&MSPPError=-2147217396) can be used to determine the actual route between the source and destination.

The Azure Durable Functions are quite powerful as they provide a way to instantiate thousands of managed stateful instances in a serverless environment. This capability exists in other Azure products such as [Service Fabric](https://azure.microsoft.com/services/service-fabric/)'s stateful actors. The difference is that the Azure Durable Functions require a lot less effort to setup, maintain and code.

Although Azure Durable Functions can [query and enumerate all instances](https://docs.microsoft.com/azure/azure-functions/durable-functions-instance-management) of a specific orchestrator:

```csharp
IList<DurableOrchestrationStatus> instances = await context.GetStatusAsync(); // You can pass CancellationToken as a parameter.
foreach (var instance in instances)
{
    log.Info(JsonConvert.SerializeObject(instance));
};
```

It is still probably a good idea to store the instance ids and their status in a table storage for example in case a solution requires special querying capability against the instances.

## Next steps

Create your Azure Function Apps, then perform the steps to configure and deploy your functions:

- [Create the Azure Function Apps](setup.md#create-the-azure-function-apps)
- [Function App Application Settings](setup.md#function-app-application-settings)
  - [Drivers Function App](setup.md#drivers-function-app)
  - [Passengers Function App](setup.md#passengers-function-app)
  - [Orchestrators Function App](setup.md#orchestrators-function-app)
  - [Trips Function App](setup.md#trips-function-app)
  - [Trip Archiver Function App](setup.md#trip-archiver-function-app)
- [Build the solution](setup.md#build-the-solution)

Read about how the Relecloud Rideshare architecture uses Event Grid for services intercommunication:

- [Services intercommunication using Event Grid](services-intercommunication.md)
  - [Logic App handler](services-intercommunication.md#logic-app-handler)
  - [SignalR handler](services-intercommunication.md#signalr-handler)
    - [DOTNET SignalR client](services-intercommunication.md#dotnet-signalr-client)
    - [JavaScript SignalR client](services-intercommunication.md#javascript-signalr-client)
  - [Power BI handler](services-intercommunication.md#power-bi-handler)
  - [Trip Archiver handler](services-intercommunication.md#trip-archiver-handler)

gha_language: C#


text:
# DSA_RUST
Data Structures and Algorithms implemented in rust

Note:
1. To prevent code duplication, macros have been used heavily.
2. I have tried to implement the data structures without using in built helper methods, due to which u might encounter unsafe code.

# License

[Mit License](LICENSE)


text:
---
name: Question
about: Ask a general question about the mod, project, or organisation
title: ''
labels: question
assignees: ''

---

### Please make sure you can reproduce any issues _without_ Optifine installed before reporting them here

### Please also look through the [existing issues](https://github.com/TerraForged/TerraForged/issues) to see if your problem has already been reported :)

repository: AboutOmen/TerraForged

repo_name: AboutOmen/TerraForged