text:
# The Police

#### nsaspook

Joined Aug 27, 2009
7,469
Most of us understand there are a few bad apples in their ranks but these guys and gals put their lives on the line everyday. One of our local officers was shot last night in a neighboring city on a gang detail near a pretty bad area known for crime and drugs. Hope the officer recovers fully and quickly.

#### Papabravo

Joined Feb 24, 2006
14,214
I hope he survives as well. Nobody deserves to be ambushed. We grant them extraordinary powers and we trust them to use those powers wisely. When that trust is betrayed, the consequences are devastating to individuals and the community.

#### nsaspook

Joined Aug 27, 2009
7,469
As expected this is big news here as we know all the local officers. One hell of a gun battle for an accident is why officers keep one hand near their gun on a traffic stop.

#### JoeJester

Joined Apr 26, 2005
4,310
I hope the officer is doing well.

My son (a Sargent) said it was a wierd night in his area.

#### JoeJester

Joined Apr 26, 2005
4,310
There's a lot of dope being transported up here by some hard-core people who don't care about making a street into a shooting gallery.
I don't doubt that for a moment.

#### cmartinez

Joined Jan 17, 2007
7,060
And to think that down here, three ex-cops were caught in a stolen car after a fierce gunfight yesterday night... it's never a surprise down here finding ex-cops among the criminals ...
On the bright side, kudos to the good cops that caught those rotten pieces of you-know-what...

#### mcgyvr

Joined Oct 15, 2009
5,394
And to think that down here, three ex-cops were caught in a stolen car after a fierce gunfight yesterday night... it's never a surprise down here finding ex-cops among the criminals ...
On the bright side, kudos to the good cops that caught those rotten pieces of you-know-what...
Mexican cops are all corrupt I thought..
2 guys from my work were down there for a sales call with our customers last year and were pulled over for apparently speeding..
Seeing 2 guys in nice suits the cop said they they could give him $1000 dollars and he would let them go.. The guy from my work opened his wallet and said that he only had$10 dollars in his wallet..
The cop said.. "Ok that will work" and took it and drove away.

Luckily the guy from my work travels quite often and kept all his money stuffed in his sock with only a $10 bill in the wallet. #### cmartinez Joined Jan 17, 2007 7,060 Mexican cops are all corrupt I thought.. 2 guys from my work were down there for a sales call with our customers last year and were pulled over for apparently speeding.. Seeing 2 guys in nice suits the cop said they they could give him$1000 dollars and he would let them go..
The guy from my work opened his wallet and said that he only had $10 dollars in his wallet.. The cop said.. "Ok that will work" and took it and drove away. Luckily the guy from my work travels quite often and kept all his money stuffed in his sock with only a$10 bill in the wallet.
Not all of them ... otherwise we wouldn't have a functional country down here (though, I have to admit, Mexico is more dysfunctional than the other way around). It all depends heavily on what part of the city/country you're in.
If you ask me, I'd say that about 20% of our cops are corrupt, but that 20% is a very loud minority.... In the 1930's Chicago, for instance, it is said that Al Capone controlled about 30% of the police force.. no wonder why Mr Ness had a huge task to tackle when he went after Capone


text:
# M(32,51,11)

M(32,51,11) - $k(((C_2)^4 : C_{15}) \times C_2)$
[[File: |250px]]
Representative: $k(((C_2)^4 : C_{15}) \times C_2)$ $(C_2)^5$ $C_{15}$, ? 32 15 1 See below. Yes Yes Yes $\mathcal{O} (((C_2)^4 : C_{15}) \times C_2)$ See below. 1 No Yes M(32,51,12) Yes

A block with defect group $(C_2)^5$ and inertial quotient $C_{15}$ is in this Morita equivalence class or in M(32,51,12), which is derived equivalent to this class.

It is unknown whether this Morita equivalence class contains blocks with inertial quotient $C_7:C_3 \times C_3$ (with action as in M(32,51,24)).

## Covering blocks and covered blocks

Let $N \triangleleft G$ with prime $p'$-index and let $B$ be a block of $\mathcal{O} G$ covering a block $b$ of $\mathcal{O} N$.

If $b$ is in M(32,51,11), then $B$ is in M(32,51,2), M(32,51,5), or M(32,51,11).

## Projective indecomposable modules

Labelling the simple $B$-modules by $S_1, \dots, S_{15}$, the projective indecomposable modules have Loewy structure as follows:

$\begin{array}{ccccc} \begin{array}{c} S_1 \\ S_1 S_{10} S_{11} S_9 S_4 \\ S_{11} S_9 S_4 S_{10} S_{12} S_3 S_{14} S_{15} S_2 S_{13} \\ S_3 S_{12} S_{14} S_2 S_{15} S_{13} S_5 S_6 S_8 S_7 \\ S_6 S_5 S_7 S_8 S_1 \\ S_1 \\ \end{array} & \begin{array}{c} S_2 \\ S_{12} S_{14} S_5 S_7 S_2 \\ S_{10} S_7 S_{14} S_6 S_8 S_4 S_1 S_5 S_{12} S_{15} \\ S_{15} S_6 S_1 S_8 S_4 S_{10} S_3 S_9 S_{13} S_{11} \\ S_9 S_{13} S_3 S_{11} S_2 \\ S_2 \\ \end{array} & \begin{array}{c} S_3 \\ S_3 S_7 S_2 S_6 S_{11} \\ S_{12} S_7 S_{11} S_5 S_2 S_4 S_6 S_1 S_{14} S_{13} \\ S_{14} S_4 S_1 S_5 S_{12} S_{13} S_{15} S_9 S_8 S_{10} \\ S_9 S_8 S_{10} S_{15} S_3 \\ S_3 \\ \end{array} & \begin{array}{c} S_4 \\ S_{13} S_9 S_{14} S_{15} S_4 \\ S_{14} S_2 S_8 S_6 S_3 S_{10} S_{15} S_5 S_9 S_{13} \\ S_8 S_{10} S_1 S_5 S_2 S_7 S_3 S_6 S_{12} S_{11} \\ S_7 S_1 S_{12} S_{11} S_4 \\ S_4 \\ \end{array} & \begin{array}{c} S_5 \\ S_1 S_{10} S_{12} S_5 S_8 \\ S_4 S_7 S_1 S_{10} S_8 S_9 S_3 S_{15} S_{12} S_{11} \\ S_{14} S_{11} S_{13} S_2 S_4 S_7 S_{15} S_3 S_9 S_6 \\ S_{13} S_{14} S_6 S_5 S_2 \\ S_5 \\ \end{array} \end{array}$

$\begin{array}{ccccc} \begin{array}{c} S_6 \\ S_1 S_5 S_{11} S_6 S_{13} \\ S_{12} S_{11} S_{10} S_1 S_5 S_2 S_8 S_9 S_4 S_{13} \\ S_9 S_3 S_{10} S_{14} S_{15} S_8 S_7 S_2 S_4 S_{12} \\ S_7 S_{14} S_{15} S_3 S_6 \\ S_6 \\ \end{array} & \begin{array}{c} S_7 \\ S_4 S_6 S_{14} S_1 S_7 \\ S_5 S_9 S_{13} S_{14} S_4 S_6 S_{11} S_{15} S_1 S_{10} \\ S_3 S_{13} S_8 S_2 S_9 S_{12} S_{15} S_5 S_{11} S_{10} \\ S_{12} S_2 S_7 S_3 S_8 \\ S_7 \\ \end{array} & \begin{array}{c} S_8 \\ S_8 S_1 S_3 S_7 S_9 \\ S_9 S_{14} S_1 S_4 S_{10} S_6 S_2 S_{11} S_7 S_3 \\ S_{14} S_{15} S_6 S_2 S_4 S_{11} S_{10} S_{13} S_{12} S_5 \\ S_{15} S_5 S_{13} S_8 S_{12} \\ S_8 \\ \end{array} & \begin{array}{c} S_9 \\ S_3 S_{14} S_{10} S_2 S_9 \\ S_{10} S_{15} S_2 S_7 S_6 S_{14} S_{12} S_{11} S_5 S_3 \\ S_4 S_6 S_5 S_{12} S_{13} S_{11} S_7 S_1 S_{15} S_8 \\ S_1 S_{13} S_8 S_4 S_9 \\ S_9 \\ \end{array} & \begin{array}{c} S_{10} \\ S_{15} S_{12} S_3 S_{10} S_{11} \\ S_4 S_2 S_{13} S_8 S_7 S_6 S_3 S_{15} S_{11} S_{12} \\ S_9 S_5 S_7 S_{14} S_6 S_{13} S_2 S_8 S_4 S_1 \\ S_{14} S_5 S_9 S_1 S_{10} \\ S_{10} \\ \end{array} \end{array}$

$\begin{array}{ccccc} \begin{array}{c} S_{11} \\ S_{13} S_{11} S_2 S_{12} S_4 \\ S_8 S_4 S_9 S_7 S_{12} S_{15} S_2 S_{13} S_{14} S_5 \\ S_1 S_{14} S_8 S_3 S_5 S_9 S_6 S_{15} S_{10} S_7 \\ S_1 S_{10} S_6 S_3 S_{11} \\ S_{11} \\ \end{array} & \begin{array}{c} S_{12} \\ S_{15} S_4 S_{12} S_7 S_8 \\ S_6 S_3 S_4 S_9 S_1 S_7 S_{14} S_{13} S_{15} S_8 \\ S_2 S_{13} S_3 S_1 S_9 S_6 S_{10} S_{11} S_{14} S_5 \\ S_{11} S_5 S_2 S_{10} S_{12} \\ S_{12} \\ \end{array} & \begin{array}{c} S_{13} \\ S_8 S_5 S_{13} S_9 S_2 \\ S_3 S_{12} S_7 S_1 S_5 S_{10} S_9 S_8 S_2 S_{14} \\ S_{12} S_7 S_3 S_{10} S_{14} S_1 S_{11} S_{15} S_6 S_4 \\ S_{11} S_4 S_{15} S_6 S_{13} \\ S_{13} \\ \end{array} & \begin{array}{c} S_{14} \\ S_6 S_{10} S_{14} S_{15} S_5 \\ S_{15} S_5 S_3 S_{12} S_{13} S_{11} S_1 S_{10} S_8 S_6 \\ S_2 S_{12} S_8 S_{13} S_3 S_1 S_{11} S_4 S_9 S_7 \\ S_7 S_4 S_9 S_2 S_{14} \\ S_{14} \\ \end{array} & \begin{array}{c} S_{15} \\ S_{15} S_6 S_8 S_{13} S_3 \\ S_2 S_8 S_{13} S_3 S_5 S_1 S_6 S_9 S_{11} S_7 \\ S_2 S_{11} S_7 S_5 S_1 S_9 S_{10} S_4 S_{12} S_{14} \\ S_{14} S_{12} S_{10} S_4 S_{15} \\ S_{15} \\ \end{array} \end{array}$

## Irreducible characters

All irreducible characters have height zero.

## Cartan matrix

$\left( \begin{array}{ccc} 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 & 2 \\ 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 4 \end{array} \right)$

## Decomposition matrix

$\left( \begin{array}{ccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \end{array}\right)$

format: plain


text:
# Homework Help: Totally Bounded Subset

1. May 14, 2012

### Eulogy

1. The problem statement, all variables and given/known data
Let G = { f $\in$ C[0,1] : $^{0}_{1}$$\int$|f(x)|dx $\leq$ 1 }
Endowed with the metric d(f,h) = $^{0}_{1}$$\int$|f(x)-h(x)|dx. Is G totally bounded? Prove or provide counterexample

2. Relevant Theorems

Arzela-Ascoli Theorem, Theorems relating to compactness, equicontinuity etc and

Let M be a compact metric space. A subset of
C(M) is totally bounded iff it is bounded and equicontinuous. (in terms of the sup metric)

3. The attempt at a solution
I'm not to sure whether G is totally bounded or not to begin with. If I was working in the sup metric the subset is not totally bounded as I can find a family of functions which are not equicontinuous in G. However I'm not sure how or if this translates to the integral metric defined above. Any help would be much appreciated!

2. May 14, 2012

### Dick

Try to find a sequence of functions $f_i(x)$ such that $d(f_i,f_j)=1$ for all $i \ne j$. Step functions will do. What would that tell you about total boundedness?

3. May 14, 2012

### Eulogy

Such a sequence could not be totally bounded since if I took a finite cover of the space with balls radius say half then each function in the sequence must be in a separate ball and as the sequence is infinite this leads to a contradiction. But I can't think of a sequence functions that are continuous on [0,1] with this property?

4. May 14, 2012

### Dick

Can you think of a way to define f1 so that it's integral is 1/2, but it is only nonzero on [1/2,1]. Same thing for f2 but it is only nonzero on [1/4,1/2], put f3 on [1/8,1/4] etc.

Last edited: May 14, 2012
5. May 14, 2012

### Eulogy

Yeah just figured it out thanks for your help!


text:
## Sunday, March 20, 2016

### Finding The Solution In A Simple SFC Model

Stock-Flow Consistent models are the mathematical workhorse of much of modern post-Keynesian thought (including Modern Monetary Theory). These models are fairly easy to work with, but there are a lot of details in how the model solution is determined. In this article, I discuss the solution for the simplest model with government money in the textbook Monetary Economics by Godley and Lavoie -- model SIM -- although I have simplified things even further (model SIMplest?).

The model I discuss is taken from Chapter 3 of Monetary Economics. Although the explanation by Godley and Lavoie is the best discussion of mathematical economic models I have seen, it is still not completely obvious to a non-economist. For example, their "simple" model SIM has 11 variables to be determined, and the exact solution method was not obvious to first inspection. Some of this complexity is necessary -- even model SIM tracks the interactions of three sectors of the economy.

It took me time to get used to their style of working with the 11 variables in 11 equations; in control systems, all of these variables would be collapsed into vectors.However, it is advantageous as their exposition is similar to the rest of the academic economic literature.

It appears that academic economists like developing their models in the same way that circuit theory was taught when I took introductory electrical engineering courses in the early 1990s: you write down lots of equations, and then solve them via algebraic manipulations.  (Given the inertia in undergraduate courses, I imagine that the same is still true.) Meanwhile, in the real world, electrical engineers simulate circuits by drawing them computer-aided design packages, and the circuit equations are solved via systematic use of matrix algebra.

Within this article, I am simplifying the discussion by only looking at how the solution is determined within the first period. The process I discuss would have to be repeated in later steps, but this would make things more complex. (I assume that the household sector starts with no money; that is no longer true after the first period.) Even this one-period calculation has hidden complexities.

UPDATE: The article "Techniques for Finding SFC Model Solutions" introduces techniques for solving these models without the simplifying assumptions made here. However, the discussion in this article helps provide an intuition with regards to the numerical solution techniques described there.

The extreme simplicity of this model cannot be emphasised enough: one cannot conclude anything about SFC models in general by looking at what this model alone can do. Within Godley and Lavoie, simplifications are eliminated in almost every direction.
 Chart: Generated from Chapter 3 model of code by Raza and Kinsella

In order to see what the full solutions look like, there is code available to solve the models in Godley and Lavoie  at the "sfc-models" website: sfc-models.net. They now have R code, by Hamid Raza and Stephen Kinsella (which I used to generate the chart above; I have not had a chance to look at the code). That site has a good deal of Eviews code for various SFC models. Eviews is a commercial econometric package; I currently use R in my work here as it is open source.

## The Pre-History Of The Model (t <0)

The model works in discrete time steps, labelled t=0,1,2,... These represent accounting periods, such as months, quarters, or even days. We have no notion of any data that is not at the model frequency. For example, if the model represents quarterly data, there is no way of representing monthly time series within the model. We follow mathematical convention and are starting the simulation at t=0.

We assume that there is very little happening before t=0. There is no government money, and no economic activity, although we somehow have a labour force and capital in place at t=0. This is obviously unrealistic, but to be expected in a mathematical model.

If we look at how we solve at t=0, a solution with no activity is exactly what is predicted. Even though real resources existed, money (or more generally, financial assets) drives model economic activity. (In the real world, one would expect the private sector to create private money, but such an asset is precluded in model SIM.)

## The Government Sector

The government starts issuing money at t=0. It kicks off economic activity by ordering $20 worth of services (produced by the business sector, as described below.) I am simplifying model SIM by assuming that government taxation is zero during the first period. (This means that the results I derive do not match the example values in the textbook.) Since we are fixing government spending to be$20 for this period, and taxes are zero, we know that the government sector must run a fiscal deficit of $20 in the first period. The only financial asset within this economy is government money, and so we know that the private sector will hold$20 in money at the end of the period. (In model SIM, the amount of taxes levied depends upon economic activity. By eliminating taxation, solving the equations is much simpler.)

## Household Sector

For simplicity, we assume that there is an unlimited number of workers available within the household sector. As a result, there is no concept of an "unemployment rate"; there is effectively an infinite number of unemployed potential workers, and a certain number of employed workers. We would need to model the labour market in order for the unemployment rate to have a realistic effect on the model solution.

The implication is that workers are either employed full time or are unemployed. This is different than the convention in representative agent DSGE models, where all households are assumed to adjust their working hours based on the labour market situation. That is, an unemployment rate of 7% within one of these DSGE models is really households deciding to work hours that are 93% of "maximum employment" hours. The message is that if you are a household in a mathematical model, you want to live in a DSGE model, and not a post-Keynesian one.

The household sector works at the business sector, receiving wages. (In model SIM, it would also pay taxes based on wages received.) Not all wages are spent; some are saved and the household ends the period holding money. How much is saved is discussed below.

## The Business Sector And Production

The business sector is assumed to hold capital (that does not depreciate) with infinite productive capacity; output is solely dependent upon labour inputs. Production is linear: for every worker hired, there will be an output of 1 unit of services. Services cannot be held in inventory, so the model is simplified as there is no need to track the stock (level) of inventories.

As is typical in a post-Keynesian model, prices are administered. This is done in an exceedingly simple fashion here, once again, for simplicity. (The model would be nonlinear if we violate this assumption.) The business firm has taken the notion of "non-profit" to an extreme, and pays workers $1 over the period, and charges$1 for one unit of output. (Since the worker produces 1 unit, the firm has exactly zero profit on every unit sold.)

The cash flows during the first period is illustrated below.

 Flows in the simplified SIM model
A key simplification of model SIM is that the only financial asset holdings within the economy are by the household sector, This means that the business sector cannot hold money at the end of the period. As a result, the total revenue (government spending of $20 plus household consumption) has to equal the wage bill by assumption. This implies a form of "model-consistent expectations," which is related to the concept of "rational expectations." The business sector has to accurately forecast its total revenue in order to determine the number of workers hired. If it did not, it could potentially incur a loss, which is assumed to be impossible. There is a lot of arguments online about the use of "rational expectations" within models. Stock-Flow Consistent models can incorporate model-consistent expectations (as is assumed here), or expectation errors can be incorporated. As a result, SFC models are more flexible than mainstream models which assume that model-consistent expectations must always hold. Starting from this model, we could allow for business sector forecast errors if we added in business sector money holdings. At which point we also would need to introduce dividends (and possibly split the household sector into workers and capitalists). ## "Accounting-Only" Model Solution Since we assume that wage expense equals business sector revenue, we can inspect the diagram to see that the solution implies that the household sector saves$20. Beyond that, the model is still under-determined. That is, if all we do is insist that accounting relationships hold, there are an infinite number of solutions.
• The business sector could hire 20 workers to produce the services demanded by the government, and those workers could save 100% of their wages. Total business revenue is $20. • The business sector could hire 1000 workers, and those workers spend most of their wages ($980 out of $1000). Total business revenue is$1000.
Needless to say, this is somewhat unrealistic. Part of the lack of realism reflects the assumption about an infinite labour supply. Nevertheless, even if we modelled capital and labour constraints, there would be a range of solutions.

In other words, accounting relationships are not enough. We need to add a description of entity behaviour within the model.

## Household Savings

The model needs a mechanism to pin down how much the household sector spends versus saves. (Looking at the previous diagram, we see that the household use of money is the only decision point within the model: all other flows are determined.) Stock-Flow Consistent models opt for fairly straightforward consumption functions. The standard functions used in Godley and Lavoie consist of fixed parameters multiplying disposable income (wages less taxes) and initial wealth (money) holdings.

For period t=0 in my simplified model, initial money holdings are 0, and so the consumption function is given by:
Consumption = a (Wages),
where 0 < a < 1

For example, if a=0.6, we can back out that wages have to be $50, since the household savings of$20 is 40% of $50. (Full formula: Total Wages =$20/(1-a).) The lower the personal saving rate (higher a)  the greater the level of wages and output. (Total output equals government and household consumption.)

The reason for my various simplifications of the model SIM is that it is possible to easily "read off" the solution for the system based on the fact that we know household savings equals $20. Otherwise, we need to solve the many equations of the system simultaneously to determine the solution. Given my aversion to masses of algebra, I would inevitably end up redeveloping the notation from scratch. This means that my version would no longer resemble the original solution method in Monetary Economics. From a multiplier perspective,$20 in government spending generates $50 in GDP. Given the linearity of various relationships within this model, GDP will scale up if government spending is scaled up. As Godley and Lavoie discuss, the model will converge towards a steady state -- if the government imposes a non-zero tax rate for t>0 (as shown below) -- and the steady state GDP will have an even higher multiplier. In other words, the "long run" multiplier for constant government spending is higher than the "short-run" (one period) multiplier. ## Excel Simulation  Portion of Excel simulation by Javier López Bernardo (sf-models.net). (Solution continues to right.) [Update] There is an Excel file for simulating model SIM, by Javier López Bernardo (link to sfc-models page). As you can see, the spreadsheet is unhappy with my choice of a 0% tax rate (there is no steady state solution with a constantly growing deficit), but it shows that I did the math correctly for the first period (yay!). The screen shot above also shows the solution for the next accounting period as well.  Time series with no taxes For a longer view, the graph above depicts a couple of time series from the Excel model. The solution is blowing up, which is telling us that eliminating taxes from a model economy gives fairly nonsensical results. Returning the tax rate to the 20% used in the text gives more sensible looking results (shown below).  Time series with a tax rate of 20% ## Expectations And The Time Period The model developed was in discrete time, and there some unsettling implications about the multiplier process. (This discussion harks back to my article Discrete Time Models Are Not Frequency Invariant.) Can expectations adjust this quickly? Imagine that the time period is daily. The business sector was previously mired in a state of no activity whatsoever. It suddenly receives a government contract for$20. Certainly, the recipient of the contract would quickly hire at least 20 workers. But would it hire an additional 30 workers that same day, on the basis of the expected circular flows of revenue within the economy? Moreover, in the real world, there are multiple firms, and revenue would be split up amongst them. Until revenue starts to come in, why would they start hiring?

This implausibility suggests that we should replace "perfect foresight" expectations with a version of expectations that allows for errors. (This is discussed in depth in Godley and Lavoie.) In this case, the multiplier effect would work with more of a lag. This would be particularly true if demand is met from inventories; firms can wait for inventories to be unusually depleted before ramping up production.

Conversely, if the time period within the model is annual, businesses would notice increased activity during the year. One would expect hiring and output to ramp up within the model time step, and reach a steady state before the end of the accounting period. In such a case, model-consistent expectations may be a good approximation of reality.

These considerations mean that we cannot expect model dynamics to be similar across different model frequencies. That said, the difficulties faced by fitting these models to data are so large, that this is hardly our greatest worry.

## Concluding Remarks

It is an understatement to say that there are a lot of online arguments about the merits of differing approaches to macroeconomics. Some arguments are inherently political, but others revolve around seemingly esoteric model assumptions. (Although one could argue that there issues from political economy buried under those assumptions.)

If we compare SFC modelling to DSGE modelling, the clear advantage is held by SFC models (at least for those of us who have no interest in publishing in economic journals).

One can replicate almost all of the alleged advantages of DSGE models -- such as model-consistent expectations -- within a mathematical framework that is robust. Moreover, it allows for model behaviour that better matches empirical evidence from microeconomics (such as how prices are set by firms). Even if you hold the strong ideological belief that model behaviour must reflect optimising decisions by economic entities, you probably have a better chance of approximating that behaviour in a computationally tractable SFC model than in a DSGE model.

See Also:

(c) Brian Romanchuk 2015

#### 43 comments:

1. Another fine in-depth post. Thanks.

It seems to me that you offer three snap-shot observations of the economy:

1. At t=0, there is no money.
2. At t=1, there is $20 held by government 3. At t=2, the$20 is distributed between business, households, and savings but government no longer has the $20. I certainly agree when you say "We need to add a description of entity behaviour within the model." It seems to me that we have no information what-so-ever about the path of the$20 or what activity it might have initiated. The only way to define the path of activity (for the $20) would be to build it into the model. If we build the path into the model, we have only embodied our concepts into a mathematical or schematically correct description. Which, of course, can be of considerable value. 1. Although one could imagine a model which tracks the individual transactions, SFC models do not. The convention matches that of the national accounts: we have the sum of all the transactions during an accounting period, but we have no notion of the order of transactions. We have to think of all the transactions happening simultaneously, and we use the mathematics to pin down the size of the transactions. This is obviously related to how the mainstream thinks about "equilibrium", although I dislike how they use that term. 2. Thanks for a great article. I have such trouble understanding "models". Your post helps a lot. I see the "sfc-models.net has code" link even has Excel files. For me, that's perfect! Thanks. 1. Thanks. (For other readers, they also have Matlab files.) The Excel files might be good to work with for those who are allergic to algebra. (I actually dislike masses of algebra, as I prefer more compact notation.) It is useful to see how the results change as you change parameters, and you can dig into all of the numbers in the system. Spreadsheets are good for that type of exploration; but they are exceedingly unstable for ongoing work. I spent too much of my career ripping out malfunctioning spreadsheet code. 3. "Consumption = a (Wages)" (1-a) is the savings rate. Savings is being treated as if it were a tax which permanently removed money from the system. The$50-in-wages is the total private wage possible if every wage event is accompanied by 40% of the exchange going to savings.

1. The $20 is available in the next period (t=1). Having a non-zero cash balance makes the solution more complicated, which is why I only looked at this t=0 time step. However, if we want to think of the$20 as 20 one-dollar bills, we see that they have circulated at least a couple of times within the accounting period, since total business revenue is $50. It is somewhat unclear how that infra-period circulation works, unless we pin down exactly the time frame of the period. We are never going to build a tractable model of every single transaction in an economy (unless we create something like a video game economy), so we cannot expect to pin down the exact sequence of transactions implied by the aggregate flows. The code modules/spreadsheets I linked to solve the system for future time points. 4. "Until revenue starts to come in, why would they start hiring?" Orders. Companies don't start work at the point of revenue. They start work at the point there is a sniff of an order. In other words there is credit expansion via business credit. The government order causes a cascade of orders without a single real dollar changing hands. Very few of these models separate out the order and sales process from the settlement process. It's always cash and carry. 1. The orders would create a new asset to be tracked, which is precluded from the model. I did snot mention this as it was esoteric, but the system has only a single state variable that is tracked. That is, it is the simplest possible state space system, with a single state variable. But yes, once we allow credit, people can start spending before their wages arrive, etc. 5. Brian First of all, thanks for your effort. You wrote, "For period t=0 in my simplified model, initial money holdings are 0, and so the consumption function is given by: "Consumption = a (Wages), "where 0 < a < 1. "For example, if a=0.6, we can back out that wages have to be$50, since the household savings of $20 is 40% of$50. (Full formula: Total Wages = $20/(1-a).) The lower the personal saving rate (higher a) the greater the level of wages and output. (Total output equals government and household consumption.)" Beyond the issue you acknowledged with the Excel workbook (which I downloaded), there is something I don't understand. Consumption = a (Wages) means that Wages = disposable income (YD). But disposable income YD = (1 - theta) * Y. This means that theta = 0, which causes the Excel #DIV/0! problems. But in addition to that, this is what I don't understand. Given that theta = 0, 1/(1 - a) is the government spending multiplier (note that, by assumption, the consumption function has no autonomous consumption and apparently there is no gross investment). Therefore, Total Wages = Y* = G*/(1-a) =$20/(1-0.6) = $50. But the Excel workbook does not use the multiplier at all. It calculates Y* = G*/theta. Why? More broadly, what is the value added of the charts, in comparison to the steady state values? 1. The steady state values are the values of the system as t gets larger. That is, if you look at the charts, they will converge towards those values. The value 50 (with no taxes) I calculate is a one-period "equilibrium" (G&L avoided that term, I believe; I am unsure how the concept here relates to the more mystical concept in mainstream macro). That is, if we solve the equations simultaneously, what solution do we get? But when we go to t=1, there is now an initial stock of money. That adds another term to the consumption function, which increases output. The steady-state values (with a *) were backed out with algebra; they are the values the system converges to. The steady state formulae are interesting in that they ignore the behavioural parameters, as you see. The reason is that in the steady state, the deficit is zero, and so we get that G* = (tax bill) = theta Y* = wage bill. I will probably write another article about the steady state concept (unless I did already?). I am slowly summarizing the book... Since I set taxes to zero, and spending is constant, the system never settled down, and there is no steady state. You need non-zero taxation to have steady state values. Obviously, this is explained within the book; I am just covering the initial calculation step here. But even when I read the book, the solution method was not obvious, which is why I wrote this article. I will probably discuss why in a later article. 6. Brian, I think this post is the best primer on economic modeling that I have seen. Thanks. The simple model introduced is also a good vehicle to point out idiosyncrasies present in all models. For example, in this simple model, each step comes to complete stability. The initial money injection moves into the hands of savers, where it stops at step end. For the next step, the savers spend all their money and get it back. The result is another$50 wage increment that is included in step two. This simple model would repeat this save-spend-save sequence over all additional time periods.

A second example of model idiosyncrasies is the point of injection of money into the system. Your simple model injects the money directly into the hands of workers, having been originated by government. Another choice of initial injection could have been the purchase of inventory-on-hand, or yet another point, directly into the hands of savers.

Both examples are choices of the model builder. Of course the choice made will affect the results of the model.

1. Yes - everything depends upon the model builder.

Technically, the model has the government buying services from the business sector; it is not a transfer. A transfer payment to households can be modelled. It increases disposable income, and then the increased income is split between consumption/saving. I have not played with the Excel spreadsheet to know how easy it is to make that modification.

2. My models (haven't published them recently) actually have the government sector hiring workers instead of purchasing from the business sector. My models have a more realistic unemployment simulation, and so the effect is different.

7. Very good Brian. BTW, it's easy to see why it blows up if you set theta=0 for every period if you do the algebra: you essentially put a pole at 0 (continuous time), or at 1 (discrete time), thus the system becomes a pure integrator (time constant = infinity). If anybody's interested I have the expressions in text in the lower left of my interactive spreadsheet here. It'd be easy to add a theta column so that one could overwrite theta for any particular sample period (like the 1st, for example, to match your result with theta=0).

1. Note that you don't even need to do any algebra: it's right there in G&L's equations:

ΔH = G - T

If T = 0 every period then

ΔH = G = a unit step scaled by 20

Thus H = integrated ΔH = a ramp climbing forever as t->inf

2. The lack of algebra was why I set the tax rate to zero...

The algebra here was not too complex, but solving systems equation-by-equation is not systematic enough. That's why I am averse to pulling out the pencil and paper to solve the system. Academics like closed-form solutions, but I gave up on that after doing everything closed form in my thesis.

3. As an addendum for readers, the SFC academic community uses EViews, which allows you to enter equations directly into a solver, and then it cranks out a solution (somehow; probably iterative, would need to find the technical documentation). If you do not have Eviews (like myself), this does not help you find the algorithm to solve the system. But if you have Eviews, you can solve these systems in a somewhat systematic fashion.

In this case, the relationships are linear, and one can cast it into a canonical form for a linear state space system (after some matrix algebra):
x(t+1) = A x(t) + B u(t).

However, any number of changes will make the system nonlinear, and you have to use some numerical techniques to solve the system.

4. This comment has been removed by the author.

5. "after some matrix algebra"

Actually you don't need any matrices for SIM: A and B are scalars here.

"...any number of changes will make the system nonlinear, and you have to use some numerical techniques to solve the system."

I've actually used the free online version of Excel to solve vector Newton iterations in making an interactive version of one of Nick Edmond's models. I fixed the number of iterations ahead of time (I used six per time sample). It was a bit of a pain, but it worked and I tried to set it up so it could be reused for a different model.

6. ... I'm sure EViews is much easier!

8. Brian, Jason has drawn an analogy between SFC models and RLC (resistance, inductance, capacitance) circuits. He selected Fig 1 of this Wikipedia article, with a voltage source v(t) in series with resistor R, inductor L and capacitor C, and then solves for current i(t).

Lining that up with SIM (G&L's SIM), I say you can make an analog computer out of that circuit if (for example) you get rid of the capacitor and replace it with a short (a wire) and just leave R and L. Here's one way to program the analog computer (forgetting about all the outputs and just concentrating on h (the continuous time equivalent of H, where h(n*T) = H[n], and g'(n*T) = G(n)):

di/dt = -(R/L)*i + (1/L)*v

is the analog computer for

dh/dt = a*h + b*g'

With the following equivalences:

h(t) in dollars = i(t) in amps
g'(t) in dollars/period = v(t) in volts
Ts = 1 "period" = 1 second

R = 0.25 ohms
L = 1.496521 henrys

Of course to make it correspond exactly to G&L's example at each sample time (0 sec, 1 sec, 2 sec, etc), v(t) should be a 20 volt step:

v(t) = 20 volts for t >=0, and v(t) = 0 for t < 0

But it can match G&L for any v(t) that stays constant between sample times.

... Ah, it looks like you've already found the post. Do you agree with my analog computer programing? Of course you can easily scale that to different electrical circuit times (other than 1 sec = 1 G&L period), so it's not unique in that sense, but given a particular electrical period, the solution is unique (for R and L). And of course you could switch v for i, or use difference correspondences (scalings) there too or make an RC circuit instead of an RL, etc.

1. Probably no one cares, but my 1st link is wrong. It should have been this.

2. My dad did a project using an analog computer when he was in university -- in the 1950s. (Economists actually used hydraulic analog computers.) We may or may not have had exercises doing simulations in one of our labs in the 1980s, but analog computing is somewhat dated...

The discrete time system for SIM has a single state variable, with a certain rise time. You would have to tune your RLC circuit to match that rise time, based on your arbitrary sample frequency. You cannot fix all 3 of R,L,C, which Jason suggests, since you could then only simulate a single discrete time system (if we fix the sampling frequency).

Even though I trained as an electrical engineer -- why would we care? There is an infinite number of models whose behaviour can be captured by the same state space model. However, there is no reason for those systems to have anything else in common.

3. This comment has been removed by the author.

4. Oops. I mixed up your work and Jason's; I see that you had only one state variable. Deleted the misleading comment.

5. Yes, I know they're dated. I actually used one in my undergrad EE course. Lol... Probably the last year that was required.

6. I no longer have access to an oscilloscope, so analog computing is definitely out for me. (Unless I do a Phillips(?) water model...)

Simulating a continuous time analog computer on a digital computer, so that I can use it to simulate a discrete time model sounds like something I would have done as a grad student after too many pints.

7. A water model... or perhaps a mass, spring and dashpot? (All you need for SIM are the spring and the dashpot... or the mass and the dashpot). Gotta have that dashpot thought! Lol

Maybe the "water" model is better... especially if it's not water.

8. The Cambridge Engineering department got a version of Phillip's hydraulic analog models working awhile ago, and had a video. Looked at it quickly (trying to see if I recognized anyone...).

9. Brian, you might be interested in this brief comment (I worked out exactly how determine SIM's parameters given both a desired steady state and a system time constant Tc)

10. OK.

How are you generating the HTML for equations in a comment? When I looked into equation formatting, it involved addins that might not work everywhere.

11. MathJax. Look at the source for my page, search for MathJax, and then copy the lines you find (I think just one) at the top of your HTML editor page. I got mine from Jason. If somebody has that on their page, you can leave formatted comments on their page as well. One drawback: you loose your dollar sign. Anybody inadvertently putting a dollar sign in your comments will wonder what happened to their comment... it'll get screwed up.

12. Also, the Chrome browser on my android phone has trouble with some of the superscripts (they don't always appear in their entirety). Android Firefox works fine.

13. Also, AFAIK, you have to include that MathJax line in the HTML of every separate blog page you want it in. The good part is you won't mess up existing posts or comments which contain dollar signs. For example, I have a mix of pages: some with MathJax and some without. Also, there's probably a way to use a different escape character sequence... check the MathJax website.

14. OK, thanks. I looked at MathJax a couple of years ago, and the lack of support on some browsers made me avoid it. I'll try it out, and see whether people can follow it.

9. I took a good look at the model last night.

Please comment on my interpretation.

The excel sim takes two decay rates, one for taxes and one for savings. Decay removes money from the system with each transaction.

The tax rate is applied to the first transaction which reduces the remainder available for building consumption IN THE FIRST PERIOD.

The entire remainder (12.3) is assigned to savings.

The amount of tax collected provides the measure of consumption, with a limit of C = T/theta. THIS SETS THE RESULTS FOR THE FIRST PERIOD.

Beginning in the second period, a portion of household savings is added to (unchanged) government spending. The tax rate is applied to this sum and the identical sequence followed again. THIS SETS THE RESULTS FOR THE SECOND PERIOD.

This sequence is repeated until taxes equal the initial jump in government spending. At that point, the system has returned to stability at a higher level of consumption and wealth.

I believe we could think of this as a system with two stabilizing forces, taxes and savings.

1. Exactly.

Without either, the model could produce infinite output; money recirculates at an infinite speed between households and business, and there are no real constraints in this model. In order to pin down a solution, money needs to be drained from income. This is done by taxes and savings.

In this case, a representative household assumption may be more "reasonable". What limits output in that framework is the fact that households can only work 24 hours a day...

10. Well, this post, excellent though it is, does not answer my question of the working of the Keynesian multiplier within each time period. G&L do not spell it out, except that they indicate that it is what is in macroeconomic textbooks, and that the textbooks assume, unlike G&L, that it gives the only equilibrium value for Y. G&L assume that it produces only a short term equilibrium within each time period. Anyway, they don't spell the process out, and nobody seems to care. {shrug}

1. For this model, the exact details would depend upon the time period. If the period were comparable to the payroll frequency, it would be very difficult to the system to adjust to government spending as a result of changing cash flows, rather it would have to rely on expectations.

If the time period is one year, expectations would matter less. As workers spend more money, the firm would need to hire more people, and so the activity would be growing within the time period. The process then continues, and so the model activity grows during the second relative to the first.

It needs to be kept in mind that this is the simplest possible model. The working of the multiplier would be more interesting in more advanced cases. The key is that business sector decisions with regards to investment and inventory will then show up.

2. Thanks, Brian. :)

G&L do refer to two equilibria, one short term (within each time period) and one long term (steady state) (p. 70). They say that the periods could be years, quarters, or months. (Footnote 10, p. 72). I was sort of surprised that the short term equilibrium could be reached in one month.

OC, the use of time periods is unrealistic, since both equilibrium processes should be occurring at the same time. But I understand the pedagogical value of separating them.

BTW, Jason Smith ignores the short term equilibrium process, which makes him think that he has discovered a flaw in all the G&L models, namely that the velocity of money within each time period is 1. {shrug}

3. I looked at the book again when I started this article series, and I believe that they avoided the term "equilibrium." Within macroeconomics, the term is fairly meaningless at this point. The "steady state" term they use makes more sense, although it can be tricky to formally define in a growing economy (ratios go to a steady state, but individual variables are growing).

The "in-period" equilibrium could represent practically any behaviour within the period. All that we know is that there is a solution to the equations. Although it's not completely supported by their discussion, one could argue that any number of micro behaviour schemes could be consistent with the equations, at least within an approximation error. (I am reading Anwar Shaikh's "Capitalism", and he discusses how different micro behaviours have emergent properties as a result of accounting constraints, and so they all end up with similar macro properties. However, Shaikh is somewhat critical of post-Keynesian models, so I am not saying that he endorses this model; rather I think one could draw a parallel to his analysis. I will be reviewing his book shortly.)

Note: Posts may be moderated, and there may be a considerable delay before they appear.

Although I welcome people who disagree with me, please be civil.

Please note that my spam comment filter appears to dislike long "anonymous" posts.

Note: if you want to post comments from Apple devices (iPhone, iPad), you apparently need to turn off "prevent cross-site tracking" in Safari privacy settings. (The reason presumably is that another URL handles comments, and so the user session needs to be preserved when redirected to that site. I don't like this, but this is not enough to make me switch my hosting service.)


text:
POLQ 3 | Lesson 2 | Practice (Finding Rational Roots) Solutions

Solutions:

1) $$f(x)=x^2+8x+10$$

The potential rational roots are $$\pm 1$$, $$\pm 2$$, $$\pm 5$$

2) $$f(x)=x^2-64$$

The potential rational roots are $$\pm 1$$, $$\pm 2$$, $$\pm 4$$, $$\pm 8$$, $$\pm 16$$, $$\pm 32$$, $$\pm 64$$. Factoring reveals the actual rational roots are $$\pm 8$$.

3) $$f(x)=5x^3-2x^2+20x-8$$

The potential rational roots are $$\pm 1$$, $$\pm 2$$, $$\pm 4$$, $$\pm 8$$, $$\pm\Large\frac{1}{5}$$, $$\pm \Large\frac{2}{5}$$, $$\pm \Large\frac{4}{5}$$, $$\pm\Large\frac{8}{5}$$.

For the problems below, find the possible rational roots and then use synthetic division and other factoring strategies to find all the rational roots of the functions.

1) $$f(x)=x^3+x^2-5x+3$$

The potential rational roots are  $$\pm 1$$, $$\pm 3$$.

1 is a root. This can be found through synthetic division, or by evaluating the function for 1.

$$f(1)= 1^3+ 1^2 -5•1 + 3$$; or $$f(1) = 0$$

Dividing out $$(x-1)$$, the resulting quadratic is $$x^2+2x-3$$.

Standard factoring for a quadratic will help you find the other potential rational roots which are 1 and 3. The root of 1 is said to have a multiplicity of 2.

2) $$f(x)=x^3-13x^2+23x-11$$

The potential rational roots are $$\pm 1$$, $$\pm 11$$.

One is also a root of this polynomial. Remaining is the quadratic $$x^2-12x+11$$. When factored the other two rational roots are 1 and 11. This polynomial also has a root of one with multiplicity of 2.


text:
[WTS] Providing 3000+ Words SEO Ready / Pillar Content

Hi there, first let me introduce myself, I am a native content writer and I am posting this thread only to provide SEO Ready Long Articles which are deep researched, well written and without silly mistakes.

So What Kind of Contents I Can Provide ?

Trademark Content : Articles will be about some new ways to solve a problem, which has been not discussed before, will enough research data that will keep the reader occupied with enthusiasm and faith that this type of method works. Best used for Landing Pages.
Go To Guidebook : All tips, tricks and methods at one place – like a super newbie friendly guidebook, detailed and step by step explanation based. This will come with lots of images, specially screenshots on how steps are being done. Best used for blogs.
Expanded List Post : Well, you all have came across this type of content which tells 50 or 100 ways how you can boost your instagram. That type falls into this category, this can be anything ranging from methods, products, services, recipe etc. This type of content is highly useful for creating bookmarks and shares by others.
The Hero Post : Best/Top/Most Popular products or websites or themes or literally anything which makes people drool. These are generally the longer, the better. This type of content is best for pillar content.
Yes, these are the most recognized Content Frameworks that works in whitehat SEO so I am offering my service to write them.

What you will be getting :

1. It goes without saying, all content is written by me, no plagiarism etc – you know the drill.
2. Contents will be well researched, to the point and explained to the tiniest detail.
3. I will provide unique graphs, infographics and images – created by me in PhotoShop and also some images taken from Shutterstock legally. Images will be provided inside article and in a separate folder with Citation / Keyword inserted into them.
4. Articles will contain sharetriggers so that it will be easier to read and share.
5. Can also create videos and animations if needed, but they will be charged extra.
6. Unique title, intro, body, conclusion and one brief summary for every article.
7. At least 3000 words article, at most 5000.
8. Keywords go inside the content, as always. I am a student of Brain Dean so generally follow his advice about placing them, but if you have some other ideas, I am all ears.

How long it will take ?

Most of the times, it will be delivered within 3-4 days but articles which require lots of work may take upto 7 days, I am looking to provide quality work here, not to grab quick cash.

How much it will cost you ?

1. Content rate is Fixed for now, \$29 each, paid in advance every time.
2. There will be no review copies, if you need to see my writing quality, read this post again, period.
3. I will talk with you, give you brief about the article, we both agree, you pay and I start writing, as simple as that.

So if you are interested, please get in touch through pm.
If you have any queries, feel free to post here.

Stay Safe.

.

Providing 3000+ Words SEO Ready / Pillar Content

Hi there, first let me introduce myself, I am a content writer from India and I am posting this thread only to provide SEO Ready Long Articles which are deep researched, well written and without silly mistakes.

So What Kind of Contents I Can Provide ?

1. Trademark Content : Articles will be about some new ways to solve a problem, which has been not discussed before, will enough research data that will keep the reader occupied with enthusiasm and faith that this type of method works. Best used for Landing Pages.
2. Go To Guidebook : All tips, tricks and methods at one place – like a super newbie friendly guidebook, detailed and step by step explanation based. This will come with lots of images, specially screenshots on how steps are being done. Best used for blogs.
3. Expanded List Post : Well, you all have came across this type of content which tells 50 or 100 ways how you can boost your instagram. That type falls into this category, this can be anything ranging from methods, products, services, recipe etc. This type of content is highly useful for creating bookmarks and shares by others.
4. The Hero Post : Best/Top/Most Popular products or websites or themes or literally anything which makes people drool. These are generally the longer, the better. This type of content is best for pillar content.

Yes, these are the most recognized Content Frameworks that works in whitehat SEO so I am offering my service to write them.

What you will be getting :

1. It goes without saying, all content is written by me, no plagiarism etc – you know the drill.
2. Contents will be well researched, to the point and explained to the tiniest detail.
3. I will provide unique graphs, infographics and images – created by me in PhotoShop and also some images taken from Shutterstock legally. Images will be provided inside article and in a separate folder with Citation / Keyword inserted into them.
4. Articles will contain sharetriggers so that it will be easier to read and share.
5. Can also create videos and animations if needed, but they will be charged extra.
6. Unique title, intro, body, conclusion and one brief summary for every article.
7. At least 3000 words article, at most 5000.
8. Keywords go inside the content, as always. I am a student of Brain Dean so generally follow his advice about placing them, but if you have some other ideas, I am all ears.

How long it will take ?

Most of the times, it will be delivered within 3-4 days but articles which require lots of work may take upto 7 days, I am looking to provide quality work here, not to grab quick cash.

How much it will cost you ?

• Content rate is Fixed for now, \$29 each, paid in advance every time.
• There will be no review copies, if you need to see my writing quality, read this post again, period.
• I will talk with you, give you brief about the article, we both agree, you pay and I start writing, as simple as that.

So if you are interested, please get in touch through pm.
If you have any queries, feel free to post here.

Stay Safe.

Looking for feedback! Am I ready to take photography to the next level?

As Philip and Tetsujin have noted, running a photography business is more about the business than the photography. My quick reaction to your images: They’re salable. And that’s essentially all you need out of your photography.

Start working on growing my client base, as of now just posting my work on Instagram, working now on creating my own portfolio and keep going out to shoot and meet new people.

Do make sure you are charging for these shoots. If this is your first business, you have a lot to learn about selling, negotiating, closing deals, and confidently charging for your time and work. Best start practicing now.

Another thing is creating my home studio, not posible at the moment due to lack of space but with a plan of moving within the next year.

Slow your role, mate. Every business takes some investment to get running, but if studio will not be your primary source than I’ll challenge you this: only set up the studio when the business itself (the money you’ve made from it) can outfit the studio. Start thinking about everything in these terms. You only get to spend what you’ve made. Otherwise, your still funding this business from other work that you do.

as of now just posting my work on Instagram

That’s all good and fine, but have you thought how you’re going to convert an instagram follower to a paying customer?

There are a plethora of business plan templates out there online and in book form. I highly recommend you find one and run through it as an exercise. Before starting this venture, you should have an idea, at a bare minimum:

• what your unique value proposition is (why should someone hire you)
• who your target market is (marketing 101)
• how you’re going to grow your client list (marketing 101)
• what your investment strategy needs to be (gear, space, etc)
• what you need to charge and how many clients you need to stay alive (plan plan plan)
• what you’ll do if you do not get the clients you need to stay alive (contingency plan plan plan)

There is quite a bit more but I’ll leave that for your business plan guide. Do note that the best businesses are not necessarily the best photographers. But, they are the best businesses.

Selling – Buy Subreddits With Huge Traffic And Subscribers Ready… | NewProxyLists

Hi,

If you want to get instant traffic to your websites and projects then you can now able to buy our readymade aged subreddits with subscribers and huge daily traffic ready. You just need to start maintaining those subreddits to start getting instant traffic from day 1.

Subreddit 1:

Niche: Vibrators (Awesome for sex toys website owners)
Subscribers: 2k+ and growing daily
Daily Traffic: 9k-10k+
Age: 5 years old
Price: \$xxxx

Subreddit 2:

Niche: Cumshot
Subscribers: 31k+ and growing daily
Daily Traffic: 4k-6k+
Age: 10 years old
Price: \$xxxx

Subreddit 3:

Niche: Quiver (shaking Orgasm)
Subscribers: 7k+ and growing daily
Daily Traffic: 1k-2k+
Age: 4 months old
Price: \$xxx

Email: (email protected)

Diabetic Recipes Site Ready to Make Money Keep 100% Profit

Make Money From The Mega Health Opportunity With Premium Quality Product, Keep 100% profit, Newbie friendly, No Maintenance Required, 100% Automated

Hello, I am selling my new beautiful diabetic recipe blog https://diabeticrecipeshub.com/ that offers eBook.

Domain name are chosen carefully so I only choose the best domain name and high value, this is great domain name so that it has the potential to become a large and profitable business and has high value investments. Godaddy domain value \$755, click here to check.

Site is running on WordPress which is a very easy to manage and update. I have already installed a nice responsive theme so you don’t have to worry about mobile or tablet visitors. All plugins and settings necessary are already been installed.

Website is 100% automated, the customer gets their ebook immediately after purchase. Products are digital, no postage or shipping. All you have to do is send targeted traffic, make a sale and keep 100% profit.

To increase traffic you can do SEO Services which shouldn’t cost more than \$100 but with more traffic revenue will be double or triple so it will still be profitable.

• diabeticrecipeshub.com domain pushed to buyer’s namecheap account
• eBook diabetic recipes contains 500 recipes
• All site contents, theme files and resources
• Free transfer to your hosting server

FAQ

What is the best hosting package to run websites?
I highly recommended use Linux cPanel Hosting Package. The annual cost is only \$36/year. The standard package is enough to run everything. You can also upgrade higher in the future if needed

What is required to keep the business operational?

pay domain and hosting

How does the business generate revenue?

Are there any expenses for the business? If so, what are they?

domain and hosting

What marketing initiatives have been used for this business?

Shared on social media

How can the future owner improve the business?

I am looking for some serious buyer who is ready to take over this site to the next level. If you have any questions, let me know and I will try to explain everything.

Thank you for watching and let me know if you have questions

dnd 5e – Is this homebrew Holy Archer class ready for playtest?

So, after lots of thought I decided to present my homebrew class for review. The background on why I made it is here, but, in short, one of my players wanted to play a paladin-like ranged class. By the time, I did not consider the War Cleric or the Celestial Warlock, which were very good options for it, and instead I homebrew this Holy Archer class. Even with the options presented, I do feel like there is a place for a ranged paladin class, with similar features (divine smite and auras, for example) but more fit for ranged combat. At the very least, I like the concept of this class and I would like to make it playable, and I hope this is enough of a reason to create it.

As I shared in the meta, I was concerned that a whole class review would be hard, so I will structure the question in the following way:

• I will present the feature and explain why I think it fits well for that level (i.e., is balanced) and why it fits well for the concept.
• By the end of the question, I will share the comparisons I have made against other classes, and why so far I think the class is fairly balanced.

The reasons I need help are:

• Spellcasting classes are fairly harder to balance, IMO, since the utility of spells is not easy to quantify.
• I might have missed some obvious broken iterations or (as per the previous bullet) overestimated the usefulness of spells.

No more delays, I present you the Holy Archer. If you prefer to read it in a nicely edited PDF, this is an external link to my OneDrive with it.

For the question, I will highlight features that I am more concerned about. I will super highlight what I feel really needs a second opinion. In particular, these are the features at 3rd, 6th, 9th and 10th level.

As a final comment, this class was initially considered for Curse of Strahd, which runs from 1st to 10th level. For that reason, I have put more thought and effort on the 1st to 10th levels, and these are the ones I would like a review on. Once these levels are playtested and fairly balanced, I will move on to the next tiers. The PDF has a sketch on the higher levels but please ignore it.

I used the Paladin as a base-line. You will notice many features are changes to Paladin features, and/or features I felt fit in the class concept (e.g. slightly modified Improved Crit from Champion or Guided Strike from War Cleric). The reason I have preferred to use modified (or even as is) features from other classes is that they have obviously been playtested already, and I felt they were fitting as they were.

The class gets d8 as their hit dice, which seems appropriate for a ranged class (same as the rogue, specifically). They have proficiency in Light and medium armor, in simple weapons and in martial ranged weapons. The saving throws are Dex and Cha, following the concept of “one good and one bad ST”, and they get 2 proficiencies, chosen from Acrobatics, Insight, Medicine, Persuasion, Religion, Stealth. So far, I think these are fair additions that need little explanation and hardly will make it imbalanced in any way.

They are half-casters (as Paladins), so they get their spellcasting at 2nd level and get up to 5th level spell slots. Their spellcasting ability is Charisma. The reason I chose Charisma over Wisdom is that I did not want to give them two “more useful” primary abilities. Allowing them to focus on Dex, Wisdom and Con would allow them to focus on the 3 major Saving Throws, and Wisdom is also useful for Perception. With Cha, the player has to choose between better saving throws and perception or better spellcasting, from my point of view.

As for equipment, they start with a Longbow or a Light Crossbow, a dagger, Leather or Hide armor and a Holy Symbol. Usually my campaigns don’t have a problem with gold, so starting with a longbow rather than a shortbow seemed fine. I usually allow rogues to start with light crossbow as well. And I do not keep track of ammo.

As per @Molot suggestion, this is a table of the features in the class up to 10th level, compared to Paladin’s features (both get the same spellcasting slots).

$$begin{array}{cll} textbf{Level} & textbf{Holy Archer} & textbf{Paladin} \ hline 1 & text{Divine Sense, Archery} & text{Divine Sense, Lay on Hands}\ 2 & text{Spellcasting, Holy Arrow} & text{Spellcasting, Divine Smite, Fighting Style}\ 3 & text{Sacred Oath} & text{Sacred Oath}\ 4 & text{ASI} & text{ASI}\ 5 & text{Extra Attack} & text{Extra Attack}\ 6 & text{Modified Aura of Protection} & text{Aura of Protection}\ 7 & text{Purifier of Evil (extra damage} & text{Oath Feature}\ 8 & text{ASI} & text{ASI} \ 9 & text{Retreat} & text{Nothing} \ 10 & text{Aura of Encouragement} & text{Aura of Courage} end{array}$$

1st

At first level, I gave them Archery and Divine Sense. Since it is more of a damage-dealing class than a tank-utility (Paladin), I chose to take away Lay on Hands. With the Fighting Style at 2nd level, I felt the class was too bad for 1st level, so I moved it to 1st level (which Fighters already get too, so I don’t think it is a problem).

2nd

At this level, they get Spellcasting and Holy Arrow, which is simply the Paladin’s Divine Smite, but for ranged weapon attacks. Usually that’s what half-casters get (and the fighting stlye already given at 1st level), so far so good for me.

3rd

They get their Sacred Oath. So far I have only made one choice for it, and I think presenting more than one would be bad either way. The Oath gives the following two options of Channel Divinity (similar to a Paladin having 2 choices):

• +10 to hit after rolling (same as Guided Strike from Cleric)
• Choice to make a 18 or 19 a critical hit.

Note that this can only be done once per short rest. I particularly like the second option because Critical hits + Divine smites are one of the funniest moments for Paladin players. I am a little concerned that it might be too much, but with one use per short rest I don’t see it as game breaking. Some other subclasses of the Paladin, such as the Vengeance, can use their CD to get advantage on every attack, which will arguably lead to a critical hit eventually, as well. Anyway, this is the first feature that makes me not too sure.

For the spell list of the Oath, they are as follows:

• 3rd: hunter’s mark, sanctuary. One good spell and one thematic/situational/decent spell. I may reflavor hunter’s mark for something more… Divine.
• 5th: Misty step, magic weapon. Again, one good spell and one thematic/situational spell.
• 9th: Haste, Dispel Magic. I am concerned about Haste here. It is a very good concentration option for a ranged class (which should not be attacked too often), and Dispel Magic is also a very decent spell (although situational).

4th level

They get ASI at 4th, 8th, 12th, 16th and 19th level, as usual. I will skip these.

5th level

Extra attack. Not much to say, this is mainly a martial class and they should get more attacks at 5th level.

6th level

Aura of Protection – but different from the Paladin one.

Beginning at 6th level, you can release an aura of protection against evil spells. Using an action, you create a 10 ft. aura that protects you and your allies from area of effect spells. When you or your allies are subjected to an area of effect that allows you to make a saving throw to take only half damage, you instead take no damage if you succeed on the saving throw, and only half damage if you fail.

You can use this feature once per long rest.

At 18th level, the range increases to 30 ft and you restore the feature once per short rest.

At 20th level, the range increases to 60 ft. and the aura is permanent.

Obviously, this is based on Evasion from Rogue, but also an aura-like from the Paladin. Giving an AoE permanent Evasion would obviously shadow the Rogue feature heavily, so I decided to make it cost an action to “activate” and only usable once per long rest. At the level they get it, it’s quite counter-intuitive, as it’s useful against AoE spells (say Fireball), but the range is so small they force their allies to be close (thus being more susceptible to Fireball).

In terms of Flavor, rather than an “evasion”, the aura makes the spell itself weaker (be it divine intervention or what else), which is the reason it works for any AoE, not only Dex-based saves.

The auras (this one and others that will follow) are my major concern on this class. Once per long rest may be too few uses for a 6th level feature, while a permanent aura would be obviously broken, and I am not sure how the middle behaves. Maybe “Charisma modifier” times per long rest would fit better?

7th level

This one is straight forward: extra 1d8 against Undead and Fiend. This is a nice feature against these enemies and so far I think they have been gaining very useful features for any combat, so I wanted to give them something more situational and thematic. At 7th level they get an extra spell slot as well (half-caster), so I don’t feel bad about giving them “only this”.

9th level

Originally, I was not going to give them anything, as they already get 3rd level spell slots and oath spells. But so far they have not gained any use for their reaction. They don’t get opportunity attacks because they are ranged, they don’t get Uncanny Dodge to halve damage, and if I am not mistaken, absolutely no spell in the Paladin list has a reaction casting time. So I gave them the ability to retreat

Beginning at 9th level, when an enemy gets within 10 ft. of you, you can use your reaction to move away from it up to half your speed. If the enemy is an Undead, you can move up to your full speed.

This is similar to a feature from a Rogue subclass in Xanathar.

So far, I am concerned that I might be giving them too many useful features, but I will talk about it in the comparison with other classes later.

10th level

Aura of Encouragement.

Beginning at 10th level, you can release an aura of encouragement towards your allies. Whenever an ally within 10 ft. (does not include you) fails an attack roll, ability check or saving throw, they may choose to re-roll. This feature can only be used once per short rest (for each ally using the feature).

At 18th level, the range of this aura increases to 30 ft. and the feature can be used twice per short rest.

At 20th level, the range of this aura increases to 60 ft. and the feature can be used once per minute.

I really like this feature. It’s a full support feature (note that it does not apply to yourself), and my hopes with this feature is to make the party go “THANK TYR WE HAVE THIS GUY HERE IN OUR PARTY”. It’s essentially a free reroll to each member of the party, which may save them in crucial times.

Again, I am concerned about this because it’s quite a new mechanic. Players will be rolling lots of dice and rerolling one of these rolls doesn’t seem concerning, but maybe I am missing some feat or other feature that this completely overshadows, or maybe this is not enough for a 10th level feature.

Compared to Aura of Courage, it certainly feels more generally useful.

I was also thinking about adding something along the lines of “Against undead or fiends, the first reroll is free”, going back to the theme of undead/fiend slayer, but I thought it may be too much.

So, the classes I feel should be considered for comparison are Paladin (duh), Fighter, Ranger and Rogue. I don’t see much point in comparing against full spellcasters, and I don’t think there is really much to compare between this and Barbarian, Monk or Warlock, as they fit completely different concepts, even though they are “martial” classes. These comparisons are my main notion of “balance”, as per How can I check to make sure my homebrew class is balanced compared to pre-existing classes? and especially this answer.

Well, the whole idea is that they are conceptually different. While the Paladin is a melee tank frontliner, the Holy Archer is a ranged damage dealer with some utility. If the player wants the tank version, they pick paladin. If they want the ranged DDer, they pick the holy archer.

Fighter

Usually Ranged Fighters are not exactly optimal, but are certainly an option. Still, I would choose the Fighter if I want to make a feat-based character (let’s put Sharpshooter and Lucky in this build, shall we?), which is something the Holy Archer would struggle to do, as it requires a fair amount of attributes and gets the standard amount of ASIs. They also can be very competitive with Battle Maneuvers as a Battle Master.

On the other hand, the Holy Acher has nice spells, utility for the party and probably can outdamage a standard Fighter build (i.e. without Sharpshooter at least) with some uses of the Holy Arrow (which is stronger than battle maneuvers).

Overall, I think the Holy Archer is better than a ranged Fighter, but the latter still has its niche with feat-based builds and, even then, the Fighter class as a whole still has their use as melee fighters.

Rogue

So, here, I started by computing the damage output. So, basically, I compared a Rogue that is consistently getting Advantage (through his use of Bonus Action for Hiding) against the Holy Archer in a few uses of his spells:

• For consistent damage against high AC monsters and helping the party, Bless.
• For consistent damage alone, Hunter’s Mark.
• For burst damage, Holy Arrow (Divine Smite).
• Not using any spell slot.

In all levels, except for levels 5 and 6, the Rogue can deal more consistent damage than the Holy Archer, while obviously the Holy Archer can output a higher burst damage (especially by using his Channel Divinity to force a critical hit more often). At 5th and 6th, the Holy Archer outdamages the rogue due to the extra attack being considerably better than just +1d6 for the Sneak attack, however, at 7th level the Rogue comes back on top again.

However, in combat, the holy archer provides more utility to the party (either by bless, healing or the auras), which, in my opinion, make them on par. However, this utility is hard to quantify, which is one of the reasons I am asking for a review here.

Outside combat, the Rogue has more proficiencies and expertise, while the Holy Archer has Charisma as a primary stat and, well, spells. Again, I believe both are on par here.

But since spells are hard to quantify, this is the main comparison I would like to hear a review on.

Ranger

I will be fair: I would pick the holy archer above the ranger most of the time. But I don’t believe this is reason to say the archer is overpowered, rather, I believe the ranger to be underpowered in 5e. None of my groups would pick ranger to begin with (most of them tried at least once, and felt really bad and disappointed about it). In particular, I feel like giving this class Hunter’s Mark completely makes the Ranger useless, except if you go for Dual Wielding ranger, which then is conceptually different than the archer version.

Nonetheless, the Ranger has higher hit dice, can go for a dual wielding option (thus not being completely wasted) which is superior in lower levels, and can focus on Wisdom, thus arguably being more resilient in saving throws, more useful against surprise attacks and still has the ranger flavor which does not overlap with my homebrew in any way.

So, although I believe mechanically the Holy Archer outshines the Ranger, I would say the same for the Rogue and even for a Fighter.

As expected, this became a large question. I hope I could convey my line of thought and concerns and show that I have put some thought on it and, to the best of my abilities, ran through the number crunching of damage dealing in order to balance it. If the answers say that the class is ready for playtest, or that small changes are required in order to playtest it, I will be providing it as an option for a group that is starting CoS soon, otherwise, I will carefully try to understand the criticisms and may post a new version with the feedback I receive.

My site was showing ads all fine, but then I decided to rebrand and change the domain name of my site.
So my new domain is uncutacademy.com

I did make changes to the webmaster’s console (search console) and have added the site as my property, also I have moved the site as well. see image below

I have now added the domain to my AdSense and applied for monetization of the new domain and removed ads from my previous domain.

I was till now getting the COVID error as the staff was low at Google HQ. Now I am getting policy violation as shown below

This feels so bizarre as I had an active account and was generating revenue and now it says I have a policy violation.

Kindly let me know what is to be done here.

Thanks

url routing – Is this URL router production ready c++ code?

So I’ve written a URL router which also allows for wildcards aka path parameters.

A URL like /users/{uuid} can be added and then, when a user sends a request to the server with the following target /users/955b2a88-ae80-11ea-b3de-0242ac130004, the uuid will then equal 955b2a88-ae80-11ea-b3de-0242ac130004.

Example:

```PathMatcher<int> matcher(-1);

Parameters parameters;
assert(matcher.match("/users/9c4ceec8-f929-434e-8ff1-837dd54b7b56", parameters) == 1);
assert(parameters.find("uuid", "") == "9c4ceec8-f929-434e-8ff1-837dd54b7b56");

```

I have learnt c++ through stackoverflow, therefore I dont really have an idea how production ready code should look like.

Id like to know what should be written differently and would could be improved.

If youd like to run the code, it is hosted on github with an example `main.cpp`.

```    typedef std::string string_t;

class Parameters {
std::vector<std::pair<string_t, string_t>> parameters_;

public:

void add(string_t& name, string_t& value) {
parameters_.emplace_back(name, value);
}

string_t find(string_t name, string_t default_="") {
for(auto & parameter : parameters_) {
if(parameter.first == name) return parameter.second;
}
return default_;
}

void clear() {
parameters_.clear();
}
};

template<typename Result>
class PathMatcher {

struct Path {
char character;
std::vector<Path *> children;
std::optional<Result> result;

Path(char character, std::optional<Result> result) : character(character), result(result) {}

~Path() {
for(size_t i = 0; i < children.size(); i++) {
delete children(i);
}
}
};

Path *
find_child(char character, std::vector<Path *> &parent, bool findWildcard = false, Path **wildcard = nullptr) {
Path *child = nullptr;
for (size_t i = 0; i < parent.size(); i++) {
if (parent(i)->character == character) {
child = parent(i);
// If wildcards are not wanted, there is no need to continue
if (!findWildcard) break;
} else if (findWildcard && parent(i)->character == wildcard_open_) {
(*wildcard) = parent(i);
// If child has already been found, there is no need to continue
if (child != nullptr) break;
}
}
return child;
}

Path *create_path(std::vector<Path *> &parent, char character, std::optional<Result> value) {
Path *route = new Path(character, value);
parent.push_back(route);
return route;
}

void insert_path(string_t &path, Result &result, Path *step = nullptr, int path_pos = 0) {
/*
* Recursively creates path. A path contains a vector with child paths.
* These linked paths create a chain which can be walked down.
* If we input /users/a and /users/b the following chain would be created.
* / -> u -> s -> e -> r -> s -> / -> a
*                                 -> b
*
* Now if you want to match against an input, this chain can be walked down until a path no longer contains the matching character.
* If the input would equal /users/c, the chain would be walked until the last "https://codereview.stackexchange.com/" and then failing because it only contains the children a & b, not c.
*
* The last two paths (a & b) will contains a value. This value states that the path has reached its end.
*/
assert(path.size() > 1);
if (path_pos == path.size() - 1) {
// last insertion accompanied by ending value
Path *child = find_child(path(path_pos), step->children);

if (child != nullptr) {
assert(!child->result); // Cant already have a value
child->result = result;
} else {
create_path(step->children, path(path_pos), result);
}
} else {

Path *child;
if (path_pos == 0) {
child = find_child(path(path_pos), paths_);
} else {
child = find_child(path(path_pos), step->children);
}

if (child == nullptr && path_pos == 0) {
child = create_path(paths_, path(path_pos), std::nullopt);
} else if (child == nullptr) {
child = create_path(step->children, path(path_pos), std::nullopt);
}

return insert_path(path, result, child, path_pos + 1);
}
}

void get_wildcard_name(Path **wildcard, string_t &wildcard_name) {
/*
* /users/{uuid} and users/{uuid}/friends is allowed
* /users/{uuid} and users/{id}/friends is not allowed, because wildcards at the same positions must match
*
* This method walks down the chain until the wildcard_close_ character has been found. Everything between start and end is appended to the value.
*/
assert((*wildcard)->children.size() == 1);
if ((*wildcard)->children(0)->character != wildcard_close_) {
wildcard_name.append(1, (*wildcard)->children(0)->character);
*wildcard = (*wildcard)->children(0);
get_wildcard_name(wildcard, wildcard_name);
} else {
*wildcard = (*wildcard)->children(0);
}
}

string_t get_wildcard_value(string_t &path, size_t &pos) {
// Walks down the input until the trailing_wildcard_ is found or the end is reached, everything between equals the wildcard value
int begin = pos;
for (; pos < path.size() - 1; pos++) {
if (path(pos + 1) == trailing_wildcard_) {
return path.substr(begin, pos - begin + 1);
}
}
return path.substr(begin);
}

std::vector<Path *> paths_;
Result default_;
char wildcard_open_;
char wildcard_close_;
char trailing_wildcard_;

public:

PathMatcher(Result default_, char wildcard_open='{', char wildcard_close='}', char trailing_wildcard="https://codereview.stackexchange.com/")
: default_(default_), wildcard_open_(wildcard_open), wildcard_close_(wildcard_close), trailing_wildcard_(
trailing_wildcard) {}

virtual ~PathMatcher() {
for(size_t i = 0; i < paths_.size(); i++) {
delete paths_(i);
}
}

void add_path(string_t path, Result value) {
insert_path(path, value);
}

Result match(string_t path, Parameters &variables) {
/*
* Starts at paths_ and continues trying to find children matching the next characters in input path.
* If there is no child which matches the next character, but there was a wildcard_open_ as a child,
* the code jumps back to it and sets a Parameters value for the wildcard with its value and then continues normally.
*/
Path *step = find_child(path(0), paths_);
if (step == nullptr) return default_;

Path *lastWildcard = nullptr;
size_t lastWildcardPos;
size_t i = 1;
for (; i < path.size() - 1 && step != nullptr; i++) {

Path *nextWildcard = nullptr;
step = find_child(path(i), step->children, true, &nextWildcard);

if (nextWildcard != nullptr && nextWildcard != lastWildcard) {
lastWildcardPos = i;
lastWildcard = nextWildcard;
}
if (path(i) == trailing_wildcard_) {
lastWildcard = nullptr;
}

if (step == nullptr && lastWildcard != nullptr) {
i = lastWildcardPos;

string_t wildcard_name;
get_wildcard_name(&lastWildcard, wildcard_name);
string_t wildcard_value = get_wildcard_value(path, i);

if (i == path.size() - 1) {
// Wildcard value reaches end
if (!lastWildcard->result) return default_;
return lastWildcard->result.value();
} else {
step = lastWildcard;
}
}
}

if (step == nullptr) return default_;

Path *wildcard = nullptr;
Path *result = find_child(path(path.size() - 1), step->children, true, &wildcard);

if(result != nullptr && result->result) return result->result.value();
else if(wildcard != nullptr) {
// find wildcard ending and check if it contains a value
string_t wildcardName;
get_wildcard_name(&wildcard, wildcardName);

if(!wildcard->result) return default_;

string_t value = path.substr(path.size() - 1);
return wildcard->result.value();
}

return default_;
}
};
```

Dedicated Servers in US/EU/IN ✅ Ready Stock – 24 Hour Deployment ✅ Free 5 IPv4 ✅ Premium Network

Cenchu is one of the rapidly growing website hosting company based in India. We offer high-quality dedicated servers with unparalleled support around the clock. Our servers are hosting in TIER 3 and TIER 4 datacenter facilities ensuring greater uptime, and reliability.

Our Plans: (Note: Coupon will be automatically added on checkout  These plans are managed, when you choose unmanaged, you get 10\$ additional off for lifetime)

Xeon Quad Core  16GB RAM  2TB HDD  20TB Bandwidth  \$99/mo.  Buy Now

Xeon Hexa Core  24GB RAM  2TB HDD  20TB Bandwidth  \$139/mo.  Buy Now

Xeon Octa Core  32GB RAM  2TB HDD  20TB Bandwidth  \$179/mo.  Buy Now

NOTE: We can offer custom configuration servers at any of our Datacenter facilities. All servers in Kansas include 5 IPv4 and all other locations come with only 1 IPv4. You can get more IP addresses with any of our servers at any location for a small additional cost with or without IP justification. If you need servers with multiple IPs, you can feel free to contact us.

Datacenter Locations:

• Seattle, USA
• Chicago, USA
• Kansas, USA
• Dallas, USA
• Los Angeles, USA
• Miami, USA
• New York City, USA
• Phoenix, USA
• San Francisco, USA
• Frankfurt, Germany
• Mumbai, India
• Pune, India
• Chennai, India
• Delhi, India

Why our Dedicated Servers?

• Hosted in TIER 3 and 4 DC Facilities
• FREE Full-Management
• Around the clock support from experts
• 99.99% Uptime SLA
• 24×7 Monitored Network
• Free uptime monitoring

Payment Methods Accepted:

– PayPal

– Bitcoin

– UPI, Net-Banking, Indian Wallets, Visa, and MasterCard


text:
Checkout NEET 2022 Question Paper Analysis : Checkout NEET 2022 Question Paper Analysis :

# Optical Instrument MCQs For NEET

Optical instruments help in the magnification of images. The converging lenses used in optical instruments make things appear larger and diverging lenses make images appear smaller. Instruments like the microscope and telescope use multiple lenses to magnify the images.

Q1: A lens which converges a beam of parallel rays to a point is called

1. Diverging (or concave) lens
2. Converging (or convex) lens
3. Plano concave lens
4. Plano-convex lens

Answer: (b) Converging (or convex) lens

Q2: The diameter of a lens is called

1. Focal length
2. Principle axis
3. Aperture

Q3: In going from a denser to rarer medium a ray of light is

1. Undeviated
2. Bent away from the normal
3. Bent towards the normal
4. polarised

Answer: (b) Bent away from the normal

Q4: The power of a concave lens is

1. Real
2. Virtual
3. Positive
4. negative

Q5: Magnifying power of a simple microscope

1. Increases with increase in focal length
2. Increases with the decrease in focal length
3. No effect with decrease or increase with the focal length
4. Least distance of distinct vision

Answer: (b) Increases with the decrease in focal length

Q6: Magnification of astronomical telescope is

1. f0 + fe
2. f0/fe
3. fe/f0
4. (1+f0/fe)L/f0

Q7: The magnifying power of an astronomical telescope is 10 and the focal length of its eye-piece is 20 cm. The focal length of its objective will be

1. 200 cm
2. 2 cm
3. 0.5 cm
4. 0.5 x 10–2 cm

Q8: The magnifying power of a telescope is 9. When it is adjusted for parallel rays, the distance between the objective and the eye-piece is found to be 20 cm. The focal lengths of the lenses are

1. 18 cm, 2 cm
2. 11 cm, 9 cm
3. 10 cm, 10 cm
4. 15 cm, 5 cm

Answer: (a) 18 cm, 2 cm

Q9: In a compound microscope, magnifying power is 95 and the distance of the object from the objective lens is 1/38 cm. The focal length of the objective lens ¼ cm. What is the magnification of eyepiece?

1. 5
2. 10
3. 100
4. 200