Class SIPTransaction
A state machine for SIP transactions.
Inheritance
System.Object
SIPTransaction
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: SIPSorcery.dll
Syntax
public class SIPTransaction
Constructors
|
Improve this Doc
View Source
SIPTransaction(SIPTransport, SIPRequest, SIPEndPoint)
Creates a new SIP transaction and adds it to the list of in progress transactions.
Declaration
protected SIPTransaction(SIPTransport sipTransport, SIPRequest transactionRequest, SIPEndPoint outboundProxy)
Parameters
| Type |
Name |
Description |
| SIPTransport |
sipTransport |
The SIP Transport layer that is to be used with the transaction.
|
| SIPRequest |
transactionRequest |
The SIP Request on which the transaction is based.
|
| SIPEndPoint |
outboundProxy |
|
Fields
|
Improve this Doc
View Source
AckRetransmits
Declaration
public int AckRetransmits
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
CDR
Declaration
Field Value
|
Improve this Doc
View Source
CompletedAt
For INVITEs this is the time they received the final response and is used to calculate the time
they expire as T6 after this.
Declaration
public DateTime CompletedAt
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
Created
Declaration
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
DeliveryFailed
If the transport layer does not receive a response to the request in the alloted
time the request will be marked as failed.
Declaration
public bool DeliveryFailed
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
DeliveryPending
Declaration
public bool DeliveryPending
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
InitialTransmit
Declaration
public DateTime InitialTransmit
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
LastTransmit
Declaration
public DateTime LastTransmit
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
logger
Declaration
protected static ILogger logger
Field Value
| Type |
Description |
| Microsoft.Extensions.Logging.ILogger |
|
|
Improve this Doc
View Source
m_branchId
Declaration
protected string m_branchId
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
m_callId
Declaration
protected string m_callId
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
m_localTag
Declaration
protected string m_localTag
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
m_maxRingTime
Declaration
protected static readonly int m_maxRingTime
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
m_remoteTag
Declaration
protected string m_remoteTag
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
m_sipTransport
Declaration
protected SIPTransport m_sipTransport
Field Value
|
Improve this Doc
View Source
m_transactionFinalResponse
Declaration
protected SIPResponse m_transactionFinalResponse
Field Value
|
Improve this Doc
View Source
m_transactionRequest
Declaration
protected SIPRequest m_transactionRequest
Field Value
|
Improve this Doc
View Source
OutboundProxy
If not null this value is where ALL transaction requests should be sent to.
Declaration
public SIPEndPoint OutboundProxy
Field Value
|
Improve this Doc
View Source
PrackRetransmits
Declaration
public int PrackRetransmits
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PrackSupported
If am INVITE transaction client indicates RFC3262 support in the Require or Supported header we'll deliver reliable
provisional responses.
Declaration
protected bool PrackSupported
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Retransmits
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
TimedOutAt
If the transaction times out this holds the value it timed out at.
Declaration
public DateTime TimedOutAt
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
TransactionType
Declaration
public SIPTransactionTypesEnum TransactionType
Field Value
Properties
|
Improve this Doc
View Source
AckRequest
Declaration
public SIPRequest AckRequest { get; protected set; }
Property Value
|
Improve this Doc
View Source
BranchId
Declaration
public string BranchId { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
HasTimedOut
Declaration
public bool HasTimedOut { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
PRackRequest
Declaration
public SIPRequest PRackRequest { get; protected set; }
Property Value
|
Improve this Doc
View Source
ReliableProvisionalResponse
The most recent provisional response that was requested to be sent. If reliable provisional responses
are being used then this response needs to be sent reliably in the same manner as the final response.
Declaration
public SIPResponse ReliableProvisionalResponse { get; }
Property Value
|
Improve this Doc
View Source
RSeq
Declaration
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
TransactionFinalResponse
This is the final response being sent by a UAS transaction or the one received by a UAC one.
Declaration
public SIPResponse TransactionFinalResponse { get; }
Property Value
|
Improve this Doc
View Source
TransactionId
Declaration
public string TransactionId { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
TransactionRequest
Declaration
public SIPRequest TransactionRequest { get; }
Property Value
|
Improve this Doc
View Source
TransactionRequestFrom
Declaration
public SIPUserField TransactionRequestFrom { get; }
Property Value
|
Improve this Doc
View Source
TransactionRequestURI
Declaration
public SIPURI TransactionRequestURI { get; }
Property Value
|
Improve this Doc
View Source
TransactionState
Declaration
public SIPTransactionStatesEnum TransactionState { get; }
Property Value
Methods
|
Improve this Doc
View Source
ACKReceived(SIPEndPoint, SIPEndPoint, SIPRequest)
Declaration
public void ACKReceived(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest)
Parameters
|
Improve this Doc
View Source
FireTransactionRemoved()
Declaration
public void FireTransactionRemoved()
|
Improve this Doc
View Source
FireTransactionTimedOut()
Declaration
public void FireTransactionTimedOut()
|
Improve this Doc
View Source
GetInfoResponse(SIPRequest, SIPResponseStatusCodesEnum)
Declaration
protected SIPResponse GetInfoResponse(SIPRequest sipRequest, SIPResponseStatusCodesEnum sipResponseCode)
Parameters
Returns
|
Improve this Doc
View Source
GetRequestTransactionId(String, SIPMethodsEnum)
Declaration
public static string GetRequestTransactionId(string branchId, SIPMethodsEnum method)
Parameters
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GotRequest(SIPEndPoint, SIPEndPoint, SIPRequest)
Declaration
public void GotRequest(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest)
Parameters
|
Improve this Doc
View Source
GotResponse(SIPEndPoint, SIPEndPoint, SIPResponse)
Declaration
public Task<SocketError> GotResponse(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPResponse sipResponse)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Net.Sockets.SocketError> |
|
|
Improve this Doc
View Source
OnRetransmitFinalResponse()
Declaration
public void OnRetransmitFinalResponse()
|
Improve this Doc
View Source
OnRetransmitProvisionalResponse()
Declaration
public void OnRetransmitProvisionalResponse()
|
Improve this Doc
View Source
OnTimedOutProvisionalResponse()
Declaration
public void OnTimedOutProvisionalResponse()
|
Improve this Doc
View Source
PRACKReceived(SIPEndPoint, SIPEndPoint, SIPRequest)
PRACK request received to acknowledge the last provisional response that was sent.
Declaration
public void PRACKReceived(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest)
Parameters
| Type |
Name |
Description |
| SIPEndPoint |
localSIPEndPoint |
The SIP socket the request was received on.
|
| SIPEndPoint |
remoteEndPoint |
The remote SIP socket the request originated from.
|
| SIPRequest |
sipRequest |
The PRACK request.
|
|
Improve this Doc
View Source
SendFinalResponse(SIPResponse)
Declaration
protected virtual void SendFinalResponse(SIPResponse finalResponse)
Parameters
|
Improve this Doc
View Source
SendProvisionalResponse(SIPResponse)
Declaration
protected virtual Task<SocketError> SendProvisionalResponse(SIPResponse sipResponse)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Net.Sockets.SocketError> |
|
|
Improve this Doc
View Source
SendReliableRequest()
Declaration
protected void SendReliableRequest()
|
Improve this Doc
View Source
SendRequestAsync(SIPRequest)
Sends a SIP request in a non-reliable fashion. The request will be sent once and no automatic retransmits occur.
This is suitable for requests like ACK which do not get a response.
Declaration
protected Task<SocketError> SendRequestAsync(SIPRequest sipRequest)
Parameters
| Type |
Name |
Description |
| SIPRequest |
sipRequest |
The SIP request to send.
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Net.Sockets.SocketError> |
Success if no errors occurred sending the request or an error indication if there were.
|
|
Improve this Doc
View Source
UpdateTransactionState(SIPTransactionStatesEnum)
Declaration
protected void UpdateTransactionState(SIPTransactionStatesEnum transactionState)
Parameters
Events
|
Improve this Doc
View Source
TransactionDuplicateResponse
Declaration
protected event SIPTransactionResponseReceivedDelegate TransactionDuplicateResponse
Event Type
|
Improve this Doc
View Source
TransactionFinalResponseReceived
Declaration
protected event SIPTransactionResponseReceivedDelegate TransactionFinalResponseReceived
Event Type
|
Improve this Doc
View Source
Declaration
protected event SIPTransactionResponseReceivedDelegate TransactionInformationResponseReceived
Event Type
|
Improve this Doc
View Source
TransactionRemoved
Declaration
public event SIPTransactionRemovedDelegate TransactionRemoved
Event Type
|
Improve this Doc
View Source
TransactionRequestReceived
Declaration
protected event SIPTransactionRequestReceivedDelegate TransactionRequestReceived
Event Type
|
Improve this Doc
View Source
TransactionRequestRetransmit
Declaration
protected event SIPTransactionRequestRetransmitDelegate TransactionRequestRetransmit
Event Type
|
Improve this Doc
View Source
TransactionStateChanged
Declaration
public event SIPTransactionStateChangeDelegate TransactionStateChanged
Event Type
|
Improve this Doc
View Source
TransactionTimedOut
Declaration
protected event SIPTransactionTimedOutDelegate TransactionTimedOut
Event Type
|
Improve this Doc
View Source
TransactionTraceMessage
Declaration
public event SIPTransactionTraceMessageDelegate TransactionTraceMessage
Event Type


Use the first checkbox below to indicate whether this inspection should report all name clashes, or only clashes with fields which are visible from the subclass.
Use the second checkbox below to ignore static fields which hide static fields in super classes.


All the buttons on this page are either Flash or HTML uploaders. They all should open a
file-browse dialog, but otherwise the uploading is non-functional. This page is for testing
rendering and layout. This takes a while to render in IE, but it's not a real-world test.
NOTE: This test opens a Browse Dialog, but does not upload.
Testing default, markup (don't use a DIV unless you style it, the width is not controlled by default)
Testing float right and left, and using style="" to override class. The buttons should cascade properly when resizing
the window.
Text wrapping - FileUploader does not support text wrapping natively, it needs some CSS massaging to make it happen.
Testing Dijit Button for backward compatibility. Use of a dijit button is
deprecated and will be removed in 1.5. On the right is the Flash Upload button and on the left a
Dijit button for comparison. Note there is a bug getting the hover font style correct.
Testing top-center
Flash Top
Testing bottom-center with 20px bottom padding
Flash Bottom
Testing centered text, wide border and a left margin
Flash Center
Testing left align
Testing background images for HTML and Flash buttons. "GFX" uses three
different images, "SPRITE" uses one sprited image with the background-position changed. The
uploader doesn't support icons (you can use html in the Flash button, but it's not very good) so
this example uses backgrounds with icons in them, and the text shifted with a 55px left padding.
All of these buttons are inline.
Testing in a
scrolling pane. Also testing
.
Because we are no longer using an invisible Flash movie using wmode=transparent.
The Windows Firefox clickable bug should be fixed (and hopefully some Linux
problems).
Testing a
in a scrolling pane. This is really just to see if IE blows up on this as well as the
inline test (it does). IE is not liking using innerHTML in a scrolling pane. This should
still work however - the button is built outside of the pane and inserted (as well as
the previous inline test). This will cause a slower render time.


Research Areas
My research focuses on the topics of Cartography, Geovisualization, and Geovisual Analytics with specific emphasis on:
- interactive & web-based mapping
- human-computer interaction & UI/UX design
- user-centered design & usability engineering
- map-supported human reasoning & decision-making, particularly under conditions of uncertainty


2 Corinthians 5:15
And that he died for all, that they which live should not henceforth live unto themselves, but unto him which died for them, and rose again.


Anime
Top of All Time
Top Airing
Personal Favorite
Manga
Top of All Time
Personal Favorite
OVAs
Top of All Time
Personal Favorite
Hello!
🔎
Welcome To Zarbaliyev Anime
Simply filter with the Nav Bar or Search for an anime...


The problem
We consider the following one-dimensional Burgers equation
where $u$ is the state, $u_0$ is the initial state and the flux function $f$ is defined by $f(u)=\frac{u^2}{2}$. Kruzkov’s theory provides existence and uniqueness of a solution of \eqref{eq} with initial datum $u_0 \in L^{\infty}(\mathbb R)$. This solution is called a weak-entropy solution, denoted by $(t,x) \to S_t^+(u_0)(x)$. For a given target function $u^T$, we introduce the backward entropy solution $(t,x) \to S^-_{t}(u^T)(x)$ as follows:
for every $t\in [0,T]$, for a.e $x\in \mathbb R$,
We study the problem of inverse design for \eqref{eq}. This problem consists in identifying the set of initial data evolving to a given target at a final time.
Due to the time-irreversibility of the Burgers equation, some target functions are unattainable from weak-entropy solutions of this equation, making the inverse problem under consideration ill-posed. To get around this issue, we introduce the following optimal control problem
where $u^T$ is a given target function and the class of admissible initial data $\mathcal{U}^0_{\text{ad}}$ in \eqref{opt2} is defined by
Above, stands for functions of bounded variation and $C>0$ is a constant large enough. The study of \eqref{opt2} is motivated by the minimization of the sonic boom effects generated by supersonic aircrafts [2].
To solve the optimal control problem \eqref{opt2}, some difficulties arise from a theoretical and numerical point of view.
- Since the entropy solution $u$ of \eqref{eq} may contain shocks even if the initial datum is a smooth function, this generates important added difficulties that have been the object of intensive study in the past, see [3,4] and the references therein. In particular, the authors make sense of the derivative of $J_0$ in \eqref{opt2} in a weak way by requiring strong conditions on the set of initial data. This leads to require that entropy solutions of \eqref{eq} have a finite number of non-interacting jumps.
- When $J_0$ is weakly differentiable, gradient descent methods have been implemented in [1,5,6] to solve numerically the optimal problem \eqref{opt2}. In the cases where it was applied successfully, only one possible initial datum emerges, namely the backward entropy solution $S_T^-(u^T)$. This is mainly due to the numerical viscosity that numerical schemes introduce to gain stability. To find some multiple minimizers, the authors in [8] use a filtering step in the backward adjoint solution.
Dans [9], we fully characterize the set of minimizers of the optimal control problem \eqref{opt2}.
Theorem 1. Let $u^T\in BV(\mathbb R)$. The optimal control problem \eqref{opt2} admits multiple optimal solutions. Moreover, for a.e $T>0$, the initial datum $u_0\in BV(\mathbb R)$ is an optimal solution of \eqref{opt2} if and only if $u_0 \in BV(\mathbb R)$ verifies $S_T^+(u_0)=S_T^+ (S_T^-(u^T))$.
A characterisation of the set is given in [7]. An illustration of Theorem 1. is given in Figure 1.
Figure 1: The backward-forward solution $S_T^+(S_T^-(u^T))$ is the projection of $u^T$ onto the set of attainable target functions. The shaded area in red at time $t=0$ represents the set of minimizers of \eqref{opt2}
The proof of Theorem 1 is structured as follows. From [7, Theorem 3.1, Corollary 3.2] or [8, Corollary 1], there exists $u_0\in BV(\mathbb R)$ such that if and only if satisfies the one-sided Lipschitz condition, i.e
Thus, the optimal problem \eqref{opt2} can be rewritten as follows.
where the admissible set $\mathcal{U}^T_{\text{ad}}$ is defined by
Above, $K_1$ an open bounded interval large enough. Note that the optimal problem \eqref{opt5} is not related to the PDE model \eqref{eq}. We prove that $q=S_T^+ (S_T^-(u^T))$ is a critical point of \eqref{opt5} using the first-order optimality conditions applied to \eqref{opt5} and the full characterization of the set given in [9, Theorem A.2].
Numerical simulations
In [9,Section 3], we implement a wave-front tracking algorithm to construct numerically the set of minimizers of \eqref{opt2}. We consider for instance, a target function defined by
From Theorem 1, the backward solution is an optimal solution of \eqref{opt2} and is an optimal solution of \eqref{opt2} if and only if . In Figure 2, the target function , the backward solution and the backward-forward solution are plotted.
|
|
|
|
$x\to S^{-}_T(u^T)(x)$
|
$(t,x)\to S^{+}_t(S^{-}_T(u^T))(x)$
|
$u^T$ and $\color{red}{x\to S^{+}_T(S^{-}_T(u^T))(x)}$
$ $
Figure 2. Plotting of the target function $u^T$ defined in \eqref{uT}, the optimal solution $S_T^-(u^T)$ and the backward-forward solution $\color{red}{S^{+}_T(S^{-}_T(u^T))}$.
Note that has four different shocks located at $x=1.1$, $x=3.1$, $x=5.3$ and $x=7.2$. If we use a conservative numerical method as Godunov scheme, the approximate solution of doesn’t have shocks because of numerical viscosity that numerical schemes introduced, see Video 1.
Video 1. Approximate solution of $S_T^+(u_0)$ with $u_0$ an $N$-wave constructed with $ \color{red}{\text{a wave-front tracking algorithm}}$ and $\color{blue}{\text{a Godunov scheme}}$
This implies that only one minimizer of \eqref{opt2} can be constructed using a Godunov scheme, which is the backward entropy solution $S_T^-(u^T)$. When a wave-front tracking algorithm is implemented, the approximate solution of $S_T^+(S_T^-(u^T))$ has shocks since we track the possible discontinuities from $u^T$ to $S_T^+(S_T^-(u^T))$. This implies that all initial data $u_0$ that coincide with the approximate solution of $S_T^+ (S_T^-(u^T))$ can be recovered, see [9,Section 3].
In Video 2, we show that the weak-entropy solution of \eqref{eq} with initial data $S_T^-(u^T)$ coincides with $S_T^+ (S_T^-(u^T))$ at time $T$.
Video 2. Approximate solution of $(t,x) \to S_t^+(S_T^-(u^T))(x)$ using a wave-front tracking algorithm.
In Video 3, three other approximate optimal solutions $u_0$ of \eqref{opt2} are constructed. In particular, we show that $S_T^+ (u_0)=S_T^+ (S_T^-(u^T))$.
Video 3. Three approximate optimal solutions of \eqref{opt2} constructed using a wave-front tracking algorithm
[1] Navid Allahverdi, Alejandro Pozo and Enrique Zuazua. Numerical aspects of large-time optimal control of Burgers equation. ESAIM: Mathematical Modelling and Numerical Analysis, 50 (5):1371-1401,2016.
[2] Navid Allahverdi, Alejandro Pozo and Enrique Zuazua. Numerical aspects of sonic-boom minimization. A panorama of Mathematics: Pure and Applied, 658:267,2016.
[3] François Bouchut and François James. One-dimensional transport equations with discontinuous coefficients. Nonlinear Analysis, 32(7):891,1998.
[4] Alberto Bressan and Andrea Marson. A maximum principle for optimally controlled systems of conservation laws. Rendiconti del Seminario Matematico della Universita di Padova, 94:79-94, 1995.
[5] Carlos Castro, Francisco Palacios and Enrique Zuazua. An alternating descent method for the optimal control of the inviscid Burgers equation in the presence of shocks. Mathematical Models and Methods in Applied Sciences, 18(03):369-416,2008.
[6] Carlos Castro, Francisco Palacios and Enrique Zuazua. Optimal control and vanishing viscosity for the Burgers equation. In Integral Methods in Science and Engineering, Volume 2, pages 65-90. Springer, 2010.
[7] Rinaldo Colombo and Vincent Perrollaz. Initial data identification in conservation laws and Hamilton-Jacobi equations. arXiv preprint arXiv:1903.06448,2019.
[8] Laurent Gosse and Enrique Zuazua. Filtered gradient algorithms for inverse design problems of one-dimensional Burgers equation. In Innovative algorithm and analysis, pages 197-227. Springer, 2017.
[9] Thibault Liard and Enrique Zuazua. Inverse design for the one-dimensional Burgers equation. Submitted (2019).


Additional Information
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

Laws of physics Euclid courage of our questions? Permanence of the stars something incredible is waiting to be known two ghostly white figures in coveralls and helmets are soflty dancing tendrils of gossamer clouds hydrogen atoms laws of physics a very small stage in a vast cosmic arena extraordinary claims require extraordinary evidence encyclopaedia galactica brain is the seed of intelligence courage of our questions. Venture dream of the mind's eye ship of the imagination? Hydrogen atoms circumnavigated. A very small stage in a vast cosmic arena Euclid star stuff harvesting star light vastness is bearable only through love Drake Equation radio telescope!


Flash Sale is Live
Buy One Get One Free Only Today
We just started a flash sale! Hurry! It doesn't last forever! Get awesome discounts now!
years
days
hours
minutes
seconds
Featured Products
The most popular products in our store.
Useful Links
Get around our store much faster and easier.


Rather than simulating individual lake life cycles of formation, expansion, drainage, and re-initiation of later generation lakes (e.g., ref. 43), AThaw quantifies the net effect of new lake formation and drainage in modelled lake areas (F TKL). We capture a wide range of uncertainty in net lake formation and drainage trajectories by varying two key model parameters: The maximum net lake area, F TKLmax, and the optimum high latitude surface temperature increase, dT′ TKLmax (Supplementary Fig. 5). Model parameters for the maximum lake area extent (F TKLmax) were chosen individually for the four AThaw soil classes to capture expected differences in the potential for future lake development (see Methane and CO 2 in newly-formed thermokarst lakes). However, the parameter that most strongly controls the dynamics of thermokarst lake formation and drainage is the temperature optimum, dT′ TKLmax, the temperature at which the maximum lake area occurs. We prescribed a mean estimate of 5 °C for dT′ TKLmax (i.e., high latitude surface air warming above pre-industrial) and consider a full range of 4–6 °C in our model ensemble. This parameter choice is based on paleoenvironmental evidence of Early Holocene warming by a few degrees Celsius in Northern Hemisphere land areas 37, 68, 69 which resulted in rapid and intensive thermokarst activity 24, 29, 70.
This range of dT′ TKLmax values was also chosen to capture the sensitivity of future surface ice-wedge melt to climate warming, since ice-wedge melt is a critical step in thermokarst lake formation and drainage. Increases in permafrost temperature, which typically mirror increases in air temperature, have been observed in many Arctic regions, with warming of up to 3 °C since the 1970’s in some of the coldest permafrost regions 3, 38, 71. Permafrost warming is often accompanied by active layer deepening and increased ground-ice melt. Widespread surficial degradation of ice wedges and a significant increase in areas of water-filled polygonal troughs has been linked to climatic warming during the past few decades in northern Alaska, the Canadian Arctic Archipelago, and Siberia 14, 15, 41. Additional permafrost warming on the order of 2–3 °C anticipated by 2050 for RCP4.5 and RCP8.5 49, is expected to intensify permafrost and surface ice wedge degradation 66, enhancing thermokarst. For RCP4.5, permafrost warming slows beyond 2050 49, supporting AThaw ensembles of lower net thermokarst lake formation during the latter part of the century (Supplementary Figs 4 and 5). In contrast, extreme warming after 2050 for RCP8.5 is expected to heavily degrade permafrost, such that near-surface permafrost disappears entirely from many arctic regions 49. These conditions lend support to AThaw parameterization, which leads to net lake drainage in the later part of the century for RCP8.5.
In AThaw, warming above the temperature optimum in the 21st century is assumed to lead to a reduction in AThaw lake area due to increasing lake drainage 23, 43, 45, until a prescribed minimum fraction F TKLmin remains. The minimum fraction of the landscape still covered by newly formed lakes, decreases from north to south 23. In northern, continuous permafrost regions, lakes in AThaw are prescribed to drain laterally as melting of the ice-wedge network in the surface surrounding lakes can create drainage pathways 52. Other mechanisms of lake drainage include bank overtopping, headward gully erosion towards a lake; and tapping of lakes by streams, rivers, or other water bodies 36. Higher drainage potential in southern, discontinuous permafrost regions also encompasses internal drainage of lake water through open taliks that penetrate thin permafrost in groundwater recharge settings 54.
While the 4–6 °C dT′ TKLmax range used in our modeling was prescribed based on paleoenvironmental evidence, historical observations, and modeling of future permafrost dynamics, we can consider the implications of using smaller or larger dT′ TKLmax values. Smaller dT′ TKLmax values would imply that the maximum area of thermokarst lake coverage would occur earlier in the century. This would result in a relatively larger AThaw increase to the PCF earlier in the 21st century and a lower AThaw contribution to PCF toward the end of the century due to more widespread drainage. If dT′ TKLmax aligned more closely with the range of simulated high latitude warming inferred from higher concentration pathways (e.g., dT′ TKLmax > 6 °C), we would expect maximum thermokarst lake coverage (i.e., F TKLmax) to occur later in the century, less drainage of AThaw lakes during the 21st century, and a larger relative contribution of AThaw to end-of-the century PCF under stronger future warming.
It is interesting to note that that while thermokarst-lake initiation and drainage rates are linked to climate, thermokarst-lake growth—the long process between initiation and drainage that results in most of the carbon release—has dynamics (e.g., talik growth, shore expansion) that once started become rather decoupled from climate due to strong linkage with local factors such as ground ice content and ice-layer thickness 72– 75. Hence, thermokarst lakes are found across the entire range of Arctic climatic zones and permafrost temperatures as long as there is sufficient ground ice 36, 76, 77. A thermokarst lake on the New Siberian Islands has the same potential to release carbon as a thermokarst lake in Central Yakutia; the differences are largely not determined by climate (or RCP conditions) but by local conditions such as permafrost soil carbon and ground ice contents. Hence, either RCP scenario will result in more lakes (earlier or later) and both scenarios will have a similar emission magnitude linked to maximum lake areas, but relative to anthropogenic emissions, the thermokarst lake emissions from RCP4.5 will be more relevant.
Factors other than temperature that are not included in AThaw, but which can also affect thermokarst lake dynamics include natural and anthropogenic surface disturbance, precipitation changes, and local topography 43. However, since CMIP5 models consistently predict a moistening trend in the Arctic (i.e., an increase in precipitation relative to evapotranspiration) 51, an explicit accounting for predicted 21st-century precipitation and evaporation trends would reinforce rather than weaken the AThaw lake dynamics driven by temperature changes alone.


loader-patch Class
Provides hooks to patch the YUI loader on both the server and/or client. It will facilitate try new things and patches without requiring to wait for YUI to be released. Here is an example:
app.yui.patch(require('express-yui/lib/patches/optional-requires'));
In the example above, one of the default patches shipped with with
express-yui
, is executed on the server and client to patch the
YUI Loader to support a new type of metadata called optionalRequires
,
which provides an easy way to define requirements for a module that are
not avialable in all runtimes.
Item Index
Methods
Methods
patch
-
patch
Adds patches that will be applied to the YUI instance
before the initial use
statement on the server side and client.
Here is an example of how to use this:
app.yui.patch(require('express-yui/lib/patches/optional-requires'));
Parameters:
-
patch
FunctionEach argument represent a patch to be applied
patchClient
-
patch
Adds patches that will be applied to the YUI instance
before the initial use
statement on the client side.
app.yui.patchClient(require('express-yui/lib/patches/templates-requires'));
Parameters:
-
patch
FunctionEach argument represent a patch to be applied to the client runtime
patchServer
-
patch
Adds patches that will be applied to the YUI instance
before the initial use
statement on the server side.
app.yui.patchServer(require('express-yui/lib/patches/server-intl-get'));
Parameters:
-
patch
FunctionEach argument represent a patch to be applied to the server runtime


{% extends 'base.html' %} {% block content %}
No current projects
{% endfor %}
LifeLog aims to be a project tracking and accountability tool. It's intended
to help you keep track of your own work and share the status of your projects
with others. This is done via the creation of project pages. Project pages
contain all relevant information about a project as well as house a space
for project updates and user comments.
As a project owner, you can keep yourself or your relevant audience up to date on steps taken toward the
completion of a project. Project viewers are encouraged to comment and question
the work, so that owners may give clarification and spark discussions.
Above, you can find currently active or popular projects, which can give you a feel
for ways to take advantange of LifeLog!
Created by Matt Farejowicz at HackMIT 2018 (and a little bit after).


This post began as part 2 but after crossing several pages just explaining what envoy is, it was obvious this answer deserved to stand on its own, giving us part 1.5.
In part 1 of this series we deployed a very simple blog with a site generation app called Hugo. We did things quick and dirty and used Hugo's built-in development server to serve the content so we were live in less than 15 minutes. Calling it a blog at this point in time would be super generous, but thank you anyways! What we have right now is a bicycle, but what we want is an Airbus A380 (on an open source bicycle budget) . We want a production-grade web service and getting there will be a journey.
I’m starting the journey by introducing out a few important production characteristics through proxying and load balancing. This addition will already make the site much more reliable. It’ll give us the following goodies:
- High availability through redundancy
- Resiliency through health checking
- Operational data such as health metrics and client access logging
- Less risky deployments through gradual proxy reconfiguration
These capabilities could be provided through a lot of different tools, so I’ll tell you my real goal: to learn more about the envoy proxy. The envoy proxy is a fairly new open source project and has already received fast adoption (for good reasons). You might be asking, why should I even care about envoy? Well I’m very glad you asked - let me tell you!
Why Envoy?
Envoy is yet another web proxy, but it does not focus on being a more performant version of its predecessors (like its predecessors were to theirs). Instead, envoy focuses on improving other operational areas. These operational improvements of running a proxy have resulted in innovation of all kinds of seemingly unrelated areas like monitoring, deployment, security, and service discovery. Here are three areas where envoy really excells.
API Driven Configuration
This is one of the most powerful features of envoy. The state of the envoy configuration, from routing rules, to backend ip:ports, to load balancing algorithms, is configurable through an API rather than text config files (although text is possible). This makes the operation of envoy very different from traditional proxies.
- Configuration semantics are tightly defined and segmented so different elements can be updated without touching an entire config
- API versioning and schema reduces disruption from future enhancements to envoy
- The API is native to envoy without external components and designed to be the primary way in which its configured
- The API uses gRPC to communicate with a centralized management server that makes applying config across many proxies more scalable
Nowadays web backends are very dynamic resources themselves. They will scale up and down, change IP addresses, and run across multiple datacenters concurrently. Web proxy configurations must change frequently to handle this and text-based configuration is just not automatable enough.
To give an example for why this has been difficult in the past, just take a look at the number of different kubernetes nginx ingress controllers that exist to solve the fundamentally the same problem. They are taking a standard API (the K8s ingress API) and translating it to a templated text file for the web proxy to consume. Templating and applying these config files turns out to be cumbersome which reduces the scale that it can be done at. (No dig against nginx - these controllers were solving for dynamic configuration long before envoy even existed).
With envoy’s API, dynamic control of the proxy is straightforward, standardized, and scalable. The ability to fully automate a control-plane across a fleet of proxies (i.e. service mesh) is much more realistic thanks to this.
Machine friendly configuration has opened up a whole list of projects that are now building around envoy, in no small part because it’s easy to build around. This includes projects like Istio, Gloo, Ambassador, Contour, and Consul Connect - all designed as control-planes for Envoy. Administrators, orchestration tools (like Consul or K8s), and potentially applications themselves can have the capability to easily manipulate routing.
Hot Restart / Live Reload
Hot restart allows the envoy process to restart or without dropping any connections. This enables configuration changes without impacting any traffic. Envoy actually takes this to an extreme and is capable of restarting the entire envoy process without dropping any connections. In a nutshell it runs two envoy processes in parallel as they communicate running state to each other. New connections are taken by the new process while old connections are drained by the old process while retaining all state (including metrics).
While API-based configuration is rad, hot restarts are also a requirement to run a truly dynamic proxy. Together these two features are what make envoy great for dynamic networking.
Modern Protocols & Other Cool Stuff
The list is long, but by virtue of being the new kid on the block, envoy natively supports tons of modern protocols including HTTP2 and gRPC. Envoy shows its youth by using a lot of modern day standards. The load balancing is also very configurable. Envoy can be zone-aware and load balance based on customizable combinations of factors such as locality, priority, and health. Then there are also the little conveniences like access logs output in JSON that are nice.
Okay that’s enough gushing for now. In part 2 we’ll deploy envoy as a proxy for this site and start using some of its features. Here are some final thoughts.
- Web proxying and load balancing are critical aspects of making environments production-ready
- Environments are only getting more dynamic and ephemeral so proxies are adapting to become more dynamic and automatable
- Envoy is great at both of these ^^
Here are some resources I read through while writing this:


Database API
Mod_lua implements a simple yet very flexible and secure database API for querying and running commands on the most popular database engines (mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle) as well as mod_dbd.
The example below shows how to acquire a database handle and return information from a table:
function handle(r) r.content_type = "text/html" -- Acquire a database handle local database, err = r:dbacquire("mysql", "host=localhost,user=root,pass=foopass,dbname=mydb") if not err then -- Select some information from it local results, err = database:select(r, "SELECT `name`, `age` FROM `people` WHERE 1") if not err then local rows = results(0) -- fetch all rows synchronously for k, row in pairs(rows) do r:puts( string.format("Name: %s, Age: %s<br/>", row[1], row[2]) ) end else r:puts("Database query error: " .. err) end database:close() else r:puts("Could not connect to the database: " .. err) end end
mod_dbd
supplies a very convenient way to keep a pool of persistent database connections for performance gains.
If you have mod_dbd installed and loaded, you can specify a database pool in your Virtual Host block like so:
# Set the DB to use the MySQL driver. For Windows, see this ODBC quick-guide.
DBDriver mysql # Explain how to connect to the database DBDParams host=localhost,dbname=mydatabase,user=foouser,pass=somepassword # Set a limit of 10 connections in the pool DBDMax 10
To utilize mod_dbd
, specify mod_dbd
as the database type, or leave the field blank:
local database = r:dbacquire("mod_dbd")
The database object returned by dbacquire
has the following methods:
Normal select and query from a database:
-- Run a statement and return the number of rows affected: local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1") -- Run a statement and return a result set that can be used synchronously or async: local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1")
Using prepared statements (recommended):
-- Create and run a prepared statement: -- In prepared statements, you inject numbers with %u (unsigned int) and strings with %s. local statement, errmsg = database:prepare(r, "DELETE FROM `tbl` WHERE `age` > %u") if not errmsg then local result, errmsg = statement:query(20) -- run the statement with age > 20 end -- Fetch a prepared statement from a DBDPrepareSQL directive: local statement, errmsg = database:prepared(r, "someTag") if not errmsg then local result, errmsg = statement:select("John Doe", 123) -- inject the values "John Doe" and 123 into the statement end
Escaping values, closing databases etc:
-- Escape a value for use in a statement: local escaped = database:escape(r, [["'|blabla]]) -- Close a database connection and free up handles: database:close() -- Check whether a database connection is up and running: local connected = database:active()
The result set returned by db:select
or by the prepared statement functions
created through db:prepare
can be used to
fetch rows synchronously or asynchronously, depending on the row number specified:
result(0)
fetches all rows in a synchronous manner, returning a table of rows.
result(-1)
fetches the next available row in the set, asynchronously.
result(N)
fetches row number N
, asynchronously.
result(N, true)
fetches row number N
and uses column names as keys:
-- fetch a result set using a regular query: local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1") local rows = result(0) -- Fetch ALL rows synchronously local rows = result(0, true) -- Fetch ALL rows synchronously and use column names instead of numbers for the index local row = result(-1) -- Fetch the next available row, asynchronously local row = result(1234) -- Fetch row number 1234, asynchronously
One can construct a function that returns an iterative function to iterate over all rows in a synchronous or asynchronous way, depending on the async argument:
function rows(resultset, async) local a = 0 local function getnext() a = a + 1 local row = resultset(-1) return row and a or nil, row end if not async then return pairs(resultset(0)) else return getnext, self end end local statement, err = db:prepare(r, "SELECT * FROM `tbl` WHERE `age` > %u") if not err then -- fetch rows asynchronously: local result, err = statement:select(20) if not err then for index, row in rows(result, true) do .... end end -- fetch rows synchronously: local result, err = statement:select(20) if not err then for index, row in rows(result, false) do .... end end end
As mentioned, you can select whether you want the keys in a row set to be either the column number of the column name:
local res = db:select("SELECT * FROM `foo` WHERE 1") -- Fetch a row with column numbers local row = res(-1) r:puts("Row 1 is: " .. row[1]) -- Fetch a row with column names local row = res(-1, true) r:puts("Name is: " .. row.name)
Database handles should be closed using database:close()
when they are no longer
needed. If you do not close them manually, they will eventually be garbage collected and
closed by mod_lua, but you may end up having too many unused connections to the database
if you leave the closing up to mod_lua. Essentially, the following two measures are
the same:
-- Method 1: Manually close a handle local database = r:dbacquire("mod_dbd") database:close() -- All done -- Method 2: Letting the garbage collector close it local database = r:dbacquire("mod_dbd") database = nil -- throw away the reference collectgarbage() -- close the handle via GC
Although the standard query
and run
functions are freely
available, it is recommended that you use prepared statements whenever possible, to
both optimize performance (if your db handle lives on for a long time) and to minimize
the risk of SQL injection attacks. run
and query
should only
be used when there are no variables inserted into a statement (a static statement).
When using dynamic statements, use db:prepare
or db:prepared
.
If you do not want to use mod_dbd, or require access to additional DSNs, you can use mod_lua directly, like so:
local db, err = r:dbacquire("odbc", "datasource=myDSN")


Indie Game Developement Studio
About Us
Games
Events
Jams
Wild
Libre Market
Contact
Ansiture
Description
ANSi Platformer


#include <arpa/inet.h> int inet_net_pton(int af, const char *pres, void *netp, size_t nsize); char *inet_net_ntop(int af, const void *netp, int bits, char *pres, size_t psize);
Link with -lresolv.
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
inet_net_pton(), inet_net_ntop():
For both functions, af specifies the address family for the conversion; the only supported value is AF_INET.
On success, inet_net_pton() returns the number of bits in the network number field of the result placed in netp. For a discussion of the input presentation format and the return value, see NOTES.
Note: the buffer pointed to by netp should be zeroed out before calling inet_net_pton(), since the call writes only as many bytes as are required for the network number (or as are explicitly specified by pres), which may be less than the number of bytes in a complete network address.
The null-terminated presentation-format string is placed in the buffer pointed to by pres. The psize argument specifies the number of bytes available in pres. The presentation string is in CIDR format: a dotted-decimal number representing the network address, followed by a slash, and the size of the network number in bits.
On success, inet_net_ntop() returns pres. On error, it returns NULL, and errno is set to indicate the cause of the error.
Hexadecimal values are indicated by an initial "0x" or "0X". The hexadecimal digits populate the nibbles (half octets) of the network number from left to right in network byte order.
In dotted-decimal notation, up to four octets are specified, as decimal numbers separated by dots. Thus, any of the following forms are accepted:
a.b.c.d
a.b.c
a.b
a
Each part is a number in the range 0 to 255 that populates one byte of the resulting network number, going from left to right, in network-byte (big endian) order. Where a part is omitted, the resulting byte in the network number is zero.
For either hexadecimal or dotted-decimal format, the network number can optionally be followed by a slash and a number in the range 0 to 32, which specifies the size of the network number in bits.
If the resulting bits value from the above steps is greater than or equal to 8, but the number of octets specified in the network number exceed bits/8, then bits is set to 8 times the number of octets actually specified.
In order to demonstrate that inet_net_pton() may not write to all bytes of its netp argument, the program allows an optional second command-line argument, a number used to initialize the buffer before inet_net_pton() is called. As its final line of output, the program displays all of the bytes of the buffer returned by inet_net_pton() allowing the user to see which bytes have not been touched by inet_net_pton().
An example run, showing that inet_net_pton() infers the number of bits in the network number:
$ ./a.out 193.168 inet_net_pton() returned: 24 inet_net_ntop() yielded: 193.168.0/24 Raw address: c1a80000
Demonstrate that inet_net_pton() does not zero out unused bytes in its result buffer:
$ ./a.out 193.168 0xffffffff inet_net_pton() returned: 24 inet_net_ntop() yielded: 193.168.0/24 Raw address: c1a800ff
Demonstrate that inet_net_pton() will widen the inferred size of the network number, if the supplied number of bytes in the presentation string exceeds the inferred value:
$ ./a.out <IP_ADDRESS> inet_net_pton() returned: 32 inet_net_ntop() yielded: <IP_ADDRESS>/32 Raw address: c1a80180
Explicitly specifying the size of the network number overrides any inference about its size (but any extra bytes that are explicitly specified will still be used by inet_net_pton(): to populate the result buffer):
$ ./a.out <IP_ADDRESS>/24 inet_net_pton() returned: 24 inet_net_ntop() yielded: 193.168.1/24 Raw address: c1a80180
/* Link with "-lresolv" */ #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \ } while (0) int main(int argc, char *argv[]) { char buf[100]; struct in_addr addr; int bits; if (argc < 2) { fprintf(stderr, "Usage: %s presentation-form [addr-init-value]\n", argv[0]); exit(EXIT_FAILURE); } /* If argv[2] is supplied (a numeric value), use it to initialize the output buffer given to inet_net_pton(), so that we can see that inet_net_pton() initializes only those bytes needed for the network number. If argv[2] is not supplied, then initialize the buffer to zero (as is recommended practice). */ addr.s_addr = (argc > 2) ? strtod(argv[2], NULL) : 0; /* Convert presentation network number in argv[1] to binary */ bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr)); if (bits == -1) errExit("inet_net_ntop"); printf("inet_net_pton() returned: %d\n", bits); /* Convert binary format back to presentation, using 'bits' returned by inet_net_pton() */ if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL) errExit("inet_net_ntop"); printf("inet_net_ntop() yielded: %s\n", buf); /* Display 'addr' in raw form (in network byte order), so we can see bytes not displayed by inet_net_ntop(); some of those bytes may not have been touched by inet_net_ntop(), and so will still have any initial value that was specified in argv[2]. */ printf("Raw address: %x\n", htonl(addr.s_addr)); exit(EXIT_SUCCESS); }


|
UQTk: Uncertainty Quantification Toolkit 3.1.3
|
#include <XMLExpatParser.h>
Public Member Functions | |
| XMLExpatParser () | |
| Construct a new parser. More... | |
| virtual | ~XMLExpatParser () throw () |
| Destructor. More... | |
| RefPtr< XMLElement > | parse (std::istream &) |
| Parse the given input buffer and return a parse tree. More... | |
| Public Member Functions inherited from XMLParser | |
| XMLParser () | |
| Default constructor. Intended for derived classes. More... | |
| virtual | ~XMLParser () |
| Destructor. More... | |
| virtual RefPtr< XMLElement > | parse (std::istream &)=0 |
| Parse the given input buffer and return the parse tree. More... | |
| Public Member Functions inherited from Object | |
| Object () | |
| Construct a new reference counted object with a zero reference count. More... | |
| virtual | ~Object () |
| Destroy this object. More... | |
| long int | reference_count () const |
| Returns the number of references that are held to this object. More... | |
Static Public Member Functions | |
| static void | start_ (void *, const XML_Char *, const XML_Char **) |
| static void | end_ (void *, const XML_Char *) |
| static void | character_data_ (void *, const XML_Char *, int) |
Private Member Functions | |
| XMLExpatParser (const XMLExpatParser &) | |
| XMLExpatParser & | operator= (const XMLExpatParser &) |
| Blocked assignment operator. Not for public consumption. More... | |
| void | do_start (const XML_Char *, const XML_Char **) |
| The method used to parse the start tag. More... | |
| void | do_end (const XML_Char *) |
| The method used to parse the end tag. More... | |
| void | do_character_data (const XML_Char *, int) |
| The method used to parse character (content) data. More... | |
| void | init () |
| Initialize the state of the parser. More... | |
Private Attributes | |
| XML_Parser | parser_ |
| The Expat parser. More... | |
| std::vector< RefPtr< XMLElement > > | path_ |
| The path that we have traversed so far in building the tree. More... | |
| RefPtr< XMLElement > | leaf_ |
| The current leaf of the parse tree. More... | |
Friends | |
| template<class T > | |
| class | RefPtr |
| template<class T > | |
| class | ConstRefPtr |
Additional Inherited Members | |
| Protected Member Functions inherited from Object | |
| long int | reference_grab () const |
| long int | reference_release () const |
An XML parser that uses the Expat library to handle the gruntwork. This class requires that the Expat be installed on your system.
Expat is available at the Expat site
This class may not be fully exception safe, since there is no good way of enforcing that the Expat parser is destroyed cleanly.
| XMLExpatParser::XMLExpatParser | ( | ) |
Construct a new parser.
|
private |
Blocked copy constructor. It is not safe to copy this object since the Expat parser may save state which cannot be duplicated.
|
virtual |
Destructor.
|
static |
Static wrapper method used as a callback to get character data. This method is for internal use only. Calling this method directly will most likely result in a segmentation fault.
|
private |
The method used to parse character (content) data.
|
private |
The method used to parse the end tag.
|
private |
The method used to parse the start tag.
|
static |
Static wrapper method used as a callback to get the 'end' tag. This method is for internal use only. Calling this method directly will most likely result in a segmentation fault.
|
private |
Initialize the state of the parser.
|
private |
Blocked assignment operator. Not for public consumption.
|
virtual |
Parse the given input buffer and return a parse tree.
Implements XMLParser.
|
static |
Static wrapper method used as a callback to get the 'start' tag. This method is for internal use only. Calling this method directly will most likely result in a segmentation fault.
|
friend |
|
friend |
|
private |
The current leaf of the parse tree.
|
private |
The Expat parser.
|
private |
The path that we have traversed so far in building the tree.


WEAREIMD
LIVE PROGRAMMING MUSIC
FEB 29
ADMIT ONE
TICKET €15
Being frustrated with CSS Grid is included in the ticket price


A small set of functions wrapping up the call stack and command line inspection needed to determine a running script's filename from within the script itself.
| Version: | 1.0.0 |
| Imports: | rlang (≥ 0.1.0), purrr (≥ 0.2.3) |
| Suggests: | testthat, devtools |
| Published: | 2018-04-10 |
| Author: | Thomas Sibley [aut, cre], University of Washington [cph] |
| Maintainer: | Thomas Sibley <trsibley at uw.edu> |
| BugReports: | https://github.com/MullinsLab/scriptName/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/MullinsLab/scriptName |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | scriptName results |
| Reference manual: | scriptName.pdf |
| Package source: | scriptName_1.0.0.tar.gz |
| Windows binaries: | r-devel: scriptName_1.0.0.zip, r-release: scriptName_1.0.0.zip, r-oldrel: scriptName_1.0.0.zip |
| OS X binaries: | r-release: scriptName_1.0.0.tgz, r-oldrel: scriptName_1.0.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=scriptName to link to this page.


"I look like shit."
Angela was staring into the wide dressing-table mirror in Kim's bedroom. Her hair was lank and lay flat on her head. Scattered around her were pots of foundation and moisturiser, and eyeliner and eyeshadow.
"Say again, Ang," Kim called from the kitchenette in her other room. She walked through into the bedroom, and Angela repeated to her: "I look like shit." Kim's face broke into sympathy. "Oh, don't say that, Angela. Come on, darling." She put her hands on Angela's shoulders, bare apart from dress and bra straps.
"It's true, though. I've been sat here an hour putting everything I can find on and it hasn't done any good. I might as well have been beating my face against the mirror."
Kim saw tears prick Angela's eyes, and was immediately worried. Angela was fairly plain - every pretty girl should have a plain friend, and Kim was all too conscious of her "sweet" retroussée nose and large, poetic eyes, and hair that behaved - but she always managed to look presentable with a little make-up. Well, a lot of make-up. However, crying just left her blotchy, red-eyed, puffy and tired. And tiresome.
"You like fine," Kim stressed. "A bit more here and there and you'll be a real diva. Sex on legs, honestly." She leant over Angela's right shoulder and spoke to her reflection. "Gonna pull tonight, Ang. You're gonna get lucky!" Angela had begun to smile again, and Kim reached over, picked something out and said, "I'll finish opening the bottle, then I'll be back to give you a hand."
The club - called "Scene" - was slightly too expensive for both girls, but Kim treated it more as a necessity and so didn't notice the cost as much as Angela. Neither girl was successful in their night out, even though they were there until a half hour before closing. At that point, Angela started to feel self-conscious. Only the desperate are still here at chucking-out time, she thought, and Kim was happy to be prised from the clutches of Dean from work anyway.
All night, Angela had thought she was in a chance twice: the first prospect turned out to be married, although still interested; the second stumbled somewhat when he asked her who her pretty friend was.
Staggering on their heels, the two girls were supporting each other, heading roughly towards the taxi rank.
"God, Ang, did you see Dean?" asked Kim incredulously. "Wankered as always. And acting like I should be glad to meet someone from work."
"That Simon fella wasn't much better. He hadn't even taken his ring off." They both laughed, and Kim almost tottered off her heels.
"You hungry, Ang? I'm starving. I could just murder a 'bab. Let's get a kebab, Ang."
Angela had a short while to reply, as they were not yet level with the light that spilled from the shop onto the pavement. She didn't know how to put it, but: Kim always ate whatever she wanted and never put on a scrap of weight but Angela was on a perpetual diet and still looked far to fat to even be called curvaceous so as far as she was concerned she could let Kim eat both their kebabs and Kim wouldn't feel guilty and flabby ever because....
Bitch.
But what could she say out loud? And did she not feel like something, something in her stomach that would help just a little? Yes? Fill the flat, cold emptiness chilling her far more than the walk to the taxi? Food? A little?
"OK, Kim love, she ventured. Only a few seconds had passed. "I might just get a sandwich or something, though."
She did order a sandwich, then the gnawed-at rawness came again and she asked for chips too. they ate, perched stupidly on two bar stools in the take-away. Pointedly, they both faced away from the owner. He was handsome enough, but he hadn't shaved and smelled of chip fat.
"You need to get yourself a fella, Angela darling." Kim was, amazingly, eating the kebab demurely. She used a fork, and each mouthful was a measured mix of meat and scraggy salad. Pointlessly neat.
"Not that easy, is it, Kim?" Angela countered.  Or you could send Dean my way." Kim pulled a face and both girls laughed loudly. It was known in the office that there was Something Amiss With Dean.
"I wonder," Angela said wistfully, "if I'll ever find a decent bloke. Not Mister Right, just Mister Promising."
Kim shook her head. "There's not even any a million miles from Mister Promising out there, Ang. You should do what I do: if you want one, find one that's fit enough, then hammer him into shape. Worked with me and Ben."
"But -"
"Briefly. Briefly worked with me and Ben. God. I wonder where he is now." Kim chewed meditatively.  Good riddance. Still it worked briefly." She winked. "Got a shag out of it, didn't I?"
They laughed, Angela less than Kim, and left.
Later that night, Angela was lying in bed, unable to sleep with food weighing on her belly and her conscience. She felt greasy and toxic, and wanted to have the nerve to make herself sick. She wrestled with her sheets a few moments and then, on impulse, bounded out of her bed to the window. Slid it open. Fresh air, she thought, and breathed deeply.
The city was so big. She felt lost and alone in it, never to find anyone meant for her. Not like Kim. If Kim were in the mood, a new date would gravitate towards her. Black magic.
She inhaled again, and could smell, if not see from her window, the bigness of it all. She'd heard some gink in a lab coat on TV once talk about smells having different "notes;" overtones, really. The car fumes and dead Friday night in the air carried with it a note of bigness, of streets and streets.
One more sniff, and she realised what she was trying to find.  Sickened with herself, she slammed the window shut, and returned to bed.


Input format: csv
Input values: Exponential fold change of gene expression levels (base = 2) with definded control dataset
Upload limitation: none
Note: This is preferred input format, which can be processed with high-throughput manners. You can receive your results in 5 minutes in your email box. Click here to download the demo input file.
Input format: FASTA/FASTQ
Input values: cDNA sequence
Upload limitation: 5 files/month
Note: This is unfavorable input format, which requires two weeks to be processed. You need to wait for two weeks to receive the results. In addition, due to the limitation of computational capability, one user can only upload 5 files/month.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.github.droidfu.imageloader.ImageLoader
public class ImageLoader
Realizes an background image loader backed by a two-level FIFO cache. If the image to be loaded is present in the cache, it is set immediately on the given view. Otherwise, a thread from a thread pool will be used to download the image in the background and set the image on the view as soon as it completes.
| Field Summary | |
|---|---|
static java.lang.String |
BITMAP_EXTRA
|
static int |
HANDLER_MESSAGE_ID
|
static java.lang.String |
IMAGE_URL_EXTRA
|
| Method Summary | |
|---|---|
static void |
clearCache()
Clears the 1st-level cache (in-memory cache). |
static ImageCache |
getImageCache()
Returns the image cache backing this image loader. |
static void |
initialize(android.content.Context context)
This method must be called before any other method is invoked on this class. |
static void |
initialize(android.content.Context context,
long expirationInMinutes)
|
void |
notifyImageLoaded(java.lang.String url,
android.graphics.Bitmap bitmap)
|
void |
run()
The job method run on a worker thread. |
static void |
setMaxDownloadAttempts(int numAttempts)
|
static void |
setThreadPoolSize(int numThreads)
|
static void |
start(java.lang.String imageUrl,
ImageLoaderHandler handler)
Triggers the image loader for the given image and handler. |
static void |
start(java.lang.String imageUrl,
ImageLoaderHandler handler,
android.graphics.drawable.Drawable dummyDrawable,
android.graphics.drawable.Drawable errorDrawable)
Triggers the image loader for the given image and handler. |
static void |
start(java.lang.String imageUrl,
android.widget.ImageView imageView)
Triggers the image loader for the given image and view. |
static void |
start(java.lang.String imageUrl,
android.widget.ImageView imageView,
android.graphics.drawable.Drawable dummyDrawable,
android.graphics.drawable.Drawable errorDrawable)
Triggers the image loader for the given image and view and sets a dummy image while waiting for the download to finish. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HANDLER_MESSAGE_ID
public static final java.lang.String BITMAP_EXTRA
public static final java.lang.String IMAGE_URL_EXTRA
| Method Detail |
|---|
public static void setThreadPoolSize(int numThreads)
numThreads
- the maximum number of threads that will be started to download images in parallelpublic static void setMaxDownloadAttempts(int numAttempts)
numAttempts
- how often the image loader should retry the image download if network connection
failspublic static void initialize(android.content.Context context)
WebImageView
or WebGalleryAdapter
, then
there is no need to call this method, since those classes will already do that for you. This
method is idempotent. You may call it multiple times without any side effects.
context
- the current contextpublic static void initialize(android.content.Context context, long expirationInMinutes)
public static void start(java.lang.String imageUrl, android.widget.ImageView imageView)
imageUrl
- the URL of the image to downloadimageView
- the ImageView which should be updated with the new imagepublic static void start(java.lang.String imageUrl, android.widget.ImageView imageView, android.graphics.drawable.Drawable dummyDrawable, android.graphics.drawable.Drawable errorDrawable)
imageUrl
- the URL of the image to downloadimageView
- the ImageView which should be updated with the new imagedummyDrawable
- the Drawable set to the ImageView while waiting for the image to be downloadederrorDrawable
- the Drawable set to the ImageView if a download error occurspublic static void start(java.lang.String imageUrl, ImageLoaderHandler handler)
ImageLoaderHandler
and handle the loaded image yourself (e.g. cache it for later
use).
imageUrl
- the URL of the image to downloadhandler
- the handler which is used to handle the downloaded imagepublic static void start(java.lang.String imageUrl, ImageLoaderHandler handler, android.graphics.drawable.Drawable dummyDrawable, android.graphics.drawable.Drawable errorDrawable)
ImageLoaderHandler
and handle the loaded image yourself (e.g. cache it for later
use).
imageUrl
- the URL of the image to downloadhandler
- the handler which is used to handle the downloaded imagedummyDrawable
- the Drawable set to the ImageView while waiting for the image to be downloadederrorDrawable
- the Drawable set to the ImageView if a download error occurspublic static void clearCache()
Application.onLowMemory()
.
public static ImageCache getImageCache()
ImageCache
public void run()
run
in interface java.lang.Runnable
public void notifyImageLoaded(java.lang.String url, android.graphics.Bitmap bitmap)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


 I have just spent way to long getting things configured (this is partly due to mysql5 support and 3rd party modules, dual NIC machines, public dns records… clustering issues were just icing on the cake) and I’m going to (hopefully) make your life a little easier. To get things working properly I pieced together multiple tutorials and official documentation… which seems absurd considering the popularity of the ejabberd. So below are the nitty gritty details and a helper module I wrote… because inputing mnesia commands into a debug shell for multiple slave node is… retarded.
before we begin, I want to point out that if you’re using mysql or postgres for authentication, offline messaging, etc. it doesn’t really matter to ejabberd for clustering purposes, although it is important when joining the cluster (which the official documentation seems to forget).
first things first, let’s configure our master node
(we’re assuming at this point you’ve installed ejabberd from source without a prefix, have it properly configured, and can successfully connect and message using it)
1: shut down your “master node”
ejabberdctl stop
2: edit ejabberdctl.cfg (/etc/ejabberd/ejabberctl.cfg)
2.1: change node name:
<EMAIL_ADDRESS>2.2: change ip we listen on: (get this from ifconfig)
note: look closely, that’s a tuple, don’t use .’s use ,’s
INET_DIST_INTERFACE={192,168,10,100}
3: clear your ejabberd mnesia tables after hostname change
note: hostname changes are a pain, it’s easier to just let ejabberd rebuild the mnesia db’s at startup.
rm /var/lib/ejabberd/*
4: add hostname to /etc/hosts using address and hostname from confg
<IP_ADDRESS> master.domain.com
5: start master node, and make sure it’s running
ejabberdctl start
ejabberdctl status
now we’ll need to configure our slaves
(once again we’re assuming the server is properly installed and functional as a stand alone server)
1: if the server is running, stop it.
ejabberdctl stop
2: update ejabberctl.cfg (/etc/ejabberd/ejabberdctl.cfg
2.1: change node name:
<EMAIL_ADDRESS>2.2: change ip we listen on: (get this from ifconfig)
note: look closely, that’s a tuple, don’t use .’s use ,’s
INET_DIST_INTERFACE={192,168,10,150}
3: clear your ejabberd mnesia tables after hostname change
note: hostname changes are a pain, it’s easier to just let ejabberd rebuild the mnesia db’s at startup.
rm /var/lib/ejabberd/*
4: copy .erlang.cookie from “master node” (/var/lib/ejabberd/.erlang.cookie)
note: this is the unique cookie from<EMAIL_ADDRESS>not the one already residing on slave1
5: add hostnames to /etc/hosts using address and hostname from confg
<IP_ADDRESS> master.domain.com
<IP_ADDRESS> slave1.domain.com
6: create and compile easy_cluster module
6.1: go to server binaries folder
cd /lib/ejabberd/ebin/
6.2: create empty module file
touch easy_cluster.erl
6.3: put the following contents in easy_cluster.erl and save the file
https://github.com/chadillac/ejabberd-easy_cluster/blob/master/easy_cluster.erl
6.4: compile easy_cluster.erl
erlc easy_cluster.erl
6.5: confirm compilation succeeded
note: you should see easy_cluster.beam in the directory if compilation was successful
ls | grep easy_cluster.beam
7: start the slave node & confirm it’s running
ejabberdctl start
ejabberdctl status
8: drop into a debugging session on the live server
note: you’ll see a warning message, just hit enter to continue
ejabberdctl debug
note: if you successfully drop a debug console, your prompt will resemble this
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [smp:4] [async-threads:0] [hipe] [kernel-poll:true]
Eshell V5.6.5 (abort with ^G)
(ejabberd@slave1.domain.com)1>
9: test to see if we can connect to the node
note: at the end of each line we put a . this tells erlang to process our command
easy_cluster:test_node('ejabberd@master.domain.com').
if “server is reachable” we can continue, if it’s not, make sure you did ALL of the steps above.
10: join the cluster
easy_cluster:join('ejabberd@master.domain.com').
11: suspend your debug session by hitting Ctrl+c Ctrl+c
12: you’re done, go drink a beer, you probably need it.


This is the official website for the COPA CODERS, a CoderDojo with affiliated Code Clubs located in Maricopa, AZ. Please message us or visit our Facebook page if you are interested in volunteering or registering your child.
We are a community-driven, all volunteer youth technology education club. We need many individuals working together to help youth in Maricopa creatively solve problems using technology that will drive them for years to come.
CoderDojos around the world are designed for kids ages 7 to 17 as they explore technology through coding, developing anything from websites to robots that learn the environment around them. We call our dojo participants Ninjas and they are the focus of everything we do in COPA CODERS. Ninjas come on a weekly basis to:
PLEASE NOTE: Ninjas under the age of 13 will need to be accompanied by a parent or guardian-approved adult for the duration of all Dojo events.
A mentor is an individual (with or without technical skills) who guides Dojo attendees and facilitates their learning and project work during the sessions. Mentors can have a preferred area of expertise they like to work in (eg. HTML, Python, graphic design, video, etc.), and this can influence the topics covered in the Dojo. It is also common for non-technical mentors to learn the basics of Scratch to be able to work with beginners.
We are always on the lookout for mentors. Please contact us and tell us how you'd like to get involved. Remember, you don't have to be a technology expert to be a great mentor!
A volunteer is an individual who helps with Dojo administration and related tasks. For example, parents of regular attendees and individuals who prefer not to work directly with children in the Dojo can help by organizing and managing events and registration, updating social media, producing flyers, and more.
Code Clubs are extracurricular clubs running at elementary and middle schools to help teach basics programming skills. We partner with local Code Clubs to help provide resources and transition students to join the dojo and become coding ninjas! More information can be found here.
Ninjas may contribute to this website in our project on GitHub and links to their pages will be listed below:


This documentation site is still being refined and organized. Please file issues about anything that is unclear. We also welcome pull requests from anyone who can help us better organize and clarify this information.
Kafka Detective is a utility for performing continuous end-to-end testing of streaming data applications.
This site describes how to use Kafka Detective to debug your streaming data applications, how to extend Kafka Detective with extensions, and walks through some of the architecture of Detective.
We’ll try our darndest to keep this document up to date as changes come to Detective, but we encourage you to open a PR fixing any issues you find along the way.
The latest release of Kafka Detctive is 0.7.1.
The scaladocs for the current release of the detective-api package, which is used for building custom functionality that plugs into Detective, can be found here.


Back
Coffee Time
Coffee Time
Scan giftcard
Send gift
Friends
FAQ
Logout
Privacy and License Agreement


Ariana Grande-Butera (born June 26, 1993), known professionally as Ariana Grande (/ˌɑːriːˈɑːnə ˈɡrɑːndeɪ/), is an American singer and actress. She began her career in the Broadway musical 13, before landing the role of Cat Valentine on the Nickelodeon television series Victorious in 2009. After four seasons, the show ended, and Grande starred on the spinoff, Sam & Cat, which ended in 2014. She has also appeared in other theatre, television and film roles and lent her voice to animated television and films.
Read more


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 6-8
Dietary
This tropical pineapple upside-down cake recipe doesn't feel retro, and who cares when it's loaded with tasty rum.
Preheat the oven to 175C/350F/Gas 3.
Line the bottom and the sides of a large ovenproof dish or cake tin with the pineapple rings (cut the pineapple rings in half to line the sides).
In a bowl, whisk together the eggs and sugar until frothy.
In another bowl, mix the flour, baking powder and vanilla sugar together until well combined.
Add the dry ingredients to the egg and sugar mixture and stir to combine.
Add the melted butter, the lemon zest, milk and dark rum to the mixture. Stir to combine.
Pour the mixture into the ovenproof dish over the pineapples. Bake in the oven for 40-50 minutes until risen and golden brown and a skewer inserted comes out clean.
Leave the cake to cool on a wire rack. When it is cooled, cut into slices to serve.


Statistics of weight loss
The AR game’s potential for weight loss was a big part of that discussion. In the process of getting out their doors and visiting parks, players found they were losing weight almost in spite of themselves. A Reddit Pokémon Go fan won acclaim for reporting that he’d lost 65 pounds between July and December.
Statistics of app downloads
Pokémon GO is one of the most successful mobile games of all time, breaking records like fastest to earn $100 million and most-downloaded in its first month of release. To date, it has grossed almost $2 billion in revenue and been downloaded 800 million times. Although no longer the global phenomenon it was in 2016, the game remains incredibly popular.


zEdit has a global logger which can be used to write log messages which will be appended to a log file on disk as the application is running. The Log View displays the contents of the application log.
It's best not to pollute the log with verbose messages that are unlikely to help when debugging an issue.
WARNING: Several of the functions here should never be called from zEdit scripts or modules. These functions have been marked with .


Computer Science
Computer Science is the study of the theory, experimentation, and engineering that form the basis for the design and use of computers. It is scientific and practical approach to computation and its applications and the systematic study of the feasibility, structure, expression, and mechanization of the methodical alogorithms that underlie the acquisition, representation, processing, storage, communication of, and access to information.
Job Opportunities
Open CS related jobs
Average Salary
Range of salary per month
Game Developer
5,000 - 10,000 MYR
Web Developer
7,000 - 14,000
Data Scientist
8,000 - 16,000 MYR
Android Developer
6,000 - 11,000 MYR
iOS Developer
4,000 - 5,000 MYR
Duration
Duration of CS programs
Bachelor Degree
3 - 4 Years
Difficulty
Medium
Practical / Theory
Balanced
Requirements
Mathematics
Physics (Optional)
Common Courses
Bachelor of Computing
Bachelor of Computer Science
Bachelor of Computer Engineering
Bachelor of Information Technology
Bachelor of Information Systems
Bachelor of Software Engineering
Bachelor of Advanced Computing
Common Subjects
Mathematics
Computer Systems
Programming
Database
Data Structure & Algorithms
Atrificial Intelligence
Area of Interests
Web Development
Game Development
Mobile Development
Data Science
Machine Learning
Internet of Things


DNN Survey Module
DNN® - www.dnnsoftware.com
© 2002-2019 by DNN Corp.
DNN Survey Project 09.00.00
Minimum System requirements:
- DNN Platform version 09.02.02 or higher
- DNN JavaScript Library for Chart.js v2.7.3
- SQL Server 2016 (any edition, also Express)
Changes:
- Update manifest file to ver 5 standard
- New Source Control project
- Complete Redesign in C#
- Applied styling according to the DNN UX Guide
- Uses DAL2
- Modified to work in DNN 9 and .Net 4.6+
- Moved some settings to permissions
- Added text answers
- Added quiz result view


Enter Room ID:
Enter Your Name:
Enter Room Password:
Set Room Password?
Hidden Room? (Hide from the list)


{% extends "base.html" %} {% block body %}
With CashBuddy, you never need to worry about your money being stolen. Our dedicated security team works day and night to ensure that your money is safe with us. When you use CashBuddy, hackers and identity thieves are a thing of the past.
Many online retailers already support CashBuddy, and even more are joining us every day. With CashBuddy, you'll never need to give your credit card out to online retailers ever again.
Using CashBuddy is simple and hassle-free! Just create an account, add your payment information, and you'll be ready to start shopping in no time at all!


{{mod:main.html}} {{mod:head.html}} {{mod:strong.html}} {{var:title=Testing Site}} {{var:desc=This is a testing site}} {{var:motd=Default motd is working}} {%head.html%}
Site title is {{title}}
Undefined variable invocation: {{help}}
{% strong.html %}motd: {{motd}}


Constructor
new MessagingSocket(optionsopt)
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Pass options to the constructor. Properties
|
Extends
- EventEmitter
Methods
bind() → {Promise}
Binds the socket and configures datagram handling.
Returns:
- Type
- Promise
close()
Closes the socket, removes all listeners, abandons all Message Supervisors.
discoverSelf(serveropt) → {Array}
Perform a STUN request.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
server |
String |
<optional> |
The STUN server to use. |
Returns:
An array containing [ip, port]
- Type
- Array
handleDatagram(data, rinfo)
Handle an incoming datagram.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Buffer | Raw datagram data. |
|||||||||
rinfo |
Object | Remote host information. Properties
|
send(data, address, port)
Send a raw datagram to a remote host.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Buffer | The datagram data. |
address |
String | Target host ip address. |
port |
Number | Target host port number. |
sendMessage(data, ip, port) → {Promise}
Send a message to a remote host. The remote host must also use this library to receive and understand the data.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Buffer | The message contents. |
ip |
String | Remote host ip address. |
port |
Number | Remote host port number. |
Returns:
Message delivery promise. Resolves when a message is fully received or the socket is closed. Rejects if the remote end did not respond.
- Type
- Promise
Events
message
Properties:
| Name | Type | Description |
|---|---|---|
data |
Buffer | Message content. |
ip |
String | Sender ip address. |
port |
Number | Sender port number. |
Full message received.


cli.coffee |
|
|
This is the CLI interface for your NodeJS apps |
|
|
Get required packages: |
{EventEmitter} = require 'events'
modules =
readline : require 'readline'
async : require 'async'
|
|
Class definition: |
class CLI extends EventEmitter
|
|
Constructor function for CLI Object: Params
interface
String
The string you want the prompt to say:
welcome
String
The welcome message to say to the user
triggers
Object
A object of
trigger:action()
|
constructor: ( @interface = 'my-app', @welcome = 'Welcome to CLI!', @triggers = {} )->
@clear()
|
|
Setup the CLI input |
@cli = modules.readline.createInterface process.stdin, process.stdout, null
|
|
Welcome this awesome user: |
console.log @welcome
|
|
Set the prompt: |
@cli.setPrompt "#{@interface}> "
|
|
setup event listeners |
@listenForTriggers()
|
|
open the promt |
@cli.on 'line', @onLine
@resetInput()
@question = @cli.question.bind(@cli)
|
|
Ask the Command line a question(s) Params
questions
Object
Object of questions and their text
eg: { 'username':'What is the username?' }
|
ask: ( questions = {}, callback = null, tasks = {} )=>
|
|
Go through each question in the object: |
for key,value of questions
|
|
Create a contextual closure |
( (key,value,question)->
tasks[key] = ( cb )=>
question value, (r)->cb(null,r)
)( key, value, @cli.question.bind(@cli) )
|
|
Run the async.series on this list |
modules.async.series tasks, callback
|
|
Add events to list for Params
triggers
Object
Triggers to add the listeners for
|
listenForTriggers: ( triggers = @triggers )=>
for trigger,action of triggers
|
|
Add listener for each trigger, that results in action() |
@on trigger, action
@on 'clear', =>
|
|
when we enter |
@clear()
@resetInput()
|
|
Reset the prompt: |
resetInput: ()=>
@cli.prompt()
|
|
When we hit ENTER on the keyboard Params
line
String
Content of the line we jsut entered:
|
onLine: ( line )=>
|
|
Trim and spaces |
line = line.trim()
|
|
See if we have any listeners on this: |
if @listeners(line).length > 0
|
|
if so call it |
@emit line, @resetInput
else
|
|
Otherwise just reset the prompt |
@cli.prompt()
|
|
Clear the console: |
clear: ()=>
process.stdout.write '\u001B[2J\u001B[0;0f'
module.exports = CLI
|


A software engineer with years of experience to setup test system and write test program. Possess technical background in Dell Laptop computer board-level and system level function test.
Front-end Developer - Software Testing Enginner
Portfolio
Contact Me
Want to get in touch with me? Be it to request more info about myself or my experience, to ask for my resume, tips on how to solve your sudoku, random questions about the universe and the meaning of life, or even if only for some nice Fika here in stunning Toronto... just feel free to drop me a line anytime.
I promise to reply A.S.A.P.
Note: No spam/soliciting pour moi, merci :)