AMERICAN PSYCHO A film review by Mark R. Leeper
Capsule: This is a sharp-edged black comedy set in the Reagan era. In the high profit but scruple-less, rarefied atmosphere of Wall Street finance, one corporate vice-president relieves the boredom with murder and sadism. Nobody seems to notice. That one joke is done excruciatingly well, but unfortunately that is the only joke the film has. The soullessness of people at the top is hammered home again and again as they impassively commune and compete with each other in pristine dress and surroundings. Though Bale's acting and shifts of mood are impressive, basically this remains a one-joke comedy. Rating: 6 (0 to 10), +1 (-4 to +4)
It would seem that Ed Gein has inspired yet another film. The real Ed Gein was a retired Wisconsin farmer who in November 1957 was discovered to be a serial killer.  His crimes were the inspiration for the films PSYCHO, THE TEXAS CHAINSAW MASSACRE, and now AMERICAN PSYCHO. To date almost all serial killers have been portrayed on the screen as being lower class or at best lower middle class. AMERICAN PSYCHO asks, "What if such a person were in Wall Street's high-earning elite?" For the purpose of satire, Bret Easton Ellis's controversial novel looked at a wealthy young financier at a serial killer. The intent is not so much horror but as a satirical view into the lives of the rich, successful, and vacuous. Canadian Mary Harron, who scripted and directed I SHOT ANDY WARHOL, has scripted and directed AMERICAN PSYCHO based on the Ellis novel.
As Patrick Bateman (Christian Bale) readily admits to himself and to the audience, he is empty. Patrick Bateman is in most senses just "not here." Nobody greatly notices. Bateman is one of a set of nearly identical vice-presidents of a Wall Street financial firm. He makes a salary that is at least six figures and probably more. He wears the perfect suits, he eats in the best restaurants, and he comes close to having the perfect business cards, though this is a field of great competition among the vice-presidents. Like the other vice-presidents he does everything so perfectly that they are really impossible to differentiate him from the others and themselves have problems telling each other apart. Bateman's one distinguishing characteristic is his hobby of sado-masochism and murder. If Patrick Bateman really did inhabit his body he might have some feelings about the killing, but as he sees himself as an empty shell he might as well enjoy the momentary respite from total monotonous boredom.
Much of the film is just a view into the wealthy lifestyle with people who feel no human emotion but greed. They go to absurd lengths to get reservations at the finest restaurants but will return only to those whose bathrooms that have the best facilities for snorting cocaine. Bateman takes the luxury a step further with a home gymnasium where he can exercise to the strains of THE TEXAS CHAINSAW MASSACRE and pornographic movies. Every once in a while he will do in a homeless beggar or a co-worker. At work he seems to do little real work beside tell his secretary (Chloe Sevigny, Oscar-nominated for BOYS DON'T CRY) what to wear. He has a fiancee (Reese Witherspoon) and a mistress (Samantha Mathis). Both are very spacey though it is a little harder to tell with the fiancee since her condition does not come from chemicals.
Christian Bale plays his role cool, making seamless shifts from dapper to ripper. But he seems really to enjoy his hobby of killing. Reese Witherspoon has just a small part, but now every role she takes reminds me of the high school prig she played in ELECTION. Willem Dafoe plays a police detective is the traditions of Columbo.
It is curious how this film echoes other recent films. Bateman's descent from the rich and stylish into his netherworld of violence resonates with a similar descent in EYES WIDE SHUT. In this film Bateman readily tells people that his hobby is murder, but people just do not connect with him as we saw in GROSSE POINT BLANK and THE SIXTH SENSE. Bateman's money seems to go into entertainment gadgets, not unlike the people we saw in BOILER ROOM. One could even say that Bateman's secret anti-social actions resound with THE FIGHT CLUB.
This is a film that makes a sharp, strong, but surprisingly simple statement. But perhaps the one statement is less than we should expect for a feature-length film. I rate this a 6 on the 0 to 10 scale and a +1 on the -4 to +4 scale.
Mark R. Leeper<EMAIL_ADDRESS>Copyright 2000 Mark R. Leeper
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


Regras de varredura passiva
As seguintes regras de verificação passiva de qualidade alfa estão incluídas neste complemento:
Erros da aplicação
Checar respostas do servidor para HTTP 500 - respostas do tipo Internal Server Error ou aquelas que contêm uma string de erro conhecida.
Controle de cache
Verifica os cabeçalhos das respostas "Cache-Control" e "Pragma" conferindo se usam as configurações de melhores práticas do setor para proteção de conteúdo.
At MEDIUM and HIGH thresholds only non-error or non-redirect text responses (excluding JavaScript) are considered.
At LOW threshold all responses apart from images and CSS are considered including errors and redirects.
Falta de Tipo de Conteúdo
Raises an alert if the response is lacking a Content-Type header or if the header exists but the value is empty.
Cookie HttpOnly
Ensures that as cookies are set they are flagged HttpOnly. The HttpOnly flag indicates to browsers that the cookie
being set should be acted upon by client side script (such as JavaScript).
Flag de segurança de Cookie
Looks for cookies set during HTTPS sessions, raises an alert for those that are set but do not include the secure flag.
A cookie set with the secure flag will not be sent during a plain HTTP session.
Inclusão de Script de Domínio Cruzado
Validates whether or not scripts are included from domains other than the domain hosting the content.
By looking at the "src" attributes of "script" tags in the response.
Allowed Cross-Domain scripts:
- Any script with a non-empty "integrity" attribute is ignored - the integrity value is not checked as this will be checked by the browser
- At MEDIUM and HIGH thresholds if a script URL falls within a context that also includes the URL of the base message no alerts will be raised.
Proteção de header XSS
Checks for the existence of and value/setting of the X-XSS-Protection header.
This response header can be used to configure a user-agent's built-in reflective XSS protection.
At MEDIUM and HIGH thresholds only non-error or non-redirect HTML responses are considered.
At LOW threshold all text responses are considered including errors and redirects.
Conteúdo misto
For content served via HTTPS analyse all the src attributes in the response looking for those sourced
via plain HTTP.
Preenchimento automático de senha
Looks for "password" type input fields and checks for the setting "autocomplete=off".
Exposição de endereço privado
Checks the response content for inclusion of RFC 1918 IPv4 addresses as well as
Amazon EC2 private hostnames (for example, ip-10-0-56-78). This information can give an attacker
useful information about the IP address scheme of the internal network, and might be helpful for
further attacks targeting internal systems.
Id de sessão na URL Rewrite
This scanner checks for the existence of session token type parameters being rewritten to the URL.
To help reduce false positives the scanner checks the length of the token value, if the value of the parameter
is not greater than 8 characters in length then the parameter is ignored
(i.e.: survey?sId=5 would not be flagged as vulnerable).
X-Content-Type-Options
This scanner check for the Anti-MIME-Sniffing header X-Content-Type-Options and ensures it is set to 'nosniff'.
At MEDIUM and HIGH thresholds this scanner does not alert on client or server error responses or redirects.
At LOW threshold it will alert on all responses including errors and redirects.
thresholds it alerts on all response types if the header is missing or set to something other than 'nosniff'.
X-Frame-Options Header Scanner
This scanner checks for the existence and validity of the X-Frame-Options header.
At MEDIUM and HIGH thresholds this only looks at non-error or non-redirect HTML responses.
At LOW threshold it looks at all text responses including errors and redirects.
The following conditions may result in an alert:
- X-Frame-Options Header Not Set: If the X-Frame-Options header is missing from the response completely.
- Multiple X-Frame-Options Header Entries: When more than one X-Frame-Options header is detected on the response.
- X-Frame-Options Defined via META (Non-compliant with Spec): A "http-equiv" entry was found in the response that attempts to define X-Frame-Options, which is not supported by the specification.
- X-Frame-Options Setting Malformed: The header is present with no value, or the value is not as expected (i.e.: other than "DENY", "SAMEORIGIN", or "ALLOW-FROM").
By default no alerts will be raised in the response includes a Content-Security-Policy 'frame-ancestors' element as this take precedence over the X-Frame-Options header.
However at LOW threshold the above issues will still be reported but at a LOW risk.


Next: License
Up: Introduction
Previous: Requirements
QDeblend
is designed for scientific use in the astronomy community. Thus, we assume that the target operating system will be a Linux/Unix system. Please follow the steps outlined below to install QDeblend
on your system.
- 1.
- Download the compressed archive from http://sourceforge.net/projects/qdeblend/ and unpack the tar-ball in a directory of your choice (DIR)
- 2.
- Add DIR to your PYTHONPATH environment variable of your login shell:
setenv PYTHONPATH DIR:${PYTHONPATH}
for the (t)csh shell or
export PYTHONPATH=DIR:$PYTHONPATH
for the bash shell
- 3.
- Copy the file QDeblend3D into a directory of your PATH environment variable (/home/user/bin/ for example) and add the execute access to the file permissions:
cp DIR/QDeblend3D /home/user/bin/
cd /home/user/bin/
chmod ugo+x QDeblend3D
- 4.
- Now, you can run QDeblend
from any directory with the command
QDeblend3D
Python and Qt are cross-platform compatible, so that the installation guide above may be modified by experienced users for their own operating system, e.g. MacOS or MS Windows. Please report your adopted scheme, so that the manual can be updated in the future.
Bernd Husemann
2011-04-07


On every team, defenders are the last line of defense except for the goalie. Defenders have to be able to be quick, calm, and able to take the ball away from, or "tackle" as it is officially called, an attacker. A successful tackle will see the attacker disposessed, but will not foul the attacker. Many defenders will also come up on the attack to aid the attacking players in scoring goals.
| Position Name // Notation | Role | Notable Player(s) |
|---|---|---|
| Center Back // CB | As the heart of the defense, the center back is responible for directing his back line to ensure the goalie doesn't need to make a save. | Sergio Ramos, Gerard Pique, Diego Godin |
| Left & Right Back // LB & RB | Playing next to the center backs, the left and right backs look to secure the wide areas of the field. It is not rare to see a left or right back go up the wings during an attack. | Marcelo, Dani Alves, Alex Sandro |
Unbelievable Saves Video by FootoZ
The video nearby is a highlight reel including amazing goal line saves from defenders. These kinds of saves are very rare, and always amazing, as although the goalkeeper has been defeated, the defender has managed to prevent the ball from splashing in the back of the net.
More famous defenders:
Gerard Pique is one of the best defenders in the world. Some of his best attributes are his height, speed, and physicality. Defenders need to be fast so that attackers can't just speed past them. He also goes onto the attack for corner kicks. Because of his height at six foot four, he is able to get more height than other people, and he increases his chance of scoring a goal.
Pique is also able to stay calm under pressure. While defending 1 on 1, staying calm and not overcommiting is very important because if you overcommit the attacker will go right by you and score. It is important to just slow the attacker down and let your support get back to help you.
Gerard Pique (right), guarding Neymar (left), Courtesy of Wikipedia


Michael Helmbrecht
A product designer, plus developer & marketer. A proud generalist who adapts to the situation.
Current work
Lead designer
Archipelago · January 2019–Now
Designing products, processes, & features for a new data-centric application for commercial real estate insurance.
Founded the design team!
Previous work
Product lead & engineer
Kidfund · January 2017–January 2019
Designed & developed new product features in collaboration with founders.
Started with product vision and insights obtained from conducting user interviews. Defined new & updated features, then designed UX through visuals & wrote copy. Quickly validated designs with users. Finished by implementing changes to the iOS app & shipping to the App Store.
Designer & developer marketer · Realm · July 2015–January 2017
Designed & built website, including marketing pages & developer documentation. Wrote website copy. Directed branding.
Advised strategy for developer-focused content marketing. Edited blog posts for tone & technical correctness.
iOS developer · Motiv · May 2014–February 2015
Developed iOS apps & device SDK for wearable device.
Designer · Fino Consulting · August 2013–May 2014
Designed iPad apps for teachers & energy salespersons.
Contact
My inbox is always open at me@mrh.is!


CWP No. 28772 of 2019 (O&M) -1- IN THE HIGH COURT OF PUNJAB AND HARYANA AT CHANDIGARH CWP No. 28772 of 2019 (O&M) Date of decision: 3.10.2019 M/s Palco Ice Cream .. Petitioner vs State of Haryana and another .. Respondents
Coram: Hon'ble Mr. Justice Rajiv Sharma, Acting Chief Justice Hon'ble Mr. Justice Harinder Singh Sidhu Present Mr. Raghav Sharma, Advocate, for the petitioner. Rajiv Sharma, Acting Chief Justice.
Show cause notice was issued to the petitioner unit by the Haryana State Pollution Control Board, Regional Office, Panchkula Region, vide letter dated 21.8.2019 (Annexure P7).
According to the impugned order dated 16.9.2019 (Annexure P9), issued by the Haryana State Pollution Control Board, Panchkula, the petitioner Unit has chosen not to file any reply to the show cause notice. In these circumstances, the Regional Officer, Panchkula, on 16.9.2019, has taken action against the petitioner Unit under Section 33-A of the Water (Prevention & Control of Pollution) Act, 1974 and under Section 31-A of the Air (Prevention & Control of Pollution) Act, 1981, to close down the same in response to the recommendation of the Regional Officer, Panchkula, vide letter dated 28.8.2019.
However, in the interest of justice, this petition is disposed of with a direction to the petitioner to file the application before the Haryana 1 of 2 ::: Downloaded on - 07-10-2019 00:15:12 ::: CWP No. 28772 of 2019 (O&M) -2- State Pollution Control Board to obtain no objection certificate within a period of one week, thereafter the same shall be considered by the Haryana State Pollution Control Board within a period of one week.
(Rajiv Sharma)
Acting Chief Justice
3.10.2019 (Harinder Singh Sidhu)
vs Judge
Whether speaking/ reasoned Yes/No
Whether Reportable Yes/No
2 of 2
::: Downloaded on - 07-10-2019 00:15:12 :::


Choose a drift-Maxwellian distribution
|
(11) |
with
. Then the derivative of the distribution function with
respect to the velocity in the resonant region will be positive. This is the
case where an inverse Landau damping is expected to appear.
Figure 3 compares the velocity distribution function at
and
, which shows that the distribution
is flatted in the resonant region
. Figure 4 plots
the temporal evolution of the total kinetic energy of the particles, which
confirms that the kinetic energy is reduced by the wave.
Figure 3:
Comparison of the velocity distribution function
(spatially averaged) at various time, which shows that the distribution is
distorted in the resonant region (
). Other parameters:
,
.
|
Figure:
Temporal evolution of the total kinetic energy of
the particles, where
, is the initial total kinetic energy. Other
parameters:
,
.
|
yj
2016-01-26


Page Zero
Swipe Left to go to next page.
Gallery Solution
Page One
Swipe Left to go to next page.
Swipe Right to go to previous page.
Gallery Solution
Page Two
Swipe Right to go to previous page.
Gallery Solution


OAuth 2.0 vs SAML 2.0
28 Jun 2017“Log in with Facebook”, “Log in with Google”. I think these are the two buttons which really makes us happy whenever we see them on any application we newly install or web application we browse. The reason being, we don’t have to go through the long process of creating an account for that application OR remembering the username/password for that particular application. So how does this “Log in with Google” thing works? The short answer is they have implemented something called as Single-Sign On (SSO) solution. And in this blog post, I am writing about OAuth and SAML, the two specifications used in order to achieve single-sign on user experience.
SAML 2.0 Basics
Security Assertion Markup Language 2.0 is a version of SAML standard for exchanging authentication and authorization data between security domains. SAML 2.0 is an XML-based protocol that uses security based tokens containing assertions to pass information about the user between the web server you are trying to access information on and the service provider. In SAML 2.0 specification there are three main actors:
- Service Provider (Resource Server): This is the web server you are trying to access information on.
- Client: Your web browser
- Identity Provider (Authorization Server): This is the server that owns the user credentials and identity.
SAML 2.0 Workflow
A simple SAML workflow inorder to understand the process better can be shown as below:
The above example can be described in words as:
- First I click on “login with SSO”. This is similar to clicking on login with Facebook on your web browser.
- Then the application server which receives the login request generates the authentication request to be sent to the Authorization server.
- Now the application server makes an HTTP Post request with an Authentication request to the authorization server.
- This authentication request is then verified on the authorization server.
- Now once verified, the authorization server redirects the user’s browser session on its login page.
- This is where the user inserts his/her username/password for facebook (for example) on the login page.
- Now if the credentials for that user are verified on authorization server (for example Facebook side), then and only then the authorization server at Facebook will generate a SAML token.
- The user is now redirected to the web application with the SAML Token.
- Using this SAML token the application authenticates the user using Facebook credentials and still does not store user’s username/password.
Limitations about SAML 2.0
There are certain cases where SAML specification does not work or to be specific I should say difficult to make it work. One case is for Thick Client or Native applications. Because in this case, Step 8, is difficult to achieve. In the above example Step 8 is achieved by using HTTP Redirect binding. This makes the user redirected back to the mentioned URL. However, this cannot be achieved when we are dealing with a native application installed on your machine or a mobile application installed on your phone. One harder way in order to get this working is to scrape the SAML token from the HTTP request coming from the authorization server using a proxy server in between. Once you pull out the SAML token you can make an HTTP request using this token in order to get access.
OAuth Basics
Unlike SAML 2.0, OAuth 2.0 is a protocol for authorization. It focuses on how to deliver authorization flows for web applications, desktop applications, mobile phones and other devices. In OAuth there are following main actors:
- Service Provider (Resource Server): This is the web server you are trying to access information on.
- Client: It can be the browser based web application, mobile application, desktop application or even a server-side application.
- Identity Provider (Authorization Server): This is the server that owns the user identities and credentials. It’s who the user actually authenticates and authorizes with.
OAuth Workflow
A simple OAuth workflow in order to understand the process better can be shown as below:
- First I click on “login with Facebook” on Spotify mobile app.
- The Service Provider at Spotify gives me an authorization grant in order to login with Facebook.
- Now, my mobile app will use this authorization grant in order to request an access token from the Identity Provider, in our example, Facebook.
- Facebook checks whether the authorization grant is valid and grants the access token if valid. This access token is now used by the client (in our case Spotify mobile app)
- Now, when Spotify (Service Provider) receives this access token, it might not directly let you access the app as logged in user. It will validate this access token again with Facebook. If Facebook finds this token valid, then and only then it will send back the user information to Spotify.
- After successful validation of access token, Spotify logs in the user with his/her Facebook credentials without owning the user’s username/password.
This is the most common OAuth flow. There are various other things about OAuth such as refresh tokens, where the client asks for refresh tokens to the Authorization server instead of again authenticating itself via the common OAuth flow, but I am keeping this post an introductory to Single-Sign On process.
The difference between SAML 2.0 and OAuth 2.0 here is, OAuth does not assume that the client is a web browser. And also in the OAuth flow, the token is sent in the HTTP redirects as the query parameter. Hence it is easy to absorb on the application side too. Other difference is SAML 2.0 has the identity information in the SAML token itself, while OAuth token does not have that. It again has to validate the token against the Identity provider which increases the request/response overhead but is more SECURE.
This is it for now on SAML & OAuth. Now that we are on this topic would just like to tell you there is something more called “OpenID Connect” similar to SAML & OAuth. I will leave you here to search about it.
References:


select * from table limit 10;
GROUP BY: aggregate many rows into 1
How many products we sold?
SELECT
productId,
sum(Quantity) as total_sales
FROM OrderDetails
GROUP BY productID;
SELECT
productId,
sum(Quantity) as total_sales,
avg(Quantity) as avg_sales,
FROM OrderDetails
GROUP BY productID;
Can still use where, comes before group by To conditionally include aggregates, use having


LEISURE: Women's world of quilts
by MARGARETTA WA GACHERUIn Summary
- Storytelling: Not all the squares could fit on their quilt, but those that did told stories in multicoloured threads about women’s struggles with domestic violence, child labour, early pregnancy and walking long distances every day.
Delegates who attended the International Conference on Population and Development at the Kenyatta International Convention Centre in Nairobi last week got to see stories of strong women, told on fabric.
Their experiences were graphically illustrated in an exhibition of hand-crafted quilts curated by The Advocacy Project, a humanitarian group that helps marginalised people tell their stories and raising public awareness of their issues.
The exhibition, titled A Women’s World, consisted of 20, 2.5m by 2.5m, quilts hand-crafted by women from all over the world.
Two had been created by Kenyans, one by women from Kibera and Kangemi, the other from Pokot and Samburu. The other countries represented were Bangladesh, DRC, France, India, Jordan, Mali, Nepal, Uganda, Vietnam and Zimbabwe.
The Advocacy Project was founded by former journalist Iain Guest.
“Often it is people working at the community level who are the most capable of creating change, yet it is their stories that are rarely heard, which is why we started the Advocacy Project,” said Guest.
Also Read
-
GALLERIES: When drawing is just the beginning
-
Mkapa: My life, my purpose
-
GALLERIES: Drawing as an aid to understanding
Advertisement
“When I realised we would be coming to Kenya to participate in ICPD, I contacted Gill Rebelo,” said Guest, referring to the current chairperson of the Kenya Quilt Guild.
It was short notice, but he hoped Rebelo, working with women in the community, could make a quilt to exhibit at ICPD and thereafter be given to the United Nations to become part of its permanent collection.
The Quilt Guild was already working with one women’s group based in Gachie on the outskirts of Nairobi. But Rebelo needed to assemble a new group so she gathered 22 young women from Kibera and Kangemi.
None had ever quilted before she introduced them to Christine Kibucka, a master craftswoman from Uganda, who taught them not just how to embroider but also how to translate some of the challenges they face into picture stories that they could stitch onto denim squares, and finally onto one large quilt.
Not all the squares could fit on their quilt, but those that did told stories in multicoloured threads about women’s struggles to deal with issues like domestic violence, child labour, early pregnancy and walking long distances every day to find clean water and firewood.
The second quilt at ICPD was from northeastern Kenya, and was about conflict resolution among the Pokot and Samburu. That quilt was crafted by four women, two Pokot and two Samburu.
At the closing ceremony of the conference, the quilt was given to the United Nations representative to take to New York, where it will be hung at UN Headquarters.


Whether it is Google, Yahoo, or Safari, many cannot imagine life today without access to search engines on the internet. Search gives us access to an infinite volume of information at our fingertips. This was not always the case. Before developing the technology, software engineers and programmers had to work tirelessly to convince investors that it will bring in sufficient revenue but it did not take very long before they proved their success.
Yahoo was created when two young electrical engineering students were looking for a way to win a Stanford University basketball league. They unknowingly took the first steps to “search”. Yahoo kicked off the web boom. Many startups began releasing new software and search engines, one of these being Excite which was founded by two tech-savvy Stanford students. The internet was booming and the competition was extremely high.
Excite wanted to partner with Google’s search technology to surpass yahoo who was dominating the search engine nation. Google was still very new at the time but had impressive technology that Excite wanted access to but after comparing the two searches side by side, Excite decided not to move forward because they did not see the potential of search. In hindsight they regretted the decision of passing on purchasing Google for only one million dollars at the time. Google then went on to become one of leading search engines in the world.
Revenue was a huge concern for Google’s investors because the site’s search page did not run ads but once they saw the potential and the range of audience the search engine was able to reach, investors quickly changed their minds. They then focused their work on mimicking the yellow pages in Search with tags and keywords. They attempted to collaboration with Overture but the two companies did not see eye-to-eye. Google then went to work on Adworks which was similar to the work Overture did. Overture then sued Google for copying their technology. Both companies eventually settled but it led to tension between them.
Google went public in 2004 and their stocks rapidly grew to surpass Yahoo, Overture and every other search engine of the time. Nonetheless, they continue to grow and expand their margins to stay at the top to surpass their top competitors such Microsoft.


Annotation Type ParserConfig
Parser
, InputStreamParser
, and ReaderParser
.
Used primarily for specifying bean configuration properties on REST classes and methods.
See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionAuto-close streams.Binary input format.Debug output lines.File charset.Class<? extends ParserListener>
Parser listener.int
Optional rank for this config.Input stream charset.Strict mode.Trim parsed strings.Unbuffered.
-
Element Details
-
rank
int rankOptional rank for this config.Can be used to override default ordering and application of config annotations.
- Returns:
- The annotation value.
- Default:
- 0
-
binaryFormat
Binary input format.When using the
Parser.parse(Object,Class)
method on stream-based parsers and the input is a string, this defines the format to use when converting the string into a byte array."SPACED_HEX" "HEX" (default)"BASE64"
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
autoCloseStreams
Auto-close streams.If
"true" ,InputStreams andReaders passed into parsers will be closed after parsing is complete."true" "false" (default)
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
debugOutputLines
Debug output lines.When parse errors occur, this specifies the number of lines of input before and after the error location to be printed as part of the exception message.
Notes:
- Format: integer
- Default: 5
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
listener
Class<? extends ParserListener> listenerParser listener.Class used to listen for errors and warnings that occur during parsing.
See Also:
- Returns:
- The annotation value.
- Default:
- org.apache.juneau.parser.ParserListener.Void.class
-
strict
Strict mode.If
"true" , strict mode for the parser is enabled.Strict mode can mean different things for different parsers.
Parser class Strict behavior All reader-based parsers When enabled, throws ParseExceptions
on malformed charset input. Otherwise, malformed input is ignored.JsonParser
When enabled, throws exceptions on the following invalid JSON syntax: - Unquoted attributes.
- Missing attribute values.
- Concatenated strings.
- Javascript comments.
- Numbers and booleans when Strings are expected.
- Numbers valid in Java but not JSON (e.g. octal notation, etc...)
"true" "false" (default)
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
trimStrings
Trim parsed strings.If
"true" , string values will be trimmed of whitespace usingString.trim()
before being added to the POJO."true" "false" (default)
Notes:
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
unbuffered
Unbuffered.If
"true" , don't use internal buffering during parsing.This is useful in cases when you want to parse the same input stream or reader multiple times because it may contain multiple independent POJOs to parse.
Buffering would cause the parser to read past the current POJO in the stream."true" "false" (default)
Notes:
-
This only allows for multi-input streams for the following parsers:
It has no effect on the following parsers:
MsgPackParser
- It already doesn't use buffering.XmlParser
,HtmlParser
- These use StAX which doesn't allow for more than one root element anyway.- RDF parsers - These read everything into an internal model before any parsing begins.
-
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
fileCharset
File charset.The character set to use for reading
Files from the file system.Used when passing in files to
Parser.parse(Object, Class)
.Notes:
-
"DEFAULT" can be used to indicate the JVM default file system charset. -
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
-
streamCharset
Input stream charset.The character set to use for converting
InputStreams and byte arrays to readers.Used when passing in input streams and byte arrays to
Parser.parse(Object, Class)
.Notes:
-
"DEFAULT" can be used to indicate the JVM default file system charset. -
Supports VarResolver.DEFAULT (e.g.
"$C{myConfigVar}" ).
See Also:
- Returns:
- The annotation value.
- Default:
- ""
-
-


from cis_interface.drivers.ConnectionDriver import ConnectionDriver
from cis_interface.drivers.ClientResponseDriver import ClientResponseDriver
# ----
# Client sends resquest to local client output comm
# Client recvs response from local client input comm
# ----
# Client request driver recvs from local client output comm
# Client request driver creates client response driver
# Client request driver sends to server request comm (w/ response comm header)
# ----
# Client response driver recvs from client response comm
# Client response driver sends to local client input comm
# ----
# Server recvs request from local server input comm
# Server sends response to local server output comm
# ----
# Server request driver recvs from server request comm
# Server request driver creates server response driver
# Server request driver sends to local server input comm
# ----
# Server response driver recvs from local server output comm
# Server response driver sends to client response comm
# ----
CIS_CLIENT_INI = b'CIS_BEGIN_CLIENT'
CIS_CLIENT_EOF = b'CIS_END_CLIENT'
[docs]class ClientRequestDriver(ConnectionDriver):
r"""Class for handling client side RPC type communication.
Args:
model_request_name (str): The name of the channel used by the client
model to send requests.
request_name (str, optional): The name of the channel used to
send requests to the server request driver. Defaults to
model_request_name + '_SERVER' if not set.
comm (str, optional): The comm class that should be used to
communicate with the server request driver. Defaults to
tools.get_default_comm().
comm_address (str, optional): Address for the server request driver.
Defaults to None and a new address is generated.
**kwargs: Additional keyword arguments are passed to parent class.
Attributes:
comm (str): The comm class that should be used to communicate with the
server request driver.
comm_address (str): Address for the server request driver.
response_drivers (list): Response drivers created for each request.
"""
_is_output = True
def __init__(self, model_request_name, request_name=None,
comm=None, comm_address=None, **kwargs):
if request_name is None:
request_name = model_request_name + '_SERVER'
# Input communicator
icomm_kws = kwargs.get('icomm_kws', {})
icomm_kws['comm'] = None
icomm_kws['name'] = model_request_name
kwargs['icomm_kws'] = icomm_kws
# Output communicator
ocomm_kws = kwargs.get('ocomm_kws', {})
ocomm_kws['comm'] = comm
ocomm_kws['name'] = request_name
if comm_address is not None:
ocomm_kws['address'] = comm_address
ocomm_kws['no_suffix'] = True
ocomm_kws['is_client'] = True
ocomm_kws['close_on_eof_send'] = False
kwargs['ocomm_kws'] = ocomm_kws
# Parent and attributes
super(ClientRequestDriver, self).__init__(model_request_name, **kwargs)
self.env[self.icomm.name] = self.icomm.address
self.response_drivers = []
self.comm = comm
self.comm_address = self.ocomm.opp_address
self._block_response = False
@property
def last_header(self):
r"""dict: Information contained in the header of the last message
received from the client model."""
if self.icomm._last_header is None:
raise AttributeError("No new requests have been received, so there "
+ "does not yet exist information required for "
+ "creating a response comm and fowarding the "
+ "request.")
return self.icomm._last_header
@property
def request_id(self):
r"""str: Unique ID for the last message."""
return self.last_header['request_id']
@property
def model_response_address(self):
r"""str: The address of the channel used by the client model to receive
responses."""
return self.last_header['response_address']
@property
def request_name(self):
r"""str: The name of the channel used to send requests to the server
request driver."""
return self.ocomm.name
@property
def request_address(self):
r"""str: The address of the channel used to send requests to the server
request driver."""
return self.ocomm.opp_address
[docs] def close_response_drivers(self):
r"""Close response driver."""
# To force response server to connect after response client has stopped
# self.sleep(0.5)
with self.lock:
self.debug("Closing response drivers.")
self._block_response = True
for x in self.response_drivers:
x.terminate()
self.response_drivers = []
[docs] def close_comm(self):
r"""Close response drivers."""
self.close_response_drivers()
super(ClientRequestDriver, self).close_comm()
[docs] def printStatus(self, *args, **kwargs):
r"""Also print response drivers."""
super(ClientRequestDriver, self).printStatus(*args, **kwargs)
for x in self.response_drivers:
x.printStatus(*args, **kwargs)
[docs] def before_loop(self):
r"""Send client sign on to server response driver."""
super(ClientRequestDriver, self).before_loop()
# self.sleep() # Help ensure that the server is connected
self.debug("Sending client sign on")
super(ClientRequestDriver, self).send_message(CIS_CLIENT_INI,
header_kwargs={'raw': True})
self.ocomm._send_serializer = True
# self.info("%s: before loop complete", self.name)
[docs] def send_message(self, *args, **kwargs):
r"""Start a response driver for a request message and send message with
header.
Args:
*args: Arguments are passed to parent class send_message.
**kwargs: Keyword arguments are passed to parent class send_message.
Returns:
bool: Success or failure of send.
"""
if self.ocomm.is_closed:
return False
# Start response driver
is_eof = kwargs.get('is_eof', False)
if not is_eof:
with self.lock:
if (not self.is_comm_open) or self._block_response: # pragma: debug
return False
drv_args = [self.model_response_address]
drv_kwargs = dict(comm=self.comm, msg_id=self.request_id,
request_name=self.name)
self.debug("Creating response comm: address = %s, request_id = %s",
self.model_response_address, self.request_id)
try:
response_driver = ClientResponseDriver(*drv_args, **drv_kwargs)
self.response_drivers.append(response_driver)
response_driver.start()
self.debug("Started response comm: address = %s, request_id = %s",
self.model_response_address, self.request_id)
except BaseException: # pragma: debug
self.exception("Could not create/start response driver.")
return False
# Send response address in header
kwargs.setdefault('header_kwargs', {})
kwargs['header_kwargs'].setdefault(
'response_address', response_driver.response_address)
kwargs['header_kwargs'].setdefault('request_id', self.request_id)
return super(ClientRequestDriver, self).send_message(*args, **kwargs)