text:
Search Results: SEC
SEC Sues Ripple and Executives in Connection With Ongoing Sales of XRP
Karen Ubell, Nick Losurdo, Grant P. Fondo, Mitzi Chang and Meghan Spillane
SEC, State Laws, Regulatory + Enforcement Actions
The SEC, in one of the Commission's final acts under the leadership of Chair Jay Clayton, approved enforcement action aimed at Ripple Labs, Inc. ("Ripple") and two of its executives, Brad Garlinghouse and Chris Larsen. The SEC filed its complaint on December 22, 2020 in the Southern District of New…
SEC to Permit Custody of Digital Asset Securities by "Special Purpose" Brokers
Nick Losurdo
Digital Assets, SEC, Uncategorized
Read our full Client Alert here. Christmas came early for many in the digital asset community by way of a statement from the U.S. Securities and Exchange Commission (SEC) on December 23, 2020 that grants relief in the area of broker "custody" of digital asset securities. The framework laid out by the…
December 23, 2020 Marks Jay Clayton's Final Day as SEC Chairman
Bitcoin, Blockchain, Digital Assets, Digital Currency, SEC
U.S. Securities and Exchange Commission (SEC) Chairman Jay Clayton announced that December 23, 2020 would be his last day at the helm of the agency. This leads to the likely outcome that SEC Commissioner Hester Peirce, or potentially Commissioner Elad Roisman, will serve as interim Chair until approximately January 20,…
SEC to Wyoming (Division of Banking): Interpreting Federal Securities Laws and Rules is our Domain
Nick Losurdo and Jana Steenholdt
Bitcoin, Blockchain, Digital Assets, Digital Currency, FINRA, SEC, State Laws, Regulatory + Enforcement Actions
In early November 2020, the staff of the U.S. Securities and Exchange Commission ("SEC") Division of Investment Management ("IM Division"), in consultation with the SEC's "FinHub" staff, issued a statement in response to a No-Action Letter from the Wyoming Division of Banking purporting to provide interpretive guidance on both Wyoming…
SEC Chairman Jay Clayton to Depart Agency By Year End
Bitcoin, Blockchain, Digital Assets, Digital Currency, Initial Coin Offerings, SEC, USDOJ
On Monday, November 16, 2020, SEC Chairman Jay Clayton announced his intention to depart from the agency by the end of 2020. News of Clayton's decision comes as no real surprise, as it is typical for the SEC Chair to hand the reigns to a successor around the time of…
SEC Announces Settlement with Unikrn, Peirce Issues Statement in Opposition
Meghan Spillane and Viktors M. Dindzans
Blockchain, Digital Assets, SEC, Tokens
On September 15, 2020, the SEC announced a settlement with Unikrn, Inc. ("Unikrn")—an online eSports gaming and gambling platform based in Washington State—in connection with the SEC's finding that Unikrn had conducted an unregistered offering of securities in violation of Sections 5(a) and 5(c) of the Securities Act. According to…
SEC Commissioner Peirce Not Skating Around Her Views on Telegram Settlement
Nick Losurdo and Karen Ubell
Bitcoin, Blockchain, Digital Assets, Enforcement Action, Initial Coin Offerings, Litigation, Regulatory Guidance, SEC, Tokens
Never one to hold back, especially when it comes to crypto and blockchain matters, SEC Commissioner Peirce recently explained her views on the SEC's settlement with Telegram and the agency's approach to regulating the crypto and blockchain ecosphere generally. Simply put, Peirce disagreed with the Telegram settlement. In her words:…
FINRA (Again) Encourages Members to Report Digital Asset Activities
Bitcoin, Blockchain, Digital Assets, Digital Currency, FINRA, Initial Coin Offerings, Regulatory Guidance, SEC, State Laws, Regulatory + Enforcement Actions, Tokens
U.S. broker-dealer activity involving digital assets could implicate various FINRA rules in addition to federal and state securities laws and SEC rules. As most readers likely know by now, whether this activity is of interest to or subject to the jurisdiction of U.S. securities regulators (both federal and state) largely…
Speaking at the International Blockchain Congress in Chicago on February 6, 2020, SEC Commissioner Hester Peirce proposed a safe harbor from U.S. securities laws so that developers of blockchain protocols could offer and sell tokens for the purpose of developing functioning token networks and creating liquidity for users. Commissioner Peirce's…


The government's response comes after Washington state and Minnesota obtained an emergency temporary restraining order Friday that halted implementation of President Trump's controversial travel ban on citizens from seven predominantly Muslim nations.
The Trump administration has asked the 9th Circuit Court of Appeals to reinstate its controversial ban on immigrants from seven mostly Muslim countries and on all refugees, arguing a Seattle judge exceeded his authority by issuing a nationwide injunction.
The administration contends that Trump was well within his authority when he issued the executive order last month, citing national security.
Department of Justice lawyers, in a 20-page brief, deny the president's order is religious based. It states that three of the countries — Iran, Sudan and Syria — have been determined by Congress or previous administrations to be state sponsors of terrorism, and four others — Libya, Somalia, Iraq and Yemen — provide a safe haven for terrorists or represent a heightened risk of terrorism.
The appeal is being considered by a panel of three 9th Circuit judges based in Phoenix, Honolulu and the Bay Area, according to the court's website. Oral arguments are set for 3 p.m. PST Tuesday.
Assistant 9th Circuit Court Executive David Madden said that the arguments will be live-streamed on the court's website: https://www.ca9.uscourts.gov.
The losing side will have the choice of asking for a rehearing before the three-judge panel, seeking a hearing before a larger "en banc" panel of at least 11 judges, or taking the decision straight to the U.S. Supreme Court, he said.
The government's response was filed Monday afternoon after the states of Washington and Minnesota obtained an emergency temporary restraining order on Friday from Seattle U.S. District Judge James Robart, halting implementation of Trump's Jan. 27 executive order.
Trump's order indefinitely blocked entry to the U.S. for Syrian refugees and temporarily suspended entry for refugees and travelers from the seven majority-Muslim countries. Those countries are associated with a "heightened risk of terrorism," the Department of Justice lawyers argued.
"Here, the state asks the courts to take the extraordinary step of second-guessing a formal national-security judgment made by the President himself," administration lawyers wrote.
The executive order unleashed chaos at airports and elsewhere as thousands of immigrants, many of whom had already been screened by immigration officials and issued visas, found themselves banned from entering the country. Protests sprang up at numerous airports, including Seattle-Tacoma International Airport, as families were separated and some traveling immigrants were put back on airplanes and ordered out of the country.
Justice Department lawyers filed an emergency appeal of the judge's order Saturday to the 9th Circuit, which is headquartered in San Francisco. A three-judge panel there refused to lift Robart's temporary order and set up an aggressive briefing schedule.
Washington Attorney General Bob Ferguson argued that reinstating the ban would again "unleash chaos" around the country. He argued that Trump's executive order is a thinly disguised effort by the president to fulfill a campaign promise to ban Muslims from coming to the U.S.
The state argued that a ban based on a religious litmus test would violate the Establishment Clause of the Constitution preventing the government from endorsing or discriminating against one religion over another.
The government maintains that the president alone has the power to decide who can enter or stay in the U.S.
Meantime, more than 100 technology companies, leading civil-liberties and immigrant-rights groups, 16 other state attorneys general and 10 former foreign-policy officials — including two former secretaries of state, Madeleine Albright and John Kerry — have lent their opposition to the Trump travel ban in amicus "friend of the court" pleadings.
They said Trump's ban would disrupt lives and cripple U.S. counterterrorism partnerships around the world.
"It will aid ISIL's [the Islamic State group's] propaganda effort and serve its recruitment message by feeding into the narrative that the United States is at war with Islam," according to the six-page declaration filed in court.
The single amicus brief supporting the ban came from nonprofit conservative groups, including the U.S. Justice Foundation, Citizens United Foundation, English First Foundation, Public Advocate of the United States, Gun Owners Foundation, Gun Owners of America, the conservative Legal Defense and Education Fund, U.S. Border Control Foundation and Policy Analysis Center.
Mike Carter: mcarter@seattletimes.com or 206-464-3706. Information from Seattle Times archives and The Associated Press is included in this story.


Over the weekend, AT&T agreed to buy satellite television provider DirecTV. The deal is worth about $50 billion.
NEW YORK (CNNMoney) — If approved by regulators, AT&T's $49 billion bid for DirecTV would be the fourth-biggest telecommunications merger in history. So everybody has an opinion about it.
Sunday's deal announcement stirred enthusiasm, opposition and above all else curiosity about what the combination of AT&T and DirecTV could look like. The House Judiciary Committee immediately said that it would hold a hearing to scrutinize the deal.
In the short term, the deal is unlikely to affect either company's customers. But the long term is another story.
AT&T — like its rivals Verizon and Comcast — clearly wants to sell bundles of broadband and television that deliver on the promise of anything/anytime/anywhere programming.
"While this transaction has some strategic merits, it appears more to be structured to enhance AT&T's financial position," Vijay Jayant of ISI Group said in a note to investors.
In a telephone interview on Sunday night, Moffett said he was struggling to find "greater meaning" in the deal.
"It's a huge transaction, but I think it's very unlikely to change the landscape of pay TV very much," he said.
DirecTV's largest shareholder, Warren Buffett's Berkshire Hathaway, seemed pleased by the deal.
"This is a terrific transaction for all involved: Enhanced choice for consumers coupled with increased value for both AT&T and DirecTV shareholders — a natural," said Berkshire investment managers Todd Combs and Ted Weschler in a joint statement. Berkshire also disclosed last week that it just acquired a stake in Verizon as well.
AT&T's bid for DirecTV — the No. 1 satellite TV provider in the United States — comes right on the heels of Comcast's bid for Time Warner Cable, which would join the No. 1 and No. 2 cable TV providers.
Comcast declined to comment on AT&T's announcement.
Senator Al Franken, a vocal opponent of the Comcast bid, said Monday on CNN's "New Day" that he is "very skeptical" about the DirecTV sale, as well.
Consolidation "usually leads to higher fees for consumers" and fewer choices, he said.
"The fewer players there are in the space, I believe the worse it is for consumers. And my constituents in Minneosta will be paying more for cable. This is a bad trend," Franken said.
The Senate Judiciary Committee will likely hold a similar hearing.
AT&T and DirecTV executives have expressed confidence that the deal will gain the necessary support in Washington.
Whether people want to sit back and watch live TV on a big screen, Netflix-style on a smart phone, or some other way that's still being dreamed up, AT&T wants to have a stake in it. Of course, other companies do too.
There's been an expectation that both both of the country's satellite providers, DirecTV and Dish Network, would either merge or be acquired by a third party. So AT&T's bid for DirecTV instantly raised questions about what Dish might do next.


Being on television was never one of Heather Priest's goals, but in 2010 the 34-year-old private chef found herself competing for $10,000 on Chopped, a Food Network show that pits four chefs against one another. The competition is divided into three rounds—appetizer, entrée and dessert—and the contestants are given a mystery basket of five ingredients to use in each one. The judges cut the contestant with the worst dish until only the winner is left. Priest won her episode with a dessert made from challah bread, almond butter, tamarind pods and delicata squash.
Reality television is sometimes criticized for making celebrities of people with no discernible talent other than the ability to get on TV. But this isn't true of cooking competitions like Chopped, Fox's Hell's Kitchen, or Bravo's Top Chef. These shows depend on a stream of talented—and sometimes eccentric—chefs ready to showcase their kitchen skills. Priest, who originally is from Stamping Ground, is one of a number of chefs with Kentucky roots who have shown up on national television cooking competitions. The list also includes Edward Lee, owner and executive chef at 610 Magnolia, a recent contestant on Top Chef Texas and a winner of Iron Chef America; Natalie Blake of the Beaumont Inn, a historic Harrodsburg bed and breakfast, who was on Hell's Kitchen; Lynn Winter, owner of Lynn's Paradise Café, who won a spatula-to-spatula competition on the Food Network's Throwdown! With Bobby Flay; and Chef Todd Richards, former executive chef at The Oakroom at The Seelbach Hotel, who also was on Iron Chef America and served as a judge on Throwdown! With Bobby Flay (the episode that Winter won).
Game shows and cooking shows are two of the oldest formats on television, so it shouldn't be surprising that a combination of the two is attractive to viewers. Five million people tune in each week to watch Gordon Ramsey torture the chefs in Hell's Kitchen. Another 2 million marvel at the stress-filled Quickfire Challenges on Bravo's Emmy Award-winning Top Chef.
Priest and Lee are friends who have done some catering jobs together in the New York area. In fact, it was Lee's relationship with the Food Network that led to Priest's appearance on Chopped. Lee, 39, grew up in Brooklyn, N.Y., where he started cooking by watching his grandmother. He began working in restaurants when he was a teenager. After receiving a degree in English literature from New York University, Lee decided his time was better spent in the kitchen than discussing the finer points of Henry James. With no formal culinary training, he set out to become one of the top chefs in the nation.
It was a visit to the Kentucky Derby that led Lee to relocate to Louisville. He was impressed by the high quality of the city's eclectic dining scene. Nearly eight years ago, Lee bought 610 Magnolia, which is housed in a beautiful Victorian home near Central Park in the Old Louisville neighborhood. The restaurant features an ever-changing menu based on the availability of organic ingredients in the Kentuckiana region. This farm-to-table approach landed Lee on the national culinary radar and led to appearances at the prestigious James Beard House in New York City. It was a feature in Gourmet magazine that convinced producers from Iron Chef America to invite Lee on the show in 2010.
Lee doesn't watch much television, but he was intrigued by the offer because Iron Chef America contestants must create three dishes using a secret ingredient. The producers provided him a list of three potential secret ingredients (blue cheese, tongues and cheeks, and a Hawaiian fish), but he didn't know which one they would pick until the day of the show. With only about a month to prepare for his kitchen battle, Lee and two assistants spent two Sundays experimenting with menus and practicing with a pressure cooker, which was something they did not use at 610 Magnolia.
When the time came for his appearance, Lee challenged the newest Iron Chef, Jose Garces of Tupilano's in New Jersey. The secret ingredient turned out to be tongues and cheeks, which was comforting to Lee because of his Korean heritage. He defeated Garces with a trio of dishes that included cow tongue Reuben, sauerkraut soup and duck tongue tempura.
It was a dream that didn't end for him or Priest. Because of his Iron Chef America victory, Lee developed a relationship with the Food Network. When one of the producers asked him to recommend a chef in the New York area for Chopped, he immediately thought of Priest. The Iron Chef appearance also led to Bravo contacting him about submitting an audition tape for Top Chef, which took place in Texas this season.
The experience of filming Top Chef was vastly different for Lee because in addition to competing in the kitchen, he had to live with the other contestants for six weeks. The living arrangements and constant cooking challenges caused mental fatigue and some strained nerves on the Top Chef set. But Lee said he is contractually prohibited from sharing any stories about what went on off camera between the chefs.
Priest is more outspoken about the heated competitiveness she experienced last year when she returned to the Food Network for the Chopped Champions Tournament. Paired against three other former winners, Priest was competing for a $50,000 prize, but what she really wanted to do was shut up a few of the other contestants.
Unfortunately, Priest was eliminated in the second round when the judges felt that her entrée, which was made with antelope, could have used a sauce. But her experience does point to the subjectivity of these cooking competitions and how television sometimes casts chefs as heroes or villains. Natalie Blake, who appeared on Hell's Kitchen, said she definitely felt there were some people on her show who cared more about the battle of wills and TV ratings than showing their cooking skills.
Blake, 24, is a graduate of Mercer County High School. She studied psychology at the University of Kentucky, but fell in love with the culinary arts when she started cooking for herself in her off-campus apartment. After leaving UK, she moved to Louisville to study at Sullivan University. Blake auditioned for Hell's Kitchen on a lark. It gave her an excuse to visit friends in Louisville on a weekend off from Beaumont Inn. The whole process involved two auditions and three interviews, with the last being in California, where the show is produced.
Initially, the contestants were split into teams by gender. Because the female team won so many challenges, Ramsey decided at one point to even things out by moving Blake to the men's team. In a particular episode, the blue team won a challenge and their reward was to take a trip on a luxury boat. Blake can be seen relaxing with her team in a hot tub. The men are drinking and flirting with the attractive blonde, but Blake says the clips were edited to make it look as if something more was happening. This caused some problems on and off camera.
Overall, Blake said her experience on Hell's Kitchen was rewarding. She got to spend time with one of the top chefs in the world, and it has changed the way she conducts herself in the kitchen. Blake said she learned a lot of classical French cooking techniques from Ramsey, and she uses more butter in her recipes because it worked so well on the show. By the way, she says Ramsey is not so overbearing off camera.
Blake's downfall came after a stressful night manning the fish station, but she says even that was overblown on television. On the show, viewers see restaurant patrons sending plate after plate of undercooked fish back to the kitchen. But Blake said in reality the plates came back as long as two hours after she had sent them to Ramsey for approval.
However, Blake, like Lee and Priest, feels the overall television experience was worthwhile. Priest now teaches culinary arts at a Connecticut high school, and she said her students get a kick out of television celebrity. The publicity from Top Chef Texas has increased the traffic at Lee's 610 Magnolia. And Blake said just being a contestant on Hell's Kitchen makes her a star in Harrodsburg.


text:
Nagorno-Karabakh ceasefire hopes sink as warring sides bicker and fight
By Nailia Bagirova, Nvard Hovhannisyan
BAKU/YEREVAN (Reuters) - Hopes of a humanitarian ceasefire ending fighting over Nagorno-Karabakh sank on Thursday as the death toll mounted and Armenia and Azerbaijan accused each other of launching new attacks.
Azerbaijan's president said his country's armed forces would take control of all regions surrounding the breakaway mountain territory if Armenia continued to "act negatively".
Armenia accused Azerbaijan's ally, Turkey, of not allowing aircraft carrying emergency aid to enter its airspace despite fears of a humanitarian disaster.
The ceasefire brokered by Russia last Saturday was intended to let the sides swap detainees and bodies of those killed. But it has had little impact on the fighting in and around Nagorno-Karabakh, which is internationally recognised as part of Azerbaijan but is populated and governed by ethnic Armenians.
(Graphic: Ethnic tensions in Nagorno-Karabakh, )
Several hundred people have been killed in the deadliest flare-up of the decades-old conflict since a 1990s war over Nagorno-Karabakh killed about 30,000 people.
Armenia's PM Pashinyan says Karabakh solution must be acceptable to all: RIA
Aliyev says he believes Nagorno-Karabakh conflict will be solved
The ceasefire's failure to end the fighting has stoked fears about the security of pipelines in Azerbaijan that carry natural gas and oil to international markets, and raised concerns that Turkey or Russia could be drawn into a wider conflict.
Aliyev said the peace process could begin only if Turkey were included in mediation talks, long driven by Russia, France and the United States.
"Turkey plays a role here and that is Turkey's right. It has been like that historically," Aliyev told Turkish broadcaster NTV.
He said he did not advocate a military solution but Azeri forces could take all of Nagorno-Karabakh's five major regions if Armenia did not set out a specific timeline to withdraw from the area. Around 40 settlements had already "been liberated from the occupiers", Aliyev added.
Armenian Prime Minister Nikol Pashinyan said his country was ready to implement ceasefire agreements but self-determination for Nagorno-Karabakh, which broke away from Azeri control as the Soviet Union collapsed, was a "red line" that could not be crossed.
The Russian and Turkish foreign ministers agreed by phone that a peaceful resolution was the only option, Russian news agency RIA reported.
MOUNTING DEATH TOLL
The authorities in Nagorno-Karabakh said 604 of the territory's defence personnel had been killed since Sept. 27.
Azerbaijan had on Wednesday put its civilian death toll at 43 and four more were killed and three wounded at a funeral in its Terter region when an artillery shell fell on a cemetery, the Azeri prosecutor-general's office said.
It said two civilians had also been wounded in shelling of the Aghdam area. Azerbaijan does not disclose military casualties.
The Armenian prosecutor-general's office said Azeri drones had killed two soldiers in the Vardenis region of Armenia on Wednesday, raising the Armenian military death toll so far to five. They were not involved in military action, it said.
Reuters could not independently verify the reports but a Reuters television crew witnessed shelling of Stepanakert, the main city in Nagorno-Karabakh.
Data this week showed Turkey's military exports to Azerbaijan have risen six-fold this year. Russia has a defence pact with Armenia.
(Graphic: Turkey's arms exports to Azerbaijan surge, )
The fighting, coming on top of the COVID-19 pandemic, could leave tens of thousands of people in need of aid over coming months, according to international organisations.
Zareh Sinanyan, Armenian High Commissioner for Diaspora Affairs, said the delivery of 100 tonnes of aid from the United States was being delayed as Turkey had prohibited Armenia-bound humanitarian aid flights over its airspace.
Armenia's civil aviation committee was told on Wednesday the Qatar Airways flight from Los Angeles was cancelled but gave no reasons, said the committee's head, Tatevik Revazyan.
Turkey's foreign ministry, which handles airspace issues, was not immediately available to comment.
Additional reporting by Margarita Antidze in Tbilisi; Tuvan Gumrukcu and Jonathan Spicer in Ankara; Polina Ivanova in Moscow; Writing by Sujata Rao; Editing by Timothy Heritage

redpajama_set_name: RedPajamaCommonCrawl


Return to the good 'ole days with the cartwrights of the ponderosa! enjoy pictures, stories, games, and plenty of links to more cartwright fun!
The great site for everything. one will got everything what he/she need in my site. let me prove it.
This is as best as it gets. all bizness has games, music, chatting, full movies, blogs, sports, and much more.
Ot is a movie appreciates website.but it is being constructed.and i hope you give me more support.


text:
MONSTER SQUAD
Here's another influential childhood fav. Over the years Monster Squad has gained a massive cult following with midnight screenings being held in various places... I'm proud to say that I was on board from the get go. As a kid this was about as good as it got. Director Fred Dekker's intention was to essentially make "The Little Rascals Meet The Universal Monsters" and thats a fair description. The result comes off as a movie that would get away with being The Goonies 2. The kids are the same age, they're in a club, both movies are named after said club and the characters from each movie pretty much parallel each other. The story has Dracula returning and resurrecting a posse of classic Universal monsters including the Wolfman, The Mummy, Gillman and Frankenstein. Searching for an emulate which will win him the battle of good vs evil, what Drac didn't count on was a local group of kids who specialise in monster-movie-trivia. Interestingly Universal Studios denied the rights to use their monsters in this movie and so fx artist Stan Winston modified each creature slightly as not to encroach on trademark and the effect adds a new quality to the characters. The movie is the ultimate scary kids movie and they should embrace it. Monster Squad shows kids that movie monsters are fun. Thinking back, perhaps this movie influenced my love of horror.... [for fellow geeks, the 2 disc dvd features an excellent 90 minute retrospective].


The global farming and agriculture sectors continue to face major challenges. Climatic and economic conditions and government regulations continue to present primary producers and suppliers with ongoing challenges. While there is little we can do about climatic conditions, Moore Stephens' member firms are active in the provision of specialist services to a broad range of clients in the agribusiness sector.
Increasing legislation & regulation, market demands and global competition mean that working methods have become more sophisticated, with highly specialized crop and livestock farming becoming the norm.
Farmers will need to show more resilience than ever and be prepared to adapt more quickly than ever before. Moore Stephens' member firms support a significant number of farming clients all over the world, helping them through the minefield of regulation and assisting them through inevitable change.
They deal with all of your accounting and taxation requirements and with the long-term planning and succession issues for farming businesses. There are many sector specific taxation rules and regulations and our team at Moore Stephens is well placed to deal with these as well.
We support a significant number of farming clients from all over the world, helping them through the miles of regulation and assisting them with inevitable change.


Megan Hazzard is the Director of Events for the Richmond Raceway Complex. Hazzard, who has served at the track for eight years, manages the overall business of the Richmond Raceway Complex. This includes the sales and operations of the Complex as well as coordinating with various other departments to develop the Complex's business. Hazzard also provides support on NASCAR race weekends.
Hazzard joined the organization in November 2008 as Complex Sales Executive. She was promoted to Senior Manager of Event Sales and Services in June 2014, was promoted to Director of Events in July 2017. Hazzard is a 2006 graduate of Clemson University in Clemson, South Carolina with a Bachelor's degree in Parks, Recreation, and Tourism Management and a minor in Business Administration with an emphasis in Event Planning. Upon graduation, she moved to Richmond, Virginia to join the Greater Richmond Convention Center as a Sales Manager.
Hazzard is an active member of ChamberRVA, Executive Women International and Meeting Professionals International – VA Chapter, coming off of a three-year board term as Director of Sponsorship and most recently Vice President of Education for MPI. Within International Speedway Corporation, she currently serves on the Business Development Committee alongside other counterparts across the company nationwide.


text:
package org.schemaspy;

import org.schemaspy.model.ConnectionFailure;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.Driver;
import java.util.*;

/**
 * @author Rafal Kasa on 2016-08-01.
 */
public class DbDriverLoader {

    private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

    private boolean loadJDBCJars = false;

    public Connection getConnection(Config config, String connectionURL,
                                       String driverClass, String driverPath) throws IOException {

        loadJDBCJars = config.isLoadJDBCJarsEnabled();

        Driver driver = getDriver(driverClass, driverPath);

        Properties connectionProperties = config.getConnectionProperties();
        if (config.getUser() != null) {
            connectionProperties.put("user", config.getUser());
        }
        if (config.getPassword() != null) {
            connectionProperties.put("password", config.getPassword());
        }

        Connection connection;
        try {
            connection = driver.connect(connectionURL, connectionProperties);
            if (connection == null) {
                System.err.println();
                System.err.println("Cannot connect to this database URL:");
                System.err.println("  " + connectionURL);
                System.err.println("with this driver:");
                System.err.println("  " + driverClass);
                throw new ConnectionFailure("Cannot connect to '" + connectionURL +"' with driver '" + driverClass + "'");
            }
        } catch (UnsatisfiedLinkError badPath) {
            System.err.println();
            System.err.println("Failed to load driver [" + driverClass + "] from classpath " + getExistingUrls(driverPath));
            System.err.println();
            System.err.println("Make sure the reported library (.dll/.lib/.so) from the following line can be");
            System.err.println("found by your PATH (or LIB*PATH) environment variable");
            System.err.println();
            badPath.printStackTrace();
            throw new ConnectionFailure(badPath);
        } catch (Exception exc) {
            System.err.println();
            System.err.println("Failed to connect to database URL [" + connectionURL + "]");
            System.err.println();
            exc.printStackTrace();
            throw new ConnectionFailure(exc);
        }

        return connection;
    }

    /**
     * Returns an instance of {@link Driver} specified by driverClass
     * loaded from driverPath.
     *
     * @param driverClass
     * @param driverPath
     * @return
     * @throws MalformedURLException
     */
    protected Driver getDriver(String driverClass, String driverPath) throws MalformedURLException {
        Set<URL> classpath = getExistingUrls(driverPath);
        if (classpath.isEmpty()) {
            URL url = getClass().getResource(driverPath);
            if (url != null) {
                classpath = getExistingUrls(url.getPath());
            }
        }

        //If this option is true additional jars used by JDBC Driver will be loaded to the classpath
        if (loadJDBCJars) {
            loadAdditionalJarsForDriver(driverPath, classpath);
        }

        ClassLoader loader = getDriverClassLoader(classpath);
        Driver driver;

        try {
            driver = (Driver)Class.forName(driverClass, true, loader).newInstance();

            // have to use deprecated method or we won't see messages generated by older drivers
            //java.sql.DriverManager.setLogStream(System.err);
        } catch (Exception exc) {
            System.err.println(exc); // people don't want to see a stack trace...
            System.err.println();
            System.err.print("Failed to load driver '" + driverClass + "'");
            if (classpath.isEmpty())
                System.err.println();
            else
                System.err.println(" from: " + classpath);

            List<File> invalidClasspathEntries = getMissingFiles(driverPath);
            if (!invalidClasspathEntries.isEmpty()) {
                if (invalidClasspathEntries.size() == 1)
                    System.err.print("This entry doesn't point to a valid file/directory: ");
                else
                    System.err.print("These entries don't point to valid files/directories: ");
                System.err.println(invalidClasspathEntries);
            }
            System.err.println();
            System.err.println("Use the -dp option to specify the location of the database");
            System.err.println("drivers for your database (usually in a .jar or .zip/.Z).");
            System.err.println();
            throw new ConnectionFailure(exc);
        }

        return driver;
    }

    private void loadAdditionalJarsForDriver(String driverPath, Set<URL> classpath) throws MalformedURLException {
        File driverFolder = new File(Paths.get(driverPath).getParent().toString());
        if (driverFolder != null) {
            File[] files = driverFolder.listFiles(
                    (dir, name) -> name.toLowerCase().matches(".*\\.?ar$")
            );

            LOGGER.info("Additional files will be loaded for JDBC Driver");

            if (files != null) {
                for (File file : files) {
                    if (file.isFile()) {
                        classpath.add(file.toURI().toURL());
                        LOGGER.info(file.toURI().toString());
                    }
                }
            }
        }
    }

    /**
     * Returns a {@link ClassLoader class loader} to use for resolving {@link Driver}s.
     *
     * @param classpath
     * @return
     */
    private ClassLoader getDriverClassLoader(Set<URL> classpath) {
        ClassLoader loader;

        // if a classpath has been specified then use it to find the driver,
        // otherwise use whatever was used to load this class.
        // thanks to Bruno Leonardo Gonalves for this implementation that he
        // used to resolve issues when running under Maven
        if (!classpath.isEmpty()) {
            loader = new URLClassLoader(classpath.toArray(new URL[classpath.size()]));
        } else {
            loader = getClass().getClassLoader();
        }

        return loader;
    }

    /**
     * Returns a list of {@link File}s in path that do not exist.
     * The intent is to aid in diagnosing invalid paths.
     *
     * @param path
     * @return
     */
    private List<File> getMissingFiles(String path) {
        List<File> missingFiles = new ArrayList<File>();

        String[] pieces = path.split(File.pathSeparator);
        for (String piece : pieces) {
            File file = new File(piece);
            if (!file.exists())
                missingFiles.add(file);
        }

        return missingFiles;
    }

    /**
     * Returns a list of {@link URL}s in path that point to files that
     * exist.
     *
     * @param path
     * @return
     * @throws MalformedURLException
     */
    private Set<URL> getExistingUrls(String path) throws MalformedURLException {
        Set<URL> existingUrls = new HashSet<>();

        String[] pieces = path.split(File.pathSeparator);
        for (String piece : pieces) {
            File file = new File(piece);
            if (file.exists())
                existingUrls.add(file.toURI().toURL());
        }

        return existingUrls;
    }
}

redpajama_set_name: RedPajamaGithub


Working with students starting in 4th grade and through college, STS seeks to break through the attitudes and substantive barriers â?? both personal and institutional â?? that often make it difficult for students from low-income families to succeed in school and pursue higher education.


Woven Theatre was started in 2016 by a trio of young directors yearning to create. Together they put on their first season, producing four projects in the span of three months. Unlike many theatre companies, Woven Theatre strayed away from the standard model involving a board of directors and instead created an Artistic Council. Being founded by three directors, the thought of an Artistic Director didn't seem to make sense. Woven Theatre wanted to be a collection of artists that came together to create and grow.
Young artists are hungry. They strive to be everywhere and do everything at once because opportunities are precious, and they fear passing them up. Woven Theatre gives them a chance to create art on nothing but that tenacity. Woven Theatre seeks to provide unique, artistic opportunities for young people to explore and find their artistic identity and tell the stories they are passionate about.
Woven Theatre is dedicated to the production and development of new art by young artists. We want to provide opportunities for young artist to continue to grow and develop in Nashville.