Set-valued functors as the colimit of a certain diagram of representable functors Theorem 1. section 7 of chapter III(page 76), of Maclane's categories for working mathematicians, says any functor $K:\mathcal{D}\rightarrow Set$ can be represented as the colimit of a certain diagram of representable functors. I am a bit confused about this certain diagram, which in Maclane proof is given by $$J ^ \mathcal{D}\rightarrow Set^\mathcal{D}$$ where $J$ is the category of elements of $K$ (or $1 \downarrow K)$. What mkes me confused is that this functor is defined by $\left(d,x\right) \mapsto x$, where $d$ is an object of $\mathcal{D}$ and $x:* \rightarrow Kx$. 
First, I would like to ask what is this diagram of representable functors which can recover the $K$. 
Secondly, I would like to know what is the dual of this theorem (which supposedly establish an equivalence of any contravariant set valued functor with a limit of certain diagram of representable functors)
 A: There is a typo in Maclane. Not $J^D$, but $J$, or, more precisely, $J^{op}$(or we have to say that $M$ is contravariant).
Let $D$ be a locally small category, $K\colon D\to\mathbf{Set}$ be a functor. Category of elements of $K$ is the comma category $(*\downarrow K)$. There exists a natural projection:
$$
pr\colon(*\downarrow K)\to D,
$$
which sends every pair $(d,x)\in(*\downarrow K)$ to the object $d\in D$. You can also consider it's dual:
$$
pr^{op}\colon(*\downarrow K)^{op}\to D^{op}.
$$
Another functor we need - Yoneda functor:
$$
Y\colon D^{op}\to\mathbf{Set}^{D},
$$
which sends every object $d\in D$ to the representable functor $hom_D(d,-)$.
Now we can take the composition:
$$
(*\downarrow K)^{op}\xrightarrow{pr^{op}}D^{op}\xrightarrow{Y}\mathbf{Set}^{D}.
$$
Thus, we have the functor $M=Y\circ pr^{op}$:
$$
(*\downarrow K)^{op}\xrightarrow{M}\mathbf{Set}^D.
$$
There exists a cocone $\varphi\colon M\to\Delta_K$, such that $\varphi(d,x)=\alpha_x$, where $\alpha_x$ is the image of $x$ by the Yoneda-lemma-isomorphism $K(d)\cong Nat(hom_D(d,-),K)$. It is an exercise to check that cocone $\varphi$ is limiting, and, consequently, $K$ is the colimit of $M$. 
We can see that $M(d,x)$ is representable functor for any $(d,x)\in(*\downarrow K)$. Thus, functor $K$ is a colimit of a "diagram of representable functors".
