As we kick off the long weekend here in the US, there are a number of updates for YouTubers, Plussers, Webmasters and more. The biggest stories: Google Fi gets RCS, YouTube is cracking down on dangerous pranks, Google+-related services are winding down and there's a new platform for news organizations.
YouTube will be cracking down on dangerous pranks and challenges, resulting in Community Guidelines strikes (3 strikes in 90 days and you're out!). Not only does it include pranks that could cause serious danger or death, but also pranks that make victims believe they're in serious physical danger, or cause children to experience severe emotional distress. YouTube will also strengthening enforcement around custom thumbnails and external links that egregiously violate the Community Guidelines.
RIP Annotations: This week Annotations were removed from YouTube videos. They were replaced by Cards and End Screens in 2017, but existing Annotionations were not removed until now. Annotations were visible on the video itself, rather than behind a button the way Cards are, and they were often used creatively. The down side of Annotations was that they could be visually annoying, and - more importantly - were not visible on mobile devices. Cards aren't very creative, but they are visible everywhere you watch your video.
Also this week, YouTube "Shows" playlists were converted to regular playlists, and "Movies" become standard videos. These features were only available to a limited number of creators, and so probably won't impact most folks.
Google+ continues to update features aimed at business users. You can now embed Google+ Search result streams in the new Google Sites. The option to embed Google+ Profiles, Collections and Community Streams was introduced in July 2018.
While Google+ still hasn't provided any details about the shutdown process for consumer users, companies that provide services dependant on the Google+ API are removing Google+ support. While the Google+ API isn't shutting down until March 7th, Google did announce there will be intermittent failures starting January 28th. Buffer announced they will stop supporting Google+ on January 25th and HootSuite will remove support on January 28th.
The official Google+ Moderators Community became inactive on January 17th. Posts are still available for reading and commenting, but there will be no new members and no new posts. This follows the Google+ Aspire Community, which became inactive on January 10th.
Google Fi gets RCS: Last December, Google explained that one focus of their messaging service strategy is to "upgrade SMS so that people around the world can more easily enjoy group chats, share high-res photos, and get read receipts on any Android device" with "Rich Communication Services" or RCS in Android Messages. This requires both device manufacturers and mobile carriers to get on board. At the time it was noted with some irony that Google's own mobile service, Google Fi, didn't support RCS. Now, finally, Google Fi has RCS support. This is enabled automatically on "designed for Fi" phones, and can be enabled on other supported Android devices.
Extra Extra! Newspack by WordPress.com is a new platform for small and medium-sized digital news organizations backed by the Google News Initiative and a number of other news-supporting organizations. If you are a part of a news organization that is interested, submit an application at newspack.blog . If you have a news site now, and aren't looking for a new content management system, Google Webmasters has posted a number of tips for getting your content into Google News.
Have you wondered what the web might look like when the European Union's new copyright directives go into effect? Google has been testing news results with no headlines, snippets or images, apparently to see what compliance with Article 11 looks like. And YouTube has posted a mock-up of what it could look like under Article 13. If you are thinking a lot of blank spaces, you'd be right. And yes, I think Google is likely to redesign pages shown to European users in a way that both complies with the new rules, and emphasizes there is missing content.
Read on for more links, tips and updates for YouTube creators, webmasters, AdSense Publishers, GSuite administrators and more.
Image: Golden oranges and snow on Old Baldy, California. By Tichnor Brothers, Publisher - Boston Public Library Tichnor Brothers collection #63825, created between ~1930-1945, Public Domain.
Why this image? It's orange season in California, with the remaining Los Angeles county groves overlooked by a snowy Mount Baldy (real name: Mount San Antonio (although no one calls it that)).
January 28: There will start to be "intermittent failures" of the Google+ API. The Google+ API will be fully shut down March 7. The Google+ API lets external sites and apps connect to Google+.
Much needed and interesting news updates for online marketer. All are connected to internet, so daily updates required for bloggers. I daily visit nexter for daily updated news about whole world.


text:
package cass.pure.ioc.handlers;

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Set;

import cass.pure.ioc.AnnotationHandlingException;
import cass.pure.ioc.AutoWire;
import cass.pure.ioc.handlers.ConstructorFilter;
import cass.pure.ioc.handlers.ConstructorFilterChain;
import cass.pure.ioc.handlers.ParamAnnotationHandler;
import cass.pure.ioc.handlers.ParamHandlerChain;
import cass.pure.ioc.handlers.SetterAnnotationHandler;
import cass.pure.ioc.handlers.SetterHandlerChain;
import cass.pure.ioc.handlers.TempAnnotationHandlingException;
import cass.pure.ioc.handlers.TypeAnnotationHandler;
import cass.pure.ioc.handlers.TypeHandlerChain;

/**
 * Handles every kind of annotations.
 *
false/null/exception would be returned/thrown in order to end the HandlingChain.
 *
priority Double.MAX_VALUE
 * @author wkgcass
 *
 */
public class EmptyHandler implements SetterAnnotationHandler, ParamAnnotationHandler, TypeAnnotationHandler, ConstructorFilter {

	private static EmptyHandler inst=null;

	private EmptyHandler(){}

	public static EmptyHandler getInstance(){
		if(null==inst){
			synchronized(EmptyHandler.class){
				if(null==inst){
					inst=new EmptyHandler();
				}
			}
		}
		return inst;
	}

	@Override
	public boolean canHandle(Set<Annotation> annotations) {
		return true;
	}

	@Override
	public boolean handle(Object target, Method setter, Set<Annotation> toHandle,
			SetterHandlerChain chain) throws AnnotationHandlingException {
		if(AutoWire.DEBUG_MODE){
		System.out.println("EmptyHandler.handle (setter)"+setter);
		}
		return false;
	}

	@Override
	public double priority() {
		return Double.MAX_VALUE;
	}

	@Override
	public Object handle(Member caller, Class<?> cls, Annotation[] toHandle,
			ParamHandlerChain chain) throws AnnotationHandlingException {
		if(AutoWire.DEBUG_MODE){
		System.out.println("EmptyHandler.handle (param)"+cls);
		}
		throw new TempAnnotationHandlingException();
	}

	@Override
	public boolean canHandle(Annotation[] annotations) {
		return true;
	}

	@Override
	public Object handle(Class<?> cls, TypeHandlerChain chain)
			throws AnnotationHandlingException {
		if(AutoWire.DEBUG_MODE){
		System.out.println("EmptyHandler.handle (type)"+cls);
		}
		throw new TempAnnotationHandlingException();
	}

	@Override
	public Constructor<?> handle(Constructor<?>[] cons,
			ConstructorFilterChain chain) throws AnnotationHandlingException {
		if(AutoWire.DEBUG_MODE){
		System.out.println("EmptyHandler.handle (cons)"+Arrays.toString(cons));
		}
		return null;
	}

}

redpajama_set_name: RedPajamaGithub


» Ultraviolet region Ultraviolet region | Product Information | NIHON KESSHO KOGAKU CO., LTD.
Products corresponding to the wavelength of an ultraviolet region, such as calcium fluoride: VUV grade and UV grade, can be searched from here.
Please click here for information about VUV grade.
Please click here for information about UV grade.


text:
By Tom Johnston | 15th January 2021 | 2
After the festive season (such as it was this year) things tend to get a bit flat. It could be argued, therefore that this is not a time to be getting saucy. In the old Tom Cooks! column I did feature a game pie two or three years ago. This is a different version which…
By Tom Johnston | 29th December 2020 | 3
Tom's Food! will be celebrating its first birthday in a few short weeks. Now if you feel you've been reading my reviews and recipes for a lot longer, worry not. You're not in an early Alzheimer's stage (just yet). The very first review was written in October 2014 and the first recipe just over…
Star Baker Alison Read on before you write in to complain. I am aware that the traditionalists among you will have made your cake before the pandemic, and that you've been feeding it every week since. Well, best beloveds, the clue is in the title – Light. Sister in law Alison's husband started to suffer from…
By Tom Johnston | 4th December 2020 | 5
The game season is now in full swing. Probably my first exposure to game was in the form of pheasant, because that was the main thing shot at the in-laws in Perthshire. I've probably written before that the principal reason folk are leery of game is that they're not sure what to do with it.…
In Praise of Mash
By Tom Johnston | 26th November 2020 | 8
Now if you posed the question, mashed what, it proves how little you know me. In this divided age in which we live, a less magnanimous columnist might tell you to sling your hook: I, on the other hand, invite you to enter the fold and learn. The answer is, of course, potato. Yesterday was…
Children are cruel beasts. Many believe that William Golding called it right in Lord of the Flies. The ugly and the different are not well treated and are often misunderstood. So pity the poor monkfish. You may never have seen one: the average fishmonger simply stocks fillets on his shelves. As you will observe from…
Tom Cooks! Duck
Well, after Wednesday's D for Duck column I don't have much choice, do I? Many food writers say that duck and fruit go well together. Accordingly, I begin with raspberry. A big loud one to all of you who wrote in to say that I had misspelled Pekin and that it should have been Peking. Well,…
Beef Bourgignon
By Tom Johnston | 6th November 2020 | 7
On Wednesday we talked about cooking with wine, so there was only one candidate for today's Tom Cooks! Actually, there were two. It was a toss up between today's dish and coq au vin. Done correctly, both are very similar. And what else they have in common is that both can be done very simply…
Bill Kerr's Crab and Parmesan Risotto with Seared Scallop
By Tom Johnston | 30th October 2020 | 0
While I had the undivided attention of Bill Kerr, subject of this week's Chef Watch, I thought it would be criminal to let him away without extracting a recipe or two from him. He gave me a winter warmer of slow cooked beef shin with horseradish mash. I was reassured to see it was…
Tom's Frittata
By Tom Johnston | 23rd October 2020 | 2
After last week's article on Spanish tortilla it occurred to me that in the five years or so of this column eggs have rarely featured, which seems odd. They are, after all, the ultimate fast food. Here at Casa Johnston, they also form the basis for many types of comfort food. Can you beat an…
In Wednesday's On The Side, I promised you a Spanish classic. It doesn't get more typical than this. Go into any snack bar, or anywhere offering the most basic selection of tapas and you will find tortilla on the bill of fare. Confusingly, given the close links between Spain and Mexico, this has nothing whatever…
Two More Chocolate Goodies
By Tom Johnston | 8th October 2020 | 0
Last week's chocolate recipes turned out to be stunningly popular. Having made and sampled them both, I'm not surprised. Given the feedback, I thought you might like a couple more. Both of these come from the vast folder of recipes from the late lamented Let's Cook Scotland cookery school, run by the wonderful Sarah Mellersh,…
Chocolate Puddings: Not One but Two
By Tom Johnston | 1st October 2020 | 3
I couldn't tantalise you with Wednesday's On The Side column about the development of chocolate without bringing you something to get your teeth into. To make sure my own sweet shortcomings don't get in the way, I bring you offerings from two maestros, Sarah Mellersh and Lesley Johnston. Sarah Mellersh's Gooey Hot Chocolate Puddings This…
How To Cook a Grouse
By Tom Johnston | 25th September 2020 | 2
I've been cooking a fair bit of game lately, and regular readers will know that my favourite food suppliers of the moment are Castle Game Scotland in West Lothian. For feathered game, this is the time of year. The pheasant season starts on 1 October, and we have been able to enjoy grouse since the…
Tom Cooks With Tarragon
So what's unusual about that, I hear you ask? Well, for one, L is not fond of anything with a strong aniseedy flavour. Nor am I – Pernod, Pastis and the like are a big no no, and I have never visited Greece for fear of being force fed ouzo – but when the flavour…
Cooking with Castle Game – Venison Steaks and Wild Boar Sausages
This article is timed to coincide with Wednesday's On The Side column celebrating the delights of Castle Game Scotland. It features two dishes. The first is made using their wild boar sausages with Italian herbs, the second a great way to serve their venison leg steaks. Wild Boar Sausages with Green Lentils The lentils are a…
Vietnamese Fresh Spring Rolls with Nước Mắm
By Tom Johnston | 4th September 2020 | 1
Just over six months ago (though it now seems like half a lifetime) I was in Vietnam. Our holiday was organised around food, including visits to markets, food producers and, of course, cookery classes. We travelled up river from the ancient town of Hoi An to the Red Bridge Cooking School, where today's recipe comes…
National Cheesecake Day 30 July
By Tom Johnston | 30th July 2020 | 0
You could be forgiven for thinking that I keep a special note of these food days. No, I don't, nor do they appear automatically on my Outlook Calendar unlike sundry random dates. Good Friday and Easter Monday – fair enough; St Andrew's Day and St George's Day, hmm; but Trooping the Colour and the Battle…
Get Stuffed!
The title of today's column really should be Get Stuffing! That exhortation is less likely to get you a punch on the nose, but equally it is less attention grabbing. Today's recipe is inspired by a pork fillet which I bought at the butchers for this weekend. It's not the most exciting of meats, and can go…
Lesley Johnston's Shortbread – 3 Ways
It is a little known fact that my wife is a top class baker. Little known, because here at Casa Johnston we try not to eat sweet things, we don't do coffee mornings, and so far as I'm aware afternoon tea is not an event which has ever happened in this house in my time…
Pizza Takeaway Classics – Made at Home
By Tom Johnston | 9th July 2020 | 1
While we are hoping to see Scottish restaurants reopening soon, I predict that for many months to come the eating out experience will not be as we have known it. Having said that, this will be the last takeaway at home column for a while. Let's get out there and help the beleaguered restaurant sector…
Indian Takeaway Classics – Made at Home
By Tom Johnston | 3rd July 2020 | 4
Last week I gave you a couple of Chinese dishes which I reckoned you could do just as quickly and just as well at home. Indian* food is a different beast. As any of you who have tried it will know, many good curries benefit from a long slow cook. Indeed, I have seen lots…
Chinese Takeaway Classics – Made at Home
By Tom Johnston | 26th June 2020 | 2
As you may have gathered by now, I do not rush to embrace takeaway food, with or without a lockdown. In current times, there is no doubt that there is some fabulous food to be had out there, being produced by some of our top chefs; however, many are just sticking to their tried and…
Annie Gray's Boodle's Orange Fool and Chocolate Cake
In last week's On The Side column I reviewed Victory in the Kitchen by Annie Gray. My thanks to Annie, who has very kindly allowed me to reproduce a couple of the recipes which appeared in the book. These in turn came from notes left by Georgina Landemare, the subject of the biography. They have been updated by…
Search for: Any Category On The Side (46) Tom Cooks! (87)

redpajama_set_name: RedPajamaCommonCrawl


text:
package org.apache.hive.beeline;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.StringBufferInputStream;
import java.io.UnsupportedEncodingException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
import org.apache.hive.jdbc.Utils;
import org.apache.hive.jdbc.miniHS2.MiniHS2;
import org.apache.hive.jdbc.miniHS2.MiniHS2.MiniClusterType;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

/**
 * TestBeeLineWithArgs - executes tests of the command-line arguments to BeeLine
 *
 */
public class TestBeeLineWithArgs {
  private enum OutStream {
    ERR, OUT
  }

  // Default location of HiveServer2
  private static final String tableName = "TestBeelineTable1";
  private static final String tableComment = "Test table comment";
  private static MiniHS2 miniHS2;
  private static final String userName = System.getProperty("user.name");

  private List<String> getBaseArgs(String jdbcUrl) {
    List<String> argList = new ArrayList<>(8);
    argList.add("-d");
    argList.add(BeeLine.BEELINE_DEFAULT_JDBC_DRIVER);
    argList.add("-u");
    argList.add(jdbcUrl);
    argList.add("-n");
    argList.add(userName);
    return argList;
  }

  /**
   * Start up a local Hive Server 2 for these tests
   */
  @BeforeClass
  public static void preTests() throws Exception {
    HiveConf hiveConf = new HiveConf();
    hiveConf.setVar(HiveConf.ConfVars.HIVE_LOCK_MANAGER,
        "org.apache.hadoop.hive.ql.lockmgr.EmbeddedLockManager");
    hiveConf.setBoolVar(HiveConf.ConfVars.HIVEOPTIMIZEMETADATAQUERIES, false);
    hiveConf.set(ConfVars.HIVE_SERVER2_LOGGING_OPERATION_LEVEL.varname, "verbose");
    miniHS2 = new MiniHS2(hiveConf, MiniClusterType.TEZ);

    Map<String, String> confOverlay = new HashMap<String, String>();
    miniHS2.start(confOverlay);

    createTable();
  }

  /**
   * Create table for use by tests
   * @throws ClassNotFoundException
   * @throws SQLException
   */
  private static void createTable() throws ClassNotFoundException, SQLException {
    Class.forName(BeeLine.BEELINE_DEFAULT_JDBC_DRIVER);
    Connection con = DriverManager.getConnection(miniHS2.getBaseJdbcURL(),
        userName , "");

    assertNotNull("Connection is null", con);
    assertFalse("Connection should not be closed", con.isClosed());
    Statement stmt = con.createStatement();
    assertNotNull("Statement is null", stmt);

    stmt.execute("set hive.support.concurrency = false");

    HiveConf conf = new HiveConf();
    String dataFileDir = conf.get("test.data.files").replace('\\', '/')
        .replace("c:", "");
    Path dataFilePath = new Path(dataFileDir, "kv1.txt");
    // drop table. ignore error.
    try {
      stmt.execute("drop table " + tableName);
    } catch (Exception ex) {
      fail(ex.toString() + " " + ExceptionUtils.getStackTrace(ex));
    }

    // create table
    stmt.execute("create table " + tableName
        + " (under_col int comment 'the under column', value string) comment '"
        + tableComment + "'");

    // load data
    stmt.execute("load data local inpath '"
        + dataFilePath.toString() + "' into table " + tableName);
  }

  /**
   * Shut down a local Hive Server 2 for these tests
   */
  @AfterClass
  public static void postTests() {
    if (miniHS2.isStarted()) {
      miniHS2.stop();
    }
  }

  /**
   * Execute a script with "beeline -f or -i"
   * @param argList List of arguments for beeline
   * @param inputStream input stream if any
   * @param streamType if output from STDERR or STDOUT needs to be returned
   * @return The stderr and stdout from running the script
   * @throws Throwable
   */
  private static String testCommandLineScript(List<String> argList, InputStream inputStream,
      OutStream streamType)
      throws Throwable {
    BeeLine beeLine = new BeeLine();
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    PrintStream beelineOutputStream = new PrintStream(os);
    switch (streamType) {
    case OUT:
      beeLine.setOutputStream(beelineOutputStream);
      break;
    case ERR:
      beeLine.setErrorStream(beelineOutputStream);
      break;
    default:
      throw new RuntimeException("Unexpected outstream type " + streamType);
    }
    String[] args = argList.toArray(new String[argList.size()]);
    beeLine.begin(args, inputStream);
    String output = os.toString("UTF8");

    beeLine.close();
    return output;
  }

  /**
   * Attempt to execute a simple script file with the -f and -i option to
   * BeeLine to test for presence of an expected pattern in the output (stdout
   * or stderr), fail if not found. Print PASSED or FAILED
   *
   * @param expectedRegex
   *          Text to look for in command output (stdout)
   * @param shouldMatch
   *          true if the pattern should be found, false if it should not
   * @throws Exception
   *           on command execution error
   */
  private void testScriptFile(String scriptText, List<String> argList, String expectedRegex,
      boolean shouldMatch) throws Throwable {
    testScriptFile(scriptText, argList, OutStream.OUT,
        Collections.singletonList(new Tuple<>(expectedRegex, shouldMatch))
    );
  }

  /**
   * Attempt to execute a simple script file with the -f and -i option
   * to BeeLine to test for presence of an expected pattern
   * in the output (stdout or stderr), fail if not found.
   * Print PASSED or FAILED
   * @param argList arguments
   * @param outType output stream type
   * @param expectedRegex Text to look for in command output (stdout)
   * @param shouldMatch true if the pattern should be found, false if it should not
   * @throws Throwable
   */
  private void testScriptFile(String scriptText, List<String> argList, OutStream outType,
      String expectedRegex, boolean shouldMatch) throws Throwable {
    testScriptFile(scriptText, argList, outType,
        Collections.singletonList(new Tuple<>(expectedRegex, shouldMatch))
    );
  }

  private void testScriptFile(String scriptText, List<String> argList, OutStream streamType,
      List<Tuple<String>> expectedMatches) throws Throwable {
    testScriptFile(scriptText, argList, streamType, expectedMatches,
        Arrays.asList(Modes.values()));
  }

  /**
   * Attempt to execute a simple script file with the -f or -i option
   * to BeeLine (or both) to  test for presence of an expected pattern
   * in the output (stdout or stderr), fail if not found.
   * Print PASSED or FAILED
   * @param scriptText script to test the output for
   * @param argList arguments to be passed to the script file to execute and produce output
   * @param streamType Whether match should be done against STDERR or STDOUT
   * @param expectedMatches List of Tuple's defining the pattern to match and result of matching
   * @param modes testing modes we have to run the script as
   * @throws Exception on command execution error
   */
  private void testScriptFile(String scriptText, List<String> argList,
      OutStream streamType, List<Tuple<String>> expectedMatches, List<Modes> modes)
      throws Throwable {
    // Put the script content in a temp file
    File scriptFile = File.createTempFile(this.getClass().getSimpleName(), "temp");
    System.out.println("script file is " + scriptFile.getAbsolutePath());
    scriptFile.deleteOnExit();
    PrintStream os = new PrintStream(new FileOutputStream(scriptFile));
    os.print(scriptText);
    os.close();

    List<Tuple<Pattern>> patternsToBeMatched = Lists.transform(expectedMatches,
        new Function<Tuple<String>, Tuple<Pattern>>() {
          @Override
          public Tuple<Pattern> apply(Tuple<String> tuple) {
            return new Tuple<>(
                Pattern.compile(".*" + tuple.pattern + ".*", Pattern.DOTALL),
                tuple.shouldMatch
            );
          }
        });

    for (Modes mode : modes) {
      String output = mode.output(scriptFile, argList, streamType);
      for (Tuple<Pattern> patternToMatch : patternsToBeMatched) {
        Matcher m = patternToMatch.pattern.matcher(output);
        boolean matches = m.matches();
        if (patternToMatch.shouldMatch != matches) {
          //failed
          fail("Output" + output + " should" + (patternToMatch.shouldMatch ? "" : " not") +
              " contain " + patternToMatch.pattern.pattern());
        }
      }
    }
    scriptFile.delete();
  }

  /*
    We are testing for both type of modes always so not passing that as a parameter for now
  */
  enum Modes {
    INIT {
      @Override
      String output(File scriptFile, List<String> argList, OutStream streamType) throws Throwable {
        List<String> copy = new ArrayList<>(argList);
        copy.add("-i");
        copy.add(scriptFile.getAbsolutePath());
        return testCommandLineScript(copy, new StringBufferInputStream("!quit\n"), streamType);
      }
    }, SCRIPT {
      @Override
      String output(File scriptFile, List<String> argList, OutStream streamType) throws Throwable {
        List<String> copy = new ArrayList<>(argList);
        copy.add("-f");
        copy.add(scriptFile.getAbsolutePath());
        return testCommandLineScript(copy, null, streamType);
      }
    };

    abstract String output(File scriptFile, List<String> argList, OutStream streamType)
        throws Throwable;
  }

  /**
   * Attempt to execute the enclosed query with the -e option to BeeLine
   * Test for presence of an expected pattern
   * in the output (stdout or stderr), fail if not found
   * Print PASSED or FAILED
   * @param expectedPattern Text to look for in command output/error
   * @param shouldMatch true if the pattern should be found, false if it should not
   * @throws Exception on command execution error
   */

  private void testCommandEnclosedQuery(String enclosedQuery, String expectedPattern,
      boolean shouldMatch, List<String> argList, OutStream out) throws Throwable {

    List<String> copy = new ArrayList<String>(argList);
    copy.add("-e");
    copy.add(enclosedQuery);

    String output = testCommandLineScript(copy, null, out);
    boolean matches = output.contains(expectedPattern);
    if (shouldMatch != matches) {
      //failed
      fail("Output" + output + " should" +  (shouldMatch ? "" : " not") +
          " contain " + expectedPattern);
    }
  }

  /**
   * Test that BeeLine will read comment lines that start with whitespace
   * @throws Throwable
   */
  @Test
  public void testWhitespaceBeforeCommentScriptFile() throws Throwable {
    final String SCRIPT_TEXT = " 	 	-- comment has spaces and tabs before it\n 	 	# comment has spaces and tabs before it\n";
    final String EXPECTED_PATTERN = "cannot recognize input near '<EOF>'";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, false);
  }

  /**
   * Attempt to execute a simple script file with the -f option to BeeLine
   * Test for presence of an expected pattern
   * in the output (stdout or stderr), fail if not found
   * Print PASSED or FAILED
   */
  @Test
  public void testPositiveScriptFile() throws Throwable {
    final String SCRIPT_TEXT = "show databases;\n";
    final String EXPECTED_PATTERN = " default ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Fix to HIVE-10541: Beeline requires a newline at the end of each query in a file.
   * Otherwise, the last line of cmd in the script will be ignored.
   */
  @Test
  public void testLastLineCmdInScriptFile() throws Throwable {
    final String SCRIPT_TEXT = "show databases;\nshow tables;";
    final String EXPECTED_PATTERN = " testbeelinetable1 ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test Beeline -hivevar option. User can specify --hivevar name=value on Beeline command line.
   * In the script, user should be able to use it in the form of ${name}, which will be substituted with
   * the value.
   * @throws Throwable
   */
  @Test
  public void testBeelineHiveVariable() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--hivevar");
    argList.add("DUMMY_TBL=dummy");
    final String SCRIPT_TEXT = "create table ${DUMMY_TBL} (d int);\nshow tables;\n drop table  ${DUMMY_TBL};";
    final String EXPECTED_PATTERN = "dummy";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  @Test
  public void testBeelineHiveConfVariable() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--hiveconf");
    argList.add("test.hive.table.name=dummy");
    final String SCRIPT_TEXT = "create table ${hiveconf:test.hive.table.name} (d int);\nshow tables;\n"
        + " drop table ${hiveconf:test.hive.table.name};\n";
    final String EXPECTED_PATTERN = "dummy";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test Beeline -hivevar option. User can specify --hivevar name=value on Beeline command line.
   * This test defines multiple variables using repeated --hivevar or --hiveconf flags.
   * @throws Throwable
   */
  @Test
  public void testBeelineMultiHiveVariable() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--hivevar");
    argList.add("TABLE_NAME=dummy2");

    argList.add("--hiveconf");
    argList.add("COLUMN_NAME=d");

    argList.add("--hivevar");
    argList.add("COMMAND=create");
    argList.add("--hivevar");
    argList.add("OBJECT=table");

    argList.add("--hiveconf");
    argList.add("COLUMN_TYPE=int");

    final String SCRIPT_TEXT = "${COMMAND} ${OBJECT} ${TABLE_NAME} "
        + "(${hiveconf:COLUMN_NAME} ${hiveconf:COLUMN_TYPE});"
        + "\nshow tables;\n drop ${OBJECT} ${TABLE_NAME};\n";
    final String EXPECTED_PATTERN = "dummy2";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Attempt to execute a simple script file with the -f option to BeeLine
   * The first command should fail and the second command should not execute
   * Print PASSED or FAILED
   */
  @Test
  public void testBreakOnErrorScriptFile() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    final String SCRIPT_TEXT = "select * from abcdefg01;\nshow databases;\n";
    final String EXPECTED_PATTERN = " default ";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, false);
  }

  @Test
  public void testTabInScriptFile() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    final String SCRIPT_TEXT = "CREATE\tTABLE IF NOT EXISTS testTabInScriptFile\n(id\tint);\nSHOW TABLES;"
        + "\ndrop table testTabInScriptFile";
    final String EXPECTED_PATTERN = "testTabInScriptFile";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT, EXPECTED_PATTERN, false);
  }

  @Test
  public void testBeelineShellCommand() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    final String SCRIPT_TEXT = "!sh echo \"hello world.\" > hw.txt\n!sh cat hw.txt\n!rm hw.txt";
    final String EXPECTED_PATTERN = "hello world";

    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT,
        Collections.singletonList(new Tuple<>(EXPECTED_PATTERN, true)),
        Collections.singletonList(Modes.SCRIPT)
    );
  }

  /**
   * Select null from table , check how null is printed
   * Print PASSED or FAILED
   */
  @Test
  public void testNullDefault() throws Throwable {
    final String SCRIPT_TEXT = "set hive.support.concurrency = false;\n" +
        "select null from " + tableName + " limit 1 ;\n";
    final String EXPECTED_PATTERN = "NULL";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), EXPECTED_PATTERN, true);
  }

  /**
   * Select null from table , check if default null is printed differently
   * Print PASSED or FAILED
   */
  @Test
  public void testNullNonEmpty() throws Throwable {
    final String SCRIPT_TEXT = "set hive.support.concurrency = false;\n" +
        "!set nullemptystring false\n select null from " + tableName + " limit 1 ;\n";
    final String EXPECTED_PATTERN = "NULL";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), EXPECTED_PATTERN, true);
  }

  @Test
  public void testGetVariableValue() throws Throwable {
    final String SCRIPT_TEXT = "set env:TERM;";
    final String EXPECTED_PATTERN = "env:TERM";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), OutStream.ERR, EXPECTED_PATTERN, true);
  }

  /**
   * Select null from table , check if setting null to empty string works.
   * Original beeline/sqlline used to print nulls as empty strings.
   * Also test csv2 output format
   * Print PASSED or FAILED
   */
  @Test
  public void testNullEmpty() throws Throwable {
    final String SCRIPT_TEXT = "set hive.support.concurrency = false;\n" +
        "!set nullemptystring true\n select 'abc',null,'def' from " + tableName + " limit 1 ;\n";
    final String EXPECTED_PATTERN = "abc,,def";

    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=csv2");

    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test writing output using DSV format, with custom delimiter ";"
   */
  @Test
  public void testDSVOutput() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQuery();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=dsv");
    argList.add("--delimiterForDSV=;");

    final String EXPECTED_PATTERN = "1;NULL;defg;ab\"c;1.0";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test writing output using TSV (new) format
   */
  @Test
  public void testTSV2Output() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQuery();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv2");

    final String EXPECTED_PATTERN = "1\tNULL\tdefg\tab\"c\t1.0";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test writing output using TSV deprecated format
   */
  @Test
  public void testTSVOutput() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQuery();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv");

    final String EXPECTED_PATTERN = "'1'\t'NULL'\t'defg'\t'ab\"c\'\t'1.0'";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test writing output using new TSV format
   */
  @Test
  public void testTSV2OutputWithDoubleQuotes() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQueryForEableQuotes();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv2");
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV,"false");

    final String EXPECTED_PATTERN = "1\tNULL\tdefg\t\"ab\"\"c\"\t\"\"\"aa\"\"\"\t1.0";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "true");
  }

  /**
   * Test writing output using TSV deprecated format
   */
  @Test
  public void testTSVOutputWithDoubleQuotes() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQueryForEableQuotes();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv");
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "false");

    final String EXPECTED_PATTERN = "'1'\t'NULL'\t'defg'\t'ab\"c'\t'\"aa\"'\t'1.0'";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "true");
  }

  /**
   * Test writing output using new CSV format
   */
  @Test
  public void testCSV2OutputWithDoubleQuotes() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQueryForEableQuotes();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=csv2");
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "false");

    final String EXPECTED_PATTERN = "1,NULL,defg,\"ab\"\"c\",\"\"\"aa\"\"\",1.0";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "true");
  }

  /**
   * Test writing output using CSV deprecated format
   */
  @Test
  public void testCSVOutputWithDoubleQuotes() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQueryForEableQuotes();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=csv");
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "false");

    final String EXPECTED_PATTERN = "'1','NULL','defg','ab\"c','\"aa\"','1.0'";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "true");
  }

  /**
   * Test writing output using DSV format, with custom delimiter ";"
   */
  @Test
  public void testDSVOutputWithDoubleQuotes() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQueryForEableQuotes();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=dsv");
    argList.add("--delimiterForDSV=;");
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "false");

    final String EXPECTED_PATTERN = "1;NULL;defg;\"ab\"\"c\";\"\"\"aa\"\"\";1.0";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
    System.setProperty(SeparatedValuesOutputFormat.DISABLE_QUOTING_FOR_SV, "true");
  }

  /**
   * Test writing output using TSV deprecated format
   * Check for deprecation message
   */
  @Test
  public void testTSVOutputDeprecation() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQuery();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv");

    final String EXPECTED_PATTERN = "Format tsv is deprecated, please use tsv2";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
  }

  /**
   * Test writing output using CSV deprecated format
   * Check for deprecation message
   */
  @Test
  public void testCSVOutputDeprecation() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQuery();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=csv");

    final String EXPECTED_PATTERN = "Format csv is deprecated, please use csv2";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR,
        Collections.singletonList(new Tuple<>(EXPECTED_PATTERN, true)));
  }

  /**
   * Test writing output using CSV deprecated format
   */
  @Test
  public void testCSVOutput() throws Throwable {
    String SCRIPT_TEXT = getFormatTestQuery();
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=csv");
    final String EXPECTED_PATTERN = "'1','NULL','defg','ab\"c\','1.0'";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  private String getFormatTestQuery() {
    return "set hive.support.concurrency = false;\n" +
        "select 1, null, 'defg', 'ab\"c', 1.0D from " + tableName + " limit 1 ;\n";
  }

  private String getFormatTestQueryForEableQuotes() {
    return "set hive.support.concurrency = false;\n" +
        "select 1, null, 'defg', 'ab\"c', '\"aa\"', 1.0D from " + tableName + " limit 1 ;\n";
  }

  /**
   * Select null from table , check if setting null to empty string works - Using beeling cmd line
   *  argument.
   * Original beeline/sqlline used to print nulls as empty strings
   * Print PASSED or FAILED
   */
  @Test
  public void testNullEmptyCmdArg() throws Throwable {
    final String SCRIPT_TEXT = "set hive.support.concurrency = false;\n" +
        "select 'abc',null,'def' from " + tableName + " limit 1 ;\n";
    final String EXPECTED_PATTERN = "'abc','','def'";

    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--nullemptystring=true");
    argList.add("--outputformat=csv");

    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Attempt to execute a missing script file with the -f option to BeeLine
   */
  @Test
  public void testNegativeScriptFile() throws Throwable {
    final String EXPECTED_PATTERN = " default ";

    // Create and delete a temp file
    File scriptFile = File.createTempFile("beelinenegative", "temp");
    scriptFile.delete();

    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("-f");
    argList.add(scriptFile.getAbsolutePath());

    try {
      String output = testCommandLineScript(argList, null, OutStream.OUT);
      if (output.contains(EXPECTED_PATTERN)) {
        fail("Output: " + output +  " Negative pattern: " + EXPECTED_PATTERN);
      }
    } catch (Throwable e) {
      e.printStackTrace();
      throw e;
    }
  }

  /**
   * HIVE-4566
   * @throws UnsupportedEncodingException
   */
  @Test
  public void testNPE() throws UnsupportedEncodingException {
    BeeLine beeLine = new BeeLine();

    ByteArrayOutputStream os = new ByteArrayOutputStream();
    PrintStream beelineOutputStream = new PrintStream(os);
    beeLine.setOutputStream(beelineOutputStream);
    beeLine.setErrorStream(beelineOutputStream);

    beeLine.runCommands( new String[] {"!typeinfo"} );
    String output = os.toString("UTF8");
    Assert.assertFalse( output.contains("java.lang.NullPointerException") );
    assertTrue(output.contains("No current connection"));

    beeLine.runCommands( new String[] {"!nativesql"} );
    output = os.toString("UTF8");
    Assert.assertFalse( output.contains("java.lang.NullPointerException") );
    assertTrue(output.contains("No current connection"));

    System.out.println(">>> PASSED " + "testNPE" );
  }

  @Test
  public void testHiveVarSubstitution() throws Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL() + "#D_TBL=dummy_t");
    final String SCRIPT_TEXT = "create table ${D_TBL} (d int);\nshow tables;\ndrop  table ${D_TBL};\n";
    final String EXPECTED_PATTERN = "dummy_t";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  @Test
  public void testEmbeddedBeelineConnection() throws Throwable{
    String embeddedJdbcURL = Utils.URL_PREFIX+"/Default";
    List<String> argList = getBaseArgs(embeddedJdbcURL);
    argList.add("--hivevar");
    argList.add("DUMMY_TBL=embedded_table");
    // Set to non-zk lock manager to avoid trying to connect to zookeeper
    final String SCRIPT_TEXT =
        "set hive.lock.manager=org.apache.hadoop.hive.ql.lockmgr.EmbeddedLockManager;\n" +
            "create table ${DUMMY_TBL} (d int);\nshow tables;\n drop table ${DUMMY_TBL};\n";
    final String EXPECTED_PATTERN = "embedded_table";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test Beeline could show the query progress for time-consuming query.
   * @throws Throwable
   */
  @Ignore("HIVE-19509: Disable tests that are failing continuously")
  @Test
  public void testQueryProgress() throws Throwable {
    final String SCRIPT_TEXT =
        "set hive.support.concurrency = false;\n"
            + "set hive.server2.logging.operation.level=execution;\n"
            + "select count(*) from " + tableName + ";\n";
    // Check for part of log message as well as part of progress information
    final String EXPECTED_PATTERN = "ELAPSED TIME";
    final String UNEXPECTED_PATTERN = "(?=Reducer 2\\:).*(?=Map 1\\:)";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), OutStream.ERR,
        Arrays.asList(
            new Tuple<>(EXPECTED_PATTERN, true),
            new Tuple<>(UNEXPECTED_PATTERN, false)
        )
    );
  }

  /**
   * Test Beeline could show the query progress for time-consuming query when hive.exec.parallel
   * is true
   *
   * We have changed the pattern to not look of the progress bar as the test runs fine individually
   * and also as part of the whole class, on CI however they are batched and that might have caused
   * some issue, it needs more investigation for the same
   *
   * @throws Throwable
   */
  @Ignore("HIVE-19509: Disable tests that are failing continuously")
  @Test
  public void testQueryProgressParallel() throws Throwable {
    final String SCRIPT_TEXT = "set hive.support.concurrency = false;\n" +
        "set hive.exec.parallel = true;\n" +
        "select count(*) from " + tableName + ";\n";
    // Check for part of log message as well as part of progress information
    final String EXPECTED_PATTERN = "Number of reducers determined to be.";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), OutStream.ERR,
        EXPECTED_PATTERN, true
    );
  }

  /**
   * Test Beeline will hide the query progress when silent option is set.
   * @throws Throwable
   */
  @Test
  public void testQueryProgressHidden() throws Throwable {
    final String SCRIPT_TEXT = "set hive.support.concurrency = false;\n" +
        "!set silent true\n" +
        "select count(*) from " + tableName + ";\n";
    final String EXPECTED_PATTERN = "Executing command";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), OutStream.ERR,
        EXPECTED_PATTERN, false);
  }

  @Test
  public void testQueryProgressWithHiveServer2ProgressBarDisabled()
      throws Throwable {
    final String SCRIPT_TEXT =
        "set hive.support.concurrency = false;\nset hive.server2.in.place.progress=false;\n" +
            "select count(*) from " + tableName + ";\n";
    // Check for part of log message as well as part of progress information
    final String EXPECTED_PATTERN = "(?=Reducer 2\\:).*(?=Map 1\\:)";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), OutStream.ERR,
        Arrays.asList(
            new Tuple<>(EXPECTED_PATTERN, true),
            new Tuple<>("ELAPSED TIME", false))
    );
  }

  @Test
  public void testMultiCommandsInOneline() throws Throwable {
    final String SCRIPT_TEXT = "drop table if exists multiCmdTbl;create table multiCmdTbl "
        +"(key int);show tables; --multicommands in one line";
    final String EXPECTED_PATTERN = " multicmdtbl ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);

    final String SCRIPT_TEXT_DROP = "drop table multiCmdTbl;show tables;";
    testScriptFile(SCRIPT_TEXT_DROP, argList, EXPECTED_PATTERN, false);
  }

  @Test
  public void testMultiCommandsInOneEnclosedQuery() throws Throwable {
    final String QUERY_TEXT = "drop table if exists multiCmdTbl;create table multiCmdTbl "
        +"(key int);show tables; --multicommands in one line";
    final String EXPECTED_PATTERN = " multicmdtbl ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testCommandEnclosedQuery(QUERY_TEXT, EXPECTED_PATTERN, true, argList, OutStream.OUT);

    final String QUERY_TEXT_DROP = "drop table multiCmdTbl;show tables;";
    testCommandEnclosedQuery(QUERY_TEXT_DROP, EXPECTED_PATTERN, false, argList, OutStream.OUT);
  }

  @Test
  public void testOneCommandInMultiLines() throws Throwable {
    final String SCRIPT_TEXT = "drop table if exists multiCmdTbl;create table \nmultiCmdTbl "
        + "(key int);show tables; --one command in multiple lines";
    final String EXPECTED_PATTERN = " multicmdtbl ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);

    final String SCRIPT_TEXT_DROP = "drop table\nmultiCmdTbl;show tables;";
    testScriptFile(SCRIPT_TEXT_DROP, argList, EXPECTED_PATTERN, false);
  }

  @Test
  public void testEscapeSemiColonInQueries() throws Throwable {
    final String SCRIPT_TEXT = "drop table if exists multiCmdTbl;create table multiCmdTbl "
        + "(key int, value string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\\;' LINES "
        + " TERMINATED BY '\\n';show tables; --one command in multiple lines";
    final String EXPECTED_PATTERN = " multicmdtbl ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);

    final String SCRIPT_TEXT_DROP = "drop table\nmultiCmdTbl;show tables;";
    testScriptFile(SCRIPT_TEXT_DROP, argList, EXPECTED_PATTERN, false);
  }

  @Test
  public void testEscapeSemiColonInEnclosedQuery() throws Throwable {
    final String QUERY_TEXT = "drop table if exists multiCmdTbl;create table multiCmdTbl "
        + "(key int, value string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\\;' LINES "
        + " TERMINATED BY '\\n';show tables;";
    final String EXPECTED_PATTERN = " multicmdtbl ";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testCommandEnclosedQuery(QUERY_TEXT, EXPECTED_PATTERN, true, argList, OutStream.OUT);

    final String QUERY_TEXT_DROP = "drop table multiCmdTbl;show tables;";
    testCommandEnclosedQuery(QUERY_TEXT_DROP, EXPECTED_PATTERN, false, argList, OutStream.OUT);
  }

  @Test
  public void testEmbeddedBeelineOutputs() throws Throwable{
    String embeddedJdbcURL = Utils.URL_PREFIX+"/Default";
    List<String> argList = getBaseArgs(embeddedJdbcURL);
    // Set to non-zk lock manager to avoid trying to connect to zookeeper
    final String SCRIPT_TEXT = "set hive.lock.manager=org.apache.hadoop.hive.ql.lockmgr.EmbeddedLockManager;\n"
        + "set hive.compute.query.using.stats=false;\n"
        + "create table if not exists embeddedBeelineOutputs(d int);\n"
        + "set a=1;\nselect count(*) from embeddedBeelineOutputs;\n"
        + "drop table embeddedBeelineOutputs;\n";
    final String EXPECTED_PATTERN = "Stage-1 map =";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
  }

  @Test
  public void testConnectionUrlWithSemiColon() throws Throwable{
    List<String> argList = getBaseArgs(miniHS2.getJdbcURL("default", "sess_var_list?var1=value1"));
    final String SCRIPT_TEXT = "set var1";
    final String EXPECTED_PATTERN = "var1=value1";
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test Beeline !connect with beeline saved vars
   * @throws Throwable
   */
  @Test
  public void testBeelineConnectEnvVar() throws Throwable {
    final String jdbcUrl = miniHS2.getBaseJdbcURL();
    List<String> argList = new ArrayList<>();
    argList.add("-u");
    argList.add("blue");
    argList.add("-d");
    argList.add(BeeLine.BEELINE_DEFAULT_JDBC_DRIVER);

    final String SCRIPT_TEXT =
        "create table blueconnecttest (d int);\nshow tables;\ndrop table blueconnecttest;\n";
    final String EXPECTED_PATTERN = "blueconnecttest";

    // We go through these hijinxes because java considers System.getEnv
    // to be read-only, and offers no way to set an env var from within
    // a process, only for processes that we sub-spawn.

    final BeeLineOpts.Env baseEnv = BeeLineOpts.getEnv();
    BeeLineOpts.Env newEnv = new BeeLineOpts.Env() {
      @Override
      public String get(String envVar) {
        if (envVar.equalsIgnoreCase("BEELINE_URL_BLUE")){
          return jdbcUrl;
        } else {
          return baseEnv.get(envVar);
        }
      }
    };
    BeeLineOpts.setEnv(newEnv);

    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT,
        Collections.singletonList(new Tuple<>(EXPECTED_PATTERN, true)),
        Collections.singletonList(Modes.SCRIPT));
  }

  /**
   * Test that if we !close, we can still !reconnect
   * @throws Throwable
   */
  @Test
  public void testBeelineReconnect() throws  Throwable {
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    final String SCRIPT_TEXT =
        "!close\n" +
            "!reconnect\n\n\n" +
            "create table reconnecttest (d int);\nshow tables;\ndrop table reconnecttest;\n";
    final String EXPECTED_PATTERN = "reconnecttest";

    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT,
        Collections.singletonList(new Tuple<>(EXPECTED_PATTERN, true)),
        Collections.singletonList(Modes.SCRIPT));

  }

  /**
   * Attempt to execute a simple script file with the usage of user & password variables in URL.
   * Test for presence of an expected pattern
   * in the output (stdout or stderr), fail if not found
   * Print PASSED or FAILED
   */
  @Test
  public void testConnectionWithURLParams() throws Throwable {
    final String EXPECTED_PATTERN = " hivetest ";
    List<String> argList = new ArrayList<>();
    argList.add("-d");
    argList.add(BeeLine.BEELINE_DEFAULT_JDBC_DRIVER);
    argList.add("-u");
    argList.add(miniHS2.getBaseJdbcURL() + ";user=hivetest;password=hive");
    String SCRIPT_TEXT = "select current_user();";

    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test that Beeline queries don't treat semicolons inside quotations as query-ending characters.
   */
  @Test
  public void testQueryNonEscapedSemiColon() throws Throwable {
    String SCRIPT_TEXT = "drop table if exists nonEscapedSemiColon;create table nonEscapedSemiColon "
        + "(key int, value int) ROW FORMAT DELIMITED FIELDS TERMINATED BY ';';show tables;";
    String EXPECTED_PATTERN = "nonescapedsemicolon";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
    //look for the " nonEscapedSemiColon " in the query text not the table name which comes
    //in the result
    EXPECTED_PATTERN = " nonEscapedSemiColon ";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT, EXPECTED_PATTERN, false);
  }

  @Test
  public void testSelectQueryWithNonEscapedSemiColon() throws Throwable {
    String SCRIPT_TEXT = "select ';', \"';'\", '\";\"', '\\';', ';\\'', '\\\";', ';\\\"' from " + tableName + ";";
    final String EXPECTED_PATTERN = ";\t';'\t\";\"\t';\t;'\t\";\t;\"";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv2");
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Attempt to execute a simple script file with the usage of user & password variables in URL.
   * Test for presence of an expected pattern
   * in the output (stdout or stderr), fail if not found
   * Print PASSED or FAILED
   */
  @Test
  public void testShowDbInPrompt() throws Throwable {
    final String EXPECTED_PATTERN = " \\(default\\)>";
    List<String> argList = new ArrayList<>();
    argList.add("--showDbInPrompt");
    argList.add("-u");
    argList.add(miniHS2.getBaseJdbcURL() + ";user=hivetest;password=hive");
    String SCRIPT_TEXT = "select current_user();";

    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
  }

  @Test
  public void testBeelineShellCommandWithoutConn() throws Throwable {
    List<String> argList = new ArrayList<>();
    final String SCRIPT_TEXT = "!sh echo hello world";
    final String EXPECTED_PATTERN = "hello world";
    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT,
        Collections.singletonList(new Tuple<>(EXPECTED_PATTERN, true)),
        Collections.singletonList(Modes.SCRIPT));
  }

  /**
   * Attempt to execute Beeline with force option to continue running script even after errors.
   * Test for presence of an expected pattern to match the output of a valid command at the end.
   */
  @Test
  public void testBeelineWithForce() throws Throwable {
    final String SCRIPT_TEXT = "drop table does_not_exist;\ncreate table incomplete_syntax(a, string, );\n "
        + "drop table if exists new_table;\n create table new_table(foo int, bar string);\n "
        + "desc new_table;\n";
    final String EXPECTED_PATTERN = "2 rows selected";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--force");
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
  }

  @Test
  public void testBeelineWithSilentAndReport() throws Throwable {
    final String SCRIPT_TEXT = "drop table if exists new_table;\n create table new_table(foo int, bar string);\n "
        + "desc new_table;\n";
    final String EXPECTED_PATTERN = "2 rows selected";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--silent=true");
    argList.add("--report=true");
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
  }

  @Test
  public void testBeelineWithSilent() throws Throwable {
    final String SCRIPT_TEXT = "drop table if exists new_table;\n create table new_table(foo int, bar string);\n "
        + "desc new_table;\n";
    final String EXPECTED_PATTERN = "2 rows selected";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--silent=true");
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, false);
  }

  private static class Tuple<K> {
    final K pattern;
    final boolean shouldMatch;

    Tuple(K pattern, boolean shouldMatch) {
      this.pattern = pattern;
      this.shouldMatch = shouldMatch;
    }
  }

  /**
   * Test that Beeline can handle \\ characters within a string literal. Either at the beginning, middle, or end of the
   * literal.
   */
  @Test
  public void testBackslashInLiteral() throws Throwable {
    String SCRIPT_TEXT = "select 'hello\\\\', '\\\\hello', 'hel\\\\lo', '\\\\' as literal;";
    final String EXPECTED_PATTERN = "hello\\\\\t\\\\hello\thel\\\\lo\t\\\\";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv2");
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  @Test
  public void testCustomDelimiter() throws Throwable {
    String SCRIPT_TEXT = "select 'hello', 'hello', 'hello'$";
    final String EXPECTED_PATTERN = "hello\thello\thello";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--delimiter=$");
    argList.add("--outputformat=tsv2");
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  @Test
  public void testCustomMultiCharDelimiter() throws Throwable {
    String SCRIPT_TEXT = "select 'hello', 'hello', 'hello'$$";
    final String EXPECTED_PATTERN = "hello\thello\thello";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--delimiter=$$");
    argList.add("--outputformat=tsv2");
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  @Test
  public void testCustomDelimiterWithMultiQuery() throws Throwable {
    String SCRIPT_TEXT = "select 'hello', 'hello', 'hello'$select 'world', 'world', 'world'$";
    final String EXPECTED_PATTERN1 = "hello\thello\thello";
    final String EXPECTED_PATTERN2 = "world\tworld\tworld";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--delimiter=$");
    argList.add("--outputformat=tsv2");
    List<Tuple<String>> expectedMatches = Arrays.asList(new Tuple<>(EXPECTED_PATTERN1, true),
            new Tuple<>(EXPECTED_PATTERN2, true));
    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT, expectedMatches);
  }

  @Test
  public void testCustomDelimiterBeelineCmd() throws Throwable {
    String SCRIPT_TEXT = "!delimiter $\n select 'hello', 'hello', 'hello'$";
    final String EXPECTED_PATTERN = "hello\thello\thello";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--outputformat=tsv2");
    testScriptFile(SCRIPT_TEXT, argList, EXPECTED_PATTERN, true);
  }

  /**
   * Test 'describe extended' on tables that have special white space characters in the row format.
   */
  @Test
  public void testDescribeExtended() throws Throwable {
    String SCRIPT_TEXT = "drop table if exists describeDelim;"
        + "create table describeDelim (orderid int, orderdate string, customerid int)"
        + " ROW FORMAT DELIMITED FIELDS terminated by '\\t' LINES terminated by '\\n';"
        + "describe extended describeDelim;";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    testScriptFile(SCRIPT_TEXT, argList, OutStream.OUT, Arrays.asList(
        new Tuple<>("Detailed Table Information.*line.delim=\\\\n", true),
        new Tuple<>("Detailed Table Information.*field.delim=\\\\t", true)));
  }
}


text:
Brooks Newmark and a light to lighten the genitals
Older men and younger women: now there's a subject I know something about.
First, let me declare an interest. I am an older man, metaphorically hurtling towards a BlankZero birthday, but I think I'm relatively safe in mixed company. And, by the way, I probably won't contemplate voting Liberal Democrat while Chris Rennard continues to enjoy the party whip in the Lords.
Of course, I'm nowhere near as ancient as the Methuselah Vince Cable, but I am the youthful Brooks Newmark's senior by about 0.35 of a decade.
I mention these two gents of the Commons political classes as they have both fallen foul of one of the oldest tricks of espionage and journalistic practice. It even has a name: honeytrap, defined by the Oxford dictionary as "a strategem in which an attractive person entices another person into revealing information or doing something unwise".
Dear old Vince, fairly newly installed in ministerial office in 2010, decided to show off to a couple of young women who came calling at one of his constituency surgeries. He strayed into heady political territory, mouthing off inappropriately - given his Cabinet responsibilities - about Rupert Murdoch, and of course the two young persons were really undercover reporters for the Telegraph, posing as supporters of Mr/Dr Cable's party, the Liberal Democrats.
There followed Vincesque wailing and gnashing of teeth. Moans were made about this and that Telegraph report to the Press Complaints Commission, and editorial knuckles were duly rapped.
Similar anguish about alleged press entrapment surrounds last weekend's (snigger, snigger) tale of Mr Newmark, who sent an online snap of his winky (qv), it is said framed by a fetching glimpse of his paisley pyjamas, to a "young woman" who was actually a male undercover (sic) reporter. The full tabloid exposé got an airing in the Sunday Mirror.
I got into a bit of a Twitter spat on Sunday with a Zoe Williams, of the Guardian, after I took issue with her piece suggesting that Mr Newmark should not have resigned his ministerial office for his action. I say "a", because I was as unfamiliar with her and her oeuvre as I'm certain she is of me and mine.
My own view is that Mr Newmark is now unfit even to be an MP on the ground that he is guilty, by his own admission, of an act of gross stupidity: "a complete fool". Of course, he also appeared to have undergone an irony bypass. He requested in a resignation statement that his privacy be respected.
Even people with the disadvantage of being Harvard-educated multimillionaire government ministers ought to be capable of exercising some judgement in answer to the question: "Is it OK for me, a married man with five children and with a brief in the Conservative Party for encouraging more women into Parliament through Women2Win, to send a picture of my schledium to a complete stranger?"
(My screen grab, above, of the organisation's website is from before Mr Newmark was semi-airbrushed out of its history. Then you saw him, now you don't. Although he still gets a text credit. Awww.)
Those of us who are often at the end, so to speak, of the journalistic production line need to have similar concerns as editorial lawyers about the likely provenance and veracity of copy. After us, stories are in the hand of the reader, the written-about and their lawyers.
Yes, some journalistic methods are underhand, but then so can be those of parliamentarians who, say, cook up expenses claims, incubate dodgy dossiers or take inappropriate advantage of their position.
Journalistic sting operations tend to be targeted and, whatever the protestations of the alleged victims and their apologists, often illuminate and amuse the rest of us while embarrassing the stung. I have no sympathy for senior politicians who display unacceptable naivety and get caught out.
The Newmark saga shows an imperfect, supposedly free, robust and knockabout press doing its work: keeping professional politicians with an apparently heightened sense of entitlement on their toes.
We should be grateful that stingers are often playful, investigative journalists who do care about accountable democracy in Britain and are not agents of hostile governments and groups.


Phew...I haven't spent enough time at my easel this week!
I had two more internet sales, and finally got round to insuring and mailing them today. These two are headed for Queensland.
Keep a look out over the weekend, a new painting should be posted for viewing and sale both here and on the net's trusted "selling & buying site".
"Mask Of Gratitude" Mixed Medium.


When looking for cryptocurrency WordPress themes, don't miss out on this round up of the top cryptocurrency and ICO WordPress themes. As the crypto space is perpetually heating up, more and more newbies want to become a part of crypto world. If you are just beginning your journey, these top-notch WP templates can come in handy to get a win-win scenario.
In fact, no matter what business niche you are in, thousands of beautiful WordPress themes can actually work to your advantage. It's not a secret that WordPress is an insanely powerful go-to tool that has a lot to offer. If you want to make a smart investment in your future website, go no further. Explore top cryptocurrency and ICO WordPress themes below.
Well, when picking out WordPress themes is not a bed of roses. With a myriad of beautiful solutions, it may be overwhelming. Do not dampen your spirits. We've got you covered. Check the round up below & pick the one that can work to your advantage.
Staying on top of cryptocurrency world is critical to succeeding in this business. Hence, getting to the decision for finding the top cryptocurrency and ICO WordPress themes depends a lot on your business strategies and goals. Take time to learn what comes included in each of these solutions. Say, with some must-have features like the responsive design and SEO optimization your future website can become one of the top rankers on the Google search.
Investing in premium cryptocurrency and ICO WordPress themes look like a sensible idea, isn't it? Enjoy it.
If you are just entering the crypto space and want to build a modern website, Hoverex is the theme to trust. Available in two languages, Hoverex is one of the top cryptocurrency and ICO WordPress themes to date. Besides, it's GDPR-compliant and Gutenberg-ready, so your site will be in line with the latest web design trends. Compatibility with WPBakery allows you to create new unique layouts on a fly. What's more, it allows you to provide plenty of financial information, including advanced crypto charts, tables & diagrams.
With Crypton, it's easy to build a user-friendly site & delve into the details of transactions that occur on the blockchains. Moreover, add some nice graphs on various statistics and even on ICOs, wallets, exchanges, and other crypto-related topics. Take advantage of some outstanding features like LearnPress and powerful WPBakery page builder. If you plan to actively trade, it's best to allow your visitors to see prices across several exchanges. Thanks to ThemeREX Donations included in the theme it's easy to receive payments or donations online.
Due to the highly technical nature of cryptocurrencies, it is important to build a user-friendly site for everyone. Moreover, your ICO website should serve as the main marketing and sales tool for your business. Designed to make your dreams a reality, Lymcoin fits cryptocurrency followers. Its modern and responsive design scales smoothly to all screen resolutions & devices. Indeed, thanks to WPBakery page builder it's easy to build new unique designs as per your taste. Explore an awful lot of amazing features that come included in Lymcoin right now.
You know, RexCoin is one of the top cryptocurrency and ICO WordPress themes that can't be missed. No matter what the purpose of your crypto-site, its second to none functionality can do wonders. Do not bother with coding, simply drag and drop design elements to where you need them. With the first and foremost purpose to inform visitors about your project, RexCoin has a lot to offer. Its clean, responsive layout that looks perfect no matter what type of device the visitor is on. Compatibility with popular plugins, ThemeREX Donations and tons of shortcodes can help make every page worth the visit.
If you want to convince the visitors to explore your site deeper, Monyxi is the theme to trust. With Monyxi, you can build a modern and fully-fledged website for crypto blog, cryptocoach, financial & ICO advisors and mining farms. Enjoy its beautiful pre-designed pages, a clean & responsive design and numerous advanced features. With Power Chart lite, you can create awesome charts to provide all the necessary information your visitors are looking for. With Monyxi, it can be easier to set your SEO-friendly project apart from the pack.
Still in doubt which WordPress theme to use for your next site? Put a stake in the ground. Get Kryptex at the drop of the hat. Apart from other top cryptocurrency and ICO WordPress themes, it supports WooCommerce & cryptocurrency All-in-One plugin. Thus, you can easily sell mining equipment online, display prices and exchange rates, as well as accept payments & donations. Make sure, your cryptocurrency site will look correctly on all last-generation devices & retina displays. Step right up, look how easy it is to use Kryptex to your advantage.
If you're interested in ICOs, then Crypterio can help get you started. This top-notch WP template fits ICO consulting and cryptocurrency service projects. Thus, it includes several pre-made content blocks, multiple ICO landing pages, and ready-to-use blog styles. Besides, with lots of pre-designed case study and service layouts, you can convince visitors to explore your site deeper. What's more, it supports multiple languages, offers 8+ header styles, visual WPBakery page builder and Virtual Coin widgets. And that's only the tip of the iceberg. Take time to explore Crypterio.
Want to keep up to date with all things cryptocurrency? Whatever the reason to build a cryptocurrency website, Poishax can be your first step in the crypto world. This modern solution is one of the top cryptocurrency and ICO WordPress themes that features unique style and a clean code. Besides, its multipurpose nature allows you to build a website for a digital currency, finances or bitcoin mining. Thanks to the powerful drag'n'drop page builder you can make every page of your site worth the visit. In addition, this SEO-friendly theme is compatible with WPML & Revolution Slider plugins.
If you want to make a smart investment, build a modern cryptocurrency website that stands out from the crowd. Well, it comes with 2 stunning homepage designs, multiple pre-designed pages and numerous handy elements. Besides, it's compatible with popular plugins that can help enhance the functionality of your site. Make sure your cryptocurrency site will adjust to all screen resolutions and modern browsers correctly. Take advantage of token Countdown feature to inform your visitors about all relevant sales.
Cryptic can become your go-to tool when it comes to building a modern cryptocurrency website from day one. Among thousand of cryptocurrency and ICO WordPress themes available out there, Cryptic can help make your site a place to stand out. Maximize the potential of your services with this SEO-friendly WP template right now. Besides, a myriad of useful functions and shortcodes come in handy when adding a professional touch to your site. If you want to learn more about Cryptic, check its live demo right now.
So, are you ready to make a pick? Anyway, with any of these top cryptocurrency and ICO WordPress themes, you can give your site leg up on the competition. Now, get straight to the matter.
The post 10 Best Cryptocurrency and ICO WordPress Themes appeared first on Best WordPress Themes Comparison.


MILWAUKEE, Wis. – Dixie Chopper chose to power its Zee 2 zero-turn mower with a 23 gross hp Briggs & Stratton commercial turf engine.
The Briggs and Stratton Commercial Turf engines are purpose-built to meet the harsh working environments zero-turn mowers are expected to work in every day. The engine line features a patented integrated cyclonic air filtration system that offers five steps of debris management to provide unprecedented dust and particle filtration.
The cyclonic air filtration system will withstand a maintenance interval of 250 hours under normal use, approximately two to three times longer than panel style air filters. Plus, its tool-less air-cleaner cover makes changing the air filter easier than ever.
The Zee 2 from Dixie Chopper is available in 42-, 48- or 54-inch cutting decks, and has an Elite Cutting System, triple-blade deck with high blade tip speeds and a 1.75-inch blade overlap that produces a high vacuum to leave a manicured cut on any grass variety in any condition.


Photo RED was selected as the Photo of the Day for Feb 06th 2019.
added a new photo Fly.
How big was your backdrop Harry and where did you order it?
Beautiful picture. I prefer no flash as well when I shoot unless I'd like little more define and harsh light.
I love the feel in this picture. Having a waiting list is always a good thing. Would you like to share your web site?
Hi Peter, where in Florida did you dive?
Romi Burianova is a visual artist, photographer & storyteller from the Czech Republic. Romi has lived and worked in the U.S. for just over a decade, and calls Florida home for most of the year. Photography, fashion, and travel are her inspirations and she has been fortunate to voyage to many parts of the world and capture beautiful moments with her camera.
Romi is passionate about her work, loves creative lighting and artistic post production. Romi is enthralled by the scenes and events that can occur unnoticed, observing the observer, places we may pass by, and decisive moments in our lives. Specializing in underwater fine art, underwater portraits and fashion photography.
Romi worked as a Head Photographer for a documentary " Little Fireman "


We close on Sundays from now on but we will remain open on Mother's Day and Father's Day.
Now you can order food online for takeout from Osaka Japanese Restaurant in Gallatin, TN. View menu, photos, coupons, and more. It is fast, easy and FREE to use.
Come in and enjoy one of the finest Japanese restaurants in the Gallatin area. Osaka Japanese Restaurant strives to provide you with the dishes you know and love, while at the same time adding new and exciting dishes you are sure to enjoy. Our menu offers dishes that reflect the local flavors of various regions all over Asia, where our chef often travel to acquire new ideas and recipes to incorporate into their menus.


Поддомкратьте the car also establish it on props. Establish transmission in neutral position at the released lay brake.
For the purpose of balancing preservation карданный the shaft should be established into place in former position. Чертилкой, a white paint or кернером put labels of relative position of the case of a shaft and its holder крестовины a shaft of a leading gear wheel of differential.
Before removing bolts and collars of fastening of the back end карданного a shaft to back differential accurately mark mutual position of two holders крестовины карданного the hinge.
Remove bolts and collars back карданного the hinge. For maintenance of optimum access to bogs turn in appropriate way a shaft (or back wheels).
For prevention проворачивания карданного a shaft during easing of bolts of a flange, pass a screw-driver through the holder крестовины, as is shown in a picture.
Attach covers of needle bearings to крестовине a sticky tape in order to avoid their loss in the course of removal.
Lower a back part карданного a shaft and take its forward part from transmission or a distributing box.
In order to avoid losses of a liquid and pollution of internal components removed карданного a shaft, wrap up картер transmission or a distributing box a polyethylene package, having fixed its rubber bandage.
Each time at installation карданного a shaft into place it is necessary to use new collars of holders крестовин.
Remove a polyethylene package from transmission or a distributing box and absolutely wipe a surface of last. Carefully check up an epiploon condition. If the epiploon is worn out, replace it (the Head Automatic transmission).
Enter a forward part карданного a shaft into transmission (2WD) or a distributing box (4WD).
Lift a back part карданного a shaft in adjusting position, having tracked combination of adjusting labels. If labels do not coincide, turn back wheels, having achieved combination of labels of a flange of a leading gear wheel and карданного a shaft.
Remove a sticky tape, крепящую covers of bearings and establish new collars and bolts. Tighten bolts with demanded effort.
By means of a paint, a chalk, a marker or чертилки mark position forward карданного the hinge (model 1993 and 1994 вып.) or the CV-hinge (model 1995 вып. With карданным shaft of the Third type) in relation to the holder крестовины a shaft of a leading gear wheel of forward differential. Also mark position карданного a shaft in relation to a distributing box.
Before starting a detachment карданного the hinge from the holder крестовины a shaft of a leading gear wheel of differential of the forward bridge on models 1993 and 1994 вып. Mark hinge position in relation to the holder (as is shown in a picture); before a detachment of the CV-hinge from the holder крестовины a shaft of a leading gear wheel of forward differential of models 1995 вып. Mark its position in relation to the holder (as shown).
Before a detachment карданного the hinge from a connecting flange of a distributing box make marks of their mutual position.
Отболтите the forward end карданного a shaft from the holder крестовины a shaft of a leading gear wheel of differential, and the back end - from a connecting flange of a distributing box (see an illustration) and remove a shaft from the car. On models 1993 and 1994 вып. In order to avoid loss of covers attach them to крестовине a sticky tape.
Installation make upside-down. If you make replacement карданного a shaft of the Third type on model 1995 вып., do not forget to make adjusting measurements. All fixture tighten with demanded effort.
Clean jacks and lower the car on the earth.
At installation new карданного a shaft of the Third type before starting car operation it is necessary to make its measurements and adjustment.
Measure distance from a cover of the CV-hinge to a cut of its protective cover.
If you have established new карданный a shaft of the Third type on model 1995 вып., this distance should be measured and adjusted before car operation.
The given measurement should be made at installation new карданного a shaft and at not loaded car. Compare results of measurements to requirements of Specifications.
In case of need make adjustment карданного a shaft, having weakened a counternut and having shifted one end of a shaft to the CV-hinge or from it, achieving the demanded size of a backlash between a cover of the hinge and a cut of its protective cover. Then tighten a counternut with demanded effort.


text:
HomeAboutPortfolio7GC & Co HoldingsTeamInsightsNewsContact
7GC Promotes Chris Walsh to Vice President
7GC has promoted Chris Walsh from senior associate to vice president. In this role, Chris will continue to work closely with 7GC's San Francisco investing partners to identify technology opportunities in the early-growth venture ecosystem.
Chris joined the firm at the beginning of 2020 with a strong focus and expertise in late-stage investing within enterprise software and financial technology. He will look to continue to build out the firm's investments and source new thematic investing trends and areas. Since joining, Chris assisted and worked closely on the investments made by 7GC in The Mom Project (invested in March 2020) and Jio Platforms (invested in July 2020).
Before joining 7GC, Chris worked at Empros Capital, a boutique merchant bank that focused on late-stage technology companies. Chris started his career at Disruptive Technology Advisers. Chris holds a BA from Wesleyan University.
hims & hers to Begin Trading on the New York Stock Exchange
Announcing 7GC & Co. Holdings
7GC Partner Jack Leeney Included on Venture Capital Journal's "Rising Stars 2021" List
7GC Portfolio Company hims & hers to Go Public via SPAC at a $1.9B Equity Value
Grand Duchy


text:
Astralis posts $5.2M loss in 2021 financial year
Danish esports organization Astralis has posted its financial results for 2021.
Brass tacks: The company claims to have achieved a "result within our expectations" for the year.
Net revenue for the Danish org reached $11M (75M DKK) in 2021, a healthy increase from 2020's $7.6M (51.5M DKK).
Earnings before interest, taxes, depreciation, and amortization (EBITDA) improved year-on-year, from 2020's -$2M (-14M DKK) to 2021's -$1.16M (-7.9M DKK).
Despite improvements made in revenue for Astralis, it posted a pre-tax loss of $5.2M (35.2M DKK) for the year. It had a pre-tax loss of $7.8M (53.2M DKK) in 2020.
BLAST Astralis made major CS:GO signings in k0nfig (pictured) and blameF in November 2021.
The splits: Astralis' flagship team in CS:GO is still the organization's crown jewel, despite expanding into new titles over the past few years.
EBITDA for Astralis' CS:GO division went from $867K (-5.9M DKK) in 2020 to $1.1M (-7.6M DKK) in 2021.
The CS:GO division accounted for 70% of total revenue, League of Legends for 22%, FIFA for 5%, Astralis Nexus for 2%, and Rainbow Six Siege for 1% for Rainbow Six Siege.
Perhaps unsurprisingly, 51% of the company's revenue came from sponsorships. It holds deals with the likes of Logitech, hummel, Garmin, HP, and crypto exchange Bybit.
42% of total revenue was accounted for by prize winnings, revenue share from leagues, and sales of digital items. Merchandise, royalties, physical venue Astralis Nexus, and "other revenue" rounded out the total revenue with small contributions.
Looking ahead: Astralis management remains optimistic for the future.
"Our 2021 results confirmed our business plan and ambitious strategy," the org noted in the report.
Sponsorship is expected to remain the strongest revenue driver in 2022, with revenue from such deals expected to increase by 15% through new and extended agreements.
Revenue from franchised leagues is also expected to strengthen. The org currently holds the rights to spots in Riot Games' LEC, CS:GO competitions BLAST Premier and ESL Pro League, and Rainbow Six Siege's North American League.


text:
1st shipment for BC, 1st profit for Atlas
BC Iron Ltd has made its first shipment of iron ore while Pilbara stablemate Atlas Iron Ltd has posted a maiden profit and flagged a stronger second half financial performance.
About 20,000 tonnes of ore from BC Iron's Nullagine joint venture with Fortescue Metals Group Ltd was loaded on to a China-bound ship in Port Hedland, Western Australia on Thursday.
"The fact that we have the flexibility to put out a partial shipment is a testament to the close working relationship we have with Fortescue," BC Iron managing director Mike Young said in a statement.
"I would like also to point out the significance of being the first junior iron ore company to successfully access and utilise third party rail infrastructure owned by a major company in the Pilbara."
Fortescue chief executive Andrew Forrest told reporters in Port Hedland BHP Billiton Ltd and Rio Tinto Ltd had for years been saying it was impossible to transport ore for other miners, but "the final stake has been put into the lie".
Atlas Iron is the only other company to have used Fortescue's infrastructure, namely its Herb Elliott port facility in Port Hedland, but recently began using new multi-user port facilities at nearby Utah Point instead.
On Thursday, Atlas Iron posted a maiden profit of $30.1 million for the six months ended December 31.
Sales revenue was $201.8 million, up 400 per cent from $41.7 million for the prior period.
Atlas said its financial performance in the second half was expected to be significantly stronger, reflecting anticipated increased sales volumes, higher iron ore prices and reduced operating costs.
"Production and sales for the current quarter have, however, been impacted by weather, with several port closures due to a number of cyclonic events in January and February," Atlas said in a statement.
"Exports are approximately one shipment behind the company's schedule required to achieve the 1.5Mt (million tonne) production target for the March quarter."
Atlas said its second half net profit would be affected by an estimated $48 million in transaction costs relating to its acquisition of Giralia Resources NL.
As of Wednesday, Atlas had amassed a stake in the takeover target of 85.02 per cent.
Shares in Atlas closed up 11 cents, or 2.95 per cent, at $3.84, while BC Iron shares put on five cents, or 1.66 per cent, to $3.06.
BC Iron recently accepted a $3.30 per share takeover offer from Hong Kong Stock Exchange listed miner Regent Pacific Group Ltd.
BC Atlas
Capex figures highlight 2-speed economy
Reed Resources in $40m capital raising


Dexter, Christopher, Eufer and I were asked by Miss Chay, to organized the Windows7ako Meet up for the release of Internet Explorer 9 Beta, are task is to come up with games and talked about IE9.
Eufer and I are assigned to talk about IE9 for Consumers. then, Christopher and Dexter are assigned to talked about IE9 for IT Professionals.
During the Event, Rory, Jeffrey and Nes helped us facilitating the games.
I made a presentation file for the instruction of games during the event.
This entry was posted on Monday, October 4th, 2010 at 2:52 am	and posted in Events, Others.	You can follow any responses to this entry through the RSS 2.0 feed.


Inexperienced Energy Solutions That Can Save You A Fortune!
It's clear that environmental issues and native climate change are on the forefront of political discourse in as we converse's society. Nonetheless, you could be questioning how one can contribute to the environment by means of the usage of further inexperienced vitality. This textual content incorporates fairly just a few solutions that may assist you to use inexperienced vitality in your every day life.
When establishing your non-public dwelling, pay attention to its orientation. An excellent residence have to be protected in direction of overhead photo voltaic by means of the summer time season and be oriented so as that it'll get low-angle photo voltaic throughout the winter. This may be a good way to economize in your heating bill and may keep your non-public dwelling cool within the summertime.
Furnace filters have to be modified yearly, and take a look at them month-to-month for cleanliness. Together with filters to your warm-air registers is not going to be a nasty idea, each. This helps keep particles (or Scorching Wheels autos) from coming into into heating ducts and reducing effectivity.
Make use of followers inside the home. You'll merely use flooring followers or have a ceiling fan put in to increase airflow inside the home. You must make the most of these even when you already have an air conditioner because of you presumably can flip the thermostat better and easily use the followers for air movement.
Calculate potential vitality know-how by means of the planning of buying residence photograph voltaic applications. This may increasingly guarantee that you will have vitality it does not matter what the local weather brings, and it will finish in a surplus by means of the summer time season. Moreover, within the occasion you make use of the web utilization plan out of your electrical agency, you will get returns out of your utility agency for producing vitality all through summer time season.
Are you in the intervening time using a wood-burning fireplace to decrease your dependence upon fossil fuels? If that is the case, concede to shut the flue damper very tightly when your fireplace is not going to be getting used. Within the occasion you neglect to do this, every warmed or cooled air will merely escape from your individual dwelling via the chimney.
Go for photograph voltaic lights as an alternative of ordinary lighting when placing in lights for outside use. This helps save in your vitality costs, they usually're very aesthetic as correctly. Picture voltaic lights have gotten increasingly widespread, they usually're a ravishing alternative for lighting the patio, yard, sidewalks, storage, and plenty of totally different areas.
You wouldn't must spend a lot to be a inexperienced vitality shopper. You'll merely change your habits and be inexperienced. You'll really save huge by driving the rate limit and by no means over use your gasoline pedal. It may possibly prevent as lots as 20 % on gasoline within the occasion you merely adjust to these two pointers.
Don't throw away that espresso grinds- use them to fertilize your vegetation. Espresso grinds are rich in nitrogen so these make good, healthful plant meals. Using espresso grinds as fertilizer retains them out of the landfill, makes it pointless with the intention to purchase and use chemical plant meals, and make your vegetation develop correctly, together with oxygen to the setting.
If you happen to're in favor of using inexperienced vitality to economize along with to help the environment, try using an vitality system that omits fossil fuels paying homage to coal and pure gasoline, as these are prone to emit carbon dioxide. Instead, use a renewable vitality system paying homage to photograph voltaic, wind or hydro-power.
Change to low circulation or twin flush bogs. These particular bogs solely use 1.28 gallons for liquid flushes. Households generally use 20-40% a lot much less water by means of the usage of them as an alternative of frequent bogs. On frequent, a family can save as a lot as 2,000 gallons of water per yr! This might current essential monetary financial savings to your water bill, every single month.
Take shorter showers to get bigger good thing about inexperienced vitality in your home! Heating scorching water accounts for virtually 14% of the frequent household's vitality use and that will really add up. Chopping down on the time you spend throughout the bathe will in all probability be greater on the environment and your vitality funds!
Change your complete residence's mild bulbs to further energy-efficient ones. Regardless that they could be further costly than common bulbs, they'll stop money in the long run, by decreasing your electrical power bill. They not solely produce further mild than totally different bulbs, nevertheless as well as they ultimate for for much longer.
Have your mates and enterprise associates contact you thru email correspondence reasonably than snail mail. Try to make use of paper as little as doable. This helps corporations you deal with reduce their vitality payments, and it helps you reduce vitality payments, as correctly. You moreover help others by defending the environment as correctly.
As this textual content has beforehand talked about, inexperienced vitality is a topic that is throughout the forefront of everybody's ideas in as we converse's society, as environmental issues flip into even bigger. Fortuitously, there are a lot of points that you'll be able to do to make use of additional inexperienced vitality and dwell a further eco-friendly life. Apply this textual content's advice and you may be in your method to inexperienced residing.
Find out if there are any incentive programs in your area to help you offset the costs of installing green energy solutions. In the US you can use the Database of State Incentives for Renewable Energy to check out local incentive programs which you can take advantage of, but also contact your Department of Energy office.
You can consider getting solar water heaters to heat your water. If you're in an area that doesn't have to worry about freezing temperatures, you can get a system that will circulate the water through a solar heater before pumping it into your home. However, you should still have a traditional water heater as backup for times when the sun won't come out or if you're going to be using a lot of hot water.
Next Next post: Looking For Information About Inexperienced Vitality? You will have Come To The Correct Place!