Extremely well taken care of by one owner! This property features 3 beds and 2 full baths. Spacious open plan with Living room/ dining room combo, beautiful laminate flooring throughout. Plenty of cabinet space in kitchen. Go see it today!
Well built, all brick, 5-6 bedroom home on 1.22 acres in Brightwood Acres East. 6th bedroom is very large with outdoor entrance and can be used as a family room, studio or in law suite. Yard has been meticulously landscaped. First floor laundry. Natural gas heat w 2 furnaces; Dual zone A/C's (updated 2010 and 2017). No city taxes and no HOA. Open floor plan. See comments w/ photos.
Beautiful brick home located in the Potomac Manor neighborhood. Great location near shopping and the Y Rec Center. The kitchen, dining and living area is open concept (remodeled in 2014). Hardwood floors on the main level with laminate flooring on the lower level. On the main level, three bedrooms, one full bathroom and one 3/4 bathroom. On the lower level, one bedroom and one 3/4 bathroom with a family room with fireplace, play/exercise room, and wash/storage room. The home sits on 1/3 acre with mature trees, large deck, patio, play set, and raised garden bed. The home also has a brick shed under the deck that is attached to the house. Additional Information- front door (2017); Windows and back doors (2013); Furnace/AC/Water Heater (2014); Kitchen Appliances (2018).
Everything you want is in this house. Open foyer looking into living room, kitchen. Formal dining room off the Kitchen with plenty of windows. Kitchen has granite and tile floor, all appliances convey. Table area looks over the large back yard and wonderful deck. Hang out in the family room with a fireplace or go to the media room and watch a good movie. Guests have their own bedroom and full bath. Upstairs enjoy a open area with 4 bedrooms. Master suite offers large bedroom with wonderful master bathroom with separate vanities, soaking tub, separate shower. Enjoy the a large walk in closet in master. Two car garage with storage. Woodbridge is located just minutes from Meritus Hospital, Collage, Black Rock Golf Course and I70. Call for your tour of this wonderful home.
Well maintained & updated home on a spacious double lot! Home features living room & dining room leading to a HUGE kitchen that has been recently updated. Main level laundry hookups (currently have W/D split w/half in DR but would nicely fit a stackable unit to free up dining room!). Upstairs has 4 BDRMS (all walk-thrus except 1) & updated BA + access to a small balcony to enjoy views of the yard! SO many updates including: Mohawk laminate flooring, replacement windows & doors by Castle Windows w/transferable lifetime warranty, roof replaced in 2015 w/transferable 50 yr warranty, newer CAC & HWH & efficient nat gas heating. GREAT fenced lot with raised gardens, BBQ shed & 1 car detached garage/workshop in rear + LOTS of extra parking!!
Welcome to your new home! Relax in the sanctuary of a 700 Sq Ft deck with a privacy fence. Enjoy the beauty of a backyard with an oasis of beautiful trees and greenery.~ This luxurious home has 5 bedrooms and 3 1/2 baths. After a long day, retreat to an extra-large Master Bedroom suite with trey/tray ceiling and crystal chandelier, 2 oversized walk in closets, its own sitting room and Master bath with soaking tub, double size shower and double vanity. The front garden and classic Oak front door welcome you to a 2-story foyer with hard wood floors and staircase accented by a wooden bannister that curves at the end. Just off the foyer is an elegant office/den with French doors adding a touch of classic beauty. Eat-in kitchen with hardwood floors opens into the expansive family room with fireplace. Beautiful formal dining room has trey ceilings crown molding and chair rails. The formal living room is cozy, elegant and finished off with crown molding. Laundry/mud room opens to oversized garage with 2 doors (one is automatic) and extensive shelving. Lower level boasts a house within a house. Full upgraded eat in kitchen and separate dining room. Large, comfortable living room. Full size master suite with 2 closets. Master bath, separate laundry area and computer niche; double French doors lead to walk out private patio. With inside as well as outside entry, the lower level is great for rental income or in law suite. Neighborhood has elementary school, community pool, club house, fitness center. Close to shopping, highways, hospitals and key amenities. A must-see, this home will not last long!
Total renovation including New kitchen cabinets, upgraded stainless appliances, countertops. Laminate and carpet floors and fresh paint everywhere. Bathrooms with new vanities, countertops, new lighting, mirrors and vinyl plank flooring. BRAND NEW ROOF IN APRIL 2019.
Fantastic 4 Bedroom, one and one half bath Duplex located close to fun and excitement. This home is truly an awesome buy. Living Room and Dining Rooms have beautiful hardwood floors, kitchen new vinyl flooring with stack-able washer and dryer. There is a first floor mud room with a half bath that exits to the awesome deck and yard that makes you feel like you are in the country. In the back yard you will enjoy the Koi pond while also enjoying the relaxing landscaping. At the rear of the home is a detached two car garage with alley access. In addition to the many outside attractions, this home all has a high efficiency oi furnace, Replacement windows and new flooring. This home was truly taken care of! Hurry, Hurry, Hurry..... Won't last long.


text:
Gadesco - Pieve Delmona es una localidad y comune italiana de la provincia de Cremona, región de Lombardía, con 1.954.(2007) habitantes.

Evolución demográfica

Referencias

Enlaces externos

Localidades de la provincia de Cremona

redpajama_set_name: RedPajamaWikipedia


Business and retail services are at the top of our priorities. C-Lemme Companies LLC has the professional resources to develop each project to the full satisfaction of our clients. Through partnerships with leading local architectural and engineering firms, C-Lemme Companies LLC offers a full service design to construction team. Regardless of the scope of project, C-Lemme Companies LLC operates under a philosophy in which the personal relationship and financial interest of the client is above all else. Each client will always be provided with accurate and honest information, and communication will always be made in a timely manner.
The C-Lemme Companies team is equipped to handle site selection and development, conventional wood frame construction, steel frame construction, and fine tenant finish details. If your business is considering a move, an update, or a new location - please allow C-Lemme Companies to play a lead role in your project.


Your restaurant may be a creative outlet for you to delight diners with recipes that show off your artistic flair. However, it's still a commercial enterprise, and to be successful, it must be operated on solid business principles. The need for risk management is apparent every day, and business insurance should be at the top of your priority list. Learn more about the types of commercial insurance you need for your restaurant.
If you own your business premises, property insurance protects the structure against damage due to fire, storms, falling objects, vandalism, and other perils. It can also protect your business assets inside the building, including tables and other furniture, electronics, kitchen equipment, and even inventory.
If someone slips and falls or becomes ill from something they ate at your restaurant, liability insurance pays the cost of any medical treatment. This protection extends to your staff as well—if a server accidentally spills hot soup on a customer's priceless mink coat, the liability policy pays for repairs and the cost to defend a lawsuit resulting from the incident.
If your business sells alcohol, you could be held responsible for serving a client who over-imbibes and later crashes a car. In some cases, you could be sued by anyone injured in the accident as well as the patron you overserved. Liquor liability insurance comes in to play after such an event.
If you own a fleet of vehicles to provide delivery service, you need to insure them up to the standards set by state law. In North Carolina, vehicles must carry at least $30,000 of bodily injury liability per injured person to a per-accident maximum of $60,000. You also need at least $25,000 of property damage liability.
Workers' comp insurance pays the medical costs of any workplace injuries or illnesses you or your employees should suffer. If they take advantage of the free medical care, your workers waive the right to seek additional damages from you, limiting your exposure and benefiting both parties.
To discuss your business insurance options with a friendly, experienced agent, contact Phillip Kent Beck Agency in greater High Point, NC. They serve businesses and individuals in and around Randolph County, and also specialize in home, life, renters, and auto insurance. Call (336) 434-2111 to discuss your needs and request an insurance quote.


text:
A small house converted into an inhabited work of art
Houses | 1 year ago
A small house with just 2.5 meters wide that has been transformed into a small oasis, Beira Mar House designed by Portugal-based architectural and design studio Paulo Martins Arquitectura & design, located in Aveiro, Portugal.
Project description by the architect:
Located in one of the most typical and established neighbourhoods of Aveiro (Beira Mar), this residence is the result of a passionate and challenging reform, a reform which intends to return to the city and to its users a lifestyle which is free and in contact with outdoor spaces, with the sound of seagulls and the smell of the sea breeze, the colour of the sky and the green of the vegetation.
image © Ivo Tavares studio
Built on a plot of land measuring 30 meters long and 2.5 meters wide, it formally establishes itself as a habitable corridor, which, from the moment of entry, is filled with moments of darkness, light, surprise, discovery, compression and, lastly, release... the backyard patio!
With sober and elemental materials, basic and essential functions are covered in concrete, such as the floor we tread and the space which houses the bathrooms and service area. The building has been covered and protected with plasterboard painted dark green, rigorously shielded for its new and invigorated life cycle. Whilst on the one hand we want a dark and intimate environment inside, by conceptual and practical contrast, the exterior is white, a purposefully reflective surface which floods the house with light, sometimes diffuse and soft, sometimes direct and intense, as the reflection of the various moods of those who live there.
Relative to design, all social functions have been planned to take place on the ground floor, in direct contact with the house's backyard patio, while the upper floor is reserved for both bedrooms and a solarium, visually protected from unwanted eyes by a plant curtain.
This house was designed to be lived in and experienced in the privacy and freshness of the exterior, in tune with the past and with a deep respect for the future.
Conceptual diagram
Principal facade
Back Elevation
Project name: Beira Mar House
Architecture firm: Paulo Martins Arquitectura & design
Principal architect: Paulo Martins
Collaborators: Bruno Alvarinhas
Net area: 131 m²
Design year: 2017
Construction: Isolterm
Engineering: R5 Engineers
Photography: Ivo Tavares studio
Aluminium Technal
Exterior coverings - Lajetas de pedra, Etics
External Flooring - Lajetas de pedra
Sockets - Efapel
Lightning - Artemide, Luceplan
Plumbing fixtures - Ceramica Catalano
Appliances - Teka
Family House in the River Valley in Znojmo, Czech Republic by Kuba & Pilař architekti
Golden Beach Residence designed by SDH Studio Architecture + Design
Carbonado Residence 1 in Panipat, India designed by 23DC Architects
Guest house with barbecue in New Moscow, Russia designed by BIGO Architects

redpajama_set_name: RedPajamaCommonCrawl


text:
Subscribe and receive the investor playbook!
Stock Watch:
Desert Mountain Energy holds + 90,000 acres of land in Arizona, the world's best address for helium.
On January 29-30 2023, VRIC (Vancouver Resource Investment Conference) will take place. The event hosts over 300 junior mining companies and attracts over 5000 mining investors annually.
GlobalX is a US 121 domestic flag and supplemental Airline flying the Airbus A320 family aircraft. GlobalX flies as a passenger ACMI and charter airline serving the US, Caribbean, European and Latin American markets.
HomeBTV ShowBTV FeaturesCEO ClipsArticlesInvestor AlertsTV Ad SpotsAnalysts & Experts
Discover Companies before they're Live!
Exclusively for our subscribers
Subscribe and receive the investor Info
Company Name Sector
Download Investor Kit
Request Investor Info
TransCanna: Poised to Dominate the Largest Legal Cannabis Market in the World
The investment world has its eyes on TransCanna Holdings Inc. (CSE: TCAN, XETR: TH8), the up-and-coming player in California's budding cannabis industry. Recently, the company solidified its management ranks by recruiting a top-tier CFO from cannabis delivery giant Eaze, but the positive tailwinds don't stop there.
TransCanna is facing a transformational moment, having just turned the lights on in a new production facility that is one of the largest in the state - over 20 times larger than their old site. The company, and its wholly owned subsidiary Lyfted Farms, are so revered industry-wide for their indoor cultivation of premium-grade, exotic cannabis flower, that demand has continually outstripped supply. Their massive new multi-purpose facility in Modesto, California increases cultivation and production capacity by 400% to solve that problem. Cultivation is already underway in the facility, and new operations such as 3rd party processing, manufacturing, distribution and white labelling are poised to launch. (see an animated tour of the new 196,000 square foot facility here).
https://www.youtube.com/watch?v=XC8l8GI890k
The timing for TransCanna's expanded operations could not be better, as it dovetails with another significant catalyst for the company. This past April, the 2021 version of the United States Secure and Fair Enforcement (SAFE) Banking Act passed through the House, and hopes are high that it will pass the Senate and soon become law. If passed, the SAFE Banking Act will ease the banking and insurance pressures that have been dogging the cannabis industry for years, stimulating a deluge of business and investment.
It also doesn't hurt that the 4th largest company in the world – Amazon, is throwing its support behind legalization at the federal level. That's grounds for further optimism, according to Irwin Simon, CEO of Canadian cannabis behemoth Tilray. He sees legalization happening over the next 18 to 24 months and is mobilizing to acquire attractive targets in the U.S., something his company has been unable to do up till now due to a federal prohibition.
On the State level, recreational cannabis has been fully legal in California since 2018, and has become practically mainstream. In fact, the City of Modesto, where TransCanna operates, just launched the country's first ever sanctioned, city-wide 'cannabis passport', promoting cannabis tourism much like other regions promote wine tourism. Not surprisingly, TransCanna's subsidiary Lyfted Farms is prominently promoted in the new program.
"The California cannabis market is a large world-class market, estimated to be about 9 billion dollars" Blink says. "With the changes in Washington, the future is bright and unlimited. When regulations allow us to ship interstate, we're perfectly positioned to service markets throughout the U.S., with everything cultivated here in California."
With its experienced management team, 4x cultivation capacity, new revenue streams and looser restrictions, TransCanna is fast emerging as the 'one to watch' on the ever-evolving cannabis scene.
For more information on TransCanna Holdings Inc. (CSE: TCAN, XETR: TH8) please click the request investor info button.
FULL DISCLOSURE: TransCanna is a client of BTV-Business Television. This article does not constitute investment advice. Each reader is encouraged to consult with his or her individual financial professional. Any action taken as a result of reading information here is the reader's sole responsibility.
cannabis investments
cannabis markets
cannabis production facility
CSE: TCAN
invest in cannabis
CEO Clips - Mayfair Gold: Updated Resource Shows Growth to 3.3M ozMetals & Mining
CEO Clips - Regenx: The Future of Precious Metal RecoveryMetals & Mining
CEO Clips - ARway: Technological Advancement Disrupting the AR MarketTech
Hot Companies
Klimat X
Harvest Portfolio Group
Schwazze Takes Focused Approach to Become Market a Leader
Over the last few years, Schwazze (OTCQX: SHWZ / NEO: SHWZ) has relied on a "go deep, run lean" strategy to help them emerge as a regional force in the lucrative Colorado and New Mexico markets.
Mission Critical: How XPhyto Therapeutics Could Revolutionize PCR Testing
Rapid on-the-spot testing and population-scale vaccination for coronaviruses, including the Delta and now Omicronvariants, has become society's most e …
Discover Companies to Invest In!
Corp. Videos
@BTVCEOClips


text:
nature methods
This Month | Published: 29 June 2017
Points of Significance
Jake Lever1
, Martin Krzywinski2
& Naomi Altman3
Nature Methods volume 14, pages 641–642 (2017) | Download Citation
PCA helps you interpret your data, but it will not always find the important patterns.
Principal component analysis (PCA) simplifies the complexity in high-dimensional data while retaining trends and patterns. It does this by transforming the data into fewer dimensions, which act as summaries of features. High-dimensional data are very common in biology and arise when multiple features, such as expression of many genes, are measured for each sample. This type of data presents several challenges that PCA mitigates: computational expense and an increased error rate due to multiple test correction when testing each feature for association with an outcome. PCA is an unsupervised learning method and is similar to clustering1—it finds patterns without reference to prior knowledge about whether the samples come from different treatment groups or have phenotypic differences.
PCA reduces data by geometrically projecting them onto lower dimensions called principal components (PCs), with the goal of finding the best summary of the data using a limited number of PCs. The first PC is chosen to minimize the total distance between the data and their projection onto the PC (Fig. 1a). By minimizing this distance, we also maximize the variance of the projected points, σ2 (Fig. 1b). The second (and subsequent) PCs are selected similarly, with the additional requirement that they be uncorrelated with all previous PCs. For example, projection onto PC1 is uncorrelated with projection onto PC2, and we can think of the PCs as geometrically orthogonal. This requirement of no correlation means that the maximum number of PCs possible is either the number of samples or the number of features, whichever is smaller. The PC selection process has the effect of maximizing the correlation (r2) (ref. 2) between data and their projection and is equivalent to carrying out multiple linear regression3,4 on the projected data against each variable of the original data. For example, the projection onto PC2 has maximum r2 when used in multiple regression with PC1.
Figure 1: PCA geometrically projects data onto a lower-dimensional space.
(a) Projection is illustrated with 2D points projected onto 1D lines along a path perpendicular to the line (illustrated for the solid circle). (b) The projections of points in a onto each line. σ2 for projected points can vary (e.g., high for u and low for v). (c) PC1 maximizes the σ2 of the projection and is the line u from a. The second (v, PC2) is perpendicular to PC1. Note that PC1 is not the same as linear regression of y vs. x (y∼x, dark brown) or x vs. y (x∼y, light brown). Dashed lines indicates distances being minimized.
The PCs are defined as a linear combination of the data's original variables, and in our two-dimensional (2D) example, PC1 = x/√2 + y/√2 (Fig. 1c). These coefficients are stored in a 'PCA loading matrix', which can be interpreted as a rotation matrix that rotates data such that the projection with greatest variance goes along the first axis. At first glance, PC1 closely resembles the linear regression line3 of y versus x or x versus y (Fig. 1c). However, PCA differs from linear regression in that PCA minimizes the perpendicular distance between a data point and the principal component, whereas linear regression minimizes the distance between the response variable and its predicted value.
To illustrate PCA on biological data, we simulated expression profiles for nine genes that fall into one of three patterns across six samples (Fig. 2a). We find that the variance is fairly similar across samples (Fig. 2a), which tells us that no single sample captures the patterns in the data appreciably more than another. In other words, we need all six sample dimensions to express the data fully.
Figure 2: PCA reduction of nine expression profiles from six to two dimensions.
(a) Expression profiles for nine genes (A–I) across six samples (a–f), coded by color on the basis of shape similarity, and the expression variance of each sample. (b) PC1–PC6 of the profiles in a. PC1 and PC2 reflect clearly visible trends, and the remaining capture only small fluctuations. (c) Transformed profiles, expressed as PC scores and σ2 of each component score. (d) The profiles reconstructed using PC1–PC3. (e) The 2D coordinates of each profile based on the scores of the first two PCs.
Let's now use PCA to see whether a smaller number of combinations of samples can capture the patterns. We start by finding the six PCs (PC1–PC6), which become our new axes (Fig. 2b). We next transform the profiles so that they are expressed as linear combinations of PCs—each profile is now a set of coordinates on the PC axes—and calculate the variance (Fig. 2c). As expected, PC1 has the largest variance, with 52.6% captured by PC1 and 47.0% captured by PC2. A useful interpretation of PCA is that r2 of the regression is the percent variance (of all the data) explained by the PCs. As additional PCs are added to the prediction, the difference in r2 corresponds to the variance explained by that PC. However, all the PCs are not typically used because the majority of variance, and hence patterns in the data, will be limited to the first few PCs. In our example, we can ignore PC3−PC6, which contribute little (0.4%) to explaining the variance, and express the data in two dimensions instead of six.
Figure 2d verifies visually that we can faithfully reproduce the profiles using only PC1 and PC2. For example, the root mean square (r.m.s.) distances of the original profile A from its 1D, 2D and 3D reconstructions are 0.29, 0.03 and 0.01, respectively.Approximations using two or three PCs are useful, because we can summarize the data as a scatter plot. In our case, this plot easily identifies that the profiles fall into three patterns (Fig. 2e). Moreover, the projected data in such plots often appear less noisy, which enhances pattern recognition and data summary.
Such PCA plots are often used to find potential clusters. To relate PCA to clustering, we return to the 26 expression profiles across 15 subjects from a previous column1, which we grouped using hierarchical clustering (Fig. 3a). It turns out that we can recover these clusters using only two PCs (Fig. 3b), reducing the dimensionality from 15 (the number of subjects) to 2.
Figure 3: PCA can help identify clusters in the data.
(a) Complete linkage hierarchical clustering of previously described expression profiles1 with the expression of all 26 genes (listed vertically) represented with lines across 15 samples (horizontally). (b) When shown as coefficients of the first two PCs, profiles group in a similar manner to the hierarchical clustering—groups D and E are still difficult to separate. (c) PCA is not scale invariant. Shown are the first two PC components of profiles whose first and second variable (subject) were scaled by 300 and 200, respectively. A grouping very different from that in b is obtained. (d) The plot of the two scaled variables in each profile, ignoring the remaining 13 variables. The grouping of points is very similar to that in c, because PCA puts more weight on variables with larger absolute magnitude.
Scale matters with PCA. We illustrate this by showing PC1 and PC2 coefficients of each profile after artificially scaling up the expression in the first two subjects in every profile by factors of 300 and 200 so that they are dominant (Fig. 3c). This scenario might arise if expression in the first two subjects was measured using a different technique, resulting in dramatically different variance. In fact, when a small set of variables has a much larger magnitude than others, the components in the PCA analysis are heavily weighted along those variables, while other variables are ignored. As a consequence, the PCA simply recovers the values of these high-magnitude variables (Fig. 3d).
If the variance is dramatically different across variables (e.g., expression across patients in the scaled data in Fig. 3c), or if the variables use different scales, such as expression and phenotype data, it may be appropriate to standardize them such that each variable has unit variance. However, if the variables are already on the same scale, standardization is not normally appropriate, as it may actually distort the data. For instance, after standardization, gene expression that varies dramatically owing to biological function may look similar to gene expression that varies only owing to noise.
PCA is a good data summary when the interesting patterns increase the variance of projections onto orthogonal components. But PCA also has limitations that must be considered when interpreting the output: the underlying structure of the data must be linear (Fig. 4a), patterns that are highly correlated may be unresolved because all PCs are uncorrelated (Fig. 4b), and the goal is to maximize variance and not necessarily to find clusters (Fig. 4c).
Figure 4: The assumptions of PCA place limitations on its use.
(a–c) Limitations of PCA are that it may miss nonlinear data patterns (a); structure that is not orthogonal to previous PCs may not be well characterized (b); and PC1 (blue) may not split two obvious clusters (c). PC2 is shown in orange.
Conclusions made with PCA must take these limitations into account. As with all statistical methods, PCA can be misused. The scaling of variables can cause different PCA results, and it is very important that the scaling is not adjusted to match prior knowledge of the data. If different scalings are tried, they should be described. PCA is a tool for identifying the main axes of variance within a data set and allows for easy data exploration to understand the key variables in the data and spot outliers. Properly applied, it is one of the most powerful tools in the data analysis tool kit.
Altman, N. & Krzywinski, M. Nat. Methods 14, 545–546 (2017).
Altman, N. & Krzywinski, M. Nat. Methods 12, 999–1000 (2015).
Krzywinski, M. & Altman, N. Nat. Methods 12, 1103–1104 (2015).
Jake Lever is a PhD candidate at Canada's Michael Smith Genome Sciences Centre.
Jake Lever
Martin Krzywinski is a staff scientist at Canada's Michael Smith Genome Sciences Centre.
Martin Krzywinski
Naomi Altman is a Professor of Statistics at The Pennsylvania State University.
Naomi Altman
Search for Jake Lever in:
Nature Research journals •
Search for Martin Krzywinski in:
Search for Naomi Altman in:
The authors declare no competing financial interests.
To obtain permission to re-use content from this article visit RightsLink.
https://doi.org/10.1038/nmeth.4346
A songbird compensates for wing molt during escape flights by reducing the molt gap and increasing angle of attack
Barbara M. Tomotani
& Florian T. Muijres
The Journal of Experimental Biology (2019)
Analysis and determination of phytosterols and triterpenes in different inbred lines of Djulis (Chenopodium formosanum Koidz.) hull: A potential source of novel bioactive ingredients
Chin-Yuan Huang
, Yung-Lin Chu
, Kandi Sridhar
& Pi-Jen Tsai
Food Chemistry (2019)
Obesity and Metabolic Syndrome in Kidney Transplantation
Winnie Chan
, Byron Smith
, Mark Stegall
& Richard Borrows
Transplantation (2019)
TCC-GUI: a Shiny-based application for differential expression analysis of RNA-Seq count data
Wei Su
, Jianqiang Sun
, Kentaro Shimizu
& Koji Kadota
BMC Research Notes (2019)
Inactivation of bacteria on fresh produce by batch wash ozone sanitation
Kristen E. Gibson
, Giselle Almeida
, Sarah L. Jones
, Kacy Wright
& Jung Ae Lee
Food Control (2019)
38 Altmetric
Nature Methods menu
Newsletter Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing
Close banner Close


text:
Q: Access Play Framework Router routing table at run time I am writing an EssentialFilter so I can perform an operation on every request. However all that the filter receives is a RequestHeader object and I need to know information about the actual controller that will be handling this request later down the line.
This information is plain and clear in routes.conf:
GET  /foobar   controllers.MyController.foobar()
GET  /bashbaz   controllers.MyController.bashbaz()

And I can even see that in my target folder a generated routing table is laid out very neatly in a documentation object:
// This example greatly simplified for clarity
class Routes() {
  def documentation = List(
    ("""GET""", prefix + """foobar""", """controllers.MyController.foobar()"""),
    ("""GET""", prefix + """bashbaz""", """controllers.MyController.bashbaz()""")
}

My only question is: how do I access this during runtime?
This answer coincidentally shows that the routes used to be available via Play.maybeApplication.get.routes but that is now deprecated. How do I get a Routes object at run time?

A: Play actually makes Routes available via dependency injection (DI) of its Router object. If you already have DI set up in your app then you only need to inject it into your constructor:
import play.api.routing.Router

class YourFilter(router: Router) extends EssentialFilter { ... }

If you haven't set DI up yet then I recommend reading the official reference on the subject. This third-party blog post also details some modern libraries that can be useful.
However, if you want to see what controller handles a particular RequestHeader, then I recommend ignoring the Router and documentation objects entirely and make use of the convenient handlerDef implicit:
import play.api.routing.Router.RequestImplicits.WithHandlerDef

override def apply(next: EssentialAction) = { request: RequestHeader =>
  val handlerDefOpt = request.handlerDef
  handlerDefOpt.map(handlerDef =>
    // Would be "controllers.MyController" in your example
    handlerDef.controller

    // Would be "foobar" or "bashbaz" in your example
    handlerDef.method

    // Would be "GET" in your example
    handlerDef.verb

    // Would be "/foobar" or "/bashbaz" in your example
    handlerDef.path

  )
}

Or you can also get the HandlerDef from within the request's attrs:
val handlerDef: Option[HandlerDef] = request.attrs.get(Router.Attrs.HandlerDef)

redpajama_set_name: RedPajamaStackExchange


text:
Alma indomable (English title: Untamed Soul) is a telenovela created by Alberto Gómez, produced by Venevisión International and filmed in Miami, Florida. Univision aired Alma indomable from October 19, 2009 at the 1/12c timeslot.

Scarlet Ortiz and José Ángel Llamas starred as the protagonists, while Lilibeth Morillo and Luis José Santander starred as antagonists.

Plot
Alma Pérez is a diamond in the rough: 23 years old, without any education who lives with her cruel stepmother Rafaela "Fucha" Pérez and sister Jazmín Pérez. Destiny brings her to the hacienda of Patricio Sorrento, Las Brisas, where she begins to live as a guest. Unknown to her, she is actually the heiress to Patricio's fortune. Fucha, her adoptive grandmother was paid to raise Alma by her real grandmother Paula Romero.

At the hacienda, Alma meets Juan Pablo Robles, the administrator of the hacienda who lives with his mother Caridad Robles. He begins to teach Alma how to read and write. Alma and Juan Pablo immediately fall in love, but when she sees him kissing Dubraska Sorrento, she feels betrayed and leaves the hacienda. After some time, she comes back as a successful, rich and beautiful woman to claim her fortune and seek revenge on her enemies.

Esteban De la Vega is a rich man who also loves Alma and will do anything to have her. Together with his cousin Abigail Richardi, who is in love with Juan Pablo, they conspire to separate the two.

Cast

Scarlet Ortiz as Alma Pérez / Alma Sorrento
José Ángel Llamas as Juan Pablo Robles
Lilibeth Morillo as Abigail Richardi
Luis José Santander as Esteban De la Vega
Víctor González as Nicanor Sánchez
Lisette Morelos as Monica Sorrento
Karina Mora as Dubraska Sorrento
Oscar Corbella as Patricio Sorrento
Patty Álvarez as Gertrudis Sorrento
Leonardo Daniel as Rogelio Sorrento
Yul Bürkle as Fernando Ríos
Rodolfo Jiménez as León Ríos
Gabriel Parisi as Federico Urbaneja
Juan Vidal as Raúl Urbaneja
Adita Riera as Caridad Vda. de Robles
Martha Picanes as Paula Romero
Esperanza Rendón as Cecilia Ocampo
Franklin Virgüez as Danilo Ocampo
Alan as Alberto "Beto" Ocampo / Alberto De la Vega Antúnez
Maite Embil as Amanda Rosales / Amparo "La Españolita"
Isabel Moreno as Rafaela "Fucha" Pérez
Tali Duclaud as Jazmín Pérez de Ocampo
Kenya Hijuelos as Susana "Susy"
Vivian Ruiz as Otilia Bezaes
Nelida Ponce as Carmela "Carmelita" Ríos
Julio Capote as Ramón Olivares
Yami Quintero as Luisa Olivares
Ezequiel Montalt as Mauricio Lira
Roberto Levermann as Theofilo "Theo"
Yadhira Santana as Guadalupe "Lupe" Fuentes
Martha Pabón as Rosa Angélica Antúnez
Nury Flores as Madre Superiora
Alí Sánchez as Sabrina Ortiz "Azul"
Verónica Noboa as Venus Estrella

References

External links

2009 telenovelas
2009 American television series debuts
2010 American television series endings
2009 Venezuelan television series debuts
2010 Venezuelan television series endings
Television shows set in Miami
Television shows filmed in Miami
Venevisión telenovelas
Spanish-language American telenovelas
Venezuelan telenovelas


The ikiPele is a unique compact fireplace which uses wood pellets. The wood pellets are burned using a gasification process this results in a high temperature, high efficiency and almost no smoke. Perfect to put on your table to give you an authentic wood fire with warmth but without the smoke.
The ikiPele (which means small volcano in Hawaiian) burns intensively for about 45 minutes after which it will glow for another 45 minutes. Besides wood pellets we also have coconut bark briquettes. They do not burn but glow, they do burn longer and you can just add another if you wish to extend the burn time.
The top grate can be used for simple cooking or keeping your food hot. Ideal for a cheese fondue or teapot.
To start the iki Pele, just light the starter and place the wind cover. As the fire starter starts to burn it will ignite the wood pellets.
During combustion the solid pellets are converted into heat and woodgas. In a normal fire this woodgas just evaporates, but not with the Iki Pele. You will see a beautiful fire that lasts for about 45 minutes.
After the burning process is finished the pellets will still glow for +/- 45 minutes. During this period the iki Pele radiates heat and is a perfect moment for roasting marshmallows, keeping your tea hot or enjoy a fondue.
Fill out this simple form and we will answer you as soon as we can.
IkiPele is part of inMarket B.V.


text:
Touch of Gold
TOG Blog
Halifax, NS (902) 423-5600
Rolex at Touch of Gold
Semi-Mount
Jewellery Categories
Touch of Gold has been in the business of fine jewellery for almost 40 years. A family run operation located in the heart of downtown Halifax, we have made it our business to understand the importance of special occasions and finding the perfect way to recognize and acknowledge each one.
'Supergirl' Melissa Benoist Reveals Her Oval-Shaped Diamond Engagement Ring on Instagram
"Supergirl" actress Melissa Benoist announced her engagement to co-star Chris Wood and unveiled her brand new oval-shaped diamond engagement ring on her Instagram page Sunday.
The intimate photo shows the romantic couple canoodling in front of a crackling fire, with Benoist beaming and her beau kissing her cheek. Of course, her engagement ring is front and center. The 30-year-old actress, who has 3.3 million Instagram followers, captioned the photo, "Yes yes yes it will always be yes." The post generated 923,000 Likes.
On his Instagram page, Wood posted the same photo and captioned it, "The happiest."
The white-metal ring, which is likely platinum, is highlighted by an oval diamond in a halo setting, complemented by a pavé diamond band. An industry insider told pagesix.com that the center stone appeared to be 3 carats and estimated the ring's value in the range of $100,000 and $200,000.
California-based jeweler Jennifer Meyer revealed on Instagram that the 30-year-old Wood played a big role in helping to design the ring. She wrote, "Chris, when you designed this ring with me, you made some girls on the JM team wish you had a brother. Wishing you both a lifetime of love, happiness and lots of babies!"
Benoist and Wood met in 2016 on the set of the CW series "Supergirl," with Benoist in the title role and Wood playing her on-screen love interest and fellow superhero Mon-El.
While both characters enjoyed super strength and a slew of other extraordinary powers, each had one major weakness. Green kryptonite would make Supergirl painfully ill and Mon-El would collapse in agony when exposed to lead. We're wondering… If a dastardly villain posed as a fine jeweler, might he recommend an engagement ring with a green kryptonite center stone set in lead?
Fortunately, the real-life couple clearly shows no vulnerability to the diamonds and noble metal glistening in their new ring.
Credits: Images via Instagram.com/melissabenoist.
Touch of Gold has been in the business of fine jewellery more than 40 years. A family run operation located in the heart of downtown Halifax, we have made it our business to understand the importance of special occasions and finding the perfect way to recognize and acknowledge each one.
Copyright © 2021 Touch of Gold


Titanic era Edwardian style gowns pattern similar to those worn by Rose in the movie.
Left view features underskirt, over-skirt, lined bodice and galloon lace trim.
Right view features underskirt, over-bodice and over-skirt.
Misses Sizes 16, 18, 20 are all included.


Over 30 years in the Real Estate field. Managed Dowling Associate Real Estate. Fully licensed agent since 1995. Certified Court Appointed Special Advocate in NH.
I have been living in NH for over 32 years. I have been married now for over 32 years and have 2 grown children. I have been a licensed REALTOR now for 25 years. I love to read and travel, hike and bike.


text:
See Inside George Plimpton's Upper East Side Duplex
The late editor of the Paris Review hosted legendary parties on a weekly basis, and now his 4,700-square-foot home is on the market for $5.495 million.
By Sam Dangremond
The legendary parties that Paris Review editor George Plimpton hosted with his wife at their Upper East Side duplex overlooking the East River attracted a who's who of the arts and society; figures like Truman Capote, Paul McCartney, and Andy Warhol frequented the fetes at the duplex at 541 East 72nd Street. Plimpton died in 2003, and now his wife, Sarah Dudley Plimpton, is planning to sell the apartment and move to Santa Fe. Here's a look inside.
Almost all of the rooms overlook the East River, and there are a total of 40 windows throughout the space.
Here's the living room on the lower level, which once housed the offices of the Paris Review. Plimpton was known as a "participatory journalist" and once wrote about performing with the New York Philharmonic under conductor Leonard Bernstein.
The living room connects to a game room, which also includes a wood-burning fireplace.
Combined, the rooms offer 60 feet of entertaining space—plenty of room for the weekly parties.
Here's the view of the East River.
Plimpton moved into the building in the 1950s.
When it went co-op in the early 1970s he expanded his reach to four apartments and combined them, listing agent Ann Cutbill Lenane of Douglas Elliman told the Wall Street Journal.
The kitchen has been renovated.
It features a FiveStar stainless-stove and grill along with new Caesarstone countertops.
Upstairs, a den has northern and eastern exposures.
And another wood-burning fireplace.
It's next to a study that also overlooks the river.
The master bedroom is on a corner.
There are five bedrooms in all, and six-and-a-half bathrooms.
The master bathroom has a separate shower stall, plus river views.
There's also a laundry room—a rarity in Manhattan real estate.
The building is part of a row of nearly identical five-story buildings known as the "Black and Whites."
The black-painted brick buildings' entrances are very recognizable, with bright red doors and white trim. They're at the easternmost end of a quiet cul-de-sac, near a cobblestone-paved park with wrought iron benches.
For $5.495 million, this piece of history could be yours.
Here's a link to the Douglas Elliman listing.
Sam Dangremond Contributing Digital Editor Sam Dangremond is a Contributing Digital Editor at Town & Country, where he covers men's style, cocktails, travel, and the social scene.
More From Real Estate
Joan Rivers's $38 Million Penthouse Is For Sale
American Girl Doll Founder's Village
Ken Fulk's Transformation of a Gilded Age Estate
What You Need to Know About Sandringham
Lee Radziwiłł's London Home Is For Sale
You Can Stay on Yellowstone's Dutton Ranch
The House from 'House of Gucci' Is On AirBNB
Julia Child's Former D.C. Home is For Sale
The Apartment in 'Succession' Season 3 Is For Sale
You Could Be Prince Charles's Neighbor
See Inside Philip Falcone's Opulent Townhouse
15 Upper East Side Restaurants Worth Visiting Now
See Inside a Gilded Age NYC Townhouse
How to Spend a Perfect Day on the Upper East Side
Saddam Hussein Had a Torture Chamber in NYC
You Can Order A Bubble Bath On Demand At This Upper East Side Hotel


You can extend the main menu in the lemoon editorial interface to embed your own applications. This is done by creating a new class in your project. The class should inherit from the Mindroute.Lemoon.Menus.MenuItemExtension class. The example below adds an new main menu item called "Extras". The weight (sort order) is set to 100 to ensure the menu item is located as the last item, so it doesn't interfer with existing main menu items. When clicking on the new main menu item, a redirect to ~/lemoon/admin/apps/default.aspx will be performed.
You can use a custom icon for the main menu item. The icon should be a 32x32px .png file. You can store the image anywhere you like. The icon (and any other css rules you want to apply) is loaded from the icons.css file located in the ~/lemoon/content/ folder. If the css file doesn't exist, create it. Add a new class with the same name as specified in the class attribute [Icon], in this case extras with a background image set to the one you want. Look at the example below.
Often, you would like to have the same style and layout as the rest of the editorial interface. Since lemoon 4 is not built with frames, the page you redirect to must use the same master page and css as the editorial interface. Below is a simple example on how to get going with the page.
As you can see in the examples above, the page should use the Main.master master page file and inherit from the Mindroute.Lemoon.Web.UI.Admin.PageBase class. The resulting page would look something like below.


A child's first birthday is a time of celebration for family and the mark of transition from infancy to toddlerhood. Your child's language, gross motor (big movements) and fine motor (hand) skills all begin to take great leaps.
Around the one year mark, language begins to evolve more quickly. You may see your one year old indicate interest in something by using his or her index finger to point. The repetitive babbling sounds will start to sound like single syllables or true words. These may be words that only you recognize, but you will notice your child making the same sound in the same context repeatedly.
One year olds are great explorers. With their new-found ability to walk, toddlers will be happily moving around the room pulling things out of baskets and cabinets. A basket of age appropriate toys that can be unloaded (and quickly picked up by mom or dad) is a great source of entertainment. They will engage their improving pincer grasp and fine motor skills by working with shape sorters, stacking blocks or trying to fit together large pieces. They now understand 'object permanence' meaning objects out of sight are no longer out of mind. They may enjoy hiding toys under the basket and then finding them again. At this stage, they are much more efficient at feeding themselves and may even start to grab for the spoon. They will become more adept at a sippy or straw cup as well.
Those first steps are a much anticipated one year milestone for many parents. You may notice that your child by a year of age spends a great deal of time pulling up on the furniture and walking holding onto something. They may even have the courage to let go briefly and stand alone before sitting back down. They may begin to take a few unassisted steps. However, walking is a milestone with a wide age variance. Some infants may walk as early as 9-10 months, while others won't walk until 18 months or so. Both are within the range of normal, so don't be concerned if your one-year old hasn't taken steps just yet.
When those feet are spending more time on the floor, you may consider buying your child's first shoes. At home and on surfaces where protection isn't the primary concern, barefoot is best. Also be aware of slippery rugs or surfaces. When your child needs shoes for protection, choose those with a flexible sole and room in the toebox. Tennis shoes are a great option for a first shoe.
Around this time of exploration and new milestone achievement you may notice that your child wakes in the night occasionally. This happens commonly around the time babies learn to walk, almost as if that desire to get moving is stronger than the need to sleep. Use the tools that you have learned over the first year to reassure your child and help him get back to sleep.
Bringing your one year old into the pediatrician's office may be different experience than bringing him or her for checkups during infancy. You may notice that your child starts to fuss or seem wary as soon as you walk through the door. This fearfulness occurs due to the fact that a one year old takes time to warm up to new or unfamiliar situations. Bring with him a comforting toy or blanket. Bring along a favorite board book, a few blocks, a doll or toy train engines, which can be a helpful distraction.
At one year of age, children will receive three immunizations. These are MMR (measles, mumps, rubella), varicella (chicken pox) and Hepatitis A vaccines. The MMR and varicella vaccines, unlike other vaccines administered during the first year, are given in the back of the arm. Dressing your child in loose, short sleeves may make this easier. We may also order bloodwork to screen for anemia and lead exposure, which is prevalent in some Richmond communities.
We look forward to seeing you and your one year old in the office and hearing about the many new adventures and discoveries that you are having together! Please don't hesitate to contact one of our providers if you have questions or concerns about your child. Happy First Birthday!


text:
Gunplay
The unruly Miami rapper talks about trying to control his hot temper while maintaining his trademark artistic fury, and what to expect from his Def Jam debut.
by Carrie Battan
Gunplay: "The Hard Way"
Just this morning, Gunplay, the 33-year-old Miami rapper born Richard Morales, Jr., apparently evaded a potentially lengthy prison sentence after pulling a gun on his accountant-- on camera, no less-- last April. But the close call isn't causing him to reconsider the powder-keg, take-no-prisoners attitude that has helped him scale the ranks of rap as part of Rick Ross' Maybach Music Group. In January, when I ask him if he's been told to reconsider his rap name amidst the country's current revived gun-control debate, he says yes... and goes on to explain that anyone who presents him with that sort of talk can fuck off.
Kendrick Lamar: "Cartoon & Cereal" [ft. Gunplay]
He's planning on naming his forthcoming Def Jam debut Medellin after the Colombian city where he was filmed brazenly snorting cocaine in front of cops. He's spoken openly about blowing through $1,500 per week on weed, cocaine, and pills. He's not a role model by any means, but that's often his appeal-- his loose-cannon antics and personal tribulations are inextricable from his artistic success.
Gunplay: "Jump Out"
"It's exhilarating to move rapidly back and forth between identifying with Gunplay's character and feeling inside of this hyper-violent and visceral world and pulling back to feel something that approaches shock," wrote Mark Richardson, describing the rapper's gunshot-riddled 2012 track "Jump Out". The song, like much of Gunplay's material, is laced with an over-the-top, blood-splattered mania that's nothing less than Tarantino-esque-- it turns something harrowing into something exhilirating. Conversely, watching the rapper hit a man with the butt of his gun on a silent security tape is simply repellent, full stop. As more artists attempt to draw lines between their lives and their work, Gunplay seems set on blurring his worlds further, regardless of consequence. "You can't go through life being afraid," he says. "If you're scared, don't let nobody else know."
"Niggas can say they pop molly, but do you really?
I doubt it. I can't imagine Kanye popping a molly."
Pitchfork: How do you reconcile your incredibly raw roots with the prospect of being a rich and famous rapper hanging around rich and famous people all the time? Do you feel like you have a personal duty to stay loyal to your origins?
Gunplay: I've just got to figure it out as I go along. I get myself into some fucked up situations, but I learn from it. As you go higher up in the ladder, you look down, and it's a pretty far fall, so you tend to watch your step a bit more. That's all you can do. It's a full time job not to kill these niggas out here; every day I ask for the strength not to go off the handle and whack one of these stupid cunts. Ross tells me the same old shit: "Quit the dumb shit, let's get this money." When Ross couldn't get through to me, I had to get through to myself. I needed to buckle down, watch my temper, stay focused, work hard.
Pitchfork: Speaking of Rick Ross-- you're someone who's completely transparent. Everything is out there. When you first connected with Ross, were you ever skeptical about his background as a correctional officer?
G: Nah. He can't tell the world exactly why he was a corrections officer, he'll end up being indicted. There are a lot of things that go on behind the scenes that people fail to look at. You don't know what he was doing. And if he sits there and spills the beans, you never know what kind of ramifications could come. And for what? To please these fuck-niggas out here who don't pay his bills and want to see him die? Nah, fuck it. I'll always be riding with my dog, that nigga is 100. Anybody that feels different, they don't know no better.
Problem: "My Last Molly Song Ever I Promise" [ft. Trinidad James and Gunplay] (via SoundCloud)
Pitchfork: You've done more than a few drugs in your day-- what do you make of the fact that every rapper is talking about taking ecstasy now?
G: Molly's been here in the hip-hop community a while. I have no idea if all these rappers are actually taking it. Just like these rappers who are killing: Are you actually a killer? Did you actually take a life? Did you actually blow a nigga's brains out one time? Did you ever go to jail? Have you actually been in some shit? It's the same shit with molly. Yeah, niggas can say they pop molly, but do you really? I doubt it. I can't imagine Kanye popping a molly.
Pitchfork: You've explained your Swastika tattoo a bunch of different ways at different points. What does it really mean to you?
G: It originally meant peace and love and prosperity; Hitler took it and basically turned something innocent into death and destruction and holocaust. And that's the way society does the youth, the kids, me. We were born with love and happiness, and then look at what you made out of it. You can't judge a book by its cover, though. People think I'm bad because I got tattoos or snort a little cocaine here and there. They think I'm a killer. But what if I wasn't a killer? Then what? Don't be tripping on me. I pay my damn taxes, OK? Chill.
Pitchfork: What's the status of the Def Jam album?
G: We're about halfway finished. It's called Medellin, after the city in Colombia. Very beautiful city, beautiful women. I had a ball last time I went. They said my career was going to be over because I was snorting cocaine on camera there, so I just decided to take it back to Medellin and see what it do.
Pitchfork: Do you have any collaborations in mind for the record?
G: When I get back out, the people I want to get to for features will be more accessible because of my newfound fame. I've reached out to Pusha T. I'm also looking for one with Drake, so I can cater to the bitches.
Pitchfork: What does a Gunplay song for the ladies sound like?
G: It's very simple. If you listen to my feature on Masspike Miles' "Vanilla Texture", I'm talking about cocaine, but you wouldn't know it. I've made it sound like I'm talking about a woman. I'm making another one called "Greedy Love" for the ladies, and I've got one with Wale and Roscoe Dash called "Damn" that I haven't released yet. It's like "No Hands" part two.
Masspike Miles: "Vanilla Texture" [ft. Gunplay and J'Rell] (via SoundCloud)
Pitchfork: Have you gotten any pressure from Def Jam to tone down the more aggressive aspect of your sound?
G: They know they can't tone it down. They can tell me to-- but will I listen? They signed Gunplay because Gunplay is Gunplay. They don't really want to change my personality. But if they do need a certain sound and record, that's no problem. That's why I'm a professional at what I do. I can make a certain kind of music if need be.
Gunplay: "Bible on the Dash" (via SoundCloud)
Pitchfork: Can you talk about the song "Bible on the Dash"? That's the gentlest and most introspective we've heard you sound.
G: I wrote that song while I was on the run. When this case happened, I was stuck in a part of my mind where I was asking myself: "Do I want to go back to the streets and handle my business and take care of this problem or do I just keep calm, let everything blow over, and get this money?" So I put the Bible on the dashboard and let God guide me on my road to riches. That's why the hook is like that: "I got a problem and a plan, revolver in my hand/ Tryna keep it cold, y'all won't understand/ That's why I roll with the Bible on the dash." I'm not Christian, but I'm religious. I believe in a higher God and beings and spirits.
Pitchfork Music Festivals: Chicago / Paris
Reprint / Permissions
Follow Pitchfork on Facebook
Follow Pitchfork on Twitter
Follow Pitchfork on Instagram
Follow Pitchfork on Tumblr
Follow Pitchfork on Snapchat
© 2018 Condé Nast. All rights reserved. Use of and/or registration on any portion of this site constitutes acceptance of our User Agreement (updated 5/25/18) and Privacy Policy and Cookie Statement (updated 5/25/18). Your California Privacy Rights. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Condé Nast. Ad Choices. CN Entertainment.


97 Isuzu NPR box truck radio wiring and color code..plug was cut off..8 wire and only 2 speakers Isuzu Cars & Trucks question. ... Radio wire harness cut.
The Modified Life staff has taken all its Isuzu Trooper car radio wiring diagrams, Isuzu Trooper car audio wiring ... 2000 Isuzu Trooper Radio Wire Harness Color Codes.
1976 81 Opel Isuzu Stereo Wiring : 1981 87 Isuzu Pickup (mini) ... You are here: Home Wiring Colors Database Volkswagen 1985 Volkswagen Golf Stereo Wiring.


Happy to share with you! 🙂 Most are Ikea plates summer collection, easy to find.
Great; Now I've drooled on my keyboard. Thanks a bunch.
I'm so happy you like it that much. 🙂 That always makes it worth sharing.
Dark chocolate is just the best!
Thanks so much, happy you like it.


text:
Q: How to handle OutOfMemoryException In my app I have something like:
static void Main(string[] args)
{
  for(int i=0;i<1000;i++){
   MyObj mo=new MyObj();
   }
 }

When i=536 I'm getting: Unhandled Exception: OutOfMemoryException
I have tried to modify to:
 for(int i=0;i<1000;i++){
   MyObj mo=new MyObj();
   mo=null;
   }

How to handle this exception properly?
MyObj class looks roughly as follows:
    readonly string _url;
    readonly string _username;
    readonly string _password;
    //more properties here
    public MyObj(string username , string passowrd , string host )
    {
        _url = $"https://{host}";
        _username = username;
        _password = passowrd;

    }

    //upload file to server
    private void Upload(string path){
     //some code that upload the file
    }

    //get json string about htis file
     private void Info(string session){
      //some code here
     }

A: With the few information that we have, I would advice to implement IDisposable on the MyObj and then adapt the for-loop:
for(int i=0;i<1000;i++)
{
    using(MyObj mo=new MyObj())
    {
        //Do something here
    }
}

The MyObj would look like:
class MyObj : IDisposable
{
    public void Dispose()
    {
       // Dispose of unmanaged resources.
       Dispose(true);
       // Suppress finalization.
       GC.SuppressFinalize(this);
    }
}


text:
Q: Print first occurrence of a line in bash I extracted ORFs from a initial fasta file and now I want to get the longest ORF for each transcript.
After having extracted the size of the ORFs with faSize and sorted them by size,
the code I was used to use is:
perl -ane'print unless $x{$F[0]}++'

This time I have a problem using the perl command.
After having extracted the size and sorted the transcripts I have something like this:
Singlet_1000_61         3844
Singlet_2000_73         3508
Singlet_1000_62         3081
Singlet_2000_62         3008
Singlet_3500_48         2973
Singlet_4000_48        2964
Singlet_3500_54        2863

What I want is:
Singlet_1000_61         3844
Singlet_2000_73         3508
Singlet_3500_48         2973
...

The perl command is not working in this case.
Do you have any suggestions on how I can make it work?
Or a awk command?

A: If only looking at
Singlet_1000_61 3844
        ^^^^

is ok,
 perl -F_ -ane'print unless $x{$F[1]}++'

If you want to look at
Singlet_1000_61 3844
^^^^^^^^^^^^

then
perl -ane'$F[0] =~ s/_[^_]*\z//; print unless $x{$F[0]}++'

A: Print each line that first has the second part of the line split by underscores.
awk -F_ '!s[$2]++' <<< 'Singlet_1000_61 3844
Singlet_2000_73 3508
Singlet_1000_62 3081
Singlet_2000_62 3008
Singlet_3500_48 2973
Singlet_4000_48 2964
Singlet_3500_54 2863
'
Singlet_1000_61 3844
Singlet_2000_73 3508
Singlet_3500_48 2973
Singlet_4000_48 2964


You are right. It's fairly straight-forward. The range is the datatype of the expected value. Where we have URL only, we expect it to be a URL and we can't say anything about what to expect when you get there, but hopefully it's rdf.
Where we have URI;Classname, we expect it to be rdf of that bf:Classname type.
I think the Related range of "URL;URL" is a mistaken transformation of the source file to the online presentation; will fix.
What is the meaning of "URL" in the "Expected values" column, and in particular, can you clear up the meaning of "URL ; URL"?
> the values of a property are instances of one or more classes."
> any value that is in the form of a URL in addition to the classes listed?
> be represented as URL/URIs?
>> Expected value is the Range.


Size From 570 sq. ft. 590 sq. ft. 720 sq. ft. - Size To 570 sq. ft. 590 sq. ft. 720 sq. ft.
Ashburn are pleased to offer to the market this three bedroom mid terrace property situated on Long Readings Lane. This home is situated in a popular residential location, close to local amenities.
Rarely available an opportunity to acquire a three Bedroom end terrace family home located close to the Farnham Road. This property briefly benefits from double glazing, gas central heating, lounge, kitchen and first floor family bathroom, garage (in block), driveway parking and rear garden. Please refer to the floor plan for more details.
Arranged over two floors, the property is full of character with the foundations to make a stunning family home. Requiring some aspects of redecoration (and ideally expanding subject to the necessary planning consents however would ideally benefit from expanding (subject to planning consents). The ground floor offers a through lounge/diner, spacious kitchen (fitted with a range of fronted wall and floor units with a range of white goods), leading to secluded rear garden. The first floor benefits from three bedrooms, family bathroom and access to the loft via the landing. More Photos to follow….
Please refer to floor plan.
garden with a a range of plants and shrubs and the rest of the garden laid to lawn.
The property is situated, near the Farnham Road and is within walking distance to local amenities and a short drive to mainline train station which serves to London Paddington and Reading on the fast services in less than 20 minutes. The nearby M4 and A4 provides fast links to the M25, M40, A40 London and Heathrow. Other transport benefits include a short walk to the mainline bus station.
There are various local infant and Junior schools which include Claycots and Penn Wood Primary School. The local secondary Schools include Herchel Grammar, Baylis Court, Burnham Grammar and Upton Court Grammar School. The property also benefits from being local to several parks and open spaces including Black Park, Langley Park, a short drive from Windsor and various leisure activities.
Ashburn Property Consultants have not tested any of the services, appliances or apparatus and therefore cannot guarantee they are in working order. None of these statements contained in these particulars are to be relied upon as statements or representations of fact.
Please note the floor plan where shown is for guidance purposes only and not guaranteed.
Enter your details now and one of our estate agents will be in touch very shortly during opening hours.
We strongly feel that giving back is high on our agenda hence donate a minimum of £50 to Alexander Devine Children's Hospice or a registered charity of your choice.


ALPHONSE ISLAND, Seychelles (AP) — A British scientist and her American pilot made an emergency ascent from 100 meters (328 feet) beneath the surface of the Indian Ocean on Tuesday after smoke filled the cockpit of their submersible.
The pair with the British-led Nekton Mission investigating climate change off the Seychelles was safe and recovering on the mother ship. An electrical fire was being investigated.
The mission said it expected to be back in the water on Wednesday, adding that emergency procedures had worked well.
The sub was off Aldabra Island when pilot Robert Carmichael smelled smoke and immediately began to ascend. He told The Associated Press he quickly fitted breathing masks to his passenger, Molly Rivers, and himself. He began an emergency rise to the surface as the oxygen indicator fell to zero.
The mission has been dogged with bad luck since it left Victoria, the Seychelles capital, at the beginning of March. Poor weather forced a change in route, an underwater drone was temporarily lost when the ship's propeller cut its cable and other key equipment has malfunctioned.
The Associated Press is the only news agency working with British scientists from the research team. Sky News is the mission's programming partner. AP video coverage will include exploring the depths of up to 300 meters off the coast of the Seychelles, the search for submerged mountain ranges and previously undiscovered marine life, a behind-the-scenes look at life on board, interviews with researchers and aerial footage of the mission.


From the Wright Brothers' first airplane factory to the latest technological innovations at Wright-Patterson Air Force Base (WPAFB), Dayton has always been at the forefront of aerospace research and development. Today Dayton is the official Ohio Aerospace Hub with a center of excellence focused on sensors, unmanned systems, propulsion, and other commercialization opportunities that can help your business grow.
GE Aviation recently chose Dayton for their new $50 million R&D facility known as the EPISCENTER –Electrical Power Integrated Systems Research and Development Center.
By working in partnership with the City of Dayton, University of Dayton Research Institute (UDRI) and other regional partners, GE Aviation chose to capture the talent and resources available in our community for the next generation of aerospace technology.
The Dayton region is also home to a cluster of business incubators, where companies are developing cutting-edge military and civilian innovations for commercial applications. By locating in Dayton, companies can explore opportunities to partner with institutions like the Air Force Research Lab (AFRL) or The Entrepreneur's Center in the new Tech Town office park. Dayton is a place where talented scientists and salespeople are working together to drive the new economy forward in Ohio.
Contact the City of Dayton's Department of Economic Development to find out more about why Dayton is a national leader in the aerospace industry, and how we can help your business soar to new heights.


text:
#ifdef USE_GPL_SHOGUN
#include <shogun/labels/MulticlassLabels.h>
#include <shogun/features/DenseFeatures.h>
#include <shogun/kernel/GaussianKernel.h>
#include <shogun/multiclass/LaRank.h>
#include <shogun/mathematics/UniformRealDistribution.h>
#include <gtest/gtest.h>

using namespace shogun;

TEST(LaRank,train)
{
	int32_t seed = 100;
	index_t num_vec=10;
	index_t num_feat=3;
	index_t num_class=num_feat; // to make data easy
	float64_t distance=15;

	// create some linearly seperable data
	SGMatrix<float64_t> matrix(num_class, num_vec);
	SGMatrix<float64_t> matrix_test(num_class, num_vec);
	MulticlassLabels* labels=new MulticlassLabels(num_vec);
	MulticlassLabels* labels_test=new MulticlassLabels(num_vec);
	std::mt19937_64 prng(seed);
	NormalDistribution<float64_t> normal_dist;
	for (index_t i=0; i<num_vec; ++i)
	{
		index_t label=i%num_class;
		for (index_t j=0; j<num_feat; ++j)
		{
			matrix(j,i)=normal_dist(prng);
			matrix_test(j,i)=normal_dist(prng);
			labels->set_label(i, label);
			labels_test->set_label(i, label);
		}

		/* make sure data is linearly seperable per class */
		matrix(label,i)+=distance;
		matrix_test(label,i)+=distance;
	}
	//matrix.display_matrix("matrix");
	//labels->get_int_labels().display_vector("labels");

	// shogun will now own the matrix created
	DenseFeatures<float64_t>* features=new DenseFeatures<float64_t>(matrix);
	DenseFeatures<float64_t>* features_test=
			new DenseFeatures<float64_t>(matrix_test);

	// create three labels
	for (index_t i=0; i<num_vec; ++i)
		labels->set_label(i, i%num_class);

	// create gaussian kernel with cache 10MB, width 0.5
	GaussianKernel* kernel = new GaussianKernel(10, 0.5);
	kernel->init(features, features);

	// create libsvm with C=10 and train
	CLaRank* svm = new CLaRank(10, kernel, labels);
	svm->train();
	svm->train();

	// classify on training examples
	MulticlassLabels* output=(MulticlassLabels*)svm->apply();
	//output->get_labels().display_vector("batch output");

	/* assert that batch apply and apply(index_t) give same result */
	SGVector<float64_t> single_outputs(output->get_num_labels());
	for (index_t i=0; i<output->get_num_labels(); ++i)
		single_outputs[i]=svm->apply_one(i);

	//single_outputs.display_vector("single_outputs");

	for (index_t i=0; i<output->get_num_labels(); ++i)
		EXPECT_EQ(output->get_label(i), single_outputs[i]);

	// predict test labels (since data is easy this has to be correct
	MulticlassLabels* output_test=
			(MulticlassLabels*)svm->apply(features_test);
	//labels_test->get_labels().display_vector("labels_test");
	//output_test->get_labels().display_vector("output_test");

	for (index_t i=0; i<output->get_num_labels(); ++i)
		EXPECT_EQ(labels_test->get_label(i), output_test->get_label(i));

	// free up memory
	SG_UNREF(output);
	SG_UNREF(labels_test);
	SG_UNREF(output_test);
	SG_UNREF(svm);
}
#endif // USE_GPL_SHOGUN

redpajama_set_name: RedPajamaGithub


text:
Ohiivți (în ) este o comună în raionul Starokosteantîniv, regiunea Hmelnîțkîi, Ucraina, formată din satele Hromivka, Ohiivți (reședința), Pîsarivka și Polovînnîkî.

Demografie

Conform recensământului din 2001, majoritatea populației comunei Ohiivți era vorbitoare de ucraineană (%), existând în minoritate și vorbitori de alte limbi.

Note

Ohiivtți
Ohiivtți, Starokosteantiîniv
Ohiivtți, Starokosteantiîniv, Hmelniîtțkiîi


text:
Reporter's notebook: At the DHS National Cyber Security Summit
Flanked by two senior officials from the Department of Homeland Security, Amit Yoran, the newly appointed director of the National Cyber Security Division, made his first major policy address since joining the department less than three months ago. Yoran made his much-anticipated remarks yesterday at the inaugural DHS National Cyber Security Summit, referred to jokingly by Tom Ridge, secretary of homeland security, and Robert Liscouski, assistant secretary for infrastructure protection, as "Amit's coming out party." If there was a central theme that ran through the remarks of all three DHS officials, it was the need to create a sense of urgency, to start taking action on tough issues facing cybersecurity at all levels of society, and to begin to think differently about future threats to the nation. Full Story


Do you want to become a racing car driver?
HMRDS organizes courses both at it's base using the very suitable "Circuito del Sele" racetrack and at other racetracks such as Adria, Varano de' Melegari, Monza, Modena and Magione.
For all drivers who wish to participate in any kind of sporting events, it is possible to carry out the formula test, aimed at obtaining valid licenses to take part in sports events taking place on national and international territory.
All drivers who request it will be able to use our cars.
The licenses will be issued by Aci Sport, in the presence of the Aci Sport tutor, who at the request of the participant, will go to our office to perform the test formula.


text:
namespace vanilc {

Coder::Coder(Config& config) : config(&config), imageDirection(0), predictor(NULL) {
	// config
	verbose = !config.get<bool>("quiet");
	sparsify_distribution = config.get<double>("sparsify_distribution");

	// configure context
	if(config.get<double>("neighborhood_front") > 0) // 3-D neighborhood prediction?
		context.setFullNeighborhood(StructuringElement::createHalfEllipsoidElement(config.get<double>("neighborhood_top"), config.get<double>("neighborhood_left"), config.get<double>("neighborhood_right"), config.get<double>("neighborhood_bottom"), config.get<double>("neighborhood_front"), true));
	else context.setFullNeighborhood(StructuringElement::createHalfEllipseElement(config.get<double>("neighborhood_top"), config.get<double>("neighborhood_left"), config.get<double>("neighborhood_right"), true)); // configure 2-D neighborhood mask

	if(config.get<int>("training_size_3D") > 0)
		context.setFullTrainingregion(StructuringElement::createHalfCuboidElement(config.get<int>("training_size"), config.get<int>("training_size"), config.get<int>("training_size"), config.get<int>("training_size"), config.get<int>("training_size_3D"), false)); // 3-D training mask
	else context.setFullTrainingregion(StructuringElement::createHalfSquareElement(config.get<int>("training_size"), false)); // 2-D training mask

	if(config.get<double>("other_matching_neighborhood") > 0.0) {
		if(config.get<double>("neighborhood_front") > 0) // 3-D neighborhood prediction?
			weightingContext.setFullNeighborhood(StructuringElement::createHalfEllipsoidElement(config.get<double>("other_matching_neighborhood"), config.get<double>("other_matching_neighborhood"), config.get<double>("other_matching_neighborhood"), config.get<double>("other_matching_neighborhood"), config.get<double>("other_matching_neighborhood"), true));
		else weightingContext.setFullNeighborhood(StructuringElement::createHalfEllipseElement(config.get<double>("other_matching_neighborhood"), config.get<double>("other_matching_neighborhood"), config.get<double>("other_matching_neighborhood"), true)); // configure 2-D neighborhood mask
		weightingContext.setFullTrainingregion(context.getTrainingregion());
	}

	createPredictor();

	// configure entropy coder
	#ifdef ARITHMETIC_CODING
		entropyCoder = new ArithmeticCoder();
	#elif defined GOLOMB_CODING
		entropyCoder = new RiceGolombCoder();
	#endif

	// show masks for debugging
	#ifdef DEBUGOUT
		Mat outMat(context.getNeighborhood().getRows(), context.getNeighborhood().getCols(), CV_8U);
		for(int j = 0; j <= context.getNeighborhood().getFront(); ++j) {
			convertTo2D(context.getNeighborhood().getMask(), outMat, j); cout << outMat << endl << endl; }
		outMat.create(context.getTrainingregion().getRows(), context.getTrainingregion().getCols(), CV_8U);
		convertTo2D(context.getTrainingregion().getMask(), outMat, 0); cout << outMat << endl << endl;
	#endif
} // end Coder::Coder

Coder::~Coder() {
	if(predictor) delete predictor;
	if(entropyCoder) delete entropyCoder;
} // end Coder::~Coder

void Coder::createPredictor() {
	if(predictor) { delete predictor; predictor = NULL; }
	if(config->get<string>("predictor") == "MEAN")
		predictor = PredictorConstructor::constructMeanpredictor(*config, context);
	else if(config->get<string>("predictor") == "MED")
		predictor = PredictorConstructor::constructMEDpredictor(*config, context);
	else if(config->get<string>("predictor") == "NLM")
		predictor = PredictorConstructor::constructNLMpredictor(*config, context);
	else if(config->get<string>("predictor") == "FASTLS")
		predictor = PredictorConstructor::constructFastLSpredictor(*config, context);
	else if(config->get<string>("predictor") == "LS")
		predictor = PredictorConstructor::constructLSpredictor(*config, context);
	else
		// configure covariance matrix estimator with weighting function and contexts for training and prediction
		if(config->get<double>("other_matching_neighborhood") > 0.0)
			predictor = PredictorConstructor::constructWLSpredictor(*config, context, &weightingContext);
		else predictor = PredictorConstructor::constructWLSpredictor(*config, context);
} // end Coder::definePredictor

void Coder::convertTo2D(const Mat& image3D, Mat& image2D, unsigned int slice) const {
	image2D.create(image3D.size[1], image3D.size[2], CV_64F);
	int sz[] = { 1, image3D.size[1], image3D.size[2] };
	Range r[] = { Range(slice, slice + 1), Range::all(), Range::all() };
	image3D(r).copyTo(Mat(3, sz, CV_64F, image2D.ptr<void>()));
} // end Coder::convertTo2D

Mat Coder::transp(const Mat& image) const { // transpose a 3-D matrix (slices individually)
	Mat tmp = image;
	if(imageDirection) {
		int sz[] = { image.size[0], image.size[2], image.size[1] };
		tmp = Mat(3, sz, CV_64F);
		for(int j = 0; j < tmp.size[0]; ++j)
			for(int k = 0; k < tmp.size[1]; ++k) {
				double* tmpPtr = &(tmp.at<double>(j, k, 0));
				for(int l = 0; l < tmp.size[2]; ++l)
					*(tmpPtr++) = image.at<double>(j, l, k);
			}
	}
	return tmp;
} // end Coder::transp

// store type and bitdepth and convert all images to 3-D double arrays for internal processing
void Coder::setImage(const Mat& image) {
	if(image.depth() != CV_8U && image.depth() != CV_16U) throw NoUnsignedImageException(); // floating point images cannot be compressed
	if(image.channels() > 1) {
		type = img_color;
		vector<Mat> vectorOfChannels;
		split(image, vectorOfChannels);
		int sz[] = { image.channels() + 1, image.rows, image.cols };
		this->image = Mat(3, sz, CV_64F, 1.0); // ones to enable affine prediction
		for(int i = 0; i < image.channels(); ++i) {
			Range r[] = { Range(i + 1, i + 2), Range::all(), Range::all() };
			vectorOfChannels.at(CHANNEL_ORDER[i]).convertTo(Mat(image.size(), CV_64F, this->image(r).ptr<double>()), CV_64F);
		}
	} else {
		if(image.dims == 3) {
			type = img_3D;
			image.convertTo(this->image, CV_64F);
		} else { // also a 2-D image must be converted to a 3-D array!
			type = img_gray;
			int sz[] = { 1, image.rows, image.cols };
			this->image.create(3, sz, CV_64F);
			image.convertTo(Mat(image.size(), CV_64F, this->image.ptr<double>()), CV_64F);
		}
	}
	double maxval;
	minMaxIdx(this->image, NULL, &maxval);
	#ifdef WIN32
		bitdepth = (unsigned int)(log(maxval) / log(2.0) + 1.0);
	#else
		bitdepth = (unsigned int)(log2(maxval) + 1.0);
	#endif
	// attention: if the following line is commented, original 16 bit images are decoded as 8 bit images if maximum value was smaller than 256!
	if(image.depth() == CV_16U && bitdepth < 9) bitdepth = 9;
	if(config->get<bool>("adaptive_transposition")) {
		Range rA[] = { Range::all(), Range::all(), Range(0, 1) };
		Range rB[] = { Range::all(), Range::all(), Range(1, this->image.size[2]) };
		Range r1[] = { Range::all(), Range::all(), Range(0, this->image.size[2] - 1) };
		Range r2[] = { Range::all(), Range::all(), Range(1, this->image.size[2]) };
		Mat diff = this->image(r2) - this->image(r1);
		double finiteDiffsX = pow(mean(diff.mul(diff))[0], 2) * mean(this->image(rA).mul(this->image(rA)))[0];
		rA[1] = Range(0, 1); rA[2] = Range::all();
		rB[1] = Range(1, this->image.size[1]); rB[2] = Range::all();
		r1[1] = Range(0, this->image.size[1] - 1); r1[2] = Range::all();
		r2[1] = Range(1, this->image.size[1]); r2[2] = Range::all();
		diff = this->image(r2) - this->image(r1);
		double finiteDiffsY = pow(mean(diff.mul(diff))[0], 2) * mean(this->image(rA).mul(this->image(rA)))[0];
		#ifdef DEBUGOUT
			cout << "Y-to-X diff ratio: " << finiteDiffsY / finiteDiffsX << endl;
		#endif
		if(finiteDiffsY > finiteDiffsX) {
			imageDirection = 1;
			this->image = transp(this->image);
		}
	}
	predictor->setImage(&(this->image), ((1 << bitdepth) - 1), config->get<bool>("neighborhood_buffer"));
} // end Coder::setImage

// restore original image type
void Coder::getImage(Mat& image) const {
	Mat tmp = this->image;
	if(config->get<bool>("adaptive_transposition"))
		tmp = transp(tmp);
	if(type == img_color) {
		vector<Mat> vectorOfChannels(tmp.size[0] - 1);
		for(int i = 0; i < tmp.size[0] - 1; ++i) {
			if(bitdepth <= 8) vectorOfChannels.at(CHANNEL_ORDER[i]).create(tmp.size[1], tmp.size[2], CV_8U);
			else vectorOfChannels.at(CHANNEL_ORDER[i]).create(tmp.size[1], tmp.size[2], CV_16U);
			Range r[] = { Range(i + 1, i + 2), Range::all(), Range::all() };
			int sz[] = { 1, tmp.size[1], tmp.size[2] };
			tmp(r).convertTo(Mat(3, sz, vectorOfChannels.at(CHANNEL_ORDER[i]).type(), vectorOfChannels.at(CHANNEL_ORDER[i]).ptr<void>()),
				vectorOfChannels.at(CHANNEL_ORDER[i]).type());
		}
		merge(vectorOfChannels, image);
	} else {
		if(type == img_3D) {
			if(bitdepth <= 8) tmp.convertTo(image, CV_8U);
			else tmp.convertTo(image, CV_16U);
		} else { // construct new 2-D header
			if(bitdepth <= 8) image.create(tmp.size[1], tmp.size[2], CV_8U);
			else image.create(tmp.size[1], tmp.size[2], CV_16U);
			int sz[] = { 1, tmp.size[1], tmp.size[2] };
			tmp.convertTo(Mat(3, sz, image.type(), image.ptr<void>()), image.type());
		}
	}
} // end Coder::getImage

unsigned int Coder::writeBitstreamToFile(const string filename) {
	ofstream fs(filename.c_str(), ios::out | ios::binary);
	unsigned int filesize = entropyCoder->writeBitstream(fs);
	fs.close();
	return filesize;
} // end Coder::writeBitstreamToFile

unsigned int Coder::readBitstreamFromFile(const string filename) {
	ifstream fs(filename.c_str(), ios::in | ios::binary);
	unsigned int filesize = entropyCoder->readBitstream(fs);
	fs.close();
	return filesize;
} // end Coder::readBitstreamFromFile

void Coder::codeHeader(bool encoding, unsigned int &maxval, unsigned int &width, unsigned int &height, unsigned int &depth) {
	// header: image type
	#ifdef ARITHMETIC_CODING
		DistributionMaker imageTypeDistribution(IMG_END + 1);
		imageTypeDistribution.addDistributionFunction(new UniformDistributionFunction());
		imageTypeDistribution.getDistributionFunction()->setParameters((Mat_<double>(1, 1) << 1.0), 2);
		entropyCoder->setDistribution(imageTypeDistribution.getImplicitDistribution());
	#elif defined GOLOMB_CODING
		entropyCoder->setParameters(IMG_END / 2, IMG_END * IMG_END);
	#endif
	entropyCoder->code(type, encoding);
	// header: transposed?
	if(config->get<bool>("adaptive_transposition")) {
		#ifdef ARITHMETIC_CODING
			DistributionMaker imageTransposedDistribution(3);
			imageTransposedDistribution.addDistributionFunction(new UniformDistributionFunction());
			imageTransposedDistribution.getDistributionFunction()->setParameters((Mat_<double>(1, 1) << 1.0), 1);
			entropyCoder->setDistribution(imageTransposedDistribution.getImplicitDistribution());
		#elif defined GOLOMB_CODING
			entropyCoder->setParameters(.5, 1);
		#endif
		entropyCoder->code(imageDirection, encoding);
	}
	// header: bitdepth
	#ifdef ARITHMETIC_CODING
		DistributionMaker imageDepthDistribution(18); // maximum bit depth: 16 bit
		imageDepthDistribution.addDistributionFunction(new LaplaceDistributionFunction());
		imageDepthDistribution.getDistributionFunction()->setParameters((Mat_<double>(3, 1) << 1.0, 8.0, 4.0 * 4.0), 16);
		entropyCoder->setDistribution(imageDepthDistribution.getImplicitDistribution());
	#elif defined GOLOMB_CODING
		entropyCoder->setParameters(8.0, 4.0 * 4.0);
	#endif
	entropyCoder->code(bitdepth, encoding);
	maxval = ((1 << bitdepth) - 1); // maximum intensity value in image
	// header: image dimensions (width, height, possibly depth)
	#ifdef ARITHMETIC_CODING
		DistributionMaker imageDimDistribution(config->get<int>("max_image_size") + 2); // maximum number of pixels in one dimension plus two
		imageDimDistribution.addDistributionFunction(new LaplaceDistributionFunction());
		imageDimDistribution.addDistributionFunction(new UniformDistributionFunction());
		// standard deviation = MAX_IMAGE_SIZE / 9 : upper bound for standard deviation by assuming MAX_IMAGE_SIZE < ~40000 pixels
		imageDimDistribution.getDistributionFunction(0)->setParameters((Mat_<double>(3, 1) << 1.0, 0.0, config->get<int>("max_image_size") * config->get<int>("max_image_size") / 81), config->get<int>("max_image_size"));
		imageDimDistribution.getDistributionFunction(1)->setParameters((Mat_<double>(1, 1) << 0.0), config->get<int>("max_image_size"));
		entropyCoder->setDistribution(imageDimDistribution.getImplicitDistribution());
	#elif defined GOLOMB_CODING
		entropyCoder->setParameters(config->get<int>("max_image_size") / 9, config->get<int>("max_image_size") * config->get<int>("max_image_size") / 81);
	#endif
	if(encoding) {
		width = image.size[image.dims - 1];
		height = image.size[image.dims - 2];
		if(type == img_color || type == img_3D) depth = image.size[0];
	}
	entropyCoder->code(width, encoding);
	#ifdef ARITHMETIC_CODING
		const double imageDimRegRatio = ((double)config->get<int>("max_image_size") + 1.0) / (double)(1 << config->get<int>("max_bits_per_pixel") - 1);
		imageDimDistribution.getDistributionFunction(0)->setParameters(
			(Mat_<double>(3, 1) << 1.0 - imageDimRegRatio, (double)width, (double)(width * width)), config->get<int>("max_image_size"));
		imageDimDistribution.getDistributionFunction(1)->setParameters((Mat_<double>(1, 1) << imageDimRegRatio), config->get<int>("max_image_size"));
		entropyCoder->setDistribution(imageDimDistribution.getImplicitDistribution());
	#elif defined GOLOMB_CODING
		entropyCoder->setParameters((double)width, (double)(width * width));
	#endif
	entropyCoder->code(height, encoding);
	if(type == img_3D) entropyCoder->code(depth, encoding);
	else if(type == img_color) {
		#ifdef ARITHMETIC_CODING
			imageDimDistribution.getDistributionFunction(0)->setParameters((Mat_<double>(3, 1) << 1.0 - imageDimRegRatio, 3.0, 2.0), config->get<int>("max_image_size"));
			imageDimDistribution.getDistributionFunction(1)->setParameters((Mat_<double>(1, 1) << imageDimRegRatio), config->get<int>("max_image_size"));
		#elif defined GOLOMB_CODING
			entropyCoder->setParameters(3.0, 2.0);
		#endif
		entropyCoder->code(depth, encoding);
	}
	if(!encoding) {
		int sz[] = { depth, height, width };
		image = Mat(3, sz, CV_64F, numeric_limits<double>::quiet_NaN());
		if(type == img_color) {
			Range r[] = { Range(0, 1), Range::all(), Range::all() };
			image(r) = Scalar(1.0);
		}
		predictor->setImage(&image, maxval, config->get<bool>("neighborhood_buffer"));
	}
} // end Coder::codeHeader

void Coder::code(char encoding) {
	double prediction, variance, dof;
	unsigned int maxval, width, height, depth = 1;
	codeHeader((bool)encoding, maxval, width, height, depth);

	// choose a parametric distribution for pixel intensities
	#ifdef OBSERVEENCODING
		namedWindow("Prediction observation window", CV_WINDOW_NORMAL);
		Mat residualImage;
	#endif
	#ifdef ARITHMETIC_CODING
		DistributionMaker distributionMaker(maxval + 2);
		DistributionFunction* mainDistributionFunction;
		double regDistVar, regDistRatio;
	if(encoding < 2) { // not only prediction
		if(config->get<string>("distribution") == "T")
			mainDistributionFunction = new TDistributionFunction();
		else if(config->get<string>("distribution") == "LAPLACE")
			mainDistributionFunction = new LaplaceDistributionFunction();
		else if(config->get<string>("distribution") == "UNIFORM")
			mainDistributionFunction = new UniformDistributionFunction();
		else
			mainDistributionFunction = new NormalDistributionFunction();
		if(sparsify_distribution > 0.0) distributionMaker.addDistributionFunction(
			new SparseDistributionFunction(mainDistributionFunction, &image, maxval, type == img_color ,
				StructuringElement::createHalfCircleElement(config->get<double>("sparsification_size"), false), sparsify_distribution));
		else distributionMaker.addDistributionFunction(mainDistributionFunction);
		if(config->get<string>("regularization_distribution") == "UNIFORM") {
			distributionMaker.addDistributionFunction(new UniformDistributionFunction());
			regDistVar = 1.0;
			regDistRatio = ((double)maxval + 1.0) / (double)(1 << config->get<int>("max_bits_per_pixel") - 1); // needs further examination why " - 1" is necessary
		} else if(config->get<string>("regularization_distribution") == "LAPLACE") {
			distributionMaker.addDistributionFunction(new LaplaceDistributionFunction());
			regDistVar = pow((double)maxval / log(config->get<double>("max_to_min_regularization_ratio")), 2.0) * 2.0;
			regDistRatio = config->get<double>("max_to_min_regularization_ratio") * sqrt(regDistVar * 2.0) / (double)(1 << config->get<int>("max_bits_per_pixel"))
				* (1.0 - exp(-((double)maxval + 1.0) / sqrt(2.0 * regDistVar))); // upper bound
		} else {
			distributionMaker.addDistributionFunction(new NormalDistributionFunction());
			regDistVar = ((double)maxval * (double)maxval) / (2.0 * log(config->get<double>("max_to_min_regularization_ratio")));
			regDistRatio = config->get<double>("max_to_min_regularization_ratio") * sqrt(regDistVar * 2.0 * M_PI) / (double)(1 << config->get<int>("max_bits_per_pixel"))
				#ifdef BOOST
					* boost::math::erf(((double)maxval + 1.0) / sqrt(8.0 * regDistVar)); // upper bound (version with dependency on boost)
				#elif defined WIN32
					; // this case is only to satisfy the compiler but it should never happen
				#else
					* erf(((double)maxval + 1.0) / sqrt(8.0 * regDistVar)); // upper bound (version with dependency on GCC)
				#endif
		}
		entropyCoder->setDistribution(distributionMaker.getImplicitDistribution());
	#else
	if(encoding < 2) { // not only prediction
	#endif
	} else { // only prediction
		predictionImage.create(3, image.size, CV_64F);
		varianceImage.create(3, image.size, CV_64F);
		dofImage.create(3, image.size, CV_64F);
	}
	#ifdef DEBUGOUT
		cout << "Processed Pixel lines (overall " << height << " lines):" << endl;
	#else
		if(verbose) cout << "progress (%): [";
	#endif

	// main processing loop for pixel-wise coding
	for(int j = (type == img_color ? 1 : 0); j < (int)depth; ++j) {
		#ifdef DEBUGOUT
			if(type == img_color) { switch(CHANNEL_ORDER[j - 1]) {
				case 0: cout << "blue:  "; break; case 1: cout << "green: "; break; case 2: cout << "red:   "; break; default: cout << "?????: "; }};
		#endif
		#ifdef OBSERVEENCODING
			Mat tmp = transp(image);
			convertTo2D(tmp, residualImage, j);
			residualImage = residualImage / maxval;
			imshow("Prediction observation window", residualImage);
			waitKey(50);
		#endif
		if(config->get<int>("inter_channel_prediction") && type == img_color && j > 1) { // include previous color channels into prediction neighborhood (affine prediction)
			if(config->get<int>("inter_channel_prediction") == 1)
				context.setFullNeighborhood(StructuringElement::createHalfEllipseElementMultichannel(
					config->get<double>("neighborhood_top"), config->get<double>("neighborhood_left"), config->get<double>("neighborhood_right"), j, true));
			else	context.setFullNeighborhood(StructuringElement::createHalfEllipseElementMultichannelForward(
					config->get<double>("neighborhood_top"), config->get<double>("neighborhood_left"), config->get<double>("neighborhood_right"), j, true));
			createPredictor();
			predictor->setImage(&image, maxval, config->get<bool>("neighborhood_buffer"));
		}
		for(int k = 0, kk = 0, percentage = (100 * (type == img_color ? j - 1 : j) - 1) / (int)(type == img_color ? depth - 1 : depth) + 1;
			percentage <= (100 * (type == img_color ? j : j + 1) - 1) / (int)(type == img_color ? depth - 1 : depth) + 1; ++percentage) {
		kk = (type == img_color ? depth - 1 : depth) * height * percentage / 100 - (type == img_color ? j - 1 : j) * height;
		if(kk > (int)height) kk = height;
		for(; k < kk; ++k) {
			#ifdef DEBUGOUT
				cout << k << " ";
			#endif
			for(int l = 0; l < (int)width; ++l) {
				prediction = predictor->computePrediction(Point3i(l, k, j));
				variance = predictor->computeVariance();
				dof = predictor->computeDegreesOfFreedom();
				if(encoding < 2) { // not only prediction
					#ifdef ARITHMETIC_CODING
						if(sparsify_distribution > 0) distributionMaker.getDistributionFunction(0)->setParameters(
							(Mat_<double>(7, 1) << (1.0 - regDistRatio), prediction, variance, dof, (double)j, (double)k, (double)l));
						else distributionMaker.getDistributionFunction(0)->setParameters((Mat_<double>(4, 1) << (1.0 - regDistRatio), prediction, variance, dof));
						distributionMaker.getDistributionFunction(1)->setParameters((Mat_<double>(3, 1) << regDistRatio, prediction, regDistVar), maxval);
					#elif defined GOLOMB_CODING
						entropyCoder->setParameters(prediction, variance);
					#endif
					entropyCoder->code(image.at<double>(j, k, l), (bool)encoding);
				} else { // prediction only
					predictionImage.at<double>(j, k, l) = prediction;
					varianceImage.at<double>(j, k, l) = variance;
					dofImage.at<double>(j, k, l) = dof;
				}
				#ifdef OBSERVEENCODING
					if(encoding) {
						#ifdef SHOW_PREDICTION
							residualImage.at<double>(imageDirection ? l : k, imageDirection ? k : l) = prediction / maxval;
						#elif defined SHOW_PREDICTION_ERROR
							residualImage.at<double>(imageDirection ? l : k, imageDirection ? k : l) = (image.at<double>(j, k, l) - prediction) / maxval + 0.5;
						#elif defined SHOW_ABS_PREDICTION_ERROR
							residualImage.at<double>(imageDirection ? l : k, imageDirection ? k : l) = abs((image.at<double>(j, k, l) - prediction) / maxval);
						#elif defined SHOW_STANDARD_DEVIATION
							residualImage.at<double>(imageDirection ? l : k, imageDirection ? k : l) = sqrt(variance) / maxval;
						#elif defined SHOW_DOF
							residualImage.at<double>(imageDirection ? l : k, imageDirection ? k : l) = dof;
						#elif defined SHOW_BITS
							residualImage.at<double>(imageDirection ? l : k, imageDirection ? k : l) = entropyCoder->costs(image.at<double>(j, k, l)) / bitdepth;
						#endif
					} else	residualImage.at<double>(imageDirection ? l : k, imageDirection ? k : l) = image.at<double>(j, k, l) / maxval; // image
				#endif
			}
			#ifdef OBSERVEENCODING
				if(!((k + 1) % OBSERVATION_UPDATE_INTERVAL)) {
					imshow("Prediction observation window", residualImage);
					waitKey(50);
				}
			#endif
		}
		#ifndef DEBUGOUT
			if(verbose && kk != height) cout << percentage << " ";
		#endif
		}
		#ifdef DEBUGOUT
			cout << height << endl;
		#endif
		#ifdef OBSERVEENCODING
			RawIO rawWriter;
			rawWriter.imwrite("debug.raw", residualImage);
			imshow("Prediction observation window", residualImage);
			waitKey(1);
		#endif
	}
	#ifndef DEBUGOUT
		if(verbose) cout << "100] ";
	#endif
	if(encoding == 1) entropyCoder->finalize();
	#ifdef OBSERVEENCODING
		if(encoding < 2) {
			int pressedKey = -1;
			cout << "Press Q or <ESC> to quit." << endl;
			while(pressedKey != config->get<int>("keycode_q") && pressedKey != config->get<int>("keycode_esc")) pressedKey = waitKey();
		}
	#endif
} // end Coder::code

} // end namespace vanilc