text:
Q: org.springframework.beans.factory.support.DefaultListableBeanFactory Destroy method on bean with name 'applicationResource' threw llegalStateException This really drove me crazy, Here is the software stack I'm using for my current project.
Jersey(Rest layer), Spring jdbc mixed with Spring jpa data, everything works well until I shut down tomcat. I see below message on the console:
2013-12-07 19:40:55,760 ERROR org.springframework.beans.factory.support.DefaultListableBeanFactory(ln513) - Destroy method on bean with name 'applicationResource' threw an exception
java.lang.IllegalStateException
    at com.sun.jersey.server.impl.ThreadLocalHttpContext.getRequest(ThreadLocalHttpContext.java:82)
    at com.sun.jersey.server.impl.application.WebApplicationImpl$2.invoke(WebApplicationImpl.java:286)
    at com.sun.proxy.$Proxy53.hashCode(Unknown Source)
    at com.my.resource.BaseResource.hashCode(BaseResource.java)
    at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
    at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1175)
    at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessBeforeDestruction(PersistenceAnnotationBeanPostProcessor.java:357)
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:220)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:740)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455)
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1064)
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:558)
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
2013-12-07 19:40:55,761 INFO org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean(ln441) - Closing JPA EntityManagerFactory for persistence unit 'myEntity'

When I used pure jdbc, I didn't see this error, I know this error started to crawl off after introducing jpa, and The error was thrown when PersistenceAnnotationBeanPostProcessor.postProcessBeforeDestruction(PersistenceAnnotationBeanPostProcessor.java:357) was called.
My dao.xml setting

<bean id="transactionManager"
      class="org.springframework.orm.jpa.JpaTransactionManager"
      p:entityManagerFactory-ref="entityManagerFactory"/>

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
      destroy-method="close" p:driverClass="${jdbc.driverClassName}"
      p:password="${jdbc.password}" p:jdbcUrl="${jdbc.url}" p:user="${jdbc.username}"
      p:initialPoolSize="10" p:minPoolSize="10" p:maxPoolSize="50"/>

<bean id="nameParameterJdbcTemplate" class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate"
      c:dataSource-ref="dataSource"/>

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource"/>
    <property name="jpaVendorAdapter">
        <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"/>
    </property>
    <property name="jpaDialect">
        <bean class="com.mycompany.hibernate.config.HibernateExtendedJpaDialect"/>
    </property>
    <property name="persistenceUnitName" value="myEntity"/>
</bean>

<jpa:repositories base-package="com.mycompany.repository"/>

All of my Jersey Resources are annotated with @Component.
Can you guys see what went wrong?
Thanks, I appreciate your time.
Paul


text:
Externsteine | Germany
Germany, Teutoburg Forest, Horn-Bad Meinberg
The Externsteine is a distinctive sandstone rock formation located in the Teutoburg Forest, near the town of Horn-Bad Meinberg in the Lippe district of the German state of North Rhine-Westphalia. The formation is a tor consisting of several tall, narrow columns of rock which rise abruptly from the surrounding wooded hills. In a popular tradition going back to an idea proposed to Hermann Hamelmann in 1564, the Externsteine are identified as a sacred site of the pagan Saxons, and the location of the Irminsul idol reportedly destroyed by Charlemagne; there is however no archaeological evidence that would confirm the site's use during the relevant period. The stones were used as the site of a hermitage in the Middle Ages, and by at least the high medieval period were the site of a Christian chapel. The Externsteine relief is a medieval depiction of the Descent from the Cross. It remains controversial whether the site was already used for Christian worship in the 8th to early 10th centuries.
Andreas Dengs

redpajama_set_name: RedPajamaCommonCrawl


text:
970 E. Airline Dr., Ste. 3 - East Alton, IL 62024
Madison County, Illinois
St. Clair County, Illinois
Fractures & Falls
Dehydration & Malnutrition
Other Failures of Care
Railroad Worker Injuries
Waterway Accidents
Don't be silent. You have rights. Let us help. Come talk to our friendly staff
and meet Bob. We can help you.
Southern Illinois Nursing Home Neglect & Abuse Attorney
The Law Office of Robert H. Gregory, P.C. has built a reputation of excellence as a nursing home abuse attorney in Southern Illinois.
Bob Gregory is pleased to be named as an Illinois Leading Lawyer for his expertise in nursing home abuse and neglect claims, the only attorney in Southern Illinois to receive this distinction. Bob has been awarded this honor each year since 2012. Additionally, Bob has been honored as a Top 100 Trial Lawyer in Illinois by The National Trial Lawyers in 2015 and 2019. Our office takes great pride in these honors and we continue to make earning the continued trust of our clients and the respect of our legal community our highest priorities.
The Law Office of Robert H. Gregory, P.C. has developed a solid reputation in the legal community for handling all types of Illinois nursing home neglect and abuse cases, including those in Madison County and St. Clair County. We also serve the central Illinois cities of Decatur and Springfield. Our office has represented families of injured and abused nursing home residents in Missouri and Illinois for over 20 years.
Nursing home abuse and neglect is a very specialized area of law. How can you ensure that you retain a law firm that has experience, dedication and commitment? Contact the law firm that other attorneys refer their nursing home neglect and abuse clients to – The Law Office of Robert H. Gregory, P.C. Discover how we earned our reputation for excellence.
Questions about your nursing home case? Please fill out this form and we will follow up with you.
How did you find us? (select one): GoogleBingYahooFacebookReferralOther
Areas of Representation
Dehydration/malnutrition
Physical, mental and sexual abuses
All other failures of care
Nursing Home Neglect & Abuse Statistics
How Prevalent Is Elder and Vulnerable/Dependent Adult Abuse?
of U.S. nursing homes were cited for violations of federal standards that had potential to cause harm or that had caused actual harm to a resident
of 2,000 nursing home residents interviewed said they had been neglected or seen another resident neglected
of nursing home staff admitted to mistreating (e.g. physical violence, mental abuse, neglect) older patients
of surveyed certified nursing assistants (CNA) admitted to pushing, grabbing, or shoving a nursing home resident.
Injury Lawyer, Robert H. Gregory, P.C., focuses on nursing home abuse and neglect cases in both Illinois and Missouri
Our mission at Robert H Gregory, P.C., is to protect seniors and their family members through our focus on nursing home neglect and abuse claims. The most vulnerable among us deserve the most aggressive advocates. When you face the need to defend the rights of someone confined to a nursing home, you need the confidence that comes with relying on a nursing home abuse lawyer with an established track record dealing with the specific types of elder abuse, sexual abuse, and medical malpractice issues that sometimes arise in a nursing home setting.
The Law Office of Robert H. Gregory, P.C. does not accept all cases - however, of the cases we do accept, our firm is committed to providing the following to our clients:
A free consultation to discuss the details of your nursing home abuse or neglect case.
A thorough and prompt review of your potential claim, as well as an honest assessment.
Individual, personalized attention to your case.
The dedication of our entire office staff.
Nursing Homes are Helping Spread Fatal Fungus Infections
Preventing Elder Abuse and Nursing Home Abuse Before It's Too Late
The Worst of the Worst Nursing Homes in America
The Law Office of Robert H. Gregory, P.C. has built a reputation for excellence in handling nursing home neglect and abuse claims in Illinois and Missouri.
Simply put - it's what we're known for, it's what we do, and . . . we do it well.
Discover how we earned our reputation for excellence.
The Law Office of Robert H. Gregory, P.C.
970 East Airline Drive #3
East Alton, Illinois 62024
The information you obtain at this site is not, nor is it intended to be, legal advice. You should consult with an attorney for advice regarding your individual situation. We invite you to contact us and welcome your calls, letters and electronic mail. Contacting us does not create an attorney-client relationship. Please do not send any confidential information to us until such time as an attorney-client relationship has been established.
We proudly serve Edwardsville, Alton, Madison County, Jersey County, Macoupin County, Macon County and St. Clair County.
© The Law Office of Robert Gregory P.C. All Rights Reserved | Website Designed By: Mid America Web Solutions


It's easy to change your Wyoming registered agent. There is no state filing fee. If you choose us, we even file the paperwork for you. There are literally hundreds of registered agent services in Wyoming. It's an entire industry that's highly regulated.
If you don't choose us, you'll file a Statement of Change by business entity, Wyoming Change of registered agent form. Your new agent should be able to submit this form electronically on your behalf (that's what we do here, so you don't have to do any filing yourself).
That's it! After about a week, you'll have a new Wyoming registered agent service.
Make sure your new Wyoming registered agent is okay with you updating your company to their principal address, mailing address, and registered office address. Many WY registered agents will charge you extra if you update your mailing or principal address to their address after they find out. Many also will just not let you list their address as your mailing and principal and fire you after going through the hassle of switching to them. We are OK with you using our address for everything and we do not charge you extra.
Order our services below, and we do the filing for you correctly.
Sit back, relax, and wait a couple days to hear back from us. We will upload the filed change of agent to your online account and notify you once it's completed. You can also do a name search here and check the WY database to see the change of Wyoming registered agent in real time.
Take a printout of a screenshot of your business as listed on the Wyoming Secretary of State, showing us as your registered agent and registered office and mail it to your old Wyoming registered agent service, requesting to cancel services with them.


text:
Q: Two proofs involving Harmonic Mean If H is the harmonic mean between $a$ and $b$,then show that
$$\frac{1}{H-a}+\frac{1}{H-b} = \frac{1}{a} + \frac{1}{b}$$ and $$\frac{H+a}{H-a}+\frac{H+b}{H-b} = 2$$
I substituted  $\displaystyle H = \frac{2ab}{a+b}$, then tried some algebraic manipulation, but I am not getting there.
Are they even valid? If yes, could somebody give me some ideas how to approach these?

A: I don't know why you aren't getting this. You have
\begin{align*}
\frac{1}{H-a} + \frac{1}{H-b} &= \frac{1}{\frac{2ab}{a+b} -a} + \frac{1}{\frac{2ab}{a+b}-b} \\ &= \frac{a+b}{ab-a^{2}} + \frac{a+b}{ab-b^{2}} \\ &= (a+b) \cdot \biggl[ \frac{1}{a(b-a)} + \frac{1}{b(a-b)}\biggr] \\
\end{align*}
I think this should help you out. Try taking the factor $(a-b)$ common. For the next problem also again substitute the value of $H$ and try doing manipulations. Be patient, and be careful, with your calculations, you shall arrive at the result.

redpajama_set_name: RedPajamaStackExchange


There's something new around here. Can you tell? I'll give you a hint. I got a new camera! Well, Adam and I got a new camera together =) I have been longing for two things, 1. A new camera and 2. A new website layout. I've been pining for both for quite a while and now I can cross one off the list. If you're a blogger, you know that a key ingredient in a food website is clear, crisp pictures. My old camera was fine for a while, but I could not help but want a sharper image to take better quality pictures. Adam and I had set out last weekend to browse cameras. We had gone to Best Buy and Future shop, and were not too happy with their service. First of all, both of them had only a handful of cameras that actually had battery packs on them, so you could turn them on. And all of the ones that did have batteries in them, had no memory card. Therefore, you could not see the picture quality of a picture once you took it. Both of these were the deciding factor that we needed to look elsewhere.
We went to London Drugs, as my mom works there (in the pharmacy) to look at their selection. They were much more helpful and knew a lot about all the cameras. We told them what we wanted it for, and they pointed us in the right direction. While I would love a Digital SLR my skills, and my wallet, aren't quite at that level yet. But this camera is perfect for what I want. It's a Panasonic Lumix ZS7. It's a great point-and-shoot camera, with a really big lens and great quality. It's only a step or two down from a Digital SLR. So far I really love it. We are also going to Mexico next weekend and I cannot wait to take some lovely pictures!
And then I started thinking about Valentine's day baked goods. Since we'll be on a warm sunny beach in Cabo, I wanted to blog about something before we left. Tonight happens to be our friends birthday and we're going over for some drinks and games. I thought it would be a great night to avoid the huge list of homework bake some cupcakes to share with them as well. Adam and I have a joke about calling each other Honey, so I thought why not make honey cupcakes for Valentine's day? I searched the net and found this chocolate cupcake recipe by Love & Olive Oil and slightly adapted it and created my own honey frosting. These are decadent, rich and so moist. The honey adds a subtle but sweet taste to them. It makes a small batch of 12 cupcakes, which is perfect when you want to share them with a few friends.
Share some love with your Honey! and make these Cupcakes. Or, you can make this no-bake Valentine's classic of chocolate dipped strawberries I made last year, or these other Devil's Food Cupcakes I made a couple years ago with fondant hearts.
In a stand mixer, whisk together milk, oil, sugar, honey, and vanilla extract until combined. In large bowl whisk together flour, cocoa powder, baking soda and baking powder. Slowly add dry ingredients to wet and continue mixing until just combined.
Pour into liners, about 1/4 cup in each liner until 2/3 full. Bake 18 minutes or until a knife inserted into center comes out clean. Allow them to cool completely to room temperature.
To make buttercream, in a stand mixer with whisk attached whip butter and shortening until smooth. Slowly add the icing sugar one cup at a time. Adding vanilla, milk and honey as you go to thin it out. Add as much icing sugar until the desired consistency. It should be soft and not too stiff. To pipe onto the cupcakes, use a round tip and fill icing bag. Alternatively, you can use an offset spatula to ice the tops of the cupcakes.
*optional* you can add shaved chocolate to the top like I did. Using a good quality chocolate, break off a chunk about the size of your palm, or smaller. Microwave it about 10-15 seconds to soften the outsides. Using a regular carrot peeler, peel the top layer of chocolate to create curls. Place onto paper towel or dish until ready to use. Sprinkle the tops of the cupcakes with the shavings.
Cupcakes can be stored in container for 1-2 days.
Hope you all have a lovely Valentine's!
Awesome looking cupcakes! I love baking with honey; my friend gives me some honey from her hives from time to time. Those cupcakes look like they have whip cream on them the frosting looks so smooth. Happy Valentine's to you both. Have a wonderful time in Mexico, how romantic for the holidays.
Such cute cupcakes! Congratulations on the new camera and have fun in Cabo. I'm so jealous!
Auntie: Thanks! I bought a big thing of Honey, and now I use it in my oatmeal in the morning too. The frosting is very very smooth! And sweet. The cupcakes were delicious. I'm looking forward to our trip!!


text:
Q: Webtracker using nodejs I'm trying to create a webtracker to track what pages my users are seeing and how much time they are spending at each page, at the end they will make a registration and i will associate their navigation with the created user.
I want to use node because i can see when the user connect to the url and disconnect to calculate the time, i have tried that with pure javascript but i can see when the user leaves the page only on Chrome.
I have already managed to create some of what i need using the socket.io lib but i can't find a way to use it without creating an html page. What i need is to create something like google analytics where i will only incorporate the script. Is it possible?

A: I have managed to figure it out so i will post it to help others with the same problem:
Server
let socket = require('socket.io');
let http = require('http');
let serveStatic = require('serve-static');
let finalhandler = require('finalhandler');

var port = process.env.PORT || 1337;
let serve = serveStatic(__dirname, { 'index': ['client.js'] });

let server = http.createServer(function (req, res) {
    serve(req, res, finalhandler(req, res));
});

let io = socket(server);

server.listen(port);

io.on('connection', client => {
    console.log('new user connected!', client.id);

    client.on('hello', data => {
        console.log('data: ', data);
    });

    client.on('disconnect', () => {
        console.log('user disconnected', client.id);
    });
});

Client
(function (plugin) {
    plugin.socket = null;

    function loadDependencies() {
        head.js(
            { socket: 'https://cdn.socket.io/socket.io-1.4.5.js' }
        );

        head.ready('socket', function() {
            plugin.socket = io('http://localhost:1337');

            setSocketHandlers();
        });
    }

    function setSocketHandlers() {
        plugin.socket.on('my-event', function(data){
            console.log('called my event');
        });
    }

    plugin.init = () => {
        loadDependencies();
    }
}(this.WebTracker = this.WebTracker || {}));

WebTracker.init();


text:
The Roy Williams Trade: Cowboys > Lions?
Richie Whitt
Richie Whitt | November 18, 2010 | 1:00pm
On Tuesday, October 14, 2008, the Dallas Cowboys traded for receiver Roy Williams. In exchange, they sent to the Detroit Lions a first- third- and sixth-round draft pick in 2009.
Matching him with Terrell Owens, the move was supposed to give the Cowboys yet another elite weapon en route to being a Super Bowl contender. In Detroit, it was a move toward rebuilding and the future.
As they prepare to meet Sunday at Cowboys Stadium, both teams suck at 2-7. Dallas just fired its head coach and the Lions haven't won a road game in their last 25 tries.
But, afforded two years of perspective, which team won the Williams trade?
Williams, whom the Cowboys immediately rewarded with a five-year contract extension worth $45 million, has now played the equivalent of about two full seasons in Dallas. In that time, he's produced 82 catches for 1,150 yards and 13 touchdowns. In other words, it's taken him two seasons to put together one good season.
Disappointing to say the least. Williams began his stay in Dallas with lazy routes and dropped passes. He's been better this season, but is slowly - starkly - being outplayed and put to pasture by rookie Dez Bryant.
The side-effect problem is what Williams' arrival did to Dallas' 2009 draft. In a word: Disaster. Of 12 picks from that class, only kicker David Buehler is a major contributor on game days.
Looks bad, until you consider what Detroit did with its loot lifted from Dallas. With the draft picks the Lions selected tight end Brandon Pettigrew (1st), receiver Derrick Williams (3rd) and running back Aaron Brown (6th).
Pettigrew is a good player, among the top 10 NFL tight ends in catches, yards and touchdowns. But Williams is a complete bust with only eight career catches and former TCU running back Brown has only 144 NFL rushing yards and is buried on the Lions' depth chart.
I dunno, you can call Roy Williams a bust in Dallas. But in Detroit they probably wish they would've done more with this deal as well.
Call it a lose/lose?


text:
Q: Can someone explain me what those haproxy directives mean? I cannot find an easy answer for what "inter xs fall x rise x" directives mean.

A: These are explained in the HAProxy ALOHA documentation:

inter parameter sets the interval between two consecutive health checks. If not specified, the default value is 2s.
rise <count>: number of consecutive valid health checks before considering the server as UP. Default value is 2
fall: number of consecutive invalid health checks before considering the server as DOWN. Default value is 3


Where is Koaloa Ranch in America?
Koaloa Ranch is situated in the region Hawaii in America!
Here you will find the location of Koaloa Ranch on a map.
All places in the world called Koaloa Ranch.
Where is Koaloa Ranch on the map?
Kawela Bay: Turtle Bay Resort.
Where is Koaloa Ranch relative to other places?
Top 10 cities in Hawaii and distance from Koaloa Ranch.
Top 10 cities in America and distance from Koaloa Ranch.


Cooling herb - traditionally used to balance the "yin"
Rehmannia Root Tincture from Indigo Herbs is derived from exceptionally high quality Rehmannia plants. Rehmannia has been long esteemed in TCM for thousands of years. It is a naturally cooling herb that is said to balance the "yin". Rehmannia Tincture can be mixed with a little water and taken daily.
Rehmannia Tincture can be added to a little liquid and taken daily. At Indigo Herbs we are passionate about premium quality botanicals. Explore the tabs on this page to find out more about the quality, manufacture and suggested use of this herb. We are unable to advise you here on the benefits of our herbal products, however we do recommend you take the opportunity to research the many benefits of this herb. At Indigo Herbs we are committed to empowering optimum health and nutrition and assisting you to take responsibility for your own health and wellbeing, by having access to many of nature's healing botanicals. Please consult a Herbal Practitioner as to how this product can benefit you.
Rehmannia Tincture can be added to water or fruit juice and taken when required.
The roots used to make Indigo Herbs Rehmannia Root Tincture undergo stringent checks to ensure they develop to their fullest potential, whilst adhering to exceptionally high quality standards. After careful selection and cleaning the plant matter undergoes a process of cold percolation in order to extract the active constituents into tincture form. The cold percolation method employs a gradient circulation of the solution which keeps the plant ingredients in perpetual contact with the ethanol. This technique is faster and more efficient than maceration and ensures there is less waste of precious plant materials. This premium quality product is manufactured to GMP standards and Quality Assured by Indigo Herbs. It is 100% pure botanical ingredients, completely free of synthetic ingredients with absolutely nothing added.