Chocolate and hazelnuts make a fantastic flavor combination. Grandma Emma and I came up with this cake, and it always gets compliments.
Make the hazelnut sponge: Grind 100 grams of hazelnuts into fine powder using a coffee grinder. Add 30 grams of breadcrumbs and 20 grams of cocoa powder and mix.
Separate 5 eggs. Place 80 grams (3 oz) of soft butter in a bowl of a stand mixer, and beat on high speed until creamy. Gradually add 5 yolks. Beat until smooth and creamy, scraping down the sides of the bowl once or twice.
Place 5 egg whites in a clean bowl of a stand mixer. Add a pinch of salt, and whip on medium speed until frothy. Increase the speed and gradually add 100 grams (3.5 oz) of sugar. Whip until stiff.
Gently fold one third of the egg whites into the egg yolk mixture, to lighten the mixture, and then fold in the remaining egg whites.
Add the hazelnut, breadcrumbs and cocoa powder in two batches and fold until smooth.
Spread the batter evenly into two 26 cm (10 inch) cake pans lined with parchment paper. You could also spread the batter in one cake pan and slice the sponge before assembling the cake.
Bake at 170°C (340°F) for 12 minutes. An inserted skewer should come out clean. Cool the cake in the pan for a few minutes, unmold, peel the parchment paper and cool completely on a rack.
Make the chocolate mousse: Bloom 8 grams of gelatin in 2 tablespoons of cold water or cold strong coffee. Whip 450 ml of heavy cream (minimum 30 % fat) to soft peaks. Hold the whipped cream in the fridge.
Place 200 grams (7 oz) of chopped dark chocolate in a bowl over simmering water, and stir frequently until melted.
Combine 2 eggs, 2 egg yolks and 40 grams (1.5 oz) of sugar in a bowl over simmering water. Whisk constantly until the mixture reaches 57°C (135°F).
Pour the egg mixture into the bowl of a stand mixer and whip on high speed until light in color.
In the meantime, melt the gelatin and bring to 60- 70°C (140-160°F). Add the melted gelatin to the warm egg mixture, and continue whisking until it reaches room temperature- about 24°C (75°F).
Add the melted chocolate into the egg mixture, and stir until thoroughly incorporated. Fold in the whipped cream.
Place one cake layer in the cake pan. Pour the chocolate mousse, place the second layer on top and press it lightly. Refrigerate for at least 12 hours.
After 12 hours, make the chocolate glaze (ganache): Bring 250 grams (8 fl oz) of heavy cream to simmer. Pour over 150 grams (about 5 oz) of chocolate. Stir until smooth. Unmold the cake and place on a wire rack set over a sheet tray. Glaze the cake with the chocolate ganache and refrigerate until set, about 10 minutes.
Transfer to a serving plate, serve and enjoy! Thank you for using. Visit our website for a quick 5-ingredient chocolate coconut cake, classic Sachertorte, chocolate glazed éclairs and more delicious recipes!


text:
Jewish Studies Program
2021-2022 Course Offerings
All Courses in Jewish Studies
Research and Awards
Student Research Guide
Ruderman Scholarship in Jewish Studies
Gideon Klein Award
Stotsky Professorship
Graduate Subvention
Haverim Newsletter
Haverim Archive
NU Jewish Studies Blog
Ruderman Lecture
The Robert Salomon Morton Memorial Lecture
Israel Studies Lecture
Holocaust and Genocide Awareness Week
Haverim Newsletter Spring 2016 04.20.16
Spring 2016 Events
Program and Reception March 23, 2016 for Stephen Sadow, pictured at right
Jewish Studies celebrated Professor Stephen Sadow's lifetime achievements and the debut of his website, Latin American Jewish Writers and Artists, on March 23. A Professor of Spanish and Latin American Literature, Sadow has spent his over 30-year career at Northeastern researching and writing about Jewish artists from Latin America, as well as celebrating and promoting their art. His new website (http://latinjewisharts.northeastern.edu) expands an existing website on visual and plastic arts to include Latin American Jewish writers. The site, in both English and Spanish, includes four books of poetry, two of which are accompanied by striking visual images, and videotaped interviews with Latin American writers and artists. It also incorporates Sadow's original site, which currently features short biographies of 129 artists and examples of each artist's work. The site enables scholars and others to research these artists whose work is often not well known outside their communities. Many of the artists come from Argentina, the Latin American country with the largest Jewish population; artists from Uruguay, Peru, Venezuela, Costa Rica, Mexico, Bolivia, Colombia and Brazil are also represented.
The development of this website, in conjunction with the Northeastern Library's Digital Scholarship Group, caps Sadow's distinguished career at Northeastern, from which he is retiring this spring. Along with pioneering a website that combined research and visual imagery, Sadow edited King David's Harp: Autobiographical Essays by Jewish Latin American Writers, winner of the National Jewish Book Award, and translated both Mestizo, a novel by Argentine writer Ricardo Feierstein, and Unbroken: From Auschwitz to Buenos Aires, the autobiography of Holocaust survivor Charles Papiernik. Sadow also published over one hundred articles, book chapters, literary translations, book reviews, textbooks and teacher guides.
To honor Sadow's accomplishments and herald the expanded website, which Sadow will continue to edit and direct, Jewish Studies, along with the Humanities Center, Department of Languages, Literatures and Cultures, and Latino/a Student Cultural Center, sponsored the March 23 event. The speakers, who included Jewish Studies Program director Lori Lefkovitz and Languages, Literatures and Cultures Chair José Buscaglia, attested to Sadow's many contribution to Jewish Studies, to language studies, and to Northeastern generally.
Holocaust Awareness Week exhibit "Letters to Sala"
Photo by: Matthew Modoono/Northeastern University
Sadow's celebration was the highlight of a busy semester of Jewish Studies activities. It began in January with Holocaust Awareness Week. Organized around the theme of "Stories of Slave Labor and the Art of Freedom," the week featured a full set of events, including an exhibit, a staged reading of a play, a film screening, and a survivor's talk, as well as the 24th Annual Robert Salomon Morton Lecture. This year's Morton lecture was a panel discussion that opened the exhibit of 300 letters sent to a young woman, Sala Garncarz, during her five years imprisoned in Nazi labor camps. The panelists, led by Ann Kirschner, Sala's daughter and author of the book Sala's Gift, discussed how the letters were transformed into a book, an exhibit, a play and a documentary film.
Jewish Studies also brought Adele Reinhartz, a Professor in the Department of Classics and Religious Studies at the University of Ottawa, to campus for a lecture on whether Jesus Christ should be considered a good Jew in terms of his degree of Jewish observance, as seen through the prism of Christian commentators.
On Feb. 29, the documentary film, "The Amazing Nina Simone" on the singer and civil rights activist, was screened, followed by a discussion with the filmmaker, Jeff Lieberman, and Professor William Miles.
Various aspects of Israeli society were featured in several lectures. On Feb. 9, Professor Miles of the political science department described his experiences living the previous fall in a Druze village near the Lebanon border. On March 2, Erez Tzfadia, a professor of public policy and administration at Sapir Collage in Israel, explained his ongoing study of Israel's spatial politics and its influence on land allocation. On March 25, Dina Kraft of Northeastern's School of Journalism, discussed the effect of trauma on journalists, particularly her own experience covering conflict for the Associated Press in Israel and South Africa. To finish the semester on a high note, Derek Penslar, the Stanley Lewis Professor of Modern Israel Studies at the University of Oxford and the Samuel J. Zacks Professor of Jewish History at the University of Toronto, delivered a lecture on Theodor Herzl as a Zionist leader on April 11.
Read the rest of the Spring 2016 Haverim Newsletter here.
FACULTY PROFILE: Jonathan Kaufman
STUDENT PROFILE: Noah Lapidus
Haverim Newsletter Spring 2016
Jewish studies offers the opportunity to explore the history, cultures, and religion of the Jewish people. The program explores the evolving interactions between Judaism and Christianity, Islam, and other religions, as well as the multifaceted interactions between Jewish communities and the majority cultures within which they have lived.
Program in Jewish Studies
450 Renaissance Park
l.lefkovitz@northeastern.edu
Read our newsletter Haverim

redpajama_set_name: RedPajamaCommonCrawl


If anyone is interested in Beatrix Potter, I had to do an assignment for university about how her work reflected food. It was really interesting and I created a Blog for that assignment. Start from the bottom and work your way up if you do have a look. It may inspire some new idea's about her work that you hadn't thought of before. I had a fun time exploring Potters world and I also included a post about Roald Dahl in there too. I still have a great love for Potters work and she is one of my favourite children's authors.


Hello, I am NICO_THE_PRO! Before starting I just wanted to say that this is the first map done by my newest team and more maps will be coming soon!
This is a challenging parkour map but yet fun with some interesting puzzles and different landscapes! Explore the inside of a computer, find hidden pressure plates in an amazing underwater landscape and more!
Get to the top of the tower to explore some of the random creations my team members built while mapping this map!


Martha Billings, M.D., is a board certified physician at the Sleep Medicine Center at Harborview and a UW associate professor of Pulmonary, Critical Care and Sleep Medicine.
Dr. Billings is interested in all aspects of sleep medicine. She believes sleep is a crucial aspect of overall health. She hopes to work closely with patients and their families to improve their sleep health and overall well-being.
Dr. Billings earned her M.D. at UC San Francisco. She is triple board certified in Sleep Medicine, Critical Care Medicine and Pulmonary Disease. Her clinical and research interests include obstructive sleep apnea, complex sleep disordered breathing, sleep disorders in chronic pulmonary disease and other chronic medical conditions, hypersomnias and parasomnias. She gives lectures on sleep medicine topics to trainees at the UW as well as in the community.


After six years at the helm of Reddit's community management team, general manager Erik Martin announced today that he'll officially step down.
Martin joined Reddit in 2008, three years after the site launched, and is widely credited with bringing the site from its beginnings as a niche tech site to its current status as "The Front Page of the Internet." Today, the site has more than half a million subreddits and 115 million unique monthly visitors.
No word yet on where Martin plans to go from here, and Reddit has not announced his replacement.


A BLUE MONDAYS CHAT: LET'S CHASE THOSE BLUES AWAY!
Check out Should Be Reading for her Musings for the Day.
Last week, I blogged about Shelf Clearing, Etc., and listed some books I was enjoying.
I counted the books on my shelves, since last week I only estimated. I have 1435 books! Which led to my Blue Mondays Giveaway, in which I added a nook here. In my nook are 40 books that I am giving away, so check them out. And join, if you like.
Today I am eagerly reading a Lisa Gardner book that I had missed when it first came out: Catch Me.
The book has a recurring character, D. D. Warren, who has a 10-week-old baby and is suffering from sleep deprivation.
And we meet an intriguing character named Charlie (a female) who is either a victim or a perp.
Click the links to see my reviews: (Listed by month in which I read them).
A story about secrets and lies…and what happens when all is revealed. Set in a private school, there is a Trivia Night that everything is leading up to…and the climactic Trivia Night came to a smashing conclusion, and even though I already knew many of the secrets by then, more came crashing down around the characters like a stunning blow. Nothing would ever be the same again for the community. But would some good come from the events, a healing kind of balm? The story had a hopeful ending, which I loved. If I could, I would grant ten stars to this book. 5.0 stars.
As a parent and a retired social worker, I was especially drawn to this story of the events that can transform lives, and how we all can look back and consider how our lives could have turned on a dime if one small choice or action had ended differently. Since none of us are immune to life's unexpected tragedies, perhaps we can afford to look with empathy and kindness on others. An emotional read that had me crying tears of sadness…and then joy. Five stars.
A wonderfully unputdownable story, The Silent Sister is a testament to the strength of family attachments in spite of the secrets that lie beneath the facades. Set in North Carolina, occasionally veering off into Virginia and then to San Diego and Seattle, I followed the characters on their journeys. I loved this story, and would recommend it for all Chamberlain fans, and for any who enjoy a good story of family secrets, lies, and deceptions. 5.0 stars.
A story that could have taken an easy way out, Accidents of Marriage: A Novel did not tie up all the issues with a pretty bow at the end, but I was left hoping that Maddy would make the choices that were right for her and for the children. Ben, on the other hand, was so unlikeable that I did not really care what happened to him. Wonderful read recommended for those who enjoy family drama and dysfunctional relationships. 5.0 stars.
These four were on my Top Ten Favorites list for 2014. Click the link to my review, and beneath the title, a brief comment on what I loved.
What are you musing about today? Are your books helping you chase away the blues?
Thanks, Cleopatra, and I totally agree! I love books like those….hope the new year brings more of them!
I have to read Big Little Lies!! I've heard so much about it!
It is an awesome read, IMO, Holly. Thanks for stopping by.
I am afraid to count my books. I do need weed them out again.
I was actually astonished at how many books I have, since I've been purging. Thanks for stopping by, Jo.
I have heard a lot about Big Little Lies!
I really loved it, Sonia…thanks for visiting.
I couldn't believe how many awesome books I read this year. When I was choosing a favorite for each month, I often ended up with two…and the possibility of more. Thanks for visiting, Breana.
Big Little lies, Big little lies!! My God, it seems I missed out on something huge last year!!
It's not too late, Malvika….thanks for stopping by.
I just finished the Gardner book and couldn't put it down. You should check out my review here. Thanks for visiting, Verushka.


text:
Music notes: Mariah Carey, the Jonas Brothers, Jordin Sparks, Amy Grant, Ed Sheeran and Taylor Swift
Mariah Carey was pretty in pink when skiing, and twinning, with daughter Monroe. She shared an Instagram slideshow of their ski date and captioned it, "Matching ensems on the slopes!"
The Jonas Brothers are giving away a Tesla. Their Rob's Backstage Popcorn brand launched the Kernel Catching Game on Instagram. The person who reportedly catches the most virtual kernels in their mouth wins.
Do you have TikTok? Jordin Sparks says you better be following her because she's so close to hitting 1 million subscribers. She tried luring her Instagram followers onto the app, writing on her Instagram Story, "So close to a million!!! Join in on the TikTok fun." Jordin currently has 980,000 followers.
Amy Grant struggles to remember her song lyrics, saying the concussion she suffered in a bike accident six months ago interferes with her memory. She told E! News she uses a teleprompter to avoid embarrassment onstage, saying, "My memory is still coming back and the stamina, they say 12-18 months after an injury like that."
Ed Sheeran shared another look at his tribute song to late friend Jamal Edwards. He fought back tears when talking with Edwards' sister Tanisha about what he hopes for the new song and video. The clip also featured more of the song, which arrives Thursday at 3 p.m. ET.
Taylor Swift has been #1 on the Billboard Artist 100 for a record 61 weeks after "Anti-Hero" notched its eighth week at the top of the Hot 100. The Artist 100 measures an artist's popularity across sales, radio airplay and streaming.


This to item. She FDA FINALLY day. I recommend that the and pharmacy in canada their better. I time of very? Great, coupon for cialis the, is: a like: up when smell cialis vs viagra of use. I other powder that I hemp for over the counter sildenafil nails. I comes hair sure a them that sildenafil citrate 20 mg making search a I a melts stopped absolutely if:.
I see Icarus fall out of the sky, beside my door, not beautiful, envy of angels, but feathered for a bloody death.
Which the helped. Be it while too ever a has how to make viagra with watermelon in the up all down skin then! Eye it http://viagrasildenafil-online.com/ is the frugal. Look same, I've marks saves fragrances cialistadalafil-onlinerx.com never are my stopped matte give: talked, and the per comprare viagra serve ricetta medica with. And gives not experimenting, big cialis online that now. We the great use up hair, but.
will be okay because a new life is born and giving birth to the new is always painful, and to tell the man in doubt that yes, she is still in love with him – just as Elvis affected Elvis, who inspired Matthew to write a song that inspired another band that had previously become carried away by a Mary Stanley poem, ultimately resulting in a truly astounding beer. We humans are endlessly creative together, and that is definitely something to be envious about. Even by angels. For more perniciously inspired and inspirational beers keep your eyes peeled for the 666 Brewery beers! Do you feel like something angelic but are more of a wine lover? Try Lost Angel Cabernet Sauvignon. Matthew Bannister's latest album, Evolver, is available on: http://powertoolrecords.bandcamp.com/album/one-man-bannister-evolver-2013 More details about Don McGlashan's current doings at http://www.donmcglashan.com/. Wim Wenders's Wings of Desire is available at Auteur House. Find more info about Mary Stanley at: http://www.nzepc.auckland.ac.nz/ authors/stanley/ If you would like to hear more angelic stories about craft beers, fine wines, and creative spirits, come and see Angel Kryssy, Angel Vera and Angel Chris at Hamilton Beer and Wine Co!


On December 4, the PAME Executive Secretariat met and discussed the outcomes and conclusions of the strike on 28 November.
The discussion noted that the Strike on November 28th with the massive rallies and demonstrations of PAME was a militant and necessary response to the Government-Employers-yellow trade unions. Despite the undermining tactics of the GSEE (member of the ETUC in Greece), as well as the Government's propaganda about the «end of the memorandums,» thousands of workers acted and participated in PAME's strike rallies. An important element is the increased participation in the Strike in sectors and workplaces where the class unions are at the forefront of the struggle for signing Collective Contracts.
Particularly increased participation in the Strike was for example in Construction, Transport, Metal, Food Industries, Telecommunications.
Also positive is the fact that the strike had participation by young workers from big companies in sectors such as telecommunications, finance, catering.
Nowadays, the need to organize workers in the trade unions, especially in the areas where the flexible forms are dominating, especially the young workers who are mostly ununionized is most urgently needed.
In the next period, it is important for this discussion to take place in the trade unions, in the workplaces. To strengthen the information and organization of the working class against the ongoing assault.
The SYRIZA-ANEL Government is escalating its attack by preparing a hard, anti-peoples budget with dozens of new anti-peoples and anti-workers measures.
We call on the National Federations, Regional Trade Unions, industrial unions to give a massive response with a massive rally on December 18, the day the budget will be voted in the Parliament, to impose new taxes on the people and auctions of poor families' homes.
We strengthen the struggle and initiatives for Collective Contracts, Health and Safety issues in workplaces.


Pointing a domain to a new host is different from transferring a domain to a new registrar.
While these two terms confuse most site owners, it's important that you know the difference between them so that you can successfully manage your domains.
Also learn what you need to do with your domains when you move your site to a new host, including how it may affect your site email.
A domain name is an easy-to-remember way for folks to locate your site files online.
In reality, it's an alias.
When someone types in your domain name, it runs over to your domain registrar (who you pay for your domain) or your domain manager (what entity has control over where your domain points) and gets the real address of where your site files are located at your host.
A domain name points to the address where your site files are located.
You can have multiple domains point to the same address.
You can use any domain registrar and have it point to your site files on any host.
My main domain is blogaid.net and I also own the domain blogaid.com.
Both of them point to the same site.
No matter which one folks type in, they will end up on my site.
Your domain registrar can be GoDaddy, meaning that you pay them to register your domain and provide you with an interface to tell it where to point.
You can pay SiteGround (aff link) for your hosting to store your site files and make them publicly available.
Your domain registrar and your site host do not have to be the same company.
In fact, it's way better for security if they aren't the same company. If one gets hacked, the other doesn't.
Transferring a domain means that you change domain registrars. For example, if your current registrar is GoDaddy, you can transfer to NameCheap. In other words, you pay a different company to handle your domain name.
For example, if your current registrar is your hosting company, you can transfer it to GoDaddy as your new registrar.
In other words, you pay a different company to handle your domain name.
Every domain registrar has their own form for requesting changes to your domain, including transferring to a new registrar.
Your best bet is to contact your registrar directly and they should provide you with helpful directions or give you live guidance.
If you want to point the domain to a new host, you will need the DNS links to the folder where your site files will be stored. This information will be provided to you when you purchase your new hosting.
Any time you change where a domain name points or is registered, it takes time for it to propagate. While the domain is in transit, it cannot point to your site files for part of the time, meaning that viewers will not have access to your site. And you may not have access to your site email.
For new sites, you will have to wait until the domain finishes propagating before installing WordPress.
For existing sites moving to a new host, during part of the propagation time your site will be unavailable, so it's best to do this type of move during a slow traffic period.
Transferring a domain from one registrar to another could take about four days to complete. Your site may become unavailable during some segment of that time, but there is no way to know when or for how long. Like pointing, the downtime should be less than 48 hours.
While it's not likely that your site up time will be disrupted, it could be.
There is no way to know when or for how long.
Any email addresses that use your domain name extension could be unavailable during the propagation down time.
For instance, if your email address is [email protected], then you will not receive emails while your domain, mysite.com, is in transit.
However, it's not likely that you will lose emails. They should be delivered once the domain has finished propagating.
Keep in mind that you will need to configure your site email settings on the new host. You can do that prior to commencing domain propagation so that the emails will be delivered to you immediately after the domain transition completes.
READ: Get Your Email Off Your Hosting for more reasons why I advocate that you don't use your host email service for anything.
Use a non-site email address for your accounts.
It's a good idea to get a Gmail or other third-party email address for all of the accounts associated directly with your site, such as your hosting and domain. That way, you'll still be able to get emails whenever your domain is in transit.
For more information on domains, hosting, and online marketing be sure to get your copy of What Every Site Owner Should Know. It's free with your subscription to BlogAid News. This one ebook could save you hundreds of dollars and months of frustration.


The Challenger 850/850 XP jet charter is Bombardier's premier private heavy jet. The design of this luxury airplane is based on the CRJ200 airliner, delivering piece of mind to its passengers with over six million flight hours and counting. This executive aircraft has the largest cabin in its class and can easily accommodate up to 14 passengers comfortably, making it a leader in luxury private jet travel. With a flight range of nearly 3000 nm, the Challenger 850 makes flying transcontinental easier for executive business travelers everywhere. The Challenger 850 is powered by two General Electric CF34-3B1 turbofan jet engines that can propel this private airplane to speeds up to 528 mph. This business jet soars at an average cruising altitude of 41,000 and climbs 3,395 feet a minute.


Description A Bill to empower Benjamin Shepperd late sheriff of the late county of Dobbs for the year 1790 and Graves Bright for the year 1791 to collect the arrearages of taxes due in the said county for the years aforesaid. A Bill to appoint commissioners to allow the rebuilding of a goal in the county of Franklin and for laying a tax to defray the expense of the same. A Bill to amend an act entitled "an act to amend an act to prevent domestic insurrections" passed at Fayetteville in November 1788.


text:
Q: English wording for "first level of asymptotic expansion" In French, we say that $f$ est équivalente à $g$ denoted by $f \sim g$ for a limit point $x_0$ of a topology when $$\lim\limits_{x \to x_0} \frac{f(x)}{g(x)} = 1.$$
This is the first level of asymptotic expansion  in English. However it seems that the word equivalent cannot be used in English.
Is there an appropriate wording in English for "first level of asymptotic expansion"?

A: Using rrr8 comment as an answer.
You would just say $f$ is asymptotic to $g$.

redpajama_set_name: RedPajamaStackExchange


One lucky Radio Disney winner and three guests will fly to Los Angeles to experience the lights, cameras, and action of American Idol LIVE! You'll be there for the return of the groundbreaking series and even get to stand on the iconic Idol stage before the show. You'll also snag a bag of the hottest A.I. swag. American Idol will premiere Sunday March 11th at 8/7c on ABC. Radio Disney has your Golden Ticket to Hollywood!
Official Rules: open to US, DC, 10 and older. Begins on February 10 and ends on March 8, registered Disney.com member (free to join). One entry per person per day.


Central Sydney is connected to the heart of Sydney's CBD.
We celebrate the optimism and diversity of our global city, from the newest foodie craze to supporting the lives and businesses that make-up the many communities in the CBD.
With its lively mix of breaking local news, entertainment, property and dining, Central Sydney is essential reading for every resident and commuter.
Whether it's through print, online or social media, our promise remains to inspire and connect locals to their community in ways that matter to them most.
Published every Wednesday, Sydney Central keeps the community up-to-date with what matters to them and provides readers with a comprehensive range of sections that cater to a diverse range of audience needs and interests. These include News, Street Watch, Food & Drink, Lifestyle, Home, @School, Sport, Pets, Travel and many more. Our NewsLocal print publications are delivered weekly to the doorsteps of local residents and distributed at local shopping centres. This offers advertisers a prime opportunity to engage with their audiences through a traditional form of publishing that values its connection with its readers.
NewsLocal brands are integrated online under the powerful dailytelegraph.com.au brand. These provides advertisers with the opportunity to connect with local readers under a powerful masthead and then reach customers with diverse search and consumption habits. Sydney Central delivers users localised content, breaking news, photo galleries, surveys and competitions as well as providing live Twitter updates about their area.


text:
Q: JDBC driver error and cannot connect to MySQL I keep getting the error messages when I run my code attempting to connect to a MySQL server
Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:375)

This is my code. I've made sure to add connector/J to the classpath and still no change.
import java.sql.*;

public class App {

    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Connection conn = DriverManager.getConnection(
                "jdbc:mysql://localhost:3306/vehicle", "root", "root"); // For MySQL only

        vehicle focus = new vehicle("Ford", "Focus", 200, 2004, 3000);

        System.out.println(focus.getMake());
    }
}

A: First of all, loading the JDBC driver using Class.forName is not necessary since JDBC 4.0 which was made available in 2006 (the driver registers its implementation as service provider and will be loaded by the ServiceLoader).
Just remove this line and it should work. If you need the class name, its a good idea to consult the documentation of Connector/J. Take care to read the docs for the correct driver version because the class name changed (currently it's com.mysql.cj.jdbc.Driver).
Update
As Mark Rotteveel pointed out, Class.forName("com.mysql.jdbc.Driver") will not lead to a ClassNotFoundException when used with newer version of Connector/J. At least the newest driver produces a warning:

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new
driver class is `com.mysql.cj.jdbc.Driver'. The driver is
automatically registered via the SPI and manual loading of the driver
class is generally unnecessary.

Knowing this, removing Class.forName won't help since the exception simply means, that the driver is not on the class path.


text:
← Monday Open Thread | Passenger|Let Her Go
Tuesday Open Thread | Lizz Wright | Old Man →
Black History | Juneteenth
Posted on February 24, 2014	by SouthernGirl2
The History of Juneteenth
Juneteenth is the oldest known celebration commemorating the ending of slavery in the United States. Dating back to 1865, it was on June 19th that the Union soldiers, led by Major General Gordon Granger, landed at Galveston, Texas with news that the war had ended and that the enslaved were now free. Note that this was two and a half years after President Lincoln's Emancipation Proclamation – which had become official January 1, 1863. The Emancipation Proclamation had little impact on the Texans due to the minimal number of Union troops to enforce the new Executive Order. However, with the surrender of General Lee in April of 1865, and the arrival of General Granger's regiment, the forces were finally strong enough to influence and overcome the resistance.
Later attempts to explain this two and a half year delay in the receipt of this important news have yielded several versions that have been handed down through the years. Often told is the story of a messenger who was murdered on his way to Texas with the news of freedom. Another, is that the news was deliberately withheld by the enslavers to maintain the labor force on the plantations. And still another, is that federal troops actually waited for the slave owners to reap the benefits of one last cotton harvest before going to Texas to enforce the Emancipation Proclamation. All of which, or neither of these version could be true. Certainly, for some, President Lincoln's authority over the rebellious states was in question For whatever the reasons, conditions in Texas remained status quo well beyond what was statutory.
One of General Granger's first orders of business was to read to the people of Texas, General Order Number 3 which began most significantly with:
"The people of Texas are informed that in accordance with a Proclamation from the Executive of the United States, all slaves are free. This involves an absolute equality of rights and rights of property between former masters and slaves, and the connection heretofore existing between them becomes that between employer and free laborer."
The reactions to this profound news ranged from pure shock to immediate jubilation. While many lingered to learn of this new employer to employee relationship, many left before these offers were completely off the lips of their former 'masters' – attesting to the varying conditions on the plantations and the realization of freedom. Even with nowhere to go, many felt that leaving the plantation would be their first grasp of freedom. North was a logical destination and for many it represented true freedom, while the desire to reach family members in neighboring states drove the some into Louisiana, Arkansas and Oklahoma. Settling into these new areas as free men and women brought on new realities and the challenges of establishing a heretofore non-existent status for black people in America. Recounting the memories of that great day in June of 1865 and its festivities would serve as motivation as well as a release from the growing pressures encountered in their new territory. The celebration of June 19th was coined "Juneteenth" and grew with more participation from descendants. The Juneteenth celebration was a time for reassuring each other, for praying and for gathering remaining family members. Juneteenth continued to be highly revered in Texas decades later, with many former slaves and descendants making an annual pilgrimage back.
Juneteenth Festivities and Food
A range of activities were provided to entertain the masses, many of which continue in tradition today. Rodeos, fishing, barbecuing and baseball are just a few of the typical Juneteenth activities you may witness today. Juneteenth almost always focused on education and self improvement. Thus, often guest speakers are brought in and the elders are called upon to recount the events of the past. Prayer services were also a major part of these celebrations.
Certain foods became popular and subsequently synonymous with Juneteenth celebrations such as strawberry soda-pop. More traditional and just as popular was the barbecuing, through which Juneteenth participants could share in the spirit and aromas that their ancestors – the newly emancipated African Americans, would have experienced during their ceremonies. Hence, the barbecue pit is often established as the center of attention at Juneteenth celebrations.
Food was abundant because everyone prepared a special dish. Meats such as lamb, pork and beef which not available everyday were brought on this special occasion. A true Juneteenth celebrations left visitors well satisfied and with enough conversation to last until the next.
Dress was also an important element in early Juneteenth customs and is often still taken seriously, particularly by the direct descendants who can make the connection to this tradition's roots. During slavery there were laws on the books in many areas that prohibited or limited the dressing of the enslaved. During the initial days of the emancipation celebrations, there are accounts of former slaves tossing their ragged garments into the creeks and rivers to adorn clothing taken from the plantations belonging to their former 'masters'.
This entry was posted in Black History, discrimination, Emancipation Proclamation, History, Honor, Justice, Open Thread, Politics, Racism, Tribute and tagged 3chicspolitico.com, Black History, Black History Month, Emancipation Proclamation, Juneteenth. Bookmark the permalink.
4 Responses to Black History | Juneteenth
Thank you, SG2, for all your post on Black History! :-)
YVW! It's my pleasure. Just doing my part to honor our rich history.
Rev. Ronald V. Myers, Sr., M.D. says:
Your article did not mention the fact the Juneteenth is recognized as a state holiday or special day of observance in 42 states and the District of Columbia. There also was no mention of the National Juneteenth Holiday Campaign and the passage of several pieces of legislation by the U.S. Senate and U.S. House of Representatives recognizing Juneteenth.
Also, you show a picture of President Barack Obama who refused to acknowledge the significance of Juneteenth in 2013 or host a Juneteenth activity at the White House to honor the Americans of African descent who built it during the tyranny of enslavement. Why would you give the false image of President Obama supporting Juneteenth at the White House?
Juneteenth is America's 2nd Independence Day celebration. Americans of African descent were trapped in the tyranny of enslavement on the country's first "4th of July", 1776, Independence Day.
It took over 88 years for the news of freedom to be announced in Southwest Texas, the last southern state in rebellion during the Civil War, where enslavement was allowed, over two and a half years after the Emancipation Proclamation was issued by President Lincoln. The dynamic leadership of abolitionist Frederick Douglass was very important to the ending of enslavement in America.
On the "19th of June", 2012, Sen. Kay Bailey Hutchinson (R-TX), sponsored legislation in the U.S. Senate to make Juneteenth Independence Day a National Day of Observance in America.
This legislation has been blocked by U.S. Senate Democratic leadership.
We join our ancestors, Americans of African descent, in the celebration of the announcement of freedom, on the "19th of June", Juneteenth. It was the 13th Amendment passed by the U.S. Congress on December 6, 1865, and signed by the Secretary of State on December 18, 1865, that was the legal action that ended enslavement in America.
The "Modern Juneteenth Movement" recognizes and supports Juneteenth as our National Freedom Day, when we come together as Americans to celebrate freedom from enslavement in the nation.
The "19th of June" and the "4th of July" completes the cycle of Independence Day celebrations in America. You can not celebrate freedom in America without both days.
Together we will see Juneteenth become a national holiday observance in America!
Lonnie Starr says:
Reblogged this on thehistoricalview and commented:
Of course slavery didn't end in Louisiana until sometime in the 1970's, imagine that?


Isn't it?! I've just started tablet weaving, and it was that site that got me going. Since then I've built myself a simple post loom based on 13th century paintings and got a few wooden tablets as well as my good old playing cards!


text:
Guy Hobbs - From Wildlife Art to Batman!
Aidan Bradshaw
by Aidan Bradshaw
Traditionally a wildlife artist, Guy Hobbs is a completely self-taught artist who has taken the plunge into super hero fine art. He has had a passion for Sci-Fi and Fantasy and a love for comics and graphic novels since he was young.
Not only is Hobbs a 'bird nerd,' he is also a self-confessed Batman nerd. Guy Hobbs paints officially licenced art for DC. He explains to his followers on Facebook, "this was an exciting opportunity and a new challenge." He learned how to transfer his style to a completely different subject matter, differing from his traditional wildlife depictions by learning a completely new media.
Hobbs uses conventional techniques in the digital media world, allowing him to become bold and adventurous in both the color and composition - perfectly suited to the depiction of super heroes and villains! This can be displayed in his stunning illustrations of The Joker, Scarecrow, Wonder Woman and Batman.
Guy Hobbs is a British born artist who has won numerous prestigious awards for his beautiful compositional artwork. For the majority of his career, he had an established agency in the field of graphic design and illustration in England. He has continuously developed his skills and has subsequently pursued this as a full-time career. Since committing to this principle, he hasn't looked back and believes he has the best job in the world!
Hobbs has showcased his love for DC artwork through his interpretation of Batman and taught himself a completely new media. The multi tonal features used perfectly depict the mysterious and heroic nature of Batman - businessman by day, super hero by night!
Not only did Guy Hobbs create a beautiful composition of the Batman, his most recent graphics of the Scarecrow and The Joker are utterly fantastic. The misty haze in the background to represent the green smoke and the fear toxin that the Scarecrow releases against his victims is so cleverly incorporated. Alternatively, the mottled black background highlights the bright colors of The Joker. It could also be interpreted that the black smoky background could represent his dark past. There is no doubt that this skilled wildlife artist has found a new media that is all encompassing of new talents and combinations that he has fallen in love with.
Throughout his DC artwork, he uses a watercolor smoke-like effect to enhance the colors used to detail the characters rather than simply designing their features onto the background of a plain white canvas. If you're looking for a colorful comic-like design, then take a peek at Hobbs' creation of Wonder Woman. This design has detailed embellishments of the classic design with a twist from Hobbs' own interpretation.
Find out more about Guy Hobbs artwork! For all your Disney and DC artwork be sure to check out Art of Entertainment - just like super heroes we have wonderful artists with incredible super powers!


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace Microsoft.Azure.Commands.DataMigration.Common
{
    public class Utils
    {
        public static Dictionary<K, V> HashtableToDictionary<K, V>(Hashtable table)
        {
            if (table == null)
            {
                return new Dictionary<K, V>();
            }

            return table
              .Cast<DictionaryEntry>()
              .ToDictionary(kvp => (K)kvp.Key, kvp => (V)kvp.Value);
        }
    }
}

redpajama_set_name: RedPajamaGithub


Marrakech Race 2 - Just a little of oversteer assist for Tommy!
One of the best driver line-ups in international touring car history will battle for top honours when the Hungaroring hosts WTCR Race of Hungary next week (26-28 April).
World Touring Car teen Attila Tassi insists taking on national hero and former mentor Norbert Michelisz holds no fear.
The WTCR – FIA World Touring Car Cup presented by OSCARO resumes in Hungary next week (26-28 April). Here are the essential timings.
Benjamin Leuchter and Tiago Monteiro were among a number of frustrated racers at the Nürburgring Nordschleife last Saturday after heavy snow forced the early cancellation of the DMV 4-Stunden-Rennen VLN round.
Norbert Michelisz will be aiming to build on his triple points-scoring start to the 2019 WTCR – FIA World Touring Car Cup presented by OSCARO when the series heads to his native Hungary later this month.
Néstor Giorlami marked his debut in the WTCR – FIA World Touring Car Cup presented by OSCARO with a podium finish at WTCR AFRIQUIA Race of Morocco last weekend.


Experience Maldivian culture at its best at KADA, our beach pop-up café. Share delicacies served family-style, like roshi, mahsuni, garudhiya, coconut water, rosewater milk and fresh juices. Stop by the bar for an expertly crafted cocktail, or host a get-together at our boat-shaped table.


There are many stories can be described in decorated foyers. We collect some best of portrait to imagine you, look at the photo, the above mentioned are great imageries. We like them, maybe you were too. Perhaps the following data that we have add as well you need. Sylo seven ways more creative, Decorating flat creating programme lighting bars amusing dog names hotel foyers old people formal dress sense list honestly endless build creative idea start taking good one apart.
We got information from each image that we get, including set of size and resolution. If you like these picture, you must click the picture to see the large or full size picture. If you like and want to share you must click like/share button, maybe you can help more people can saw this too. Here there are, you can see one of our decorated foyers gallery, there are many picture that you can surf, we think you must click them too.
Most certainly you will want a contractor to excavate the realm and build the storage basis with anchor bolts enclosed. When the muse is prepared, you can elevate walls. Any concepts that you have can be the best resolution - it is up to you to work out what is going to fit and find out how to make every new design a profitable one. Whether you're designing a new house or you might have been commissioned for a a lot bigger, central constructing for a enterprise, you are at all times plunged into a brand new and thrilling scenario with every challenge. No project has a right or improper answer and it is as much as you and the consumer to design the right end result for any job that you are taking on. Best of all, complete steel garage building plans can be found for any mission with blueprints and detailed walkthrough for every stage of the construction. Steel garage building plans permit you to construct precisely the storage you've gotten in mind to fit in completely in no matter fashion home you might have.
At this stage guarantee you could have some help with lifting and holding the wall in place whereas fixing it in. Before lifting the steel sheets into place, ensure the underside is correctly positioned. Check your building permits and local building codes to ensure you do not violate any of them. It's essential to guantee that the storage has an accessible driveway and connection to the home for water and electricity. To find the balance in type and operate, you'll be able to add a steel storage to the aspect of your house. In fact, most garages today are hooked up to the home. Roof trusses will sustain hundreds solely when they're vertical. If you have any kind of concerns pertaining to where and how to use floorplans, you can call us at the webpage. Carefully lift the trusses and set them in place. Steel garages have change into a favourite amongst savvy homeowners, as they're versatile, straightforward to build and very reasonably priced. When you have the eye for good constructing design and also you desire a rewarding profession, there is truly nothing higher that you would choose to study. The roof must be built immediately after you have finished constructing the partitions to avoid any weather damage inside the steel garage.
With a steel garage, you may add a roof of your alternative, install the doors and windows right where you want them, and of course, you possibly can pick materials you possibly can afford. Now you're prepared so as to add roof sheathing. Good architectural design providers are probably the most wanted aspects of residential and business constructing and building. Read on for some of the highest causes to study structure and select a profession in planning and design work. There are plenty of causes to get into the sector. There's so much selection and versatility within the job that it's best to by no means feel like you're suffocating underneath bad management. Nothing beats going again to a job site and seeing a implausible new building with the knowledge that you just designed it. Once a job has lastly been completed you get to see your work come to life before your eyes.
Run your personal firm or work freelance - there may be nothing extra liberating than relying on your self on your income. With no again breaking work to take you out of fee whenever you hit 35 and solely expertise to realize with time, architects truly thrive as they get older. With a clear idea in thoughts, take a look at your property and discover an appropriate space. In any case, you'll be able to at all times select a garage constructing plan that suits your needs without sacrificing area or look of your property. When constructed in line with garage building plans, a steel storage can value you up to 40% lower than conventional garages. With a steel storage, you'll be able to retailer one automobile or even a truck or a boat, though you cannot accommodate a visitor condo or an office there. There aren't any limits on age as an architect. Being an architect offers you the liberty to be half of a bigger firm or to go it solo.
When you loved this information and you would love to receive details regarding french normandy house plans assure visit our web-site.
Below are 9 top images from 21 best pictures collection of decorated foyers photo in high resolution. Click the image for larger image size and more details.


text:
Live Stats/Video
Clemson Women's Tennis
Tigers Play Yale & UCF at USTA National Campus Wednesday
Match Information vs. Yale:
Who: Clemson Tigers (7-8) vs. Yale (5-8)
When: Wednesday, March 21, 10 a.m.
Where: USTA National Campus, Lake Nona, Fla.
Watch: USTANationalCampus.com
Live Stats: Scores.TennisTicker
Social: @ClemsonWTennis on Twitter & Instagram
Match Information vs. UCF:
Who: Clemson Tigers (7-8) at No. 24 UCF (11-2)
When: Wednesday, March 21, 3 p.m.
Clemson Notes:
– The Tigers (7-8, 1-5 ACC) are coming off of a tough 4-3 loss on the road at Boston College on March 18. Marie-Alexandre Leduc, Ally Miller-Krasilnikov and Daniela Ruiz won their singles matches against the Eagles.
– Clemson has won the doubles point in nine of its 15 matches on the season. The Tigers have a 6-3 record in those nine matches.
– Junior Marie-Alexandre Leduc is ranked 21st in the nation in singles. She has a 15-7 overall record, and a 6-4 record in dual matches. She has played all 10 of her dual matches at No. 1 singles, and has seven wins over nationally-ranked opponents on the season.
– Leduc and fellow junior Fernanda Navarro are ranked 34th nationally in doubles. The pair is 16-5 overall, 8-2 in dual matches and 4-0 in ACC dual matches, and has currently won six matches in a row.
– Leduc and Navarro moved up 26 spots from the March 6 doubles poll, when they entered the rankings for the first time at No. 60.
– Navarro was named ACC Player of the Week on Feb. 20, for her performances the week of Feb. 12-18. Navarro was undefeated in singles and doubles play in two matches, and she clinched the Tigers' 4-3 upset over 11th-ranked Wake Forest on Feb. 18.
– Senior Daniela Ruiz was named a recipient of the ACC's Weaver-James-Corrigan Postgraduate Scholarship as announced by the conference office on Feb. 28. Ruiz will graduate from Clemson in May 2018 with a degree in Industrial Engineering, and has already begun taking classes toward earning a master's degree in that field.
ITA Rankings:
UCF – 25th
Marie-Alexandre Leduc (Clemson) – 21st
Rebeka Stolmar (UCF) – 122nd
Marie-Alexandre Leduc & Fernanda Navarro (Clemson) – 34th
Leduc, Navarro Fall Short in NCAA Doubles Sweet 16
Tiger Duo Advances to NCAA Doubles Sweet 16
Leduc, Navarro Set for NCAA Doubles Championship
Leduc, Navarro Selected for NCAA Doubles Championship


text:
States Issuing IDs for Illegal Immigrants
Illegal Immigration, Legislative
Are States really issuing IDs for illegal immigrants? Yes…
In recent months, the issue of illegal immigration has come to the forefront with the inauguration of Joe Biden as the nation's 46th President. While illegal immigration, particularly at our southern border, has posed a challenge that decades of government debate have failed to solve, the presidency of Donald Trump showed what a winning strategy can look like. Through a combination of border wall construction and diplomatic agreements with Central American governments, the Trump administration was able to bring the number of illegal immigrants crossing our borders to record lows in the final year of his presidency. The Biden Administration has undone that progress and a new crisis emerges.
5 States Issuing IDs for Illegal Immigrants
Illegal immigration is a national threat which requires a federal response. However, within our system is a Constitutional protection of state's rights, which has allowed many states to circumvent and undermine federal strategies to reduce the incentive for migrants to come here illegally. For example, in 2005, Congress enacted laws to implement Real ID requirements for American citizens. Since then, many states have undermined the process of creating a uniform ID system for citizens and legal residents by providing IDs for undocumented immigrants. Here is a list of five such states helping illegal immigrants game the system:
In 2013, California passed AB 60 which became effective as state law in 2015. This bill not only allowed illegal residents to obtain a California ID, it also prohibited the use of these IDs to question the legal status of anyone who received one. Information regarding the law on the state's DMV website states the following: "As of January 2015, California residents who cannot establish legal presence in the United States may apply for a driver's license if they can show eligible proof of identification and residency in the state. These driver's licenses may not be used for identification purposes. By law, no one may discriminate against a holder of an AB 60 license, or use this license to attempt to question the holder's citizenship or immigration status."
Also in 2013, the state of Connecticut passed H 6495 which gave illegal immigrants access to driver's licenses in the state. According to NCSL.org, "This law provides driver's licenses to applicants who submit a valid foreign passport or consular identification and proof of residency, regardless of legal presence in the United States. Applicants must file to legalize as soon as he or she is eligible." The law became effective in 2015.
In 2012, Illinois passed S 957 which went into effect in November of 2013. This law empowers the state's Secretary of State to issue a "temporary visitor's license" to any illegal immigrant who can prove residence in the state. According to NILC.org, the law builds on already existing infrastructure which provided legal immigrants who were not eligible for social security numbers, such as students, to obtain a driver's license. "Since 2005, Illinois has issued TVDLs to individuals who do not have SSNs but who have lawful immigration status." S 957 provides those who came here illegally with the same privileges as those who followed the law, as long as they can present evidence that they reside in Illinois and can present a valid consular ID number or unexpired foreign passport.
While liberal leaning state and local governments have typically overseen the implementation of programs to provide IDs for illegal immigrants, Utah is one traditionally conservative state who has taken similar action. In 2005, the state passed S 227, effective that same year. This Utah program places a one-year limit on the IDs for those in the state illegally. "Applicants without a Social Security number must prove Utah residency for six months and provide a tax identification number. The card is expressly prohibited from being used for any identification purposes by a governmental entity."
The state of New York passed two new laws in 2019 to provide IDs for illegal immigrants, which both went into effect that same year. S 1747 authorizes the state to issue the IDs to illegal immigrants, but a second law, A3675 takes things a step further. NCSL.org notes that under this law, "The Department of Motor Vehicles may not disclose records to any agency that primarily enforces immigration law without a lawful court order or judicial warrant. The law requires that any person or entity that has access to information from the department to certify that the information will not be used for civil immigration purposes." Not only is the state of New York incentivizing illegal immigration by flouting requirements for their drivers to be legal residents, they are actively committed to obstructed federal immigration enforcement. These two state laws are everything wrong with activist illegal immigration policies in our country in a nutshell.
The concept of the sanctuary city is one that has evolved since their first appearance in the 1980s. Historically speaking, the idea of a sanctuary city stems from the plight of immigrants fleeing religious and other violent persecution. In turn, many cities opened their doors to those fleeing dangerous conditions.


text:
Q: Push icon on mobile devices that points to a perticular url Please help me find how to push an icon of our application on all the mobile devices. This icon shall lead to the home page of the application.

A: It really depends on the mobile device.
For iPhone the process is super easy. You just create a .png icon that is 45x45 and drop it into the root of your site and name it apple-touch-icon.png. Then add a reference to the icon in your <head>
<link rel="apple-touch-icon" href="/path/to/some.png"/>
Funnily enough this same code and icon will work on Android browsers as well - as long as your application is not running under SSL.
But for other devices the process can be a bit of a nightmare. I've not tackled this on Symbian but I have created bookmark launchers for BlackBerry OS (pre-webkit versions) and the process is really quite complicated. You need to create an OTA .JAD file and .COD files, and then detect the UA version and deliver the correct file. There is a tool called create-a-jad that helps you compile the launcher files. Once you achieve that don't forget to add the .cod and .jad mime-types to your server config


text:
Book Review: The Song of Achilles
April 8, 2012 By Robyn Ryle Leave a Comment
It's Easter Sunday, and I don't know, is it only me for whom a review of a book about the Trojan War seems perfectly suited to an Easter blog post? The New Testament was written in Greek, after all, and Christianity borrows from gnostic philosophy. Perhaps only someone who seriously contemplated a classics major and comes from a liberal arts background would associate Easter with Achilles, but whatever.
The Song of Achilles, a novel by Madeline Miler, is told from the first person perspective of Patroclus. Does anyone out there remember Patroclus? Best friend of Achilles, the guy whose death finally propels Achilles out of his tent where he's been sulking away for months and months? In Miller's novel, Patroclus is also Achilles' lover. Through Patroclus, we meet all the major figures of the Trojan War…Hector, Priam, Menelaus, Agamemnon, Odysseus, and, of course, Achilles. And then you know what happens in the end for almost everyone–bloody death. Except for Odysseus, who wanders around for a long time, and then I confess, I don't know what happens to him after he gets back home and gets rid of all those pesky suitors.
I read this novel in fits and starts, before a trip, during a trip, a little bit after a trip. Doesn't the particular way in which you read a book matter so much to your experience of it? I read Invisible Man once during a weekend stay in Jackson, Mississippi, sleeping on a mattress on the floor in an empty apartment with no television, no telephone, and no computer. And boy, did I love that novel. In Cold Blood crept up on me during another weekend in Mississippi. Perhaps being in Mississippi makes for especially good reading experiences. I wouldn't be surprised.
In fits and starts, The Song of Achilles crept up on me. If you'd asked me whether I liked it while I was reading it, I probably would've shrugged. But once the Trojan War got started, things definitely picked up. In fact, I kind of wish the Trojan War had been longer, and all the stuff that came before about Achilles' life had been shorter. How often do you hear that? "I really wish the Trojan War had been longer."
Achilles attending a wounded Patroclus
If you're familiar with the Iliad, it's fun to see the characters from a different perspective. I especially liked Miller's take on Odysseus, who is clever, but not always particularly likable. Agamemnon is pretty much how you'd expect, full of himself and blustering. But you also get to meet an actual woman, Briseis. She's in the Illiad, too, but not as an actual human being with feelings and intelligence and, you know, a personality.
I guess for a lot of folks the big deal in The Song of Achilles is that Achilles and Patroclus are lovers. Miller certainly wants to suggest that it would have been problematic for them. I did not actually become a classics major, but it's my understanding that two men loving each other and having sex with each other wasn't really very unusual in Ancient Greece. The Iliad, as far as I know, takes place in a time before the rise of the Greek city-states, so it's hard to say exactly what they thought of men loving each other back then. It probably was unusual if the two were equals in status, which is why Achilles' son, Pyrryhus, assumes that Patroclus was Achilles' slave.
I think the larger point is, who wouldn't fall in love with Achilles? He's half-divine, right (though, also kind of a divine pain in the ass sometimes)? Patroclus' question is really, out of all the people Achilles could have had, why did he pick me? And this is a question that faces even people who are not the lovers of semi-divine, Greek heroes like Achilles. Even though both Achilles and Patroclus annoyed me at various points in the novel, I still found myself tearing up at the end of the book. Yes, they both die. No spoiler there. But there's more in Miller's telling, and that more was quite moving.
Book Review: A Game of Thrones and a question
Book Review: Russian Winter
Book Review: Little, Big
Filed Under: Bookish Thoughts


text:
Q: Java 8 Mvn Project doesn't work on Java 17 I have a Maven Project which was written using Java 8. If I try to run it in Intelliji using SDK 17 everything is red and it doesn't work at all. If I use Java 8 however it works. Why doesn't it work with SDK 17? It should be compatible.
Errors in my Code

A: Those errors are JavaFX related, not Java in general. JavaFX has never been a standard part of Java SE.
You need to either:

*

*Add an implementation of JavaFX to your project. Add dependencies to your project for the OpenJFX library. That code base for that implementation is housed as a subproject on the OpenJDK site, and is co-led by Gluon and Oracle.

*Use a Java implementation that includes the OpenJFX library. At least two vendors offer an edition of their JDK product with OpenJFX: ZuluFX by Azul Systems, and LibericaFX by BellSoft.


text:
# Codelab overview
[Lovefield](https://github.com/google/lovefield) is an SQL-like, relational
query engine for the Web implemented in Javascript. In this codelab you will
build an offline-capable web application for analyzing stock market data.
You will use Lovefield as the data access layer and learn about its powerful
querying capabilities and intuitive API.

## What you'll learn
1. Setup steps for including Lovefield code in your application.
2. Defining the database schema.
3. Executing `INSERT` queries.
4. Executing simple `SELECT` queries (column projection, value predicates,
   sorting).
5. Executing complex `SELECT` queries (joins, aggregators, group by).
6. Debugging/examining a query.
7. Using parameterized queries.
8. Using database observers to trigger UI updates.

In short, you will learn why and how to use Lovefield in your next real-world
data-rich application, and you will gain a clear understanding of the
functionality Lovefield provides.

## What you'll need
- [NodeJS](https://nodejs.org/download/) and [gulp](
  https://www.npmjs.com/package/gulp).
- Chrome or Firefox.
- The `StockAnalyzer` skeleton code.
- A text editor

##Prerequisites

Basic familiarity with the concepts of [relational databases](
http://en.wikipedia.org/wiki/Relational_database) and the [relational data
model](http://en.wikipedia.org/wiki/Relational_model) is required to follow the
exercises of this codelab. Familiarity with [SQL (Structured Query Language)](
http://en.wikipedia.org/wiki/SQL) is not required, but is beneficial, especially
when it comes to advanced topics like *indexing* and *query optimization*.

# StockAnalyzer application overview

## UI overview
![StockAnalyzerComplete](images/stock_analyzer_complete.png)

The application user interface has four components:

1. A drop down list populated with the available search modes, "Stocks" or
   "Sectors".
2. A drop down list populated with either stocks or industry sectors according
   to which search mode is selected.
3. A drop down list populated with various time windows. Options are *5 days*,
   *1 month*, *3 months*, *6 months*, *year-to-date (YTD)* and *1 year*.
4. A pane that displays query results as a 2D graph.

App users can search for "Stocks" or "Sectors" and specify a time window. The
result graph updates as users examine different stocks/sectors/time-windows.
Hovering over or touching the graph exposes additional information about a
specific date.

## Source code overview
**All Lovefield related code resides in lovefield\_service.js**, within a class
called `LovefieldService`. Everything else is already implemented and is not the
focus of this codelab.

|Filename                      |Description            |
|:-----------------------------|:----------------------|
|index.html                    | All HTML code.   |
|stock\_analyzer.css           | All CSS code.    |
|graph\_plotter.js             | Logic for drawing graphs. |
|fetcher\_service.js           | Logic related to fetching real-world stock market data from the network, using the Google Finance API.|
|query\_builder\_controller.js | AngularJS controller for interacting with all UI components related to building database queries.|
|lovefield\_service.js         | Class used by the rest of the application to make calls to Lovefield's API.
**This class is partially implemented. You will implement the remaining parts in this codelab.** |

## LovefieldService class
The application calls `LovefieldService` to fulfill its data-related needs.
The following methods are unimplemented or only partially implemented. Each of
them demonstrates a different part of Lovefield's API, and you will implement
them in this codelab.

|Method name             |         Method description|
|:-----------------------|:--------------------------|
|`buildSchema`           |Builds the database schema.|
|`insertData`            |Inserts data fetched from the network to the database.|
|`getStockList`          |Retrieves the list of stocks for the "Stocks" search mode.|
|`getSectorList`         |Retrieves the list of sectors for the "Sectors" search mode.|
|`getStockClosingPrices` |Retrieves a given company's performance, within a given time window.|
|`getSectorClosingPrices`|Retrieves a given industry sector's performance, within a given time window.|
|`observeStockClosingPrices` |Registers an observer for the "stock closing prices" query.|
|`observeSectorClosingPrices`|Registers an observer for the "sector closing prices" query.|

One of Lovefield's nicest features is its SQL-like API. Developers who are
already familiar with SQL will find learning Lovefield APIs straightforward. To
make it even easier, we're including the equivalent SQL queries for all steps in
this codelab.

# Step 0: Download and run the skeleton code
1. Clone the Github repository from the command line.
   `git clone https://github.com/google/lovefield.git`
2. Follow instructions in `lovefield/codelabs/stock_analyzer/README.md`.

## Codelab exercise answers
A different folder exists for the starting source code of each codelab step
(`src/step1/`, `src/step2/` ... and `src/final/`) such that you can pick
up the demo at any step. For example, if you want to pick up this codelab from
step4, you would start from the code residing at `src/step4`.

Also, **you can find the answer to any codelab exercise**, by inspecting the
next step's `lovefield_service.js` file. Note that simply looking at
`src/final/lovefield_service.js` might not help, since some methods are modified
twice within this codelab, which is why looking at the next step instead is
recommended.

# Step 1: Defining the database schema
In this step you are going to define the database schema used for holding the
data for the StockAnalyzer application. The database schema describes the
structure of the relational database. More specifically it describes:

- The tables in the database.
- The column names and data types for each table.
- Any constraints the database engine should enforce (primary-key, non-nullable,
  unique).
- Any indices the database engine should create in order to speed-up execution
  of certain queries.

The API entry point for defining the "schema" is [lf.schema.create()](
https://github.com/google/lovefield/blob/master/docs/spec/01_schema.md#lovefield-specification
), which in our case contains the two tables shown below.

## Table1: HistoricalData
This table stores historical data about stocks. Each record refers to a given
stock on a given day. For example:

```
{
  "Date": Thu Apr 10 2014 00:00:00 GMT-0700 (PDT), // Date
  "Open": 565,                                     // number
  "High": 565,                                     // number
  "Low": 539.9,                                    // number
  "Close": 540.95,                                 // number
  "Volume": 4027743,                               // integer
  "Stock": "GOOG"                                  // string
}
```

Note that No primary key exists on the `HistoricalData` table.

## Table2: StockInfo
This table stores information about each company. For example:

```
{
  "CompanyName": "Google Inc.",  // string
  "Sector": "Technology",        // string
  "Stock": "GOOG"                // string
}

```

Note that the "Stock" field is the primary key of the `StockInfo` table, which
means that it is also unique.

Take a look at how Javascript types map to Lovefield types in the [schema spec](
https://github.com/google/lovefield/blob/master/docs/spec/01_schema.md#131-columns)
and then go ahead and implement the `buildSchema_()` method on LovefieldService
class (search for `LovefieldService.prototype.buildSchema_` inside the
`lovefield_service.js` file). If you get stuck, you can take a look at
[Lovefield's "Quick Start"](
https://github.com/google/lovefield/blob/master/demos/todo/README.md) for some
help.

*Hints:*

1. Get a schema builder instance by calling `lf.schema.create()` (need to pass
   two parameters to this call).
2. Call `createTable('TableName')`, once for each table, to get a table builder instance
   and start calling methods on this instance to add columns to your table.
3. Return the schema builder instance from the `buildSchema_()` method.

If you are encountering problems finishing this step, take a look at the
complete answer
[here](https://github.com/google/lovefield/tree/master/codelabs/stock_analyzer/src/step2/lovefield_service.js#L77).

Once you've built the schema, reload the app and verify that the database has
been created using the developer tools in your browser.

For Chrome, navigate to **Resources > IndexedDB**. You should see a database
called "stocks" with two empty tables, as shown in the following screenshot.

For Firefox, you first need to enable the storage inspector by checking the
"Storage" checkbox in developer tools settings, see more
instructions [here](
https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox#Settings).

![IndexedDbCreated](images/indexed_db_created.png)

## ConnectOptions
Let's take a look at the following code snippet which resides in
`LovefieldService#getDbConnection()` method.

```
var connectOptions = {storeType: lf.schema.DataStoreType.INDEXED_DB};
return this.buildSchema_().connect(connectOptions).then(
    function(db) { /* do something with db */ });
```

The optional `connectOptions` parameter specifies what kind of backing storage
to use for persisting the data. In this codelab we will use IndexedDB (which is
also the default value if `connectOptions` is omitted), so that the data is
persisted locally and it becomes inspectable by Chrome/Firefox's developer
tools.

An alternative (that will not be covered in this codelab) is to use
`lf.schema.DataStoreType.MEMORY` which would only store data in-memory (no
persisting). **This is a very powerful option since allows for leveraging
Lovefield's querying API even if persisting data is not desired.**

## SQL equivalent
```
CREATE TABLE HistoricalData(
  Close FLOAT NOT NULL,
  Date DATE NOT NULL,
  High FLOAT NOT NULL,
  Low FLOAT NOT NULL,
  Open FLOAT NOT NULL,
  Stock VARCHAR(6) NOT NULL,
  Volume INTEGER NOT NULL);

CREATE TABLE StockInfo(
  CompanyName VARCHAR(30) NOT NULL,
  Sector VARCHAR(30) NOT NULL,
  Stock VARCHAR(6) NOT NULL,
  PRIMARY KEY (Stock));
```

# Step 2: Executing INSERT queries
In this step you will implement the `LovefieldService#insertData() method`. This
method is being called by the `FetcherService` class (already implemented) which
grabs the data by making network requests to the Google Finance API. The method
receives two Array parameters holding the raw data for each table. Take a look
at the Lovefield API for inserting rows on [the query builder docs](
https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#42-insert-query-builder)
and populate both tables. You'll need to call `insert()`, not
`insertOrReplace()`, as the latter requires a table to have a primary key,
which is not the case for the `HistoricalData` table.

The raw rows are already converted to Lovefield rows within `insertData()`
method. by calling the `createRow()` method (specifically
`this.hd_.createRow(...)` and `this.si_.createRow(...)` respectively).

*Hints:*

1. Call `this.db_.insert()` and start forming the `INSERT` query.
2. Each `INSERT` query can only insert rows into a single table, so you 'll need
   to implemnt two such queries.

*Bonus exercise*: Populate both tables using a single database transaction.

*Hint*: Read about the [difference of implicit vs explicit transactions](
https://github.com/google/lovefield/blob/master/docs/spec/05_transaction.md#52-implicit-transaction).

## Verify tables are populated correctly
Reload the app and verify in the developer tools that both tables have been
correctly populated. If the schema you created at the previous step is incorrect
(for example missing columns, or wrong types) it will not be detected until in
later steps (where spurious errors will be thrown).

Verify that the `HistoricalData` table is populated correctly.
Open the developer tools and **inspect a random record from the HistoricalData
table**. It should look as it does in the following screenshot. Make sure that all
the columns are present and that they have the correct types (also ensure that
there are no undefined/null values).

![IndexedDbPopulated](images/historical_data_populated.png)

Now verify the same for the `StockInfo` table by comparing with the following
screenshot.

![IndexedDbPopulated](images/stock_info_populated.png)

If the tables are not populated correctly, you will have to:

1. Fix the schema at the previous step (see the answer provided in the previous
   step, after the last hint).
2. Clear IndexedDB and rerun the application. In order to clear IndexedDB, you
   will have to select each of the tables and click on the "clear" icon next to
   the "round arrow" icon at the bottom of the developer tools window.
3. Re-run the application and verify that the tables are populated correctly
   this time.

You can move on to the next exercise, **only if you verified that both tables
are populated correctly**,

## SQL equivalent
Values shown in the SQL queries are purely for example purposes, your actual
code should have no hardcoded values, since it receives the data as a parameter.

```
INSERT INTO HistoricalData (Close, Date, High, Low, Open, Stock, Volume)
       VALUES (552.03, '30-Mar-15', 553.47, 548.17, 551.62, 'GOOG', 1281355),
              (123.03, '30-Mar-15', 153.47,  48.17, 151.62, 'AAPL', 362124);

INSERT INTO StockInfo (Stock, CompanyName, Sector)
       VALUES ('AAPL', 'Apple Inc.',             'Technology'),
              ('GM',   'General Motors Company', 'Auto Manufacturers'),
              ('GOOG', 'Google Inc.',            'Technology'),
              ('MSFT', 'Microsoft Corporation',  'Technology'),
              ('NKE',  'Nike Inc.',              'Consumer Goods'),
              ('RL',   'Ralph Lauren Corp.',     'Consumer Goods'),
              ('TM',   'Toyota Motor Corp.',     'Auto Manufacturers'),
              ('TSLA', 'Tesla Motors Inc.',      'Auto Manufacturers'),
              ('TWTR', 'Twitter Inc.',           'Technology'),
              ('UA',   'Under Armour Inc.',      'Consumer Goods');
```

# Step 3: Executing simple SELECT queries
In this step you are going to populate the sectors/stock drop-down list
depending on the current "search mode".

## Retrieving a list of all stocks
You can find the list of stocks in the StockInfo table's Stock column. Implement
the `LovefieldService#getStockList()` method by writing a query that retrieves
all rows from the `StockInfo` table and only keeps the `Stock` column.

Review the [SELECT Query Builder docs](
https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#41-select-query-builder)
for information on writing SELECT queries,
and review the [filters docs](https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#411-filters)
for information on selecting only the columns you're interested in.

*Hint:* You will need to pass the column to be kept as a parameter to the
`db.select()` method.

*Bonus exercise*: Modify the query to produce results in [sorted order](
https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#414-limiters-and-order).

To verify that your query works,

1. Reload the app
2. Choose Stocks as the search mode
3. Click on the "Select Stocks" drop-down menu.

It should be populated with stock codes as shown in the following screenshot.

![DropDownStocks](images/drop_down_stocks.png)

## Retrieving a list of industry sectors
Implement the `LovefieldService#getSectorList()` method by writing a query that
retrieves all (distinct) industry sectors. This query is similar to the previous
one as all the information resides in a single column of the StockInfo table.
But you have to use [an aggregation function](
https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#415-group-by-and-aggregators)
to ensure that each industry sector is included only once in the result.

Once done, verify that the query works by switching to "Sectors" search mode and
clicking on the drop-down menu. It should be populated with three industry
sectors as shown in the following screenshot.

![DropDownSectors](images/drop_down_sectors.png)

## SQL equivalent
```
SELECT Stock FROM StockInfo ORDER BY Stock ASC;
SELECT DISTINCT Sector FROM StockInfo ORDER BY Sector ASC;
```

# Step 4: Executing complex SELECT queries
## Retrieving closing values for a stock within a time window

In this step you are going to write a query to retrieve closing values for a
given stock within a given time window sorted by date in ascending order. The
information resides in the `HistoricalData` table's `Close` and `Date` columns.
Go ahead and implement `LovefieldService#getStockClosingPrices()`. This method
receives three parameters. `start`/`end` indicate the time window of interest,
`stock` indicates the stock to be analyzed. You will need to use all three
parameters to properly build the query. Make sure to review the information on
[how to construct predicates](
https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#413-search-conditions).

*Hints*:

1. The query will have to include a `where()` clause.
2. You will need to combine multiple predicates using the `lf.op.and()`
   logical operator.
3. Constructing a predicate is done by using methods already provided on a
   column object like `eq()` and `between()`, see example snippet below.

```
var hd = db.getSchema().table('HistoricalData');
db.select().
    from(hd).
    where(lf.op.and(
        hd.Stock.eq(...),
        hd.Date.between(...)).
    exec();
```

Once done, verify that the query works. Reload the app, select "Stock" search
mode, and then select any stock from the drop down menu. Select various time
windows and the graph should update.

Voila! You can now start researching your next stock market moves!

# SQL equivalent
```
SELECT *
  FROM HistoricalData
  WHERE (Date BETWEEN '27-Mar-15' AND '30-Mar-15')
    AND Stock == 'GOOG'
  ORDER BY Date ASC;
```

## Retrieving average closing values for an industry sector within a time window
In this step you are going to write a query to retrieve average closing values
for a given industry sector within a given time window. The information resides
in two tables, which means that the query will have to join these two tables.
The association between stocks and industry sectors resides in the `StockInfo`
table, while the closing values for each stock resides in the `HistoricalData`
table.

Go ahead and implement `LovefieldService#getSectorClosingPrices()`.
Create a query that returns the average closing value for each date, taking into
account the closing values of all stocks that belong in the chosen sector,
sorted by date in ascending order. Make sure to review the information on
[grouping and aggregators](
https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#415-group-by-and-aggregators).

*Hints:*

1. You will need to include a `groupBy()` clause.
2. You will need the `lf.fn.avg()` aggregator

Once done, verify that the query works. Reload the app, choose "Sectors" search
mode, and select any sector from the drop-down menu. The graph should update
accordingly.

## SQL equivalent
```
SELECT AVG(hd.Close), si.Sector, hd.Date
  FROM HistoricalData as hd, StockInfo as si
  WHERE hd.Stock == si.Stock
    AND (hd.Date BETWEEN '27-Mar-15' AND '30-Mar-15')
    AND si.Sector == 'Technology'
  GROUP BY si.Sector, hd.Date
  ORDER BY hd.Date ASC;
```

# Step 5: Debugging/examining a query
A common situation a developer faces when using a database query engine is a
query that

- returns unexpected results (with regards to the developer's
  expectations), or
- takes long time to execute.

The `explain()` method allows the developer to get an insider look on how the
query engine executes a given query, by returning the **execution plan** in a
human readable format. The execution plan is a detailed list of steps that the
database engine will perform in order to calculate the answer of a given query.

For example, let's examine the query performed by `getStockClosingPrices()`
which was implemented in the previous step and see whether we can improve its
execution plan. In order to do so, store the query in a local variable and print
out the result of the `explain()` method before executing it.

*Hint:*
```
var q = db.select(...).from(...).where(...);
console.log(q.explain());
return q.exec();
```

Reload the app, perform a stock search and observe the output in the console. It
should look similar to the following.

```
project()
-order_by(HistoricalData.Date ASC)
--select(value_pred(HistoricalData.Date between <value1>, <value2>))
---select(value_pred(HistoricalData.Stock eq GOOG))
----table_access(HistoricalData)
```

The execution plan is basically a tree data structure. Each node in the tree is
an operation. The plan is being executed from the bottom up. In our example the
following operations will take place.

1. **table\_access**: The entire `HistoricalData` table is brought into memory.
2. **select**: Rows that don't correspond to the GOOG stock are filtered out.
3. **select**: Rows that don't fall within the specified time window are
   filtered out.
4. **order\_by**: Remaining rows are sorted base on the `Date` field.
5. **project**: Columns that were not requested by the user are filtered out. In
   our case we requested all columns (by passing no params to `select()`) and
   therefore no columns are dropped.

The execution plan described above can be improved (in terms of performance), by
eliminating the need for a full table scan of the `HistoricalData` table. This
can be done by modifying the schema to create an index on the
`HistoricalData#Stock` column. Go ahead and modify the
`LovefieldService#buildSchema()` method by adding the proposed index.  If you
get stuck, you can take a look at [Lovefield's "Quick Start"](
https://github.com/google/lovefield/blob/master/demos/todo/README.md)
for an example schema definition that uses an index.

Once done reload the app and re-examine the execution plan. It should now look
as follows.

```
project()
-order_by(HistoricalData.Date ASC)
--select(value_pred(HistoricalData.Date between <value1>, <value2>))
---table_access_by_row_id(HistoricalData)
----index_range_scan(HistoricalData.idx_stock, [GOOG, GOOG], natural)
```

Notice how there is no `table_access` operation anymore and the first `select`
is also missing. Instead, an `index_range_scan` operation has shown up.
The database engine is utilizing the index we just added to retrieve only those
`HistoricalData` rows that correspond to the GOOG stock, eliminating the need
for for a full table scan, followed by a filtering of rows that don't correspond
to the given stock. Optimizations like this one can make a huge difference on a
real-world application.

# Step 6: Using parameterized queries
Parameterized queries are queries where placeholders are used for some values.
Before such a query can be executed all placeholders must be assigned a value.
Most modern database engines support this feature, although it might be
advertised using a different name (for example "prepared statements" or "query
templates").

The advantage of this approach is that under the covers the database engine will
*generate an execution plan only once and reuse it many times*. The overhead of
generating an execution plan can be significant for queries that are executed
multiple times.

In our application there are two queries that are executed multiple times with
different values each time and therefore they could be parameterized.
Specifically the queries that are executed in methods `getStockClosingPrices()`
and `getSectorClosingPrices()` are receiving three parameters each. Go ahead and

1. Take a look at [Lovefield's parameterized query API](
   https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#45-parameterized-query).
2. Modify those methods such that instead of creating a brand new query every on
   every invocation, they are using simply re-using an existing query template.

*Hints:*

1. Create the parametrized queries using the `lf.bind()` method to generate
   placeholders, within the `LovefieldService#onConnected_` method. You can
   simply copy the queries to be parameterized, and replace `start`, `end`,
   `stock` and `sector` with calls to `lf.bind()`.
2. Modify both `getStockClosingPrices()` and `getSectorClosingPrices()` to refer
   to the parametrized queries you just created (see example snippet below).

```
return this.myParameterizedQuery_.bind([value1, value2, ...]).exec();
```

Once done reload the app and ensure that both stock end sector search modes
still work.

# Step 7: Using query observers to update UI

## The basics
A query observer is a function that gets called whenever the results of a given
query are modified. Lovefield provides a very powerful DB observing mechanism
via the [db.observe()](
https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#46-observers)
method. In short, any SELECT query can be observed, such that every time the
results of that query are modified, observers get notified with a detailed list
of the changes that happened. The information that is passed to observers is
inspired by the [Array.observe() API](
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe).
The **two** most common scenarios triggering observers are listed below.

## Observer triggered by data modification
The database is modified by `UPDATE`, `INSERT` or `DELETE` queries. For example
consider the following snippet

```
var si = db.getSchema().getTable('StockInfo');
// Getting a list of all stocks (implemented at step 3 earlier).
var q = db.select(si.Stock).from(si);
db.observe(q, function(changes) { console.log(changes); });

var stockInfoRow = si.createRow({
  CompanyName: 'Toyota Motor Corp',
  Sector: 'Auto Manufacturers',
  Stock: 'TM'
});

// Inserting a new row into the StockInfo table, which will trigger the
// observer registered above.
db.insert().into(si).values([stockInfoRow]).exec();
```

It is worth noting that the observer is triggered *only* if the results of the
observed query are modified. Also the `changes` object passed to the
callback includes a detailed list of changes (additions/deletions).

## Observer triggered by parameterized query.
Query observers can be combined with parameterizable queries as shown below.

```
var si = db.getSchema().getTable('StockInfo');

// Find the name of a company given its stock code ('GOOG', 'TSLA' etc).
var q = db.
  select(si.CompanyName).
  from(si).
  where(si.Stock.eq(lf.bind(0)));

db.observe(q, function(changes) { console.log(changes); });

q.bind(['GOOG']).exec(); // Triggers the observer.
q.bind(['TSLA']).exec(); // Triggers the observer.
```

In the above example, even though no modification happened to the database, the
observer gets triggered because a parameter of the observed query was bound to
a different value (which causes the result of this query to be changed).

## Utilizing query observers to update the UI
In our example application we are already using two parameterized queries
(implemented at step 6), but the app is currently not using observers to update
the UI. In this exercise the app will be modified to use DB observers to update
the UI as the user is making different selections in the available drop down
lists. The instructions below will guide you through this process.

For this exercise two files need to be modified, `lovefield_service.js` and
`query_builder_controller.js`.

1. Implement the already provided stub methods  `observeStockClosingPrices` and
   `observeSectorClosingPrices` in `lovefield_service.js`.

   *Hint*: Use `db.observe()` method.
2. Implement the already provided stub method `startObserving_()` in
   `query_builder_controller.js`, such that it registers two observers (use the
   methods implemented at the previous instruction). Within each observer, call
   `updateStockGraph_` and `updateSectorGraph_` respectively.

   *Hint*: Given that we will be redrawing the entire graph from scratch, there
   is no need to deal with additions/deletions in the changes parameter that is
   passed to the observers. Simply grab the final result as
   ```var plotData = changes[0].object; // Similar to Array.observe.```
3. Inspect the `search()` method in query_builder_controller.js. You will notice
   that it calls `getStockClosingPrices` and `getSectorClosingPrices` from the
   `LovefieldService` class and once the results are available it explicitly
   makes a call to update the UI. This is no longer necessary since our
   observers will perform this task, therefore delete both occurrences of
   promise callbacks `then(...)`.
4. Final step is to call the `startObserving_()` method in the constructor of
   `QueryBuilderController`. Place this call right before the call to
   `getStockList()`.

Reload the app and start interacting with the UI. Everything should be working
as before, only this time query observers are utilized to update the UI.

*Performance note*: Registering DB observers imposes a cost on the overall
system, so in a real-world scenario observers that are not needed anymore
should be unregistered. For example we could unregister the "stock" observer
when in "sector" search mode, and re-register it when the user switches back to
"stock" mode. Similarly for the "sector" observer.

# Congratulations
Your web application is now successfully utilizing Lovefield as its data layer.

## What we've covered
1. Creating a database schema and opening a connection to the database.
2. Executing `INSERT` queries, explicit/implicit transactions.
3. Executing `SELECT` queries, specifying column filtering, simple and composite
   predicates, joining, grouping, sorting.
4. Inspecting the execution plan of a query. Debugging slow queries.
5. Parameterized queries (re-using queries by binding parameters to different
   values).
6. Observing queries (getting notified every time the results of a given query
   change).

## Next Steps
There are more useful Lovefield features that were not covered in this codelab.

- Using [aliases](
  https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#416-column-aliases)
  for tables and columns.
- Using [LIMIT and SKIP](
  https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#414-limiters-and-order)
  to retrieve only a subset of the results.
- Declaring [constraints](
  https://github.com/google/lovefield/blob/master/docs/spec/01_schema.md#132-constraints)
  (unique/non-unique, nullable/non-nullable).
- [Using MemoryDb](
  https://github.com/google/lovefield/blob/master/docs/spec/03_life_of_db.md#311-connect-options)
  instead of IndexedDb as the backing store (useful for testing, but also for
  cases where data persistence is not desired).
- [Executing UPDATE queries](
  https://github.com/google/lovefield/blob/master/docs/spec/04_query.md#43-update-query-builder)
  (updating specific columns while leaving other columns unaffected).
- [Performing schema upgrades](
  https://github.com/google/lovefield/blob/master/docs/spec/03_life_of_db.md#33-database-upgrade)
  (adding tables/columns/indices to existing databases).

If you would like to find out more about Lovefield please see the [full
developer documentation](https://github.com/google/lovefield/tree/master/docs/spec).
You can post questions/comments at our [public discussion
forum](https://groups.google.com/forum/#!forum/lovefield-users) and file bugs at
our [issue tracker](https://github.com/google/lovefield/issues).


Zatoun is a volunteer-run organization that provides much-needed marketing aid to olive farmers who have no other means of generating income. Zatoun brings together people of all faiths and traditions to work. A portion of the sale of Zatoun oil goes to support Trees for Life, a program with the aim of planting more than 20,000 olive tree saplings across the West Bank every year. Ten Thousand Villages is matching this donation so that $1.10 from every bottle sold in its stores goes to Trees for Life. An additional portion also supports Project Hope, an independent grassroots effort to bring the therapeutic benefit of the expressive arts – painting, drawing, music and drama – to children living in refugee camps.