JavaScript Module & CORS error
Because of the way your browser implements JavaScript
modules this demo page needs to be loaded from a web server
over HTTP to work. You could upload the files somewhere, or
perhaps use a local web server like python3 -m
http.server or python -m SimpleHTTPServer or
ruby -run -e httpd . or http-server
from npm, or
osws -m -d .
— or any of the others from
this big
list of HTTP static server one-liners.
You could also load this page in Firefox, which permits local files to see their neighbours, or start Chrome with the --allow-file-access-from-files command-line option.
In practical use, if local-file access is important, you can
remove the last two lines from jq.js (the ones
starting export
) and then use
<script src="jq.js"></script>
<script>
let func = jq.compile(".x[].y")
for (let x of func(obj)) {
...
</script>
as usual.


Chapter 11 Equilibrium and Policy
11.1 Equilibrium Interest Rate and Tax
Go back to fan’s MEconTools Package, Matlab Code Examples Repository (bookdown site), or Math for Econ with Matlab Repository (bookdown site).
We have previous solved the household’s asset supply problem with a borrowing constraint. And also the firm’s asset demand problem. We used first order taylor approximation to solve for the approximate equilibrium interest rate before for the firm’s asset demand problem and for the households’ savings problem without borrowing constraint. Here we find equilibrium interest rate with the constrained borrowing problem. I will analyze the effect of an interest rate (borrowing) rate subsidy for firms and borrowing households that is paid for by savings tax.
11.1.1 How do households with different \(\beta\) respond to changes in \(r\) given Borrowing Constraint?
Following our previous discussions, the household’s borrowing constrained problem is:
specifically: \(\max_b \log (Z_1 -b)+\beta_i \cdot \log (Z_2 +b\cdot (1+r))\)
with: \(b\ge \bar{b}\)
I introduce now heterogeneity in \(\beta\). There are \(N=3\) households, each with a different \(\beta_i\). Note that lower \(\beta\) household at the same interest rate \(r\) will be more interested in borrowing rather than saving. The households have the same \(Z\) and face the same \(\bar{b}\). Look at the graph below, at some interest rate, all three households want to borrow, at other rates, some want to borrow and others want to save.
clear all
% Parameters
z1 = 12;
z2 = 10;
b_bar_num = -1; % borrow up to 1 dollar
% Vector of 3 betas
beta_vec = [0.75 0.85 0.95];
% Vector of interest rates
r_vec = linspace(0.6, 1.40, 100);
% What we had from before to use fmincon
A = [-1];
q = -b_bar_num;
b0 = [0]; % starting value to search for optimal choice
% A vector to store optimal choices
rows = length(r_vec);
cols = length(beta_vec);
b_opti_mat = zeros(rows, cols);
% Solving for optimal choices as we change Z2
for j=1:1:length(beta_vec)
for i=1:1:length(r_vec)
U_neg = @(x) -1*(log(z1 - x(1)) + beta_vec(j)*log(z2 + x(1)*r_vec(i)));
options = optimoptions('FMINCON','Display','off');
[x_opti,U_at_x_opti] = fmincon(U_neg, b0, A, q, [], [], [], [], [], options);
b_opti_mat(i, j) = x_opti(1);
end
end
% Plot Results
legendCell = cellstr(num2str(beta_vec', '\beta=%3.2f'));
figure()
% Individual Demands at different Interest Rate Points
plot(r_vec, b_opti_mat)
ylim([-1.1 1]);
xlim([min(r_vec) max(r_vec)]);
hold on
plot(r_vec,ones(size(r_vec)) * 0, 'k-.');
grid on;
title('Individual Borrowing/Savings')
ylabel('Optimal Savings Choice')
xlabel('interest rate')
legend(legendCell, 'Location','northwest');
11.1.2 Aggregate Household Excess Supply along Interest Rate
When we solved for the equilibrium interest rate before, we had a firm that demanded credit and a household that supplied credit. Now we are more flexible, as shown in the chart above, households could be supplying or demanding credit. The equilibrium now is about clearing the aggregate demand and supply for the credit market considering both firms and households where households now could either be on demand or supply side. At a particular \(r\), if households all want to borrow, there will be no lending, so that particular interest rate will not clear market. We will increase interest rate until some households are willing to save. Eventually, we find the market clearning interest rate.
If the economy has on the household side exactly these three households, we can sum the aggregate demand and supply for credit at each \(r\) from the households by summing across the \(b^* (r,\beta_i )\). If households with these three different discount factors are in different proportions in the data for a particular country, we can sum up the weighted average.
- Aggregate Household Excess Supply: \(B_{hh}^* =\sum_{i=1}^3 b^* (r,\beta_i )\)
figure()
hold on;
% Aggregate demand (borrow meaning negative) and supply (saving positive) for households,
% just add sum (the 2 means sum over columns), it will sum across columns, each column is a different individual
plot(r_vec, sum(b_opti_mat, 2))
plot(r_vec,ones(size(r_vec)) * 0, 'k-.');
ylim([-5 5]);
xlim([min(r_vec) max(r_vec)]);
grid on;
title('Aggregates Households')
ylabel({['Aggregate Household Net Saving Borrowing'], ['(over 3 household \beta types)']})
xlabel('interest rate')
legend({'HH Net B Supply'}, 'Location','northwest');
11.1.3 Firm Demand for Credit
We also have the aggregate Demand for the firm side based on the firm’s capital only problem, with \(\alpha_l\) for elasticity of labor, and \(\alpha_k\) for elasticity of capital, and \(L\) is fixed at 1:
- Firm Demand For Capital: \(K_{firm}^* ={\left(\frac{r}{p\cdot A\cdot \alpha \cdot L^{\alpha_l } }\right)}^{\frac{1}{\alpha_k -1}}\)
figure()
% Aggregate demand from firms (borrowing from firms)
p = 1;
A = 2.5;
alpha_K = 0.36;
alpha_L = 0.5;
L = 1;
FIRM_K = (r_vec./(p*A*alpha_K*(L^alpha_L))).^(1/(alpha_K-1));
% Individual Demands at different Interest Rate Points
plot(r_vec, (-1)*FIRM_K)
ylim([-5 5]);
xlim([min(r_vec) max(r_vec)]);
hold on
plot(r_vec,ones(size(r_vec)) * 0, 'k-.');
grid on;
title('Firm demand for Capital (borrowing)')
ylabel('Optimal Firm Choice')
xlabel('interest rate')
11.1.4 Economy Wide Excess Supply for Credit (Firm + Households)
The firm is demanding credit (it is borrowing), so we put a negative sign in front of \(K\) demanded:
Economy-wide excess supply of Credit: \(\textrm{ExcesCreditSupply}(r)=B_{hh}^* (r)-K_{firm}^* (r)\)
If the term above is positive that means total saving from households is greater than total borrowing from households and firms.
Equilibrium interest rate is the interest rate where excess credit supply is equal to zero:
- to find equilibrium interest rate: find \(r^{equi}\), where at this interest rate: \(B_{hh}^* (r^{equi} )-K_{firm}^* (r^{equi} )=0\)
% Summing up to get excess credit supply
excess_credit_supply = (sum(b_opti_mat, 2) + (-1)*FIRM_K');
% find at which interest rate we are closest to zero
[excess_credit_supply_at_equi, equi_idx_in_rvec] = min(abs(excess_credit_supply));
equilibrium_r = r_vec(equi_idx_in_rvec);
lowbeta_hh_b_equi = b_opti_mat(equi_idx_in_rvec, 1);
midbeta_hh_b_equi = b_opti_mat(equi_idx_in_rvec, 2);
highbeta_hh_b_equi = b_opti_mat(equi_idx_in_rvec, 3);
FIRM_K_equi = -FIRM_K(equi_idx_in_rvec);
results_withno_tax = table(equilibrium_r, excess_credit_supply_at_equi, equi_idx_in_rvec, FIRM_K_equi, lowbeta_hh_b_equi, midbeta_hh_b_equi, highbeta_hh_b_equi);
disp(results_withno_tax)
equilibrium_r excess_credit_supply_at_equi equi_idx_in_rvec FIRM_K_equi lowbeta_hh_b_equi midbeta_hh_b_equi highbeta_hh_b_equi
_____________ ____________________________ ________________ ___________ _________________ _________________ __________________
1.0364 0.022569 55 -0.80217 -0.37092 0.29777 0.89789
Note that our equilibrium is an approximation, because we only had a grid of \(r\), the excess total supply is \(0.023\), which is close to \(0\), but not actualy \(0\). The numbers above show that our equilibrium interest rate is approximately \(1.036\), and at this equilibrium out of our three households and firm:
the firm borrows: \(0.80217\) (this is \(K\), based on which we can find total output \(Y\))
household 1 borrow: \(0.37\)
household 2 saves: \(0.30\)
household 3 saves: \(0.89\)
These sum up to approximately \(0\). Note that none of our three households is borrowing constrained at the equilibrium. We can redraw the chart earlier and show the aggregate demand and supply for credit \(B_{hh}\) from the household side:
figure()
subplot(1,2,1)
hold on;
% Aggregate demand (borrow meaning negative) and supply (saving positive) for households,
% just add sum (the 2 means sum over columns), it will sum across columns, each column is a different individual
plot(r_vec, sum(b_opti_mat, 2))
plot(r_vec, (-1)*FIRM_K)
plot(r_vec,ones(size(r_vec)) * 0, 'k-.');
ylim([-5 5]);
xlim([min(r_vec) max(r_vec)]);
grid on;
title('Aggregates HH and Firms')
ylabel({['Aggregate Household Net Saving Borrowing (blue)'], ['Firm demand for Capital (borrowing, orange)']})
xlabel('interest rate')
legend({'HH Net B Supply', 'Firm Demand for K'}, 'Location','northwest');
subplot(1,2,2)
hold on;
% Total Aggregate Net Demand for Credit at each R
plot(r_vec, excess_credit_supply, 'k', 'LineWidth', 2);
% Plot equilibrium interest rate line
plot(equilibrium_r*ones(1,10), linspace(min(excess_credit_supply), max(excess_credit_supply),10), '--', 'LineWidth', 2);
% Zero line
plot(r_vec,ones(size(r_vec)) * 0, 'k-.');
ylim([-5 5]);
xlim([min(r_vec) max(r_vec)]);
grid on;
title('Net Excess Supply of Credit')
ylabel({['Economy Wide Excess Supply for Credit'], ['(over 3 household \beta types + Firm)']})
xlabel('interest rate')
legend({'Excess Supply', ['Equilibrium r=' num2str(equilibrium_r)]}, 'Location','northwest');
11.1.5 Demand and Supply for Credit with a Tax on Interest Rate
Suppose some government officials thinks we need to subsidize borrowing. They want to make it easier for households to borrow and also for firms to borrow. This sounds fantastic. Because if borrowing rate is lower for firm, the firm can borrow more in physical capital and increase output. How to pay for it? The officials decide to pay for it by taxing savings. Perhaps people with too much savings can take a cut on their interest rate earnings.
For the firm, this is just a discount on the borrowing rate. For households, this means if you save, you get your principle back next period, but you only get \(1-\tau\) fraction of the interest rate earning. But if you borrow, you only pay \(1-\tau\) fraction of your interest, rather than the full amount. Our problem remains the same as before, except that we need to resolve given the tax rate now. Let’s apply the discount in borrowing to both households that borrow and firms that borrow:
Household problem with borrowing discount and saving tax:
- \(\displaystyle \max_b \log (Z_1 -b)+\beta_i \cdot \log (Z_2 +b+b\cdot (r)(1-\tau ))\)
Firm optimal Policy function with borrowing discount:
- \(\displaystyle K_{firm}^* ={\left(\frac{r\cdot (1-\tau )}{p\cdot A\cdot \alpha \cdot L^{\alpha_l } }\right)}^{\frac{1}{\alpha_k -1}}\)
Note: this policy pays for itself because the credit market clears, so government income from the savings tax will pay for exactly its subsidy on borrowing.
Suppose \(\tau =0.10\), let’s solve for the new optimal choices and equilibrium given this tax policy. We re-use our previous codes but include now the tax:
tau = 0.10;
% Households' problem with Interest Tax and Subsidy
% A vector to store optimal choices
b_opti_mat = zeros(rows, cols);
% Solving for optimal choices as we change Z2
for j=1:1:length(beta_vec)
for i=1:1:length(r_vec)
U_neg = @(x) -1*(log(z1 - x(1)) + beta_vec(j)*log(z2 + x(1)*r_vec(i)*(1-tau)));
options = optimoptions('FMINCON','Display','off');
[x_opti,U_at_x_opti] = fmincon(U_neg, b0, A, q, [], [], [], [], [], options);
b_opti_mat(i, j) = x_opti(1);
end
end
% Firm's problem with interest tax and subsidy
FIRM_K = ((r_vec*(1-tau))./(p*A*alpha_K*(L^alpha_L))).^(1/(alpha_K-1));
% Approximate equilibrium
excess_credit_supply = (sum(b_opti_mat, 2) + (-1)*FIRM_K');
[excess_credit_supply_at_equi, equi_idx_in_rvec] = min(abs(excess_credit_supply));
equilibrium_r = r_vec(equi_idx_in_rvec);
% Grab Results
lowbeta_hh_b_equi = b_opti_mat(equi_idx_in_rvec, 1);
midbeta_hh_b_equi = b_opti_mat(equi_idx_in_rvec, 2);
highbeta_hh_b_equi = b_opti_mat(equi_idx_in_rvec, 3);
FIRM_K_equi = -FIRM_K(equi_idx_in_rvec);
results_with_tax = table(equilibrium_r, excess_credit_supply_at_equi, equi_idx_in_rvec, FIRM_K_equi, lowbeta_hh_b_equi, midbeta_hh_b_equi, highbeta_hh_b_equi);
results_table = [results_withno_tax;results_with_tax];
results_table.Properties.RowNames = {'no r tax/subsidy', ['r tax/subsidy tau=' num2str(tau)]};
disp(results_table)
equilibrium_r excess_credit_supply_at_equi equi_idx_in_rvec FIRM_K_equi lowbeta_hh_b_equi midbeta_hh_b_equi highbeta_hh_b_equi
_____________ ____________________________ ________________ ___________ _________________ _________________ __________________
no r tax/subsidy 1.0364 0.022569 55 -0.80217 -0.37092 0.29777 0.89789
r tax/subsidy tau=0.1 1.2222 0.017077 78 -0.73085 -0.051952 0.39988 0.4
The table above compares the results with the tax and without. With the tax, the approximate equilibrium interest rate has to be higher because with the tax rate at the previous interest rate more people want to borrow (given the borrowing discount) and less people want to save (given the tax). To find the point where demand equals supply, interest rate increases to incentivize households to save despite the tax. In equilibrium, we now have a much higher interest rate that clears that market. Note that compared to before, firms are borrowing less, so output is now lower due to the higher equilibrium interest rate. The policy is potentially having the opposite of its intended effect. We solve for the general equilibrium effects of policies to help us think about these unintended consequences of policies.
figure()
subplot(1,2,1)
hold on;
% Aggregate demand (borrow meaning negative) and supply (saving positive) for households,
% % just add sum (the 2 means sum over columns), it will sum across columns, each column is a different individual
plot(r_vec, sum(b_opti_mat, 2))
plot(r_vec, (-1)*FIRM_K)
plot(r_vec,ones(size(r_vec)) * 0, 'k-.');
ylim([-7 2]);
xlim([min(r_vec) max(r_vec)]);
grid on;
title(['Aggregates HH and Firms, tau=' num2str(tau)])
ylabel({['Aggregate Household Net Saving Borrowing (blue)'], ['Firm demand for Capital (borrowing, orange)']})
xlabel('interest rate')
legend({'HH Net B Supply', 'Firm Demand for K'}, 'Location','northwest');
subplot(1,2,2)
hold on;
% Total Aggregate Net Demand for Credit at each R
plot(r_vec, excess_credit_supply, 'k', 'LineWidth', 2);
% Plot equilibrium interest rate line
plot(equilibrium_r*ones(1,10), linspace(min(excess_credit_supply), max(excess_credit_supply),10), '--', 'LineWidth', 2);
% Zero line
plot(r_vec,ones(size(r_vec)) * 0, 'k-.');
ylim([-7 2]);
xlim([min(r_vec) max(r_vec)]);
grid on;
title(['Net Excess Supply of Credit, tau=' num2str(tau)])
ylabel({['Economy Wide Excess Supply for Credit'], ['(over 3 household \beta types + Firm)']})
xlabel('interest rate')
legend({'Excess Supply', ['Equilibrium r=' num2str(equilibrium_r)]}, 'Location','northwest');
11.2 Equilibrium Interest Rate and Wage Rate
Go back to fan’s MEconTools Package, Matlab Code Examples Repository (bookdown site), or Math for Econ with Matlab Repository (bookdown site).
We have solved for the problem with constrained labor and saving/borrowing choice, and the problem with saving/borrowing and tax.
11.2.1 Household and Firm’s Problem
Following our previous discussions, the household’s borrowing constrained problem is:
- specifically: \(\max_{b,\textrm{work},\textrm{leisure}} \log (Z_1 +w\cdot \textrm{work}-b)+\psi \log (\textrm{leisure})+\beta \cdot \log (Z_2 +b\cdot (1+r))\)
And the constraints are:
\(\displaystyle b\ge \bar{b}\)
\(\displaystyle \textrm{work}\ge 0\)
\(\displaystyle \textrm{leisure}\ge 0\)
\(\textrm{work}+\textrm{leisure}\le T\), where \(T\) is total time available
There are \(N=3\) households, each with a different \(\beta_i\).
For the firm, we have solved previously for the firm’s optimal choices given \(w\) and \(r\):
- \(\displaystyle \max_{K,L} \left(p\cdot A\cdot K^{\alpha } \cdot L^{\beta } -r\cdot K-w\cdot L\right)\)
11.2.2 Setting Up Parameters
Solve with three different discount rates, and different \(r\) and \(w\). First, let’s set up some parameters. The firm here has decreasing return to scale, let’s ignore the issue of profit when looking for equilibrium.
clear all
% Parameters for the Household
psi = 0.5;
z1 = 1;
z2 = 2;
b_bar_num = -1; % borrow up to 1 dollar
T = 1; % think about time as share of time in a year
% Parameters for the firm
p = 1;
alpha = 0.3;
beta = 0.5;
Aproductivity = 2.0;
% Vector of 3 betas
beta_vec = [0.85 0.90 0.95];
% Vector of interest rates
R_vec = linspace(0.60, 2.50, 30);
% Vector of wage rates, 3 wage rates for now
W_vec = linspace(0.6, 2, 15);
% What we had from before to use fmincon
A = [-1,0,0;0,0,-1;0,-1,0;0,1,1];
q = [-b_bar_num;0;0;T];
b0 = [0,0.5,0.5]; % starting value to search for optimal choice
11.2.3 Household Labor Supply and Borrow/Save with different \(\beta\) and \(r\) ?
In the problem without labor supply I showed different excess supply of credit for each \(\beta_i\) household, we can do the same here for excess credit supply, but that is too much to show. I will just sum up the total across the households for both excress credit supply and total work hours:
Aggregate Household Excess Supply: \(B_{hh}^* (r,w)=\sum_{i=1}^3 b^* (r,w,\beta_i )\)
Aggregate Household Labor Supply: \({\textrm{WORK}}_{hh}^* (r,w)=\sum_{i=1}^3 {\textrm{work}}^* (r,w,\beta_i )\)
I store results in a matrix where each row correspond to an interest rate level and each color a wage rate.
% Various Matrixes to store optimal choices
rows = length(R_vec);
cols = length(W_vec);
wage_dim_len = length(W_vec);
b_opti_mat = zeros(rows, cols);
worKOpti_mat = zeros(rows, cols);
leisure_opti_mat = zeros(rows, cols);
c1_opti_mat = zeros(rows, cols);
c2_opti_mat = zeros(rows, cols);
% Solving for optimal choices as we change Z2
for i=1:1:length(R_vec)
for j=1:1:length(W_vec)
% Initialize aggregate household statistics given r and w
agg_b_supply_at_w_r = 0;
agg_work_at_w_r = 0;
agg_leisure_at_w_r = 0;
agg_c1_at_w_r = 0;
agg_c2_at_w_r = 0;
for h=1:1:length(beta_vec)
% Solve
U_neg = @(x) -1*(log(z1 + W_vec(j)*x(2) - x(1)) + psi*log(x(3)) + beta_vec(h)*log(z2 + x(1)*(R_vec(i))));
options = optimoptions('FMINCON','Display','off');
[x_opti,U_at_x_opti] = fmincon(U_neg, b0, A, q, [], [], [], [], [], options);
% Sum up at current r and w for all households
agg_b_supply_at_w_r = agg_b_supply_at_w_r + x_opti(1);
agg_work_at_w_r = agg_work_at_w_r + x_opti(2);
agg_leisure_at_w_r = agg_leisure_at_w_r + x_opti(3);
agg_c1_at_w_r = agg_c1_at_w_r + z1 + W_vec(j)*x_opti(2) - x_opti(1);
agg_c2_at_w_r = agg_c2_at_w_r + z2 + x_opti(1)*(R_vec(i));
end
% Store aggregate Household statistics
b_opti_mat(i, j) = agg_b_supply_at_w_r;
worKOpti_mat(i, j) = agg_work_at_w_r;
leisure_opti_mat(i, j) = agg_leisure_at_w_r;
c1_opti_mat(i, j) = agg_c1_at_w_r;
c2_opti_mat(i, j) = agg_c2_at_w_r;
end
end
11.2.4 Firm’s Demand for Capital and Labor
The firm’s problem loops over \(r\) and \(w\), do not need to loop over \(\beta_i\). We get here:
Firm Demand For Capital: \(K_{firm}^* (r,w)\)
Firm Demand For Labor: \(L_{firm}^* (r,w)\)
% Various Matrixes to store optimal choices
rows = length(R_vec);
cols = length(W_vec);
K_demand_mat = zeros(rows, cols);
L_demand_mat = zeros(rows, cols);
% We solved before optimal choices
syms w r
% Matrix Form of linear system, same as before
B = [log(r/(p*Aproductivity*alpha)); log(w/(p*Aproductivity*beta))];
A = [(alpha-1), beta;alpha, beta-1];
% Solve linear equations, and then exponentiate, same as before
% We can use the simplify command to simplify this solution, get rid of exp and log:
lin_solu = simplify(exp(linsolve(A, B)));
KOpti = lin_solu(1)
KOpti =
1em \(\displaystyle \frac{9\,\sqrt{15}}{125\,r^{5/2} \,w^{5/2} }\)
LOpti = lin_solu(2)
LOpti =
1em \(\displaystyle \frac{3\,\sqrt{15}}{25\,r^{3/2} \,w^{7/2} }\)
% Solving for optimal choices as we change Z2
for i=1:1:length(R_vec)
for j=1:1:length(W_vec)
K_demand_mat(i,j) = subs(KOpti,{r,w},{R_vec(i), W_vec(j)});
L_demand_mat(i,j) = subs(LOpti,{r,w},{R_vec(i), W_vec(j)});
end
end
11.2.5 Demand and Supply for Capital
We can graph out from the firm and household problem demand and supply for capital
figure();
% Household b (some borrow some save added up)
subplot(1,2,1);
hold on;
chart = plot(R_vec, b_opti_mat);
% Show smoother colors
clr = jet(numel(chart));
for m = 1:numel(chart)
set(chart(m),'Color',clr(m,:))
end
plot(R_vec,ones(size(R_vec)) * 0, 'k-.');
xlim([min(R_vec) max(R_vec)]);
ylim([-4, 2]);
grid on;
title('Household Net B Supply')
ylabel({['Aggregate Household Net Saving Borrowing'], ['(over 3 household \beta types)']})
xlabel('1+r')
% Firm's Graph
subplot(1,2,2)
hold on;
chart = plot(R_vec, -K_demand_mat);
% Show smoother colors
clr = jet(numel(chart));
for m = 1:numel(chart)
set(chart(m),'Color',clr(m,:))
end
plot(R_vec,ones(size(R_vec)) * 0, 'k-.');
xlim([min(R_vec) max(R_vec)]);
ylim([-4, 2]);
grid on;
title('-1*(Firm K Demand)')
ylabel('Firm Demand for Capital (Decreasing Return to Scale)')
xlabel('1+r')
legend2plot = [1 round(numel(chart)/2) numel(chart)];
legendCell = cellstr(num2str(W_vec', 'wage=%3.2f'));
legend(chart(legend2plot), legendCell(legend2plot), 'Location','southeast');
11.2.6 Demand and Supply for Labor Demand and Supply
We now generate the same graphs for Labor
figure();
% Household b (some borrow some save added up)
subplot(1,2,1);
chart = plot(R_vec, worKOpti_mat);
% Show smoother colors
clr = jet(numel(chart));
for m = 1:numel(chart)
set(chart(m),'Color',clr(m,:))
end
xlim([min(R_vec) max(R_vec)]);
ylim([0,6]);
grid on;
title('Household Work Supply')
ylabel({['Aggregate Household Work Hours'], ['(over 3 household \beta types)']})
xlabel('1+r')
% Firm's Graph
subplot(1,2,2)
chart = plot(R_vec, L_demand_mat);
% Show smoother colors
clr = jet(numel(chart));
for m = 1:numel(chart)
set(chart(m),'Color',clr(m,:))
end
xlim([min(R_vec) max(R_vec)]);
ylim([0,6]);
grid on;
title('Firm L Demand')
ylabel('Firm Demand for Labor (Decreasing Return to Scale)')
xlabel('1+r')
legendCell = cellstr(num2str(W_vec', 'wage=%3.2f'));
legend(legendCell, 'Location','northeast');
11.2.7 Excess Demand for Capital and Labor
We can sum up the firm and household sides to try to find the \(r\) and \(w\) where demand and supply are equalized.
Economy-wide excess supply of Credit: \(\textrm{ExcesCreditSupply}(r,w)=B_{hh}^* (r,w)-K_{firm}^* (r,w)\)
Economy-wide excess supply of Credit: \(\textrm{ExcesLaborSupply}(r,w)={\textrm{WORK}}_{hh}^* (r,w)-L_{firm}^* (r,w)\)
figure();
% Household and Firm Excess Credit Supply, aggregated together
subplot(1,2,1);
hold on;
chart = plot(R_vec, b_opti_mat-K_demand_mat);
% Show smoother colors
clr = jet(numel(chart));
for m = 1:numel(chart)
set(chart(m),'Color',clr(m,:))
end
plot(R_vec,ones(size(R_vec)) * 0, 'k-.');
xlim([min(R_vec) max(R_vec)]);
grid on;
title('HH + Firm Excess Credit Supply')
ylabel({['Economy Wide Excess Supply for Credit'], ['(over 3 household \beta types + Firm)']})
xlabel('1+r')
% Firm's Graph
subplot(1,2,2);
hold on;
chart = plot(R_vec, worKOpti_mat - L_demand_mat);
% Show smoother colors
clr = jet(numel(chart));
for m = 1:numel(chart)
set(chart(m),'Color',clr(m,:))
end
plot(R_vec,ones(size(R_vec)) * 0, 'k-.');
xlim([min(R_vec) max(R_vec)]);
grid on;
title('HH + Firm Excess Labor Supply')
ylabel({['Economy Wide Excess Supply for Labor'], ['(over 3 household \beta types + Firm)']})
xlabel('1+r')
legendCell = cellstr(num2str(W_vec', 'wage=%3.2f'));
legend(legendCell, 'Location','southeast');
11.2.8 \(w\) and \(r\) Equilibrium
Now let’s do a final sum we want to find where both aggregate labor and capital clear.
figure();
% Aggregate Excess Supplies
excess_credit_supply = abs(b_opti_mat - K_demand_mat);
excess_labor_supply = abs(worKOpti_mat - L_demand_mat);
We need to take the absolute values of the two differences above and sum them up. The equilibrium is approximately where the sum of the two matrixes is the closest to \(0\).
DS_KL_DIFF = excess_credit_supply + excess_labor_supply;
[DS_KL_diff_EQUI_val, EQUI_IDX] = min(min(DS_KL_DIFF));
[r_idx, w_idx]=find(DS_KL_DIFF==DS_KL_diff_EQUI_val);
equi_r = R_vec(r_idx);
equi_w = W_vec(w_idx);
equi_price = table(equi_r, equi_w);
disp(equi_price);
equi_r equi_w
______ ______
2.0414 0.7
% Both should be zero (if the scale of L and K are very different this would not work well)
% We can sum up the two and look for r and w closest to zero
subplot(1,2,1);
chart = plot(R_vec, DS_KL_DIFF);
% Show smoother colors
clr = jet(numel(chart));
for m = 1:numel(chart)
set(chart(m),'Color',clr(m,:))
end
xlim([min(R_vec) max(R_vec)]);
grid on;
title('abs(Excess K) + abs(Excess L)')
ylabel({['Economy Wide Excess Supply for Credit'], ['(over 3 household \beta types + Firm)']})
xlabel('1+r')
legendCell = cellstr(num2str(W_vec', 'wage=%3.2f'));
legend(legendCell, 'Location','northeast');
% Firm's Graph
subplot(1,2,2)
mesh(R_vec, W_vec, DS_KL_DIFF');
view([30.1 3.6]);
title('abs(Excess K) + abs(Excess L)')
ylabel('wage')
xlabel('1+r')


Clicking on "Monitor 1st tier queue" will create a new pinned tab
which will be monitored in the background.
Once a ticket in that queue has 90 minutes or less according to SLA you will be notified.
Clicking on "Monitor this queue" will duplicate current tab
to a new pinned tab which will be monitored in the background.
Once a ticket in that queue has 90 minutes or less according to SLA you will be notified.
Pleaes make sure you are viewing a queue in order to use this functionality.
Clicking on "Stop monitoring this queue" will disable monitoring for the specific tab you are on.
There is no "Enable" button, so if you regret stopping you may use "Monitor this queue"
and have a duplicate created.
"Monitor Priority" is a toggle button.
When active (green background) you will get notified when there are tickets in priority queue.
You have to monitor a queue to use this addon.
"Mute" is a toggle button.
When active notifications will have a sound effect.
When muted notifications will be silent.
Clicking on a notification will soone that notification type for 5 minutes.
Clicking on the notification "Snooze" button will snooze for the configured time .


Water Dragon's Shamaness Parme:
The Shamaness' eyes stare into space, blank and unfocused.
There are no visible injunes, but she looks as though she is under some kind of evil spell.
Quest.


-
Google Discussiegroepen
groups.google.com
Met Google Discussiegroepen kun je online forums en e-mailgroepen maken en eraan deelnemen. Bovendien profiteer je van uitgebreide ...
-
Aral Balkan — Ello, goodbye.
aralbalkan.com
26 Sep, 2014 Ello, it’s been brief but I’m leaving you for your own good.
-
iPhone camera evolution: How does the iPhone 6 camera compare to previous ...
snapsnapsnap.photos
How does the iPhone 6 camera stack up against previous hardware? In her ongoing series, professional iPhone photographer Lisa Bettany takes a hard ...
-
Twitter / Recherche - #worldcup
twitter.com
Le meilleur des derniers Tweets à propos de #worldcup. Lisez ce que les gens disent et rejoignez la conversation.
-
Coursera
www.coursera.org
Take free online classes from 80+ top universities and organizations. Coursera is a social entrepreneurship company partnering with Stanford ...
-
Ello | waxpancake
ello.co
Ello is a beautiful, simple, and ad-free social network. The Ello interface supports posting and private messaging. Ello allows users to share ...
-
Watching what happens: The New York Times is making a front-page bet on ...
www.niemanlab.org
A new homepage feature called "Watching" offers readers a feed of headlines, tweets, and multimedia from around the web.
-
Burn Baby Burn – AVC
avc.com
Andy sent me a WSJ piece with Bill Gurley yesterday. I don’t like to link to paid content so here’s a good Business Insider summary of the article ...
-
Breaking News, World News & Multimedia
www.nytimes.com
The New York Times: Find breaking news, multimedia, reviews & opinion on Washington, business, sports, movies, travel, books, jobs, education, real ...
-
MAYDAY.US: Democracy needs an upgrade. Act now.
mayday.us
Money has corrupted politics. Join MAYDAY.US - the movement to end this corruption.
-
Inside the building where Apple tortures the iPhone 6
www.theverge.com
A few blocks away from Apple's bustling campus in Cupertino is a rather nondescript building. Inside is absolutely the last place on earth you'd want ...
-
One secret to the success of Quartz, BuzzFeed and Gawker: They look at ...
gigaom.com
Most traditional media outlets are used to thinking of journalism or news as something they create and then distribute to a waiting audience — but ...
-
Miss a Payment? Good Luck Moving That Car - NYTimes.com
dealbook.nytimes.com
The thermometer showed a 103.5-degree fever, and her 10-year-old’s asthma was flaring up. Mary Bolender, who lives in Las Vegas, needed to get her ...
-
Lecture 1 - How to Start a Startup
www.youtube.com
Sam Altman and Dustin Moskovitz start off the How to Start a Startup Course. Sam's topic is "Ideas, Products, Teams and Execution, Part I" and ...
-
Diversity, Strong Editing and Moving Forward from the Shonda Rhimes Furor ...
publiceditor.blogs.nytimes.com
In more than two years as public editor at The Times, I’ve encountered very few subjects that have aroused as much passion and reaction as an Arts ...
-
New York Times Expands Newsroom Leadership to Address Shifts in Industry
www.nytimes.com
The executive editor, Dean Baquet, is phasing out the managing editor, a title that had been used for decades, and promoting four senior editors to ...
-
Scorpion Brings the Stupidest, Most Batshit Insane Hacker Scene Ever
io9.com
So Scorpion debuted last night on CBS, bringing us the thrilling tale of "geniuses" who help DHS by setting up wifi access points in restaurants. ...
-
On a Shoestring, India Sends Orbiter to Mars on Its First Try
www.nytimes.com
A spacecraft nicknamed MOM successfully reached Mars orbit Wednesday, making India the first nation to accomplish the feat on a maiden voyage.
-
How the Ray Rice scandal unfolded
espn.go.com
Outside the Lines: A pattern of misinformation and misdirection was employed by the Baltimore Ravens and the NFL after Ray Rice hit his wife.
-
Ways to think about watches
ben-evans.com
Standing in Cupertino last week, holding an Apple watch in my hand, I was reminded very much of the original iPad launch. Here is an idea for a new ...
-
Facebook updates its algorithm (yet) again. Here's what to expect.
gigaom.com
Facebook has tweaked its algorithm to surface more timely stories. Is the company trying to redeem itself from the Ferguson-Ice Bucket feed problem?
-
The Boring Designer • Cap Watkins
blog.capwatkins.com
Whenever I’m looking at a product designer’s work, I find myself continuously asking the same question: which solution is the boring one? Maybe it’s ...
-
Apple - Privacy
www.apple.com
At Apple, we respect your privacy and protect it with strong encryption, plus strict policies that govern how all data is handled.
-
Flight: Twitter's Mobile Developer Conference
www.twitterflight.com
Flight is a gathering built by developers, for developers. You'll be right at home if you live, breathe and occasionally dream in Java, Objective-C, ...
-
Steve Jobs Was a Low-Tech Parent - NYTimes.com
www.nytimes.com
When Steve Jobs was running Apple, he was known to call journalists to either pat them on the back for a recent article or, more often than not, ...
-
Inside Apple's Live Event Stream Failure, And Why It Happened: It Wasn't A ...
blog.streamingmedia.com
Apple's live stream of the unveiling of the iPhone 6 and Watch was a disaster today right from the start, with many users like myself having problems ...
-
The Official Microsoft ASP.NET Site
www.asp.net
ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.


Download Weather Data
Use the form to download historical weather data using
The Weather Company (An IBM Business) API
- Get your API key by purchasing weather company data from
here
- Zipcodes only work for USA.
- Weather data can be provided only for historical dates.
"From Date" should be before the "To Date".
- Hourly and Daily data give back different weather features.


On Monday I began a three day journey into Hell. By Hell, I of course mean the scourge known as Funtoo Linux. A bit of background before I begin: Funtoo is a derivative of Gentoo, the distribution that is known for being notoriously laborious to install and keep stable. There are minor differences in Funtoo and Gentoo, those being that Funtoo has a precompiled kernel available, doesn't have documentation nearly as good as Gentoo, and uses git instead of rsync for some things. Of course, these differences are irrelevant in the grand scheme of things, as Funtoo is supposed to be 100% compatible with upstream Gentoo. I didn't install Funtoo for these edits, I installed it because judging by its name, I assumed it would simply be a fun version of Gentoo. It is not a fun version of Gentoo, but a worse version. Never make the mistake I did, and install Funtoo. With outdated documentation, I spent three days struggling through compiling and configuring xorg and my touchpad, with my touchpad never working. I gave up and reinstalled Arch Linux, and will attempt vanilla Gentoo soon.


All these pictures are taken from Chicago Photo Concepts. A personal Friend. If you like his work Check him out on facebook here


Welcome,
Parth Kulkarni
Ride history
Ride Id
Driver Name
Pickup Time
Drop Off Time
Fare
To
From
Book a Ride


An Impatient New User's Introduction to API Management with JBoss apiman 1.0
Jan 9, 2015 Len DiMaggio introduction and overviewNote: A newer revision of this blogpost for apiman 1.2.x can be found here. This version was written for apiman 1.1.x.
Software application development models are evolutionary things. New technologies are always being created and require new approaches. It’s frequently the case today, that a service oriented architecture (SOA) model is used and that the end product is a software service that can be used by applications. The explosion in growth of mobile devices has only accelerated this trend. Every new mobile phone sold is another platform onto which applications are deployed. These applications are often built from services provided from multiple sources. The applications often consume these services through their APIs.
OK, that’s all interesting, but why does this matter?
Here’s why:
If you are providing a service, you’d probably like to receive payment when it’s used by an application. For example, let’s say that you’ve spent months creating a new service that provides incredibly accurate and timely driving directions. You can imagine every mobile phone GPS app making use of your service someday. That is, however, assuming that you can find a way to enforce a contract on consumers of the API and provide them with a service level agreement (SLA). Also, you have to find a way to actually track consumers’ use of the API so that you can actually enforce that SLA. Finally, you have to have the means to update a service and publish new versions of services.
Likewise, if you are consuming a service, for example, if you want to build the killer app that will use that cool new mapping service, you have to have the means to find the API, identify the API’s endpoint, and register your usage of the API with its provider.
The approach that is followed to fulfill both service providers’ and consumers’ needs is…API Management.
JBoss apiman 1.0
apiman is JBoss’ open source API Management system. apiman fulfills service API providers’ and consumers’ needs by implementing:
-
API Manager - The API Manager provides an easy way for API/service providers to use a web UI to define service contracts for their APIs, apply these contracts across multiple APIs, and control role-based user access and API versioning. These contracts can govern access to services and limits on the rate at which consumers can access services. The same UI enables API consumers to easily locate and access APIs.
-
API Gateway - The gateway applies the service contract policies of API Management by enforcing at runtime the rules defined in the contracts and tracking the service API consumers’ use of the APIs for every request made to the services. The way that the API Gateway works is that the consumer of the service accesses the service through a URL that designates the API Gateway as a proxy for the service. If the policies defined to govern access to the service (see a later section in this post for a discussion of apiman polices), the API Gateway then proxies requests to the service’s backend API implementation.
The best way to understand API Management with apiman is to see it in action. In this post, we’ll install apiman 1.0, configure an API with contracts through the API Manager, and watch the API Gateway control access to the API and track its use.
Prerequisites
We don’t need very much to run apiman out of the box. Before we install apiman, you’ll have to have Java (version 1.7 or newer) installed on your system. You’ll also need to git and maven installed to be able to build the example service that we’ll use.
A note on software versions: In this post we’ll use the latest available version of apiman as of December 2014. As if this writing, version 1.0 of apiman was just released (December 2014). Depending on the versions of software that you use, some screen displays may look a bit different.
Getting apiman
Like all JBoss software, installation of apiman is simple. First, you will need an application server on which to install and run apiman. We’ll use the open source JBoss WildFly server release 8.2 https://www.wildfly.org/. To make things easier, apiman includes a pointer to JBoss WildFly on its download page here: https://www.apiman.io/latest/download.html
To install WildFly, simply download https://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip and unzip the file into the directory in which you want to run the sever.
Then, download the apiman 1.0 WildFly overlay zip file inside the directory that was created when you un-zipped the WildFly download. The apiman 1.0 WildFly overlay zip file is available here: https://downloads.jboss.org/apiman/1.0.0.Final/apiman-distro-wildfly8-1.0.0.Final-overlay.zip
The commands that you will execute will look something like this:
Then, to start the server, execute these commands:
The server will write logging messages to the screen. When you see some messages that look like this, you’ll know that the server is up and running with apiman installed:
If this were a production server, the first thing that we’d do is to change the OOTB default admin username and/or password. apiman is configured by default to use JBoss KeyCloak https://keycloak.jboss.org/ for password security. Also, the default database used by apiman to store contract and service information is the H2 database. For a production server, you’d want to reconfigure this to use a production database. Note: apiman includes DDLs for both MySQL and PostgreSQL.
For the purposes of our demo, we’ll keep things simple and use the default configuration.
To access apiman’s API Manager UI, go to: http://localhost:8080/apiman-manager, and log in. The admin user account that we’ll use has a username of “admin” and a password of “admin123!”
You should see a screen that looks like this:
Before we start using apiman, let’s take a look at how apiman defines how services and the meta data on which they depend are organized.
Policies, Plans, and Organizations
apiman uses a hierarchical data model that consists of these elements: Polices, Plans, and Organizations:
Policies
Policies are at the lowest level of the data model, and they are the basis on which the higher level elements of the data model are built. A policy defines an action that is performed by the API Gateway at runtime. Everything defined in the API Manager UI is there to enable apiman to apply policies to requests made to services.
When a request to a service is made, apiman creates a chain of policies to be applied to that request. apiman policy chains define a specific sequence order in which the policies defined in the API Manager UI are applied to service requests.
The sequence in which incoming service requests have policies applied is:
- First, at the application level. In apiman, an application is contracted to use one or more services.
- Second, at the plan level. In apiman, policies are organized into groups called plans. (We’ll discuss plans in the next section of this post.)
- Third, at the individual service level.
What happens is that when a service request is received by the API Gateway at runtime, the policy chain is applied in the order of application, plan, and service. If no failures, such as a rate counter being exceeded, occur, the API Gateway sends the request to the service’s backend API implementation. As we mentioned earlier in this post, the API Gateway acts as a proxy for the service:
Next, when the API Gateway receives a response from the service’s backend implementation, the policy chain is applied again, but this time in the reverse order. The service policies are applied first, then the plan policies, and finally the application policies. If no failures occur, then the service response is sent back to the consumer of the service.
By applying the policy chain twice, both for the originating incoming request and the resulting response, apiman allows policy implementations two opportunities to provide management functionality during the lifecycle. The following diagram illustrates this two-way approach to applying policies:
Plans
In apiman, a “plan” is a set policies that together define the level of service that apiman provides for service. Plans enable apiman users to define multiple different levels of service for their APIs, based on policies. It’s common to define different plans for the same service, where the differences depend on configuration options. For example, a group or company may offer both a “gold” and “silver” plan for the same service. The gold plan may be more expensive than the silver plan, but it may offer a higher level of service requests in a given (and configurable) time period.
Organizations
The “organization” is at top level of the apiman data model.
An organization contains and manages all elements used by a company, university, group inside a company, etc. for API management with apiman. All plans, services, applications, and users for a group are defined in an apiman organization. In this way, an organization acts as a container of other elements. Users must be associated with an organization before they can use apiman to create or consume services. apiman implements role-based access controls for users. The role assigned to a user defines the actions that a user can perform and the elements that a user can manage.
Before we can define a service, the policies that govern how it is accessed, the users who will be able to access, and the organizations that will create and consume it, we need a service and a client to access that service. Luckily, creating the service and deploying it to our WildFly server, and accessing it through a client are easy.
Getting and Building and Deploying the Example Service
The source code for the example service is contained in a git repo (https://git-scm.com) hosted at github (https://github.com/apiman). To download a copy of the example service, navigate to the directory in which you want to build the service and execute this git command:
git clone git@github.com:apiman/apiman-quickstarts.git
As the source code is downloading, you’ll see output that looks like this:
git clone git@github.com:apiman/apiman-quickstarts.git
Initialized empty Git repository in /tmp/tmp/apiman-quickstarts/.git/
remote: Counting objects: 104, done.
remote: Total 104 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (104/104), 18.16 KiB, done.
Resolving deltas: 100% (40/40), done.
And, after the download is complete, you’ll see a populated directory tree that looks like this:
As we mentioned earlier in the post, the example service is very simple. The only action that the service performs is to echo back in responses the meta data in the REST (https://en.wikipedia.org/wiki/Representational_state_transfer) requests that it receives.
Maven is used to build the service. To build the service into a deployable .war file, navigate to the directory into which you downloaded the service example:
cd apiman-quickstarts/echo-service
And then execute this maven command:
mvn package
As the service is being built into a .war file, you’ll see output that looks like this:
If you look closely, near the end of the output, you’ll see the location of the .war file:
/jboss/local/redhat_git/apiman-quickstarts/echo-service/target/apiman-quickstarts-echo-service-1.0.1-SNAPSHOT.war
To deploy the service, we can copy the .war file to our WildFly server’s “deployments” directory. After you copy the service’s .war file to the deployments directory, you’ll see output like this generated by the WildFly server:
Make special note of this line of output:
This output indicates that the URL of the deployed example service is:
Remember, however, that this is the URL of the deployed example service if we access it directly. We’ll refer to this as the “unmanaged service” as we are able to connect to the service directly, without going through the API Gateway. The URL to access the service through the API Gateway (“the managed service”) at runtime will be different.
Now that our example service is installed, it’s time to install and configure our client to access the server.
Accessing the Example Service Through a Client
There are a lot of options available when it comes to what we can use for a client to access our service. We’ll keep the client simple so that we can keep our focus on apiman and simply install a REST client into the FireFox browser. The REST Client FireFox add-on (http://restclient.net/) is available here: https://addons.mozilla.org/en-US/firefox/addon/restclient/versions/2.0.3
After you install the client into FireFox, you can access the deployed service using the URL that we just defined. If you execute a GET command, you’ll see output that looks like this:
Now that our example service is built, deployed and running, it’s time to create the organizations for the service provider and the service consumer. The differences between the requirements of the two organizations will be evident in their apiman configuration properties.
Creating Users for the Service Provider and Consumer
Before we create the organizations, we have to create a user for each organization. We’ll start by creating the service provider user. To do this, logout from the admin account in the API Manager UI. The login dialog will then be displayed.
Select the “New user” Option and register the service provider user:
Then, logout and repeat the process to register a new application developer user too:
Now that the new users are registered we can create the organizations.
Creating the Service Producer Organization
To create the service producer organization, log back into the API Manager UI as the servprov user and select “Create a new Organization”:
Select a name and description for the organization, and press “Create Organization”:
And, here’s our organization:
Note that in a production environment, users would request membership in an organization. The approval process for accepting new members into an organization would follow the organization’s workflow, but this would be handled outside of the API Manager. For the purposes of our demonstration, we’ll keep things simple.
Configuring the Service, its Policies, and Plans
To configure the service, we’ll first create a plan to contain the policies that we want applied by the API Gateway at runtime when requests to the service are made. To create a new plan, select the “Plans” tab. We’ll create a “gold” plan:
Once the plan is created, we will add policies to it:
apiman provides several OOTB policies. Since we want to be able to demonstrate a policy being applied, we’ll select a Rate Limiting Policy, and set its limit to a very low level. If our service receives more than 10 requests in a day, the policy should block all subsequent requests. So much for a “gold” level of service!
After we create the policy and add it to the plan, we have to lock the plan:
And, here is the finished, and locked plan:
At this point, additional plans can be defined for the service. We’ll also create a “silver” plan, that will offer a lower level of service (i.e., a request rate limit lower than 10 per day) than the gold plan. Since the process to create this silver plan is identical to that of the gold plan, we’ll skip the screenshots.
Now that the two plans are complete and locked, it’s time to define the service.
We’ll give the service an appropriate name, so that providers and consumers alike will be able to run a query in the API Manager to find it.
After the service is defined, we have to define its implementation. In the context of the API Manager, the API Endpoint is the service’s direct URL. Remember that the API Gateway will act as a proxy for the service, so it must know the service’s actual URL. In the case of our example service, the URL is: http://localhost:8080/apiman-echo
The plans tab shows which plans are available to be applied to the service:
Let’s make our service more secure by adding an authentication policy that will require users to login before they can access the service. Select the Policies tab, and then define a simple authentication policy. Remember the user name and password that you define here as we’ll need them later on when send requests to the service.
After the authentication policy is added, we can publish the service to the API Gateway:
And, here it is, the published service:
OK, that finishes the definition of the service provider organization and the publication of the service.
Next, we’ll switch over to the service consumer side and create the service consumer organization and register an application to connect to the managed service through the proxy of the API Gateway.
The Service Consumer Organization
We’ll repeat the process that we used to create the application development organization. Log in to the API Manager UI as the “appdev” user and create the organization:
Unlike the process we used when we created the elements used by the service provider, the first step that we’ll take is to create a new application and then search for the service to be used by the application:
Searching for the service is easy, as we were careful to set the service name to something memorable:
Select the service name, and then specify the plan to be used. We’ll splurge and use the gold plan:
Next, select “create contract” for the plan:
Then, agree to the contract terms (which seem to be written in a strange form of Latin in the apiman 1.0 release):
The last step is to register the application with the API Gateway so that the gateway can act as a proxy for the service:
Congratulations! All the steps necessary to provide and consume the service are complete!
There’s just one more step that we have to take in order for clients to be able access the service through the API Gateway.
Remember the URL that we used to access the unmanaged service directly? Well, forget it. In order to access the managed service through the API Gateway acting as a proxy for other service we have to obtain the managed service’s URL. In the API Manager UI, head on over to the “APIs” tab for the application, click on the the ‘>’ character to the left of the service name. This will expose the API Key and the service’s HTTP endpoint in the API Gateway:
In order to be able access the service through the API Gateway, we have to provide the API Key with each request. The API Key can be provided either through an HTTP Header (X-API-Key) or a URL query parameter. Luckily, the API Manager UI does the latter for us. Select the icon to the right of the HTTP Endpoint and this dialog is displayed:
Copy the URL into the clipboard. We’ll need to enter this into the client in a bit. The combined API Key and HTTP endpoint should look something like this:
Accessing the Managed Service Through the apiman API Gateway, Watching the Policies at Runtime
Thanks for hanging in there! The set up is done. Now, we can fire up the client and watch the policies in action as they are applied at runtime by the API Gateway, for example:
Open the client, and enter the URL for the managed service http://localhost:8080/apiman-gateway/ACMEServices/echo/1.0?apikey=c374c202-d4b3-4442-b9e4-c6654f406e3d
What happens first is that the authentication policy is applied and a login dialog is then displayed:
Enter the username and password (user1/password) that we defined when we created the authentication policy to access the service. The fact that you are seeing this dialog confirms that you are accessing the managed service and are not accessing the service directly.
When you send a GET request to the service, you should see a successful response:
So far so good. Now, send 10 more requests and you will see a response that looks like this as the gold plan rate limit is exceeded:
And there it is. Your gold plan has been exceeded.  ;-)
Wrap-up
Let’s recap what we just accomplished in this demo:
- We installed apiman 1.0 onto a WildFly server instance.
- We used git to download and maven to build a sample REST client.
- As a service provider, we created an organization, defined policies based on service use limit rates and user authentication, and a plan, and assigned them to a service.
- As a service consumer, we searched for and found that service, and assigned it to an application.
- As a client, we accessed the service and observed how the API Gateway managed the service.
And, if you note, in the process of doing all this, the only code that we had to write or build was for the client. We were able to fully configure the service, policies, plans, and the application in the API Manager UI.
What’s Next?
In this post, we’ve only scratched the surface of API Management with apiman. To learn more about apiman, you can explore its website here: https://www.apiman.io/
Join the project mailing list here: https://lists.jboss.org/mailman/listinfo/apiman-user
And, better still, get involved! Contribute bug reports or feature requests. Write about your own experiences with apiman. Download the apiman source code, take a look around, and contribute your own additions. apiman 1.0 was just released, there’s no better time to join in and contribute!
Downloads Used in this Article
- REST Client https://restclient.net/ FireFox Add-On - https://addons.mozilla.org/en-US/firefox/addon/restclient/versions/2.0.3
- Echo service source code - https://github.com/apiman/apiman-quickstarts
- apiman 1.0 - https://downloads.jboss.org/apiman/1.0.0.Final/apiman-distro-wildfly8-1.0.0.Final-overlay.zip
- WildFly 8.2.0 - https://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip
- Git - https://git-scm.com
- Maven - https://maven.apache.org


closed
by None at 2022-01-10 12:58:06.WC is going to filter the report on the values the need and submit a list of uri's to change the notes for
assigned
by None at 2022-01-10 12:59:26.assigned
by Trey Pendragon at 2022-01-10 20:59:21.referenced
by Trey Pendragon at 2022-01-10 21:29:09.closed
by Eliot Jordan at 2022-01-10 22:45:15.deployed
by None at 2022-01-10 21:29:41.referenced
by Eliot Jordan at 2022-01-10 22:45:15.merged
by Eliot Jordan at 2022-01-10 22:45:15.closed
by Eliot Jordan at 2022-01-10 22:45:15.head_ref_deleted
by Eliot Jordan at 2022-01-10 22:45:16.assigned
by James R. Griffin III at 2022-01-10 14:13:12.unassigned
by James R. Griffin III at 2022-01-10 14:14:38.unassigned
by James R. Griffin III at 2022-01-10 14:14:57.unassigned
by James R. Griffin III at 2022-01-10 14:15:03.assigned
by James R. Griffin III at 2022-01-10 14:15:21.The security vulnerability only exists for jruby.
labeled
by Trey Pendragon at 2022-01-10 22:12:45.labeled
by Trey Pendragon at 2022-01-10 22:12:45.labeled
by Eliot Jordan at 2022-01-10 20:15:16.assigned
by Eliot Jordan at 2022-01-10 22:43:06.head_ref_force_pushed
by Eliot Jordan at 2022-01-10 22:41:12.labeled
by Eliot Jordan at 2022-01-10 22:43:20.ready_for_review
by Eliot Jordan at 2022-01-10 22:43:32.deployed
by None at 2022-01-10 22:53:03.from https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role
- [x] add role="button" (so that we dont need to change the facet to a <button>
or <input type="button">
)
- [x] make the element focusable
- [ ] define event handlers for click and keydown events. (This includes handling the Enter and Space keypresses in order to process all forms of user input. See the official WAI-ARIA example code.)
The reason figgy is like this is because certain individual machines run additional services. For example, only one of the webservers runs rabbitmq and memcached. Only the worker boxes run sidekiq_workers and other worker processes. How do other applications account for these differences if not in the playbook?
renamed
by None at 2022-01-10 14:14:11.renamed
by None at 2022-01-10 14:20:12.assigned
by Bess Sadler at 2022-01-10 14:50:38.labeled
by Kevin Reiss at 2022-01-10 20:05:56.renamed
by Kevin Reiss at 2022-01-10 20:06:21.After CI passes, :+1:. Thanks @escowles
Wait, I need to fix the quoting.
mentioned
by Esmé Cowles at 2022-01-10 20:27:05.subscribed
by Esmé Cowles at 2022-01-10 20:27:05.labeled
by Trey Pendragon at 2022-01-10 20:43:23.assigned
by Shaun Ellis at 2022-01-10 20:59:58.I have just tested and confirmed that the QA server is available using the lib200w
Windows Server bastion host. One will require an OIT service account in order to access this, and one must use a client supporting the Remote Desktop Protocol.
From the bastion host, one uses the PuTTY client in order to access the current ThesisCentral servers themselves (these are hosted using Amazon Web Services, likely as EC2 instances).
I must use a separate, older OIT service account in order to access these servers over PuTTY. Currently, these servers use a release of Red Hat Enterprise Linux.
assigned
by Bess Sadler at 2022-01-10 14:38:30.assigned
by James R. Griffin III at 2022-01-10 14:38:30.


This domain supports both conditional and multi-way rendezvous. In conditional rendezvous, an actor is willing to rendezvous with any one of several other actors. In multiway rendezvous, an actor requires rendezvous with multiple other actors at the same time. When using conditional rendezvous, the choice of which rendezvous occurs is nondeterministic, in general.
The model of computation is based on the Communicating Sequential Processesmodel first proposed by Hoare in 1978. Rendezvous-based communication is also known as synchronous message passing, but we avoid this term to avoid confusion with the SR (synchronous/reactive) domain.
In a relation group, there is no significance to the order in which relations are linked, unlike the order in which ports are linked to relations. Also, unlike links between relations and ports, there is no significance to multiple links between the same relations. Any two relations are either linked or not linked.
The MoMLParser includes a list of backward compatibility filters that make certain changes on models when read, handling such issues as actors being moved or renamed and parameter names being changed. The filters themselves are defined in ptolemy.moml.filter. If you have developed your own actors under earlier versions of Ptolemy II by writing your own Java files, you should recompile all your java code with the new release. In theory, copying the .class files should work, but recompiling is safer.


Toggle navigation
Home
Get Involved
About Us
Faqs
Magazine 2k18-19
Rules & Policies
Units
Adhyayan
Technical Skills
Rural Development
Chetna
Teaching
Environmental
Prayatna
Our Team
Events
Gallery
Think-Thank
Check-Hours
Blood Request
Help!
Gallery
All Works
Media/Publications
Posters
Swachta Hi Seva
Open Day
Blood Donation
Guest talk on AIDS
Election Awareness
Womens Day
Prayas
NSS Alumini Talk
Plantation
Cloth Distribution
Technical Skill & Teaching
Youth Day
Ashraya
Gandhi Jayanti
Swachhta Pakhwada
Village Meet
Run for Unity
Human Chain
8


Utilities for examining fonts
ShowTTF
showttf is a program which will decompose a truetype (or opentype) font file into its various tables and display the contents of those tables as best it can. It will also point out the errors it finds in the file. This is similar to MicroSoft's ttfdump (except mine shows some of Apple's tables which ttfdump does not), and to Apple's ftxdumperfuser (except mine shows some OpenType tables which Apple's ignores). And, of course, mine is open source and runs on most any system.
showttf fontfile
The source code is in the git repository under fonttools/showttf.c.
Ttf2Eps
ttf2eps will allow you to extract one (or all) glyphs from a font and convert them into eps files.
PfaDecrypt
pfadecrypt will undo Adobe's encryption on pfa/pfb files and converts the byte codes into readable postscript like instructions.
Pcl2Ttf
Will extract ttf or bitmap fonts embedded in an hp pcl file. Bitmap fonts become bdf fonts (I don't have any examples of run length encoded bitmap fonts, and do not currently support them. If you have an rle bitmap pcl font please send it to me). I have neither documentation on nor examples of the "Intellifont" format, so these fonts are not supported.


This is Coin Flipper, a distributed coin flipping that shows how probable it is for a fair coin to land on the same side n times in a row.
Want to help and appear on the list above?
# On your PC/Mac or on your Raspberry Pi
docker run tibordp/coinflipper:latest \
flipper coinflipper.ojdip.net
Or do you have a huge k8s cluster at your disposal?
kubectl apply -f - <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: coinflipper-flipper
spec:
selector:
matchLabels:
app: coinflipper-flipper
replicas: 1337
template:
metadata:
labels:
app: coinflipper-flipper
spec:
containers:
- image: tibordp/coinflipper:latest
imagePullPolicy: Always
name: coinflipper-flipper
command: ["/coinflipper"]
args:
- flipper
- coinflipper.ojdip.net
resources:
limits:
memory: "16Mi"
cpu: "1000m"
EOF


When it comes to data manipulation, one often needs some structure to store multiple values. Python is no exception and it actually has several compound data types. The one described in this article is very similar to some other structures in other languages: the list. It can store multiple values from different types (so you could have a list with integers only or a mix with integer, floating numbers, or even lists of lists). A list is written with values, separated by commas and enclosed in square brackets.
ExamplesSection
For example, you might write:
A list of integers:
>>> integerList = [1, 2, 3, 4]
A list whose values are made up of different types:
>>> mixedList = [1, "hello", 2.02, "foo"]
A list where some values are themselves list:
>>> listOfLists = [1, 2, [3, 4, 5], [5, 6, 7], 7, 8]
Indexing and slicingSection
Once you have a list, you might quickly need a way to access a given value in this list. Or sometimes, you might want a subset of it (a slice). Python's syntax allows for these operations quite simply.
IndexingSection
A given element of the list has an index which is its position regarding the start of the list. Given an element's index, it is possible to fetch the value in the list by writing the name of the list, followed by the index, enclosed in square brackets. Attention, indexes start from 0 so be careful when counting.
>>> myList = [1, 2, 3, 4, 5]
>>> print(myList[0])
1
>>> myList[1]
2
>>> myList[4]
5
If the index is greater than the lenght of the list, attempting such access will raise an exception. For example:
>>> mylist[5]
Traceback (most recent call last):
File "", line 1, in
IndexError: list index out of range
Knowing the size of a list: len()
Most of the time, you will use lists which are of differents sizes and you might not be able to foresee the length of the list before manipulating it. Since this is a common operation, Python has a built-in function len which takes a list as an argument and returns the length of the list.
>>> myList = [1, 2, 3, 4, 5]
>>> print(len(myList))
5
A list can have 1 single element:
>>> singleList = ["foo"]
>>> print(len(singleList))
1
Now, an example with a list of lists
>>> listOfLists = [1, [2, 3], [4, 5, 6]]
>>> print(len(listOfLists))
3
>>> print(len(listOfLists[1]))
2 (the length of [2, 3])
Negative indexes
It is possible to use negative indexes. In such cases, Python will browse the list in reverse order (from the end to the beginning). For examplee myList[-1] will return the last element of myList. This notation is a welcomed shortcut in order to avoid too long instructions like myList[len(myList)-X] where X is the reverse index of some element one would need to use.
>>> myList = [1, 2, 3, 4, 5]
>>> print(myList[-1])
5
This is the equivalent with the following instruction (which is much longer)
>>> print(myList[len(myList)-1])
5
SlicingSection
In some cases, it is useful to slice a list to get a fragment of it (either its beginning, its end, or some of the elements in the middle). This operation is very convenient to create new lists from existing ones, without having to fecth every single element. The syntax for slicing is the following: the name of the list, followed by two indexes separated by a colon, enclosed in square brackets. The first index is the one where to start the slice (the corresponding element is included in the result), the second index is the one where to end the slice (the corresponding element is not included in the result). The following examples show the different cases for slicing:
Creating a list with the 2 first elements:
>>> myList = [1, 2, 3, 4, 5]
>>> startList = myList[0:2]
>>> print(startList)
[1, 2]
Creating a third list with the last elements:
>>> myList = [1, 2, 3, 4, 5]
>>> endList = myList[3:5]
>>> print(endList)
[4, 5
For the sake of completeness, here are some edge cases if you were wondering about errors:
>>> myList = [1, 2, 3, 4, 5]
>>> print(myList[0:85454])
[1,2,3,4,5]
>>> print(myList[2:1])
[] (since 2 is smaller than 1)
As mentioned earlier, negative indexes are a shortcut notation. There is also a shortcut notation for slicing so that it is more convenient to get X elements from the start of a given list or to get Y elements from its end (or even "get a sublist of all the elements except the first X elements" or "get a sublist of all the elements except the last Y elements"). The following examples show the different cases for slicing.
Creating a list with the 2 first elements, differently:
>>> myList = [1, 2, 3, 4, 5]
>>> startList = myList[:2]
>>> print(startList)
[1, 2]
Creating a list with the end, differently:
>>> myList = [1, 2, 3, 4, 5]
>>> endList = myList[-2:]
>>> print(endList)
[4, 5]
Creating a list without some elements from its beginning:
>>> myList = [1, 2, 3, 4, 5]
>>> headlessList = myList[2:]
>>> print(headlessList)
[3, 4, 5]
Creating a list without some elements from its end:
>>> myList = [1, 2, 3, 4, 5]
>>> queuelessList = myList[:-4]
>>> print(queuelessList)
[1]
MutabilitySection
In Python, lists are mutable. That means that once you have defined a list, it is possible to change its content in following instructions. A list can be modified with direct access or via some operations or functions. These examples show some of these possible operations.
Changing the second element by setting it to 10:
>>> myList = [1, 2, 3, 4, 5]
>>> myList[1] = 10
>>> print(myList)
[1, 10, 3, 4, 5]
Concatenating two lists:
>>> listA = [1, 2, 3]
>>> listB = [2, 4, 6]
>>> listA = listA + listB
>>> print(listA)
[1, 2, 3, 2, 4, 6]
Using a built-in function to modify the list:
>>> myList = [1, "foo", "bar", 2]
>>> myList.reverse()
>>> print(myList)
[2, "bar", "foo", 1]:
Six data types that are primitives:
- Boolean. true and false.
- Because.
- undefined. A top-level property whose value is undefined.
- Number..
- String. "Howdy"
- Symbol (new in ECMAScript 2015). A data type whose instances are unique and immutable.
and Object
Although these data


${g.user.name}'s events
Welcome, ${g.user.name}! You don't seem to have any events right now, maybe you would like to take the introductory tour? Or just get started right away, and create a new event?
${event.name} |
${render_date(event.last_changed)} |
${render_amount(event.user_total[g.user.id])} |


Creates a new grammar time object. The returned grammar object is not yet precomputed, and will have no symbols and rules. Its reference count will be 1.
Unless the application calls
marpa_c_error
, Libmarpa will not reference the location pointed to by the configuration argument aftermarpa_g_new
returns. The configuration argument may beNULL
, but if it is, there will be no way to determine the error code on failure.Return value: On success, the grammar object. On failure,
NULL
, and the error code is set in configuration.
It is recommended that this call be made immediately after the grammar constructor. It turns off a deprecated feature.
The
marpa_g_force_valued
forces all the symbols in a grammar to be “valued”. The opposite of a valued symbol is one about whose value you do not care. This distinction has been made in the past in hope of gaining efficiencies at evaluation time. Current thinking is that the gains do not repay the extra complexity.Return value: On success, a non-negative integer. On failure, a negative integer.


|
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use Simon | |
|---|---|
| org.javasimon | Core package, contains Simon implementations, with
the SimonManager as the center point of the API. |
| org.javasimon.callback | Callback is an event listener registered with the Manager ,
listening for manager or Simon events. |
| org.javasimon.callback.lastsplits | LastSplitsCallback retains last
splits in a ring a buffer (fixed size FIFO queue). |
| org.javasimon.callback.quantiles | QuantilesCallback sorts splits to categories
(Bucket s) based on time ranges. |
| org.javasimon.callback.timeline | |
| org.javasimon.console | Java Simon embeddable Web console base package. |
| org.javasimon.console.action | All controllers (aka Action beans in Struts world) are located in this package. |
| org.javasimon.console.html | HTML generation helper classes. |
| org.javasimon.console.plugin | |
| org.javasimon.jmx | JMX capabilities for Simons. |
| org.javasimon.source | MonitorSource is the interface used as function to transform execution context (method invocation,
HTTP request...) into a Simon. |
| org.javasimon.utils | Java Simon supporting utilities and tools. |
| Uses of Simon in org.javasimon |
|---|
| Subinterfaces of Simon in org.javasimon | |
|---|---|
interface |
Counter
Counter tracks the single integer value and watches its max/min values. |
interface |
Stopwatch
Stopwatch Simon measures time spans and holds related statistics. |
| Methods in org.javasimon that return Simon | |
|---|---|
Simon |
Simon.getParent()
Returns parent Simon. |
Simon |
SwitchingManager.getRootSimon()
|
static Simon |
SimonManager.getRootSimon()
Returns root Simon. |
Simon |
Manager.getRootSimon()
Returns root Simon. |
Simon |
EnabledManager.getRootSimon()
|
Simon |
DisabledManager.getRootSimon()
Returns "Null Simon" that always returns empty/null values and cannot measure anything. |
Simon |
SwitchingManager.getSimon(String name)
|
static Simon |
SimonManager.getSimon(String name)
Returns Simon by its name if it exists. |
Simon |
Manager.getSimon(String name)
Returns Simon by its name if it exists. |
Simon |
EnabledManager.getSimon(String name)
|
Simon |
DisabledManager.getSimon(String name)
Returns "Null Simon" that always returns empty/null values and cannot measure anything. |
| Methods in org.javasimon that return types with arguments of type Simon | |
|---|---|
List<Simon> |
Simon.getChildren()
Returns list of children - direct sub-simons. |
Collection<Simon> |
SwitchingManager.getSimons(SimonFilter simonFilter)
|
static Collection<Simon> |
SimonManager.getSimons(SimonFilter simonFilter)
Returns collection containing all existing Simons accepted by specified SimonFilter . |
Collection<Simon> |
Manager.getSimons(SimonFilter simonFilter)
Returns collection containing all existing Simons accepted by specified SimonFilter . |
Collection<Simon> |
EnabledManager.getSimons(SimonFilter simonFilter)
|
Collection<Simon> |
DisabledManager.getSimons(SimonFilter simonFilter)
|
| Methods in org.javasimon with parameters of type Simon | |
|---|---|
boolean |
SimonPattern.accept(Simon simon)
|
boolean |
SimonFilter.accept(Simon simon)
Checks whether current Simon should be used/considered. |
| Constructor parameters in org.javasimon with type arguments of type Simon | |
|---|---|
SimonPattern(String pattern,
Class<? extends Simon> expectedType)
Creates Simon pattern that used to match Simons of specified type with names that correspond to the pattern. |
| Uses of Simon in org.javasimon.callback |
|---|
| Methods in org.javasimon.callback with parameters of type Simon | |
|---|---|
boolean |
FilterRule.checkCondition(Simon simon,
Object... params)
Checks the Simon and optional parameters against the condition specified for a rule. |
void |
CompositeFilterCallback.onSimonCreated(Simon simon)
|
void |
CompositeCallbackImpl.onSimonCreated(Simon simon)
|
void |
CallbackSkeleton.onSimonCreated(Simon simon)
|
void |
Callback.onSimonCreated(Simon simon)
Simon created event is called when Simon is successfully created by the Manager. |
void |
CompositeFilterCallback.onSimonDestroyed(Simon simon)
|
void |
CompositeCallbackImpl.onSimonDestroyed(Simon simon)
|
void |
CallbackSkeleton.onSimonDestroyed(Simon simon)
|
void |
Callback.onSimonDestroyed(Simon simon)
Simon destroyed event is called when Simon is successfully destroyed by the Manager. |
void |
CompositeFilterCallback.onSimonReset(Simon simon)
|
void |
CompositeCallbackImpl.onSimonReset(Simon simon)
|
void |
CallbackSkeleton.onSimonReset(Simon simon)
Deprecated. |
void |
Callback.onSimonReset(Simon simon)
Deprecated. will be removed in 4.0. Use Stopwatch.sampleIncrement(Object) (keyed sampling) instead.
TODO change link to Simon when done |
| Uses of Simon in org.javasimon.callback.lastsplits |
|---|
| Methods in org.javasimon.callback.lastsplits with parameters of type Simon | |
|---|---|
void |
LastSplitsCallback.onSimonCreated(Simon simon)
When Stopwatch is created, a Last Splits attributes is added. |
void |
LastSplitsCallback.onSimonReset(Simon simon)
When the Stopwatch is reseted, the Last splits attribute as well. |
| Uses of Simon in org.javasimon.callback.quantiles |
|---|
| Methods in org.javasimon.callback.quantiles with parameters of type Simon | |
|---|---|
void |
AutoQuantilesCallback.onSimonCreated(Simon simon)
When simon is created, the list containing Split values is added to stopwatch attributes. |
void |
QuantilesCallback.onSimonReset(Simon simon)
When the Stopwatch is reset, so are the buckets. |
void |
AutoQuantilesCallback.onSimonReset(Simon simon)
Deprecated. |
| Uses of Simon in org.javasimon.callback.timeline |
|---|
| Methods in org.javasimon.callback.timeline with parameters of type Simon | |
|---|---|
void |
TimelineCallback.onSimonCreated(Simon simon)
On simon creation a timeline attribute is added (for Stopwatches only). |
| Uses of Simon in org.javasimon.console |
|---|
| Methods in org.javasimon.console that return types with arguments of type Simon | |
|---|---|
Class<? extends Simon> |
SimonType.getType()
|
| Methods in org.javasimon.console with parameters of type Simon | |
|---|---|
static SimonType |
SimonTypeFactory.getValueFromInstance(Simon simon)
Get simon type from simon instance. |
void |
SimonVisitor.visit(Simon simon)
|
static void |
SimonVisitors.visitTree(Simon simon,
SimonVisitor visitor)
Visit Simons recursively as a tree starting from the specified Simon. |
| Method parameters in org.javasimon.console with type arguments of type Simon | |
|---|---|
static SimonType |
SimonTypeFactory.getValueFromType(Class<? extends Simon> type)
Get simon type from simon class. |
| Uses of Simon in org.javasimon.console.action |
|---|
| Methods in org.javasimon.console.action with parameters of type Simon | |
|---|---|
protected ObjectJS |
AbstractJsonAction.createAttributesObjectJS(Simon simon)
|
protected Element |
TreeXmlAction.createElement(Document document,
Simon simon)
|
protected Element |
AbstractXmlAction.createElement(Document document,
Simon simon)
Transforms a Simon into a JSON object. |
protected ObjectJS |
TreeJsonAction.createObjectJS(Simon simon)
|
protected ObjectJS |
AbstractJsonAction.createObjectJS(Simon simon)
Transforms a Simon into a JSON object. |
DetailHtmlBuilder |
DetailPlugin.executeHtml(ActionContext context,
DetailHtmlBuilder htmlBuilder,
StringifierFactory htmlStringifierFactory,
Simon simon)
Callback for flat HTML rendering. |
ObjectJS |
DetailPlugin.executeJson(ActionContext context,
StringifierFactory jsonStringifierFactory,
Simon simon)
Callback for flat JSON rendering. |
protected void |
AbstractTableAction.printBodyRow(Simon simon,
PrintWriter writer)
|
DetailHtmlBuilder |
DetailHtmlBuilder.simonProperty(Simon simon,
String propertyLabel,
String propertyName)
|
DetailHtmlBuilder |
DetailHtmlBuilder.simonProperty(Simon simon,
String propertyLabel,
String propertyName,
Integer colSpan)
|
boolean |
DetailPlugin.supports(Simon simon)
Indicates this plugin applies to this kind of Simon. |
| Uses of Simon in org.javasimon.console.html |
|---|
| Methods in org.javasimon.console.html with parameters of type Simon | |
|---|---|
T |
HtmlBuilder.simonProperty(Simon simon,
String propertyName)
Write Simon property (using Java Bean convention). |
| Uses of Simon in org.javasimon.console.plugin |
|---|
| Methods in org.javasimon.console.plugin with parameters of type Simon | |
|---|---|
DetailHtmlBuilder |
TimelineDetailPlugin.executeHtml(ActionContext context,
DetailHtmlBuilder htmlBuilder,
StringifierFactory htmlStringifierFactory,
Simon simon)
|
DetailHtmlBuilder |
QuantilesDetailPlugin.executeHtml(ActionContext context,
DetailHtmlBuilder htmlBuilder,
StringifierFactory htmlStringifierFactory,
Simon simon)
|
DetailHtmlBuilder |
CallTreeDetailPlugin.executeHtml(ActionContext context,
DetailHtmlBuilder htmlBuilder,
StringifierFactory htmlStringifierFactory,
Simon simon)
|
ObjectJS |
TimelineDetailPlugin.executeJson(ActionContext context,
StringifierFactory jsonStringifierFactory,
Simon simon)
|
ObjectJS |
QuantilesDetailPlugin.executeJson(ActionContext context,
StringifierFactory jsonStringifierFactory,
Simon simon)
|
ObjectJS |
CallTreeDetailPlugin.executeJson(ActionContext context,
StringifierFactory jsonStringifierFactory,
Simon simon)
Generate a JSON call tree object or an error string if no call tree |
boolean |
TimelineDetailPlugin.supports(Simon simon)
Indicate that this plugin only applies on Stopwatches. |
boolean |
QuantilesDetailPlugin.supports(Simon simon)
Indicate that this plugin only applies on Stopwatches. |
boolean |
CallTreeDetailPlugin.supports(Simon simon)
Indicate that this plugin only applies on Stopwatches. |
| Uses of Simon in org.javasimon.jmx |
|---|
| Methods in org.javasimon.jmx that return Simon | |
|---|---|
protected Simon |
StopwatchMXBeanImpl.simon()
|
protected Simon |
CounterMXBeanImpl.simon()
|
protected abstract Simon |
AbstractSimonMXBeanImpl.simon()
Returns the wrapped Simon. |
| Methods in org.javasimon.jmx with parameters of type Simon | |
|---|---|
protected SimonSuperMXBean |
JmxRegisterCallback.constructObject(Simon simon)
Constructs JMX object from Simon object. |
protected String |
JmxRegisterCallback.constructObjectName(Simon simon)
Constructs JMX object name from Simon object. |
void |
JmxRegisterCallback.onSimonCreated(Simon simon)
After Simon is created respective MX bean is registered for it according to its type. |
void |
JmxRegisterCallback.onSimonDestroyed(Simon simon)
When the Simon is destroyed, its MX bean is unregistered. |
protected void |
JmxRegisterCallback.register(Simon simon)
Method registering Simon MX Bean - can not be overridden, but can be used in subclasses. |
protected String |
JmxRegisterCallback.simonType(Simon simon)
Returns type of the simon as defined in SimonInfo.COUNTER ,
SimonInfo.STOPWATCH or SimonInfo.UNKNOWN . |
| Uses of Simon in org.javasimon.source |
|---|
| Classes in org.javasimon.source with type parameters of type Simon | |
|---|---|
class |
CachedMonitorSource<L,M extends Simon,K>
Monitor source playing the role of cache for delegate monitor source. |
class |
DisabledMonitorSource<L,M extends Simon>
Disabled monitor source. |
interface |
MonitorSource<L,M extends Simon>
Monitor source provides monitors (Simons) for a specific name. |
| Methods in org.javasimon.source with type parameters of type Simon | ||
|---|---|---|
static
|
DisabledMonitorSource.get()
Returns a singleton instance. |
| Uses of Simon in org.javasimon.utils |
|---|
| Methods in org.javasimon.utils with parameters of type Simon | |
|---|---|
static CounterAggregate |
SimonUtils.calculateCounterAggregate(Simon simon)
Aggregate statistics from all counters in hierarchy of simons. |
static CounterAggregate |
SimonUtils.calculateCounterAggregate(Simon simon,
SimonFilter filter)
Aggregate statistics from all counters in hierarchy that pass specified filter. |
static StopwatchAggregate |
SimonUtils.calculateStopwatchAggregate(Simon simon)
Aggregate statistics from all stopwatches in hierarchy of simons. |
static StopwatchAggregate |
SimonUtils.calculateStopwatchAggregate(Simon simon,
SimonFilter filter)
Aggregate statistics from all stopwatches in hierarchy that pass specified filter. |
void |
SystemDebugCallback.onSimonCreated(Simon simon)
|
void |
SystemDebugCallback.onSimonDestroyed(Simon simon)
|
void |
SystemDebugCallback.onSimonReset(Simon simon)
|
void |
LoggingCallback.onSimonReset(Simon simon)
Deprecated. |
static void |
SimonUtils.recursiveReset(Simon simon)
Deprecated. will be removed in 4.0 |
static String |
SimonUtils.simonTreeString(Simon simon)
Returns multi-line string containing Simon tree starting with the specified Simon. |
|
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/Basic.20algebraic.20operations.html ---
What's a better way to do something like 3 * m + m
by 4 * m
?
right now I'm doing 3 * m + m = 3 * m + 1 * m = (3+1) * m = 4 * m
.
the ring
tactic proves this immediately, assuming m is in a semiring.
I tried ring
already, but what I had was h : x ≤ 3 * m + m
, and ring
doesn't seem work for that?
then rw (show 3 * m + m = 4 * m, by ring)
OK thanks.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Home
About
Lzzy Hale
Arejay Hale
Music
1999-2010
2010-2017
Contact
Photos
Tour
WELCOME!
10th ANNIVERSARY EDITION
Limited Copies Available /
Pre-Order Now
NEW ALBUM VICIOUS OUT NOW!


The Great Room Restaurant is undoubtedly one of Northern Ireland’s most extraordinary restaurants. Thanks to the remarkable original Victorian interior with its glass cupola, Ireland’s largest chandelier an array of plasterwork detailing, the space is second to none. Needless to say our chefs search tirelessly to bring the finest seasonal ingredients together in eloquent dishes in thoughtfully prepared menus, just one of the reasons The Great Room Restaurant was awarded 2 AA Rosettes. All this is complemented by expert service and a wine list to which all the superlatives apply!
Belfast’s authentic Cuban bar and restaurant within a breathtaking Art Nouveau building in the heart of the city. Freshly prepared Latin menus, inspired and innovative cocktails and – yep, you guessed it – plenty of rum. Step inside our breathtaking listed building to three cocktail bars in classic Cuban style. Lounge in the relaxed Cuban restaurant with inspired Latin flavours, fresh tapas and a world-class selection of rums from the rum bar. Or take it to the stunning mezzanine for unforgettable cocktails, live music and salsa beats ‘til late. A Cuban fiesta at a whole new level, every single day, just off Arthur Street.
Opened in 2013 by award winning chef Marty Murphy, Howard Street is steadily gaining a reputation for high quality produce, with south eastern undertones that result in dishes people come back for time and time again. In a lofty, industrial-esque setting customers can enjoy the food along with some of our carefully selected wines or one of Sean’s show stopping cocktails from his ‘rejuvenated’ list containing our signature cocktails along with classics with a twist.
Award-winning restaurant marrying the best of Northern Irish produce with classical French cooking technique, producing seasonal menus. Our front of house team are a warm, welcoming and attentive group, accompanied by a driven and focused team of chefs under David Gillmore. We have a Chef Apprenticeship Program and are aim is always to exceed your expectations through our hospitality. James Street South is available for private hire and now boasts a Private Dining Room, which can accommodate parties of 10-40 guests and a Cookery School offering practical and demonstration style classes.
Our aim at Villa Italia is to make you feel good - not just by giving you lovingly prepared food, but by offering you a warm welcome and a friendly team who are here to make your visit enjoyable whatever the occasion. Villa Italia is the home of rustic, hearty Italian cooking, with a menu inspired by the richness of traditional southern Italian cuisine. When it comes to our menu, whether it be our famous handmade stone-baked pizzas, our authentic Italian pastas or our carefully selected range of locally sourced meats and fish; you can rest assured we only use the freshest ingredients to give you the highest quality in all our meals.
Deanes Restaurants offer quality at a range of venues within Belfas; Deanes at Queens, Deanes Meat Locker, Love Fish, Deanes Deli Bistro and more. Michael Deane has revolutionised the eating out scene in Belfast. He has held a Michelin Star for 13 years, the longest ever in Ireland. He puts his consistent success down to a winning team of 100 professionals working throughout all seven Deane's restaurants, each one of whom takes responsibility for providing the best local food, cooked with flair and imagination and served to perfection.


---
layout: root
menuitem: Masthead
author: Editor
title: Masthead
subtitle: 'About Journalname'
description: "tweetable description for metadata."
category: meta
meta_image: "assets/img/filename.gif"
---
Aims & Scope
Aims and scope of journal.
Open Access Policies
Open access policies if you have them. Ours are put in as below in order to comply with best practices:
- This is an open access journal, which means that all content is freely available without charge to the user or his/her institution.
- We do not charge author fees for article processing or article submission.
- Users are allowed to read, download, copy, distribute, print, search, or link to the full texts of the articles in this journal without asking prior permission from the publisher or the author. This is in accordance with the BOAI definition of open access.
- Works are published using the Creative Commons Attribution-NonCommercial (CC BY-NC) license.
- Authors retain copyright and publishing rights of their work without restriction.
Publication Details
Here's where you can put all your editor names.


Final Presentation
When
Final presentations will be on Monday, May 6 and Wednesday, May 8. We'll do three presentations one day and two the other. Please email me to let me know your preference.
Everyone must attend both days. If you can't attend one day, make sure you email me in advance (and make sure that's not the day your group is presenting.)
- Monday: Phabricator, Review Board
- Wednesday: MongoDB, Ruby on Rails, Socket IO
What
Provide a debrief of your project, with four main components:
- Introduction. A concise introduction of the project you worked on. (Even though you are all familiar with each other's work, we may have some guests visiting the final presentations.)
- What is it?
- Why do people use it?
- What software architecture does it employ? (language? client? server? client-server?)
- Accomplishments. Describe what you worked on this semester:
- List your group's accomplishments. Don't sell your self short. Instead of saying "we fixed some bugs", list those bugs for us. No bug is too small.
- Give us the context around the accomplishment. If it is a bug fix, what was the error it fixed and what is a narrative of a situation your fix prevents?
- If appropriate, feel free to show a demo or high-level code example.
- Tip: It's great to walk the audience through the steps required to make something happen, with code examples or diagrams. I.e., "First the server sends this message. Then the client catches it. Now a choice happens. If this event occurs, then this other thing will happen.. but here's the bug! So we need to figure out how to resolve this while still retaining this other functionality... " etc.
- Team Structure Takeaways. How did your remote team and mentors
work with you? How did the core team (not counting you) work together?
Consider meetings, information exchange, bug tracking, feature
discussions, feature planning, etc.
- What are some aspects of this that seemed to work well. A good heuristic for this is whether you would replicated it in your own project.
- What are some aspects that you think need improvement?
- Pick one or two major take-aways that you think the rest of the class should hear. (e.g.: "having mentor 'office hours' is a really good idea since creates a casual atmosphere" or "this part of code reviews is helpful, but this part isn't")
- Project and Code Structure Takeaways. Tell us about the code design
from a high level, with a similar approach to the team structure takeaways.
- What are some aspects of the way your project code is organized that you think was great? Their use of a particular framework? Support libraries for defining APIs? Their coding style? Which parts will you seek to replicate on future projects?
- What aspects weren't great? What did you have a hard time with? Don't be shy: if something was challenging, weird, or hard, it's interesting to talk about.
- Anything cool/interesting that you think everyone should hear about coding style or architecture?
- Who? One presentation per group. Everyone in the group should speak.
- Time. Shoot for between 15 and 20 minutes. Larger groups should err on the side of more content to present.
- Code. Unlike Design Reviews, code is not required. If you include code, it must fit on the slide in at least 16pt font. Pseudocode encouraged: think high-level.
Mechanics
Final Note
Each of you was dealt a completely different hand of cards with this class, and I am really proud of how played them. Some projects have been one big task, others a series of small ones. Some well defined, others open-ended. Several of you have started something, and then realized later it needed to be re-designed or even abandoned due to information you later learned.
You've all worked hard and done great work, and you've helped the larger community during the process. Every one of you deserves to be proud of the work you'll present.


[gecode-users] Re: Var indexes-help
Guido Tack
tack at ps.uni-sb.de
Thu Feb 1 02:20:43 CET 2007
Hi!
> Thanks for the advice, it works smooth now.
> But one last question about the Var equalities.
>
> suppose Var A, B and an integer array I
> Let A to be the one possible values of index i where B=I[i]
I'm not sure I understand completely what you mean by possible
values. If you just mean I[A]=B, then you can use element(this, I, A, B).
> sth like;
> for all indexes i
> if " A equals I[i]" then "B can be assigned to i"
>
> but I couldnot find a way to imply the equality of VAR&Intger on
another VAR's possible values.
You swapped A and B now, right? In you original statement it read "if B
equals I[i] then A can be assigned to i". What you describe is just half
of what element does. Is there anything wrong in your model about the
inference "if A cannot be assigned to i, then B does not equal I[i]"
(i.e., the contraposition)? This is something you can implement using
reified constraints. However, if this does not hold for your model,
something's fishy ;-)
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20070201/5b8b1e6a/attachment.htm>
More information about the gecode-users
mailing list