|
MinimalHttp.Net
2.0.0
|
Provides methods to send http requests. More...
Public Member Functions | |
| HttpClient () | |
| Initializes a new HttpClient with its default values. More... | |
| HttpClient | Clone () |
| Clones all properties and initializes a new HttpClient using them. More... | |
| HttpResponse | Get (string url) |
| Executes a http GET request using the given parameters. More... | |
| HttpResponse | Get (string url, params HttpParameter[] parameters) |
| Executes a http GET request using the given parameters. More... | |
| Task< HttpResponse > | GetAsync (string url) |
| Executes an async http GET request using the given parameters. More... | |
| Task< HttpResponse > | GetAsync (string url, params HttpParameter[] parameters) |
| Executes an async http GET request using the given parameters. More... | |
| HttpResponse | Head (string url) |
| Executes a http HEAD request using the given parameters. More... | |
| HttpResponse | Head (string url, params HttpParameter[] parameters) |
| Executes a http HEAD request using the given parameters. More... | |
| Task< HttpResponse > | HeadAsync (string url) |
| Executes an async http HEAD request using the given parameters. More... | |
| Task< HttpResponse > | HeadAsync (string url, params HttpParameter[] parameters) |
| Executes an async http HEAD request using the given parameters. More... | |
| HttpResponse | Post (string url, byte[] data, string contentType="application/octet-stream") |
| Executes a http POST requests using the given parameters. More... | |
| HttpResponse | Post (string url, string data, string contentType="text/plain") |
| Executes a http POST requests using the given parameters. More... | |
| HttpResponse | Post (string url, HttpParameter[] parameters, string contentType="text/plain") |
| Executes a http POST requests using the given parameters. More... | |
| Task< HttpResponse > | PostAsync (string url, byte[] data, string contentType="application/octet-stream") |
| Executes an async http POST requests using the given parameters. More... | |
| Task< HttpResponse > | PostAsync (string url, string data, string contentType="text/plain") |
| Executes an async http POST requests using the given parameters. More... | |
| Task< HttpResponse > | PostAsync (string url, HttpParameter[] parameters, string contentType="text/plain") |
| Executes an async http POST requests using the given parameters. More... | |
| HttpResponse | Put (string url, byte[] data, string contentType="application/octet-stream") |
| Executes a http PUT requests using the given parameters. More... | |
| HttpResponse | Put (string url, string data, string contentType="text/plain") |
| Executes a http PUT requests using the given parameters. More... | |
| HttpResponse | Put (string url, HttpParameter[] parameters, string contentType="text/plain") |
| Executes a http PUT requests using the given parameters. More... | |
| Task< HttpResponse > | PutAsync (string url, byte[] data, string contentType="application/octet-stream") |
| Executes an async http PUT requests using the given parameters. More... | |
| Task< HttpResponse > | PutAsync (string url, string data, string contentType="text/plain") |
| Executes an async http PUT requests using the given parameters. More... | |
| Task< HttpResponse > | PutAsync (string url, HttpParameter[] parameters, string contentType="text/plain") |
| Executes an async http PUT requests using the given parameters. More... | |
| HttpResponse | Delete (string url) |
| Executes a http DELETE request using the given parameters. More... | |
| HttpResponse | Delete (string url, params HttpParameter[] parameters) |
| Executes a http DELETE request using the given parameters. More... | |
| Task< HttpResponse > | DeleteAsync (string url) |
| Executes an async http DELETE request using the given parameters. More... | |
| Task< HttpResponse > | DeleteAsync (string url, params HttpParameter[] parameters) |
| Executes an async http DELETE request using the given parameters. More... | |
| HttpResponse | Options (string url) |
| Executes a http OPTIONS request using the given parameters. More... | |
| HttpResponse | Options (string url, params HttpParameter[] parameters) |
| Executes a http OPTIONS request using the given parameters. More... | |
| Task< HttpResponse > | OptionsAsync (string url) |
| Executes an async http OPTIONS request using the given parameters. More... | |
| Task< HttpResponse > | OptionsAsync (string url, params HttpParameter[] parameters) |
| Executes an async http OPTIONS request using the given parameters. More... | |
| HttpResponse | Trace (string url) |
| Executes a http TRACE request using the given parameters. More... | |
| HttpResponse | Trace (string url, params HttpParameter[] parameters) |
| Executes a http TRACE request using the given parameters. More... | |
| Task< HttpResponse > | TraceAsync (string url) |
| Executes an async http TRACE request using the given parameters. More... | |
| Task< HttpResponse > | TraceAsync (string url, params HttpParameter[] parameters) |
| Executes an async http TRACE request using the given parameters. More... | |
| HttpResponse | Patch (string url, byte[] data, string contentType="application/octet-stream") |
| Executes a http PATCH requests using the given parameters. More... | |
| HttpResponse | Patch (string url, string data, string contentType="text/plain") |
| Executes a http PATCH requests using the given parameters. More... | |
| HttpResponse | Patch (string url, HttpParameter[] parameters, string contentType="text/plain") |
| Executes a http PATCH requests using the given parameters. More... | |
| Task< HttpResponse > | PatchAsync (string url, byte[] data, string contentType="application/octet-stream") |
| Executes an async http PATCH requests using the given parameters. More... | |
| Task< HttpResponse > | PatchAsync (string url, string data, string contentType="text/plain") |
| Executes an async http PATCH requests using the given parameters. More... | |
| Task< HttpResponse > | PatchAsync (string url, HttpParameter[] parameters, string contentType="text/plain") |
| Executes an async http PATCH requests using the given parameters. More... | |
| HttpResponse | Send (RequestMethod method, string url, byte[] data=null, string contentType="application/octet-stream") |
| Sends a http request using the given method and data to the resource url. More... | |
| Task< HttpResponse > | SendAsync (RequestMethod method, string url, byte[] data=null, string contentType="application/octet-stream") |
| Sends an async http request using the given method and data to the resource url. More... | |
Public Attributes | |
| bool | HasHeaders => Headers.Count != 0 |
| Gets a Boolean indicating whether this HttpClient has any HttpHeaders. More... | |
| bool | HasCookies => Cookies != null && Cookies.Count != 0 |
| Gets a Boolean indicating whether this HttpClient has any Cookies. More... | |
| bool | HasProxy => Proxy != null && Proxy.HasProxy |
| Gets a Boolean indicating whether this HttpClient is using a HttpProxy. More... | |
Properties | |
| bool | ClearReferer [get, set] |
| Gets or sets a Boolean determining whether the next request should clear the previous Referer. More... | |
| bool | DisableCaching [get, set] |
| Gets or sets a Boolean determining whether to disable response caching. More... | |
| bool | FollowRedirects [get, set] |
| Gets or sets a Boolean determining whether to automatically follow http redirects. More... | |
| bool | KeepAlive [get, set] |
| Gets or sets a Boolean determining whether the http client should be kept alive. More... | |
| bool | AllowInvalidCertificates [get, set] |
| Gets or sets a Boolean determining whether to allow invalid or expired certificates. More... | |
| bool | IsMultiThreaded [get, set] |
| Gets or sets a Boolean determining whether access to critical properties need to be thread safe. More... | |
| int | Timeout [get, set] |
| Gets or sets a value determining the request and response timeout in ms. More... | |
| string | Host [get, set] |
| Gets or sets a value determining the host all requests get send to. More... | |
| string | Location [get] |
| Gets or sets a value determining the current location url of this HttpClient. More... | |
| string | UserAgent [get, set] |
| Gets or sets a value determining the user agent string used in http requests. More... | |
| string | Referer [get, set] |
| Gets or sets a value determining the referer string used in the next http request. More... | |
| HttpProxy | Proxy [get, set] |
| Gets or sets a HttpProxy which can be null or empty if none should be used. More... | |
| Encoding | Encoding [get, set] |
| Gets or sets a value determining how request and response string data is encoded. More... | |
| List< HttpHeader > | Headers [get] |
| Gets a List containing all http headers to be send with the next http request. More... | |
| CookieCollection | Cookies [get] |
| Gets a CookieCollection containing all cookies to be send with the next http request. More... | |
| CertificateValidation | CertificateValidationCallback [get, set] |
| Gets or sets a CertificateValidation callback method to be used with all following requests. More... | |
Provides methods to send http requests.
| MinimalHttp.HttpClient.HttpClient | ( | ) |
Initializes a new HttpClient with its default values.
| HttpClient MinimalHttp.HttpClient.Clone | ( | ) |
Clones all properties and initializes a new HttpClient using them.
| HttpResponse MinimalHttp.HttpClient.Delete | ( | string | url | ) |
Executes a http DELETE request using the given parameters.
| url | The URL string of the web resource. |
| HttpResponse MinimalHttp.HttpClient.Delete | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes a http DELETE request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| Task<HttpResponse> MinimalHttp.HttpClient.DeleteAsync | ( | string | url | ) |
Executes an async http DELETE request using the given parameters.
| url | The URL string of the web resource. |
| Task<HttpResponse> MinimalHttp.HttpClient.DeleteAsync | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes an async http DELETE request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| HttpResponse MinimalHttp.HttpClient.Get | ( | string | url | ) |
Executes a http GET request using the given parameters.
| url | The URL string of the web resource. |
| HttpResponse MinimalHttp.HttpClient.Get | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes a http GET request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| Task<HttpResponse> MinimalHttp.HttpClient.GetAsync | ( | string | url | ) |
Executes an async http GET request using the given parameters.
| url | The URL string of the web resource. |
| Task<HttpResponse> MinimalHttp.HttpClient.GetAsync | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes an async http GET request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| HttpResponse MinimalHttp.HttpClient.Head | ( | string | url | ) |
Executes a http HEAD request using the given parameters.
| url | The URL string of the web resource. |
| HttpResponse MinimalHttp.HttpClient.Head | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes a http HEAD request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| Task<HttpResponse> MinimalHttp.HttpClient.HeadAsync | ( | string | url | ) |
Executes an async http HEAD request using the given parameters.
| url | The URL string of the web resource. |
| Task<HttpResponse> MinimalHttp.HttpClient.HeadAsync | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes an async http HEAD request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| HttpResponse MinimalHttp.HttpClient.Options | ( | string | url | ) |
Executes a http OPTIONS request using the given parameters.
| url | The URL string of the web resource. |
| HttpResponse MinimalHttp.HttpClient.Options | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes a http OPTIONS request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| Task<HttpResponse> MinimalHttp.HttpClient.OptionsAsync | ( | string | url | ) |
Executes an async http OPTIONS request using the given parameters.
| url | The URL string of the web resource. |
| Task<HttpResponse> MinimalHttp.HttpClient.OptionsAsync | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes an async http OPTIONS request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| HttpResponse MinimalHttp.HttpClient.Patch | ( | string | url, |
| byte [] | data, | ||
| string | contentType = "application/octet-stream" |
||
| ) |
Executes a http PATCH requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Patch | ( | string | url, |
| string | data, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes a http PATCH requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Patch | ( | string | url, |
| HttpParameter [] | parameters, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes a http PATCH requests using the given parameters.
| url | The URL string of the web resource. |
| parameters | The http parameters which should be sent with this request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PatchAsync | ( | string | url, |
| byte [] | data, | ||
| string | contentType = "application/octet-stream" |
||
| ) |
Executes an async http PATCH requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PatchAsync | ( | string | url, |
| string | data, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes an async http PATCH requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PatchAsync | ( | string | url, |
| HttpParameter [] | parameters, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes an async http PATCH requests using the given parameters.
| url | The URL string of the web resource. |
| parameters | The http parameters which should be sent with this request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Post | ( | string | url, |
| byte [] | data, | ||
| string | contentType = "application/octet-stream" |
||
| ) |
Executes a http POST requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Post | ( | string | url, |
| string | data, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes a http POST requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Post | ( | string | url, |
| HttpParameter [] | parameters, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes a http POST requests using the given parameters.
| url | The URL string of the web resource. |
| parameters | The http parameters which should be sent with this request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PostAsync | ( | string | url, |
| byte [] | data, | ||
| string | contentType = "application/octet-stream" |
||
| ) |
Executes an async http POST requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PostAsync | ( | string | url, |
| string | data, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes an async http POST requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PostAsync | ( | string | url, |
| HttpParameter [] | parameters, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes an async http POST requests using the given parameters.
| url | The URL string of the web resource. |
| parameters | The http parameters which should be sent with this request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Put | ( | string | url, |
| byte [] | data, | ||
| string | contentType = "application/octet-stream" |
||
| ) |
Executes a http PUT requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Put | ( | string | url, |
| string | data, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes a http PUT requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Put | ( | string | url, |
| HttpParameter [] | parameters, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes a http PUT requests using the given parameters.
| url | The URL string of the web resource. |
| parameters | The http parameters which should be sent with this request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PutAsync | ( | string | url, |
| byte [] | data, | ||
| string | contentType = "application/octet-stream" |
||
| ) |
Executes an async http PUT requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PutAsync | ( | string | url, |
| string | data, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes an async http PUT requests using the given parameters.
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.PutAsync | ( | string | url, |
| HttpParameter [] | parameters, | ||
| string | contentType = "text/plain" |
||
| ) |
Executes an async http PUT requests using the given parameters.
| url | The URL string of the web resource. |
| parameters | The http parameters which should be sent with this request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Send | ( | RequestMethod | method, |
| string | url, | ||
| byte [] | data = null , |
||
| string | contentType = "application/octet-stream" |
||
| ) |
Sends a http request using the given method and data to the resource url.
| method | The RequestMethod to use with this request. |
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| Task<HttpResponse> MinimalHttp.HttpClient.SendAsync | ( | RequestMethod | method, |
| string | url, | ||
| byte [] | data = null , |
||
| string | contentType = "application/octet-stream" |
||
| ) |
Sends an async http request using the given method and data to the resource url.
| method | The RequestMethod to use with this request. |
| url | The URL string of the web resource. |
| data | The data to be send with the request. |
| contentType | The mime type of the data sent with the request. |
| HttpResponse MinimalHttp.HttpClient.Trace | ( | string | url | ) |
Executes a http TRACE request using the given parameters.
| url | The URL string of the web resource. |
| HttpResponse MinimalHttp.HttpClient.Trace | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes a http TRACE request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| Task<HttpResponse> MinimalHttp.HttpClient.TraceAsync | ( | string | url | ) |
Executes an async http TRACE request using the given parameters.
| url | The URL string of the web resource. |
| Task<HttpResponse> MinimalHttp.HttpClient.TraceAsync | ( | string | url, |
| params HttpParameter [] | parameters | ||
| ) |
Executes an async http TRACE request using the given parameters.
| url | The URL string of the web resource. |
| parameters | A HttpParameter[] used to append a query string to the URL. |
| bool MinimalHttp.HttpClient.HasCookies => Cookies != null && Cookies.Count != 0 |
Gets a Boolean indicating whether this HttpClient has any Cookies.
| bool MinimalHttp.HttpClient.HasHeaders => Headers.Count != 0 |
Gets a Boolean indicating whether this HttpClient has any HttpHeaders.
| bool MinimalHttp.HttpClient.HasProxy => Proxy != null && Proxy.HasProxy |
Gets a Boolean indicating whether this HttpClient is using a HttpProxy.
|
getset |
Gets or sets a Boolean determining whether to allow invalid or expired certificates.
|
getset |
Gets or sets a CertificateValidation callback method to be used with all following requests.
|
getset |
Gets or sets a Boolean determining whether the next request should clear the previous Referer.
|
get |
Gets a CookieCollection containing all cookies to be send with the next http request.
|
getset |
Gets or sets a Boolean determining whether to disable response caching.
|
getset |
Gets or sets a value determining how request and response string data is encoded.
|
getset |
Gets or sets a Boolean determining whether to automatically follow http redirects.
|
get |
Gets a List containing all http headers to be send with the next http request.
|
getset |
Gets or sets a value determining the host all requests get send to.
|
getset |
Gets or sets a Boolean determining whether access to critical properties need to be thread safe.
|
getset |
Gets or sets a Boolean determining whether the http client should be kept alive.
|
get |
Gets or sets a value determining the current location url of this HttpClient.
|
getset |
Gets or sets a HttpProxy which can be null or empty if none should be used.
|
getset |
Gets or sets a value determining the referer string used in the next http request.
|
getset |
Gets or sets a value determining the request and response timeout in ms.
|
getset |
Gets or sets a value determining the user agent string used in http requests.


|
|
|
❧ ❧ ❧
|
|
When I was a kid, everyone in my family read Carolyn Hax’s advice column in the Washington Post. We delighted in reading aloud the scrapes that people got themselves into and then discussing Carolyn’s sassy tough-love replies. In my family, unsolicited advice flows between us like water, by turns bringing us together or pushing us apart. So channeling that energy harmlessly into strangers in the paper was an excellent pastime. Heartfelt, nuanced replies from Carolyn were interesting to discuss, but our favorites were the barbed take-downs of askers who were clearly way off track.
The joy of advice columns is the chance to eavesdrop on the juiciest kind of cafe conversation, in which a wretch in the midst of some dramatic quagmire lays their woes at the feet of a trusted friend, who then after a considered pause offers their perspective on the particular sticky facet of the human experience at hand. In listening in, I get to first see through the eyes of the wretch, imagining what I would do in their place, patting myself on the back for never getting myself into the mess they’re in or feeling a warmth of kinship and sympathy if I’ve had a similar experience. Then I pause before reading the answer to puzzle through their problems and consider my own advice. Finally I listen to the trusted friend to hear their take, nodding with satisfaction when they say what I was thinking, pondering when they offer a perspective I had never considered, and throwing my hands up in disbelief when I totally disagree with their advice.
Advice columns remind me, over and over, that there are just so many ways to be a person. When I was a kid reading Carolyn Hax with my family, I got the impression that there was one right way to live your life. This is seemingly the premise of advice columns as a genre: the asker is living their life wrong, and the authoritative advisor steers them back on course. I was eager to learn to rules of adulthood, and I tried to file Carolyn’s advice away so I would know the correct course of action in case I ever found myself a confidant to my best friend’s cheating husband.
But of course there is no One True Answer. We’re all bumbling along together, doing our best not to hurt each other and ourselves. Now I see advice columns as opportunities to pop into other people’s lives, both the askers and the answerers, to try on all these other dilemmas and solutions and confusions and joys. I know of few mediums better suited to displaying the multitudinousness and universality of the human experience. We are all so different. We are all so much the same.
|
|
❧ ❧ ❧
|
My Favorite Advice Columns
- Tiny Beautiful Things by Cheryl Strayed. This collection from the Dear Sugar column in The Rumpus is breathtaking and profound. It’s so sincere that it edges toward saccharine, but always stays rooted in practicality and humanity. I read it while recovering from heartbreak and it was very cathartic and also led to a lot of public crying.
- Hola Papi by John Paul Brammer. A hilarious and compassionate advice newsletter that primarily answers relationship questions, with discussions of race and sexuality woven throughout. I love the writing and the perspective; I think about the jokes from this latino fetish column probably once a week (“Three c’s? In esta economía?”).
- The Bent. Far and away the best career advice I’ve read. It’s smart, insightful, realistic, humane … everything you want in a boss. The advice is aimed at managers, but as an underling I still find something useful in every edition, and more than once I’ve shared it with my team to start conversations about things we could be doing better.
- Friendshipping. This podcast always makes me feel better, no matter what mood I’m in. The premise is that friendships can be just as important and labor-intensive as romantic and familial relationships, but we have none of the same narratives and resources to understand how to navigate them, so we need advice. Plus banter. Jenn and Trin are hilarious charming and also offer great perspectives on the friendship quandaries of their listeners. Plus, they’re based in Chicago and I hear through friends that they’re just as delightful in person.
- My Brother, My Brother and Me. Okay, I’m including this one because I love it but it is an advice podcast in name only. Three brothers read questions from the audience or Yahoo Answers and then goof about them until they get bored. It’s deeply absurd and very funny; part of what grounds it and makes it good is that the boys seems like genuinely kind and thoughtful people, and they try hard to bring that into their humor.
|
Project of the week: Lemon seedlings
I put lemon seeds in dirt and now I have tiny adorable lemon seedlings. This feels like magic!! It is absolutely wild to watch these guys grow. I haven’t grown something from seed since the lima bean experiment in second grade and wow it is extremely fun. And not hard! I found this video series very helpful. I joke that plants are my only friends now, but I do think there’s something truly special and healing about surrounding myself with living, growing beings while I’m alone in lockdown. I have a lot of Thoughts about our instinctual need for non-human community but instead I will just say: lemon seedlings are unbelievably cute.
|
|
“This video of old Hollywood movie bloopers from the 40s is kind of like a live action version of black and white photo colorization. The mouths on these glamorous actresses are oddly refreshing. Fun to hear them swear at their bracelets. Humanizing af, as the kids are saying.” — Shaye Jones
I’ve watched this probably ten times and I’m going to watch it again in a second. It’s so charming and surreal!
|
|
❧ ❧ ❧
|
|
I have also, it should be said, always dreamed of writing an advice column of my own. If you are in need of a recommendation in any arena, reply to this email and maybe this will be my chance at glory!
Subscribe, unsubscribe, or learn more on the website.
This edition of May I Recommend was written with the windows open to let in the evening summer breeze in Chicago, Illinois.
|
|
|


Bases
Hextrapolate provides fields for entering numbers in binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16).
In addition, it provides two adjustable fields for selecting any base from base 2 through to base 36.
Beyond base 10, each subsequent base is created by adding one more letter from the roman alphabet to the set of allowed digits. To illustrate:
- At base 16, digits 0 through 9 and letters a through f are allowed.
- Base 17 adds g to the set of allowed digits.
- By the time we reach base 36, digits 0 through 9 and letters a through z are allowed.
If we were to introduce a distinction between lower and uppercase letters we could go even further, as far as base 62, but for the time being Hextrapolate stops at base 36.
Keyboard navigation and tool-tips
As shown in the screenshot above, keyboard shortcuts are provided for quickly switching between bases. Tool-tips are shown to indicate the alternative names for some of the common bases.


House of Fraser slammed after fur appears back on the shelves
A high street store has been slated for apparently overturning its ban on animal fur.
House of Fraser appears to have started to sell fur products again, despite saying in 2017 that it had a ‘strict no-fur policy’.
The store – which was taken over by Sports Direct CEO Mike Ashley last year – attracted widespread criticism after garments were found lined with rabbit fur on shelves.
Animal charities have slammed the revelations, which also include reports of a hats with ‘100% racoon fur’ available on the company website. The item appears to have since been removed.
People for the Ethical Treatment of Animals Director Elisa Allen told Metro.co.uk: ‘Has House of Fraser’s new owner lost his mind, or does he just not mind losing customers?
‘At a time when designers, retailers, entire councils, and high-profile individuals – including Her Majesty the Queen – are turning their backs on real animal fur, the company’s decision to start hawking it is both shameful and perplexing.
Advertisement Advertisement
‘Today’s shoppers wouldn’t be seen dead in the skins of animals. 95% per cent of the British public refuses to wear animal fur, and PETA urges House of Fraser to come to its senses, do the decent thing, and reinstate its no-fur policy immediately.’
Dominic Dyer, CEO of the Badger Trust, labelled the move ‘exploitation and cruelty for profit’, while other animal charity added to the chorus of condemnation.
Earlier this year, it was revealed that the Queen has switched to fake fur.
House of Fraser have been involved in controversy surrounding fur before.
In 2017, an investigation found items marked as fake fur in the store were actually made with real fur.
The company apologised and a spokesperson told HuffPost UK: ‘House of Fraser has a strict no-fur policy and we ensure all of our suppliers and brand partners are aware of this.’
Sports Direct Ltd, which owns House of Fraser, have not responded to multiple requests for comment.
Got a story for Metro.co.uk?
Get in touch with our news team by emailing us at<EMAIL_ADDRESS>For more stories like this, check our news page.


Welcome, {{ user.username }}!
Track
{% if user.username == 'km8ac' %}
Site analytics
| Object | Count | Cost | Value | Profit |
|---|---|---|---|---|
| Users | {{ users }} users | $0 | $400 | $400 |
| Revenue | 0 transactions | $10 | $10 | $0 |
| Projects | {{ projects }} projects | $100 | $100 | $0 |
| Playlists | {{ playlists }} playlists | $15 | $30 | $15 |
| Products | {{ products }} products | $100 | $200 | $100 |
| News Posts | {{ posts }} posts | $10 | $25 | $15 |
| Highlights | {{ highlights }} highlights | $200 | $200 | $200 |
Not km8ac...
{% endif %}


This file describes the documentation style used in all documentation found in Open vSwitch. Documentation includes any documents found in Documentation along with any README, INSTALL, or generally rst suffixed documents found in the project tree.
reStructuredText (reST) is the syntax, while Sphinx is a documentation generator. Sphinx introduces a number of extensions to reST, like the :ref: role, which can and should be used in documentation, but these will not work correctly on GitHub. As such, these extensions should not be used in any documentation in the root level, such as the README.
Many of the basic documentation guidelines match those of the coding style guide.
Use reStructuredText (reST) for all documentation.
Sphinx extensions can be used, but only for documentation in the Documentation folder.
Limit lines at 79 characters.
Note
An exception to this rule is text within code-block elements that cannot be wrapped and links within references.
Use spaces for indenation.
Match indentation levels.
A change in indentation level usually signifies a change in content nesting, by either closing the existing level or introducing a new level.
Avoid trailing spaces on lines.
Include a license (see this file) in all docs.
Most importantly, always build and display documentation before submitting changes! Docs aren't unit testable, so visible inspection is necessary.
Use hyphens as space delimiters. For example: my-readme-document.rst
Use lowercase filenames.
Note
An exception to this rule is any documents found in the root-level of the project.
Use the following headers levels.
Note
Avoid using lower heading levels by rewriting and reorganizing the information.
Under- and overlines should be of the same length as that of the heading text.
Use "title case" for headers.
Use admonitions to call attention to important information.:
.. note:: This is a sample callout for some useful tip or trick.
Example admonitions include: warning, important, note, tip or seealso.
Use notes sparingly. Avoid having more than one per subsection.
.. table:: OVS-Linux kernel compatibility ============ ============== Open vSwitch Linux kernel ============ ============== 1.4.x 2.6.18 to 3.2 1.5.x 2.6.18 to 3.2 1.6.x 2.6.18 to 3.2 ============ ==============
.. table:: OVS-Linux kernel compatibility +--------------+---------------+ | Open vSwitch | Linux kernel | +==============+===============+ | 1.4.x | 2.6.18 to 3.2 | +--------------+---------------+ | 1.5.x | 2.6.18 to 3.2 | +--------------+---------------+ | 1.6.x | 2.6.18 to 3.2 | +--------------+---------------+
Note
The table role - .. table:: <name> - can be safely omitted.
.. list-table:: OVS-Linux kernel compatibility :widths: 10 15 :header-rows: 1 * - Open vSwitch - Linux kernel * - 1.4.x - 2.6.18 to 3.2 * - 1.5.x - 2.6.18 to 3.2 * - 1.6.x - 2.6.18 to 3.2
.. csv-table:: OVS-Linux kernel compatibility :header: Open vSwitch, Linux kernel :widths: 10 15 1.4.x, 2.6.18 to 3.2 1.5.x, 2.6.18 to 3.2 1.6.x, 2.6.18 to 3.2
To link to an external file or document, include as a link.:
Here's a `link <http://openvswitch.org>`__ to the Open vSwitch website. Here's a `link`_ in reference style. .. _link: http://openvswitch.org
You can also use citations.:
Refer to the Open vSwitch documentation [1]_. References ---------- .. [1]: http://openvswitch.org
To cross-reference another doc, use the doc role.:
Here is a link to the :doc:`/README.rst`
Note
This is a Sphinx extension. Do not use this in any top-level documents.
To cross-reference an arbitrary location in a doc, use the ref role.:
.. _sample-crossref Title ~~~~~ Hello, world. Another Title ~~~~~~~~~~~~~ Here is a cross-reference to :ref:`sample-crossref`.
Note
This is a Sphinx extension. Do not use this in any top-level documents.
Comments are indicated by means of the .. marker.:
.. TODO(stephenfin) This section needs some work. This TODO will not appear in the final generated document, however.
Follow these guidelines to ensure readability and consistency of the Open vSwitch documentation. These guidelines are based on the IBM Style Guide.
Use standard US English
Use a spelling and grammar checking tool as necessary.
Expand initialisms and acronyms on first usage.
Commonly used terms like CPU or RAM are allowed.
| Do not use | Do use |
|---|---|
| OVS is a virtual switch. OVS has... | Open vSwitch (OVS) is a virtual switch. OVS has... |
| The VTEP emulator is... | The Virtual Tunnel Endpoint (VTEP) emulator is... |
Write in the active voice
The subject should do the verb's action, rather than be acted upon.
| Do not use | Do use |
|---|---|
| A bridge is created by you | Create a bridge |
Write in the present tense
| Do not use | Do use |
|---|---|
| Once the bridge is created, you can create a port | Once the bridge is created, create a port |
Write in second person
| Do not use | Do use |
|---|---|
| To create a bridge, the user runs: | To create a bridge, run: |
Keep sentences short and consise
Eliminate needless politeness
Avoid "please" and "thank you"


Developer Webinars
The NVIDIA developer zone
has developer training webinars to get you started quickly. For development with
Tegra, take a look at the following ones:
- Tegra debugging width NVIDIA Debug Manager for Android
- High Performance Graphics with NVIDIA Tegra using Perfhud ES
- Optimizing NVIDIA Tegra Android with Oprofile and PERF


The EXC_BAD_ACCESS (SIGSEGV) type indicates a process uses memory in an unexpected way.
DiscussionThe exception can happen when the process tries to access unmapped memory (KERN_INVALID_ADDRESS), misaligned memory (EXC_ARM_DA_ALIGN) or unavailable memory (KERN_MEMORY_ERROR). This can also happen when the process tries to write on read-only or protected memory (KERN_PROTECTION_FAILURE).


Copyright Bruce Wilcox<EMAIL_ADDRESS>www.brilligunderstanding.com
Revision 10/16/2022 cs12.3
You can give parameters on the run command or in a config file or via
a http request. The default config file is cs_init.txt
at
the top level of CS (if the file exists). A second file if present can
add or override values - cs_initmore.txt And then third level named
after the current language chosen can override those two
cs_initenglish.txt being the default. The language one, in particular is
useful to rebalance memory sizings (dictionary entries in particular)
since foreign languages require more entries than English.
Or you can name where the file is on a command line parameter
config=xxx
. And config2=xxx
for the initmore
file. If you have secret information that you don’t want stored in a
config file or exposed on a command line then you can request the config
data from a URL. Use the command line parameter configurl=http://xxx to
specify the address of the data. Additional command line parameters,
configheader=xxx, can be included to define HTTP request headers. If
there are several headers then use separate configheader=xxx
configheader=yyy etc parameters for each header name/value pair.
Config file data are command line parameters, 1 per line, like below:
noboot
port=20
Some parameters require a value and use the =
format
with no spaces. Other parameters may only require you name the parameter
(they have no choices of values).
Actual command line parameters have priority over config file values, and those have priority over http requested values.
The command line parameter language=
as shipped would
be
language=english
but it can consist of a series of languages separated by commas with the first language being the default until you use a command to change to some other language on the fly. This enables multi-dictionary behavior.
language=english,spanish,german,japanese
When compiling your scripts, you may want different things in different languages. For example here is a multi-language level 0 script that compiles std cs concepts simultaneously in different languages.
language: UNIVERSAL
RAWDATA/ONTOLOGY/ # underlying vocabulary organization
language: ENGLISH
RAWDATA/ONTOLOGY/ENGLISH//
RAWDATA/WORLDDATA/
language: GERMAN
RAWDATA/ONTOLOGY/GERMAN//
language: SPANISH
RAWDATA/ONTOLOGY/SPANISH//
Chatscript statically allocates its memory and so (barring unusual circumstance) will not allocate memory ever during its interactions with users. These parameters can control those allocations. Done typically in a memory poor environment like a cellphone.
| option | description |
|---|---|
buffer=50 |
how many buffers to allocate for general use (80 is default) |
buffer=15x80 |
allocate 15 buffers of 80k bytes each (default buffer size is 80k) |
fullinputlimit=150000 |
allocate input buffer(default buffer size is 80k) |
Most chat doesn’t require huge output and buffers around 20k each will be more than enough. 20 buffers is often enough too (depends on recursive issues in your scripts).
If the system runs out of buffers, it will perform emergency allocations to try to get more, but in limited memory environments (like phones) it might fail. You are not allowed to allocate less than a 20K buffer size.
| option | description |
|---|---|
dict=n |
limit dictionary to this size entries |
text=n |
limit string space to this many bytes |
fact=n |
limit fact pool to this number of facts |
hash=n |
use this hash size for finding dictionary words (bigger = faster access) |
cache=50x1 |
allocate a 50K buffer for handling 1 user file at a time. A server might want to cache multiple users at a time. |
filecache=5000x100 |
allocate a 5M buffer for caching 100 files (enables caching). |
A default version of ChatScript will allocate much more than it needs, because it doesn’t know what you might need.
A server might want to cache common files across volleys and users, using filecache.
If you want to use the least amount of memory (multiple servers on a machine or running on a mobile device), you should look at the USED line on startup and add small amounts to the entries (unless your application does unusual things with facts).
If you want to know how much, try doing :show stats
and
then :source REGRESS/bigregress.txt
. This will run your bot
against a wide range of input and the stats at the end will include the
maximum values needed during a volley. To be paranoid, add beyond those
valuse. Take your max dict value and double it. Same with max fact. Add
10000 to max text.
Just for reference, for our most advanced bot, the actual max values used were: max dict: 346 max fact: 689 max text: 38052.
And the maximum rules executed to find an answer to an input sentence was 8426 (not that you control or care). Typical rules executed for an input sentence was 500-2000 rules. For example, add 1000 to the dict and fact used amounts and 10 (kb) to the string space to have enough normal working room.
| option | description |
|---|---|
output=nnn |
limits output line length for a bot to that amount (forcing crnl as needed). 0 is unlimited. |
outputsize=80000 |
is the maximum output that can be shipped by a volley from the bot without getting truncated. |
Actually the outputsize
value is somewhat less, because
routines generating partial data for later incorporation into the output
also use the buffer and need some usually small amount of clearance. You
can find out how close you have approached the max in a session by
typing :memstats
. If you need to ship a lot of data around,
you can raise this into the megabyte range and expect CS will continue
to function. 80K is the default. For normal operation, when you change
outputsize
you should also change logsize
to
be at least as much, so that the system can do complete logs. You are
welcome to set log size lots smaller if you don’t care about the
log.
| option | description |
|---|---|
livedata=xxx |
name relative or absolute path to your own private LIVEDATA folder.
Do not add trailing / on this path Recommended is you use RAWDATA/yourbotfolder/LIVEDATA to keep all your data in one
place. You can have your own live data, yet use ChatScripts default
LIVEDATA/SYSTEM and LIVEDATA/ENGLISH by
providing paths to the system= and english=
parameters as well as the livedata= parameter |
topic=xxx |
name relative or absolute path to your own private TOPIC folder. Do
not add trailing / on this path / |
buildfiles=xxx |
name relative or absolute path to your own folder where filesxxx.txt
is found. Do not add trailing / on this path / |
users=xxx |
name relative or absolute path to where you want the USERS folder to
be. Do not add trailing / |
logs=xxx |
name relative or absolute path to where you want the LOGS folder to
be. Do not add trailing / |
userlog |
Store a user-bot log in USERS directory (default) |
userlog=1 |
alternate form of request, you can use 0 for off and 1 for on (file). 2 means stdout 4 means stderr - you may combine |
userlogging=file |
primary form of request, you can use none for off and file, stdout, stderr. - you may combine userlogging=file,stdout |
nouserlog |
Don’t store a user-bot log |
serverlog |
Store a server log in LOGS directory (default) |
serverlog=1 |
alternate form of request, you can use 0 for off and 1 for on (file). 2 means stdout 4 means stderr - you may combine |
serverlogging=file |
primary form of request, you can use none for off and file, stdout, stderr. - you may combine serverlogging=file,stdout |
noserverlog |
Don’t store a server log |
noretrybackup |
Don’t save volley backup files for :retry when in standalone mode |
tmp=xxx |
name relative or absolute path to where you want the TMP folder to
be. Do not add trailing / |
crashpath=xxx |
file to write about fatal Linux signals that will be outside of the
cs folder / |
windowsbuglog=xxx |
names a WINDOWS directory to replicate the BUGS.txt log file outside of the CS directory area |
linuxsbuglog=xxx |
names a LINUX directory to replicate the BUGS.txt log file outside of the CS directory area |
Vcs_new_user="text" |
if input has given text within it, treat user as new and dont read the topic file |
deployloggingdelay=5 |
auto enable server logging for 5 minutes after a deploy before using default logging value |
| option | description |
|---|---|
source=xxxx |
Analogous to the :source command. The file is
executed |
login=xxxx |
The same as you would name when asked for a login, this avoids
having to ask for it. Can be login=george or
login=george:harry or whatever |
build0=filename |
runs :build on the filename as level0 and exits with 0
on success or 4 on failure |
build1=filename |
runs :build on the filename as level1 and exits with 0
on success or 4 on failure.Eg. ChatScript build0=files0.txt will rebuild the usual level 0 |
debug=:xxx |
xxx runs the given debug command and then exits. Useful for
:trim , for example or more specific :build
commands |
param=xxxxx |
data to be passed to your private code |
bootcmd=xxx |
(see Advanced Layers manual) |
trace |
turn on all tracing. |
redo |
see documentation for :redo in ChatScript Debugging Manual manual |
noboot |
Do not run any boot script on engine startup |
logsize=n |
When server log file exceeds n megabytes, rename it and start with a new file. |
defaultbot=name |
overrides defaultbot table for what bot to default to |
inputlimit=n |
truncate user input line to this size |
trustpos |
obey word~n and other pos restrictions in keywords |
autoreload |
in event of cs engine crash, output a dummy message and reload on next input (see $cs_crashmsg and $cs_crash) |
nofastload |
If you suspect fast loading is faulty, you can set this to see if things work without it |
syslogstr=xxx |
In linux will output this as part of Microsoft sql trace data to the syslog |
buildflags=xxx |
this data will be used to control :build (quiet and nomixedcase are xxx values) |
autorestartdelay=n |
in event of cs engine internal restart, delay n milliseconds before accepts users |
crnl_safe |
tells system it does not need to search for cr or nl to remove from inputs. |
blockapitrace |
disables any %trace_on in ^testpattern and ^testoutput. Used for production servers. |
traceboot |
turns on tracing while cs_boot is running at startup |
parselimit=n |
if input is larger than n characters, disable intense spellchecking, pos-tagging, and parsing for speed |
parselimit=1 |
inputs longer than this will get no pos-tagging,parsing, or spellchecking - speeds up |
random=n |
will force a specific value to be returned from %random |
legacymatch=n |
alters match variable content when matching concepts |
nophrases |
suppresses marking ~prep_phrase, ~verb_phrase, ~noun_phrase (minor speedup) |
nopatterndata |
disables pattern data gathering that supports ^MatchesCode (minor speedup) |
Legacymatch default if not given is legacymatch=1. It redefines match variable contents when matching a concept. Canonical (eg _0) is the concept member NOT the canonical form of the words. Original (eg ’_0) ’is what user typed (after corrections)
concept: ~food ("baked potato") with input "baked potatoes"
legacy=1 : (_~food) => '_0 - baked_potatoes _0 - bake_potato
legacy=0 : (_~food) => '_0 - baked_potatoes _0 - baked_potato
If you don’t have code that depends on legacy, you are better off adding legacy=0 to your init file. Then you don’t need code like this for concept matches of unknown-words.
if (_0 == unknown-word){_0 = '_0'}
```'
Trustpos is normally off by default because CS is only about 94% accurate in its
built-in pos-tagging. So it prefers to wrongly match by allowing all pos values Of
a word rather than miss a match. Ergo concept: ~all(feel~n) will match any use of "feel" rather than
just noun meaning. But combining CS with Treetagger for english (if you license it) is better at
pos-tagging than either alone, making it competitive with the best taggers in the world.
Here few command line parameters usage examples of usual edit/compile developement phase, running ChatScript from a Linux terminal console (standalone mode):
Rebuild _level0_ (compiling system ChatScript files, listed usually in file `files0.txt`):
BINARIES/LinuxChatScript64 local build0=files0.txt
Rebuild _level1_, compiling bot _Mybot_ (files listed in file `filesMybot.txt`), showing build report on screen (stdout):
BINARIES/LinuxChatScript64 local build1=filesMybot.txt
Rebuild and run: If building phase is without building errors, you can run the just built _Mybot_ in local mode (interactive console) with user name _Amy_:
BINARIES/LinuxChatScript64 local login=Amy
Build bot _Mybot_ and run ChatScript with user _Amy_:
BINARIES/LinuxChatScript64 local build1=filesMybot.txt && BINARIES/LinuxChatScript64 local login=Amy
## Bot variables (aka Server variables)
You can create predefined bot variables by simply naming permanent variables on the
command line, using V to replace $ (since Linux shell scripts don't like $). Eg.
ChatScript Vmyvar=fatcat
ChatScript Vmyvar=“tony is here”
ChatScript “Vmyvar=tony is here”
Quoted strings will be stored without the quotes. Bot variables are always reset to their
original value at each volley, even if you overwrite them during a volley. This can be
used to provide server-host specific values into a script. Nor will they be saved in The
user's topic file across volleys. This also applies to variables defined during any CS_BOOT
## No such bot-specific - nosuchbotrestart=true
If the system does not recognize the bot name requested, it can automatically restart a
server (on the presumption that something got damaged). If you don't expect no such bot
to happen, you can enable this restart using `nosuchbotrestart=true`. Default is false.
## Time options
| option | description
|------------------|-----------------------------------------------------------------------------
| `Timer=15000` | if a volley lasts more than 15 seconds, abort it and return a timeout message.
| `Timer=18000x10` |same as above, but more roughly, higher number after the x reduces how frequently it samples time, reducing the cost of sampling
| `Timelog=5000` | if a volley lasts more than 5000 milliseconds, record it in LOGS/time.txt and for LINUX in /log/cstime.txt .
## `:TranslateConcept` Google API Key
| option | description
|------------------|-----------------------------------------------------------------------------
| `apikey=xxxxxx` | is how you provide a google translate api key to `:translateconcept`
# Security
Typically security parameters only are used in a server configuration.
| option | description
|------------------|-----------------------------------------------------------------------------
| `sandbox` | If the engine is not allowed to alter the server machine other than through the standard ChatScript directories, you can start it with the parameter `sandbox` which disables Export and System calls.
| `nodebug` | Users may not issue debug commands (regardless of authorizations).  The contents of the string are just like the contents of the authorizations file for the server. Each entry separated from the other by a space. This list is checked first. If it fails to authorize AND there is a file, then the file will be checked also. Otherwise authorization is denied.
|`encrypt=xxxxx`<br>`decrypt=xxxxx` | These name URLs that accept JSON data to encrypt and decrypt user data. User data is of two forms, topic data and LTM data. LTM data is intended to be more personalized for a user, so if `encrypt` is set, LTM will be encrypted. User topic data is often just execution state of the user and potentially big, so by default it is not encrypted. You can request encryption using `userencrypt` as a command line parameter to encrypt the topic file and `ltmdecrypt` to encrypt the ltm file.
The JSON data sent to the URL given by the parameters looks like this:
{“datavalues”: {“x”: “…”}}
where ... is the text to encrypt or decrypt. Data from CS will be filled into the ... and are JSON compatible.
# Server Parameters
Either Mac/LINUX or Windows versions accept the following command line args:
| option | description
|-----------------------|-----------------------------------------------------------------------------
| `port=xxx` | This tells the system to be a server and to use the given numeric port. You must do this to tell Windows to run as a server. The standard port is 1024 but you can use any port.
| `local` | The opposite of the port command, this says run the program as a stand-alone system, not as a server.
| `interface=<IP_ADDRESS>` | By default the value is `<IP_ADDRESS>` and the system directly uses a port that may be open to the internet. You can set the interface to a different value and it will set the local port of the TCP connection to what you designate. 127 is the classic TCP port.
# User Data
Scripts can direct the system to store individualized data for a user in the user's topic file
in USERS. It can store user variables (`$xxx`) or facts.  But facts can
be arbitrarily created by a script and there is no natural limit.
As these all take up room in the user's file, affecting how long it takes to process a volley
(due to the time it takes to load and write back a topic file),
you may want to limit how many facts each user can have written.
This is unrelated to universal facts the system has at its permanent disposal as part of the base system.
`userfacts=n` limits a user file to saving only the n most recently created facts of a user (this does not include facts stored in fact sets).
Overridden if the user has `$cs_userfactlimit` set to some value
### User Caching
Each user is tracked via their topic file in USERS. The system must load it and write it
back for each volley and in some cases will become I/O bound as a result (particularly if
the filesystem is not local).
You can direct the system to keep a cache in memory of recent users, to reduce the I/O volume.
It will still write out data periodically, but not every volley.
Of course if you do this and the server crashes,
writebacks may not have happened and some system rememberance of user interaction will be lost.
Of course if the system crashes, user's may not think it unusually that the chatbot forgot some of what happened.
By default, the system automatically writes to disk every volley, If you use a different value,
a user file will never be more out of date than that.
cache=20 cache=20x1
This specifies how many users can be cached in memory and how big the cache block in
kb should be for a user. The default block size is `50` (50,000 bytes).
User files typically are under 20,000 bytes.
If a file is too big for the block, it will just have to write directly to and from the filesystem.
The default cache count is 1, telling how many users to cache at once,
but you can explicitly set how many users get cached with the number after the
"x". If the second number is 0, then no caching is done and users have no data saved.
They remember nothing from volley to volley.
Do not use caching with fork. The forks will be hiding user data from each other.
save=n
This specifies how many volleys should elapse before a cached user is saved to disk.
Default is 1. A value of 0 not only causes a user's data to be written out every volley, but
also causes the user record to be dropped from the cache, so it is read back in every time
it is needed (handy when running multi-core copies of chatscript off the same port).
Note, if you change the default to a number higher than 1, you should always use `:quit`
to end a server. Merely killing the process may result in loss of the most recent user activity.
## Logging or Not
In stand-alone mode the system logs what a user says with a bot in the USERS folder. It
can also do this in server mode. It can also log what the server itself does. But logging
slows down the system. Particularly if you have an intervening server running and it is
logging things, you may have no use whatsoever for ChatScript's logging.
Userlog
Store a user-bot log in USERS directory. Stand-alone default if unspecified.
Alternatively you can do userlog=1 to enable.
Nouserlog
Don't store a user-bot log. Server default if unspecified.
Alternatively you can do userlog=0 to disable.
Alternatively you can do userlogging=none.
Serverlog
Write a server log and a bugs log.
Alternatively you can do serverlog=1 to enable to file, 2 to use stdout, 4 to use stderr. You can combine like serverlog=5
Prefer the alternate form of request, serverlogging=none for off and file, stdout, stderr. - you may combine serverlogging=file,stdout
Last form scanned (read in order from cs_init.txt and then cs_initmore.txt) wins.
The server log will be put into the LOGS directory under serverlogxxx.txt where xxx is the port.
The bugs log is in the same directory under bugs.txt (all ports).
The server log records all transactions by all users in order of arrival. Whereas the user log
records transactions by user/bot.
The server log can be written regardless of whether CS is running in
server mode or not.
serverlogauthcode=xxxxx
In addition to permanently turning on server and/or user logging, you can provide a cheat code in your
input that, if it matches the serverlogauthcode, will enable server and user logging for that input. This code
is hidden from CS processing so it will not impact NL processing.
In calls to ^testpattern, this will log to return in a `trace` field. By
default, this code will just trace patterns. But if you concat `2` onto the
code it will do a full cs trace.
In calls to ^testouput, this will log to return in a trace field but will always
be a full trace.
hidefromlog=“label label2 label3”
If there is data you don't want reflected into either server or user log files, this is the parameter. Maybe you don't
want an authorization code recorded, or whatever. This presumes the data is part of some JSON object. You name one or more labels
and when those are found in data outbound to a log file, the label and its value will be omitted.
Serverctrlz
Have server terminate its output with 0x00 0xfe 0xff as a verification the client received
the entire message, since without sending to server, client cannot be positive the
connection wasn't broken somewhere and await more input forever.
pseudoserver
This asserts that cs in DLL/sharedobject form is being used as a server (though its caller is doing all the server work).
This enables the required authorizations from CS before using debug commands.
Noserverlog
Superceeded by `serverloggging=`.
Don't write a server log or a bugs log.
Alternatively you can do serverlog=0 to disable.
Nobuglog
Don't write a bugs log. Same as Buglog=0 or Buglog=none
Buglog Buglog=n Buglogging=none,file,stdout,stderr
Write a LOGS/bugs.txt log if n = 1. Write nothing if n == 0.
Alternate form of request, you can use buglogging=none for off and file, stdout, stderr. - you may combine buglogging=file,stderr
DebugLevel=n
Sets debug level of server logging. 0 will remove logging all the startup variables and their values.
Fork=n
If using LINUX EVSERVER, you can request extra copies of ChatScript (to run on each
core for example). n specifies how many additional copies of ChatScript to launch.
Serverretry
Allows `:retry` to work from a server - don't use this except for testing a single-person
on a server as it slows down the server.
servertrace
when present, forces all users to have tracing turned on.
This detects repeated input and if the number of sequential repeats is non-zero and equal or
greater to this parameter, such inputs will be truncated to just the initial repeats. All
other input in this volley will be discarded.
erasename=myname
:reset, when called from running script, is unable to fully reset the system.
Facts that have already been created are not destroyed and user variables that have been
defined are not erased, only ones in the bot definition are changed back to their default
settings. The erasename parameter is used to perform a full reset prior to loading the
user topic file. The incoming input is scanned for the text given, and if found the
system bypasses loading the topic file and instead just initializes a fresh bot.
The actual erasename seen in input will be converted to all blanks, so it will not disturb
normal behavior, either in OOB input or user input.
The default value for this is: `csuser_erase` which you can change to anything else you want.
cs_new_user=“text””
The cs_new_user parameter is used to perform a full reset prior to loading the
user topic file. The incoming input is scanned for the text given, and if found the
system bypasses loading the topic file and instead just initializes a fresh bot.
This differs from erasename in that the text is not erased.
## No such bot-specific - nosuchbotrestart=true
If the system does not recognize the bot name requested, it can automatically restart a
server (on the presumption that something got damaged). If you don't expect no such bot
to happen, you can enable this restart using `nosuchbotrestart=true`. Default is false.
## Testing a server
There are various configurations for having an instance be a client to test a server.
client=xxxx:yyyy
This says be a client to test a remote server at IP xxxx and port yyyy. You will be able to
"login" to this client and then send and receive messages with a server.
client=localhost:yyyy
This says be a client to test a local server on port yyyy. Similar to above.
Load=1
This creates a localhost client that constantly sends messages to a server. Works its way
through `REGRESS/bigregress.txt` as its input (over 100K messages). Can assign different
numbers to create different loading clients (e.g., load=10 creates 10 clients).
Dual ``` Yet another client. But this one feeds the output of the server back as input for the next round. There are also command line parameters for controlling memory usage which are not specific to being a server.


Lindsey Vigoda
Democrat
My current employer is Small Business Majority and I am the Colorado Outreach Manager for the nonprofit.  To see my other positions, please see the attached resume.
I grew up in Colorado, having attended a high school in south Denver. From there, I attended the University of Missouri, obtaining my bachelor's in Human Development and Family Sciences, as well as three minors. I came back to Colorado to obtain my master's in Social Work from the University of Denver.
80218
I am an advocate for small businesses and am often involved in legislative campaigns. These campaigns are very diverse, from healthcare accessibility to local family childcare housing regulations. In 2018, I worked on Proposition 111 as the field director and eventual deputy campaign director. Proposition 118 won the most ballot votes in Colorado history at the time to cap the interest rates on payday loans to 36 percent.
Small Business Majority and Coloradans to Stop Predatory Payday Loans
As a community-focused social worker, I am keen on effective, representative organizing and advocacy. From my time in college working on organizing around sexual violence awareness to my work at an alternative high school in Denver Public Schools and now my current role as the Colorado Outreach Manager at Small Business Majority, I have honed in my skills on advocating by including. My passion for ensuring underrepresented communities are heard has enabled my organization to be centered around the people I am trying to help. This means that instead of speaking on behalf of those who I am aiding, I invite them into the conversation to be heard, their thoughts considered, and their ideas materialized. As a social worker, it is my duty to uplift those who are often silenced, which includes rural communities, communities of color, and other marginalized communities.
Democracy only works if it is fair and representative. To create a fair representation, you need district maps to be created by communities and not special interests. Though I am a Democrat from Denver, I believe that a Republican from Alamosa should have just as much say in their democracy as I do. I believe our maps should be written to include our diverse and unique state, and not just the front range or cities. I want to serve because I want to give be apart of a commission that believes in giving our communities a voice. I know I am a great fit to serve because of my advocacy background, my community-focused education, and my life experiences that lend me to be a collaborator.
I work with all sides of the political spectrum in my job and have learned to compromise for the better of the good. Again, I am a Democrat, but my job allows me to work often with people who do not agree with many aspects of my ideologies. The many diverse legislative coalitions I have been a member of allowed me to sharpen my ability to facilitate respectful, yet productive conversations for a shared goal. As someone who is often charged with outreach and the facilitation of coalitions, I have the skills to be fair and impartial for a purpose. If that purpose is for fair maps, I will always listen to a different perspective and collaborate with the individual(s) to create something we are all proud of.
Previously, I worked as a policy analyst for a local thinktank. At this organization, I had to use research and quantitative numbers to work through a systemic problem to create a policy solution. This created a set of new skills that were based in logic and analytics to reason with a problem. With COVID-19 disproportionally affecting my constituency, small business owners, these skills have been put to the test daily as I use logic instead of emotion to rapidly help and advocate for solutions. These solutions, though based in stories and statistics, have to take into account the political landscape we are in, and the barriers to success. This has solidly helped my ability to reason with a problem using analytical skills and compromise.
Female


This vignette covers how to create your own Steam API key, to be able to use the CSGo
package to pull data from the steam API.
The very first step to get your own Steam API credentials is to have an Steam Account. To do that you need to access this link, and fill the requested information.
PS: Keep in mind that you will need to agree with the Steam Api Terms of Use, and that you should have spend more than 5.00 USD in the Steam Store to be able to get the API key.
Now that you are a Steam member, and already spend more than 5.00 USD in the store you should be able to request your own Steam API Key. Enter here and sign in with your Steam Account Name and Password.
In the next screen you should fill your Steam Domain Name, confirm the Steam Api Terms of Use check box and click on the “Register” button.
If everything went well you should see an screen as bellow with your own Steam Web API Key.
Now that you already have your Steam API Key you should be able to use any function in the CSGo
package.
Try to run it filling your own API key:
library(CSGo)
df <- csgo_api_profile(api_key = 'your_key', user_id = '76561198263364899')
The second mandatory argument is the user_id
which represents the Steam ID. The Steam ID is the number OR name at the end the steam profile URL.
If the Steam Profile URL is https://steamcommunity.com/profiles/76561198263364899/ the user_id is<PHONE_NUMBER>3364899.
If the Steam Profile URL is https://steamcommunity.com/id/generalcapivara/ the user_id is generalcapivara.
IMPORTANT: The steam profile should have the “Public” status for you be able to get specific information like Achievements and Statistics.
library(CSGo)
df1 <- csgo_api_profile(api_key = 'your_key', user_id = '76561198263364899')
df2 <- csgo_api_profile(api_key = 'your_key', user_id = 'generalcapivara', name = TRUE)
That’s it!!!


New Media and Web Design
Trillium Media Design with bring your company is Web presenve
- 第一章节
- 第二章节
- 第三章节
- 第四章节
- 第五章节
Meeting Your Business Needs
Our expert designers are eager to
Trillium Media Design with bring your company is Web presenve
Our expert designers are eager to


rot13 is a great way to hide spoilers on the Internet. Just put the text you want to encode or decode into the white box and it will be converted automatically.


Search Results:
Details for {{titleDetails[0].TitleName}}
{{ descr.Description }}
Release Year: {{titleDetails[0].ReleaseYear}}
Title Id: {{titleDetails[0].TitleId}}
Awards
| Award | Award Company | Award Won | Award Year |
|---|---|---|---|
| {{ awards.Award }} | {{ awards.AwardCompany }} | {{ awards.AwardWon }} | {{ awards.AwardYear }} |


|
v8pp
1.0.0
Bind C++ code into V8 JavaScript engine
|
Pointer to C++ object wrapped in V8 with v8::Global handle. More...
#include <persistent.hpp>
Public Types | |
| typedef T *persistent_ptr< T >::* | unspecfied_bool_type |
Public Member Functions | |
| persistent_ptr () | |
| Create an empty persistent pointer. | |
| persistent_ptr (v8::Isolate *isolate, T *value) | |
| persistent_ptr (v8::Isolate *isolate, v8::Local< v8::Value > handle) | |
| Create a persistent pointer from V8 Value, store persistent handle. | |
| persistent_ptr (persistent_ptr &&src) | |
| persistent_ptr & | operator= (persistent_ptr &&src) |
| ~persistent_ptr () | |
| On destroy dispose persistent handle only. | |
| void | reset (v8::Isolate *isolate, T *value) |
| Reset with a new pointer to wrapped C++ object, replace persistent handle. | |
| void | reset () |
| T * | get () |
| Get pointer to the wrapped C++ object. | |
| T const * | get () const |
| operator unspecfied_bool_type () const | |
| Safe bool cast. | |
| T & | operator* () |
| Dereference pointer, valid if get() != nullptr. | |
| T const & | operator* () const |
| T * | operator-> () |
| T const * | operator-> () const |
| bool | operator== (persistent_ptr const &rhs) const |
| bool | operator!= (persistent_ptr const &rhs) const |
| void | swap (persistent_ptr &rhs) |
Friends | |
| void | swap (persistent_ptr &lhs, persistent_ptr &rhs) |
Pointer to C++ object wrapped in V8 with v8::Global handle.
|
inlineexplicit |
Create a persistent pointer from a pointer to a wrapped object, store persistent handle to it


CLOCKERS A film review by M. Isaacs Copyright 1995 M. Isaacs
Spike Lee's CLOCKERS is another mixed bag from the director and considering the powerful novel from which he had to work, it must be considered somewhat of a disappointment.
It was impossible to read Price's novel without thinking of Martin Scorsese directing it even long before he became affiliated with the project. Scorsese has been brilliant in not only painting the decay of urban landscapes but in getting under the skin of the people who occupy them. It is a literary accomplishment that Price achieved the same feat with flying colors.
Like JUNGLE FEVER and other recent Lee films, there are scenes in this movie that work well but they exist in a vacuum. The credit sequence is powerful and unforgettable; the initial on-the-scene investigation of the dead body is unblinking and preserves the unsentimental tone of the Price novel; the documentary-style of how the clocking process works is exceptional; the few scenes centered on the mini-drug king, Rodney, are staggering; and the young and largely unknown cast makes a convincing ensemble.
But the movie never quite pulls together as it should because like usual of late, Lee keeps getting in the way of his own movie. In scenes throughout, the editing tries to artificially jack up the tension when the material is more than enough to develop that tension; characters are shot in extreme close-up when there is no justifiable artistic reason to do so so often; and some art-school devices such as Rocco reflected in Strike's eye and Rocco running beside a kid on a bicycle are pointless exercises in flamboyance. Furthermore, the entire movie is over-scored.
Lee's two cameo appearances may strike some as a small quibble but I think they indicate Lee's narcissism and willingness to dwarf his own material. He made the right decision to cast some unknown actors in the film to give his world more authenticity and remove from it a safe Hollywood flavor. But in both scenes where Lee appears--critical scenes to the movie may I add--he immediately pulls us from the grit of the movie he has created. This isn't an Alfred Hitchcock movie where the tone is devilish and playful. Hitchcock's appearances only supported the tone of his movies; Lee's appearances simply crash the tone he has worked hard to establish.
I've read a plethora of reviews of high praise for CLOCKERS. Many have said it is Lee's best film to date and certainly better than DO THE RIGHT THING. I disagree. In the latter, Lee was able to carve out three-dimensional characters and include important development that just isn't in CLOCKERS. The Danny Aiello character in DO THE RIGHT THING emerges through the relationship to his sons and the community. He ultimately is a complex character and what is so special about the film is the way we see how his racism has formed and how his sons have reacted to that. Lee is dealing with a tapestry of characters in that movie, too, but we still get small and informative insights about them along the way. The Ozzie Davis character and Lee's own "Mookie" are just two characters who emerge more three-dimensional than any of the people who populate CLOCKERS.
Think about the scenes where Aiello talks to his son about how hard he has worked to create his pizza business; or Lee reacting to his lover and son; or a lonely Davis trying to court "Sister Sister." We need that kind of insight in CLOCKERS--especially more dimension to Keitel's character and more insight into Strike as well.
Lee is certainly a gifted director and creates a world that closes in on Strike with some passion and urgency. But he is unwilling to stay out of the way of his own material. Too often, we want to see more Rocco and Strike and less of the wizardry that Spike Lee is way too eager to serve up these days.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Todo List
My first exposure to the todo list challenge was during the time we at DBC had to practice ARGV in ruby(which was also the first time we learned how to use parameters on the console). But that was before we learned databases and Active Record. This is walkthrough on the workflow of solving todo using Active Record. We will be using the following folders:(Look at my previous post for more info on each folder)
Workflow
This workflow follows the standard set in my previous blog on workflows. We start with making the database, figuring out the tables and schemas, and then making the application.
In our file, we will need something that can link our ruby files to our database. This is Active Record. The actual connection itself for this project is stored in our config folder, under application.rb The most important line in this file is found on line 26. This establishes the connection between ActiveRecord and the database. (Active record is an ORM bundled into a gem)
Step 0: Create source file
When I say source file, I mean the file that you will run to make your entire application run. This should be found within the source directory of your project. In our case, it is called todo.rb All This file should do is run a command in our master controller(line 4). To do that, it needs access to the controller.(line 1)
Step 1: MVP and design schema
So I cheated. This is actually 2 steps bundled into 1. You need to design your database table schema based upon what you think you will need. But don't make it too complex, you should follow the MVP(minimum viable product.) You can always make more migrations to add columns to a table and join tables together.
Step 2: Make the migration file.
The migration file is how you will implement your table and schema into your database. It will require access to the database itself via Active Record.(line 1) Naming convention of migration file should be snake_case lowercase while class should be CamelCase capitalized. The file here should be plural since we are creating a table full of tasks.
Name of the class should reflect what you are doing to the database. In this case, we are creating a table Tasks.(line 3)
Optional: Seed your database table
Once you have a database with tables, you can seed your tables with initial data.
All steps after deal with the application itself.(Inside the app directory)
Step 3: Create corresponding model
After creating your migration file, make the corresponding model. Your migration file only deals with the database. You need to make something that deals with the ruby side. The model should be of the same name as the table you are assigning it to, and singular. It will act as one object that you can pull out of the database table. Therefore, it will also need access to Active Record.(line 1, line 3 in inheriting AR)
Step 4: Make controller
Make your controller. This is the brains of your application. If you remember Step 0, this is what your are calling when you run your program. Make sure to require_relative your models since those are the things you are manipulating here. The example below isn't the best MVC example of a controller, because you should be creating a seperate View anytime you see a "puts" and require_relative the corresponding "puts".


{% include "_head.html" %} {% set icon = "https://twemoji.maxcdn.com/2/72x72/2139.png" %}
About Typing Test


IBM AE Magic
Contents:
What is IBM AE Magic?
Get Started with IBM AE Magic
Install Package
List AE Instances
IBM AE SDK
IBM AE Magic
»
Get Started with IBM AE Magic
View page source
Get Started with IBM AE Magic
¶
quick intro
Install Package
¶
List AE Instances
¶


[§11-352] False name contributions prohibited. (a) No person shall make a contribution to any candidate, candidate committee, or noncandidate committee in any name other than that of the person who owns the money, property, or service.
(b) All contributions made in the name of a person other than the owner of the money, property, or service shall escheat to the Hawaii election campaign fund. [L 2010, c 211, pt of §2]


Flask: Read from a Database¶
Updated April 11, 2023
It is essential to get your database connection working without errors before you try to do more with the database and Flask.
Refer to the previous chapter to test your database connection.
In this chapter we focus on reading data from a SQLite database, using Flask-SQLAlchemy.
The database¶
The SQLite database used here is named sockmarket.db. It has only one table, named socks. It has seven fields: id, name, style, color, quantity, price, and updated. You will see the table name and the field names later, in the Python code. The image below is a screenshot from the DB Browser for SQLite, showing the top rows of the socks table.
First read¶
Without templates or anything fancy, let’s attempt to read some data from the database and return it in the browser.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | """ read from a SQLite database and return data """
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import os.path
# this variable, db, will be used for all SQLAlchemy commands
db = SQLAlchemy()
# create the app
app = Flask(__name__)
# change string to the name of your database; add path if necessary
db_name = 'sockmarket.db'
# note - path is necessary for a SQLite db!!!
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
db_path = os.path.join(BASE_DIR, db_name)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + db_path
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
# initialize the app with Flask-SQLAlchemy
db.init_app(app)
# each table in the database needs a class to be created for it
# this class is named Sock because the database contains info about socks
# and the table in the database is named: socks
# db.Model is required - don't change it
# identify all columns by name and their data type
class Sock(db.Model):
__tablename__ = 'socks'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String)
style = db.Column(db.String)
color = db.Column(db.String)
quantity = db.Column(db.Integer)
price = db.Column(db.Float)
updated = db.Column(db.String)
#routes
|
Everything up to line 22 comes from the script explained in the previous chapter.
The model¶
Lines 30-38 provide a model so that Python can translate the socks table. It’s a Python class that inherits from the Model
class from SQLAlchemy. (Remember, db
refers to SQLAlchemy.) We could name the new class anything, but Sock
makes sense because this table’s data is all about socks.
Note
Python style dictates that a class starts with an uppercase letter and uses camelCase. Using uppercase (as in Sock here) helps us recognize when a class is being used in Python.
If your database has more than one table, you will need to create an additional class like this for each additional table.
Note the following in the highlighted class above:
Identify the primary_key field as shown (line 32).
Write the field names exactly as they appear in the table.
In
__tablename__ = 'socks'
, note that the name of the table is case-sensitive. Match it to your actual table’s name.String
,Integer
orFloat
must match the data type in your fields.Include every field in the table.
The query in the route¶
We will provide only one route to start with, and it includes a try/except just like the example in the previous chapter.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #routes
@app.route('/')
def index():
try:
socks = db.session.execute(db.select(Sock)
.filter_by(style='knee-high')
.order_by(Sock.name)).scalars()
sock_text = '
'
for sock in socks:
sock_text += '
' + sock.name + ', ' + sock.color + '
'
sock_text += '
'
return sock_text
except Exception as e:
# e holds description of the error
error_text = "
The error:
" + str(e) + "
"
hed = '
Something is broken.
'
return hed + error_text
|
Important
The database query shown above, lines 45-47, retrieves all columns in all rows where the value in the style column is ‘knee-high’ — those rows are assigned to the variable named socks.
The only code that “talks” to the database is in lines 45-47.
socks
is a new variable. We assign to it the data we are pulling from the database.Sock
(uppercase S) refers to the class we built, Sock, starting on line 30. We are querying the table specified in that class..filter_by()
limits what we’re asking for. It’s theWHERE
clause in regular SQL.style='knee-high'
— in this table,style
is a field name.'knee-high'
is a value in that field (column). So we will get only socks with the style “knee-high” — not “ankle,” mini,” or “other.”order_by()
selects a field (column) to determine the order of the results listing. This is optional. Any field could be used.Sock.name
refers to the propertyname
in the Sock class..scalars()
is tacked onto the end of every query, unless you expect or want only one record to be returned — in which case, use.scalar_one()
instead.
The default for order_by()
is ascending. To sort by a column in descending order:
from sqlalchemy import desc
socks = db.session.execute(db.select(Sock)
.filter_by(style='knee-high')
.order_by( desc(Sock.name) )).scalars()
Lines 49-52 create a string using the data in socks
and adding HTML tags around the data — the

and

tags should be familiar to you.
After the for-loop completes, and the final closing tag

is concatenated to the string, sock_text
, and the final string will be:

D'Shawn, blue

Divine, white stripes on navy

Faye, dark purple

Isabel, white

Jenny, blue

Jo-Anne, brown

Krissie, blue

Lizzy, red

Nancie, purple

Tanya, red

Terrie, blue stripe

Assuming that everything worked, that string is what will be returned (line 53).
The rest of the code (lines 54-58) is from the database intro chapter.
When the script runs, this is the result in the browser:
We have successfully queried data from this database and used it in a Flask route.
Now we will put it into a Flask template.
Add a template¶
Using a Flask template, we can make the list of socks display more beautifully:
Important
The database query for the table shown above is in the route function inventory(). The code is shown below.
Here is the central section of the HTML template that will display the socks. Instead of using an HTML list with

and

tags, we’re using the standard HTML table tags with Bootstrap styles applied.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
List of Socks

This is a list of all the socks of the
{{ style }} style in our inventory.

Return to the index.

Sock Name
Color
Price
Quantity
Updated

{% for sock in socks %}

{{ sock.name }}
{{ sock.color }}
${{ sock.price }}
{{ sock.quantity }}
{{ sock.updated }}

{% endfor %}

|
Refer to the Flask: Web Forms chapter for details about adding Bootstrap to Flask. Refer to the Flask Templates chapter for details about working with templates.
The entire app, including its templates and the database file, is here.
The previous route¶
Our first working route with no template was this:
@app.route('/')
def index():
try:
socks = db.session.execute(db.select(Sock)
.filter_by(style='knee-high')
.order_by(Sock.name)).scalars()
sock_text = '
'
for sock in socks:
sock_text += '
' + sock.name + ', ' + sock.color + '
'
sock_text += '
'
return sock_text
# lines omitted here
Note that the database query is the same below, in the new route that uses a Flask template.
The new route¶
If you refer to the Jinja code in the template above, you will see that it requires a value for style — {{ style }}
and the value socks
— used in the for-loop. (Those lines are highlighted.)
In the render_template()
function returned by this route (below), you can see that these values are passed to the template.
@app.route('/inventory/


View Cart
News
Blog
Email Us
Back To Shop Page
Please fix these errors !
Your cart is empty !
Payment
(Credit Cards payment only)
* required !
Credit Card Number
Credit Type
CC number
Expiration Date
*
" name="checkoutdetails[credit_card_number]" />
*
" name="checkoutdetails[credit_card_type]" />
*
" name="checkoutdetails[cc_number]" />
*
" onfocus="showCalendarControl(this);" name="checkoutdetails[expiry_date]" />


Helvetia:
Why are you here again? If you're not willing to buy something, kindly step aside so that I can serve my paying customers?


Blockcore is the foundation for realizing blockchains and includes core functionality to create your own custom blockchain with a lot of tooling supporting your blockchain.
Blockcore is entirely open source and built on .NET and has an active and engaged community that contributes to the ecosystem.
The tooling as part of the Blockcore platform includes; Block Explorer, Block Indexing, Block Analytics, Wallets, API Wallet Service, Developer Tooling, Documentation and more.
Blockcore is under continuous development to stay at the cutting edge of Bitcoin and blockchain technology. We invite you to engage with our community on our Discord.


Month
January
February
March
April
May
June
July
August
September
October
November
December
Year
2030
2029
2028
2027
2026
2025
2024
2023
2022
2021
2020
2019
August 2020
Sun
Mon
Tue
Wed
Thu
Fri
Sat
«
Previous
Next
»
Submit
Guidelines
No weekends (Sunday and Saturday)
You can select up-to 4 slots for a particular month
if you select an odd number slot then your subsequent selection must be an even number slot and vice versa
Selections
Notification
Launch demo modal
Please choose a option


To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video


Running an automation every time a sensor updates
What follows is no longer needed since HA now has a new feature of the state trigger:
What follows is no longer needed since HA now has a new feature of the state trigger:
It’s a common post on the HA Discord where people are confused as to why their automation isn’t running, they’ve got a trigger, and a few conditions, and … n...
I see many people struggle with the formatting for automations (and scripts) because the official docs are structured in a manner that assumes you’re going t...
I’m sure we’ve all been there, where we’ve written automations that have grown longer and more complicated as we’ve tried to make things more flexible. Then ...
Automations in Home Assistant can seem a little daunting at first. You look at the documents, and it can seem overwhelming.
A question that comes up regularly with people new to HA seems to be what brand of kit should I buy to use with Home Assistant. That’s the wrong question to ...
A common problem that comes up all the time is when people want a light or switch (or anything else Home Assistant can control) to turn off automatically, bu...


Viral video: Qawwali event in Haridwar becomes free-for-all over seating
A video from the event shows men angrily charging at each another with chairs and breaking many of the plastic chairs during the fight.
by Trends DeskA qawwali event organised in Haridwar descended into chaos after a fight broke out among the people assembled for the event over the seating arrangements. Footage from the event organised in Haridwar showed people attacking and throwing plastic chairs at each other.
A video from the event shows men angrily charging at each other with chairs, and breaking a lot of the plastic furniture during the fight. Towards the end of the video, a policeman is seen breaking up the fight using a baton.
Watch the video here:
The video started a laugh riot online and many said it was “wholesome entertainment” and asked if there was popcorn provided to enjoy the show.
While some said it was like a WWE fight, others found it hilarious that “no injuries” were reported and said that “only chairs were hurt”.
Here’s how people reacted to the video:


Some properties in CSS are inherited to children elements as you can see here. The <h1> heading and the <p> element inherit color and alignment from the <div>, but not the border and the padding.


| DOSE: |
|
|
GVL |
(liquid) |
| |
|
|
GHV |
(liquid) |
I recently became aware that gamma-valerolactone (GVL) was being marketed as a GHB replacement. I had read Rhodium's report on gamma-hydroxyvalerate (GHV or 4-methyl-GHB) several years before, which had given me a passing interest in trying it. I used GHB for a period of about 2 years, but stopped about 2 years before because I came to look at it as sort of a waste of time.  Descriptions of GVL indicated that it was a much milder drug than GHB. Curiosity overcame me and I decided to buy a bottle to try.
About a week later, I received my 4 ounce bottle. The bottle contained a mixture of 3 parts GVL to 2 parts water, with a little potassium sorbate added as a preservative. The label said that a dose was 2.5 to 5 milliliters of the solution. I measured out 4ml and put it into a small glass. The liquid smelled nasty... it reminded me very much of Super Elastic Bubble Plastic (some of you may remember this stuff from the 1970s, you'd squeeze a little ball of plasticky gel from a tube, put a wad on the end of a straw, blow into the straw, and it'd expand into big multicolored bubbles). I added some juice to try to cover the taste, and drank it. Unfortunately, it tasted like it smelled... all that the juice did was give me more volume to drink. I cringed as soon as it touched my tongue. Nasty!
Within 10 minutes I began to feel somewhat relaxed and maybe a little light-headed. This built in intensity for another 20 or 30 minutes. There was no euphoria, no GHB-like intoxication. My muscles were relaxed, I felt very mildly light-headed, and that was pretty much all.
About 2 hours later I decided to try taking some more. This time, I decided to try reacting it with NaOH to make GHV. I measured out 3ml of the solution and added a little extra water. I put in a little NaOH (I didn't weigh it) and it created a mild exothermic reaction. I got the pH right and then added some juice and drank it. The taste was improved somewhat, but not much. It had less bite but was still like drinking Super Elastic Bubble Plastic. Again, the effects came on within about 10 minutes. Again, it was very mild. I went to bed after about 2 or 3 hours still feeling some of the effects, so I can't say how long the effects lasted.
Four days later, I decided to try GVL again. This time I decided to take a larger dose. I measured out 7ml and put it in a glass. Instead of trying to mask it with juice I just added a little water and chugged it down in one shot... if you can't cover the taste, might as well just get it over as quick as possible. The effects were felt in about 10 minutes and built up for the next 20 minutes, as before. Again, it was very mild. In fact, I could detect no difference at all between 7ml and 4ml... this is in line with what I've read. Apparently doses above about 5ml do not give any stronger effects. It would be interesting to know what this stuff does in the brain. After about an hour I got in bed and fell asleep. It wasn't really any easier to sleep than it would've been without GVL.
In summary, GVL and GHV are not at all like GHB! It's more comparable to something like valerian root. It might make a good muscle relaxer, and it might help for mild anxiety. It might possibly even help someone who was slightly tired fall asleep, but if you took it when wide awake it would not put you to sleep. Not a chance of date rape here! It may be similar on a chemical basis, and it may bind to GHB receptors, but the subjective experience is nothing like GHB. It has no recreational potential at all.
Is it of any use? I don't know. First of all it must be kept in mind that this must be considered an experimental drug. I know of no formal human research on it, and I don't believe any animal studies have been conducted to find out what the risks of long-term use as a drug might be. GVL is considered a safe food additive by the FDA, but when used in this way it is in doses far far lower than its doses as a drug. There's no way to know if it is safe or what the risks may be. If I had to guess, I would say it probably is OK to use occasionally... but this is just a guess. If it is safe, then it may have some uses.
One possible use could be as part of a detox program for GHB addicts. I have seen reports on the internet from people who have used GVL successfully for this purpose. Perhaps gradually decreasing doses of GVL or GHV could be given to GHB addicts to lessen withdrawals, while keeping them essentially sober.
Another use may be as a mild, non-intoxicating remedy for acute anxiety attacks. It wouldn't be my first choice for an anxiolytic though. I doubt it would be of any use for severe or even moderate anxiety attacks.
Finally, if it shares GHB's growth hormone releasing properties, perhaps it could be used as a bodybuilding or anti-aging drug like GHB. If it shares this property of GHB, its lack of significant psychoactivity would likely be a real plus, as you could take it before a work-out and not have to worry about passing out in the gym.
It was interesting to try it, and not at all what I expected. I don't regret buying it, but I suspect the bottle will last me for a long long long time, and I doubt I'll buy more. Its not bad stuff, its just that I've got better things to do.
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.