In late 1887 Bernard Berenson left Boston for his first tour of Europe. This gifted young man--the child of Lithuanian Jewish parents who had immigrated to America after his birth--had had his way paid to Harvard by Boston Brahmin families impressed by his potential for cultivation. After his graduation, wealthy patrons supplied him with the means for the appropriate next step in a career of self-civilization: the European Wanderjahre, sequel to the old-fashioned Grand Tour. Having already travelled to France, to England, and to Germany, Berenson in the summer of 1888 descended into what his biographer Ernest Samuels calls "the fabled art cities of Italy," where his travel took on a sharper focus. Lengthening out his stay, Berenson made a rapturous tour of Italian artistic monuments both on and off the beaten path. (Samuels's phrase for his swing through Pesaro, Urbino, Gubbio, Città di Castello, San Sepolcro, and back to Florence--"a strenuous and highly methodical campaign and the prelude to many similar bone-wearying tours in quest of paintings and architecture"--will suggest the blend of ardor and discipline that drove these travels.) In the course of his researches he met the principal art historians of contemporary Italy--Giovanni Cavalcaselle and Giovanni Morelli, chief exponents of the new, more scientific form of art historical study. He also developed, under the weight of his accumulating art-historical exper-tise, an increasing mental distance from his adopted home: to a patron from the self-appointed culture capital Boston he wrote that Boston now appeared provincial to him, not the metropolis but that culturally impoverished opposite of the center called "the colonies." By Berenson's account, these new alienations and devotions came to a head in 1890, when, sitting in a Bergamo café with his Italian-Peruvian friend Enrico Costa, he found his life-structuring mission:
Nobody before us has dedicated his entire activity, his entire life to connoisseur-ship.... We shall give ourselves up to learning to distinguish between the authentic works of an Italian painter of the fifteenth and sixteenth century, and those commonly ascribed to him. We must not stop until we are sure that every Lotto is a Lotto, every Cariani a Cariani, every Santacroce a Santacroce. 1
A second emblematic incident occurs within a year of Berenson's finding of his vocation but has a very different cast. In 1891 the superintendent of police in New Orleans (in John Higham's words) "was murdered under conditions which pointed to the local Sicilian population." Egged on by both city officials and the media, the police rounded up a number of Italian suspects, who were quickly put on trial. "But when some of the accused were tried," Higham continues, "the jury (which may have been suborned) stunned the city by refusing to convict. While officials stood idly by, a mob proceeded to 'remedy the failure of justice' by lynching eleven Italian suspects." In the wake of this nationally publicized event the United States had an Italian-based version of the Big Red Scare. Italy withdrew its ambassador from Washington in protest over the lynchings; an impending attack by the Italian fleet became a subject of popular rumor and fear; and workers in places remote from New Orleans went on strike, demanding that their employers rid the workforce of a hated Italian presence. 2
The topic of this essay is the image of Italy in American culture on the verge of modernity. I start with these two episodes because it seems to me that the main point to be made is that there were not one but two images of Italy in late nine-teenth-century America, for which my initial examples can stand as synecdoches. The decisive fact about Italian American relations in the postbellum period is that contact between these cultures became greatly extended at this time, but in two starkly different modalities. On the one hand, this is the time of the birth of modern tourism, so that many more Americans "saw Italy" in the last decades of the nineteenth century than had ever done so before. (The touristic influx of Americans to Italy, still a comparative trickle in the days of Margaret Fuller or Hawthorne in the 1840s and 1850s, had taken on the dimensions of an organized mass migration by the 1890s, when Henry James said of afternoon life in Venice, "the bark of Chicago disturbs the siesta.") 3 On the other hand, the same decades that saw the institutionalization of European tourism also saw the beginning of mass immigration from Italy to the United States, so that Americans at this time also began in new measure to encounter an Italy in their own home.
As a result, American relations with Italy in the Gilded Age took the form of a rapidly developing traffic with two phases at once weirdly symmetrical and sharply antithetical: the movement, in one set of boats, of American pilgrims to the shrines of artistic culture, located in the land that another set of pilgrims was at that same moment leaving, in another set of boats, in search of a better life in the first group's land. But the traffic with Italy at this time did not entail physical relocations alone. The drama of the American encounter with Italy in the Gilded Age consisted partly in a growing mutual contact, but partly too in the elab-oration of the cultural conceptions of "Italy" through which this contact was imaginatively managed, mediated, and mastered. Berenson saw Italy through one American idea of "Italy" fashioned by the culture of his time. The New Orleans lynchers saw Italians through another contemporaneously constructed American idea of "the Italian." To understand America's Italy in the Gilded Age is to understand how these experience-organizing conceptions were brought to social life.
The cultural frame through which Berenson selects and composes his Italy might for convenience be labeled the touristic-aesthetic conception. This conception's founding tenet is that a high, possibly even supreme, experiential value is lodged in works of art, more especially in that special rank of works called the classic. Italy, a place where such works are found in thick abundance, becomes virtually synonymous with its artistic heritage in this conception, a quasi-sacred ground of art, and "visiting Italy" is then defined as the act of travelling from monument to aesthetic monument to make visual and spiritual contact with the value they contain.
As Goethe's wanderings might remind us, the aesthetic-touristic conception of Italy did not originate in the second half of the nineteenth century. But in America, it acquired a greatly augmented cultural dissemination and power at that time, when its rise has everything to do with the emergence of a new-model gentry class. 4 To summarize this history very quickly: The period after the mid-1850s saw the coming together of a new kind of upper order in America, composed of members of the older local social elites, the owners of new industrial enterprises, and the elements of the mid-nineteenth-century middle class now moving into new professional and managerial positions. These groups were all in different ways beneficiaries of the new wealth generated in the United States through capitalist and industrial development. But the same transformations that brought these groups new fortunes also destabilized the older grounds and markers of American social hierarchy, so that after mid-century such groups were linked not just by their incomes but by their shared need to confirm their superior status in the unsettled social world American development helped bring into being. As has long been obvious, as it came to social coherence in the Gilded Age, this new upper class identified itself in an especially strong way with its new body of leisure practices, and it deployed its new recreations--serviceable evidences, in Thorstein Veblen's phrase, of its wealth and freedom from the need to work 5 --as chief weapons in its struggle to establish social distinction. The expensive new sports of the later nineteenth century--golf, yachting, tennis--embody one of the status-bearing leisure practices of this new class. Its expensive new vacation customs--visible in its summer houses and vacation colonies--are another such classifying habit. And this group's devotion to Culture--the nonproductive activity par excellence--formed another and no less central part of its work of social definition.
Devotion to and cultivation of the high arts had, of course, an association with an aristocratic class ethos long before the American Gilded Age. At the same time, Culture in this sense became an especially useful means for creating the social distinction sought by the upper orders in these years. In the nineteenth-century United States, to have physical access to high-order artistic creation--and still more, to have had the means to acquire the trained abilities needed to appreciate such art--signalled an enjoyment of social privileges and a freedom from material constraint reserved for the few. The possession of Culture had the further beauty of seeming to lift its owners out of the material orders in which it simultaneously advertised their preeminence in, marking them as devotees of "higher things" and superior to such vulgar concerns. For reasons both of sincere devotion to such culture and of its peculiar strategic value in securing social distinction, the American social elites of the later nineteenth century placed a special premium on their association with high art, investing their wealth, their civic energy, and their creativity especially heavily in this cause. This investment is witnessed in such upper-class social phenomena of the late nineteenth century as the unparalleled purchasing of classical art and the endowment of great social institutions to house it; the reformation of premier American universities that made the initiation of the children of the upper orders into the mysteries of the high arts one of their main educational functions (English and Art History departments in the modern academic sense have their birth in this development); the conspicuous deflection of gentry children of both sexes into work in the arts and arts management; and so on. 6
This excursion may seem like a digression from the question of Italy, but it is not; in the nineteenth century Italy took on one of its dominant American meanings through the history I have laid out. Touristic-aesthetic Italy--Italy rered as the Land of Art where the well-to-do can travel at leisure and cultivate aesthetic consciousness--is another projection of the upper-class American culture of the postbellum decades, in which one real social world is recast in the image of the interests of another. In the later nineteenth century and after, Italy primarily meant Art considered as a civilization-inducing (and distinction-conferring) value in those parts of American culture the new upper class succeeded in infusing with its sense of the world. Berenson's Wanderjahre have this social origin written all over them. Transplanted to Boston, spiritual capital of upper-class high-cultural piety in the United States in the 1870s and 1880s, and reaccul-turated there in the great high-culture-bearing institutions of the upper orders (the Harvard of Charles Eliot Norton and the Episcopal Church of Phillips Brooks), this one-time European returns to a Europe he now thinks of almost exclusively as a set of artistic treasures, the perfectly acquired knowledge of which will give purpose to his life. This is Italy: an Italy encountered in Europe but whose motivating social meaning has been made in America.
The second American Italy of the postbellum decades, the cultural frame that organized the responses of the New Orleans mob, might for symmetry be called alien-intruder Italy. This conception, a retouched version of a cliché of "dark Italy" in circulation at least since the Renaissance, drew its particular social energies from the late nineteenth-century history of immigration, a history apparently remote from, but at a deeper level entwined with, that of late nine-teenth-century elite class-formation. After all, the same economic transformation that produced the new wealth of America's best-off social segments also pro-duced the new positions that opened up at the lower end of the American economic ladder at this time; so that the immigrants who came in mounting waves to enlarge a new class of urban poor and low-wage workers were living at the other end of the same world of opportunity exploited by the contemporaneous leisure class. Italians arrived in large numbers in the United States through the operations of this history. There had of course been Italian immi-grants before these years, but Italian immigration notably accelerated in the mid-to-late 1880s, resuming again after the chill of the depression of 1893-94. This newly conspicuous group presence--most of it southern Italian 7 --reinforced the new idea of Italy that was growing in American minds, but again this idea did not only register real features of actual Italians.
Instead, Italians like the other immigrants of this time had complex meanings projected onto them from within the culture of the native-born, and were recruited into a symbolic cultural function among their other labors. 8 Economic transformations that had been underway at least since the 1830s had produced, by the mid-1880s, a sense of widespread crisis in America, a sense that something had gone deeply wrong with the American civic order. In the charged field of this sense of crisis, endlessly reinvigorated by the recurrent experiences of violent labor strife and menacing urban poverty, the new, more "foreign" immigrant of the 1880s could easily be read as the cause of the painful changes of the present, the foreign matter that had made the social body sick with troubling "modern" symptoms. The Italian immigrants of the late nineteenth century were largely read through this generalized image of the foreigner as agent of contemporary instability--as in the New Orleans lynching episode, where Italians are clearly being responded to as local targets of more general phobias. The proximity of this event to the Haymarket riot and anarchist trial of 1886-87 suggests that it replays a highly portable late-century scenario in which infiltrating strangers can be held accountable for American domestic woes. (The New Orleans mob adopted Italians from among the list of functionally interchangeable suspect ethnicities.) Lynching, the punishment mechanism in question, similarly shows Italians being assimilated into more general schemes for the ritual control of internal Others, since lynching was the main parajudicial rite for managing that chief "menace" of the American South, the black male.
In American thought of this time "the Italian" is often known as the dark or swarthy one, ethnic difference being in this way amalgamated with racial difference; "the Italian" is envisioned as the untidy, non-self-improving one, natural resident of the slum and natural doer of the most unskilled labor, and so is made a synecdoche for the lower classes; and "the Italian" is imagined as the organized murderer, and thus as a "cause" of violence in the world at large. 9 But these enduring prejudices only give minimally individuating "Italian" features to a core image of scarcely differentiated xenophobia. The Italian like other new arrivers in late nineteenth-century America is at root imagined simply as Foreigner, the American as Unamerican and Destroyer of Our Thing.
It needs to be emphasized that the antithetical conceptions of Italy as High Cosmopolitan Civilization and Low Domestic Barbarism were not just pieced together at almost the same time but coexisted in the same minds, supporting each other, paradoxically, through the structure of their opposition. In particular, the Undesirable Alien image frequently formed part of the same upper-class mind set that valorized cosmopolitan high culture in the late nineteenth century: so that one branch of the Bostonian Warren family sent Bernard Berenson to Italy while another branch was organizing the Immigrant Restriction League; and the same New York gentry who supplied an audience for Italian opera--rendered an upper-class, high cultural art form in the American organization of culture--also preferred that it be performed in German, to cleanse it of "low" ethnic associations. 10 Never before or since has American writing been so absorbed with the Italian as it was during the Gilded Age. I want to suggest that American literature was infused with Italy at this time in part because Gilded Age literary activity was so tightly bound to the social segment that had the Italian thus doubly on its mind. Its conceptions largely frame the "Italy" imagined in American writing, which imbibes them together with its surrounding culture of letters; and working through the images of Italy designed in this social niche can be said to be one function of American writing in the Gilded Age.
William Dean Howells won the status of principal living author or repre-sentative man of letters in the "serious" literary culture of his time, and his knowledge of Italy contributed directly to this success. Howells's first exposure to Italy came about by happy accident: he won the patronage post of United States Consul to Venice as the reward for authoring the 1860 campaign biography of his fellow midwesterner Abraham Lincoln. But if he came to Italy through the well-managed luck of the political draw, Howells grasped early on how he could use his Italian sojourn to help establish an American career. As has been shown elsewhere, Howells was sharply aware that a distinct high literary culture was being institutionalized in the United States in the early 1860s, and Howells spent the Civil War years in Venice filled with ambition to get into this new sphere. 11 In Italy he intuited the value that this emerging American cultural order attached to Italy, and so saw how he could exploit his knowledge of "Italy" as a career-founding resource. The event he later designated the turning point of his life, James Russell Lowell's 1863 acceptance of his essay "Recent Italian Comedy" for printing in the North American Review, shows Howells's canny guess that playing up his European artistic initiations would be the way to win acceptance into the cosmopolitan, art-valuing literary and social circles coalescing at this time. Howells did not unambivalently like living in Italy, but he threw himself undividedly into the task of writing Italy up for American audiences, and by this means made his way into the cultural world to which he aspired. The American publication of his Venetian Life led more or less directly to his hiring as assistant editor of the Atlantic Monthly, chief organ of the newly self-demarcated quality zone of literary production, and to his entrée into the social world of the Bostonian gentry. The early travel novels he soon serialized in the Atlantic--books like A Foregone Conclusion and The Lady of the Aroostook--similarly displayed knowledge of Italy in order to consolidate a high-cultural literary and an upper-class social status at home.
In the early 1870s, before he turned full-time to fiction writing, Howells had the bright idea that his first genre--touristic descriptive prose--could be wittily redirected from foreign subjects to the quotidian, contemporary home scene. His work of tourism-in-one's-own-home, Suburban Sketches , shows how early the other Italy of immigration enters his writing. This book's remarkable chapter "Doorstep Acquaintances" records, as a characteristic everyday phenomenon of the new urbanism, the experience of knowing people in passing, through casual encounters in anonymous public space. (These acquaintances are from across the doorstep, or from outside the home.) In this essay, the people one "knows" in Boston's suburban streets are largely Italian: a little tambourine-boy; the widow of a "Vesuvian lunatic" trying to collect money for her return home; a chestnut roaster; a religious image dealer who comes "da Lucca"; a Garabaldi-partisan scissors grinder; "a little old Genoese lady [who] comes to sell us pins, needles, thread, tape, and the like roba"; "dark-mooded, sad-faced" Neapolitan street musicians, including one who is "swarthiest of the organ-grinding tribe." 12
Finding that a competence acquired through cosmopolitan travel can have an unexpected second usefulness at home, Howells repeatedly speaks to these people in his excellent Italian, activating the pleasing fantasy that by his use of their language "we had made a little Italy together" (SS, 38). But the ironic awareness that there may be only a quite fictitious community between Italian touristic initiates and actual Italian immigrants--the awareness that speaking their language verbally may only conceal how little Howells "speaks their language" in any other sense--vaguely haunts this essay's self-satisfied exercises in multiculturalism; and at the end this awareness comes close to being fully faced. The last doorstep acquaintance gets brought within doors, where Howells offers him odd jobs to do. In this closer contact, the person speaks of his actual human needs, needs not at all shared by Howells: "What I want is a home." In response to this breach of decorum, Howells amazingly writes:
A sudden and unreasonable disgust for the character which had given me so much entertainment succeeded to my past delight....and I said to him: "Do you know now, I shouldn't care if I never saw you again?" (SS, 59)
Doorstep acquaintance here implicitly recognizes that it is a relation predicated on a nonrelation: that the pleasurable pseudo-intimacies of upper-class home-owners with the "different" people they meet in the streets have been based on the secure knowledge that they do not share a world in any real sense, and that these relations can be summarily terminated should such sharing actually threaten to develop.
When the Italy of cosmopolitanism meets the Italy of immigration next in Howells's work, Howells lodges his own experience in Suburban Sketches in a fictional character, where he can study its more general social meanings. Bromfield Corey, the patrician father in The Rise of Silas Lapham , has spent his young manhood in Italy, not (like Howells) through political fortune but through the standard operations of a class acculturation system. The son of a great Boston merchant, he is a moneyed person of a second generation, in which aptitude dissevers itself from a commercial activity no longer economically requisite and seeks the "higher," nonmaterial goods of cosmopolitan cultivation. In particular, Corey goes to Italy, an Italy envisioned as the sum of its famous art (while in Rome Corey has acquired a "theory of Titian's method"), 13 where he obtains the eminence-securing equipment suited to his generation of the American elite: the sense of the aesthetic derived from Italy, a sense that was highly expert yet carefully amateurish in its social manifestation, and that marks him as a member of the upper orders.
After Corey visits the place of business of the noncosmopolitan, ungentrified Silas Lapham, the industrialist paint magnate his son has gone to work for, he strolls
at his leisurely pace up through the streets on which the prosperity of his native city was founded, [where] hardly any re could have looked more alien to its life. He glanced up and down the facades and through the crooked vistas like a stranger, and the swarthy fruiterer of whom he bought an apple, apparently for the pleasure of holding it in his hand, was not surprised that the purchase should have been transacted in his own tongue. (RSL, 133)
In this vignette the language-sharing scene of Suburban Sketches gets replayed in a more satiric way, a way that underlines the social gaps thus verbally papered over and exposes the gesture's social origins. Speaking Italian to an Italian is here recognized as an unwitting expression of class: an expression of the leisure ("lei-surely pace") and aesthetic self-cultivation ("apparently for the pleasure") that differentiate Corey's social position both from the immigrant's lower-class one and from the equally "alien" commercial classes in whose district he wanders.
What is widely regarded as the climactic effort of Howellsian realism, the novel A Hazard of New Fortunes , is separated from The Rise of Silas Lapham by the span of years that saw the beginning of heavy southern Italian immigration to the United States. This historical shift is marked in literary terms by the fact that within this book old Bromfield Corey-like habits of cosmopolitan aestheticization get applied to scenes that reflect new mass immigration. Basil March, the center of consciousness of this novel, is not a patrician but a member of something like the professional-managerial upper middle class (he is an insurance executive when the book begins), another social fragment, the book notes, that identifies itself with its superior possession of culture and cultivation. ("They had traveled and seen much of the world, and they had formed tastes which they had not always been able to indulge, but of which they felt that the possession reflected distinction on them," Howells writes. "Their house had some good pictures, which her aunt had brought home from Europe in more affluent days, and it abounded in books on which he spent more than he ought.") 14 When the Marches move to New York, they are able to organize the spectacle of the city of foreigners largely through the class-specific schema of touristic-aesthetic cosmopolitanism that they share with Corey, as when "the rear of the tenement houses showed [March] the picturesqueness of clotheslines fluttering far aloft, as in Florence," or when, in Washington Square, "they met the familiar picturesque raggedness of southern Europe with the old kindly illusion that somehow it existed for their appreciation and that it found adequate compensation for poverty in this" (HNF, 259). (Here Howells's own earlier gesture of solidarity with the Italian is seen with a harshness that goes far beyond Corey's apple buying: "March thought he sufficiently expressed his tacit sympathy in sitting down on one of the iron benches with his wife, and letting a little Neapolitan put a superfluous shine on his boots" [HNF, 48].)
By this phase in his career Howells has succeeded in bringing to full con-sciousness the two of contemporary American life and the way a frame of perception learned through one of these culturally organized experiences can be used to master the other. This process is exposed most fully in Howells's description of Basil March's mental process as he rides the new New York mass transit system toward Lindau's home on the Lower East Side:
He went over to Third Avenue and took the elevated down to Chatham Square. He found the variety of people on the car as unfailingly entertaining as ever. He rather preferred the East Side to the West Side lines, because they offered more nationalities, conditions, and characters for his inspection. They drew not only from the uptown American region, but from all the vast hive of populations swarming between them and the East River. He had found that, according to the hour, American husbands going to and from business, and American wives going to and from shopping, prevailed on the Sixth Avenue road, and that the most picturesque admixture to these familiar aspects of human nature were the brilliant eyes and complexions of the American Hebrews, who otherwise contributed to the effect of well-clad comfort and citizen self-satisfaction of the crowd. Now and then he had found himself in a car mostly filled with Neapolitans from the constructions far up the line, where he had read that they are worked and housed like beasts; and listening to the jargon of their unintelligible dialect, he had occasion for pensive question within himself as to what notion these poor animals formed of a free republic from their experience of life under its conditions; and whether they found them practically very different from those of the immemorial brigandage and enforced complicity with rapine under which they had been born. But, after all, this was an infrequent effect, however massive, of travel on the West Side, whereas the East Side offered him continual entertainment in like sort. The sort was never quite so squalid. For short distances the lowest poverty, the hardest pressed labor must walk; but March never entered a car without encountering some interesting shape of shabby adversity, which was almost always adversity of foreign birth. New York is still popularly supposed to be in control of the Irish, but March noticed in these East Side travels of his what must strike every observer returning to the city after a prolonged absence: the numerical subordination of the dominant race. If they do not outvote them, the people of Germanic, of Slavonic, of Pelasgic, of Mongolian stock outnumber the prepotent Celts; and March seldom found his speculation centered upon one of these. The small eyes, the high cheeks, the broad noses, the puff lips, the bare, cue-filleted skulls, of Russians, Poles, Czechs, Chinese; the furtive glitter of Italians; the blond dullness of Germans; the cold quiet of Scandinavians--fire under ice--were aspects that he identified and that gave him abundant suggestion for the personal histories he constructed, and for the public-spirited reveries in which he dealt with the future of our heterogeneous commonwealth. It must be owned that he did not take much trouble about this: what these poor people were thinking, hoping, fearing, enjoying, suffering; just where and how they lived; who and what they individually were. These were the matter of his waking dreams as he stared hard at them, while the train raced further into the gay ugliness--the shapeless, graceless, reckless picturesqueness of the Bowery. (HNF, 158-59)
The New York of this passage is one that Howells was one of the first to register, the polyglot or radically multicultural New York produced by the new immigration of the late 1880s, and Howells's street Italians have changed accordingly from solitary strolling musicians or fruit vendors to a mass of manual laborers (Neapolitan construction workers) partly differentiated from, yet partly also amalgamated with, a yet larger mass of sheer foreignness. Basil March's way of confronting this world embodies a new way of deploying a long-acquired cultural equipment. He sees this scene through a habit of perception rooted in the practice of tourism: he conceives what surrounds him as scenery or visual tableau, makes the world a "sight" he can stand outside of and subject to his connoisseurial appreciative powers. Jews, thus, become a kind of pigment producing an unusual and interesting "effect" for March, and immigrant poverty a tasty visual treat--an "interesting shape of shabby adversity." (Note how the rough-and-ready visual identifiers of different ethnicities--high cheeks, furtive glitters--take on the pleasurable strangeness of ethnic cuisines for the eye.) But March does not just aestheticize the scene in a static way. Rather--and I take this to be Howells's really brilliant achievement in the passage--March in effect constructs the scene as a visual display he can mentally adjust the resolution of, a screen on which--while being sure that he will have no real relation to the strangers he sees--he can now humanize them a little, now return them to an anonymous mass; now enter a little into their real, individual experiences, now blur them out again. Southern Italians...construction workers; workers whose labor is building the very apparatus I am travelling on.... These people are indecently housed, the newspapers report!...What could their life be like, how could America look through their eyes? it occurs to March to wonder, but the thought just as quickly fades from his mind. Then it comes up again: Small eyes? Must be a Russian. High cheeks? Must be a Pole.... What could the inner lives be like of the people with these visual exteriors? March asks this question, but does not wait for an answer.
The habit of mind Basil March plays over his doorstep acquaintances--now the much more anonymous and disindividuated mob of mass transit--receives an unprecedentedly harsh censure in A Hazard of New Fortunes. "It must be owned that he did not take much trouble about this: what these poor people were thinking, hoping, fearing, enjoying, suffering; just where and how they lived; who and what they individually were," the suddenly stern narrator says in judgment of March's reveries. When the Marches visit Castle Garden (predecessor of Ellis Island) to watch new immigrants being processed, this bite enters Howells's voice again: "It warmed their hearts, so easily moved to any cheap sympathy" (HNF, 263). Yet if the book treats this mental process as reprehensibly self-serving, self-congratulatory, and self-centered, it simultaneously registers it not as a moral deficiency but as a social reality: something urban contemporaries will know, a historically new way of having experience. This, I take it, is where the matter of Italy eventuates in Howells's work--not in a literary realism of Italian immigrant experience ("who and what they individually were" finally occupies Howells as little as it occupies March); and not only in the satire of upper-class cosmopolitan aestheticism as a way to master the foreign in our midst; but in the study of this realizing yet derealizing, outward-reaching yet mentally self-enclosing way of having relations with strangers in transit in anonymous public spaces--a modern mode of community that arises, Howells suggests, when the touristic-aesthetic mindset and foreign immigration come into sufficiently close cultural conjunction.
Henry James could be presented as an even more advanced critic of a class-based contemporary "practice" of Italy. Gilbert Osmund, the suave expatriate of The Portrait of a Lady, is James's version of the cultural type Howells red in Corey, and Berenson in himself: the professional amateur, the one who has brushed aside chances for worldly success to become a connoisseur of aesthetic effects. (Osmund says of Italy, "There were advantages in living in the country which contained the greatest sum of beauty. Certain impressions you could get only there. Others, favorable to life, you never got, and you got some that were very bad. But from time to time you got one of a quality that made up for everything.") 15 James's point is that Osmund's pose of disinterested connois-seurship is his tool for projecting a social superiority that he cares for after all, and this baring of a status-seeking dimension to Italophile aestheticism makes for powerful satire. But it would be wrong to infer that James himself is simply detached from the res of Italy in circulation in his world. A larger survey would suggest that he is deeply invested in the culturally constructed Italys of his time in their most orthodox forms--and that, like Howells, James moves toward the greater complications of his later, more evidently "modern" outlooks not by transcending such cultural frames but by working his way forward through them in a changing social terrain.
In what became virtually a mandatory first step in the American literary Künstlerlaufbahn of the Gilded Age, the equivalent of a later generation's stay in Paris, James too made a long sojourn in Italy in his twenties, in 1869-70 and 1872-73. The difference of this eventual expatriate and echt cosmopolitan's experience from Howells's can be said to be that he responded to Italy more ardently. More accurately, we could say that he induced in himself a more ardent realization of the idea of "Italy" then being normalized in American high culture. James unlike Howells came to Italy en touriste, saw the Italy laid out by the touristic-aesthetic itinerary (he had his Ruskin in one hand and his Murray in the other), and had the reactions and "experiences" prescribed by this map. Arriving in Rome in 1869, James registers the responses of the Tourist Ecstatic or what might be called the High Achiever in the touristic mode: "At last--for the first time--I live!...I went reeling and moaning thro' the streets in a fever of enjoyment." 16 There is no reason to doubt the sincerity of this hyperbolic account, but even James is occasionally aware, amidst his gaping and moaning, that he is having an intensely personal version of an experience that has been culturally framed. In an 1870 letter to Charles Eliot Norton, his early patron and the chief American exponent of the high-cultural conception of Europe and the aesthetic, James makes clear that the Italy he is learning about derives its shape and value from a Norton-affiliated American conception: "I find myself tending more and more to become interested in the things for which you have said so much--art and the history of art and multifarious Italian matters" (L, 262). That James--like the young Howells--also used his Italian initiations to improve his American cultural position goes without saying. In the letter to this editor and cultural arbiter he admires "Our friend Tintoret" (L, 260): our shared love of Italian painters, he tells Norton, creates a bond between you and me.
I have argued elsewhere that in his highly elaborate construction of his authorial career, James laid the foundations for the artistic identity he erected by taking in, and taking yet more seriously, a number of the creedal notions of con-temporary high culture: the idea of value-graded aesthetic hierarchy, the idea of the Master, the idea of the classic, and so on. 17 Here it could be added that James made Italy, taken at its official estimate as Home of Art or terrestrial Seat of the Beautiful, into another career-supporting article of personal faith. Already in his 1872 review of Howells's Italian Journeys James has enlisted in the church mili-tant of the contemporary religion of Italy:
We go to Italy to gaze upon certain of the highest achievements of human power,--achievements, moreover, which from their visible and tangible nature, are particularly well adapted to represent to the imagination the maximum of man's creative force. So wide is the interval between the great Italian monuments and the works of the colder genius of neighboring nations, that we find ourselves willing to look upon the former as the ideal and perfection of human effort, and to invest the country of their birth with a sort of half-sacred character. 18
The Italy of late nineteenth-century American high culture receives what may be its single most eloquent definition in this passage, where it is made to embody the height of human creativity or what might be called the cultural sublime.
When James put his Italian travel essays together into the volume Italian Hours in 1909 he wrote a late, self-revisionary update to an 1873 piece he had done on Siena that gives an idea of the continuing authority of this conception of Italy in his career. Writing in implicit criticism of an "earlier poor judgment" now discerned to have "fallen short," James notably fails to criticize the most obvious omissions of the earlier piece. Operating within the coordinates of the touristic-aesthetic conception, James had written of Siena as if Italy were its classical past, a "sweetly-stale grain from the wondrous mill of history," not a still living society with a history still forming in the present. He had also written as if Siena were a set of sights to "look well" at, not a social world of living people. (James's main human contact in 1873--what better proof of the touristic nature of his involvement?--is a waiter he chats up.) But these are not the deficiencies he identifies in 1909. Instead the inadequacies he measures are ones marked as lacks within the touristic-aesthetic conception itself: he did not on his first visit attend the Palio, and he did not then take the "extra credit" side trip to "the pictured convent of Monte Oliveto" (the place where Berenson had converted to Catholicism) to see "those extraordinarily strong and brave frescoes of Luca Signorelli and Sodoma"--works that again exemplify the secular mystery of High Art: "the great sheltered sun-flares and colour-patches of scenic composition and design where a couple of hands centuries ago turned to dust had so wrought the defiant miracle of life and beauty that the effect is of a garden blooming among ruins." 19
The touristic-aesthetic frame does not appear without self-criticism in James's uvre; but it is important to discriminate the form this self-criticism takes. The 1877 essay "Italy Revisited" is perhaps James's most brilliant exercise in distancing himself from the preconceptions I have been describing. Noting the disjunction between Italy's unaesthetic "modern crudity" (to touristic eyes) and the richly aesthetic "relics of the great period," James here chooses against "thinking of Italy as historical and artistic," preferring "to think of her, for a while, as modern, an idea supposed (as a general thing correctly) to be fatally at variance with the Byronic, the Ruskinian, the artistic, poetic, aesthetic manner of considering this fascinating peninsula." 20 James's labor here is to recognize the different, actual, contemporary life effaced by touristic expectation, in order both to gain some sense of its human reality and to expose the touristic-aesthetic schema as a fiction of perception, a "manner of considering." In a characteristic bit of self-mortification, he thus recalls encountering in the countryside near Genoa a handsome young Italian who sings as he walks. By habit, he reads this sight aesthetically, apprehending the youth like "a cavalier in an opera" and musing that "such a re had been exactly what was wanted to set off the landscape." But entering into conversation with him, James learns that this picturesque re is in fact a "brooding young radical and communist,...an unhappy, underfed, unemployed young man, who took a hard, grim view of everything, and was operatic only quite in spite of himself." So known, the re becomes a harsh rebuke to the outlook that had negated his human reality:
This made it very absurd for me to have looked at him simply as a graceful ornament to the prospect, an harmonious little re in the middle distance.  would have been all his philosophy. Yet, but for the accident of my having a little talk with him, I should have made him do service, in memory, as an example of sensuous optimism! ("IR," 52-53)
"Our observation in any foreign land is extremely superficial, and our remarks are happily not addressed to the inhabitants themselves, who would be sure to exclaim upon the impudence of the fancy-picture" ("IR," 51). This is the sweeping condemnation James builds the case for in "Italy Revisited"; but we should beware of concluding that James has therefore escaped from the touristic-aesthetic point of view. After all, the unhappy young man is known only fleetingly in this scene, certainly not in the deep, sustained, interactive form we could label "intimacy." In any case his rhetorical function in the essay is not to become interesting in his own right but to permit a self-exposure of the aestheticizing approach: so far from leading truly outside the touristic-aesthetic mindset, he appears only with respect to that mindset, which continues to organize the possibilities for perception even when that perception takes the form of self-critique. (The similarity of this passage to Howells's critique of Basil March's obliviousness to real others suggests that this form of self-criticism is not neces-sarily a break from but perhaps a regular by-product of the touristic-aesthetic frame, a self-consciousness this habit of vision regularly generates.) The chief confirmation that this framework of perception has been complicated but not eluded in such a passage lies in the rest of the essay, which, after bouts of self-censure and feints toward potential interest in Italian industrialism, proceeds to readopt the touristic-aesthetic approach: "the river-front of Florence" is thus, seen as a "delightful composition" ("IR," 58); the (unknown) inhabitants of villas "disposed upon the neighbouring hills" are seen as "res in an ancient, noble landscape" ("IR," 60); and James resumes a charmed wandering "from one corner of Florence to another, paying one's respects again to remembered masterpieces" ("IR," 69). 21
Except for a few glancing references, for instance the mention of "the children of the disappointed" in Central Park in The Bostonians, 22 James's writing largely fails to register the immigrants who came to America during the years of his expatriation. When he does confront this presence, notably in his report on his 1904-1905 exile's return, The American Scene, it is striking how much his response is organized through the foreigner-as-intruder image also taken in from American gentry culture: an image he heightens and hyperbolizes just as he did the same culture's ideal of high art. Ross Posnock, the critic who has written most discerningly on this subject, has argued that James shows surprising curiosity about the immigrants he finds in his old home, and an equally surprising willingness to question the native-born's right to "own" the world they now share with others. 23 Posnock may be right about where James's musings eventuate (especially his musings on Jews); but it would seem worth adding that if James puts a certain distance between himself and gentry-class prejudices, this distance is effected after a strong initial investment in something very similar to those prejudices, and carries its weight as a swerve from an initially adopted line of thought. When this real-life Basil March takes to the streets, he sees around him "the ubiquitous alien," "the inconceivable alien," "gross aliens," "gross little aliens," "millions of little transformed strangers" caught in "the first grossness of their alienism." 24 His baroque or even byzantine flights of ration link this alien, with an almost zany extremity of imaginative enforcement, to highly familiar terms of prejudicial slur. The immigrant thus appears in The American Scene as physically indecent, a human equivalent of the greasy spoon: "[in seeing New York] do we not feel ourselves feeding, half the time, from the ladle, as greasy as he chooses to leave it for us, that he holds out?" (AS, 118); as the product of vomit-in-reverse: "it is a drama that goes on, without a pause, day by day and year by year, this visible act of ingurgitation on the part of our body politic and social" (AS, 84); as linguistic monstrosity or destroyer of intelligibility: "it is as if the syllables were too numerous to make a legible word. The illegible word, accordingly, the great inscrutable answer to questions, hangs in the vast American sky, to his imagination, as something fantastic and abracadabrant, belonging to no known language" (AS, 121-22); as uncanny dispossessor: "a ghost in [my] supposedly safe old house" (AS, 85).
When Italians appear in The American Scene, as they do with some frequency, they are focused through imagery of the sort just described. When James revisits the Boston Common, he thus finds Italian immigrants to be its chief occupants, and so the chief usurpers of "'my' small homogeneous Boston": "the people before me were gross aliens to a man, and they were in serene and triumphant possession" (AS, 231). When he revisits Salem and seeks directions to the great nativist mythological landmark the House of the Seven Gables, uncompre-hending aliens--for a change here called "flagrant foreigners"--turn out to have taken over this world too. "At Salem, when, wandering perhaps astray, I asked my way to the House of the Seven Gables, the young man I had overtaken was true to his nature; he stared at me as a remorseless Italian" (AS, 265). This foreigner, who not only does not know who Hawthorne was but cannot even understand James's question, embodies "the other, the smoky modernism" that has displaced "the small original Hawthornesque world" (AS, 270): he is the Italian as bad modernity, the Italian as air pollution and eroder of old forms. Elsewhere the Italian appears just as the irremediable other. Visiting a "large new rural resi-dence" being thrown up on the Jersey shore, a part of the conspicuous con-sumption of the turn-of-the-century leisure class, James finds the soon-to-be-hidden labor of construction being done by "groups of diggers and ditchers," in short by a manual working class. These workers are "Italians, of superlatively Southern type," and what happens when James and his wealthy host meet them is simply nothing. They are so estranged that they can only stand in "staring silence" as if understanding that contact between them "were out of the question" (AS, 118-19).
As in A Hazard of New Fortunes, James's mental interrogation of the Italian immigrant reaches a kind of climax in a scene set in mass transit. In "the electric cars," James like Basil March finds himself reduced to a minority status, surrounded by an "alienism unmistakable, alienism undisguised and unashamed" that leaves "the observer" to "gasp with the sense of [his] isolation." Before the "face after face" of these foreigners paradoxically so much "at home" (AS, 125), James begins to muse on the process of their assimilation, the process by which immigrants begin to lose the socializations of their culture of origin and to take on the new lives of a new land. James continues:
There are categories of foreigners, truly, meanwhile, of whom we are moved to say that only a mechanism working with scientific force could have performed this feat of making them colourless. The Italians, who, over the whole land, strike us, I am afraid, as, after the Negro and the Chinaman, the human value most easily produced, the Italians meet us, at every turn, only to make us ask what has become of that element of the agreeable address in them which has, from far back, so enhanced for the stranger the interest and pleasure of a visit to their beautiful country. They shed it utterly, I couldn't but observe, on their advent, after a deep inhalation or two of the clear native air; shed it with a conscientious completeness which leaves one looking for any faint trace of it. "Colour," of that pleasant sort, was what they had appeared, among the races of the European family, most to have; so that the effect I speak of, the rapid action of the ambient air, is like that of the tub of hot water that reduces a piece of bright-hued stuff, on immersion, to the proved state of not "washing": the only fault of my image indeed being that if the stuff loses its brightness the water of the tub at least is more or less agreeably dyed with it. That is doubtless not the case for the ambient air operating after the fashion I here note--since we surely fail to observe that the property washed out of the new subject begins to tint with its pink or its azure his fellow-soakers in the terrible tank. (AS, 128-29)
Just as the 1909 hymn to Monte Oliveto marks the climax of his involvement with touristic-aesthetic Italy, this passage can be taken to represent the culmination of James's involvement with the Italy of immigration, and its ingredients need to be specified fairly subtly. Present with an almost obscene lack of embarrassment here are some mental derivatives from the coarsest strains of contemporary prejudice: does the notion of Italians as "the human value most easily produced" mean that they are shamelessly prolific, or "only" that their life isn't worth much whatever their numbers? Present too is the expectation that these people should be more appealing or agreeable, an expectation bred by touristic experience of "a visit to their beautiful country." At the same time, without fully freeing itself from these preconceptions, the passage also dramatizes an authentic movement of curiosity in the direction of the immigrants' lives--but a movement (like Basil March's) that, by its nature, never crosses out of self-involved speculation. Where has the homeland manner of these immigrants gone, James wonders? How exactly has their reacclimatization changed them? The question expresses James's powerful imaginative sympathy with those he sees, a real will to grasp the operative conditions of their lives, but his answer stays shut up in the playful patterns of his mind. Italians are like noncolorfast garments only within the conceit of the hot washtub (witty variation on the melting pot), and the further thought that bleached-out ethnic colors do not "run" onto other fabrics in the "terrible tank" is generated through a further turn of the observer's verbal re, not a further knowing of the men and women before him. We are back where all the most protracted literary interactions with Italy lead in the American Gilded Age--to a spectatorial act of mind that appreciates the visual drama of con-temporaneity in complex ways on the understanding that no interaction with real others is about to take place.
Considered in a longer temporal prospect, Howells's and James's mass-transit scenes point forward to many similar scenes in the writing of the early twentieth century: moments in the metro in Pound, Crane, and T. S. Eliot; encounters with Italian immigrant aliens in Dos Passos's U.S.A. and Faulkner's The Sound and the Fury; and so on. More largely, Howells and James give a review of that inten-sified yet contradictory disposition toward the foreign--the conjunction of cosmopolitanist Europhile attraction with various shades of anti-immigrant repulsion (anti-Semitism is one)--that recurs in American modernist writing. In this context, the Gilded Age forebears do more than supply a frisson of structures of sentiment yet to come. They suggest that this doubleness in its specific early twentieth-century American forms came out of a certain social-historical set-ting--the high-cultural upper-class habitus the American moderns were either born to or educated in. And they suggest that a certain way of looking at the foreign was formed, there, through the interaction of elements made neighbors in that milieu: love of the foreign regarded as aesthetic; dread of the foreign as insurgent native presence; and a habit of pictorializing, derealizing "appreciation" highly useful at home but first practiced in touristic initiations.
Richard H. Brodhead has written widely on American Literature. His most recent books are Cultures of Letters: Scenes of Reading and Writing in Nineteenth Century America (Chicago, 1993) and The Journals of Charles W. Chesnutt (Duke, 1993). He is Bird White Housman Professor of English at Yale University and Dean of Yale College.
* This essay was commissioned by the Agnelli Foundation for presentation at its conference "America's Italy," held at the Corcoran Gallery, Washington D.C., in September 1992, and is to be published in the conference proceedings. My gratitude to the Foundation for permission to print it here in a slightly altered form.
1. Cited from Berenson's Sketch for a Self-Portrait in Ernest Samuels, Bernard Berenson: The Making of a Connoisseur (Cambridge, Mass.: Harvard University Press, 1979), 104-105. Other quotations in this paragraph, ibid., 80, 94, 90.
2. John Higham, Strangers in the Land: Patterns of American Nativism, 1860-1925 (2nd ed. 1963; reprint, New York: Atheneum, 1965), 90-92.
3. Cited in Leon Edel, Henry James: The Middle Years (Philadelphia: J. B. Lippincott, 1962), 375.
4. The following works could be consulted for partial histories of this social formation: Ronald Story, The Forging of an Aristocracy: Harvard and the Boston Upper Class, 1800-1870 (Middletown, Conn.: Wesleyan University Press, 1980); E. Digby Baltzell, The Protestant Establishment: Aristocracy and Caste in America (1964; reprint, New York: Vintage Books, 1966), 109-42; Robert H. Wiebe, The Search for Order, 1877-1920 (New York: Hill and Wang, 1967), 111-32; and Burton Bledstein, The Culture of Professionalism: The Middle Class and the Development of Higher Education in America (New York: W. W. Norton, 1976). Thorstein Veblen's The Theory of the Leisure Class is the great contemporaneous theorization of this social development.
5. Veblen, The Theory of the Leisure Class (1899; reprint, New York: New American Library, 1953), 47.
6. For more thorough consideration of later nineteenth-century high culture and its social sponsorship see Lawrence Levine, Highbrow/Lowbrow: The Emergence of Cultural Hierarchy (Cambridge, Mass.: Harvard University Press, 1988); Paul DiMaggio, "Cultural Entrepreneurship in Nineteenth-Century Boston," parts 1 and 2, Media, Culture, and Society 4 : 33-50 and 303-22; and my Cultures of Letters: Scenes of Reading and Writing in Nineteenth-Century America (Chicago: University of Chicago Press, 1993), 115-41.
7. Leonard Covello has estimated that 78% of eventual Italian American immigrants came from the southern Italian peasantry. The Social Background of the Italo-American Child (Leiden: E. J. Brill, 1967), 277.
8. Higham has been the chief developer of this point. See Strangers in the Land, esp. 68, 88.
9. For notable expressions of all of these stereotypes see the treatment of "the Italian" in Jacob A. Riis's How the Other Half Lives: Studies Among the Tenements of New York, ed. Sam Bass Warner (1890; reprint, Cambridge, Mass.: Harvard University Press, 1970), 21-22, 36-39.
10. Late nineteenth-century upper-class nativism is discussed in Higham, Strangers in the Land, 97-105, 136-44; Baltzell, Protestant Establishment, 104-108; and John C. Sproat, "The Best Men": Liberal Reformers in the Gilded Age (New York: Oxford University Press, 1968), 230-35, 250-57. On the performance of Italian opera in German see Levine, Highbrow/Lowbrow, 220. John Paul Russo's account of George Whitfield Chadwick's opera Il Padrone forms a fascinating further exhibit of high culture's simultaneous attraction to Italy and aversion to it in its lower-class, domestic immigrant forms. See Russo's response to my essay in the Agnelli Foundation volume America's Italy (forthcoming).
11. See my School of Hawthorne (New York: Oxford University Press, 1986), 84-89 and, for a more general account of this phase of Howells's career, Kenneth S. Lynn, William Dean Howells: An American Life (New York: Harcourt Brace Jovanovich, 1970), 110-35. Nathalia Wright discusses Howells and Italy in American Novelists in Italy (Philadelphia: University of Pennsylvania Press, 1965), 168-97.
12. William Dean Howells, Suburban Sketches (1871; reprint, Boston: Houghton, Mifflin, 1881), 35-59. Cited passages, 37, 39, 45, 50, 47; hereafter abbreviated SS.
13. Howells, The Rise of Silas Lapham (1885; reprint, New York: New American Library, 1963), 66; hereafter abbreviated RSL.
14. Howells, A Hazard of New Fortunes (1889; reprint, New York: New American Library, 1965), 22-23; hereafter abbreviated HNF.
15. Henry James, The Portrait of a Lady (1881; reprint, New York: Oxford University Press, 1981), 278.
16. Henry James, Letters, 4 vols., ed. Leon Edel (Cambridge, Mass.: Harvard University Press, 1974-84), 1: 160; hereafter abbreviated L. The subsequent letters make clear that James's Roman destinations were the standard art-historical touristic sights.
17. See The School of Hawthorne, 104-20.
18. From the review of Howells's Italian Journeys reprinted in Henry James, Literary Criticism: Essays in Literature, American Writers, English Writers (New York: Library of America, 1984), 476-77.
19. "Siena Early and Late," in Italian Hours (1909; reprint, New York: Grove Press, 1979), 259, 248, 259, 265, 267-68. My thanks to Bonney MacDonald's Henry James's Italian Hours: Revelatory and Resistant Impressions (Ann Arbor: U. M. I. Research Press, 1990) for drawing my attention to this essay.
20. "Italy Revisited," reprinted in Portraits of Places (Boston: Houghton Mifflin, 1883), 44-45; hereafter abbreviated "IR."
21. For a useful comment on this essay and on James's relation to the touristic discourse of Europe see James Buzard, "A Continent of Pictures: Reflections on the 'Europe' of the Nineteenth-Century Tourists," PMLA 108 : 30-44.
22. The Bostonians (1885; reprint, New York: Modern Library, 1957), 348.
23. Ross Posnock, The Trial of Curiosity: Henry James, William James, and the Challenge of Modernity (New York: Oxford University Press, 1991), esp. 6-18, 147-48, 277-84.
24. Henry James, The American Scene (1905; reprint, Bloomington: Indiana University Press, 1968), 87, 85, 231, 120; hereafter abbreviated AS.


Taptic Engine
Connecting to Device
Device is Ready
Unofficial API (iPhone >= 6s)
weak boom ('Peek')
strong boom ('Pop')
burst ('Nope!')
Official API (iPhone >= 7)
notification
selection
impact
Gesture selection
start
changes
end


Don’t sweat the small stuff. Work smarter with Cue.
With a growing number of clients come an increasing number of client reminders that you had to track and send.
Armed with traditional tools on hand, this could be how you are managing it:
This workflow is tedious, repetitive and error-prone but you tell yourself it’s an necessary evil. You know that there should be a better way to manage this but most solution are complicated and bloated with unnecessary features.
But what if it doesn’t have to be this way?
Cue is a simple CRM tool that allows you to schedule and automate email reminders to your clients.
Manage Your Clients Like It’s 2016
Close that excel right now. With our straight-forward client management interface, there will be no more tedious spreadsheet workout.
Just Schedule And Forget
Once a reminder is scheduled, Cue will handle the triggering of email reminders. You will also be informed of the delivery.
No more worrying of missed reminders. Book that dream vacation to Bahamas now.
Smart Messages
With our powerful message editor, you can use ‘merge tags’ to customise the same email for multiple clients.
The days of copying, pasting and editing messages saved on your notepad are over.
Track Like A Professional Stalker
Want to know how many email were sent and open today? How about last week? Or even last month? With our sleek-looking dashboard, all the insights are there.
Want to track an individual client instead? Sure, we keep a log of all the emails that you had sent them. Nothing is lost.


--- title: About ---
My name is Andrew and this is my recipe book. I post recipes that I've made, so that I remember how to make them and so that you can try them too!


public class DiskReader extends VeniceReader
Reads XIO lines of log file, convert them into SlotEvent
objects and puts them into the TTEQueue
.
The actual reading from file and the parsing will be done by TTEBufferedReader
.
TTEBufferedReader
,
TTEQueue
active, config, finished, parser, paused, QUEUE_CAPACITY
| Constructor and Description |
|---|
DiskReader() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanUp()
Stops the TTEBufferedReader (and waits until it is finished).
|
TTEBufferedReader |
getTTEBufferedReader()
Returns the TTEBufferedReader, which was created in the preparations and which is doing the actual data reading.
|
protected void |
initialize()
Gets the file name and starts the TTEBufferedReader.
|
protected venice.lib.parser.SlotEvent |
read()
Reads a SlotEvent from TTEBufferedReader over SynchronousQueue.
|
void |
reset()
Restart the reading from the beginning of the file.
|
void |
run()
Keeps the thread alive, until deactivated.
|
void |
seek(long timestamp)
Seeks to a specific timestamp in the file.
|
isFinished, pause, proceed, stopThread
protected void initialize()
initialize
in class VeniceReader
public void run()
VeniceReader
run
in interface java.lang.Runnable
run
in class VeniceReader
protected void cleanUp()
cleanUp
in class VeniceReader
public void reset()
reset
in class VeniceReader
protected venice.lib.parser.SlotEvent read()
Will wait, if SynchronousQueue is empty, but not forever, so that events like pausing, seeking or reseting will not be missed.
read
in class VeniceReader
public TTEBufferedReader getTTEBufferedReader()
public void seek(long timestamp)
timestamp
-


| 181 |
Justin Cruz |
Texas |
Latino |
1984 |
1985 |
1 |
Appellate Acquittal |
- Official Misconduct
- Perjury or False Accusation
- Insufficient Evidence
|
No |
| 184 |
Bonnie Erwin |
Texas |
Black |
1985 |
1989 |
4 |
Charges Dismissed |
- Official Misconduct
- Perjury or False Accusation
|
No |
| 41 |
John Skelton |
Texas |
White |
1983 |
1990 |
7 |
Appellate Acquittal |
|
No |
| 182 |
Claude Wilkerson |
Texas |
White |
1979 |
1987 |
8 |
Charges Dismissed |
- Official Misconduct
- False Confession
|
No |
| 53 |
Muneer Deeb |
Texas |
Other Race |
1985 |
1993 |
8 |
Acquitted |
- False or Misleading Forensic Evidence
- Perjury or False Accusation
|
No |
| 138 |
Robert Springsteen |
Texas |
White |
2001 |
2009 |
8 |
Charges Dismissed |
- False Confession
- Perjury or False Accusation
|
No |
| 40 |
Clarence Brandley |
Texas |
Black |
1981 |
1990 |
9 |
Charges Dismissed |
- Perjury or False Accusation
- Official Misconduct
|
No |
| 49 |
Federico Macias |
Texas |
Latino |
1984 |
1993 |
9 |
Charges Dismissed |
- Perjury or False Accusation
- Inadequate Legal Defense
|
No |
| 30 |
Vernon McManus |
Texas |
White |
1977 |
1987 |
10 |
Charges Dismissed |
|
No |
| 135 |
Michael Toney |
Texas |
White |
1999 |
2009 |
10 |
Charges Dismissed |
- Perjury or False Accusation
- Official Misconduct
|
No |
| 155 |
Alfred Brown |
Texas |
Black |
2005 |
2015 |
10 |
Charges Dismissed |
- Official Misconduct
- Mistaken Witness Identification
- Perjury or False Accusation
|
No |
| 37 |
Randall Adams |
Texas |
White |
1977 |
1989 |
12 |
Charges Dismissed |
- Mistaken Witness Identification
- Perjury or False Accusation
- Official Misconduct
|
No |
| 129 |
Michael Blair |
Texas |
Other Race |
1994 |
2008 |
14 |
Charges Dismissed |
- Mistaken Witness Identification
- False or Misleading Forensic Evidence
|
Yes |
| 68 |
Ricardo Guerra |
Texas |
Latino |
1982 |
1997 |
15 |
Charges Dismissed |
- Perjury or False Accusation
- Official Misconduct
|
No |
| 139 |
Anthony Graves |
Texas |
Black |
1994 |
2010 |
16 |
Charges Dismissed |
- Perjury or False Accusation
- False or Misleading Forensic Evidence
- Official Misconduct
|
No |
| 118 |
Ernest Willis |
Texas |
White |
1987 |
2004 |
17 |
Charges Dismissed |
- False or Misleading Forensic Evidence
- Official Misconduct
- Inadequate Legal Defense
|
No |


Breakpoints can be created using the add_breakpoint/2
built-in predicate. Its first argument should contain the
description of the breakpoint, the so called breakpoint
spec. It will return the breakpoint identifier (BID) of the
created breakpoint in its second argument. For example:
| ?- add_breakpoint(pred(foo/2), BID). % Plain spypoint for user:foo/2 added, BID=1 BID = 1
Here, we have a simple breakpoint spec, prescribing that the
debugger should stop at all ports of all invocations of the
predicate foo/2
. Thus the above goal actually creates
a plain spypoint, exactly as ?- spy foo/2.
does.
A slightly more complicated example follows:
| ?- add_breakpoint([pred(foo/2),line('/myhome/bar.pl',123)], _). % Conditional spypoint for user:foo/2 added, BID=1
This breakpoint will be activated only for those calls of
foo/2
that occur in line 123 of the Prolog program file
'/myhome/bar.pl'
. Because of the additional condition, this is
called a conditional spypoint.
The breakpoint identifier (BID) returned by
add_breakpoint/2
is an integer, assigned in increasing order,
i.e. more recent breakpoints receive higher identifier
values. When looking for applicable breakpoints, the debugger
tries the breakpoints in descending order of BIDs, i.e. the most
recent applicable breakpoint is used. Breakpoint identifiers
can be used for referring to breakpoints to be deleted, disabled
or enabled (see later).
Generally, the breakpoint spec is a pair
Tests-
Actions. Here, the Tests part describes
the conditions under which the breakpoint should be activated,
while the Actions part contains instructions on what should be
done at activation. The test part is built from tests, while the action
part from actions and tests. Test, actions and composite constructs
built from these are generally referred to as breakpoint
conditions, or simply conditions.
The action part can be omitted, and then the breakpoint spec
consists of tests only. For spypoints, the default action part is
[show(print),command(ask)]
. This instructs the debugger to print
the goal in question and then ask the user what to do next,
exactly as described in Debug Format. To illustrate other
possibilities let us explain the effect of the
[show(display),command(proceed)]
action part: this will use
display/1
for presenting the goal (just as the `d'
debugger command does, see Debug Commands), and will then proceed
with execution without stopping (i.e. the spypoint is
unleashed).


Any supplementary data that should be available in processing.
Function that should be called to test whether current action is valid and should be passed for reducing.
If the function returns false
, the current action will be ignored (will not be passed into source reducer).
This function is called after a function that is specified in prepareAction
setting.
Size of list of fulfilled operations (processed actions).
0
(default value) means that data about operations should not be saved in the list.
Negative value (for example -1
) means that list size is not restricted.
Function that should be called at the end of each processing step.
Function that should be called at the start of each processing step.
Function that should be called after source (wrapped) reducer. State returned by source reducer and current action will be passed into the function.
Whether result of postreduce
function should be used as new state in further processing.
Default value is false
.
Function that should be called to prepare current action for further processing before filtering. Value returned by the function will be used as new current action.
Function that should be called before source (wrapped) reducer.
Whether result of prereduce
function should be used as new state in further processing.
Default value is false
.
Whether an array that is passed as action should be treated as list of actions that should be processed separately.
Default value is true
.
Supplementary arguments that should be passed into source (wrapped) reducer besides state and action. Or a function that returns such arguments.
Whether processing of an action that has a falsy value should be skipped.
Default value is true
.
The corresponding check is made before calling a function that is specified in filterAction
setting.
Function that should be called to transform current valid action after filtering. Value returned by the function will be used as new current action for further processing.
Generated using TypeDoc
Settings to define features of processing.


--- title: Blocks keywords: fastai sidebar: home_sidebar summary: "Blocks are used for advanced templating where different templates are applied to different sections of the molecule" description: "Blocks are used for advanced templating where different templates are applied to different sections of the molecule" nb_path: "nbs/04_template.blocks.ipynb" ---
Templates define a chemical space using a set of hard and soft filters to evaluate a molecule. For greater control, we may wish to apply different templates to different parts of the molecule. With the Block
and BlockTemplate
classes and some modifications to how we represent SMILES strings, we can do this.
For a detailed example of using Blocks, see the Block Tutorial page
Say we have a compound of the form R1-scaffold-R2
, where the scaffold is a defined structure. We want to run a generative screen on the two R-groups while keeping the scaffold constant. We also have preferences on the chemical structures present at each R-group. We want R1
to contain at least 1 ring, and we want R2
to have no rings.
One way to approach this would be to build a dataset of compounds with the format R1-scaffold-R2
where all R1
and R2
structures conform to our desired properties. We would then train a generative model on this dataset and run a standard generative screen. However, this runs the risk of generated compounds deviating from our desired chemotype. This means we need to create a template that enforces the R1-scaffold-R2
chemotype with our stated constraints on R1
and R2
.
This leads to the problem of factoring arbitrary chemical structures into our R1-scaffold-R2
, with all sorts of nasty problems and edge cases cropping up if the model deviates from this chemotype during training. Doing so would require defining a wide variety of SMARTS strings and fragmentation rules to deal with matching arbitrary compounds to the R1-scaffold-R2
chemotype.
Comparatively, it is much easier to generate a string of molecular fragments and assemble them into a single compound. Rather than generating compounds of the form R1-scaffold-R2
, we generate fragments of the form *R1.*scaffold*.*R2
. Since our scaffold is defined, we can simplify this to generating *R1.*R2
, which is helpful because shorter sequence spaces are easier to learn. In doing so, we have embedded our chemotype prior into the generation process.
Now we can evaluate and assemble compounds to compare them to our desired constraints. We create different templates for R1
, R2
and the full compound R1-scaffold-R2
.
The model generates some sequence of the form *R1.*R2
. We split this into *R1
and *R2
, and evaluate each R group with their respective template. Then we add in the scaffold, fuse the fragments into the full molecule, and evaluate the full molecule template.
When we generate and evaluate compounds in this way, we can build in a strong guarantee that compounds passing this tiered templating process will conform to our specified chemotype.
The process described above is implemented using the Block
class. A block is a general abstraction for a chunk of a molecule. The Block
class holds a Template
describing desired molecular properties and additional information specifying how the block links to other blocks.
Blocks are assembled into a tree structure, with some blocks nested within other blocks. For the above example, we would have four blocks in total. We would have two MolBlock
blocks for R1
and R2
and a ConstantMolBlock
for the pre-defined scaffold. The block structure would look like this:
Block tree:
Block 1 - full molecule
Block 2 - scaffold (constant)
Block 3 - R1 + R1 Template
Block 4 - R2 + R2 Template
If we passed our *R1.*R2
generated sequence to the head block, Block 1, the sequence would be broken down into fragments and routed to subblocks. R1
would be screened against the R1 Template in Block 3. R2
would be screened against the R2 template in Block 4. Then R1
and R2
would be merged with the constant scaffold in Block 2 to create the full R1-scaffold-R2
compound. Then the full compound would be screened by the full molecule template in Block 1.
One important detail is how fragments are routed to different blocks. If the model generates *R1.*R2
, how do we know that R1
should be routed to one block and R2
should be routed to a different block? We specify block assignments using isotope and atom map numbers on the wildcard atoms.
Map numbers are used to determine which atoms are fused together. If we had a fragment sequence *X.*Y*.*Z
, we don't know how to assemble the fragments. If we add atom map numbers to get [*:2]X.[*:1]Y[*:2].[*:1]Z
, then we can definitely assemble the sequence into [*:2]X.[*:1]Y[*:2].[*:1]Z >> Z[*:1].[*:1]Y[*:2].[*:2]X >> Z-Y-X
.
Isotope numbers are used to differentiate fragments with the same map number. Say we have a fragment sequence of [*:1]X.[*:1]Y
, and we want X
to be evaluated by one template and Y
to be evaluated by another. We need a way of uniquely distinguishing one fragment from another. By adding isotopes to wildcards in addition to map numbers, ie [*:1]X >> [1*:1]X
, we can uniquely match fragments to blocks.
Going back to the previous example, our framework of *R1.*scaffold*.*R2
would become [2*:1]R1.[1*:1]scaffold[1*:2].[2*:2]R2
, and our generative model would create sequences of the form [2*:1]R1.[2*:2]R2
. This is easily implemented by adding new tokens to the vocabulary of our generative model.
These links would be specified in the block structure:
Block tree:
Block 1 - full molecule, links=[]
Block 2 - scaffold (constant), links=['[1*:1]', '[1*:2]']
Block 3 - R1 + R1 Template, links=['[2*:1]']
Block 4 - R2 + R2 Template, links=['[2*:2]']
When analyzing a fragment sequence, a block will extract the isotope/map number links of {isotope}*:{map_num}
from each fragment. The links present in a fragment are compared to the links specified in the Block, as well as any subblocks contained within the block.
Wildcards should be expressed as [{isotope}*:{map_number}]
. The isotope
value sould be 1
or 2
. 0
should not be used as RDKit canonicalization removes zero isotope values from wildcards.
Once the block tree is assembled, it can be used to create a BlockTemplate
. The BlockTemplate
class is a wrapper for a series of nested Blocks
designed to behave like the Template
class. BlockTemplate
has the same __call__
API as Template
, and provides saving/loading functions and data logging, as well as easy access to nodes via unnested lists and dictionaries.
For the R1-scaffold-R2
example, setting up the blocks would look something like this
r1_template = Template(r1_hard_filters, r1_soft_filters)
r1_links = ['2*:1']
r1_block = MolBlock(r1_template, r1_links, name='r1')
r2_template = Template(r2_hard_filters, r2_soft_filters)
r2_links = ['2*:2']
r2_block = MolBlock(r2_template, r2_links, name='r2')
scaffold_links = ['1*:1', '1*:2']
scaffold_block = ConstantMolBlock(scaffold_smile, name='scaffold', links=scaffold_links)
full_molecule_template = Template(full_hard_filters, full_soft_filters)
main_block = MolBlock(full_molecule_template, [], name='full_molecule', subblocks=[r1_block, r2_block, scaffold_block])
block_template = BlockTemplate(main_block)
# scaffod
scaffold_smile = 'c1nc2c([1*:2])cncc2cc1[1*:1]'
scaffold_block = ConstantMolBlock(scaffold_smile, 'scaffold')
# R1, must have ring, be between 50-250 g/mol. must have 1 ring. ideally less thn 100-200 g/mol
r1_template = Template(
[MolWtFilter(50, 250),
RingFilter(1,1)],
[MolWtFilter(100, 200, 1)],
fail_score=-1
)
# R2, must have no rings, be between 0-200 g/mol. must have 0 rings. ideally less thn 50-150 g/mol
r2_template = Template(
[MolWtFilter(0, 200),
RingFilter(None,0)],
[MolWtFilter(50,150,1)],
fail_score=-1
)
# full compound, must be between 200 and 550 g/mol
full_template = Template(
[MolWtFilter(200, 550)],
fail_score=-1)
block_template = DoubleRGroupBlockTemplate(scaffold_smile, r1_template, r2_template, full_template)
frag_strings = ['Cc1c(CS(C)(=O)=O)cccc1NC(=O)N[2*:1].O=C(Cl)[2*:2]',
'CC(C)Oc1ccc(C[NH2+][2*:1])cc1.CC(C)(CCO)C[2*:2]',
'Cc1ccc(NC(=O)[2*:1])cc1S(C)(=O)=O.CC(C)CCNC(=O)N[2*:2]',
'NS(=O)(=O)Cc1cccc([2*:1])c1.CC(C)(O)CC[2*:2]']
fused = ['Cc1c(CS(C)(=O)=O)cccc1NC(=O)Nc1cnc2c(C(=O)Cl)cncc2c1',
'CC(C)Oc1ccc(C[NH2+]c2cnc3c(CC(C)(C)CCO)cncc3c2)cc1',
'Cc1ccc(NC(=O)c2cnc3c(NC(=O)NCCC(C)C)cncc3c2)cc1S(C)(=O)=O',
'CC(C)(O)CCc1cncc2cc(-c3cccc(CS(N)(=O)=O)c3)cnc12']
outputs = block_template.recurse_fragments(frag_strings, add_constant=True)
assert [i[1] for i in outputs] == fused
assert [i[2] for i in outputs] == [True, True, True, True]
assert [i[3] for i in outputs] == [1.0, 2.0, 1.0, 2.0]
# one constant and one variabe
# scaffod
scaffold_smile = 'c1nc2c([1*:2])cncc2cc1[1*:1]'
scaffold_block = ConstantMolBlock(scaffold_smile, 'scaffold')
# R1 has 3 groups - constant carbonyl, variable ring, variabe ring attachment
r1_carbonyl_block = ConstantMolBlock('C(O)(=O)[1*:4]', 'carbonyl')
r1_ring_substitution_tempate = Template(
[RotBondFilter(0,3),
RingFilter(None,0)],
[RotBondFilter(0,2,1)],
fail_score=-1,
log=True
)
r1_ring_substitution_block = MolBlock(r1_ring_substitution_tempate, ['1*:3'], 'r1 ring substitution')
r1_ring_template = Template(
[RingFilter(1,1),
RotBondFilter(0,1)],
[RingFilter(1,1,1)],
fail_score=-1,
log=True
)
r1_ring_block = MolBlock(r1_ring_template, ['2*:3', '2*:4', '2*:2'], 'r1_ring')
r1_full_group_template = Template(
[MolWtFilter(50,350)],
[MolWtFilter(100,200,1)],
fail_score=-1,
log=True
)
r1_block = MolBlock(r1_full_group_template, ['2*:2'], 'r1_full',
subblocks=[r1_carbonyl_block, r1_ring_substitution_block, r1_ring_block])
# R1, must have no rings, be between 0-200 g/mol. must have 0 rings. ideally less thn 50-150 g/mol
r2_template = Template(
[MolWtFilter(0,200)],
[RingFilter(0,0)],
fail_score=-1,
log=True
)
r2_block = MolBlock(r2_template, ['2*:1'], 'r2')
# full compound, must be between 200 and 550 g/mol
full_template = Template(
[MolWtFilter(200,550),
StructureFilter(['[#6](-[#8])(=[#8])-[*]',
'[#6]1:[#7]:[#6]2:[#6](-[*]):[#6]:[#7]:[#6]:[#6]:2:[#6]:[#6]:1-[*]'
], criteria='all', exclude=False)],
[MolWtFilter(250,500,1)],
fail_score=-1,
log=True
)
main_block = MolBlock(full_template, [], 'full_molecule', subblocks=[scaffold_block, r1_block, r2_block])
block_template = BlockTemplate(main_block)
frag_strings = ['CC(C)(C)SC[1*:3].Cc1cc([2*:3])c([2*:2])n1C[2*:4].Cc1noc(C)c1CO[2*:1]',
'C=C(C)C[1*:3].Nc1c(N([2*:2])[2*:4])ncnc1[2*:3].Cc1ccc([2*:1])cc1[N+](=O)[O-]',
'CCSCC[1*:3].Cc1ccc(N(C(=O)[2*:4])[2*:3])c([2*:2])c1.Clc1ncccc1N[2*:1]',
'C#CCO[1*:3].O=c1n([2*:3])nc([2*:2])n1[2*:4].O=c1ccccn1C[2*:1]']
fused = ['Cc1noc(C)c1COc1cnc2c(-c3c(CSC(C)(C)C)cc(C)n3CC(=O)O)cncc2c1',
'C=C(C)Cc1ncnc(N(C(=O)O)c2cncc3cc(-c4ccc(C)c([N+](=O)[O-])c4)cnc23)c1N',
'CCSCCN(C(=O)C(=O)O)c1ccc(C)cc1-c1cncc2cc(Nc3cccnc3Cl)cnc12',
'C#CCOn1nc(-c2cncc3cc(Cn4ccccc4=O)cnc23)n(C(=O)O)c1=O']
outputs = block_template.recurse_fragments(frag_strings, add_constant=True)
assert [i[1] for i in outputs] == fused
assert [i[2] for i in outputs] == [True, True, True, True]
assert [i[3] for i in outputs] == [3.0, 3.0, 1.0, 4.0]
outputs[0]
# scaffod
scaffold_smile = '*c1cnc2ccncc2c1'
# R-group, must have ring, be between 50-250 g/mol. ideally less thn 100-200 g/mol
r_template = Template(
[MolWtFilter(50, 250),
RingFilter(1,1)],
[MolWtFilter(100, 200, 1)],
fail_score=-1, log=True
)
full_template = Template(
[MolWtFilter(200, 550)],
fail_score=-1, log=True)
block_template = RGroupBlockTemplate(scaffold_smile, r_template,
full_molecule_template=full_template)
test = block_template(['Cc1c(CS(C)(=O)=O)cccc1NC(=O)N*',
'Cc1c(CS(C)(=O)=O)ccc1NC(=O)N*'], filter_type='hard')
assert test == [True, False]
block_template.recurse_fragments(['Cc1c(CS(C)(=O)=O)cccc1NCN[2*:1]'], add_constant=True)
block_template.recurse_fragments(['Cc1c(CS(C)(=O)=O)cccc1NCN*'], add_constant=True)
block_template.recurse_fragments(['Cc1c(CS(C)(=O)=O)cccc1NC(=O)N*'], add_constant=True)


JavaScript is required
▶ Play
▶ Play fullscreen
Loading players...
Enable autoplay
For help see the
User's Guide


check out our web page
Isn't it nice?
Here is a link to my favorite things.
here is a picture of a cat
lists


Normally, a configuration file used to provide settings or to control the environment in which tests are run, should be given the name as the assembly file with the suffix ".config" added. For example, the configuration file used to run nunit.tests.dll must be named nunit.tests.dll.config and located in the same directory as the dll.
For multiple assemblies specified by a project, such as an NUnit or Visual Studio project, the same rule is used unless command-line options are used to load the project assemblies into a common AppDomain. In that case, the name of the project file is used, with ".config" added. For example, the command
nunit-console MyProject.nunit /process:Separate /domain:Singlewould make use of the config file MyProject.nunit.config.


Shuffling {{ player }}'s stack and revealing half of it.
Revealed {% if resultpositive|length == 0 %} {{ resultnegative|length }} blank{{ resultnegative|length|pluralize }} {% elif resultnegative|length == 0 %} {{ resultpositive|length }} risk{{ resultpositive|length|pluralize }} {% else %} {{ resultpositive|length }} risk{{ resultpositive|length|pluralize }} and {{ resultnegative|length }} blank{{ resultnegative|length|pluralize }} {% endif %}
{% else %} {% ifequal episode.number 1 %} {% ifequal resultpositive|length 0 %}ElinI can’t inspect your team member's safety as well as I’m used to. Here are the results… I advise you not to draw too many conclusions from this… it's fragmentary information at best.
{% endifequal %} {% ifequal resultpositive|length 1 %}ElinYour team member's safety is magnificent. Couldn’t be better. Perhaps it's obvious, but I should remind you that I can only take a random sample of about half the safety. This is not nearly enough if you ask me, but you’ll have to deal with it. It’s just the nature of this business that we can never eliminate all risk.
{% endifequal %} {% if not poorvision and resultpositive|length == 2 %}ElinYour team member's safety looks pretty solid. Perhaps it's obvious, but I should remind you that I can only take a random sample of about half the safety. This is not nearly enough if you ask me, but you’ll have to deal with it. Now, is it safe enough to start production? Ultimately, that’s up to your team.
{% endif %} {% if resultpositive|length == 3 or poorvision and resultpositive|length == 2 %} {# If we have poor vision, it means two positives is worse than average. #}ElinYour team member's safety seems to be pretty average. Perhaps it's obvious, but I should remind you that I can only take a random sample of about half the safety. This is not nearly enough if you ask me, but you’ll have to deal with it. Now, is it safe enough to start production? Ultimately, that’s up to your team.
{% endif %} {% ifequal resultpositive|length 4 %}ElinYour team member's safety is quite poor. Perhaps it's obvious, but I should remind you that I can only take a random sample of about half the safety. That’s what my training tells me anyway. Now, should production be started with odds like this? If you ask me, no way!
{% endifequal %} {% endifequal %} {% ifequal episode.number 2 %} {% ifequal resultpositive|length 0 %}ElinYour team member's safety is extremely poor. Perhaps it's obvious, but I should remind you that I can only take a random sample of about half the safety. That’s what my training tells me anyway. Now, should production be started with odds like this? Are you kidding me?
{% endifequal %} {% ifequal resultpositive|length 1 %}ElinYour team member's safety is magnificent. Couldn’t be better. Should your team jump straight into production now? I guess so!
{% endifequal %} {% if not poorvision and resultpositive|length == 2 %}ElinYour team member's safety looks pretty solid. Now, is it safe enough to start production? Ultimately, that’s up to your team.
{% endif %} {% if resultpositive|length == 3 or poorvision and resultpositive|length == 2 %} {# If we have poor vision, it means two positives is worse than average. #}ElinYour team member's safety seems to be pretty average. Now, is it safe enough to start production? Ultimately, that’s up to your team.
{% endif %} {% ifequal resultpositive|length 4 %}ElinYour team member's safety is really poor. Should your team start production with odds like this? If you ask me, no way!
{% endifequal %} {% endifequal %} {% endif %}ElinYour team member's safety is extremely poor. Should your team start production with odds like this? Are you kidding me?
Please take note of these results. You can't review them later.
Continue


Setting up a captcha
Because anyone can post a comment to our blog engine, we should protect it a little to avoid automated spam. A simple way to protect a form from this is to add a captcha image.
Generating the captcha image
We’ll start to see how we can easily generate a captcha image using Play. Basically we will just use another action, except that it will return a binary stream instead of the HTML responses like we’ve returned so far.
Since Play is a full-stack web framework, we try to include built-in constructs for web applications’ most typical needs; generating a captcha is one of them. We can use the play.libs.Images
utility to simply generate a captcha image, and then write it to the HTTP response.
As usual, we will start with a simple implementation. Add the captcha
action to the Application
controller:
public static void captcha() {
Images.Captcha captcha = Images.captcha();
renderBinary(captcha);
}
Note that we can pass the captcha object directly to the renderBinary() method because the Images.Captcha class implements java.io.InputStream.
Don’t forget to import play.libs.*
.
Now add a new route to the /yabe/conf/routes
file:
GET /captcha Application.captcha
And try the captcha
action by opening http://localhost:9000/captcha.
It should generate a random text for each refresh.
How do we manage the state?
Until now it was easy, but the most complicated part is coming. To validate the captcha we need to save the random text written to the captcha image somewhere and then check it at the form submission time.
Of course we could just put the text to the user session at the image generation time and then retrieve it later. But this solution has two drawbacks:
First, the Play session is stored as a cookie. It solves a lot of problems in terms of architecture but has a lot of implications. Data written to the session cookie are signed (so the user can’t modify them) but not encrypted. If we write the captcha code to the session anybody could easily resolve it by reading the session cookie.
Second, remember that Play is a stateless framework. We want to manage things in a purely stateless way. Typically, what happens if a user simultaneously opens two different blog pages with two different captcha images? We have to track the captcha code for each form.
So to resolve the problem we need two things. We will store the captcha secret key on the server side. Because it is transient data we can easily use the Play Cache. Moreover because cached data have a limited life time it will add one more security mechanism (let’s say that a captcha code will be available for only 10mn). Then to resolve the code later we need to generate a unique ID. This unique ID will be added to each form as an hidden field and implicitly references a generated captcha code.
This way we elegantly solve our state problem.
Modify the captcha
action as is:
public static void captcha(String id) {
Images.Captcha captcha = Images.captcha();
String code = captcha.getText("#E4EAFD");
Cache.set(id, code, "10mn");
renderBinary(captcha);
}
Note that the getText()
method takes any color as parameter. It will use this color to draw the text.
Don’t forget to import play.cache.*
.
Adding the captcha image to the comment form
Now, before displaying a comment form we will generate a unique ID. Then we will modify the HTML form to integrate a captcha image using this ID, and add the ID to another hidden field.
Let’s rewrite the Application.show
action:
public static void show(Long id) {
Post post = Post.findById(id);
String randomID = Codec.UUID();
render(post, randomID);
}
And now the form in the /yable/app/views/Application/show.html
template:
…

Your message:
<textarea name="content" id="content">${params.content}</textarea>

Please type the code below:

<input type="text" name="code" id="code" size="18" value="" />
<input type="hidden" name="randomID" value="${randomID}" />

<input type="submit" value="Submit your comment" />

…
Good start. The comment form now has a captcha image.
Validating the captcha
Now we just have to validate the captcha. We have added the randomID
as an hidden field right? So we can retrieve it in the postComment
action, then retrieve the actual code from Cache and finally compare it to the submitted code.
Not that difficult. Let’s modify the postComment
action.
public static void postComment(
Long postId,
@Required(message="Author is required") String author,
@Required(message="A message is required") String content,
@Required(message="Please type the code") String code,
String randomID)
{
Post post = Post.findById(postId);
validation.equals(
code, Cache.get(randomID)
).message("Invalid code. Please type it again");
if(validation.hasErrors()) {
render("Application/show.html", post, randomID);
}
post.addComment(author, content);
flash.success("Thanks for posting %s", author);
Cache.delete(randomID);
show(postId);
}
Because we now have more error messages, modify the way we display errors in the show.html
template (yes we will just display the first error, it’s good enough):
..
#{ifErrors}

${errors[0]}

#{/ifErrors}
…
Typically for more complex forms, error messages are not managed this way but externalized in the messages
file and each error is printed inside the corresponding field.
Check that the captcha is now fully functional.
Great!
Next: Add tagging support.


caption
include
<caption>
include
<colgroup>
include
<thead>
<tbody>
rows:
cols:
include
<tfoot>
include dummy text


When the page loads it will request data from two different servers , and it will display the information only after it has all come back from the servers


Sends a command and waits for the answer in parallel to other thread’s execution, allowing other thread’s to poll if the response have been received.
| Parameters: |
|
|---|
Note
Notice the command is sent when the object is created.
A property for retrieving the response object generated by the command.
This property should be used when sending is False.
A property that indicates whether the object is still waiting for a response.
from pyrobotics import BB
from pyrobotics.parallel_senders import ParallelSender as PS
from otherModule import fastCommand, slowCommand
function_map = {
'fast_command': fastCommand,
'slow_command': slowCommand
def initialize():
global function_map
BB.Initialize(2000, function_map)
BB.Start()
BB.SetReady()
def main():
initialize()
p = PS(Command('command_name', 'command_params'), 3000)
while p.sending:
#do something
print 'sending message...'
if not p.response:
print 'Sending failed, probably timed out.'
return
if p.response.result:
print 'command was successful!'
else:
print 'command execution was UNsuccessful!'}
BB.Wait()
if __name__ == '__main__':
main()


{% import "_includes/forms" as forms %}
{{ forms.lightswitchField({
first: true,
label: "Enable Author Notifications" | t,
instructions: "Authors receive an email for every new comment. Edit the content of this email through Email Messages." | t,
id: 'notificationAuthorEnabled',
name: 'notificationAuthorEnabled',
on: settings.notificationAuthorEnabled,
onLabel: "Enable" | t,
offLabel: "Disable" | t
}) }}
{{ forms.lightswitchField({
first: true,
label: "Enable Reply Notifications" | t,
instructions: "Users receive an email when someone replies to their comment. Edit the content of this email through Email Messages." | t,
id: 'notificationReplyEnabled',
name: 'notificationReplyEnabled',
on: settings.notificationReplyEnabled,
onLabel: "Enable" | t,
offLabel: "Disable" | t
}) }}


Home
Leagues
Liga NOS
PREMIER LEAGUE
Bundesliga
Ligue 1
Serie A
La liga
Championship
Serie A
Stadium
Squad
Name
Nacionalities
Foot
height
Number
Age
Market Value
Transfers
Name
Date
Age
Left
Join
Value
Games
Competition
Date
Home
Away
Result
NEWS


Kickstart your PHP web development with Docker.
Check Environment See phpinfo() View on GitHub License


This is the best place to buy AirPods on Black Friday
by Leah StodartAirPods will be one of the most popular items of Black Friday 2019. We're calling it now.
Go type "AirPods" into Google Trends and check out the related queries. Searches like "Black Friday AirPods" and "AirPods Black Friday sale" have risen by 700% from October to November and over 100% in the last seven days.
This leads up to one question: Who will have the best price on AirPods for Black Friday 2019?
As of now, Walmart wins for the more affordable AirPods 2 and Amazon wins for the new AirPods Pro .
The front page of Walmart's Black Friday ad flexes the second-generation AirPods with the regular (not wireless) charging case for $129, which is the lowest we've seen during our scouring of all the major Black Friday 2019 ad scans. $129 is $30 off the original price and $10 less than this model's lowest price on Amazon ever.
Amazon doesn't drop a traditional ad scan, but in typical Amazon fashion, it has sneakily dropped the AirPods Pro to $234.98 weeks ahead of Black Friday. A $14 discount doesn't seem like much until you consider that Amazon is currently the only major retailer we've seen with any sort of AirPods Pro discount. Amazon is no stranger to unprecedented discounts on Apple devices, so a surprise Black Friday sale on the AirPods 2 or AirPods Pro could be on the horizon.
What's the difference between AirPods and AirPods Pro? The steep change in price can be attributed to the addition of noise cancellation and water resistance in the AirPods Pro. If you're wondering if that's worth the extra $100, it definitely is.
We'll spread the word if we see any noteworthy changes, but you can keep an eye on current AirPod prices here:
Amazon:
- Apple AirPods with Charging Case (Latest Model) — $139 (list price $159)
- Apple AirPods Pro — $234.98 (list price $249)
Walmart:
- Apple AirPods with Charging Case (Latest Model) — $139 (list price $159)
- Apple AirPods Pro — $249 (same as list price)
Best Buy:
- Apple AirPods with Charging Case (Latest Model) — $144.99 (list price $159)
- Apple AirPods Pro — $249.99 (same as list price)
Target:
- Apple AirPods with Charging Case (Latest Model) — $144.99 (list price $159)
- Apple AirPods Pro — $249 (same as list price)
Staples:
- Apple AirPods with Charging Case (Latest Model) — $139 (list price $159)


--- layout: page title: About header-img: "img/about-bg.png" ---
Dedicated to the journey of becoming a Data Scientist, covering the ups and downs. As we answer the question, what in the Data is this?


Number of Slices: Indicates number of buckets in horizontal axes (Date) It's better if this number be more than number of datapoints.
Min Frequency: Minimum Frequency in our data. Helps to better color code frequencies.
Max Frequency: Maximum Frequency in our data. Helps to better color code frequencies.
Min Bin: Min Bin than we want to see. Needs page refresh.
Max Bin: Min Bin than we want to see. Needs page refresh.
Positive Infinity: If you have _inf bucket in your histogram buckets, this number will be replaced with it. It's needless to say that this number should be hiegher than any other bucket value in your data. Needs page refresh.
Legend
Max number of legend elements: Indicates maximum number of elements in legend. Actual number will be determined automatically based on frequency range of your data.