Buhari admits reorganising Presidency, govt, says ethnic, political interpretations unfortunate
by John AmehJohn Ameh, Abuja
President Muhammadu Buhari has admitted reorganising the Presidency and appointments in government for improved performance.
The President, who spoke on Friday night on arrival from London after his private visit to the UK, decried what he called “ethnic” and “political” interpretations given to the reorganisation of political appointees in the office of Vice-President, Yemi Osinbajo.
Buhari explained that his administration recently created additional ministries, which also required that certain offices and functions would be moved out of the Villa.
Speaking at the Presidential Wing of the Nnamdi Azikiwe International Airport, Abuja, Buhari said, ‘‘They said 35 people were sacked in the Vice-President’s office.
“We just created some ministries and we reorganised and people are giving it ethnic and political dimensions. It is unfortunate.”
Asked what next Nigerians would expect from his government, Buhari replied that he was prepared to work harder.
He added that accountability by those in government was not negotiable.
‘‘We are going to work harder and be accountable. We have tried to make Nigerians understand why we do certain things.
“Accountability from bottom to top is absolutely necessary.
‘‘Whoever is responsible for government property, [should know] it is public property, it is not personal and he has to manage it according to the law.
‘‘That’s what I expect and I think that we have been around long enough to impress on people that we mean what we say”, a State House statement by Buhari’s Senior Special Assistant on Media and Publicity, Mr Garba Shehu, on Saturday, quoted him as saying.


03 December 1996
Disease Outbreak Reported
The Saudi Ministry of Health has issued requirements for the forthcoming Hajj season, as follows:
I. Yellow fever:
II. Meningococcal meningitis
Visitors from these countries will be checked at entry points to ensure that they are vaccinated. Suspect cases, shall be isolated and preventive measures will be taken in respect of their direct contacts. If the authenticity of the vaccination certificate is felt to be questionable, revaccination is to be carried out.
Chemoprophylaxis will be administered to all visitors from these countries to lower the carrier rate among them.
III. Diphtheria
Visitors arriving for pilgrimage or "Umra" purposes from the countries of the former USSR are requested to present a certificate indicating diphtheria vaccination. They will also be given one does of benzathene penicillin as follows:
600 000 units for persons weighing less than 30 kg; 1 200 000 units for adults and children weighing more than 30 kg.
Those allergic to penicillin should, instead, be given erythromycin, as follows:
For all the above, certificates should be issued either in Arabic, English or French; in addition, a copy in the official language of the country of origin may be enclosed.
IV. Epidemiological surveillance
Tight control is exercised on entry points in respect of pilgrims and "Umra" visitors, and thorough surveillance shall be made in respect of visitors coming from countries infected with diseases subject to the International Health Regulations, in addition to isolation of suspect cases and surveillance of their contacts.
V. Foods
Foods carried by visitors and pilgrims are banned and not allowed into the country. Special rules apply for foods imported for commercial purposes.
The above, as well as all circulars issued in this respect, shall be strictly adhered to during the
pilgrimage and "Umra" seasons.
WHO comment: This is to inform visitors of the full requirements for entry into the country; it does not mean an endorsement by WHO of all measures stipulated. Saudi Arabia is enforcing these measures in accordance with International Health Regulations (1969) Part VIII, article 84 which states "Migrants, nomads, seasonal workers or persons taking part in periodic mass congregations, and any ship, in particular small boats for international coastal traffice, aircraft, train, road vehicle or other means of transport carrying them, may be subjected to additional health measures conforming with the laws and regulations of each State concerned, and with any agreement concluded between any such States."


“Every day 12,000 people in India die due to the sheer lack of donated blood. India collects 11 million units of blood but needs 15 million units, so there's a deficit of 4 million units.”
"India has the world's largest shortage of blood, with all states together battling a huge shortfall of 41 million units and demand outstripping supply by over 400%, says the first of its kind study published in the journal The Lancet. And demand is rising, says the findings" read more
In the past few years, India has seen an improvement in the blood collection (from 9.8 million units in 2012-12 to 11.45 million in 2017-18).
Currently, India has 2,760 blood banks of which 1,131 blood banks are supported by NACO, Ministry of Health and Family Welfare (MoHFW).
Orgainsations responsible for blood campaign
Indian Red Cross Society
Blood Banks
Hospitals
NGO
SBTCs


DOMNode::appendChild
(PHP 5, PHP 7)
DOMNode::appendChild — Adds new child at the end of the children
说明
public DOMNode DOMNode::appendChild ( DOMNode $newnode )
This function appends a child to an existing list of children or creates a new
list of children. The child can be created with e.g. DOMDocument::createElement
(), DOMDocument::createTextNode() etc. or simply by using any other node.
参数
newnode
The appended child.
返回值
The node added.
错误／异常
DOM_NO_MODIFICATION_ALLOWED_ERR
Raised if this node is readonly or if the previous parent of the node being
inserted is readonly.
DOM_HIERARCHY_REQUEST_ERR
Raised if this node is of a type that does not allow children of the type
of the newnode node, or if the node to append is one of this node's
ancestors or this node itself.
DOM_WRONG_DOCUMENT_ERR
Raised if newnode was created from a different document than the one that
created this node.
范例
The following example will add a new element node to a fresh document.
Example #1 Adding a child
createElement("para");
$newnode = $doc->appendChild($node);
echo $doc->saveXML();
?>
参见
• DOMNode::insertBefore() - Adds a new child before a reference node
• DOMNode::removeChild() - Removes child from list of children
• DOMNode::replaceChild() - Replaces a child
User Contributed Notes 3 notes
===============================================================================
What's not mentioned here is that DOMNode::appendChild() can also be used to
move an existing node to another part of the DOMDocument, e.g.
loadXML("");
$bar = $doc->documentElement->firstChild;
$foo = $doc->documentElement->lastChild;
$foo->appendChild($bar);
print $doc->saveXML();
?>
This produces:
Note that the nodes "" and "" were siblings, i.e. the first and
last child of "" but using appendChild() we were able to move ""
so that it is a child of "".
This saves you the trouble of doing a DOMNode::removeChild($bar) to remove "
" before appending it as a child of "".
Kris Dover
===============================================================================
Aware dealing with DOMNodeList and appendChild() on the same Node.
If you want to replace only the children not the DOMElement itself you probably
foreach childNodes-property or get the DOMElements with a for-loop and item()
-method of the DOMNodeList.
You will fail if you not clone the received single DOMElement. Actually the
count of the DOMNodelist will be decreased on appendChild count but appendChild
seems to refer to the old Nodelist and nothing visible will happen. Cloning
will help.
===============================================================================
If you want to create nested DOM elements:
createElement("foo");
$doc->appendChild($foo);
$bar = $doc->createElement("bar");
$foo->appendChild($bar);
$bazz = $doc->createElement("bazz");
$foo->appendChild($bazz);
echo $doc->saveXML();
?>
Is equivalent to:


Dejarik, also known as Hyperchess, is a game featured in Star Wars, dating all the way back to A New Hope. Although there was no complete ruleset present in the movies, two official rulesets have been created, one for the Jedi Challenges video game and one for Star Wars: Galaxy's Edge in Disneyland. Additionally, about a dozen fan rulesets have been created, some of which have their own variations. However, few are easily playable without a physical Dejarik set. This website attempts to make them playable.
Blake Whitlow's document is an invaluable resource for studying Dejarik variants and formed the basis for this website.


Tear-jerker
Charlie Adam says leaving Rangers broke his heart and reduced him to tears
by David FowlerCHARLIE ADAM has revealed leaving Rangers broke his heart and reduced him to tears.
The former Light Blues midfielder was signed by the club as a youngster and spent time out on loan at Ross County and St Mirren before eventually moving south.
During his time with the Buddies, in the 2005-06 season, he starred as the club won the Challenge Cup and won promotion to Scotland's top flight.
His successful stints away from the club gave him hope of making it with Rangers but he left for Blackpool on loan in 2009 before making the move permanent in search for first-team football.
He told the Daily Mail: "David Murray (then Rangers owner) used to tell the young lads coming through that when you left Rangers it was a step down.
"I listened to that stuff but I wanted to prove people wrong.
"You have to be like that. Some people think you are a good player, some don't. That's okay.
"People believe that once you leave Rangers, you fall away. I didn't want that.
"I used that as my drive. I knew I had been at a big club. I wanted to get back to a big club.
"There was, though sadness amid the defiance.
"I told myself: 'You ain't going to play. You have to leave.'
"I knew to be in any way satisfied I had to play football.
"But it was a tough thing to go. It broke my heart.
"Yeah, it broke my heart. I sat and cried."
Adam excelled for Blackpool under Ian Holloway who installed a lot of confidence in the midfielder.
He helped the club reach the English Premier League and his impressive performances took him to Liverpool.
He only stayed with the Reds for one season, where he played along side the likes of current Light Blues boss Steven Gerrard, Luis Suarez and Jamie Carragher, before joining Stoke City.
Adam, capped 26 times by Scotland, left the Potters this summer and hooked up with Championship rivals Reading on a one-year deal.
He's played seven times so far this campaign but is yet to find the net for his new club.
Keep u p to date with ALL the latest news and transfers at the Scottish Sun football page


Welcome to OI Chat
Search the room directory
Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!
Chat with Riot Bot
Get started with some tips from Riot Bot!
General discussion about Matrix and Blockstack
Matrix HQ
Discussion of all things Matrix!
#blockstack
Blockstack chat
#oichat
OI Chat, ask for help


DASHBOARD
The eHotel Smart Reservation System provides a solution to the current inefficient reservation system. It maximizes financial profitability and customer satisfaction.
Increased revenue would result from decreased costs as less employees would be needed since reservations would be done directly by the customer. Technology should automate low-level jobs, and employees would be performing monitoring and other value added activities. There would be less administrative work and more time for building relationships with customers. In essence. customer satisfaction and loyalty is key for business success.
In addition, management would be able see trends and patterns reservations. This would optimize the marketing strategy as they would make informed decisions regarding promotions, discounts and variable cost of the rooms.
The eHotel Smart Reservation System is flexible and accessible 24/7 for customers making reservations. There is no waiting time and it is simple to navigate online. Reduced waiting and time efficiency is linked to cost savings.
The centralized data storage ensures data correctness and validity, as well as providing backup archiving for analysis purposes and influencing marketing strategies. It prevents over/double bookings and manual data errors.
Notably, customer satisfaction leads to loyalty, acquisition and retention, which is vital to a business.
The eHotel Smart Reservation System has a user-friendly platform, is intuitive to navigate and easily manageable. It is interactive and displays real-time availability and pricing. Furthermore, security is ensured and all personal information stays private through data encryption processes.
The scope of the project is to deliver an online hotel reservation system which enables customers to make hotel reservations. It lowers administrative costs and increases profitability. Also, it simplifies the management of reservations, is time-efficient and allows the optimization of marketing schemes.
The eHotel chain has multiple hotels. Each hotel has rooms and employees. Rooms have to be reserved in advance. Rooms have variable costs. Customer data and reservation details are stored.
The system is composed of the following modules:
This module enables users to make reservations. The user selects the date, hotel, room type, length of stay. Date refers to the date of their estimated check-in date. There are different room types – including standard, double, family and suite.
This module provides employees visibility into the hotel room reservations. Reservation frequency and volume can be observed, relating to elements such as room type, hotel location. Dynamic factors such as time and room price are also displayed.
This module provides data reports that show room reservations patterns. This is crucial for managers, as it influences their future business practices and decisions. Information is stored in the data warehouse regarding customer, hotel and room details.
This module reveals hotel room reservations trends through analytics. Predictive models enhance business performance, customer retention and profitability. Room reservations data can be filtered and aggregated by date, hotel, location, room type.

SELECT RR.ReservationDate, C.FirstName, C.LastName, R.RoomNumber, RR.NumberGuests, RR.CheckInDate, RR.CheckOutDate, H.Name HotelName
FROM Reservation RR
LEFT JOIN Customer C ON RR.CustomerId = C.Id
LEFT JOIN Room R ON RR.RoomId = R.Id
LEFT JOIN Hotel H ON R.HotelId = H.Id;
The following query provides details regarding all reservations that have been created in the time range between 02.05.2018 – 10.05.2018.
SELECT RR.ReservationDate, C.FirstName, C.LastName, R.RoomNumber, RR.NumberGuests, RR.CheckInDate, RR.CheckOutDate, H.Name HotelName
FROM Reservation RR
LEFT JOIN Customer C ON RR.CustomerId = C.Id
LEFT JOIN Room R ON RR.RoomId = R.Id
LEFT JOIN Hotel H ON R.HotelId = H.Id
WHERE RR.ReservationDate BETWEEN '2018-05-02' AND '2018-05-10'
ORDER BY RR.ReservationDate ASC;
The following query provides details regarding all reservations that have been created in the time range between 02.05.2018 – 10.05.2018 for Grand Hotel London.
SELECT RR.ReservationDate, C.FirstName, C.LastName, R.RoomNumber, RR.NumberGuests, RR.CheckInDate, RR.CheckOutDate, H.Name HotelName
FROM Reservation RR
LEFT JOIN Customer C ON RR.CustomerId = C.Id
LEFT JOIN Room R ON RR.RoomId = R.Id
LEFT JOIN Hotel H ON R.HotelId = H.Id
WHERE RR.ReservationDate BETWEEN '2018-05-02' AND '2018-05-10'
AND H.Id = 7
ORDER BY RR.ReservationDate ASC, C.FirstName ASC, C.LastName ASC;
The following query shows the total number of hotels.
SELECT COUNT(*) TotalCountHotels
FROM Hotel
The following query provides details regarding total number of reservations that have been created in the time range between 02.05.2018 – 10.05.2018, on a daily basis, for Grand Hotel London.
SELECT RR.ReservationDate, COUNT(*) TotalReservations
FROM Reservation RR
LEFT JOIN Customer C ON RR.CustomerId = C.Id
LEFT JOIN Room R ON RR.RoomId = R.Id
LEFT JOIN Hotel H ON R.HotelId = H.Id
WHERE RR.ReservationDate BETWEEN '2018-05-02' AND '2018-05-10'
AND H.Id = 7
GROUP BY RR.ReservationDate
ORDER BY RR.ReservationDate ASC;
The following query provides details from a business perspective, regarding Daily Reservations by Customer in the time range between 01.05.2018 – 20.5.2018, for Grand Hotel London.
SELECT RR.ReservationDate, C.FirstName, C.LastName, COUNT(*) TotalReservations
FROM Reservation RR
LEFT JOIN Customer C ON RR.CustomerId = C.Id
LEFT JOIN Room R ON RR.RoomId = R.Id
LEFT JOIN Hotel H ON R.HotelId = H.Id
WHERE RR.ReservationDate BETWEEN '2018-05-01' AND '2018-05-20'
AND H.Id = 7
GROUP BY RR.ReservationDate, C.FirstName, C.LastName
ORDER BY RR.ReservationDate ASC, C.FirstName ASC, C.LastName ASC;
The following query provides details regarding the Customers who made more than one reservation and less than five reservations, in the time range between 01.05.2018 – 20.05.2018, for Grand Hotel London.
 Subsequently, to further develop skills , learnt Excel VBA and developed a small language-learning application.
Recently, became interested in business processes, database design and data reporting and visualization. Learnt ERD, SQL, SQL Server, and QlikView through online tutorials and developed a database system for a hotel chain, designing the database in SQL Server and implementing data visualizations in QlikView.
Aspiring to work as a BI Developer because it would enable me to consolidate, analyze and visualize data to support clients in business decisions. Demonstrated self-initiative, independent-learning and continuous improvement. Motivated by working in dynamic environments and producing high-quality solutions to business problems.
Email: j.cupac@gmail.com


Overview
After you have achieved Qualified Teacher Status (QTS) you need to complete a
statutory induction period
to teach in a maintained school, a maintained nursery school or a non-maintained special school in England.
The appropriate body decides whether you have met the induction standards. The appropriate body can be any of the following:
-
a local authority
-
a teaching school
-
the National Induction Panel for Teachers
For independent schools, including academies and free schools, the appropriate body can also be the Independent Schools Teacher Induction Panel.
Appeals process
You can appeal to the National College for Teaching and Leadership (NCTL), which acts on behalf of the Secretary of State for Education, if you:
-
have failed your induction period
-
think your induction period should be extended
The
induction appeals procedures document
outlines the induction appeal process.
Once we have received an appeal, we will arrange for an induction appeal panel to hear it. Panel members are recruited through a public appointments process. A least 1 panel member will be a teacher or will have been a teacher in the previous 5 years.
You have the right to take part in the induction appeal proceedings and to be represented. You can also request that the appeal is decided without a hearing.
In deciding an appeal, the panel will make a recommendation to the Secretary of State based on whether it is satisfied that:
-
you have failed to meet the
Teachers’ Standards
-
any issues regarding your support during induction were of sufficient importance to have seriously disadvantaged you in meeting the standards
-
it appears that you would be able to meet the standards if your induction period were extended
-
there are any other special circumstances that justify the appeal being allowed or the induction period being extended
The Secretary of State has the following options when deciding your appeal:
-
allow the appeal
-
dismiss the appeal
-
extend the induction for a period
Attend a hearing as an observer
Induction appeal hearings are held in public. Members of the press and the public can attend hearings.
Details of forthcoming induction appeal hearings
will be published 5 working days before they’re due to take place.
If you’re interested in attending a hearing, please contact:
-
the teacher regulation team (for members of the public)
-
the Department for Education’s central newsdesk (for journalists)
We can’t guarantee your place as an observer otherwise.
The panel may exclude the public and press from the hearing or part of the hearing where:
-
it believes that a public hearing may adversely affect the fairness of the proceedings
-
it is necessary to protect children’s interests
-
either party requests that the hearing be in private and the panel is satisfied that this is not contrary to the public interest
This information is general and, in all circumstances,
The Education (Induction Arrangements for School teachers) (England) Regulations 2012
take precedence. These are the basis for how the National College for Teaching and Leadership operates the regulatory arrangements on behalf of the Secretary of State.


Today, for reasons I shall not bore you with, my attention is drawn to the 2005 Hungarian film Fekete kefe, directed by Roland Vranik. This synopsis could scarcely fail to entice any devoted Hooting Yardist:
Four fake chimney sweeps prowl on rooftops, in pubs & flats of Budapest and in the stomach of a goat. Love, history, friendship and religion pull each other's weights but in the end there is absolutely no solution. Zoli, DÃ¶fi, Papi and Anti goes to the rooftops one morning to sweep the chimneys but they are meeting a strange housing-estate-goat so they are getting totally confused and everything goes chaos. After their hard day they find the key to escape in the stomach of the goat…
It's shot in black & white, too. I may have to write about a quartet of fake chimney sweeps and a “strange housing estate goat”, and should probably do so before seeing what I have already convinced myself is a masterwork of cinema.


The Comparison View
The Comparison View is a great source of information that helps you to compare your battery performance to the batteries of other users.
In the upper part of the window there are four columns of statistics. The three columns on the right are, respectively, the best, average and worst item in the shared archive. The leftmost columns are your laptop’s ones. When they are better than the average, they are displayed in green. When worse, they are displayed in red.
If you’re connected to Internet, MiniBatteryLogger will automatically retrieve information about other batteries of your computer model.
MiniBatteryLogger will try hard to guess your computer model. You can always manually correct the computer model if it is not right. The battery purchase date will also help the shared data tracking system to elaborate battery wear trends. Please don’t cheat! ;)
Collected data are publicly and anonymously available at the Shared Battery Data Archive in the form of a web service.
To update the shared battery data, use the Get shared data button, or the menu item of the same name under the Battery menu.
To share your battery data, use the Share your data button, or the menu item of the same name under the Battery menu.


{% extends 'core/page.html' %} {% load i18n %} {% load form_tags %} {% block page %}
{% url 'account_change_password' as password_url %} {% url 'account_email' as email_url %} {% blocktrans trimmed %} Please enter your updated account information. You can change your password using the password form and update your e-mail using the e-mail form. {% endblocktrans %}
{% trans 'If you want to remove your account please proceed by clicking the button below. Beware, once completed this can not be undone.' %}
{% trans 'Delete account' %} {% endblock %}


A terminal emulator built with web technologies, powered by web-term and electron.js.
Built with ♥ and JavaScript by Ionică Bizău.


Why you should not use brave browswer!(android,macos,windows,linux)
Well I can give you many evidens to not use this shit brave brwswer
- ADD BLOCK NOT WORKING AS WELL
- TOO MANY TRACKERS ,AND BRAVE DONT BLOCK THEM!
- IT NEEDS A LOT OF BETTERY!
- UN SAFE!
- TOO SLOW
INCLUDING MYSELF I have use brave for >twenty years,ITS REALLY A SHIT!


Escape Properties owns and operates premium residential accommodations for an exclusive set of members via our proprietary on-demand investment platform.
Our model generates a double bottom line of ROI and enhanced lifestyle travel for our guests. We provide our investors a safe and secure real estate investment as well as luxury residences for their personal and professional travel.
Our model generates a double bottom line of ROI and enhanced lifestyle travel for our guests. We provide our investors a safe and secure real estate investment as well as luxury residences for their personal and professional travel.
Escape Properties owns and operates premium residential accommodations for an exclusive set of members via our proprietary on-demand investment platform.
Founding Partner
Escape Properties owns and operates premium residential accommodations for an exclusive set of members via our proprietary on-demand investment platform.
Founding Partner
Escape Properties owns and operates premium residential accommodations for an exclusive set of members via our proprietary on-demand investment platform.
Founding Partner
Escape Properties owns and operates premium residential accommodations for an exclusive set of members via our proprietary on-demand investment platform.
Founding Partner
Escape Properties owns and operates premium residential accommodations for an exclusive set of members via our proprietary on-demand investment platform.


Explanation for topic 1
1+1=1
More explanation for topic 1
- list item
- another list item
Explanation for topic 2
2+2=2
More explanation for topic 2
- list item
- another list item
- and another one
Explanation for topic 3
3+3=3
More explanation for topic 3
Explanation for topic 4
4+4=4
More explanation for topic 4
Explanation for topic 5
5+5=5
More explanation for topic 5
Made by Robert Müller


class: center, middle, inverse, title-slide # Lecture 8 ## Continuous time dynamic models ### Ivan Rudik ### AEM 7130 --- # Roadmap 1. The theory behind continuous time models 2. Numerical methods for solving continuous time model --- # Model setup Consider a problem where each period an agent obtains flow utility `\(J(x(t),u(t))\)`, where `\(x\)` is our .hi[state] and `\(u\)` is our .hi[control] -- Suppose there is a finite horizon with a .hi[terminal time] `\(T\)` --- # Model setup The agent's objective is to maximize the total payoff, subject to the transitions of the states `\begin{align} &\max_{u,x_T} \int_0^T\, J(x(t),u(t))\,dt \label{eq:main_eq} \\ &\text{subject to: } \dot{x}(t) = g(x(t),u(t)), \, x(0) = x_0, \, x(T) = x_T \end{align}` This is an open-loop solution so we optimize our entire policy trajectory from time `\(t=0\)` We will not be solving for functions of states, but functions of time: `\(u(t), x(t)\)` --- # Hamiltonians In a dynamic optimization problem, we will have an auxiliary function that yields the first-order conditions -- This function is called the *Hamiltonian*: `$$H(x(t),u(t),\lambda(t)) \equiv J(x(t),u(t)) + \lambda(t)g(x(t),u(t))$$` It is a function that treats the transitions as quasi-constraints so it appears similar to the Lagrangian you know --- # Hamiltonians Pontryagin's Maximum Principle states that the following conditions are necessary for an optimal solution: `\begin{align} \frac{\partial H(x(t),u(t),\lambda(t))}{\partial u} &= 0 \,\, \forall t \in [0,T] \tag{Maximality} \\ \frac{\partial H(x(t),u(t),\lambda(t))}{\partial x} &= -\dot{\lambda}(t) \tag{Co-state} \\ \frac{\partial H(x(t),u(t),\lambda(t))}{\partial \lambda} &= \dot{x}(t) \tag{State transitions} \\ x(0) &= x_0 \tag{Initial condition} \\ \lambda(T) &= 0 \tag{Transversality} \end{align}` What do these conditions mean? --- # Necessary conditions First, what *is* the Hamiltonian? -- The Hamiltonian tells us the contribution of that instant `\(t\)` to overall utility via the change in flow utility and the change in the state (which affects future flow utilities) -- The decisionmaker can use her control to increase the contemporaneous flow utility and reap immediate rewards, or to alter the state variable to increase future rewards `$$H(x(t),u(t),\lambda(t)) \equiv \underbrace{J(x(t),u(t))}_{\text{current flow}} + \underbrace{\lambda(t)g(x(t),u(t))}_{\text{change in future value}}$$` --- # Necessary conditions `$$\frac{\partial H(x(t),u(t),\lambda(t))}{\partial u} = 0 \,\, \forall t \in [0,T]$$` The .hi-blue[maximality condition]: in every instant, we select the control so that we can no longer increase our total payoff -- It effectively sets the net marginal benefits of the control to zero --- # Necessary conditions `$$\frac{\partial H(x(t),u(t),\lambda(t))}{\partial \lambda} = \dot{x}(t)$$` The .hi-blue[state transition] is just a definition -- Taking the derivative of the Hamiltonian with respect to the shadow value, just like a Lagrangian, yields this constraint back --- # Necessary conditions `$$\frac{\partial H(x(t),u(t),\lambda(t))}{\partial x} = -\dot{\lambda}(t)$$` The .hi-blue[co-state condition] defines how the shadow value of our state transition, called the .hi[co-state variable], evolves over time -- What is the co-state? --- # Necessary conditions What is the co-state? -- The additional future value of having one more unit of our state variable -- Suppose we increase today's stock of `\(x\)` by one unit and this increases the instantaneous change in our value `\((H)\)` -- Then the shadow value of that stock `\((\lambda)\)` must decrease along an optimal trajectory -- Why? --- # Necessary conditions If it didn't, we could increase value by accumulating more of the stock variable `\(\rightarrow\)` there is a profitable deviation and what we were doing cannot be optimal We can re-write the co-state equation as `$$\frac{\partial J}{\partial x} + \lambda(t) \frac{\partial g}{\partial x} + \dot{\lambda}(t) = 0$$` --- # Necessary conditions `$$\frac{\partial J}{\partial x} + \lambda(t) \frac{\partial g}{\partial x} + \dot{\lambda}(t) = 0$$` We must have that the a unit of the stock's value must change (third term), so that is exactly offsets the change in value from increasing the stock in the immediate instant of time -- The immediate value is made up of the actual utility payoff (first term), and the future utility payoff payoff from how increasing the stock today affects the stock in the future (second term) --- # Necessary conditions These necessary conditions give us the shape of the optimal path but they do not tell us what the optimal path actually is -- Many different paths are consistent with these differential equations, depends on the constant of integration -- We need additional optimality conditions to use as constraints to impose the optimal path --- # Pinning down the optimal path We have effectively two ODEs, one for `\(\dot{\lambda}(t)\)` and one for `\(\dot{x}(t)\)` -- We need two constraints -- .hi-blue[Constraint 1:] Initial condition on the state -- This directly pins down where the state path starts -- We need to pin down the co-state path -- We do this using .hi-blue[transverality conditions] --- # Pinning down the optimal path In general there are four types of transversality conditions -- The first two are for free initial or terminal time problems: these are problems where the agent can select when the problem starts or ends -- The second two are for pinning down the initial and terminal state variables if they're free -- Usually terminal conditions are free and initial conditions are not --- # Pinning down the optimal path If the agent can select the time `\(T\)` when the problem ends, what do we know about the Hamiltonian at time `\(T\)`? -- It must be zero, why? -- The Hamiltonian tells us how the value of the problem is changing -- If `\(H\)` were positive, the value is increasing and the agent can do better by delaying ending the problem -- If `\(H\)` were negative, the value is decreasing and the agent can do better by ending the problem earlier --- # Pinning down the optimal path If the terminal state is free, the transversality condition is that its shadow value must be zero -- Why? -- If it were positive the policymaker could profitably deviate by altering the level of the stock. Finally, these are all necessary conditions of the problem --- # Discounting We discount the future using exponential discounting `\(\rightarrow\)` now time can directly affect value -- Assume that time does not directly affect instantaneous payoffs or the transitions equations -- Then our value is `\(J(x(t),u(t),t) = e^{-rt}\,V(x(t),u(t))\)` -- `\(J\)` yields the present, time `\(0\)` value of the change in value at time `\(t\)` -- `\(J\)` is the *present value* and `\(V\)` is the *current value* -- Present value refers to the value with respect to a specific period that we call the present --- # Current value terms Our previous necessary conditions apply to present value Hamiltonians, but let us analyze a current value Hamiltonian to avoid including time terms, `\begin{align} H^{cv}(x(t),u(t),\mu(t)) \equiv e^{rt} &H(x(t),u(t),\lambda(t),t) \\ &= e^{rt} J(x(t),u(t),t) + e^{rt}\lambda(t)g(x(t),u(t)) \end{align}` `\(\mu(t)\)` is the shadow value `\(\lambda\)` brought into current value terms: `\(\mu(t) = e^{rt} \lambda(t)\)` --- # Current value terms We can then re-write our necessary conditions in current value by substituting in for: - the shadow value (which implies that `\(\dot{\lambda}(t) = -re^{-rt}\mu(t) + e^{-rt}\dot{\mu}(t)\)`) - `\(\partial H / \partial x = e^{-rt}\,\partial H^{cv}/\partial x\)` into our co-state condition: `$$e^{-rt}\frac{\partial H^{cv}(x(t),u(t),\mu(t))}{\partial x} = e^{-rt}\left[r\mu(t) - \dot{\mu}(t)\right]$$` --- # Current value `$$e^{-rt}\frac{\partial H^{cv}(x(t),u(t),\mu(t))}{\partial x} = e^{-rt}\left[r\mu(t) - \dot{\mu}(t)\right]$$` -- Before, the present value form of the co-state condition required the change in the present shadow value precisely equal the effect of the state variable on instantaneous value --- # Current value `$$e^{-rt}\frac{\partial H^{cv}(x(t),u(t),\mu(t))}{\partial x} = e^{-rt}\left[r\mu(t) - \dot{\mu}(t)\right]$$` In current value form, the co-state condition recognizes that the change in the present shadow value is comprised of two parts: 1. The change in the current shadow value 2. The reduction in present value purely from the passage of time -- If discounting is high (large `\(r\)`), then the current shadow value must change quicker in order to compensate the policymaker for leaving stock for the future                                                                                --- # Numerical methods for continuous time models Continuous time models are systems of ODEs -- A first-order ordinary differential equation has the form `\begin{align} dy/dt = f(y,t) \notag \end{align}` -- Where `\(f:\mathbb{R}^{n+1}\rightarrow\mathbb{R}^n\)` -- The unknown is the function `\(y(t):[t_0,T] \rightarrow \mathbb{R}^n\)` -- `\(n\)` determines the number of differential equations that we have --- # Numerical methods for continuous time models The differential equation will give us the shape of the path that is the solution, but not where that path lies in our state space -- We need additional conditions to pin down `\(y(t)\)`, how we pin down `\(y(t)\)` is what defines the different types of problems we have -- If we pin down `\(y(t_0) = y_0\)` or `\(y(T) = y_T\)` we have an initial value problem -- IVPs are defined by the function being pinned down at one end or the other --- # Numerical methods for continuous time models In one dimension we must pin down the function with either an initial or terminal condition so they are all IVPs by default -- If `\(n>1\)` then we can have a *boundary value problem* where we impose `\(n\)` conditions on `\(y\)` `\begin{align} g_i(y(t_0)) = 0, \,\,\,\,\, i=1,...,.n', \notag \\ g_i(y(T)) = 0, \,\,\,\,\, i=n'+1,...,n \notag \end{align}` where `\(g:\mathbb{R}^n\rightarrow\mathbb{R}^n\)` --- # Numerical methods for continuous time models In general we have that `\begin{align} g_i(y(t_i)) = 0 \notag \end{align}` for some set of points `\(t_i\)`, `\(t_0 \leq t_i \leq T\)`, `\(1 \leq i \leq n\)` -- Often we set `\(T = \infty\)` so we will need some condition in the limit: `\(\lim_{t\rightarrow\infty}y(t)\)` --- # Numerical methods for continuous time models Note two more things: 1. We are implicitly assuming that these `\(n\)` conditions are independent, otherwise we will not have a unique solution 2. IVPs and BVP are fundamentally different: IVPs are problems where the auxiliary conditions that pin down the solution are all at one point, in BVPs they can be at different points, this has significant implications for how we can solve the problems --- # Numerical methods for continuous time models If we have higher-order ODEs we can use a simple change of variables `\begin{align} d^2y/dx^2 = g(dy/dx,y,x) \notag \end{align}` for `\(x,y\in\mathbb{R}\)` -- Define `\(z=dy/dx\)` and then we can study the alternative system `\begin{align} dy/dx = z \qquad dz/dx = g(z,y,x) \notag \end{align}` of two first-order ODEs -- In general you can always transform a `\(n\)`th-order ODE into `\(n\)` first-order ODEs --- # Finite difference methods for IVPs We solve IVPs using finite-difference methods -- Consider the following IVP `$$y'=f(t,y), \qquad y(t_0) = y_0$$` -- A finite-difference method solves this IVP by first specifying a grid/mesh over `\(t\)`: `\(t_0 < t_1 < ... < t_i < ...\)` -- Assume the grid is uniformly spaced: `\(t_i = t_0 + ih, \, i=0,1,...,N\)` where `\(h\)` is the mesh size -- Our goal is to find for each `\(t_i\)`, a value `\(Y_i\)` that closely approximates `\(y(t_i)\)` --- # Finite difference methods for IVPs To do this, we replace our differential equation with a difference system on the grid -- For example we might have `\(Y_{i+1} = F(Y_i, Y_{i-1},...,t_{i+1},t_i,...)\)` -- We then solve the difference equation for the `\(Y\)`'s in sequence where the initial `\(Y_0\)` is fixed by the initial condition `\(Y_0 = y_0\)` -- This approximates the solution only at the grid points, but then we can interpolate using standard procedures to get the approximate solution off the grid points --- # Euler's method The workhorse finite-difference method is Euler's method -- Euler's method is the difference equation `$$Y_{i+1} = Y_i + hf(t_i,Y_i)$$` where `\(Y_0\)` is given by the initial condition --- # Euler's method

 Suppose the current iterate is `\(P=(t_i,Y_i)\)` and `\(y(t)\)` is the true solution -- At `\(P\)`, `\(y'(t_i)\)` is the tangent vector `\(\vec{PQ}\)` -- Euler's method follows that direction until `\(t=t_{i+1}\)` at `\(Q\)` -- The Euler estimate of `\(y(t_{i+1})\)` is then `\(Y^E_{i+1}\)` --- # Euler's method This sounds very similar to Newton's method, because it is -- Euler's method can be motivated by a similar Taylor approximation argument -- If `\(y(t)\)` is the true solution, the second order Taylor expansion around `\(t_i\)` is `$$y(t_{i+1}) = y(t_i) + hy'(t_i) + \frac{h^2}{2}y''(\xi)$$` for some `\(\xi \in [t_i,t_{i+1}]\)` --- # Euler's method `$$y(t_{i+1}) = y(t_i) + hy'(t_i) + \frac{h^2}{2}y''(\xi)$$` If we drop the second order term and assume `\(f(t_i,Y_i) = y'(t_i)\)` and `\(Y_i = y(t_i)\)` we have exactly Euler's formula -- For small `\(h\)`, `\(y(x)\)` should be a close approximation to the solution of the truncated Taylor expansion,so `\(Y_i\)` should be a good approximation to `\(y(t_i)\)` --- # Euler's method This approach approximated `\(y(t)\)` with a linear function with slope `\(f(t_i,Y_i)\)` on the interval `\([t_i,t_{i+1}]\)` -- We can motivate Euler's method with an integration argument instead of a Taylor expansion argument -- The fundamental theorem of calculus tells us that `$$y(t_{i+1}) = y(t_i) + \int_{t_i}^{t_{i+1}} f(s,y(s)) ds$$` --- # Euler's method `$$y(t_{i+1}) = y(t_i) + \int_{t_i}^{t_{i+1}} f(s,y(s)) ds$$` If we approximate the integral with `\(hf(t_i,y(t_i))\)`, a box of width `\(h\)` and height `\(f(t_i,y(t_i))\)`, then `\(y(t_{i+1}) = y(t_i) + hf(t_i,y(t_i))\)` which implies the Euler method difference equation above if `\(Y_i = y(t_i)\)` -- Thus this also approximate `\(y(t)\)` with a linear function over each subinterval with slope `\(f(t_i,Y_i)\)` -- As `\(h\)` decreases, we would expect the solutions to become more accurate -- As `\(h\rightarrow0\)`, we are back in the ODE world --- # Euler's method errors Consider a system, `\(y'(t) = y(t), y(0) = 1\)` -- The solution to this is simply `\(y(t) = e^t\)` -- The Euler method gives us a difference equation of `\(Y_{i+1} = Y_i + hY_i = (1+h)Y_i\)` -- This difference equation has solution `\(Y_i = (1+h)^i\)` and implies the approximation is `\(Y(t) = (1+h)^{t/h}\)` --- # Euler's method errors Thus the relative error between the two is `$$log(|Y(t)/y(t)|) = \frac{t}{h}log(1+h) - t = \frac{t}{h}(h-h^2+...)-t = -th + ...$$` where excluded terms have order higher than `\(h\)` -- Thus the relative error in the Euler approximation has order `\(h\)` and as `\(h\)` goes to zero so does the approximation error --- # Euler's method errors In general we can show that Euler's method has linear convergence *Suppose the solution to `\(y'(t) = f(t,y(t)), y(t_0) = y_0\)` is `\(C^3\)` on `\([t_0,T]\)`, that `\(f\)` is `\(C^2\)` , and that `\(f_y\)` and `\(f_{yy}\)` are bounded for all `\(y\)` and `\(t_0\leq t \leq T\)`. Then the error of the Euler scheme with step size `\(h\)` is `\(O(h)\)`* --- # Implicit Euler method We expanded `\(y\)` around `\(t_i\)`, but we could always expand around `\(t_{i+1}\)` so that we have `$$y(t_i) = y(t_{i+1}) - hy'(t_{i+1}) = y(t_{i+1}) - hf(t_{i+1},y(t_{i+1}))$$` -- This yields the implicit Euler method `$$Y_{i+1} = Y_i + hf(t_{i+1},Y_{i+1})$$` -- Notice that now `\(Y_{i+1}\)` is only implicitly defined in terms of `\(t_i\)` and `\(Y_i\)` so we will need to solve a non-linear equation in `\(Y_{i+1}\)` --- # Implicit Euler method This seems not great, before we simply computed `\(Y_{i+1}\)` from values known at `\(i\)` but now we have to perform a rootfinding problem -- However, `\(Y_{i+1}\)` does not simply depend on only `\(Y_i\)` and `\(t_{i+1}\)` but also `\(f\)` at `\(t_{i+1}\)` -- Thus the implicit Euler method will get us better approximation properties, often times much better -- Because of this we can typically use larger `\(h\)`'s with the implicit Euler method --- # Runge-Kutta methods Runge-Kutta methods take Euler methods but adapts `\(f\)` -- In the standard Euler approach we implicitly assume that the slope at `\((t_{i+1},Y^E_{i+1})\)` is the same as the slope at `\((t_{i},Y^E_{i})\)` which is a bad assumption unless `\(y\)` is linear -- For example if `\(y\)` is concave we will overshoot the true value -- We could instead use the slope at `\((t_{i+1},Y^E_{i+1})\)` but this will give the same problem but in the opposite direction, we will undershoot --- # Runge-Kutta methods Runge-Kutta methods recognizes these two facts -- A first-order Runge-Kutta method will take the average of these two slopes to arrive at the formula `$$Y_{i+1} = Y_i + \frac{h}{2}\left[f(t_i,Y_i) + f(t_{i+1},Y_{i+1}) \right]$$` -- This converges quadratically to the true solution in `\(h\)`, but now uses two evaluations per step -- This has the same flavor as forward vs central finite differences -- There are higher order Runge-Kutta rules that have even more desirable properties outlined in Judd (1998) --- # Boundary Value Problems IVPs are easy to solve because the solution depends only on local conditions so we can use local solution algorithms which are convenient -- BVPs have auxiliary conditions that are imposed at different points in time so we lose the local nature of the problem and our solutions must now be global in nature --- # Boundary Value Problems Consider the following BVP `\begin{align} \dot{x} = f(x,y,t) \notag\\ \dot{y} = g(x,y,t) \notag\\ x(t_0) = x_0, \,\,\,\, y(T) = y_T \notag \end{align}` where `\(x\in\mathbb{R}^n,y\in\mathbb{R}^m\)` -- We cannot use standard IVP approaches because at `\(t_0\)` or `\(T\)` we only know the value of either `\(x\)` or `\(y\)` but not both -- Thus we cannot find the next value of both of them using only local information: we need alternative approaches --- # Boundary Value Problems: Shooting The core method for solving BVPs is called .hi-blue[shooting] -- The idea behind shooting is that we guess the value of `\(y(t_0)\)`, and use an IVP method to see what that means about `\(y(T)\)` -- For any given guess, we generally won't hit the terminal condition exactly and might not even be that close -- But we do get some information from where we end up at `\(y(T)\)` and can use that information to update our guesses for `\(y(t_0)\)` until we are sufficiently close to `\(y_T\)` -- There are two components to a shooting method --- # Shooting First we guess some `\(y(0) = y_0\)` and then solve the IVP problem with methods we've already used `\begin{align} \dot{x} = f(x,y,t) \notag\\ \dot{y} = g(x,y,t) \notag\\ x(t_0) = x_0, \,\,\,\, y(0) = y_0 \notag \end{align}` to find some `\(y(T)\)` which we call `\(Y(T,y_0)\)` since it depends on our initial guess `\(y_0\)` -- Second we need to find the *right* `\(y_0\)` -- We want to find a `\(y_0\)` such that `\(y_T = Y(T,y_0)\)` -- This is a nonlinear equation in `\(y_0\)` so we need to solve nonlinear equations --- # Shooting We can write the algorithm as 1. Initialize: Guess `\(y_0^i\)`. Choose a stopping criterion `\(\epsilon > 0\)` 2. Solve the IVP for `\(x(T), y(T)\)` given the initial condition `\(y_0 = y_0^i\)` 3. If `\(||y(T) - y_T|| < \epsilon\)`, STOP. Else choose `\(y_0^{i+1}\)` based on the previous values of `\(y\)` and go back to step 1 --- # Shooting This is an example of a two layer algorithm -- The inner layer (step 1) uses an IVP method that solves `\(Y(T,y_0)\)` for any `\(y_0\)` -- This can be Euler, Runge-Kutta or anything else -- In the outer layer (step 2) we solve the nonlinear equation `\(Y(T,y_0) = y_T\)` -- We can use any nonlinear solver here, typically we do this by defining a subroutine that computes `\(Y(T,y_0)-y_T\)` as a function of `\(y_0\)` and then sends that subroutine to a rootfinding program --- # Example: Lifecycle model A simple lifecycle model is given by `\begin{align} \max_{c(t)} \int_0^T e^{-rt} u(c(t)) dt \notag\\ s.t. \,\,\,\, \dot{A}(t) = f(A(t)) + w(t) - c(t) \notag \\ A(0) = A(T) = 0. \notag \end{align}` `\(u(c(t))\)` is utility from consumption, `\(w(t)\)` is the wage rate, `\(A(t)\)` are assets and `\(f(A(t))\)` is the return on invested assets -- We assume that assets are initially and terminally zero where the latter would come about naturally from a transversality condition --- # Example: Lifecycle model The Hamiltonian is `$$H = u(c(t)) + \lambda(t)\left[ f(A(t)) + w(t) - c(t) \right]$$` -- and the co-state condition is given by `$$\dot{\lambda}(t) = r\lambda(t) - \lambda(t) f'(A(t))$$` -- The maximum principle implies that `\(u'(c(t)) = \lambda(t)\)` --- # Example: Lifecycle model This gives us a two equation system of differential equations (1 for the `\(A\)` transition, 1 for the costate condition) and the boundary conditions on `\(A\)` are what pin down the problem -- The issue here is that we never know `\(A\)` and `\(\lambda\)` at either `\(t=0\)` or `\(t=T\)` -- We can use the maximum principle to convert the costate condition into a condition on consumption `$$\dot{c}(t) = -\frac{u'(c(t))}{u''(c(t))}\left[f'(A(t)) - r\right]$$` --- # Example: Lifecycle model The Figure shows the phase diagram assuming that `\(f'(A) > r\)` for all `\(A\)`

 If `\(A(T) < 0\)` when we guess `\(c(0) = c_H\)`, but `\(A(T) > 0\)` when we guess `\(c(0) = c_L\)`, we know the correct guess lies in between and we can solve for it using the bisection method --- # Reverse shooting for `\(\infty\)` horizon problems The standard infinite horizon optimal control problem is `\begin{align} \max_{u(t)} \int_{0}^\infty e^{-rt} \pi(x(t),u(t)) dt \notag\\ s.t. \,\,\,\, \dot{x}(t) = f(x(t),u(t)) \notag\\ x(0) = x_0. \notag \end{align}` -- We still have `\(x(0) = x_0\)` as before, but we no longer have the terminal condition -- We replace it with a transversality condition that `\(\lim_{t\rightarrow\infty} e^{-rt} |\lambda(t)^Tx(t)| \leq \infty\)` --- # Reverse shooting for `\(\infty\)` horizon problems Shooting methods do not really work for infinite horizon problems since we need to integrate the problem over a very long time horizon and so `\(x(T)\)` will be particularly sensitive to `\(\lambda(0)\)` when `\(T\)` is large -- The primary issue is that the terminal state, because of the long time horizon, is very sensitive to the initial guess -- But this implies something very convenient: that the initial state corresponding to any terminal state is not very sensitive to the value of the terminal state -- Thus what we will do is not guess the value of the initial condition and integrate forward, we will guess the terminal condition and integrate .hi-blue[backward] --- # Example: Reverse shooting for `\(\infty\)` horizon problems Consider the simplest growth model `\begin{align} \max_{c(t)} \int_0^\infty e^{-rt} u(c(t)) dt \notag\\ \dot{k}(t) = f(k(t)) - c(t) \notag\\ s.t. \,\,\,\, k(0) = k_0, \notag \end{align}` where `\(c\)` is consumption, `\(k\)` is the capital stock, and `\(f\)` is production --- # Example: Reverse shooting for `\(\infty\)` horizon problems We can use Pontryagin's necessary conditions to get that consumption and capital are governed by the following differential equations `\begin{align} \dot{c}(t) = -\frac{u'(c(t))}{u''(c(t))}(f'(k) - r) \notag\\ \dot{k}(t) = f(k(t)) -c(t), \notag \end{align}` with boundary conditions, `\begin{align} k(0) = k_0, \,\,\,\, 0 < \lim_{t\rightarrow\infty}|k(t)| \leq \infty \notag \end{align}` --- # Example: Reverse shooting for `\(\infty\)` horizon problems Assume `\(u\)` and `\(f\)` are concave, the Figure shows the phase diagram for the problem

 We have a steady state at `\(k=k^*\)`, this occurs when `\(f'(k(t)) = r\)` and `\(c^* = f(k^*)\)` --- # Example: Reverse shooting for `\(\infty\)` horizon problems For this problem there exists a stable manifold `\(M_S\)` and an unstable manifold `\(M_U\)` so that the steady state is .hi-blue[saddle point stable] -- Both are invariant manifolds because any system that starts on either of these manifolds will continue to move along the manifold -- However `\(M_S\)` is stable because it will converge to the steady state while `\(M_U\)` diverges away from the steady state --- # Example: Reverse shooting for `\(\infty\)` horizon problems Lets first use standard shooting to try to compute the stable manifold -- We want `\(k\)` and `\(c\)` to equal their steady state values at `\(t=\infty\)`, but we can't quite do that so we search for a `\(c(0)\)` so that `\((c(t),k(t))\)` has a path that is close to the steady state -- Suppose we start with `\(k_0 < k^*\)`, if we guess `\(c(0)\)` too big we will cross the `\(k\)` isoquant and have a falling capital stock, but if we guess `\(c(0)\)` too small we will get a path that crosses the `\(c\)` isoquant and results in a falling consumption level --- # Example: Reverse shooting for `\(\infty\)` horizon problems This gives us our algorithm 1. Initialize: set `\(c_H = f(k_0)\)` and set `\(c_L = 0\)`, choose a stopping criterion `\(\epsilon > 0\)` 2. Set `\(c_0 = \frac{1}{2}(c_L + c_H)\)` 3. Solve the IVP with initial conditions `\(c(0) = c_0, k(0) = k_0\)`. Stop the IVP at the first `\(t\)` when `\(\dot{c}(t) < 0\)` or `\(\dot{k}(t) < 0\)`, denote this `\(T\)` 4. If `\(|c(T) - c^*| < \epsilon\)`, STOP. If `\(\dot{c}(t) < 0\)`, set `\(c_L = c_0\)`, else set `\(c_H = c_0\)`. Go to step 2. --- # Example: Reverse shooting for `\(\infty\)` horizon problems This algorithm makes sense but the phase diagram shows why it will have trouble finding the stable manifold -- Any small deviation from `\(M_S\)` is magnified and results in a path that increasingly gets far away from `\(M_S\)` -- Unless we happen to pick a point precisely on the stable manifold we will move away from it, so it is hard to search for the solution since changes in our guesses will lead to wild changes in terminal values --- # Example: Reverse shooting for `\(\infty\)` horizon problems Now suppose we wanted to find a path on `\(M_U\)`, notice that the flow pushes points *toward* `\(M_U\)` so the deviations are smushed together -- If we wanted to compute a path that lies near the unstable manifold, we could simply pick a point near the steady state as the initial condition and integrate the system -- We don't actually want to solve for a path on `\(M_U\)` but this gives us some insight --- # Example: Reverse shooting for `\(\infty\)` horizon problems We want to change the system so that the stable manifold becomes the unstable manifold -- We can do this easily by reversing time `\begin{align} \dot{c}(t) = \frac{u'(c(t))}{u''(c(t))}(f'(k) - r) \notag\\ \dot{k}(t) = -(f(k(t)) -c(t)) \notag \end{align}` -- This yields the same phase diagram but with the arrows turned `\(180^\circ\)` so the stable manifold forward in time is now the unstable manifold reverse in time -- This allows us to exploit how paths tend to converge toward the stable manifold while going away from the steady state --- # Reverse shooting for `\(\infty\)` horizon problems

 --- # Stable manifold interpretation The stable manifold of the original system has an important interpretation -- This is an autonomous problem so time plays no direct role besides through discounting -- Thus the optimal consumption at some time `\(t\)` depends only on the capital stock -- We can express this as a policy function `\(C(k)\)` such that `\(c(t) = C(k(t))\)` -- Optimality requires that the capital stock converge to the steady state, and the only optimal `\((c(t),k(t))\)` pairs are on the stable manifold so the stable manifold .hi-blue[is the policy function] `\(C(k)\)`


Everything you feel to know about your fave fashion brand. And then some.
"At GoldThrift, our customer is a priority. Whether you are aware of it or not, once you reach a certain stage in life, everything around you becomes a bit mature. You start leading a busier live with more hectic schedules, you are more confident, sophisticated and you kinda have figured out your personal style. At this stage, the bags you carry or the accessories you wear matters. You need the power of an amazing bag or accessory to up any look. It could be a beautiful tote bag that pulls a skirt and blouse together for the office or a perfectly classic yet evening-appropriate chain-strap bag or clutch purse that becomes your night-out go to. You can also decide to turn heads with unique and top quality bags or watches that are difficult to find elsewhere. That's where we come in. GoldThrift is your number one source for "Alternative Luxury" Bags & Accessories. We understand you, and we know products you would love.""


--- permalink: /404.html ---
You accessed a nonexistent page. Please go back to a previous page or go to the index page .


Image Preferences
Which subreddit or multireddit?
www.reddit.com
For multireddits, input the entire url after "reddit.com",
e.g.
"/user/kjoneslol/m/sfwpornnetwork"
.
Only public multireddits are supported.
Sort type?
Top
Hot
New
Rising
Controversial
From how long ago?
Past Hour
Past Day
Past Week
Past Month
Past Year
All Time
Allow NSFW images?
Time and Date Preferences
Use 24-hour clock?
Show time?
Show date?
Help
Bugs, feedback or suggestions?
Save


---
# blog page must be named index.html and in its own folder to support pagination
# https://jekyllrb.com/docs/pagination/
layout: page
title: Blog
background:
---
{% assign post_list = site.posts | group_by_exp:"post", "post.date | date: '%m-%Y'" %}
{% for year in post_list %}


VITA SA - Admin Users
.
Actions
Create New User
Name
Actions
Edit User
×
Name:
Email:
Password:
Password Confirm:
Phone:
Member of Mobile Team
Certification
Role
Sites Coordinated
×


{% extends "layout.html" %} {% block body %}
| The Free Software World don't give us food to eat, so have a look to our services. |
We have a lot of humor sense, but we are very professionals too, so if you need some of our offered services, you can contact us clicking on "Grampus Team" (into the footer) or sending us an email to<EMAIL_ADDRESS>We love doing penetration testing and we have very nice references, we have reported a lot of "nice" bugs in important websites.
Try our services and if you think that we are good workers, share our website with the world!
We love coding too!, so if you need to someone with experience, send us an email where you explain us what want you do and we will contact you.


This section details how to add content to your site using both the modules that are included with DNN and the free project modules that can be downloaded from https://www.codeplex.com. You will find direct links to download project modules listed below the description of the module.


--- title: Always Be Useful excerpt: date: '2019-02-11 17:42:23 +0100' categories: - Motivation ---
I've spent a lot of time pursuing happiness and meaning in my life, but I've realized it's a moving target and that it happens in the moment. Happiness is not a goal in itself, but rather a by-product or side-effect of something else. But what is that "something else" then?
One way of seeing it is being useful and doing more things that have a positive impact on other people, the environment and the nature. The Purpose Of Life Is Not Happiness: It’s Usefulness is an insightful article and one of the best I've read on the subject — and a good reminder not to overthink things. Do more!


This is a presentation title.
This is a presentation subtitle.
This is a content slide
This is a supporting idea.
This is another supporting idea.
And another.
This is a second content slide
This is a supporting idea.
This is another supporting idea.
And another.
This is a section divider.
This is slide with an image.
Here's a worksheet activity.
Get in touch!
@simplysecureorg
contact@simplysecure.org


{Rewriter, INVERSES} = require './rewriter'
The CoffeeScript Lexer. Uses a series of token-matching regexes to attempt matches against the beginning of the source code. When a match is found, a token is produced, we consume the match, and start again. Tokens are in the form:
[tag, value, locationData]
where locationData is {first_line, first_column, last_line, last_column}, which is a
format that can be fed directly into Jison. These
are read by jison in the parser.lexer
function defined in coffee-script.coffee.
{Rewriter, INVERSES} = require './rewriter'
Import the helpers we need.
{count, starts, compact, last, repeat, invertLiterate,
locationDataToString, throwSyntaxError} = require './helpers'
The Lexer class reads a stream of CoffeeScript and divvies it up into tagged tokens. Some potential ambiguity in the grammar has been avoided by pushing some extra smarts into the Lexer.
exports.Lexer = class Lexer
tokenize is the Lexer's main method. Scan by attempting to match tokens one at a time, using a regular expression anchored at the start of the remaining code, or a custom recursive token-matching method (for interpolations). When the next token has been recorded, we move forward within the code past the token, and begin again.
Each tokenizing method is responsible for returning the number of characters it has consumed.
Before returning the token stream, run it through the Rewriter unless explicitly asked not to.
tokenize: (code, opts = {}) ->
@literate = opts.literate # Are we lexing literate CoffeeScript?
@indent = 0 # The current indentation level.
@indebt = 0 # The over-indentation at the current level.
@outdebt = 0 # The under-outdentation at the current level.
@indents = [] # The stack of all current indentation levels.
@ends = [] # The stack for pairing up tokens.
@tokens = [] # Stream of parsed tokens in the form `['TYPE', value, location data]`.
@chunkLine =
opts.line or 0 # The start line for the current @chunk.
@chunkColumn =
opts.column or 0 # The start column of the current @chunk.
code = @clean code # The stripped, cleaned original source code.
At every position, run through this list of attempted matches,
short-circuiting if any of them succeed. Their order determines precedence:
@literalToken
is the fallback catch-all.
i = 0
while @chunk = code[i..]
consumed = \
@identifierToken() or
@commentToken() or
@whitespaceToken() or
@lineToken() or
@heredocToken() or
@stringToken() or
@numberToken() or
@regexToken() or
@jsToken() or
@literalToken()
Update position
[@chunkLine, @chunkColumn] = @getLineAndColumnFromChunk consumed
i += consumed
@closeIndentation()
@error "missing #{tag}" if tag = @ends.pop()
return @tokens if opts.rewrite is off
(new Rewriter).rewrite @tokens
Preprocess the code to remove leading and trailing whitespace, carriage returns, etc. If we're lexing literate CoffeeScript, strip external Markdown by removing all lines that aren't indented by at least four spaces or a tab.
clean: (code) ->
code = code.slice(1) if code.charCodeAt(0) is BOM
code = code.replace(/\r/g, '').replace TRAILING_SPACES, ''
if WHITESPACE.test code
code = "\n#{code}"
@chunkLine--
code = invertLiterate code if @literate
code
Matches identifying literals: variables, keywords, method names, etc.
Check to ensure that JavaScript reserved words aren't being used as
identifiers. Because CoffeeScript reserves a handful of keywords that are
allowed in JavaScript, we're careful not to tag them as keywords when
referenced as property names here, so you can still do jQuery.is()
even
though is
means ===
otherwise.
identifierToken: ->
return 0 unless match = IDENTIFIER.exec @chunk
[input, id, colon] = match
Preserve length of id for location data
idLength = id.length
poppedToken = undefined
if id is 'own' and @tag() is 'FOR'
@token 'OWN', id
return id.length
forcedIdentifier = colon or
(prev = last @tokens) and (prev[0] in ['.', '?.', '::', '?::'] or
not prev.spaced and prev[0] is '@')
tag = 'IDENTIFIER'
if not forcedIdentifier and (id in JS_KEYWORDS or id in COFFEE_KEYWORDS)
tag = id.toUpperCase()
if tag is 'WHEN' and @tag() in LINE_BREAK
tag = 'LEADING_WHEN'
else if tag is 'FOR'
@seenFor = yes
else if tag is 'UNLESS'
tag = 'IF'
else if tag in UNARY
tag = 'UNARY'
else if tag in RELATION
if tag isnt 'INSTANCEOF' and @seenFor
tag = 'FOR' + tag
@seenFor = no
else
tag = 'RELATION'
if @value() is '!'
poppedToken = @tokens.pop()
id = '!' + id
if id in JS_FORBIDDEN
if forcedIdentifier
tag = 'IDENTIFIER'
id = new String id
id.reserved = yes
else if id in RESERVED
@error "reserved word \"#{id}\""
unless forcedIdentifier
id = COFFEE_ALIAS_MAP[id] if id in COFFEE_ALIASES
tag = switch id
when '!' then 'UNARY'
when '==', '!=' then 'COMPARE'
when '&&', '||' then 'LOGIC'
when 'true', 'false' then 'BOOL'
when 'break', 'continue' then 'STATEMENT'
else tag
tagToken = @token tag, id, 0, idLength
if poppedToken
[tagToken[2].first_line, tagToken[2].first_column] =
[poppedToken[2].first_line, poppedToken[2].first_column]
if colon
colonOffset = input.lastIndexOf ':'
@token ':', ':', colonOffset, colon.length
input.length
Matches numbers, including decimals, hex, and exponential notation. Be careful not to interfere with ranges-in-progress.
numberToken: ->
return 0 unless match = NUMBER.exec @chunk
number = match[0]
if /^0[BOX]/.test number
@error "radix prefix '#{number}' must be lowercase"
else if /E/.test(number) and not /^0x/.test number
@error "exponential notation '#{number}' must be indicated with a lowercase 'e'"
else if /^0\d*[89]/.test number
@error "decimal literal '#{number}' must not be prefixed with '0'"
else if /^0\d+/.test number
@error "octal literal '#{number}' must be prefixed with '0o'"
lexedLength = number.length
if octalLiteral = /^0o([0-7]+)/.exec number
number = '0x' + parseInt(octalLiteral[1], 8).toString 16
if binaryLiteral = /^0b([01]+)/.exec number
number = '0x' + parseInt(binaryLiteral[1], 2).toString 16
@token 'NUMBER', number, 0, lexedLength
lexedLength
Matches strings, including multi-line strings. Ensures that quotation marks are balanced within the string's contents, and within nested interpolations.
stringToken: ->
switch @chunk.charAt 0
when "'"
return 0 unless match = SIMPLESTR.exec @chunk
string = match[0]
@token 'STRING', string.replace(MULTILINER, '\\\n'), 0, string.length
when '"'
return 0 unless string = @balancedString @chunk, '"'
if 0 < string.indexOf '#{', 1
@interpolateString string[1...-1], strOffset: 1, lexedLength: string.length
else
@token 'STRING', @escapeLines string, 0, string.length
else
return 0
if octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test string
@error "octal escape sequences #{string} are not allowed"
string.length
Matches heredocs, adjusting indentation to the correct level, as heredocs preserve whitespace, but ignore indentation to the left.
heredocToken: ->
return 0 unless match = HEREDOC.exec @chunk
heredoc = match[0]
quote = heredoc.charAt 0
doc = @sanitizeHeredoc match[2], quote: quote, indent: null
if quote is '"' and 0 <= doc.indexOf '#{'
@interpolateString doc, heredoc: yes, strOffset: 3, lexedLength: heredoc.length
else
@token 'STRING', @makeString(doc, quote, yes), 0, heredoc.length
heredoc.length
Matches and consumes comments.
commentToken: ->
return 0 unless match = @chunk.match COMMENT
[comment, here] = match
if here
@token 'HERECOMMENT',
(@sanitizeHeredoc here,
herecomment: true, indent: repeat ' ', @indent),
0, comment.length
comment.length
Matches JavaScript interpolated directly into the source via backticks.
jsToken: ->
return 0 unless @chunk.charAt(0) is '`' and match = JSTOKEN.exec @chunk
@token 'JS', (script = match[0])[1...-1], 0, script.length
script.length
Matches regular expression literals. Lexing regular expressions is difficult to distinguish from division, so we borrow some basic heuristics from JavaScript and Ruby.
regexToken: ->
return 0 if @chunk.charAt(0) isnt '/'
if match = HEREGEX.exec @chunk
length = @heregexToken match
return length
prev = last @tokens
return 0 if prev and (prev[0] in (if prev.spaced then NOT_REGEX else NOT_SPACED_REGEX))
return 0 unless match = REGEX.exec @chunk
[match, regex, flags] = match
if regex[..1] is '/*' then @error 'regular expressions cannot begin with `*`'
if regex is '//' then regex = '/(?:)/'
@token 'REGEX', "#{regex}#{flags}", 0, match.length
match.length
Matches multiline extended regular expressions.
heregexToken: (match) ->
[heregex, body, flags] = match
if 0 > body.indexOf '#{'
re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/')
if re.match /^\*/ then @error 'regular expressions cannot begin with `*`'
@token 'REGEX', "/#{ re or '(?:)' }/#{flags}", 0, heregex.length
return heregex.length
@token 'IDENTIFIER', 'RegExp', 0, 0
@token 'CALL_START', '(', 0, 0
tokens = []
for token in @interpolateString(body, regex: yes)
[tag, value] = token
if tag is 'TOKENS'
tokens.push value...
else if tag is 'NEOSTRING'
continue unless value = value.replace HEREGEX_OMIT, ''
Convert NEOSTRING into STRING
value = value.replace /\\/g, '\\\\'
token[0] = 'STRING'
token[1] = @makeString(value, '"', yes)
tokens.push token
else
@error "Unexpected #{tag}"
prev = last @tokens
plusToken = ['+', '+']
plusToken[2] = prev[2] # Copy location data
tokens.push plusToken
Remove the extra "+"
tokens.pop()
unless tokens[0]?[0] is 'STRING'
@token 'STRING', '""', 0, 0
@token '+', '+', 0, 0
@tokens.push tokens...
if flags
Find the flags in the heregex
flagsOffset = heregex.lastIndexOf flags
@token ',', ',', flagsOffset, 0
@token 'STRING', '"' + flags + '"', flagsOffset, flags.length
@token ')', ')', heregex.length-1, 0
heregex.length
Matches newlines, indents, and outdents, and determines which is which. If we can detect that the current line is continued onto the the next line, then the newline is suppressed:
elements
.each( ... )
.map( ... )
Keeps track of the level of indentation, because a single outdent token can close multiple indents, so we need to know how far in we happen to be.
lineToken: ->
return 0 unless match = MULTI_DENT.exec @chunk
indent = match[0]
@seenFor = no
size = indent.length - 1 - indent.lastIndexOf '\n'
noNewlines = @unfinished()
if size - @indebt is @indent
if noNewlines then @suppressNewlines() else @newlineToken 0
return indent.length
if size > @indent
if noNewlines
@indebt = size - @indent
@suppressNewlines()
return indent.length
diff = size - @indent + @outdebt
@token 'INDENT', diff, indent.length - size, size
@indents.push diff
@ends.push 'OUTDENT'
@outdebt = @indebt = 0
else
@indebt = 0
@outdentToken @indent - size, noNewlines, indent.length
@indent = size
indent.length
Record an outdent token or multiple tokens, if we happen to be moving back inwards past several recorded indents.
outdentToken: (moveOut, noNewlines, outdentLength) ->
while moveOut > 0
len = @indents.length - 1
if @indents[len] is undefined
moveOut = 0
else if @indents[len] is @outdebt
moveOut -= @outdebt
@outdebt = 0
else if @indents[len] < @outdebt
@outdebt -= @indents[len]
moveOut -= @indents[len]
else
dent = @indents.pop() + @outdebt
moveOut -= dent
@outdebt = 0
@pair 'OUTDENT'
@token 'OUTDENT', dent, 0, outdentLength
@outdebt -= moveOut if dent
@tokens.pop() while @value() is ';'
@token 'TERMINATOR', '\n', outdentLength, 0 unless @tag() is 'TERMINATOR' or noNewlines
this
Matches and consumes non-meaningful whitespace. Tag the previous token as being "spaced", because there are some cases where it makes a difference.
whitespaceToken: ->
return 0 unless (match = WHITESPACE.exec @chunk) or
(nline = @chunk.charAt(0) is '\n')
prev = last @tokens
prev[if match then 'spaced' else 'newLine'] = true if prev
if match then match[0].length else 0
Generate a newline token. Consecutive newlines get merged together.
newlineToken: (offset) ->
@tokens.pop() while @value() is ';'
@token 'TERMINATOR', '\n', offset, 0 unless @tag() is 'TERMINATOR'
this
Use a \
at a line-ending to suppress the newline.
The slash is removed here once its job is done.
suppressNewlines: ->
@tokens.pop() if @value() is '\\'
this
We treat all other single characters as a token. E.g.: ( ) , . !
Multi-character operators are also literal tokens, so that Jison can assign
the proper order of operations. There are some symbols that we tag specially
here. ;
and newlines are both treated as a TERMINATOR
, we distinguish
parentheses that indicate a method call from regular parentheses, and so on.
literalToken: ->
if match = OPERATOR.exec @chunk
[value] = match
@tagParameters() if CODE.test value
else
value = @chunk.charAt 0
tag = value
prev = last @tokens
if value is '=' and prev
if not prev[1].reserved and prev[1] in JS_FORBIDDEN
@error "reserved word \"#{@value()}\" can't be assigned"
if prev[1] in ['||', '&&']
prev[0] = 'COMPOUND_ASSIGN'
prev[1] += '='
return value.length
if value is ';'
@seenFor = no
tag = 'TERMINATOR'
else if value in MATH then tag = 'MATH'
else if value in COMPARE then tag = 'COMPARE'
else if value in COMPOUND_ASSIGN then tag = 'COMPOUND_ASSIGN'
else if value in UNARY then tag = 'UNARY'
else if value in SHIFT then tag = 'SHIFT'
else if value in LOGIC or value is '?' and prev?.spaced then tag = 'LOGIC'
else if prev and not prev.spaced
if value is '(' and prev[0] in CALLABLE
prev[0] = 'FUNC_EXIST' if prev[0] is '?'
tag = 'CALL_START'
else if value is '[' and prev[0] in INDEXABLE
tag = 'INDEX_START'
switch prev[0]
when '?' then prev[0] = 'INDEX_SOAK'
switch value
when '(', '{', '[' then @ends.push INVERSES[value]
when ')', '}', ']' then @pair value
@token tag, value
value.length
Sanitize a heredoc or herecomment by erasing all external indentation on the left-hand side.
sanitizeHeredoc: (doc, options) ->
{indent, herecomment} = options
if herecomment
if HEREDOC_ILLEGAL.test doc
@error "block comment cannot contain \"*/\", starting"
return doc if doc.indexOf('\n') < 0
else
while match = HEREDOC_INDENT.exec doc
attempt = match[1]
indent = attempt if indent is null or 0 < attempt.length < indent.length
doc = doc.replace /// \n #{indent} ///g, '\n' if indent
doc = doc.replace /^\n/, '' unless herecomment
doc
A source of ambiguity in our grammar used to be parameter lists in function definitions versus argument lists in function calls. Walk backwards, tagging parameters specially in order to make things easier for the parser.
tagParameters: ->
return this if @tag() isnt ')'
stack = []
{tokens} = this
i = tokens.length
tokens[--i][0] = 'PARAM_END'
while tok = tokens[--i]
switch tok[0]
when ')'
stack.push tok
when '(', 'CALL_START'
if stack.length then stack.pop()
else if tok[0] is '('
tok[0] = 'PARAM_START'
return this
else return this
this
Close up all remaining open blocks at the end of the file.
closeIndentation: ->
@outdentToken @indent
Matches a balanced group such as a single or double-quoted string. Pass in a series of delimiters, all of which must be nested correctly within the contents of the string. This method allows us to have strings within interpolations within strings, ad infinitum.
balancedString: (str, end) ->
continueCount = 0
stack = [end]
for i in [1...str.length]
if continueCount
--continueCount
continue
switch letter = str.charAt i
when '\\'
++continueCount
continue
when end
stack.pop()
unless stack.length
return str[0..i]
end = stack[stack.length - 1]
continue
if end is '}' and letter in ['"', "'"]
stack.push end = letter
else if end is '}' and letter is '/' and match = (HEREGEX.exec(str[i..]) or REGEX.exec(str[i..]))
continueCount += match[0].length - 1
else if end is '}' and letter is '{'
stack.push end = '}'
else if end is '"' and prev is '#' and letter is '{'
stack.push end = '}'
prev = letter
@error "missing #{ stack.pop() }, starting"
Expand variables and expressions inside double-quoted strings using Ruby-like notation for substitution of arbitrary expressions.
"Hello #{name.capitalize()}."
If it encounters an interpolation, this method will recursively create a new Lexer, tokenize the interpolated contents, and merge them into the token stream.
str
is the start of the string contents (IE with the " or """ stripped
off.)options.offsetInChunk
is the start of the interpolated string in the
current chunk, including the " or """, etc... If not provided, this is
assumed to be 0. options.lexedLength
is the length of the
interpolated string, including both the start and end quotes. Both of these
values are ignored if options.regex
is true.options.strOffset
is the offset of str, relative to the start of the
current chunk. interpolateString: (str, options = {}) ->
{heredoc, regex, offsetInChunk, strOffset, lexedLength} = options
offsetInChunk = offsetInChunk || 0
strOffset = strOffset || 0
lexedLength = lexedLength || str.length
Clip leading \n from heredoc
if heredoc and str.length > 0 and str[0] == '\n'
str = str[1...]
strOffset++
Parse the string.
tokens = []
pi = 0
i = -1
while letter = str.charAt i += 1
if letter is '\\'
i += 1
continue
unless letter is '#' and str.charAt(i+1) is '{' and
(expr = @balancedString str[i + 1..], '}')
continue
NEOSTRING is a fake token. This will be converted to a string below.
tokens.push @makeToken('NEOSTRING', str[pi...i], strOffset + pi) if pi < i
inner = expr[1...-1]
if inner.length
[line, column] = @getLineAndColumnFromChunk(strOffset + i + 1)
nested = new Lexer().tokenize inner, line: line, column: column, rewrite: off
popped = nested.pop()
popped = nested.shift() if nested[0]?[0] is 'TERMINATOR'
if len = nested.length
if len > 1
nested.unshift @makeToken '(', '(', strOffset + i + 1, 0
nested.push @makeToken ')', ')', strOffset + i + 1 + inner.length, 0
Push a fake 'TOKENS' token, which will get turned into real tokens below.
tokens.push ['TOKENS', nested]
i += expr.length
pi = i + 1
tokens.push @makeToken('NEOSTRING', str[pi..], strOffset + pi) if i > pi < str.length
If regex, then return now and let the regex code deal with all these fake tokens
return tokens if regex
If we didn't find any tokens, then just return an empty string.
return @token 'STRING', '""', offsetInChunk, lexedLength unless tokens.length
If the first token is not a string, add a fake empty string to the beginning.
tokens.unshift @makeToken('NEOSTRING', '', offsetInChunk) unless tokens[0][0] is 'NEOSTRING'
@token '(', '(', offsetInChunk, 0 if interpolated = tokens.length > 1
Push all the tokens
for token, i in tokens
[tag, value] = token
if i
Create a 0-length "+" token.
plusToken = @token '+', '+' if i
locationToken = if tag == 'TOKENS' then value[0] else token
plusToken[2] =
first_line: locationToken[2].first_line
first_column: locationToken[2].first_column
last_line: locationToken[2].first_line
last_column: locationToken[2].first_column
if tag is 'TOKENS'
Push all the tokens in the fake 'TOKENS' token. These already have sane location data.
@tokens.push value...
else if tag is 'NEOSTRING'
Convert NEOSTRING into STRING
token[0] = 'STRING'
token[1] = @makeString value, '"', heredoc
@tokens.push token
else
@error "Unexpected #{tag}"
if interpolated
rparen = @makeToken ')', ')', offsetInChunk + lexedLength, 0
rparen.stringEnd = true
@tokens.push rparen
tokens
Pairs up a closing token, ensuring that all listed pairs of tokens are correctly balanced throughout the course of the token stream.
pair: (tag) ->
unless tag is wanted = last @ends
@error "unmatched #{tag}" unless 'OUTDENT' is wanted
@indent -= size = last @indents
@outdentToken size, true
return @pair tag
@ends.pop()
Returns the line and column number from an offset into the current chunk.
offset
is a number of characters into @chunk.
getLineAndColumnFromChunk: (offset) ->
if offset is 0
return [@chunkLine, @chunkColumn]
if offset >= @chunk.length
string = @chunk
else
string = @chunk[..offset-1]
lineCount = count string, '\n'
column = @chunkColumn
if lineCount > 0
lines = string.split '\n'
column = last(lines).length
else
column += string.length
[@chunkLine + lineCount, column]
Same as "token", exception this just returns the token without adding it to the results.
makeToken: (tag, value, offsetInChunk = 0, length = value.length) ->
locationData = {}
[locationData.first_line, locationData.first_column] =
@getLineAndColumnFromChunk offsetInChunk
Use length - 1 for the final offset - we're supplying the last_line and the last_column, so if last_column == first_column, then we're looking at a character of length 1.
lastCharacter = Math.max 0, length - 1
[locationData.last_line, locationData.last_column] =
@getLineAndColumnFromChunk offsetInChunk + lastCharacter
token = [tag, value, locationData]
token
Add a token to the results.
offset
is the offset into the current @chunk where the token starts.
length
is the length of the token in the @chunk, after the offset. If
not specified, the length of value
will be used.
Returns the new token.
token: (tag, value, offsetInChunk, length) ->
token = @makeToken tag, value, offsetInChunk, length
@tokens.push token
token
Peek at a tag in the current token stream.
tag: (index, tag) ->
(tok = last @tokens, index) and if tag then tok[0] = tag else tok[0]
Peek at a value in the current token stream.
value: (index, val) ->
(tok = last @tokens, index) and if val then tok[1] = val else tok[1]
Are we in the midst of an unfinished expression?
unfinished: ->
LINE_CONTINUER.test(@chunk) or
@tag() in ['\\', '.', '?.', '?::', 'UNARY', 'MATH', '+', '-', 'SHIFT', 'RELATION'
'COMPARE', 'LOGIC', 'THROW', 'EXTENDS']
Converts newlines for string literals.
escapeLines: (str, heredoc) ->
str.replace MULTILINER, if heredoc then '\\n' else ''
Constructs a string token by escaping quotes and newlines.
makeString: (body, quote, heredoc) ->
return quote + quote unless body
body = body.replace /\\([\s\S])/g, (match, contents) ->
if contents in ['\n', quote] then contents else match
body = body.replace /// #{quote} ///g, '\\$&'
quote + @escapeLines(body, heredoc) + quote
Throws a compiler error on the current position.
error: (message) ->
TODO: Are there some cases we could improve the error line number by passing the offset in the chunk where the error happened?
throwSyntaxError message, first_line: @chunkLine, first_column: @chunkColumn
Keywords that CoffeeScript shares in common with JavaScript.
JS_KEYWORDS = [
'true', 'false', 'null', 'this'
'new', 'delete', 'typeof', 'in', 'instanceof'
'return', 'throw', 'break', 'continue', 'debugger'
'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally'
'class', 'extends', 'super'
]
CoffeeScript-only keywords.
COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']
COFFEE_ALIAS_MAP =
and : '&&'
or : '||'
is : '=='
isnt : '!='
not : '!'
yes : 'true'
no : 'false'
on : 'true'
off : 'false'
COFFEE_ALIASES = (key for key of COFFEE_ALIAS_MAP)
COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat COFFEE_ALIASES
The list of keywords that are reserved by JavaScript, but not used, or are used by CoffeeScript internally. We throw an error when these are encountered, to avoid having a JavaScript error at runtime.
RESERVED = [
'case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum'
'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind'
'__indexOf', 'implements', 'interface', 'package', 'private', 'protected'
'public', 'static', 'yield'
]
STRICT_PROSCRIBED = ['arguments', 'eval']
The superset of both JavaScript keywords and reserved words, none of which may be used as identifiers or properties.
JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED)
exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED)
exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED
The character code of the nasty Microsoft madness otherwise known as the BOM.
BOM = 65279
Token matching regexes.
IDENTIFIER = /// ^
( [$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]* )
( [^\n\S]* : (?!:) )? # Is this a property name?
///
NUMBER = ///
^ 0b[01]+ | # binary
^ 0o[0-7]+ | # octal
^ 0x[\da-f]+ | # hex
^ \d*\.?\d+ (?:e[+-]?\d+)? # decimal
///i
HEREDOC = /// ^ ("""|''') ([\s\S]*?) (?:\n[^\n\S]*)? \1 ///
OPERATOR = /// ^ (
?: [-=]> # function
| [-+*/%<>&|^!?=]= # compound assign / compare
| >>>=? # zero-fill right shift
| ([-+:])\1 # doubles
| ([&|<>])\2=? # logic / shift
| \?(\.|::) # soak access
| \.{2,3} # range or splat
) ///
WHITESPACE = /^[^\n\S]+/
COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/
CODE = /^[-=]>/
MULTI_DENT = /^(?:\n[^\n\S]*)+/
SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/
JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/
Regex-matching-regexes.
REGEX = /// ^
(/ (?! [\s=] ) # disallow leading whitespace or equals signs
[^ [ / \n \\ ]* # every other thing
(?:
(?: \\[\s\S] # anything escaped
| \[ # character class
[^ \] \n \\ ]*
(?: \\[\s\S] [^ \] \n \\ ]* )*
]
) [^ [ / \n \\ ]*
)*
/) ([imgy]{0,4}) (?!\w)
///
HEREGEX = /// ^ /{3} ([\s\S]+?) /{3} ([imgy]{0,4}) (?!\w) ///
HEREGEX_OMIT = /\s+(?:#.*)?/g
Token cleaning regexes.
MULTILINER = /\n/g
HEREDOC_INDENT = /\n+([^\n\S]*)/g
HEREDOC_ILLEGAL = /\*\//
LINE_CONTINUER = /// ^ \s* (?: , | \??\.(?![.\d]) | :: ) ///
TRAILING_SPACES = /\s+$/
Compound assignment tokens.
COMPOUND_ASSIGN = [
'-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='
]
Unary tokens.
UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']
Logical tokens.
LOGIC = ['&&', '||', '&', '|', '^']
Bit-shifting tokens.
SHIFT = ['<<', '>>', '>>>']
Comparison tokens.
COMPARE = ['==', '!=', '<', '>', '<=', '>=']
Mathematical tokens.
MATH = ['*', '/', '%']
Relational tokens that are negatable with not
prefix.
RELATION = ['IN', 'OF', 'INSTANCEOF']
Boolean tokens.
BOOL = ['TRUE', 'FALSE']
Tokens which a regular expression will never immediately follow, but which a division operator might.
See: http://www.mozilla.org/js/language/js20-2002-04/rationale/syntax.html#regular-expressions
Our list is shorter, due to sans-parentheses method calls.
NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']
If the previous token is not spaced, there are more preceding tokens that force a division parse:
NOT_SPACED_REGEX = NOT_REGEX.concat ')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'
Tokens which could legitimately be invoked or indexed. An opening parentheses or bracket following these tokens will be recorded as the start of a function invocation or indexing operation.
CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']
INDEXABLE = CALLABLE.concat 'NUMBER', 'BOOL', 'NULL', 'UNDEFINED'
Tokens that, when immediately preceding a WHEN
, indicate that the WHEN
occurs at the start of a line. We disambiguate these from trailing whens to
avoid an ambiguity in the grammar.
LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']


Detect Amount Splitting (Smurfs)
Show Full Description
Description
Demonstrate hawk:AIs ability to detect cases of smurfing by just splitting amounts into smaller chunks. :
- Transaction will generate an open case although the transaction amount 5.294 EUR is below the low risk threshold for the initiating customer
- The decision to open a case is based on the fact that for the account holder there have been previous transactions that exceed the accumulated threshold
- More sophistication if wanted: accept the transaction in case manager and case will have an accelerated threshold (threshold times the acceleration factor). Then send transaction again and it will appear in Auto-close. When you send further transactions a case will be generated once the new threshold is hit
If you want to start the case history from scratch then generate a new IBAN (http://randomiban.com/?country=Germany) for the account holder “Marius Musterman”
Expected Result
- Case will appear in “Open Cases” with a volume history leading to the decision
API Request
{
"accountHoldingParty": "FUNDS_ORIGINATOR",
"appendedCustomData": {
"additionalCustomerId": "12345678"
},
"balanceBeforeTransaction": 1234.56,
"balanceCurrency": "EUR",
"callbackUrl": "https://callback.url/1234",
"fundsBeneficiary": {
"accountNumber": "CZ1873382772061233133661",
"bankIdentifier": "SSKMDEMM",
"holder": "Expecting-NEW for-this-case"
},
"fundsOriginator": {
"accountNumber": "CZ1873382772061233133661",
"bankIdentifier": "SSKMDEMM",
"holder": "Tuan Nguyen"
},
"initiatedAmount": 12.34,
"initiatedCurrency": "EUR",
"initiatingParty": "FUNDS_ORIGINATOR",
"purposeCode": "SSBE",
"settledAmount": 56.78,
"settledCurrency": "EUR",
"tenantCustomerId": 12345678,
"tenantProcessingTimestamp": "2019-02-28T14:38:47.812",
"tenantTransactionId": 12345678,
"usage": "Testing hawk:AI NEW processing status"
}
Result
No Scenario Processed...


--- layout: post status: publish published: true title: "[HOT]“中国涉黄网站非官方收录”上线预告" author: Leask author_login: leask author_email<EMAIL_ADDRESS>author_url: https://leaskh.com wordpress_id: 327 wordpress_url: http://leaskh.wordpress.com/2007/09/13/hot%e2%80%9c%e4%b8%ad%e5%9b%bd%e6%b6%89%e9%bb%84%e7%bd%91%e7%ab%99%e9%9d%9e%e5%ae%98%e6%96%b9%e6%94%b6%e5%bd%95%e2%80%9d%e4%b8%8a%e7%ba%bf%e9%a2%84%e5%91%8a date: '2007-09-13 09:34:50 +0800' date_gmt: '2007-09-13 09:34:50 +0800' categories: tags: [] comments: [] ---


{include file="default/common/header" /} {include file="default/common/tool-bar" /}
二合一转链
定向计划
ON
{include file="default/common/footer" /}


The Survey
Sign Up
My Surveys
1st Sample Survey
This is the first sample survey. This text is supposed to describe what the survey is all about
2nd Sample Survey
This is the second sample survey. This text is supposed to describe what the survey is all about
3rd Sample Survey
This is the third sample survey. This text is supposed to describe what the survey is all about
4th Sample Survey
This is the fourth sample survey. This text is supposed to describe what the survey is all about
5th Sample Survey
This is the fifth sample survey. This text is supposed to describe what the survey is all about
6th Sample Survey
This is the sixth sample survey. This text is supposed to describe what the survey is all about
7th Sample Survey
This is the seventh sample survey. This text is supposed to describe what the survey is all about
8th Sample Survey
This is the eigth sample survey. This text is supposed to describe what the survey is all about


File too big for email? Use SendBox.
Send a file now
Your email address:
Recipient's email address:
File:
Message:
Send


I talk a lotta talk but I don't
walk a lotta walk,
I try to live to please You but I
just can't shake the awk..ward..
voice that nags and says "You know what?
maybe take your eyes off you;
fix 'em firmly back on Jesus and
remember…He loves you."
"He loves you when the going's good, when
all things come up Milhouse,
and just as much when things are grey,
and all you feel is s—house!"
"He knows you want to please Him
so remember that you do!


Outdated Info
Hi there! So it’s the future now (2022 to be precise) and things have moved on: Interface Builder Plugins aren’t possible anymore, so this post is just a wonderful curiosity.
So VirtueDesktops has a small problem in that when it was written, Cocoa Bindings were new and not as well understood as they are now.  Below is the result of that brushing, and something that I think is drastically under utilised - custom Interface Builder (IB) palettes.
VirtueDesktops has the concept of “labelling” your desktops, much like you label files in the Finder. Given how used to the existing UI users are, representing it in the same fashion in the VirtueDesktops UI seems entirely logical to me. Surprise, surprise, this is one of those wonderful custom UI elements that Apple is so damned famous for not opening to developers (and in this case, I can understand given how little it is used elsewhere). So what do you do in a situation like this?
Thomas (the original author of VirtueDesktops), made a custom subclass of the NSControl and NSActionCell cocoa classes, and hooked this into a view programmatically. It worked well (and is still present in the current release of VirtueDesktops), and for all intents and purposes is a completely valid approach to the problem. Unfortunately, it has the side effect of swizzling view code (in the MVC sense) into places I don’t think view code belongs. And I can’t use IB to nicely manage every aspect of my UI (which is idealistic, but possible).
Here’s my approach: For custom controls like this, I’m writing them into a simple, reusable framework and IB palette. This way, I can make my actual code a lot, lot simpler which has the flow on effect of making it easier to find and resolve existing bugs.
You can download an early version of this framework and palette from this site, but I’ll give you a little warning - once you start using objects from a custom IB palette in your code, you need to keep that palette for future reference - if it gets deleted, and you’re still using an object dragged from the custom palette, your nib files will no longer open. I’m also not entirely happy with my cocoa prefix - I think I may move my namespace under my personal company name (boomBalada), but we’ll deal with that when we come to it.
I’ll try to write up a tutorial of how to construct your own custom IB palettes shortly (same bat-time, same bat-channel…).


Compass Error from Amplitudes Observed on the Visible Horizon
Latitude of the Observer:
(degrees)
Declination of the Celestial Body:
(Sun, Star or Planet)
(degrees)
Compass Bearing:
(degrees)
Amplitude:
(degrees)
Azimuth (Zn):
(degrees)
Compass Error:
(degrees)


Overview¶
schNell is a very lightweight python module that can be used to compute basic map-level noise properties for generic networks of gravitational wave interferometers. This includes primarily the noise power spectrum \(N_{\ell}\), but also other things, such as antenna patterns, overlap functions, inverse variance maps etc.
schNell is composed of three main classes:
Detector
s. These contain information about each individual detector of the network (their positions, noise properties, orientation etc.).NoiseCorrelation
s. These describe the noise-level correlation between pairs of detectors.MapCalculator
s. These objects combine a list ofDetector
s into a network (potentially together with aNoiseCorrelation
object) and compute the corresponding map-level noise properties arising from their correlations.
A quick but thorough description of how these three classes can be used to compute different quantities can be found in here.
Installation¶
Installing schNell should be as simple as typing:
pip install schnell [--user]
where the –user flag will only be necessary if you don’t have admin privileges.


Chimera Learning Platform
Open YouTube video in Chimera.
No video found on current tab. Go to
youtube.com
to find videos.
Open
Exit


One way to dig into some topic such as data analysis is just-doing, trial and error. Another way is reading blogs; a fruitful avenue in my experience. However, the classical way of reading some good book is all but outdated.
Here are some recommendations of books I found helpful as a starter (books in English and German).
R for Data Science
Grolemund, G., & Wickham, H. (2016). R for Data Science. O’Reilly Media, Incorporated. Retrieved from https://books.google.de/books?id=aZRYrgEACAAJ
Hadley Wickham did it again. This book is a great ressource for building up a solid base in data analysis using R. What is special is that, of course, the philosophy of “tidy data” is a pivotal path throughout the book. That comes as no surprise as Hadleyi is the major prophet of this way of thinking (a great way by the way). Second, the book is “modern” in the sense as newly developed, but thoughtfully devised and already quite popular approaches are put forward. Note that the book is not intended to go into all the depth of the R languages, neither programming, neither statistical learning. Most notably whereas the title indicates a salty dose of statistics, this association does not come true. Statistical modeling is a rather small topic in the book.
Introduction to Statistical Learning
James, G., Witten, D., Hastie, T., & Tibishirani, R. (2013). An Introduction to Statistical Learning (Vol. 112). New York City: Springer. DOI: http://doi.org/10.1007/978-1-4614-7138-7
A classical introduction, aimed at not-so mathematically inclined (or trained) learners. Important topics on the principles of statistical learnings are covered as well as widely used algorithms. R serves as the computational environment for all models/ computations. Datastes, exercised, and case studies (as well as an R package) comes bundled with the book. A great start into a deep data dive. Great extra: The PDF of the book is freely available in the web.
R - Einführung durch angewandte Statistik
Hatzinger, R., Hornik, K., & Nagel, H. (2011). R: Einführung durch angewandte Statistik. Hallbergmoos: Pearson Studium. Retrieved from http://books.google.de/books?id=jmCuEY07s7UC
This book is intended for (native) German speaking audiences, especially in college courses and the like. The book offers a broad perspective on “typical” statistics using R. The curriculum of the book very well reflects typical college curricula; a notion that may find widespread inclinement throughout teachers and professors. However, the book is not modern in the sense that more recent R approaches such as the “tidyverse” are discussed in the book. Modern critical discussion on the p-value, presentation of alternatives, reflection on open science, and more on statistical learning would have helped to render a good book great, in my opinion. However, to get a grip on standard statistics using R, this book is a valuable resource.


Changes the protection status of the selected object.
Syntax
OBJECT.PROTECTION(locked, lock_text)
OBJECT.PROTECTION?(locked, lock_text)
Locked is a logical value that determines whether the selected object is locked or unlocked. If locked is TRUE, Microsoft Excel locks the object; if FALSE, Microsoft Excel unlocks the object.
Lock_text is a logical value that determines whether text in a text box or button can be changed. Lock_text applies only if the object is a text box, button, or worksheet control. If lock_text is TRUE or omitted, text cannot be changed; if FALSE, text can be changed.
Remarks
You cannot lock or unlock an individual object with OBJECT.PROTECTION when protection is selected for objects in the Protect Sheet dialog box.
If an object is not selected, the function returns the #VALUE! error value and halts the macro.
In order for an object to be protected, you must use the PROTECT.DOCUMENT(, , , TRUE) function after changing the object's status with OBJECT.PROTECTION.
Related Functions
PROTECT.DOCUMENT Controls protection for the active worksheet
WORKBOOK.PROTECT Controls protection for the active workbook
Return to index


A great thing about being a small start up is that we can be far more personal than the bigger players in this field so we get to do things like meet with our clients over lunch, keep constant contact and answer all the questions you might have.
Our small size gives us all the time we need to devote our efforts to your project, whether its a website or a social media strategy, we can help you get a head up with things like advanced SEO strategies, powerful advertisement options and elegent designs.
We keep constant communication, and we're happy to come to your favored platform. We use things like Skype for voice and vidoe chat, and Discord for group chats keeping our communication channels open all the time is something we pride ourselves on.
We're a small operation with a big idea. An idea that I hope will help many people become more successful.
Our web team will handle any adjustments you decide with us in a fast and effective way that will ensure your new and improved brand will
be seen as soon as possible.
Our social team will get to work on a Social Media Strategy as soon as we have enough information from you for them to begin their work.
All you have to do is contact us, and we can talk about your options, how we can help and the best way forward for you and your business.


$def with (server_infos)
| Job server | IP | File descriptor | Client ID | Functions | |
|---|---|---|---|---|---|
| $server_info['hostport'][0]:$server_info['hostport'][1] | $if server_info['failed']:Not responding! | $else:||||
| $worker['ip'] | $worker['file_descriptor'] | $worker['client_id'] | $', '.join(worker['tasks']) |


10pc TnG fee for parking lots to go, says deputy minister
by BY EMMANUEL SANTA MARIA CHINKUALA LUMPUR, Nov 6 — The 10 per cent surcharge that Touch ‘n Go users must pay at some parking lots will be gradually removed, said the Deputy Domestic Trade and Consumer Affairs Minister Chong Chieng Jen today.
He said the government had wanted to eliminate this but was prevented by existing contracts.
Chong said firm was ensuring agreements signed with merchants from now will not allow the fee to be passed on to consumers.
“New contracts will not require the surcharge while existing contracts that impose the surcharge will be ended and no longer impose the surcharge, and it will be done in stages,” he said.
Chong further noted that the fee was only imposed at parking lots were the cashless payment method was available as an option.
Parking lots where Touch ‘n Go is the only payment method do not have the fee, he said.
MORE TO COME