API for the Parallax WX Wi-Fi Module ESP8266-WROOM-02 (Part #32420). This library has a preliminary API that provides a starting point for some examples in the publication queue, and also for the Parallax open source community to build and improve upon.
More...
Macros |
|
| #define | WX_ALL_COM -1 |
| #define | USB_PGM_TERM -2 |
| #define | USB_PGM -3 |
|
|
#define | ARG 0xE6 |
| | Command token for retrieving a GET or POST request's name argument.
|
|
#define | CONNECT 0xE4 |
| | Command token for attempting to establish a TCP connection.
|
|
#define | CLOSE 0xE8 |
| | Command token for terminating a connection or listiner with either its ID or handle.
|
|
#define | CHECK 0xEE |
| | Command token used to check a Wi-Fi module setting or I/O pin state.
|
|
#define | JOIN 0xEF |
| | Command token for joining a network.
|
|
#define | LISTEN 0xE7 |
| | Command token for setting up a listener process that monitors HTTP or WebSocket activity.
|
|
#define | PATH 0xEB |
| | Command token used to check the path that is associated with a connection handle listener ID.
|
|
#define | POLL 0xEC |
| | Command token used to poll for events on paths that have listeners or connections set up.
|
|
#define | RECV 0xE9 |
| | Command token for retrieving TCP/WebSocket data or HTTP body.
|
|
#define | REPLY 0xE5 |
| | Command token for transmitting HTTP data in response to a GET or POST request.
|
|
#define | SEND 0xEA |
| | Command token used for SENDing TCP, WebSocket, or extended HTTP body data.
|
|
#define | SET 0xED |
| | Command token used to "set" a Wi-Fi module setting or I/O pin state.
|
|
|
#define | AP 0xF3 |
| | Token that can be used for both setting up and checking the Wi-Fi module's access point mode. In this mode, the Wi-Fi module is an access point that provides wireless (but not Internet) access.
|
|
#define | CMD 0xFE |
| | Begin marker token placed at the start of serial commands to the Wi-Fi module. Data that does not appear between CMD and '\r' is passed through as transparent serial data. CMD is also used in wifi_print/scan's type parameter to tell it to treat the formatted data to/from the Wi-Fi module as a command.
|
|
#define | GET 'G' |
| | A token returned by POLL to indicate that a GET request with a path that matched one on a listener has been received by the Wi-Fi module.
|
|
#define | HTTP 0xF7 |
| | One of the argument option tokens that can be used with the LISTEN command token to set up an HTTP event listener.
|
|
#define | POST 'P' |
| | A token returned by POLL to indicate that a POST request with a path that matched one set up on a listener has been received by the Wi-Fi module. Also used in wifi_scan's type parameter to tell it to treat the formatted data to/from the Wi-Fi module as WebSocket data.
|
|
#define | STA 0xF4 |
| | Token used for both setting up and indicating station mode. In this mode, the Wi-Fi module is a station on a wireless network that is hosted by some other access point.
|
|
#define | STA_AP 0xF2 |
| | Token used for both setting up and indicating station plus access point mode. This mode should only be used when searching for networks and joining one. After the Wi-Fi module has joined another access point, it should be switched to STA mode.
|
|
#define | TCP 0xF5 |
| | Constant that can be passed to the wifi_print/scan's type parameter to tell it to treat the formatted data to/from the Wi-Fi module as TCP data.
|
|
#define | WS 0xF6 |
| | One of the argument option tokens that can be used with the LISTEN command token to set up a WebSocket event listener. This token can also be returned by POLL to indicate that a WebSocket request matching a listener ID's path has been received. Also used in wifi_print/scan's type parameter to tell it to treat the formatted data to/from the Wi-Fi module as WebSocket data.
|
|
|
#define | GPIO_DI 1 |
| | Token used with the CHECK command to check the 1/0 input state of the Wi-Fi module's DI pin.
|
|
#define | GPIO_DO 3 |
| | Token used with the SET command to set the 1/0 output state of the Wi-Fi module's DO pin.
|
|
#define | GPIO_RTS 15 |
| | Token used with the SET command to set the 1/0 output state of the Wi-Fi module's //RTS pin.
|
|
#define | GPIO_CTS 13 |
| | Token used in conjunction with the SET/CHECK command tokens to set/check the 1/0 output/input states of the Wi-Fi module's /CTS pin.
|
|
#define | GPIO_ASC 5 |
| | Token used with the SET command token to set the 1/0 output state of the Wi-Fi module's ASSOC pin.
|
|
#define | GPIO_DBG 2 |
| | Token used with the SET command token to set the 1/0 output state of the Wi-Fi module's DBG pin.
|
|
#define | GPIO_PGM 0 |
| | Token used with the CHECK command to check the 1/0 input state of the Wi-Fi module's PGM pin.
|
|
|
#define | INVALID_REQUEST 1 |
| | Error Code for invalid request.
|
|
#define | INVALID_ARGUMENT 2 |
| | Error code for invalid argument.
|
|
#define | WRONG_ARGUMENT_COUNT 3 |
| | Error code for incorrect argument count.
|
|
#define | NO_FREE_LISTENER 4 |
| | Error code indicating all event listeners are in use.
|
|
#define | NO_FREE_CONNECTION 5 |
| | Error code indicating all connections are in use.
|
|
#define | LOOKUP_FAILED 6 |
| | Error code indicating lookup failed.
|
|
#define | CONNECTION_FAILED 7 |
| | Error code indicating that the connection failed.
|
|
#define | SEND_FAILED 8 |
| | Error code indicating that the send operation failed.
|
|
#define | INVALID_STATE 9 |
| | Error code indicating the Wi-Fi module is in an invalid state.
|
|
#define | INVALID_SIZE 10 |
| | Error code indicating that an invalid size argument was received.
|
|
#define | DISCONNECTED 11 |
| | Error code indicating that a disconnect occurred.
|
|
#define | NOT_IMPLEMENTED_ERROR_12 12 |
| | Error code not inplemented.
|
|
#define | BUSY 13 |
| | Error code indicating that the module is busy.
|
|
#define | INTERNAL_ERROR 14 |
| | Error indicating that an unspecified error occurred in the Wi-Fi module.
|
|
|
#define | NO_ERROR 0 |
| | Accopanies the 'S' for success, example: [0xFE]S,0[0x0D].
|
|
#define | OUT_OF_MEMORY -1 |
| | Network code indicating that the module is out of memory.
|
|
#define | UNDEFINED_NEG2 -2 |
| | Not yet defined.
|
|
#define | TIMEOUT -3 |
| | Network code for indicating that a timeout occurred.
|
|
#define | ROUTING_PROBLEM -4 |
| | Network code indicating a routing problem occurred.
|
|
#define | OPERATION_IN_PROCESS -5 |
| | Network code indicating that an operatino is in proress.
|
|
#define | UNDEFINED_NEG6 -6 |
| | Undefined.
|
|
#define | NUMBER_TOO_LARGE -7 |
| | Network code indicating that a number was too large.
|
|
#define | CONNECTION_ABORTED -8 |
| | Nework code indicating that a connection was aborted.
|
|
#define | CONNECTION_RESET -9 |
| | Network code indicating that the connection was reset.
|
|
#define | CONNECTION_CLOSED -10 |
| | Network code indicating that the connection was closed.
|
|
#define | NOT_CONNECTED -11 |
| | Network code indicating that the module is not connected.
|
|
#define | ILLEGAL_ARGUUMENT -12 |
| | Network code indicating an illegal argument was received.
|
|
#define | UNDEFINED_NEG13 -13 |
| | Undefined number 13.
|
|
#define | UDP_SEND_ERROR -14 |
| | Network code indicating that a UDP send error occurred.
|
|
#define | ALREADY_CONNECTED -15 |
| | Network code allerting that an attempt was made to create a connection that has already been established.
|
|
#define | SSL_HANDSHAKE_FAILED -28 |
| | Network code indicating that an SSL handshake failed.
|
|
#define | SSL_APPLICATION_INVALID -61 |
| | Network code indicating that an SSL application is invalid.
|
Functions |
| char * | wifi_bufferSize (int bytes) |
| | Sets the size (in bytes) of the Wi-Fi communication buffer.
|
| char * | wifi_command (char *command) |
| | Send a string command to the Wi-Fi module using its serial protocol, and get the Wi-Fi module's response. For more information on the serial protocol, consult the Serial Commands section in the Parallax Wi-Fi Module Firmware Guide. It's in the Downloads section of the Wi-Fi module's product page (search for 32420) at www.parallax.com. Example: reply = wifi_command("SET:pin-gpio13,1\\r"); // Set Wi-Fi module's /CTS pin to output-high.
|
| int | wifi_connect (char *address, int port) |
| | Attempt a TCP connection to address on port.
|
| int | wifi_disconnect (int idOrHandle) |
| | Terminate an established connection or listener via its handle or id (respectively), freeing it to rejoin the available connection or listener pools.
|
| int | wifi_ip (int mode, int *ipAddr) |
| | Check the IP address for the Parallax Wi-Fi module.
|
| int | wifi_join (char *network, char *password) |
| | Attempt to join a network via the ssid access point using passphrase.
|
| int | wifi_leave (int newMode) |
| | Leave an AP network and transition into a mode that's not pure STA. The wi-fi module will forget the current station IP address.
|
| int | wifi_listen (char protocol, char *path) |
| | Activate a listener process to monitor HTTP or WebSocket protocol activity on port 80 with a specified path.
|
| int | wifi_mode (int mode) |
| | Set or check the Wi-Fi module's network mode.
|
| void | wifi_poll (int *event, int *id, int *handle) |
| | Check for activity like incoming HTTP GET/POST requests, HTTP/WebSocket/TCP connections/disconnections, and incoming WebSocket/TCP data. Example: int event, id, handle;...wifi_poll(&event, &id, &handle);.
|
| int | wifi_print (int protocol, int handle, const char *fmt,...) |
| | The Wi-Fi module version of the simpletext library's print function. It simplifies formatting data in strings that can be: Responses to GET requests, WebSocket data transmitted, serial commands to the Wi-Fi module, and outgoing TCP messages. This function can be called to send unsolicited data to a WebSocket, a serial command to a Wi-Fi module, or for transmitting a TCP string. It can also be called to reply to an HTTP GET request, which is indicated by wifi_poll storing 'G' in the event variable.
|
| int | wifi_recv (int handle, char *data, int size) |
| | Retrieve incoming HTTP body or WebSocket/TCP data.
|
| int | wifi_replyStringCopy (char *targetStr) |
| | Copy a reply from the libwifi response buffer to a character array.
|
| int | wifi_scan (int protocol, int handle, const char *fmt,...) |
| | The Wi-Fi module version of the simpletext library's scan function. It simplifies extracting data contained in strings from incoming POST requests, WebSocket data, responses to commands, and TCP messages. This Function can be called after the wifi_poll function has sent event information that an incoming request//response/message is ready for the Propeller to receive. This command has a variety of usage examples in the /Examples/Propeller C subfolder of parallax-esp-2016-11-02-1804b and newer. The zip file with this folder is in the downloads section of the Parallax Wi-Fi Module page at www.parallax.com (search 32420).
|
| char | wifi_send (int handle, char *data, int size) |
| | Transmit WebSocket/TCP data, or extended HTTP body (after REPLY command).
|
| void | wifi_setBuffer (char *buffer, int size) |
| | Sets the Wi-Fi buffer to an user declared external character array.
|
| fdserial * | wifi_start (int fromDO, int toDI, int baud, int comSelect) |
| | Set up Wi-Fi module serial connections for data command and transparent data communication.
|
|
void | wifi_stop (void) |
| | Stops the process started by wifi_start and recovers any memory that was allocated for command/reply storage and parsing.
|
API for the Parallax WX Wi-Fi Module ESP8266-WROOM-02 (Part #32420). This library has a preliminary API that provides a starting point for some examples in the publication queue, and also for the Parallax open source community to build and improve upon.
- Author
- Andy Lindsay
- Version
- 0.81 for firmware 1.0
- Copyright
- Copyright (C) Parallax, Inc. 2017. All Rights MIT Licensed.
Examples that demonstrate a collection of applications that use this library are in the 32420-Parallax-ESP-...zip archive's .../Examples/Propeller C folder. It's available from the Downloads sections on the Parallax WX Wi-Fi Module pages at www.parallax.com (search 32420). Look for the "Parallax WX
Wi-Fi Module Firmware and Example Files" link. Make sure to unzip to a folder and open the programs from there, not from within the .zip itself!
Also, make sure to update the Wi-Fi module's firmware. The Parallax ESP.ota file is in the top directory of the same .zip where you got the examples, and update instructions are in learn.parallax.com/propeller-c-wx-wi-fi. The code examples have web addresses to application circuits in the comments, and tutorials will come online, one at a time in the learn.parallax.com/propeller-c-wx-wi-fi pages.
This library was designed to keep a variety of connection options open for the Propeller Activity Board (WX and pre-WX) as well as other boards. It was also designed to coexist with the Simple Libraries that come with SimpleIDE. The goal was to make sure that all the familiar features could be used with a minimum of caveats and memory penalties.
Parallax encourages the open source community to expand this library, the pool of examples, and even the module firmware itself. Here are the project locations on the Parallax GitHub. Make sure to branch, modify, and then submit a pull request. We'd also like to encourage you to visit the Issues tab in these repositories if you run across something that looks like a bug or misprint, or if you have suggestions for improvement.
The example programs make heavy use of the wifi_print and wifi_scan funcitons. They behave similarly to the print and scan functions for SimpleIDE terminal and are intended to be helpful to folks who might just be "getting
their feet wet" with IoT.
There's also a wifi_command function that is somewhat less restrictive, allowing programmers to form the command strings and parse all the module responses. For best results, use it in conjunction with the Wi-Fi module's Serial API document. (The Serial API is also in the Downloads section on the Wi-Fi module product page, with a link named Parallax Wi-Fi Module Firmware Guide and a filename of "32420-Parallax-Wi-Fi-Module-API-v...pdf". We hope that this will be helpful in prototyping new functions that supply a more intermediate level of granularity or enhance the educational experience of using these modules with the Propeller.
To Do:
- Poll function allow focus on particular id/handle.
- Add formatting flags to make scan funcitons able to not exit on spaces.
Definition in file wifi.h.


initSpen_F.m
Copyright (C) 2017, Bank of Canada
This source code is licensed under the 3-Clause BSD License found in the LICENSE file in the root directory of this source tree.
This subroutine loads the parameters describing the penalty functions - for increasing effective coupon rates on debt when issuance amount is outside allowable ranges.
Contents
1. Define allowable ranges for each instrument
s.nNomInst = 9; s.issueRanges=[ --- ---; % 3m --- ---; % 6m --- ---; % 12m --- ---; % 2Y --- ---; % 3Y --- ---; % 5Y --- ---; % 7Y --- ---; % 10Y --- ---; % 30Y --- ---; % 2Y RRB --- ---; % 5Y RRB --- ---; % 10Y RRB --- ---]; % 30Y RRB
2. Define point estimates for additional coupon associated with amounts of over-issuance
% 3-month x_upper(1,:) = [s.issueRanges(1,2)+[--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(1,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 1 % 6-month x_upper(2,:) = [s.issueRanges(2,2) + [--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(2,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 12-month x_upper(3,:) = [s.issueRanges(3,2) + [--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(3,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 2-year x_upper(4,:) = [s.issueRanges(4,2)+ [--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(4,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 3-year x_upper(5,:) = [s.issueRanges(5,2)+ [--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(5,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 5-year x_upper(6,:) = [s.issueRanges(6,2)+[--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(6,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 7-year x_upper(7,:) = [s.issueRanges(7,2)+[--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(7,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 10-year x_upper(8,:) = [s.issueRanges(8,2) + [--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(8,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 30-year x_upper(9,:) = [s.issueRanges(9,2) + [--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(9,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 2-year RRB x_upper(s.nNomInst+1,:) = [s.issueRanges(s.nNomInst+1,2) --- --- --- --- --- --- --- --- --- --- ---]; p_upper(s.nNomInst+1,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 5-year RRB x_upper(s.nNomInst+2,:) = [s.issueRanges(s.nNomInst+2,2) --- --- --- --- --- --- --- --- --- --- ---]; p_upper(s.nNomInst+2,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 10-year RRB x_upper(s.nNomInst+3,:) = [s.issueRanges(s.nNomInst+3,2) --- --- --- --- --- --- --- --- --- --- ---]; p_upper(s.nNomInst+3,:) = [--- --- --- --- --- --- --- --- --- --- ---]; % 30-year RRB
x_upper(s.nNomInst+4,:) = [s.issueRanges(s.nNomInst+4,2)+[--- --- --- --- --- --- --- --- --- --- ---]]; p_upper(s.nNomInst+4,:) = [--- --- --- --- --- --- --- --- --- --- ---];
3. Regress point estimates into continuous penalty functions
for k=1:s.nNomInst+4; X=[ones(11,1) x_upper(k,:)' (x_upper(k,:).^2)']; s.beta(:,k)=inv(X'*X)*X'*p_upper(k,:)'; end s.m1(1)=---/(s.issueRanges(1,1)^2); s.m1(2)=---/(s.issueRanges(2,1)^2); s.m1(3)=---/(s.issueRanges(3,1)^2); s.m1(4)=---/(s.issueRanges(4,1)^2); s.m1(5)=---/(s.issueRanges(5,1)^2); s.m1(6)=---/(s.issueRanges(6,1)^2); s.m1(7)=---/(s.issueRanges(7,1)^2); s.m1(8)=---/(s.issueRanges(8,1)^2); s.m1(9)=---/(s.issueRanges(9,1)^2); s.m1(s.nNomInst+1)=---/(s.issueRanges(s.nNomInst+1,1)^2); s.m1(s.nNomInst+2)=---/(s.issueRanges(s.nNomInst+2,1)^2); s.m1(s.nNomInst+3)=---/(s.issueRanges(s.nNomInst+3,1)^2); s.m1(s.nNomInst+4)=---/(s.issueRanges(s.nNomInst+4,1)^2); s.penFactor(1:13) = 1;


{'Welcome to ' + productName}
This guide will give you an easy understanding of how the font-end framework works.
What makes {productName} so special is that it is relatively easy to embed:
Start by adding the inline-script.js in your head by either downloading it or linking to the github url.
<script src="https://ilijazm.github.io/Inline-Script/inline-script.js"></script>
then call the inlineScript function like this:
<script>inlineScript();</script>
Now your good to go to start your first { productName } project today!


| DOSE: T+ 0:00 |
1/2 hit |
|
LSD |
(blotter / tab) |
| T+ 1:30 |
1/4 hit |
|
LSD |
(blotter / tab) |
My first acid trip - by Curunir
Substance: LSD.
Initial dose: ~80 ug, ingested orally (half of a seal containing 160 ug) at about 2 pm
Follow up dose: ~ 40 ug ingested orally (one quarter of a seal) at about T+1:30
Date: unknown, probably somewhere late spring/early summer
I took my very first dose of acid, about 80 ug’s on the way to the station. Down the proverbial rabbithole that little blotter went. Our plan was to cross the river and head to a pasture on the edge of the water just across. A quiet place and with a natural feel to it, though it's very close to the city (which is on the riverside opposed to where we sat). I recall experiencing quite a bit of pre-trip anxiety, particulary once we were at the station buying something to eat and some fruit drinks for later. Inside the shop I felt a bit tense and had the sensation that everyone there was looking at me strangely. So I went outside and tried to relax for a bit. This must have been about T+30 mins.
Eventually we went outside and to the field across the river. On the bridge I began to notice the water had a deep hue and looked very alive. When we were down lating on the grass looking at the river this sensation increased. I felt quite happy to be there, and at one point I lay in the grass stretched out, listening to some psybient music on my ipod and looking at the cool trippy image on my weedbox. Somehow it looked more weird than it usually does when I'm sober ;).
So after a while I thought 'hey this acid is great'. Since my tripbuddy took some more, I decided to join him even though this was my first trip. I had about half a seal, which must have been about 40 mics more. In retrospect I slightly regret this. My eventual dose was about 120-30 ug, a bit much for a first trip especially considering the circumstances I was in later on. Though it was by no means a bad trip, things did get a bit uncomfortable now and then due to my inexperience combined with the strong dose.
At some point I wanted to head back to the city and check out this new acidified world I was in. Once across the bridge we headed into town, walking parallel to the river.
We passed these beautiful old houses, and looking at their fences I noticed they really weren't so strong and durable as I thought. They were actually melting as it were, very flexible and I just had to touch them. Suddenly I felt I understood the feeling Ken Kesey and his merry pranksters must have had when they dropped their seals. Acid makes you feel like a wizard of sorts, capable of bending matter and realizing the whole fabric of existence isn't so strong.. the durability and permanence of outside objects ain't so sure.. everything might just collapse any minute, but in a good way: why get hung up on anything. Much later this led me to realize how psychedelics may have played a vital part in spawning the whole counterculture movement of the 60s and 70s: if nothing is really as durable and fixed as it seems, why not try to reform society to be more in tune with your own ideals and beliefs?
Even more than fighting against the repressive society of the 50s, with its strict codes and morals, one could simply reshape them or create new codes.
At some point we turned left and went through these narrow medieval city streets until we came to an open door. We saw some artsy paintings outside and smelled some paint, so we boldly went inside. I felt like I was in a cave, with a dark and crooked ceiling, in which all sorts of wonders are hidden. We saw a man working on some paintings and art objects, mostly colourful surrealistic stuff. Quite nice. We talked for a while and I tried quite hard to 'look normal', which was less of a challenge for my tripbuddy D. Who is very experienced on acid. I thought it went quite well (it probably didn’t actually :p) so this became our running gag during the trip: we had to pass these acid checks by talking to sober people and try not to appear weird or tripping on acid. As the peak of the experience had yet to come, this became increasingly diffcult ;).
So then we walked on by the cathedral a few blocks further and I noticed the ground was going up and down as I walked.. it looked like I was walking over very tiny hills, which were flowing back and forth. In fact all straight lines appeared more crooked and bending. The edges of houses would change from straight to concave and convex shapes, switching back and forth. When I smoked cigarettes later I noticed these were also very much bended, almost completely in a 90 degree angle.
But this bending combined with colours taking on an increased intensity are really the only visual effects the trip had for me.  I was only able to think in a more or less linear/logical fashion with great difficulty. My thoughts felt like they were being produced somewhere in the sky in front of me. When eating something I felt the taste not in my mouth but in my hands or (again) in the sky. My body sense was distorted too, nothing felt like it was in its proper place.
Their literally was no point of reference, by which i mean sensory input, thoughts and feelings were all flowing through one another and mingling together.
Now I have to admit this was a bit scary because normally when on other substances there's still some rational voice in my brain to which I can turn. I probably won't if I'm having a good time, but if things go awry I’m able of regaining some control of the situation if I need to. With acid, it was like the very possibility of rational thinking was taken away, or at least distorted in some weird way. But I came to accept the lack of a point of reference as a lesson of sorts: maybe we don’t really need such a point in most situations. Just accepting uncertainty and the 'bendedness' or crookedness of the world as a fact we can live with.
But I digress: we went to look in a church and talked to a lady there, all the while appearing very normal and respectable of course ;) and eventually walked to a squatted place I know. This woman outside was preparing to make a little garden, planting some seeds and making a fence. I just had to stop and touch the earth, and ramble something about how unreal the earth was. The physical sensation of going through the dirt with me hands was odd, though I don’t recall why. We talked for a bit and eventually I told her I was on acid. 'Ah of course, I thought something was the matter'.
We talked to lots of people afterwards. Most of them were really in a different mind zone. The whole situation had this ‘concrete jungle’ tinge which made me feel out of place. We did make fun of this, ‘exploiting the concrete’ (like going up and down some escalators for about 15 minutes). But once back on the main town square my hearing began to disturb me: it wasn't just distorted (as were all my senses) but also sharpened. I heard a buzzing sound, and walking towards its source I realized I was aware of it at about 15 mtrs from where I should have been able to. People talking would come on very strongly which was quite uncomfortable.  When I decided to get some ice cream inside I was really overwhelmed by all the people, their feelings and their talk inside. It was extremely hard to focus and do what I came there to do. A very uncomfortable sensation.
Eventually I thought 'well what the hell, either I freak out and run outside, or I'll just push through, get my ice cream and pass the test'. Which I did. I was somewhat proud of having passed this last acid check, the most difficult of all.. though it might have been better to just go somewhere else. Once outside I ate the ice cream which tasted very strange, creamy and buttery of sorts but with little other taste.
After sitting on the terrace for a while we proceeded to walk on the central square, when the weather started to change. It went from beautiful and sunny to darker and a bit dreary. Rain started to fall and all the bars and cafes were closing up. This had a big effect on my mood which became quite dreary as well. We walked through the park on the way home and by this time I was in a grim mood. And discussing the meaning of life only increased this effect. But fortunately we met some friends who usually hung out in the park smoking their weed and drinking their beer. Though they were also in a very different state of mind (as were most people we met during the day) I did enjoy their ‘gruff companionship’ (for lack of a better word). And upon sitting down and quickly downing half a litre of beer (uh-oh) my mood started to improve. So when I went away from the park and back home to get some dinner I was in better spirits.
After dinner the trip had mostly worn of, though there was some afterglow and I was in a philosophical/introspective state of mind (even more so than usual).
Had a little talk with my mom, a mate came by and we watched a nice movie. I was very tired in an emotional/psychological sense, but not quite ready to sleep yet, so I lay awake for some time.. sensing some strange patterns in the dark and not feeling sleepy. Eventually I did doze off and felt quite rejuvenated once I awoke.
So, in retrospect: a good trip, but I could’ve made it easier on myself. The contentment was there occasionally, but the sense of euphoria was only there the first hour or two and I had some mixed feelings afterwards.
My recommendations (to myself):
- go a bit more easy on the dose next time
- stay in a more rural/natural area
- don't plan any new activities afterwards
- recognize lsd is active for a very long time
All in all, I do consider this to have been a rewarding ‘first contact’. Acid certainly merits more exploration.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{% extends "base_new_design.html" %} {% block title %} Oops, something went wrong {% endblock %} {%block content %}
Sorry, but the requested page is unavailable for the moment.
Our team has been notified. We are already working on it!
If you need help, please send us an email.


Provides functions and classes to compute, handle and visualise incidence from dated events for a defined time interval. Dates can be provided in various standard formats. The class 'incidence' is used to store computed incidence and can be easily manipulated, subsetted, and plotted. In addition, log-linear models can be fitted to 'incidence' objects using 'fit'. This package is part of the RECON (<http://www.repidemicsconsortium.org/>) toolkit for outbreak analysis.
| Version: | 1.5.2 |
| Imports: | ggplot2, ISOweek |
| Suggests: | magrittr, outbreaks, testthat, vdiffr, covr, knitr, rmarkdown, scales, cowplot |
| Published: | 2018-11-30 |
| Author: | Thibaut Jombart [aut], Zhian N. Kamvar [aut, cre], Rich FitzJohn [aut], Jun Cai [ctb], Sangeeta Bhatia [ctb], Jakob Schumacher [ctb] |
| Maintainer: | Zhian N. Kamvar <zkamvar at gmail.com> |
| BugReports: | http://github.com/reconhub/incidence/issues |
| License: | MIT + file LICENSE |
| URL: | http://www.repidemicsconsortium.org/incidence/ |
| NeedsCompilation: | no |
| Materials: | NEWS |
| CRAN checks: | incidence results |
| Reference manual: | incidence.pdf |
| Vignettes: |
Conversions Customise graphics Incidence class Incidence fit class Overview |
| Package source: | incidence_1.5.2.tar.gz |
| Windows binaries: | r-devel: incidence_1.5.2.zip, r-release: incidence_1.5.2.zip, r-oldrel: incidence_1.5.2.zip |
| OS X binaries: | r-release: incidence_1.5.2.tgz, r-oldrel: incidence_1.5.2.tgz |
| Old sources: | incidence archive |
| Reverse imports: | projections |
| Reverse suggests: | earlyR, epitrix |
Please use the canonical form https://CRAN.R-project.org/package=incidence to link to this page.


11
1 A false balance is an abomination to the LORD,
but a just weight is his delight.
2 When pride comes, then comes disgrace,
but with the humble is wisdom.
3 The integrity of the upright guides them,
but the crookedness of the treacherous destroys them.
4 Riches do not profit in the day of wrath,
but righteousness delivers from death.
5 The righteousness of the blameless keeps his way straight,
but the wicked falls by his own wickedness.
6 The righteousness of the upright delivers them,
but the treacherous are taken captive by their lust.
7 When the wicked dies, his hope will perish,
and the expectation of wealth perishes too.
8 The righteous is delivered from trouble,
and the wicked walks into it instead.
9 With his mouth the godless man would destroy his neighbor,
but by knowledge the righteous are delivered.
10 When it goes well with the righteous, the city rejoices,
and when the wicked perish there are shouts of gladness.
11 By the blessing of the upright a city is exalted,
but by the mouth of the wicked it is overthrown.
12 Whoever belittles his neighbor lacks sense,
but a man of understanding remains silent.
13 Whoever goes about slandering reveals secrets,
but he who is trustworthy in spirit keeps a thing covered.
14 Where there is no guidance, a people falls,
but in an abundance of counselors there is safety.
15 Whoever puts up security for a stranger will surely suffer harm,
but he who hates striking hands in pledge is secure.
16 A gracious woman gets honor,
and violent men get riches.
17 A man who is kind benefits himself,
but a cruel man hurts himself.
18 The wicked earns deceptive wages,
but one who sows righteousness gets a sure reward.
19 Whoever is steadfast in righteousness will live,
but he who pursues evil will die.
20 Those of crooked heart are an abomination to the LORD,
but those of blameless ways are his delight.
21 Be assured, an evil person will not go unpunished,
but the offspring of the righteous will be delivered.
22 Like a gold ring in a pig's snout
is a beautiful woman without discretion.
23 The desire of the righteous ends only in good;
the expectation of the wicked in wrath.
24 One gives freely, yet grows all the richer;
another withholds what he should give, and only suffers want.
25 Whoever brings blessing will be enriched,
and one who waters will himself be watered.
26 The people curse him who holds back grain,
but a blessing is on the head of him who sells it.
27 Whoever diligently seeks good seeks favor,
but evil comes to him who searches for it.
28 Whoever trusts in his riches will fall,
but the righteous will flourish like a green leaf.
29 Whoever troubles his own household will inherit the wind,
and the fool will be servant to the wise of heart.
30 The fruit of the righteous is a tree of life,
and whoever captures souls is wise.
31 If the righteous is repaid on earth,
how much more the wicked and the sinner!


View Highscore
Timer:
Coding Quiz
Welcome to Coding Quiz! In this game, you will be tested on your coding knowledge. There will be a total of 7 questions and 60 seconds to complete the quiz. When you are ready to begin, press the button below. Good luck!
Start Quiz
Last Question
Next Question
Submit Quiz


CLUBS
Home
History
Youth Football
Futsal
Projects
Log in
Johnti Aga
My team
Following
Support
Log out
Login
Google
Facebook
Twitter
Forgot your password?
Sign in
Football lesson
Football footage
Soccer coach
Kazakhstan philosophy of the game
Private soccer schools
Stadium classifier
Professional futsal league
Beach football
Fan-shop KFF
Young Arbiter School
House of Football
Sports base of national teams
Football academies


Delivering Growth
Accelerate the growth of your business
Capital Assist
Easy funding to grow your business. Loan approval within minutes, disbursal within 72 hours without any guarantors or collateral.
Get key trends and insights
Our team of expert sd-Advisors give you insights and recommendations on the latest trends to grow your business.
Unlimited business hours
Online shoppers can shop anytime from anywhere. With Snapdeal, you can actually sell 24x7
Unlimited business hours
Online shoppers can shop anytime from anywhere. With Snapdeal, you can actually sell 24x7
Snapdeal Ads
Put your product in the spotlight and get guaranteed visibility with Snapdeal Ads. Now advertise to grow your business.
.col-sm-8 .col-sm-pull-4
.col-sm-4 .col-sm-push-8
.col-sm-8 .col-sm-pull-4


Please see API Endpoints for the actual API endpoints we currently give you. Join the Support Server and Ping/DM Rootspring#6701 if you want to request a specific API Endpoint
There are some things that are not allowed to edit. Below is a list of the currently not allowed elements:
.alert
Things that are not allowed to edit are naively replaced meaning all places where you use them in custom CSS will be removed| Key | Description | Type |
|---|---|---|
| id | This is the ID of the user who voted for your bot | String |
| votes | This is how many votes your bot now has | Integer |
| test | This key is only returned if you are testing your webhook. It will always be true if sent. Use this to check for test webhook or not. | Optional[Boolean] |
Fates List offers a WebSocket API at /api/ws for getting real time stats on your bot. This is the only way to get view events (and potentially other events). All things sent must be as payloads, which are JSONs with a special format. See below for more information
Upon attempting to connect to /api/ws, you must communicate using payloads. After authentication, the transmissions become one way from server to your client. The below table explains the payload format:
| Key | Description | Type |
|---|---|---|
| payload | This is a payload which is essentially what is being sent to you. This can be a IDENTITY, STATUS, KILL_CONN or EVENTS but this may change in the future | String |
| type | This is the payload type which is how you are supposed to respond or extra information about the payload such as NO_AUTH or API_TOKEN. | String |
| data | If the payload is a data payload like EVENTS_V1, then this the main data sent by the payload. This key is not present on non-data payloads | Optional[String] |
Identity Payloads are what you will get when you first try to connect to the WebSocket API. You must repond using a IDENTITY_RESPONSE payload with the type being API_TOKEN and the data being the list of API Tokens you want events for. If you do not use the correct format, a KILL_CONN payload with the type INVALID_IDENTITY_RESPONSE will be sent to you and the connection will be closed with code 4004. If none of your API Tokens match, you will get a KILL_CONN payload with the type NO_AUTH. Once connections is successful, a STATUS payload with type READY will be sent to you. From here, all transmissions other than ping become server -> client only.
For your reference, here is an example of a IDENTITY_RESPONSE: {"payload": "IDENTITY_RESPONSE", "type": "API_TOKEN", "data": ["TOKEN1", "TOKEN2"]}
Events Payloads are what you will get after connecting to the websocket whenever you have a new event. They will/should always have a STATUS key with the value being READY. This key is not part of the WsEventsObject and should be ignored. Additionally, you will see that the WsEventsObject will be a dictionary with the key being the event id and the value being a WsEvent and the WsEventsObject is part of a dictionary with the key being the bot_ids you connected to the WS using IDENTITY for. The type may be changed if breaking changes are made. A WsEvent has the following format (WsEventsObject is {event_id: WsEvent, event_id_2...}):
| Key | Description | Type |
|---|---|---|
| payload | This is a payload of the event which is essentially what is being sent to you. This will always be 'event' in a WsEvent | String['event'] |
| event | This is the type of WebSocket event you are getting | String |
| context | This is the context of the event | Optional[String] |
For your reference, here is an example of a EVENTS payload: {"payload": "EVENTS", "type": "EVENTS_V1", "data": {"631115725876101150": {"status": "READY", "18741a69-552b-4d7d-ab0b-7ed211a22049": {"payload": "event", "event": "view", "context": {"user": 0, "hidden": 1, "widget": "False"}}}}}


Class Events
Method Summary
Field Detail
{Object}
type
holds all valid event types -- See Event Summary for details
{Array[Object]}
handlers
array of event handler objects in form of { 'handler_name', function() {} }.
Method Detail
-
addListener(name, handler)adds an event listener
APMPlayer.events.addListener(APMPlayer.events.type.PLAYER_READY, function() {});
- Parameters:
- {string} name the name of the event to listen for
- {Object} handler function to fire when event is called.
-
removeListeners()clears out all listeners in this events objec
APMPlayer.events.removeListeners();
-
trigger(name, eventArgs)fires all events handlers that match 'name' and passes eventArgs to each handler.
APMPlayer.events.trigger(player.events.type.MEDIA_READY, { 'identifier' : this.ID });
- Parameters:
- {string} name name of event to fire
- {Object} eventArgs object literal to pass to all functon handlers
Event Detail
AUDIO_LIB_READY
fires after Audio library has initialized (only used internally)
Events.type.AUDIO_LIB_READY
BUFFER_END
fires when player buffering ends
Events.type.BUFFER_END
BUFFER_START
fires when player starts buffering
Events.type.BUFFER_START
CONNECTION_LOST
fires if the network connection is lost
Events.type.CONNECTION_LOST
FINISHED
fires when playable finishes playing
Events.type.FINISHED
MEDIA_READY
fires when media has successfully loaded and is ready to be played
Events.type.MEDIA_READY
METADATA
important for statistic tracking (web trends) fires each time a new playable is encountered, or when a new item begins playing in a live stream
A Playable is always the data for each METADATA event
Events.type.METADATA
MISSING_FILE
fires if a file that was attempted to be played is missing
Events.type.MISSING_FILE
PAUSED
fires when playable is paused
Events.type.PAUSED
PLAYER_FAILURE
fires when no suitable playback mechanism can be determined (final failure)
Events.type.PLAYER_FAILURE
PLAYER_READY
fires when player has completely initialized
Events.type.PLAYER_READY
PLAYING
fires when playable begins playback
Events.type.PLAYING
PLAYLIST_CURRENT_CHANGE
fires when current item in playlist has updated
Events.type.PLAYLIST_CURRENT_CHANGE
POSITION_UPDATE
fires each time player head updates while playing-- a number in miliseconds usually accompanies the event to report current position in miliseconds.
Events.type.POSITION_UPDATE
UNLOADED
fires when a playable is stopped or unloaded from player
Events.type.UNLOADED
VOLUME_UPDATED
fires when volume is updated
Events.type.VOLUME_UPDATED


Next: intern, Previous: defpackage, Up: Packages Dictionary
do-symbols
(var [package [result-form]])
{declaration}*
{tag | statement}*
⇒ {result}*
do-external-symbols
(var [package [result-form]])
{declaration}*
{tag | statement}*
⇒ {result}*
do-all-symbols
(var [result-form])
{declaration}*
{tag | statement}*
⇒ {result}*
var—a variable name; not evaluated.
package—a package designator; evaluated.
The default in do-symbols and do-external-symbols is the current package.
result-form—a form; evaluated as described below. The default is nil.
declaration—a declare expression; not evaluated.
tag—a go tag; not evaluated.
statement—a compound form; evaluated as described below.
results—the values returned by the result-form if a normal return occurs, or else, if an explicit return occurs, the values that were transferred.
do-symbols, do-external-symbols, and do-all-symbols iterate over the symbols of packages. For each symbol in the set of packages chosen, the var is bound to the symbol, and the statements in the body are executed. When all the symbols have been processed, result-form is evaluated and returned as the value of the macro.
do-symbols iterates over the symbols accessible in package.
Statements may execute more than once for symbols that are inherited from multiple packages.
do-all-symbols iterates on every registered package. do-all-symbols will not process every symbol whatsoever, because a symbol not accessible in any registered package will not be processed. do-all-symbols may cause a symbol that is present in several packages to be processed more than once.
do-external-symbols iterates on the external symbols of package.
When result-form is evaluated, var is bound and has the value nil.
An implicit block named nil surrounds the entire do-symbols, do-external-symbols, or do-all-symbols form.
return or return-from may be used to terminate the iteration prematurely.
If execution of the body affects which symbols are contained in the set of packages over which iteration is occurring, other than to remove the symbol currently the value of var by using unintern, the consequences are undefined.
For each of these macros, the scope of the name binding does not include any initial value form, but the optional result forms are included.
Any tag in the body is treated as with tagbody.
(make-package 'temp :use nil) ⇒ #<PACKAGE "TEMP"> (intern "SHY" 'temp) ⇒ TEMP::SHY, NIL ;SHY will be an internal symbol ;in the package TEMP (export (intern "BOLD" 'temp) 'temp) ⇒ T ;BOLD will be external (let ((lst ())) (do-symbols (s (find-package 'temp)) (push s lst)) lst) ⇒ (TEMP::SHY TEMP:BOLD) OR⇒ (TEMP:BOLD TEMP::SHY) (let ((lst ())) (do-external-symbols (s (find-package 'temp) lst) (push s lst)) lst) ⇒ (TEMP:BOLD) (let ((lst ())) (do-all-symbols (s lst) (when (eq (find-package 'temp) (symbol-package s)) (push s lst))) lst) ⇒ (TEMP::SHY TEMP:BOLD) OR⇒ (TEMP:BOLD TEMP::SHY)
Traversal Rules and Side Effects
Next: intern, Previous: defpackage, Up: Packages Dictionary


Protocols
The following protocols are available globally.
-
A protocol for objects that are managed by a CoreData NSManagedObjectContext
See moreDeclaration
Swift
public protocol Managed : NSFetchRequestResult
-
Delegate protocol for a TableViewSource instance. Combines a NSFetchedResults object (
See moreObject
) with a UITableViewCell instance (Cell
).Declaration
Swift
public protocol TableViewDataSourceDelegate : AnyObject
-
Undocumented
See moreDeclaration
Swift
internal protocol ConfigFileManager : AnyObject
-
Protocol that handles AUParameter get and set operations.
See moreDeclaration
Swift
public protocol AUParameterHandler
-
Delegation protocol for AudioUnitManager class.
See moreDeclaration
Swift
public protocol AudioUnitManagerDelegate : AnyObject
-
Collection of UIViewControllers and protocol facades which helps establish inter-controller relationships during the application launch. Each view controller is responsible for establishing the connections in their
See moreestablishConnections
method. The goal should be to have relations between a controller and protocols / facades, and not between controllers themselves. This is enforced here through access restrictions to known controllers.Declaration
Swift
public protocol ComponentContainer
-
Protocol for UIViewControllers that require connections to other UIViewControllers at startup time.
See moreDeclaration
Swift
public protocol ControllerConfiguration
-
Manages what swiping activity does.
See moreDeclaration
Swift
public protocol EventClosureManagement
-
Protocol for the
See moreFavoriteDetailController
delegate instance.Declaration
Swift
public protocol FavoriteEditorDelegate : NSObjectProtocol
-
Actions available on a collection of Favorite instances. Supports subscribing to changes.
See moreDeclaration
Swift
public protocol Favorites
-
Protocol for a favorites view manager.
Declaration
Swift
public protocol FavoritesViewManager : UpperViewSwipingActivity
-
Generates swipe actions that act on SoundFont instances.
See moreDeclaration
Swift
public protocol FontEditorActionGenerator
-
Protocol for the
See moreSoundFontDetailController
delegate instance.Declaration
Swift
public protocol FontEditorDelegate : NSObjectProtocol
-
Defines the available actions of a PatchesViewManager which contains both the list of installed sound fonts on the left and on the right the list of presets found in the selected sound font.
See moreDeclaration
Swift
public protocol FontsViewManager : UpperViewSwipingActivity
-
Handles the actions and display of items in a hypothetical info bar above the keyboard
See moreDeclaration
Swift
public protocol InfoBar : AnyObject
-
Manages the state of the keyboard
See moreDeclaration
Swift
public protocol Keyboard : AnyObject
-
Functionality we expect for entities that can receive MIDI messages.
See moreDeclaration
Swift
public protocol MIDIReceiver : AnyObject
-
Protocol for UIView classes that can load themselves from a NIB file. To do so they must define the name of the NIB to be loaded and a way to obtain the UINib object where it resides.
See moreDeclaration
Swift
public protocol NibLoadableView : AnyObject
-
Protocol for UIView “cell” classes that will be recycled and used over and over again to render content in a container such as UICollectionView.
See moreDeclaration
Swift
public protocol ReusableView : AnyObject
-
Protocol definition for objects that know about segues between UIView controllers. The protocol basically defines a type-safe way to translate from a UIStoryboardSegue.identifier value into a type-specific value (probably an enum)
See moreDeclaration
Swift
public protocol SegueHandler
-
Actions available on a collection of SoundFont instances. Supports subscribing to changes.
See moreDeclaration
Swift
public protocol SoundFonts : AnyObject
-
Type of value returned by SubscriptionManager.subscribe. Knows how to unsubscribe themselves.
See moreDeclaration
Swift
public protocol SubscriberToken
-
Protocol for activity involving sound font tags.
See moreDeclaration
Swift
public protocol Tags : AnyObject
-
Manages what swiping activity does.
See moreDeclaration
Swift
public protocol UpperViewSwipingActivity
-
A type that can provide a default value.
See moreDeclaration
Swift
protocol DecodableDefaultSource
-
Protocol for types that can store a value in UserDefaults
See moreDeclaration
Swift
public protocol SettingSettable
-
Protocol for types that can fetch a value from UserDefaults
See moreDeclaration
Swift
public protocol SettingGettable


WITNESS LIST Natural Resources Committee March 26, 2003-3:00P HB 487 For: Baker, Carole D. (Texas Section American Water Works Ass'n. (AWWA)) Everheart, Harvey (Mesa Underground Water Conservation District) Finch PhD, Calvin (San Antonio Water System) Gregg, Tony (American Water Works Association) Kramer, Ken (Lone Star Chapter, Sierra Club) Schwartz, John (Texas Turf Irrigation Association) Smith, Tom "Smitty" (Public Citizen) Against: Brannan, David (Texas Turf Irrigation Association) On: Mintz, David (Texas Apartment Association) HB 488 For: Everheart, Harvey (Mesa Underground Water Conservation District) Finch PhD, Calvin (San Antonio Water System) Gregg, Tony (American Water Works Association) Kramer, Ken (Lone Star Chapter, Sierra Club) Against: Kamerbeek, Marty (PHCCA Plumbing Heating Cooling Contractors Asi) Schnabel, Charlie (Plumbing Mfg. Institute) Viola, David (Plumbing Manufacturers Institute; American Society of Mechanical Engineers A112 Committee) HB 489 For: Finch, Calvin (San Antonio Water System) Gregg, Tony (American Water Works Association) Kramer, Ken (Lone Star Chapter, Sierra Club) Against: Hightower, Leslie Lynch (Self and Best Wash Inc.) McKnight, Robert J. (Self and McWal Enterprises - Texas Coin Laundry Association) Steiner, David (Maytag Corporation) Wells, Kenny (Self and Wells Laundry Inc; Texas Coin Laundry Association) HB 755 For: Findeisen, Les (Texas Motor Transportation Association) Price, Gregory K. (United Petroleum Transports and Texas Motor Transportation Assoc.) On: Sarahan, Paul (TCEQ) HB 895 For: Ayres, Robert (Self) Shackelford, Julie (American Farmland Trust) Against: Turner, Bob (Trans Texas Heritage Assoc) HB 1152 For: Burke, John (Texas Rural Water Assoc.) Petersen, Ken (Texas Rural Water Association) HB 1370 On: Olson, Leonard (TX Water Development Board) HB 1540 For: Garcia, Alex E. (West Harris County Regional Water Authority) HB 1541 For: Allen, Joe B. (Association of Water Board Directors) Blitch, Bill (Association of Water Board Directors) Against: Smith, Tom "Smitty" (Public Citizen) On: Mitchell, Jamie (Energy Conservation Coalition) HB 1832 For: Boyle Jr., John F. (Dallas County Utility Reclamation District) Knox, Jacky L. (Dallas County Utility and Reclamation District) HB 1875 On: Olson, Leonard (TX Water Development Board) HB 1979 For: Bernard, Becky (Liquid Environmental Solutions) Halty, Scott R. (San Antonio Water System) HB 2031 For: Green, Renee D. (Bexar County) HB 2300 For: Adams, Janet (Jeff Davis County Underground Water Conservation District)


I often find dream-like, hallucinogenic fiction loose and hard to follow. Not so with @jeffnoon. Reading “Creeping Jenny”and this dream-world is strange, crisp, and won’t leave me alone.
8/9/2022, 6:56:10 PM
Favs: 1
Retweets: 0
link--- layout: tweet ---
I often find dream-like, hallucinogenic fiction loose and hard to follow. Not so with @jeffnoon. Reading “Creeping Jenny”and this dream-world is strange, crisp, and won’t leave me alone.
8/9/2022, 6:56:10 PM
Favs: 1
Retweets: 0
link


Retriers
Retriers are a very useful tool for repeating requests that have failed. In Squid, they can be used in a variety of contexts. Some examples are the following:
- If an error occurs due to a missing internet connection or rate limiting, the request can be retried multiple times with exponential backoff.
- If an error occurs due to an expired token and results in a 401 response, the token can be refreshed and the request is retried with the new token.
How to Use Retriers
Retriers are defined at the API level - the justification being that e.g. authorization is implemented equally for all calls against an API.
In order to use a retrier, the HttpService
provides a HttpService.retrierFactory
property. Note that a new retrier is created per request to enable stateful retriers (e.g. exponential backoff). Creating a factory from a retrier is, however, very straightforward as you will see in the following.
The retrier itself needs to conform to the Retrier
protocol which defines a single Retrier.retry(_:failingWith:)
method that possibly retries a failed request.
To showcase how to use retriers in practice, we will consider the BackoffRetrier
that Squid provides out-of-the-box as well as implement our own retrier for Authorization.
Exponential Backoff
As applying an exponential backoff to a failed request can be standardized, i.e. is not dependent on a particular API, it is included in Squid directly.
As pointed out above, retriers need to be included into the API, so we modify our service from the first guide as follows:
struct MyApi: HttpService {
var apiUrl: UrlConvertible {
"jsonplaceholder.typicode.com"
}
var retrierFactory: RetrierFactory {
BackoffRetrier.factory()
}
}
As a result, all requests that are now scheduled against the API will be retried when particular errors occur (e.g. no connection
, 429 status code, …, see BackoffRetrier.defaultRetryCondition(_:)
).
In fact, you do not need to change anything else for this to work. You can schedule requests just as before.
Refreshing Tokens
Refreshing tokens for accessing protected resources is probably one of the most common use cases for retriers when targeting secure APIs. However, Squid does not include this feature out-of-the-box since the particular implementation is highly dependent on a particular API.
In the following, we will walk you through the process of setting up services and requests that enable retrying requests for authentication. Throughout, we assume the following:
- We have two API endpoints: (A) one for authentication which can be accessed easily and (B) one for accessing protected resources where we need to authenticate.
- Authentication is performed via an access token that is passed via the HTTP
Authorization
header. Once received, this token is, however, valid for a short period of time only (e.g. 10 minutes). - To request a new access token without passing user credentials (e.g. username/password), we have a refresh token that does not expire.
- When we try to access a resource from endpoint B with an expired access token, we get a response status code of 401.
- We can then receive a new access (and refresh) token by sending a request to endpoint A.
Defining the Authentication Service
At first, we want to define the authentication service. Usually, you will need to send a login request initially to obtain an access and a refresh token. However, to simplify this guide, we assume that we have these tokens already stored in our keychain.
To interact with the keychain, we use some (thread-safe and caching) instance that conforms to the following protocol (note that this protocol does not handle errors - again, to simplify this guide):
protocol KeychainService {
func store<K>(_ value: K, for key: String) where K: Encodable
func load<K>(_ type: K.Type, for key: String) -> K where K: Decodable
}
Given that protocol, we can define our authentication service:
struct MyAuthApi {
private let keychain: KeychainService
init(keychain: KeychainService) {
self.keychain = keychain
}
var accessToken: String {
get {
keychain.load(String.self, for: "access_token")
} set {
keychain.store(newValue, for: "access_token")
}
}
var refreshToken: String {
get {
keychain.load(String.self, for: "refresh_token")
} set {
keychain.store(newValue, for: "refresh_token")
}
}
}
extension MyAuthApi: HttpService {
var apiUrl: String {
"auth.borchero.com"
}
}
Note that this definition of a service is very similar to before - we only added a few properties that are associated with the authentication service.
Defining a Protected API
Using our authentication service, we can define the API which needs to provide access tokens to access protected resources.
All requests scheduled against this API need to provide a valid HTTP Authorization
header, therefore, our API definition can set this automatically:
struct MyProtectedApi {
private let auth: MyAuthApi
init(auth: MyAuthApi) {
self.auth = auth
}
}
extension MyProtectedApi: HttpService {
var apiUrl: String {
"squid.borchero.com"
}
var header: HttpHeader {
[.authorization: "Bearer \(auth.accessToken)"]
}
}
Defining the Retrier
Finally, we want to retry requests scheduled against MyProtectedApi
whenever we receive a 401 HTTP status code as response. Before retrying, however, we need to schedule a request against MyAuthApi
to refresh our token.
Therefore, we first want to define our request for refreshing tokens:
struct TokenRequestResponse: Decodable {
let accessToken: String
let refreshToken: String
}
struct TokenRequest: JsonRequest {
typealias Result = TokenRequestResponse
let refreshToken: String
var method: HttpMethod {
.post
}
var routes: HttpRoute {
["token"]
}
var body: HttpBody {
HttpData.Json(["refresh_token": refreshToken])
}
}
Here, we send the refresh token as JSON object to the server (usually, you would include some more information here) and we expect to receive an access as well as a refresh token.
At this point, it is possible to define our retrier (note that you will need to import Combine
for this):
class AuthorizationRetrier: Retrier {
private let auth: MyAuthApi
private var cancellable: Cancellable?
init(auth: MyAuthApi) {
self.auth = auth
}
func retry<R>(_ request: R, failingWith error: Squid.Error) -> Future<Bool, Never> where R: Request {
return Future { promise in
switch error {
case .requestFailed(statusCode: 401, response: _):
// Here, we want to request a new token.
let request = TokenRequest(refreshToken: self.auth.refreshToken)
// Note that we do not need any synchronization primitives here as this retrier is used by a *single request*
self.cancellable = request.schedule(with: self.auth).sink(receiveCompletion: { completion in
switch completion {
case .finished:
// We don't need to do anything
break
case .failure(_):
// The request failed, we don't need to retry the original request
promise(.success(false))
}
}) { value in
self.auth.accessToken = value.accessToken
self.auth.refreshToken = value.refreshToken
// The request finished successfully, retry the original request
promise(.success(true))
}
default:
// Some other error occurred, we do not want to retry the request
promise(.success(false))
}
}
}
}
Attaching the Retrier to the API
Now that we defined our retrier, we need to attach it to MyProtectedApi
to actually use it for requests scheduled against it. We can easily do this as follows:
extension MyProtectedApi {
var retrierFactory: RetrierFactory {
return AnyRetrierFactory {
return AuthorizationRetrier(auth: self.auth)
}
}
}
We need to provide a factory function here to ensure that a new instance of the retrier is used for each request.
Final Notes
You might think that defining this retrier was a lot of work. However, you probably realized that retriers can be very powerful. Further, all requests that you schedule against MyProtectedApi
can be scheduled equally well against an API that is not protected. That means that you can switch between APIs (e.g. for staging and production) hardly changing any of your code.


advertools.ad_from_string module¶
-
advertools.ad_from_string.
ad_from_string
(s, slots=(30, 30, 80, 15, 15), sep=None, capitalize=False)[source]¶ Convert string s to an ad by splitting it into groups of words. Each group would have a length of at most the allowed length for that slot.
If the total length of s exceeds the total allowed length, all remaining characters would be grouped in the last element of the returned list.
s : a string of characters, with no restrictions on length. slots : an iterable of integers for the maximum lengths for each slot sep : by which character to split s capitalize : whether or not to capitalize each word after grouping. Setting
it as False would leave the input string as is.text ad : a list of strings
>>> ad_from_string('this is a short ad') ... ['This Is A Short Ad', '', '', '', '', '']
>>> ad_from_string('this is a longer ad and would take two of the first slots') ... ['This Is A Longer Ad And Would', 'Take Two Of The First Slots', '', '', '', '']


Add Items In Store
Email Id
Submit
send
Customer Name: -
Customer Email: -
Customer Address: -
Enter Item Details
Item Id
Item Name
Price
Quantity
Total
Total Amount :
Create Receipt
send


| ID | Formula | FW | DSSTox_CID | DSSTox_RID | DSSTox_GSID | DSSTox_FileID_Sort | TS_ChemName | TS_ChemName_Synonyms | TS_CASRN | CASRN_ChemName_Relationship | TS_Description | ChemNote | STRUCTURE_Shown | STRUCTURE_Formula | STRUCTURE_MW | STRUCTURE_ChemType | STRUCTURE_DefinedOrganicForm | STRUCTURE_IUPAC | STRUCTURE_SMILES | STRUCTURE_SMILES_Desalt | Substance_modify_yyyymmdd | |
| 162881-26-7 | 10251 | C26H27O3P | 418.4645 | 24597 | 80340 | 44597 | 5022 | (Phenylphosphoryl)bis[(2,4,6-trimethylphenyl)methanone] | (Phenylphosphoryl)bis[(2,4,6-trimethylphenyl)methanone] (Phosphine oxide, phenylbis(2,4,6-trimethylbenzoyl)-) | 162881-26-7 | primary | single chemical compound | tested chemical | C26H27O3P | 418.4645 | defined organic | parent | (phenylphosphoryl)bis[(2,4,6-trimethylphenyl)methanone] | O=P(C(=O)c1c(C)cc(C)cc1C)(C(=O)c2c(C)cc(C)cc2C)c3ccccc3 | O=P(C(=O)c1c(C)cc(C)cc1C)(C(=O)c2c(C)cc(C)cc2C)c3ccccc3 | 20091116 |


Quantity Breaky
Your Name:
Initial Deposit:
Open Account
Deposit:
Withdrawal:
Calculate
Current Balance:


Docker 101 - Containerizing our first application.
In this post we will learn what Docker is, how to use it, when it is appropiate to use it and we’ll make our first docker container based on a real-world production scenario.
- What is a container?
- What is Docker?
- What containers, and by extension Docker, are not.
- Installing Docker
- Running our very first container, and a look behind the scenes.
- Adding persistent storage.
- Networking.
- A hypothetical real-world production example
- Cleaning the images and temporary files we have created.
- Conclusions.
What is a container?
Containers can be conceptually thought of as an advanced version of chroot or a lighter alternative to virtualization.
A container is an isolated user-level instance of the OS. From the point of view of the applications running inside these instances the container behaves exactly like a real computer, and the application will have access only to the resources that are explicitly assigned to it.
Containers share the running kernel and general system calls of the host OS, which means that it is significantly less demanding than traditional virtualization resource-wise. The downside to this is that you can’t have an application running in a container with a different OS than the host.
Pros and cons of using containers.
Using containers has a few inmediate advantages:
-
We can package applications along with their dependencies, creating a portable version of the app and eliminating the dreaded “but it works on my machine“-scenario. This helps eliminate the proverbial walls between the Operations departament and Development’s.
-
It is significantly lighter than traditional OS virtualization, enabling a higher compute density in the same hardware.
-
Reduced the effort required to maintain the runtime environment, along with its complexity. Since the applications can be treated as an opaque self-contained bundle, the package and the behaviour are the same in testing and in production.
-
Since the infrastructure is declared as code, we benefit from the advantages of IaC: Infrastructure versioning, code as reliable documentation and straightforward deployment of new environments.
Of course, we must mention the disadvantages too:
-
Containers run on top of an additional abstraction layer compared to bare-metal.
-
Containers share the running kernel with the host. A bug/glitch in the running kernel affects all the running containers.
-
Container management is challenging, though tools like Docker Swarm and Google Kubernetes can mitigate this.
-
GUI applications don’t work well. While we can work around this using X11 forwarding, it’s not a straightforward solution.


Identity and Reputation
Self-Sovereign Identity and Reputation
Adapted from The Identity Crisis - By Dr. Christian Lundkvist and Andrew Keys, ConsenSys, 2015
For those of us lucky enough to be in the first world, we have the luxury of claiming our identity because there are centralized organizations or governments that affirm who we say we are through birth certificates, identification numbers, and other means. The blockchain enables a new shift in this space where we can have multiple, decentralized sources attest to our identification while we still maintain control of this data.
In this section we will explore what a self sovereign identity is and the significance of being able to control your identifying information through a blockchain.
Identity
Identity is defined in Merriam’s dictionary as “who someone is”. As the world and technology evolves one can’t help but notice the changes to the notion of who someone is and how this affects their relation to the world. We’ll focus on the problems that affect humans in regards to their identities, dividing the conversation into developed and developing economies.
The Problems
Developing Economies
Notwithstanding the millions of humans on Earth that literally have no identity, the members of the developing world are victimized and hindered without official forms of identification. Cost and inefficient infrastructure make simple transactions like opening a bank account, obtaining credit, renting shelter, or purchasing transportation impossible.
Human trafficking is fueled by the lack of identification whereby humans are unable to prove their age or origin, creating oppressive environments.
Developed Economies
We live in a world where our identity is not commonly possessed by the rightful owner. Mark, Sergey, and Larry have earned an exceptional livelihood selling the attributes of digital identities of members of the developed world. In mainstream products like Facebook, you are the product. You are being sold to marketing companies as a product based upon your interests, locations, and demographics. Moreover, specific attributes of identity have become vulnerable to attack. Countless stories of cyber-theft occurs where social security and financial data are the eventual goal of hackers worldwide.
The Solutions
Developed Economies
In the developed world the solution to having our identities owned and monetized by third parties is to introduce self-sovereign identity. This is a concept where the individual has ultimate control over their identity and is the final arbiter of who can access and use their data and personal information. This is a new concept, in that previous thought around digital identity has always hinged on “identity providers”, which are the entities that own and control our identity. Some discussions on “decentralized identity” have defined “decentralized” as having the option of choosing your identity provider. Self-sovereign identity goes further by having the individual be in control.
Note, with self-sovereign identity the individual still has the option of letting a trusted identity provider manage their identity, so we get the best of both worlds.
What makes self-sovereign identity possible today is the convergence of several technologies: Blockchain technology like Ethereum allows for shared, trusted computation that can fulfill the role played by identity providers today. Distributed data storage systems like Inter Planetary File System (IPFS) have the ability to store data in a more efficient way than a blockchain but still benefit from the security of the blockchain. Finally, modern encryption technologies allow for combining privacy with the public nature of the blockchain.
Developing Economies
In the developing world, digital self-sovereign identity can be a big help to refugees and other disenfranchised people. Digital identities registered and controlled through a blockchain require no central company or organization to maintain, and can survive political and social turmoil so that refugees can retain access to their digital identities even under such difficult conditions.
Furthermore, by using bleeding-edge technologies like Enigma & Hawk, it would even be possible to maintain a biometrics database that can be linked to the identities in privacy-preserving ways. Even without these future technologies policy architectures like those introduced by Vinay Gupta can provide a policy separation between biometrics databases and digital identifiers to implement privacy protection for biometrics.
Implementations
We at ConsenSys have already started building the next generation of digital identity systems, built using the Ethereum blockchain and IPFS. Our uPort digital identity platform is used as a basis for digital identity based on AML/KYC (Anti-Money Laundering/Know Your Customer) protocols for our derivatives prototype, the Ethereum Total Return Swap (eTRS), the EtherLoan P2P-lending platform, the Inflekt Events management platform, educational credential issuance through Ethense, and a threaded-discussions platform.
We are currently working on the designs and implementation of our Selective Disclosure features, where the user can encrypt the attributes associated to their identity and selectively choose which other identities they wish to share those attributes with. This is crucial in digital identity systems for governments and banks where the data attributes can be very personal and sensitive.
An Example
Let’s explore a use case that many individuals experience. You go to a restaurant and attempt to purchase a beer. The waiter or server asks to see your identification in order to confirm you are the correct age to purchase a beer in the jurisdiction you are in. Currently, this entails providing the server or wait staff with a copy of a state or national identity card, that oftentimes has much more information displayed on it than you would like to share with the wait staff - for example, your home address, height, weight, eye color, and more. You have to trust that the wait staff will not take down this information or use it in any way that could bring harm to you. With self-sovereign identity, you would only have to provide confirmation that you are the appropriate age, not even what age you are. Scanning a QR code on your phone, the wait staff would be given a simple Yes or No to whether they can serve you that beer.
Expanding upon that Example
Centralized repositories of information are similar to our example of trying to purchase that drink, just at a larger scale. Instead of just checking the age, oftentimes an organization will store information about the user, and often more information than was needed to give access to a certain benefit or service. Centralized repositories also carry risk for the users and the organization maintaining the central database - if it is hacked and data gets in the hands of those who would exploit it, the individuals whose data was stored in that database incur a major cost and the business or organization maintaining the central repository is often legally liable and will suffer consequences from users reluctant to trust them. In order to prevent this, the organization often have to invest in preventative measures, which raises costs for their users either directly or indirectly. Wouldn’t it be better if no one had to take on that level of risk?


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 2
Dietary
Preheat the oven to 200C/400F/Gas 6.
For the goats' cheese and shallot tarte tatin, heat two small ovenproof blini pans until hot. Divide the butter and caster sugar between the two pans and heat until the sugar and butter have melted and the mixture has started to caramelise and turn golden-brown.
Place a sprig of thyme in each pan and add the shallots to the two pans.
Cook for 3-4 minutes until the shallots are just beginning to turn brown.
Meanwhile, place the pre-rolled pastry onto a clean, floured surface and crumble the soft goats' cheese over half of the pastry.
Fold the pastry in half to cover the goats' cheese and roll out to 5mm/¼in thick again.
Using a sharp knife, cut out two circles of pastry so they are slightly larger than the circumference of the blini pans.
Cover each pan with a pastry round and tuck the edges inside the pan and around the shallots.
Transfer to the oven and bake for 15-20 minutes, until the pastry is golden-brown and cooked through. Remove and allow to cool slightly.
For the salad, place the honey and oils into a small bowl and whisk to combine. Add the lemon juice and season with salt and freshly ground black pepper. Arrange the micro cress or mustard cress and lamb's lettuce in a large bowl and add the dressing to the salad leaves, reserving some for later. Mix well.
To finish the tarte tatin, preheat the grill to high. Slice the firm goats' cheese in half, place on a grill tray and cook under the grill for two minutes until golden-brown.
To serve, turn each tarte tatin out of its blini pan onto the centre of a serving plate, pastry-side-down - take care as it will be very hot. Top with the grilled firm goats' cheese and a small handful of dressed salad. Spoon the remaining dressing around the edge of each plate.


{{< layout}} {{$pageTitle}}Are you a British Citizen?{{/pageTitle}} {{$header}}
Check your nationality on the photo page of your passport.


Ashi Garami Forward Sweep
From Ashi Garami with opponent kneeling, knee pushing up and ankle pressing down, lock the elbow into ops foot, collar grip with other hand,
pushing into neck with knuckles, dig your hand inside the foot and get the foot up onto your bicep, grab the calf or pant to maintain position,
swap the outside foot to the inside pushing up into the bikini line / groin / top of leg on the inside, push opponent away using your feet,
this pulls you up into a sitting position.
Now you can sweep forward or go with technical standup sweep backwards
Forwards, the hand gripping the pants can move to a sleeve if opponent grabs lapel and moves forward to counter the foot lock option.
With opponents forward momentum just keep moving them over your head, feet and arms assist in propelling them onto their back, then come up,
into knee ride, or 1/4 guard, or mount, or open guard with a leg and arm ready to pass.
Technical Standup,push opponent away a bit more with your feet, arm holding lapel releases grip and goes to ground proping, groin leg moves to ground,
hooking leg then moves back as per technical standup and to ground, now stand while still holding leg and bump them onto back in open guard.


| Module | ActionController::TemplateAssertions |
| In: |
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_controller/test_case.rb
|
Asserts that the request was rendered with the appropriate template file or partials
# assert that the "new" view template was rendered assert_template "new" # assert that the "_customer" partial was rendered twice assert_template :partial => '_customer', :count => 2 # assert that no partials were rendered assert_template :partial => false
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_controller/test_case.rb, line 56 56: def assert_template(options = {}, message = nil) 57: validate_request! 58: 59: case options 60: when NilClass, String, Symbol 61: options = options.to_s if Symbol === options 62: rendered = @templates 63: msg = build_message(message, 64: "expecting <?> but rendering with <?>", 65: options, rendered.keys.join(', ')) 66: assert_block(msg) do 67: if options.nil? 68: @templates.blank? 69: else 70: rendered.any? { |t,num| t.match(options) } 71: end 72: end 73: when Hash 74: if expected_partial = options[:partial] 75: if expected_count = options[:count] 76: actual_count = @partials[expected_partial] 77: # actual_count = found.nil? ? 0 : found[1] 78: msg = build_message(message, 79: "expecting ? to be rendered ? time(s) but rendered ? time(s)", 80: expected_partial, expected_count, actual_count) 81: assert(actual_count == expected_count.to_i, msg) 82: elsif options.key?(:layout) 83: msg = build_message(message, 84: "expecting layout <?> but action rendered <?>", 85: expected_layout, @layouts.keys) 86: 87: case layout = options[:layout] 88: when String 89: assert(@layouts.include?(expected_layout), msg) 90: when Regexp 91<EMAIL_ADDRESS>{|l| l =~ layout }, msg) 92: when nil 93: assert(@layouts.empty?, msg) 94: end 95: else 96: msg = build_message(message, 97: "expecting partial <?> but action rendered <?>", 98: options[:partial], @partials.keys) 99: assert(@partials.include?(expected_partial), msg) 100: end 101: else 102: assert @partials.empty?, 103: "Expected no partials to be rendered" 104: end 105: end 106: end
# File /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_controller/test_case.rb, line 14 14: def setup_subscriptions 15: @partials = Hash.new(0) 16: @templates = Hash.new(0) 17: @layouts = Hash.new(0) 18: 19: ActiveSupport::Notifications.subscribe("render_template.action_view") do |name, start, finish, id, payload| 20: path = payload[:layout] 21: @layouts[path] += 1 22: end 23: 24: ActiveSupport::Notifications.subscribe("!render_template.action_view") do |name, start, finish, id, payload| 25: path = payload[:virtual_path] 26: next unless path 27: partial = path =~ /^.*\/_[^\/]*$/ 28: if partial 29: @partials[path] += 1 30: @partials[path.split("/").last] += 1 31: @templates[path] += 1 32: else 33: @templates[path] += 1 34: end 35: end 36: end


Home
Add new entry
Course
Student
Trainer
Assignment
View entry
Courses
Students
Trainers
Assignments
Select a trainer
John Wick, Java Full Time
Trainer 1
Select course/s to assign to (hold ctrl for multiple & deselect):
Java Full Time
Java Part Time
C# Full Time
C# Part Time
Chuck Johnson, Java Part Time
Trainer 2
Select course/s to assign to (hold ctrl for multiple & deselect):
Java Full Time
Java Part Time
C# Full Time
C# Part Time
Ricardo Agueres, Java Part Time, C# Full Time
Trainer 3
Select course/s to assign to (hold ctrl for multiple & deselect):
Java Full Time
Java Part Time
C# Full Time
C# Part Time
Harry Ford, C# Full Time
Trainer 4
Select course/s to assign to (hold ctrl for multiple & deselect):
Java Full Time
Java Part Time
C# Full Time
C# Part Time
Helen Solomon, C# Part Time
Trainer 5
Select course/s to assign to (hold ctrl for multiple & deselect):
Java Full Time
Java Part Time
C# Full Time
C# Part Time
Next page