text:
package dcraft.sql;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

import dcraft.hub.Hub;
import dcraft.lang.op.FuncResult;
import dcraft.lang.op.OperationContext;
import dcraft.lang.op.OperationResult;
import dcraft.struct.ListStruct;
import dcraft.struct.RecordStruct;
import dcraft.struct.Struct;
import dcraft.struct.scalar.NullStruct;
import dcraft.util.StringUtil;
import dcraft.xml.XElement;

// TODO there is much much more to do to make this easier to support many different db engines
public class SqlManager {
	public final DateTimeFormatter stampFmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.SSS");

	protected Map<String, SqlDatabase> databases = new HashMap<String, SqlManager.SqlDatabase>();

	public String getNowAsString() {
		return this.stampFmt.print(new DateTime(DateTimeZone.UTC));
	}

	public String getDateAsString(DateTime dt) {
		if (dt == null)
			return null;

		return this.stampFmt.print(dt.toDateTime(DateTimeZone.UTC));
	}

	public String getDateAsString(long dt) {
		return this.stampFmt.print(new DateTime(dt, DateTimeZone.UTC));
	}

	public SqlDatabase getDatabase(String name) {
		return this.databases.get(name);
	}

	public void init(OperationResult or, XElement config) {
		if (config == null)
			return;

		for (XElement del : config.selectAll("Database")) {
			String name = del.getAttribute("Name", "default");

			SqlDatabase db = new SqlDatabase();
			db.name = name;
			db.init(or, del);

			this.databases.put(name, db);
		}
	}

	public void stop() {
		for (SqlDatabase db : this.databases.values())
			db.stop();
	}

	public class SqlDatabase {
		protected String connstring = null;
		protected String name = null;

		protected SqlEngine engine = null;

		// single connection style engines
		protected Connection conn = null;
		protected Semaphore lock = new Semaphore(0);

		protected boolean poolmode = false;
		protected ConcurrentLinkedQueue<Connection> pool = new ConcurrentLinkedQueue<>();

		public void init(OperationResult or, XElement del) {
			if (del == null)
				return;

			try {
				String driver = del.getAttribute("Driver");

		        Class.forName(driver);

		        this.connstring = Hub.instance.getClock().getObfuscator().decryptHexToString(
	    				del.getAttribute("Connection")
	    		);

		        // if null then try unencrypted
		        if (this.connstring == null)
		        	this.connstring = del.getAttribute("Connection");

		        if (this.connstring.startsWith("jdbc:h2:"))
		        	this.engine = SqlEngine.H2;
		        else if (this.connstring.startsWith("jdbc:sqlserver:"))
		        	this.engine = SqlEngine.SqlServer;
		        else if (this.connstring.startsWith("jdbc:mariadb:"))
		        	this.engine = SqlEngine.MariaDb;
		        else if (this.connstring.startsWith("jdbc:mysql:"))
		        	this.engine = SqlEngine.MySQL;
		        else {
					or.errorTr(189, this.connstring.substring(0, Math.min(this.connstring.length(), 15)));
					return;
		        }

		        this.poolmode = "Pooled".equals(del.getAttribute("Mode"));

		        if (this.engine == SqlEngine.SqlServer || this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL) {
			        or.info(0, "Using database " + this.name + " with multiple connections.");
		        }
		        else {
			        this.conn = DriverManager.getConnection(this.connstring);

			        or.info(0, "Connected to database " + this.name + " single connection.");

			        this.releaseConnection(this.conn);
		        }
			}
			catch (Exception x) {
				or.errorTr(190, this.name, x);
				return;
			}
		}

		public void stop() {
			try {
				if (this.engine == SqlEngine.SqlServer || this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL) {
					if (this.poolmode) {
						Connection conn = this.pool.poll();

						while (conn != null) {
							try {
								conn.close();
							}
							catch (Exception x) {
								// unimportant
							}

							conn = this.pool.poll();
						}
					}
				}
				else if (this.engine == SqlEngine.H2)
					this.conn.close();
			}
			catch (Exception x) {
				// unimportant
			}
		}

		public Connection acquireConnection() {
			Hub.instance.getCountManager().allocateNumberCounter("dcSqlAcquireConnection").increment();

			if (this.engine == SqlEngine.SqlServer  || this.engine == SqlEngine.MariaDb  || this.engine == SqlEngine.MySQL) {
		        try {
					Connection conn = null;

					if (this.poolmode) {
						conn = this.pool.poll();

						if ((conn != null) && !conn.isValid(2))
							conn = null;
					}

					if (conn == null) {
						conn = DriverManager.getConnection(this.connstring);
						Hub.instance.getCountManager().allocateNumberCounter("dcSqlConnectionCreate").increment();
					}

					return conn;
				}
		        catch (SQLException x) {
				}
	        }
	        else if (this.engine == SqlEngine.H2) {
				try {
					this.lock.acquire();
					return this.conn;
				}
				catch (InterruptedException e) {
				}
	        }

			Hub.instance.getCountManager().allocateNumberCounter("dcSqlAcquireConnectionFail").increment();

			return null;
		}

		public void releaseConnection(Connection conn) {
			Hub.instance.getCountManager().allocateNumberCounter("dcSqlReleaseConnection").increment();

			if (this.engine == SqlEngine.SqlServer || this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL) {
				if (this.poolmode) {
					this.pool.add(conn);
					return;
				}

		        try {
					conn.close();
				}
		        catch (SQLException x) {
				}
	        }
	        else if (this.engine == SqlEngine.H2) {
	        	this.lock.release();
	        }
		}

		public SqlEngine getEngine() {
			return this.engine;
		}

		public boolean testConnection() {
			Connection conn = this.acquireConnection();

			if (conn == null)
				return false;

	    	this.releaseConnection(conn);

		    return true;
		}

		// warning - may not use same connection between calls
		public String getLastIdSql() {
			if (this.engine == SqlEngine.H2)
				return "SELECT IDENTITY() AS lid";

			if (this.engine == SqlEngine.SqlServer)
				return "SELECT @@IDENTITY AS lid";

			if (this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL)
				return "SELECT LAST_INSERT_ID() AS lid";

			return null;
		}

		/*
		 * We should always talk in UTC...
		 *
		 * @return
		 */
		public String nowFunc() {
			if (this.getEngine() == SqlEngine.SqlServer)
				return "SYSUTCDATETIME()";  // TODO review if this works "GETUTCDATE()";

			if (this.getEngine() == SqlEngine.MariaDb || this.getEngine() == SqlEngine.MySQL)
				return "UTC_TIMESTAMP()";

			return "NOW()";
		}

		// TODO
		// only support MINUTES at present
		public String timeUnit(TimeUnit unit) {
			if (unit == TimeUnit.MINUTES)
				return "MINUTE";

			return null;
		}

		public String modNowFunc(TimeUnit unit, int amt) {
			return this.modTimeFunc(this.nowFunc(), unit, amt);
		}

		public String modTimeFunc(String time, TimeUnit unit, int amt) {
			String unitname = this.timeUnit(unit);

			// h2 syntax
			String expr = "DATEADD('" + unitname + "', " + amt + ", " + time + ") ";

			if (this.getEngine() == SqlEngine.SqlServer)
				expr = "DATEADD(" + unitname + ", " + amt + ", " + time + ") ";

			if (this.getEngine() == SqlEngine.MariaDb || this.getEngine() == SqlEngine.MySQL)
				expr = "DATE_ADD(" + time + ", INTERVAL " + amt + " " + unitname + ") ";

			return expr;
		}

		public String formatColumn(String name) {
			if (this.getEngine() == SqlEngine.SqlServer)
				return "[" + name + "]";

			if (this.getEngine() == SqlEngine.MariaDb || this.getEngine() == SqlEngine.MySQL)
				return "`" + name + "`";

			// TODO check what H2 uses...

			return name;
		}

		public void processException(Exception x, OperationResult or) {
			if (x instanceof SQLException) {
				SQLException sx = (SQLException)x;

				if (this.getEngine() == SqlEngine.MariaDb || this.getEngine() == SqlEngine.MySQL) {
					// duplicate id error - this is not always an error for the caller
					// we treat it as an error return code but log it as an Info
					if (sx.getErrorCode() == 1062) {
						or.exit(194, OperationContext.get().tr("_code_194", this.name, x));
						return;
					}
				}
				else if (this.getEngine() == SqlEngine.SqlServer) {
					if (sx.getErrorCode() == 2627) {
						or.exit(194, OperationContext.get().tr("_code_194", this.name, x));
						return;
					}
				}

				// TODO add other databases

				or.errorTr(195, this.name, ((SQLException) x).getErrorCode(), x);
				return;
			}

			or.errorTr(186, this.name, x);
		}

		public FuncResult<Integer> executeFreestyle(String sql, Object... params) {
			FuncResult<Integer> res = new FuncResult<Integer>();

			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

		    try {
			    FuncResult<PreparedStatement> psres = this.prepStatement(conn, sql, params);

			    if (res.hasErrors())
			    	return res;

			    PreparedStatement pstmt = psres.getResult();

				Hub.instance.getCountManager().countObjects("dcSqlExecuteCount", pstmt);

				res.setResult(pstmt.executeUpdate());

    			pstmt.close();
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlExecuteFail", sql);
		    }
		    finally {
		    	this.releaseConnection(conn);
		    }

			return res;
		}

		// return a list of records where each row is a record in this collection
		// -- NOTE: column names are all lower case
		public FuncResult<ListStruct> executeQueryFreestyle(String sql, Object... params) {
			FuncResult<ListStruct> res = new FuncResult<ListStruct>();
			ListStruct list = new ListStruct();

			res.setResult(list);

			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

		    ResultSet rs = null;

		    try {
			    FuncResult<PreparedStatement> psres = this.prepStatement(conn, sql, params);

			    if (res.hasErrors())
			    	return res;

			    PreparedStatement pstmt = psres.getResult();

				Hub.instance.getCountManager().countObjects("dcSqlQueryCount", pstmt);

				// MariaDB hint that this turns on streaming... review TODO
				//pstmt.setFetchSize(Integer.MIN_VALUE);

				rs = pstmt.executeQuery();

				ResultSetMetaData md = rs.getMetaData();
			    int columns = md.getColumnCount();

				while (rs.next()) {
					RecordStruct rec = new RecordStruct();

					for(int i=1; i<=columns; i++)
						rec.setField(md.getColumnLabel(i).toLowerCase(), rs.getObject(i));

					list.addItem(rec);
				}

    			pstmt.close();
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlQueryFail", sql);
		    }
		    finally {
		    	try {
		    		if (rs != null)
		    			rs.close();
				}
		    	catch (SQLException x) {
				}

		    	this.releaseConnection(conn);
		    }

			return res;
		}

		// return a list of records where each row is a record in this collection
		public FuncResult<ListStruct> executeQueryPage(SqlSelect[] select, String from, String where, String groupby, String orderby, int offset, int pagesize, Object... params) {
			FuncResult<ListStruct> res = new FuncResult<ListStruct>();

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prepare
		    FuncResult<PreparedStatement> psres = this.prepPage(conn, select, from, where, groupby, orderby, offset, pagesize, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    // execute
	    	res = callAndFormat(select, pstmt);

	    	try {
	    		if (pstmt != null)
	    			pstmt.close();
			}
	    	catch (SQLException x) {
			}

	    	// release
	    	this.releaseConnection(conn);

			return res;
		}

		// return a list of records where each row is a record in this collection
		public FuncResult<ListStruct> executeQueryLimit(SqlSelect[] select, String from, String where, String groupby, String orderby, int limit, boolean distinct, Object... params) {
			FuncResult<ListStruct> res = new FuncResult<ListStruct>();

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prepare
		    FuncResult<PreparedStatement> psres = this.prepLimit(conn, select, from, where, groupby, orderby, limit, distinct, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    // execute
	    	res = callAndFormat(select, pstmt);

	    	try {
	    		if (pstmt != null)
	    			pstmt.close();
			}
	    	catch (SQLException x) {
			}

	    	// release
	    	this.releaseConnection(conn);

			return res;
		}

		// return a list of records where each row is a record in this collection
		public FuncResult<ListStruct> executeQuery(SqlSelect[] select, String from, String where, String groupby, String orderby, Object... params) {
			FuncResult<ListStruct> res = new FuncResult<ListStruct>();

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prepare
		    FuncResult<PreparedStatement> psres = this.prep(conn, select, from, where, groupby, orderby, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    // execute
	    	res = this.callAndFormat(select, pstmt);

	    	try {
	    		if (pstmt != null)
	    			pstmt.close();
			}
	    	catch (SQLException x) {
			}

	    	// release
	    	this.releaseConnection(conn);

			return res;
		}

		// return a single value (row/column) from table
		public FuncResult<Struct> executeQueryScalar(SqlSelect select, String from, String where, String orderby, Object... params) {
			FuncResult<Struct> res = new FuncResult<Struct>();
    		res.setResult(NullStruct.instance);

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			SqlSelect[] selects = new SqlSelect[] { select };

			// prepare
		    FuncResult<PreparedStatement> psres = this.prep(conn, selects, from, where, null, orderby, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    // execute
	    	FuncResult<ListStruct> res2 = this.callAndFormat(selects, pstmt);

	    	ListStruct lrs = res2.getResult();

	    	if (lrs.getSize() > 0) {
	    		RecordStruct rec = lrs.getItemAsRecord(0);

	    		res.setResult(rec.getField(select.name));
	    	}

	    	try {
	    		if (pstmt != null)
	    			pstmt.close();
			}
	    	catch (SQLException x) {
			}

	    	// release
	    	this.releaseConnection(conn);

			return res;
		}

		// return a single String value (row/column) from table
		public String executeQueryString(String col, String from, String where, String orderby, Object... params) {
			FuncResult<Struct> rsres = this.executeQueryScalar(new SqlSelectString(col), from, where, orderby, params);

			if (rsres.hasErrors() || rsres.isEmptyResult())
				return null;

			return Struct.objectToString(rsres.getResult());
		}

		// return a single Integer value (row/column) from table
		public Long executeQueryInteger(String col, String from, String where, String orderby, Object... params) {
			FuncResult<Struct> rsres = this.executeQueryScalar(new SqlSelectInteger(col), from, where, orderby, params);

			if (rsres.hasErrors() || rsres.isEmptyResult())
				return null;

			return Struct.objectToInteger(rsres.getResult());
		}

		// return a single Boolean value (row/column) from table
		public Boolean executeQueryBoolean(String col, String from, String where, String orderby, Object... params) {
			FuncResult<Struct> rsres = this.executeQueryScalar(new SqlSelectBoolean(col), from, where, orderby, params);

			if (rsres.hasErrors() || rsres.isEmptyResult())
				return null;

			return Struct.objectToBoolean(rsres.getResult());
		}

		// return a single row from table
		public FuncResult<RecordStruct> executeQueryRecord(SqlSelect[] selects, String from, String where, Object... params) {
			FuncResult<RecordStruct> res = new FuncResult<RecordStruct>();

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prepare
		    FuncResult<PreparedStatement> psres = this.prep(conn, selects, from, where, null, null, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    // execute
	    	FuncResult<ListStruct> res2 = this.callAndFormat(selects, pstmt);

	    	ListStruct lrs = res2.getResult();

	    	if (lrs.getSize() > 0)
	    		res.setResult(lrs.getItemAsRecord(0));
	    	else
	    		res.setResult(new RecordStruct());	// always return something - caller should do an empty check

	    	try {
	    		if (pstmt != null)
	    			pstmt.close();
			}
	    	catch (SQLException x) {
			}

	    	// release
	    	this.releaseConnection(conn);

			return res;
		}

		// return a single row (the first) from table
		public FuncResult<RecordStruct> executeQueryRecordFirst(SqlSelect[] selects, String from, String where, String orderby, Object... params) {
			FuncResult<RecordStruct> res = new FuncResult<RecordStruct>();

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prepare
		    FuncResult<PreparedStatement> psres = this.prep(conn, selects, from, where, null, orderby, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    // execute
	    	FuncResult<ListStruct> res2 = this.callAndFormat(selects, pstmt);

	    	ListStruct lrs = res2.getResult();

	    	if (lrs.getSize() > 0)
	    		res.setResult(lrs.getItemAsRecord(0));
	    	else
	    		res.setResult(new RecordStruct());	// always return something - caller should do an empty check

	    	try {
	    		if (pstmt != null)
	    			pstmt.close();
			}
	    	catch (SQLException x) {
			}

	    	// release
	    	this.releaseConnection(conn);

			return res;
		}

		// return a list of records where each row is a record in this collection
		public FuncResult<ListStruct> callAndFormat(SqlSelect[] select, PreparedStatement pstmt) {
			FuncResult<ListStruct> res = new FuncResult<ListStruct>();
			ListStruct list = new ListStruct();

			res.setResult(list);

		    ResultSet rs = null;

		    try {
				Hub.instance.getCountManager().countObjects("dcSqlQueryCount", pstmt);

				// MariaDB hint that this turns on streaming... review TODO
				//pstmt.setFetchSize(Integer.MIN_VALUE);

				rs = pstmt.executeQuery();

				ResultSetMetaData md = rs.getMetaData();
			    int columns = md.getColumnCount();

			    if (columns > select.length) {
					res.error(1, "Mismatched column name list");		// TODO code tr
					return res;
			    }

				while (rs.next()) {
					RecordStruct rec = new RecordStruct();

					for(int i=1; i<=columns; i++) {
						String name = select[i - 1].name;

						rec.setField(name, select[i - 1].format(rs.getObject(i)));
					}

					list.addItem(rec);
				}
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlQueryFail", pstmt.toString());
		    }
		    finally {
		    	try {
		    		if (rs != null)
		    			rs.close();
				}
		    	catch (SQLException x) {
				}
		    }

			return res;
		}

		// caller needs to close statememt
		// will not return open statement and errors
		public FuncResult<PreparedStatement> prepStatement(Connection conn, String sql, Object... params) {
			FuncResult<PreparedStatement> res = new FuncResult<PreparedStatement>();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

		    PreparedStatement pstmt = null;

		    try {
		    	pstmt = conn.prepareStatement(sql);

		    	for (int i = 0; i < params.length; i++) {
		    		Object param = params[i];

		    		// null params are intentionally not supported - allows us to optionally add params to a complex query
		    		// for NULL support see SqlNull enum
		    		if (param == null)
		    			continue;

		    		if (param instanceof DateTime)
		    			param = SqlManager.this.getDateAsString((DateTime) param);

		    		if (param instanceof String) {
		    			if (this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL)
		    				pstmt.setString(i + 1, (String)param);
		    			else if (this.engine == SqlEngine.SqlServer)
		    				pstmt.setNString(i + 1, (String)param);
		    			else if (this.engine == SqlEngine.H2)
		    				pstmt.setNString(i + 1, (String)param);

		    			continue;
		    		}

		    		if (param instanceof BigDecimal) {
		    			pstmt.setBigDecimal(i + 1, (BigDecimal) param);
		    			continue;
		    		}

		    		if (param instanceof Double) {
		    			pstmt.setDouble(i + 1, (double) param);
		    			continue;
		    		}

		    		if (param instanceof Integer) {
		    			pstmt.setInt(i + 1, (int) param);
		    			continue;
		    		}

		    		if (param instanceof Long) {
		    			pstmt.setLong(i + 1, (long) param);
		    			continue;
		    		}

		    		if (param instanceof SqlNull) {
		    			if (param == SqlNull.DateTime)
		    				pstmt.setNull(i + 1, Types.DATE);
		    			else if (param == SqlNull.VarChar) {
			    			if (this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL)
			    				pstmt.setNull(i + 1, Types.VARCHAR);
			    			else if (this.engine == SqlEngine.SqlServer)
			    				pstmt.setNull(i + 1, Types.NVARCHAR);
			    			else if (this.engine == SqlEngine.H2)
			    				pstmt.setNull(i + 1, Types.NVARCHAR);
		    			}
		    			else if (param == SqlNull.BigDecimal)
		    				pstmt.setNull(i + 1, Types.DECIMAL);
		    			else if (param == SqlNull.Double)
		    				pstmt.setNull(i + 1, Types.FLOAT);
		    			else if (param == SqlNull.Int)
		    				pstmt.setNull(i + 1, Types.INTEGER);
		    			else if (param == SqlNull.Long)
		    				pstmt.setNull(i + 1, Types.BIGINT);
		    			else if (param == SqlNull.Text)
		    				pstmt.setNull(i + 1, Types.CLOB);		// TODO test

		    			continue;
		    		}
		    	}

				res.setResult(pstmt);
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlPrepFail", sql);

		    	try {
		    		if (pstmt != null)
		    			pstmt.close();
				}
		    	catch (SQLException x2) {
				}
		    }

			return res;
		}

		// caller needs to close statememt
		public FuncResult<PreparedStatement> prepPage(Connection conn, SqlSelect[] select, String from, String where, String groupby, String orderby, int offset, int pagesize, Object... params) {
			// if connection is bad/missing then just try again later
			if (conn == null) {
				FuncResult<PreparedStatement> res = new FuncResult<PreparedStatement>();
				res.errorTr(185, this.name);
				return res;
			}

		    String sql = "SELECT ";

		    for (int i = 0; i < select.length; i++) {
		    	if (i > 0)
		    		sql += ", ";

		    	sql += select[i].toSql(this);
		    }

		    sql += " FROM " + from;

		    if (StringUtil.isNotEmpty(where))
		    	sql += " WHERE " + where;

		    if (StringUtil.isNotEmpty(groupby))
		    	sql += " GROUP BY " + groupby;

	        if (StringUtil.isEmpty(orderby)) {
				FuncResult<PreparedStatement> res = new FuncResult<PreparedStatement>();
				res.error(1, "Order By required with paging");
				return res;
			}

			if (this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL) {
		        sql = "SELECT * FROM ( " + sql + " ) AS recset ORDER BY "
		        	+ orderby + " LIMIT " + offset + "," + pagesize + ";";
			}
			else if (this.engine == SqlEngine.SqlServer) {
		        sql = "WITH RecordPager AS ( "
		        		+ "SELECT *, ROW_NUMBER() OVER (ORDER BY " + orderby + ") AS RowNumber "
		        		+ "FROM ( " + sql + " ) AS recset "
		       		+ ") "
		       		+ "SELECT * FROM RecordPager WHERE RowNumber BETWEEN " + (offset + 1)
		       		+ " AND " + (offset + pagesize);
			}
			else if (this.engine == SqlEngine.H2) {
				// TODO
			}

			// TODO support for other dbms
			// http://en.wikipedia.org/wiki/Select_(SQL)
			// http://stackoverflow.com/questions/2771439/jdbc-pagination
			// http://stackoverflow.com/questions/1986998/resultset-to-pagination
			// http://stackoverflow.com/questions/971964/limit-10-20-in-sqlserver

			return this.prepStatement(conn, sql, params);
		}

		// caller needs to close statememt
		public FuncResult<PreparedStatement> prepLimit(Connection conn, SqlSelect[] select, String from, String where, String groupby, String orderby, int limit, boolean distinct, Object... params) {
			// if connection is bad/missing then just try again later
			if (conn == null) {
				FuncResult<PreparedStatement> res = new FuncResult<PreparedStatement>();
				res.errorTr(185, this.name);
				return res;
			}

		    String sql = "SELECT ";

		    if (distinct)
		    	sql += "DISTINCT ";

		    for (int i = 0; i < select.length; i++) {
		    	if (i > 0)
		    		sql += ", ";

		    	sql += select[i].toSql(this);
		    }

		    sql += " FROM " + from;

		    if (StringUtil.isNotEmpty(where))
		    	sql += " WHERE " + where;

		    if (StringUtil.isNotEmpty(groupby))
		    	sql += " GROUP BY " + groupby;

	        if (StringUtil.isEmpty(orderby)) {
				FuncResult<PreparedStatement> res = new FuncResult<PreparedStatement>();
				res.error(1, "Order By required with limit");
				return res;
			}

			if (this.engine == SqlEngine.MariaDb || this.engine == SqlEngine.MySQL) {
		        sql = "SELECT * FROM ( " + sql + " ) AS unset ORDER BY " + orderby + " LIMIT " + limit + ";";
			}
			else if (this.engine == SqlEngine.SqlServer) {
		        sql = "SELECT TOP " + limit + " * FROM ( " + sql + " ) AS unset ORDER BY " + orderby;
			}
			else if (this.engine == SqlEngine.H2) {
				// TODO
			}

			return this.prepStatement(conn, sql, params);
		}

		// caller needs to close statememt
		public FuncResult<PreparedStatement> prep(Connection conn, SqlSelect[] select, String from, String where, String groupby, String orderby, Object... params) {
			// if connection is bad/missing then just try again later
			if (conn == null) {
				FuncResult<PreparedStatement> res = new FuncResult<PreparedStatement>();
				res.errorTr(185, this.name);
				return res;
			}

		    String sql = "SELECT ";

		    for (int i = 0; i < select.length; i++) {
		    	if (i > 0)
		    		sql += ", ";

		    	sql += select[i].toSql(this);
		    }

		    sql += " FROM " + from;

		    if (StringUtil.isNotEmpty(where))
		    	sql += " WHERE " + where;

		    if (StringUtil.isNotEmpty(groupby))
		    	sql += " GROUP BY " + groupby;

		    if (StringUtil.isNotEmpty(orderby))
		    	sql += " ORDER BY " + orderby;

			return this.prepStatement(conn, sql, params);
		}

		public FuncResult<Integer> executeUpdate(String sql, Object... params) {
			FuncResult<Integer> res = new FuncResult<Integer>();
			res.setResult(0);

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prep
		    FuncResult<PreparedStatement> psres = this.prepStatement(conn, sql, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    try {
				Hub.instance.getCountManager().countObjects("dcSqlUpdateCount", pstmt);

				// execute
				int cnt = pstmt.executeUpdate();

				res.setResult(cnt);
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlUpdateFail", sql);
		    }
		    finally {
		    	try {
		    		if (pstmt != null)
		    			pstmt.close();
				}
		    	catch (SQLException x) {
				}

		    	// release
		    	this.releaseConnection(conn);
		    }

			return res;
		}

		public FuncResult<Integer> executeDelete(String sql, Object... params) {
			FuncResult<Integer> res = new FuncResult<Integer>();
			res.setResult(0);

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prep
		    FuncResult<PreparedStatement> psres = this.prepStatement(conn, sql, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    try {
				Hub.instance.getCountManager().countObjects("dcSqlDeleteCount", pstmt);

				// execute
				int cnt = pstmt.executeUpdate();

				res.setResult(cnt);
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlDeleteFail", sql);
		    }
		    finally {
		    	try {
		    		if (pstmt != null)
		    			pstmt.close();
				}
		    	catch (SQLException x) {
				}

		    	// release
		    	this.releaseConnection(conn);
		    }

			return res;
		}

		public FuncResult<Long> executeInsertReturnId(String sql, Object... params) {
			FuncResult<Long> res = new FuncResult<Long>();
			res.setResult(0L);

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prep
		    FuncResult<PreparedStatement> psres = this.prepStatement(conn, sql, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    try {
				Hub.instance.getCountManager().countObjects("dcSqlInsertCount", pstmt);

				// execute
				int cnt = pstmt.executeUpdate();

				pstmt.close();

				if (cnt == 1) {
					pstmt = conn.prepareStatement(this.getLastIdSql());

					ResultSet rs = pstmt.executeQuery();

					if (rs.next())
						res.setResult(rs.getLong("lid"));
				}
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlInsertFail", sql);
		    }
		    finally {
		    	try {
		    		if (pstmt != null)
		    			pstmt.close();
				}
		    	catch (SQLException x) {
				}

		    	// release
		    	this.releaseConnection(conn);
		    }

			return res;
		}

		// TODO look into "get generated keys"
		public FuncResult<Integer> executeInsert(String sql, Object... params) {
			FuncResult<Integer> res = new FuncResult<Integer>();
			res.setResult(0);

			// acquire
			Connection conn = this.acquireConnection();

			// if connection is bad/missing then just try again later
			if (conn == null) {
				res.errorTr(185, this.name);
				return res;
			}

			// prep
		    FuncResult<PreparedStatement> psres = this.prepStatement(conn, sql, params);

		    if (res.hasErrors())
		    	return res;

		    PreparedStatement pstmt = psres.getResult();

		    try {
				Hub.instance.getCountManager().countObjects("dcSqlInsertCount", pstmt);

				// execute
				int cnt = pstmt.executeUpdate();

				pstmt.close();

				res.setResult(cnt);
		    }
		    catch (Exception x) {
		    	this.processException(x, res);

				Hub.instance.getCountManager().countObjects("dcSqlInsertFail", sql);
		    }
		    finally {
		    	try {
		    		if (pstmt != null)
		    			pstmt.close();
				}
		    	catch (SQLException x) {
				}

		    	// release
		    	this.releaseConnection(conn);
		    }

			return res;
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
Khaled Abdel Thamer, Iraq
Muthanna Abdul Hussein and Khaled Abdel Thamer, cameramen for the Al Iraqia television network, were killed in an explosion at a security checkpoint near the city of Hilla, some 70 km south of Baghdad. The International Federation of Journalists, citing reports from the affiliated Iraqi Journalists Syndicate, said the cameramen were in the city to cover the distribution of voting cards. The independent National Iraqi News Agency reported that Hussein and Thamer were among the dozens of casualties from what it described as a suicide car bombing. The news agency quoted an Al Iraqia manager in Babylon as confirming that both men died in the March 9 attack.

redpajama_set_name: RedPajamaCommonCrawl


text:
Read Next Biden's Immigration Reform to Include Pathway to Citizenship for Millions
May 30, 2012 3:25PM ET
Doc Watson and His Tall Drink O' Water Merle
Rolling Stone's 1973 interview with the guitarist and his son
Chet Flippo
Chet Flippo's Most Recent Stories
Keith Richards Meets the Mounties and Faces the Music
Interview: Checking In With Author Joseph Heller
Doc Watson
GAB Archive/Redferns
Merle Watson has a strong set of credentials for a young musician. Besides being the 24-year-old son of the preeminent guitar picker, Doc Watson, Merle is also his father's extremely competent accompanist on banjo and second guitar. He was named after Merle Travis, the country whiz from whom Doc learned his chops. His great-great-grandmother knew Tom Dula, and the original "Tom Dooley" was a family heirloom. Clarence Ashley, the late patriarch of old-timey music, was his neighbor, and Earl Scruggs drops in often for lunch at the Watson's Deep Gap, North Carolina, home.
And Merle Watson says he doesn't like country music.
"Naw," Merle said matter-of-factly during an interview with his illustrious father, "I don't especially like country music too much."
Doc almost hung his head, and you could tell that the blind guitarist-singer wasn't too pleased with the answer.
Merle worried with his walrus mustache with one hand and rearranged his abundant thatch of dark hair with the other. Then he dropped another bombshell: "My favorite kind of music, now, it'd have to be the Allman Brothers. Blues-rock."
Doc sipped his coffee and looked unconcerned.
Merle continued: "As soon as my construction business is doin' well enough, I'm gonna quit playin' professionally and work at my business fulltime." Sudden silence. Merle looked around and decided that it was time to let his father talk again.
"Well," Doc said in his ringing baritone, "this tall drink o' water sittin' beside me here has got me off on some of the blues people. Bill Withers, man, that man can sing."
With that, the interview was Doc's again. He was pausing in the midst of a nationwide tour that was an outgrowth of his second "discovery," precipitated by the country-western boom of the Seventies. Master of half-a-dozen styles of American music, slave of none, Arthel "Doc" Watson was first "discovered" accidentally during the folk craze of the Sixties.
In 1960, he was 37 and playing electric guitar in a country swing dance band in his native North Carolina when folklorist Ralph Rinzler went south to locate Clarence Ashley. His big find was Ashley's neighbor, Doc Watson.
"The way I got started professionally in music," Watson said, "a fellow, Ralph Rinzler, persuaded me, over my better judgment, that I had something to offer the public in the way of entertainment. So I got out there and tried. In '62 I made my first professional trip as a musician. I went with the Clarence Ashley group to Los Angeles and worked the Ash Grove for two weeks. That kinda launched me into it."
He was soon a sensation at Gerde's Folk City and Town Hall and then became a folk pillar with his appearance at the 1963 Newport Folk Festival. There followed a string of albums and tours, but, as folkie consciousness dwindled, so did his national popularity. As the years went by, his basic repertoire – sides of mountain music served up with dashes of urban-folk-cum-Tom Paxton and popular C&W – changed little, although his style gained what has since been described as an "authoritative delivery."
When the C&W revival rolled around, Watson was there and was soon called upon. In 1971, the Nitty Gritty Dirt Band recorded their epochal Will the Circle Be Unbroken album with musical pioneers Roy Acuff, Maybelle Carter, Jimmy Martin, Earl Scruggs and Merle Travis. And Doc Watson.
His performances there – especially "Tennessee Stud" and "Black Mountain Rag," which he first heard "over radio station WCYB from Bristol, when the Stanley Brothers' fiddler, Leslie Keith, played it" – won him an entire new set of young and not-so-young fans.
Watson is the last to claim that he is strictly a traditional singer: "Country music has changed and I guess I've changed with it. Although I've never forgotten about the old music, I consider myself privileged that I grew up in a part of the country where we still had the old music. I guess my country style has developed from listening to a lot of music over the years, not all of it country. While I was even in school, I was exposed to the classical music and that may have influenced a tiny bit of phrasing here and there. But all music I do, I learned by ear. I don't know but half a thimbleful about theory."
Doc Watson and Merle Travis first met at that Circle session, and Doc considered it a "high point of my career" to meet the man from whose recordings he had learned much of his guitar technique. "I had about three influences," Watson said, "and they were the Delmore Brothers, Jimmie Rodgers and Merle Travis. Like Chet Atkins, I guess, Merle was my idol. I dearly love to hear that man pick."
The blind guitarist is still self-disparaging. His attitude throughout the interview is aw-shucks-I'm-just-another-git-tar-picker. "I didn't seriously start learning about git-tar," he said, Merle listening solemnly, "until I was about 18 or 19. When I was 13 I got my first guitar. I was foolin' around with a borrowed git-tar one mornin' when my dad said, 'If you'll learn a tune on that thang, son, by the time I get back from work this evenin', Saturday we'll go to town and see if we can find you one.' Well now, I cheated a little I guess. I had already learned a few chords and by the time he came home, I could play a Carter Family lead on that thang, 'When the Roses Bloom in Dixieland.'
"I'll tell you a story about my first real instrument, my banjo, although I had a new harmonica every year. But my banjo – Dad was splittin' stove wood and kindlin' in the yard and I was carryin' Momma a box of stove wood when my brother Linny – he lives over in Russell, Louisiana, now – came up through the yard with a sack, and Dad said, 'What in the world you got in that sack, son?' He said, 'Well, this's that pore old cat of granny's that she wants me to put it out of its misery. It's got to where it can't eat; it just lays around and suffers.' Dad said, 'Well, make sure it don't suffer.' He turned around to me and said, 'I'll tell you what. If you boys'll skin that cat, I'll make you a banjo head out of it.' And I said, 'Whoever heared tell of a cat-hide for a banjo?' He said, 'Well, they got one in the Sears-Roebuck catalog. I believe I can make one.'
"It took me and Linny two days to wash the smell off our hands. But that banjo head was almost transparent. It did make the finest banjo head you ever saw."
Merle and Doc laughed and got up: They wanted some rest before the night's performance. They had just driven in from San Francisco, and Dayton was the next stop after Austin.
(Several weeks later Doc would be back in Boone, North Carolina, to receive an honorary Doctor of Folk Arts degree and deliver a commencement address at Appalachian State University.)
There's a new audience standing ass-to-elbow in the tiny folk club. The city council just announced that Doc will be presented the key to the city. ("Useless as tits on a bull," a wag in the crowd suggests.) Doc emerged, haltingly, from the dressing room and Merle led him up to the stage. This young folkie audience was already giving him an ovation, just on sight.
He and Merle settled onstage and Doc wasted no time: "Merle," he said in that intimate club voice, "let's get it cranked off here with a little of that 'Roll in My Sweet Baby's Arms.'"
Doc seesawed into a harp intro and then rolled a guitar opener and the crowd was cheering.
Merle was stone-faced. He might have been thinking of a construction company or something else he'd rather be doing. Doc was beaming. You could feel it even with your eyes closed: His heart was in it.
• Folk Pioneer Doc Watson Dead at 89
• Photos: Doc Watson Through the Years
In This Article: Doc Watson,	Merle Watson


text:
Noxious Forums > DarkRP > Suggestions > Jeff Carter Jersey >
Jeff Carter Jersey
ST. PAUL Jeff Carter Jersey , Minn. (AP) For Tom Wilson, it didn't seem as if anything was out of the ordinary. He's seen Alex Ovechkin put on a show against plenty of teams.The Minnesota Wild are tired of being spectators to the show.Ovechkin scored his league-leading 34th goal and had three assists, and Wilson scored twice for the Washington Capitals in a 5-2 win against the Wild on Thursday night.Article continues below ...Ovechkin assisted on Wilson's opening goal in the second period before adding his own in a building in which he's had plenty of success for Washington. In eight career games in Minnesota, Ovechkin has 11 goals."I've seen him put on clinics all the time," Wilson said. "Maybe it's another one. I've had a front row seat for the last four years. A bunch of milestones, a bunch of great games. Like I said, Nicky (Backstrom) and him, the superstars of this team http://www.officialkings.com/authentic-a...ick-jersey , they carry the team every night and it's great to see all four lines chipping in the last couple and it's good to have that support."Backstrom and Andre Burakovsky each had a goal and assist for the Capitals, who had lost four of their previous six games, including back-to-back overtime losses. Philip Grubauer made 32 saves.Nino Niederreiter scored his 100th NHL goal and Eric Staal added his 26th of the season in the third period for the Wild. Devan Dubnyk stopped 22 shots as Minnesota's franchise-record home points streak was snapped at 13 games."For a guy that's played so great recently, it could be arguably said that those were four soft goals tonight," Wild coach Bruce Boudreau said of Dubnyk.Eight goals away from 600 for his career, Ovechkin has particularly tormented the Wild. In 14 career games against Minnesota, he has 15 goals and 10 assists and the Capitals are 10-3-1 in those games.He had a hat trick in each of his last two visits to the Wild's Xcel Energy Center and has a point in 12 straight games against Minnesota."I don't know," Ovechkin said. "Ice is good here Nate Thompson Jersey , atmosphere is good, and I have good luck here too."Wilson scored his eighth goal of the season just 59 seconds into the second period when his wrist shot went through the legs of defenseman Jared Spurgeon and beat Dubnyk, who tried to swipe at the puck with his glove hand as it sailed under his arm.It was the first time in nine home games that the Wild had trailed during regulation. Calgary scored the first two goals on Jan. 9 on the way to an overtime win."I thought we played well," Dubnyk said. "They got a couple breaks and that's the game. We just have to keep playing well. I don't think we expected to win the rest of the games at home. We played a pretty good game. That's all that matters and we'll play a better game next time and get back at it."Oveckhin ended up alone in front of Dubnyk for his goal less than five minutes later."I know when he's dancing out there, he's going to get some points," Capitals coach Barry Trotz said. "He's got a lot of points left in him. He's very productive still."Minnesota scored twice in the third as it put up 18 shots on Grubauer, but Washington countered each time."I think today you can say thanks to Grubby," Ovechkin said. "He was obviously outstanding Authentic Oscar Fantenberg Jersey , especially in the third when they make a push."NOTES: Washington C Jay Beagle was in the lineup after being slashed in the ribs during Tuesday's overtime loss in Winnipeg. . Minnesota scratched D Mike Reilly for the third time in five games along with F Chris Stewart. . Ovechkin has four goals and eight assists in his past seven games. . C Mikko Koivu played in his 900th NHL game, all with the Wild. He's the franchise leader in games, points and assists.UP NEXTCapitals: At Chicago on Saturday night.Wild: Host Anaheim on Saturday.— WASHINGTON (AP) — After four days off — three without practice — the Washington Capitals shook off some expected rust Thursday night in one of their most balanced performances of the season.T.J. Oshie scored his 11th goal of the season on the power play, John Carlson had an empty-netter, and Chandler Stephenson scored at even strength in the Capitals' 3-1 victory over the Carolina Hurricanes."It's a little bit of everything for sure," Capitals coach Todd Reirden said of the Metropolitan Division leaders' third straight victory, and 15th in 18 games. "It's important to find different ways to score and not be one dimensional."Braden Holtby stopped 28 shots in front of a penalty kill that shut down all four Hurricanes power plays, the last coming on a high-sticking minor on Michal Kempny with 3:46 remaining.Washington's only sour spot came midway through the third period Tanner Pearson Jersey , when Matt Niskanen slammed face-first into the boards after tangling with Carolina's Justin Williams and Clark Bishop.Niskanen exited under his own power but did not return, and no boarding penalty was awarded. Less than a minute later, Sebastian Aho scored his team-leading 15th goal in the third period for the Hurricanes to cut it to 2-1.Carolina was without a power-play goal for a fifth consecutive game (18 total chances) and took its third loss in four games."We got going, that's all," Hurricanes coach Rod Brind'Amour said of the third period. "We started to play, and we got one and we got back in the game. And then nothing on the power play at the end. That's definitely been the Achilles heel all year."Petr Mrazek made 30 stops for Carolina, which was outshot 33-29 after entering Thursday averaging a league-best plus-9.6 shot differential.Washington went ahead on the first shot of the second. Pressure from Travis Boyd and Devante Smith-Pelly forced a turnover in Carolina's defensive end about 3 1/2 minutes in, and Stephenson was first to the puck. He put a shot into the top-right corner to beat Mrazek's glove for his second goal in three games.Oshie made it 2-0 with 1:44 left in the period on Washington's fourth power play Jonny Brodzinski Jersey Womens , finding space in front of Mrazek to redirect Carlson's shot from the top of the zone. It was the Capitals' first goal on the man advantage in five games."When you can't find a way to score when you have that much level of talent on a unit, you sometimes have to simplify things," Oshie said. "John made a great play. Shot to an area where I could tip. You just try to get a stick on it."Aho scored when he pounced on a rebound following Holtby's save of Micheal Ferland's breakaway.Holtby and his defense absorbed Carolina's late pressure in the final minutes before Carlson sealed it from his own end with 50 seconds remaining after Nicklas Backstrom's faceoff win."I think there was parts of the game where you just need to survive and get through," Carlson said.NOTES: Rierden said after the game he had yet to speak with his athletic training staff about Niskanen and could not provide an update. … Carlson added his 31st assist. … Capitals D Brooks Orpik missed his 26th game (knee) despite participating in Thursday's morning skate. … Hurricanes D Haydn Fleury (concussion) missed a sixth consecutive game despite also participating in the morning skate.UP NEXTHurricanes: Wrap a two-game trip Saturday at New Jersey.Capitals: Visit Ottawa on Saturday.


text:
Q: Why are my builds failing with "Process 'Gradle Test Executor 1' finished with non-zero exit value 100" I'm trying to build one of our older projects that uses Gradle 4.9.  I'm getting build failures with the message Process 'Gradle Test Executor 1' finished with non-zero exit value 100, but I can't find any information on what that code actually means.  Is there a reference somewhere with these error codes?  I've been unable to find one, but maybe I'm just not looking in the right place.

A: This can happen if a test or any code that is executed by a test is using System.exit. This shuts down the test worker and Gradle assumes it shutdown properly. See this open issue.

A: It appears that exit code 100 refers to a missing file.  After rebuilding the project in three or four different ways, I discovered that a step was errantly deleting a required certificate file, and the Spark service initialization function was bombing (without any kind of error message, which is awesome).

redpajama_set_name: RedPajamaStackExchange


To request a free visitor guide from Red Rock Canyon, Nevada - Hotels, Lodging, please fill out the form below and click "Submit".
Hotels, motels, bed & breakfasts and other types of lodging accommodations in the Red Rock Canyon area are listed below. Click on any hotel name for more information.
The La Quinta Inn and Suites Las Vegas-Red Rock/Summerlin is convenient to everything in the area, and offers greater value than the high-priced resorts. In just a short drive, reach the exciting Las Vegas Strip and Fremont Street.


(Newser) – Twilight, Breaking Dawn: Part One might be just a bit too sparkly for epilepsy sufferers. Several people have reportedly developed seizures during the film's infamous birthing scene, as red, black, and white flash across the screen, ABC News reports. In one case, a Sacramento-area man convulsed so violently that paramedics were called in, and the rest of the screening was canceled.
Not at all surprising. I almost had a brain aneurysm while reading Twilight.
LOL My mother worked 20 years in labor & delivery and said she would see husbands lose their cool over births all the time.


text:
Q: Which of the following CSS tidbits will my broswer parse faster into the document object? I'm trying to optimize my CSS. Which of the following equivalent pieces of code will my browser process faster?
margin: 0px;
margin-right: 10px;

or
margin: 0px 10px 0px 0px;

A: Perhaps just:
margin-right: 10px;

A: Any savings made by choosing one form over the other are utterly negligible in comparison with optimizations that can be made from image processing, cutting down on HTTP calls, removing unnecessary javascript, and other such measures.
The advantage of specifying margin: 0 10px 0 0 over margin-right: 10px is that you're much less likely to suffer from other margin styling declarations acting on whatever you've applied the 10px right margin to. Of course, in some situations, you may want to inherit margin styling from parent elements or classes, so it may be preferable not to specify values.
Optimising css should be done within a broader sweep of web page optimizations; I've yet to have a web page load slowly due to its css file, whereas there are plenty of websites I've abandoned while waiting for some huge image to load, some fancy (but ultimately useless) JS effect, or the mere sight of a flash plugin. Look at Google Page View or Yahoo's YSlow, and concentrate your efforts on areas that will yield noticeable benefits.

A: The render speed in this case would be irrelevant. Let's consider at least two points of view:
1 - Less written stuff:
Defining only shorthanded technically there are less bytes on the file.
margin: 0;
margin-right: 10px;

vs
margin: 0 10px 0 0;

2 - Less rules to render:
On the other hand, shorthanded you'd be making the browser render unecessary rules (top, right, bottom, left), when you could use just one:
margin: 0 10px 0 0; /* Defines top right bottom left; */

vs
margin-right: 10px; /* Only right */

CONCLUSION:
Your decision on use or not an shorthanded property should not be based on speed, but on quality. Shorthands have a specific purpose:
From MDN

Definition
  Shorthand properties are CSS properties that let you set the values of several other CSS properties simultaneously. Using a shorthand property, a Web developer can write more concise and often more readable style sheets, saving time and energy.


text:
Ten Years At Pemaquid Sketches of Its History And Its Ruins
J Henry John Henry Cartland
Authors: J Henry John Henry Cartland
Ten years at pemaquid sketches of its history and its ruins.txt
Claim the "Ten years at pemaquid sketches of its history and its ruins.txt"
Ten years at Pemaquid; sketches of its history and its ruins.txt
Claim the "Ten years at Pemaquid; sketches of its history and its ruins.txt"
Ten years at Pemaquid: sketches of its history and its ruins.txt
Claim the "Ten years at Pemaquid: sketches of its history and its ruins.txt"
A Smaller History of Greece
by Smith, William, Sir, 1813...
Myths And Tales From the White Mountain Apache
by Pliny Earle Goddard
What Became of the Slaves On a Georgia Plantation ...
by Q K Philander Doesticks
History of the Literature of Ancient Greece to the Period of Isocrates
Karl Otfried Mller
History of the Literature of Ancient Greece to the...
by Karl Otfried Mller
The Economics of Railroad Construction
by Webb, Walter Loring, 1863...
The Life of William Henry Harrison of Ohio the Peoples Candidate for the Pr
Isaac R Isaac Rand Jackson
The Life of William Henry Harrison of Ohio the Peo...
by Isaac R Isaac Rand Jackson


text:
Q: Should you use prototype when declaring a namespace in javascript I'm just wondering what the "best" way to do namespacing in javascript is.  I know this has been asked a million times, but I've seen many methods including simply declaring an object as your namespace containings its relevant variables and methods.  Is this the preferred way or is it better to use the the protype construct as in:
function Namespace() {

}

Namespace.prototype.newMethod = function() {

};

//...

// now to use this:
var namespace = new Namespace();
namespace.newMethod();

I'd also like to know why one method is preferred over another.

A: You usually only use the prototype method when you will be creating instances of the Namespace "class".  If the methods are intended to be static (as defined by other OO languages) then simply creating an object and sticking functions on it is the way to go.
In other words, with your code you will be unable to call Namespace.newMethod().  But you could do (new Namespace()).newMethod().  Each approach is for solving a different problem.


His action in settling at Sutanuti or Chuttanutte was a bold one. He had neither authority from the Nawab of Bengal, nor the sanction of the Delhi Emperor .T he latter was seriously incensed against the English owing to an attempt on the part of British Agents at Bombay (Mumbai) and Surat to substitute the Company's rule sea for that of the Great Moghul.
The city of Kolkata stands as one of the unique centres among Indian cities. Vibrant culture, dazzling heritage with a pinch of colonial effect make it an interesting place. To top it all, the Hoogly River forms an integral part of this historical city. Howrah Bridge, Victoria Memorial, Eden Gardens, St.Paul's Cathedral, etc. are familiar but the river ghats of Kolkata are hardly known outside the city or state. Yes, the river ghats of Kolkata have played a major role in Kolkata. Just like the Ganga river ghats in Varanasi, these ghats on the banks of Hooghly River are adored.
Baboo Ghat Baboo ghat or the Babu Ghat is one of the oldest river ghats in Kolkata. It is named after Babu Raj Chandra Das, a zamindar and a rich man during the colonial times. In fact, this ghat was built in the memory of Babu Raj Chandra Das by his wife Rani Rasmoni. Since it was during the colonial times, the entrance to the ghat has been built in Doric-Greek architecture. Today, Baboo Ghat is totally crowded with vendors and passengers crossing the Hooghly River to reach the Howrah station.
Prinsep Ghat Prinsep Ghat was built in the memory of James Prinsep, a British Scholar. The Princep Ghat has a monument which has Greek and Gothic architecture. For many years, the Prinsep Ghat has been one of the hangout spots in Kolkata. The views of Vidya Sagar Setu (Bridge) and the Hoogly River at Prinsep Ghat attracts many visitors.


text:
Posted inBusiness, Top
Ithaca (officially) welcomes Simeon's back to the Commons
by Jolene Almendarez September 29, 2016 September 29, 2016
ITHACA, N.Y. — It's been a long ride of tragedy and uncertainty, but under a steady rain on the Ithaca Commons Thursday morning, a red ribbon was cut in front of Simeon's American Bistro — and it meant the world to people.
"This was, two years ago, the site of one of the darkest chapters in the city's recent history," Mayor Svante Myrick said. "After the accident destroyed the restaurant and killed Amanda (Bush), for weeks afterward, all you could hear was people saying, 'I was there just two hours before. I was there just the day before. I was supposed to have dinner there that evening.' This is everybody's front yard and when tragedy strikes this close to home, we all felt it."
But Myrick said he was fortunate enough to watch owner Dean Zervos, business partners, the Tompkins Trust Company and city of Ithaca officials bring back the iconic restaurant.
Related: Ribbon cutting will officially welcome Simeon's back to downtown Ithaca
The restaurant re-opened for business on Aug. 26 with some former staffers, new employees and an updated look.
"We look at Simeon's as the crown jewel of the Commons renovations," said Ithaca's Director of Planning JoAnn Cornish. "We missed you so much and we're so happy to have you back."
Simeon's American Bistro is located at 224 E. State St. It's open for business
(Photos by Jolene Almendarez/The Ithaca Voice)
Jolene Almendarez
Jolene Almendarez is Managing Editor at The Ithaca Voice. She can be reached at jalmendarez@ithacavoice.com; you can learn more about her at the links in the top right of this box. More by Jolene Almendarez


text:
Q: GetProperty Method returns null C# .Net Can someone please explain, why does the GetProperty method in System.Type returns null for properties that are declared as 'internal' but works for 'public'.
internal class Test{
  public string ALocal { get; set; }
  internal string SLocal { get; set; }}

var test = new Test();
var testType = test.GetType();

var aProp = testType.GetProperty("ALocal"); => returns string Type
var sProp = testType.GetProperty("SLocal"); => returns null

I understand differences between internal or public modifiers.

A: GetProperty Method returns only public properties by default.
You should include following flags
BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static

to get internal type
MSDN:
https://msdn.microsoft.com/en-us/library/zy0d4103(v=vs.110).aspx


Mix Mascarpone, Ginger, Icing Sugar and 2 to 3 Tbsp of Caramel Sauce together until you form a nice smooth caramel looking filling.
Crush half the ginger nuts to form a rough crumb.
Spread the mascarpone onto a pancake then sprinkle with the gingernut soil.
Add another pancake and repeat the first step.
Do a final blob of the filling on top and push a whole gingernut in for decoration.
Drizzle caramel sauce over top to give it the decadent look and finish off the plate with a sprinkling of the gingernut soil.


text:
<?php
// requires PHP exif functions: Your PHP must be compiled in with --enable-exif.

// Include the ThumbNail class
require_once('Thumbnail.class.php');

$image_html = '';

// Open the sample_images subdirectory
$dir = dir('sample_images');
// Read through the files looking for images to convert, and add them to a image_html string
while ($image = $dir->read())
{
  // Get the file extension
  $ext = explode('.',$image);
  $size = count($ext);
  // Check that it's a valid file
  if (($ext[$size-1] == 'png' || $ext[$size-1] == 'jpg' || $ext[$size-1] == 'gif')
      && !preg_match('/^thumb_/', $image)
      && $image != '.' && $image != '..')
  {
    // If no thumbnail exists for this image
    if ( !file_exists('sample_images/thumb_'.$image) )
    {
      // Instantiate the thumbnail without scaling small images
      $tn = new Thumbnail(200, 200, true, false);
      // Create the thumbnail
      $tn->loadFile('sample_images/'.$image);
      $tn->buildThumb('sample_images/thumb_'.$image);
    }
    // Add this image to the image_html string
    // JPG image?
    if($ext[$size-1] == 'jpg')
    {
      // Get Exif data
      $exif_data = exif_read_data( 'sample_images/' . $image );
    }
    else
    {
      // Reset array (prevents images without Exif data displaying data for the previous image)
      $exif_data = array();
    }

    // Start default image output
    $image_html .= '
';
    $image_html .= '
';
    $image_html .= '';
    $image_html .= '';
    $image_html .= '
';
    $image_html .= '
';

    // Add photo date, if set
    if(isset($exif_data['FileDateTime']))
    {
      $image_html .= '
Date: ' .
          date( 'jS F Y',  $exif_data['FileDateTime'] ) . '
';
    }

    // Add camera make, if set
    if(isset( $exif_data['Make']))
    {
      $image_html .= '
Taken with: ' . $exif_data['Make'];

      // Also add camera model, if set
      if(isset($exif_data['Model']))
      {
          $image_html .= ' ' . $exif_data['Model'];
      }
      $image_html .= '
';
    }
    $image_html .= '

';
  }
}
?>
<!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title> Thumbnail Example </title>

Gallery

    <?php echo ( $image_html ); ?>


Last Wednesday evening I had the most delightful January pick-me-up; I made my first sale on Etsy! The item which sold was Dishwater Eyes, one of my first embroideries for my project The Cure for Love, and was a romantic present for the buyer's wife. I've yet to hear whether she was happy with it yet, but I'm very happy that one of my embroideries can be so meaningful for somebody else.
You can now get your hands on your very own Stitch Witches rosette over at my Etsy shop. Now seemed like a good time to make the rosettes available to buy, as Stitch Witches is becoming something of a movement! Our Facebook group has 135 members and counting, and has become a real (virtual) social hub for crafty young women, a source of inspiration, advice, and celebration of our creativity. Hannah and I can't wait to get the zine out and get other Stitch Witches involved in our little (but quickly growing) project.


text:
Melissani Lake
The subterranean lake of Melissani was discovered in 1951 by the speleologist Gianni Petrochilo. The internal part has collapsed along with a major part of the roof revealing a marvellous view. Crystal clear waters and unique geophysical sculptures, seen from a boat that guides you through the entire lake. An unforgettable experience.
Drogarati Cave
Drogarati's Cave, which is close to Sami, was discovered 300 years ago, when a part of it was destroyed because of a strong earthquake, and so the entrance was created. The cave's depth is 60m. from the ground level and it is open for the public since 1963. It's got many stalactites and stalagmites created from the rain. In the big hall of the cave (900m2), call "Sala of Apotheosis" because of its perfect acoustics, are organized music and other shows.
Myrtos Beach
Myrtos beach has been voted the most beautiful beach in Greece for several consecutive years. From the road above you have the most stunning view of the beach, known for the contrast of the white pebble and the shades of blue that the currents create in the sea with the dark green of the area. Here, you can swim and snorkel in the crystal-clear seas or simply stretch out on the sands and wonder at the amazing, dream-like views all around you.
Antisamos Beach
Antisamos is a beach located near the town of Sami. It's a blue flag beach where many scenes of the film "Captain Corelli's mandolin" where shot. The ever emerald blue waters, the small white pebbles, the amazing view, the trees that reach all the way to the water are only few of its attractions. Wild scenery and a landscape that will blow your mind. Antisamos beach is a fully organised beach with restaurants, water sports and sun beds. You can also get there from various walking trails throughout the local mountains, all of them offering an endless shade that seems to come out from a fairy tale.
Assos Village
Assos is a small and picturesque fishing village 36 kilometers away from Argostoli. It is known for its imposing 16th century Venetian fortress. The fortress was built in 1585, when Assos became the capital of the northern part of the island, and it is a typical masterpiece of the Renaissance architecture. Today, one can still see the ruins of the walls, the house of the Venetian chief-master, military buildings and St Marco's church. The beach of Assos can be described as a "family" beach, as it is located in the centre of the village, facing the peninsula of the Castle, thus giving the impression of a protected lake..
Fiscardo Village
Fiscardo is a picturesque and beautiful Greek harbour village on the Northern part of Kefalonia. Among the approximate 365 villages of this large and diverse island, Fiscardo is unique since it was left virtually unscathed during the great earthquake of 1953, that ruined most of the islands historic buildings. Fiscardo at night takes on an entirely different perspective. The lights, the old buildings, cafe, bars and restaurants are all combine to provide a magical Mediterranean atmosphere.
Argostoli is situated at the southern part of the island and it's the capital of Cephalonia since 1797. It is built amphitheatrically at the heart of the deep golf of Koutavos and it has a well organised port. It is the biggest town of the island with rich trade activity, a town that looks to the sea. Its town planning is modern with large streets and many roads for pedestrians. You can visit the Archeological Museum, the Folk Museum, enjoy walking or shopping at the pedestrian road of Lithostroto or by the waterfront. Plenty café and restaurants can be found around the central square of the town, operating from morning till late hours.
Lixouri is the second biggest town of the island. It is situated at the south-western part of the island, in front of Argostoli and both of them are connected with a ferry boat. Lixouri was called "piccolo Parigi"- small Paris - because of a small river that divides the town in two parts, like Sicuana divides Paris. This nick name though comes true because of the intense cultural activity of the town. Protector Saint of the town is the famous local author and poet, Andreas Laskaratos, whose statue overmasters the coastal avenue with its back turned to Argostoli.
Mount Aenos
Mount Aenos is an exceptional natural preserve boasting a forest of the unique black firs of Kefalonia (abies cephalonica). Aenos became widely known as the Monte Negro of Greece due to the dark color of the trees that seemed black when seen from far away. This beautiful National Park hosts a great variety of flora species and a rich fauna including reptiles and birds, such as the hawk, the woodpecker and the blackbird. The most important mammal found here, but unfortunately is under extinction, is the famous Aenos wild horse, which belongs to the Pindos breed and is small and very strong. Visit Aenos and become a part of nature's magic.
The Fortress of Agios Georgios is located at the village Peratata on a 300 m altitude and was probably constructed during the 12th century AD by Byzantine Emperors. It's about 16.000 m2 and its surrounding walls are approximately 600 m long. Inside the walls there were public and private buildings, churches, food and ammunition warehouses, barracks, hospitals, prisons and water tanks. Visitors will also see the remnants of the catholic church of Agios Nikolaos and a tunnel that led from the castle to the lagoon of Koutavos and it was used in case of emergency exit.
Makris & Platis Gialos
Makris & Platis Gialos are another beautiful blue flag beaches, situated just outside Argostoli, in the area of Lassi. Both beaches consist of gold fine sand and crystal clear turquoise waters. The beaches are excellent organized with beach bars, sun beds and umbrellas. Makris & Platis Gialos are excellent choice for a daily tour which combines sea activities and local tastes, even if you are not staying in the area.
Xi Beach
The beach of Xi is situated a few kilometres south of Lixouri town. It is a very long beach and it is famous for the colour of its sand which is red! The water is very shallow at a distance of many meters and the seabed is covered with thin sand. In Xi there is a canteen, a cafe and you may rent umbrellas and deck chairs. Moreover, Xi is ideal for water sports such as jet ski, sea ski, parachute, etc.
Poros Village
Poros is a beautiful, picturesque village, surrounded by the villages Tzanata, Asprogerakas, Kabitsata and Riza. Its port is a significant link between Kefalonia and continental Greece. It was rebuilt after the earthquake of 1953, after the few fishermen's houses were destroyed , it is harmonically constructed at the foot of the mountains Pahi and Atros. A vast indented coastline, that is 2km long, abundant in sandy beaches and leeward ports, comprises its seafront.
Skala Beach
Skala is located at the south - east corner of the island. Beside of the beautiful scenery and the long sandy fully organized beach, here you can also find everything you need from a variety of banks, public services, supermarkets,caffe's, bar restaurants, pharmacies and many more.


text:
"One of the pleasures about owning a sailboat is that you get to sail the boat," Aaron Starkey exclaims from a dive bar booth in the late afternoon sun. "I don't own a sailboat, by the way, but I own a van. So it's similar?"
They continue, "Because if you have a boat, if you have a band, then the boat gets to do things… And if you're not in a band, then you don't get to tour or play shows. So the band facilitates these experiences in your life that can't be, or aren't necessarily attained any other way."
And therein sits the guiding principle of Seattle's Gibraltar: Sail the boat.
So what may have originally began as a voyage across the turbulent waters of himself, a wiser more reflective Starkey now sees Gibraltar functioning as the sum of its parts, existing to produce a kind of catharsis that cracks us all the way open. The sounds to fill the points between tension and release, certainty and doubt, the familiar and the disorienting.
Along with Starkey, pianist Holly Houser and drummer Nick Biscardi now comprise the core trio of Gibraltar. Layers of controlled chaos keep the music energized and energiz-ING. And on their latest offering, "Modern Mischief", the trio incorporates a new element: horns! (Sari Breznau, trumpet + Nate Henry, tenor sax)
"We're louder than we need to be, but [still] not as loud as I want," says Starkey. Though don't let the volume fool you: the music isn't just angsty power-pop. It's also joyful and gentle and weathered and inquisitive. It's about sharing the bruised parts of ourselves, the pained parts, and the healing of connection.
Because creating music is only as good as the people you do it with.
Because there's people on those boats, all working to keep it sailing.
Because that ringing in your ears means you're still alive.
Let's go get into some modern mischief.
"Let's Get Beautiful" -The forthcoming full-length, set to be released in March, 2017, finds the band returning to collaboration with Matt Bayles at the helm and Gibraltar fully exploring their sound, captured primarily with live tracking. "Our goal for this album," says Houser "was a more spacious, stripped down sound that highlights a carefully crafted interplay between instruments and provides moments of tension and release."
"…Seattle post-punk outfit [Gibraltar] has excelled at crafting driving, no-nonsense melodic rock songs that cut like knives. The band fully displays this aesthetic on "Cold," the first single from its upcoming album, Let's Get Beautiful." – Seattle Met Magazine
"Power pop with a hammer and a brain." -Seismic-Sound
"Their edgy, twanged-up power pop is one of the best local debuts of the year." -Seattle Weekly
"…One of the better local EP's I've come across recently. The new Gibraltar EP [Storms] is a mix of raw emotion, and heart felt energy." -John Richards, KEXP
"Gibraltar's shifting dynamics and penchant for emotive, post-punk precision fuels their roaring rock songs."
-Jacob Webb, KEXP
"…a stadium power rock style that includes vibrant guitar leads and steel-your-attention-cymbal-crashes. They are rock incarnate."
-Jake Uitti, The Monarch Review, KEXP
Kelly Fleek // [email protected]
booking contact:
Aaron Starkey // [email protected]
http://www.gibraltartheband.com
http://www.gibraltarsongs.bandcamp.com
http://www.facebook.com/gibraltarsongs
http://www.twitter.com/GibraltarSongs
Copyright 2020 Gibraltar
News & Stuff


With the changes in the publishing world continually happening, we are eager to help find new ways to market yourself and your event.
Book Festival Network uses your event and the internet to give you and your participants more options and more opportunities to market and sell their books.
The concept for the Book Festival Network was created by one man, B Alan Bourgeois. This, however, does not preclude people from joining his team and making this venture successful and valuable to the publishing community.


It's high time to light up the night!
With its latest Shape Your City campaign, Heineken encouraged city dwellers to shape the city they call home by partnering five local creative powerhouses to create innovative and interactive experiences within five capsules of the Singapore Flyer.
The line-up included nightlife connoisseur and "The Producer" of the team, Tracy Phillips, EDM musician and "The Entertainer", MYRNE, "The Sound Artist" James Lye, "The Visual Artist" William Koh and "The Design Ambassador", Yah-Leng Yu.
Taking their creativity to new heights, these "City Shapers" went above and above in transforming the famed icon into an immersive sensorial experience with their unique expertise.
From a skylight capsule featuring a kaleidoscopic cityscape to a sky studio pumping out real-life city beats and sounds, every Shape Your City experience showcased Singapore in a brand new light.
Riding on the visionary talents of the country's top creative movers and shakers, Heineken truly showed the world that when it comes to creativity, the sky's the limit.


• Less is more when it comes to toys. In other words, keep it simple.
Toys that are brightly colored, light up, sing, dance, and have many buttons can be over- stimulating and overwhelming for young children. These toys also operate mostly on their own, leaving little room for the child to take charge and allowing them to become passive in play. During play, children should be as active as possible, steering the experience with their own actions and imaginations while the toy remains passive. That's why I prefer toys that are simple, feature one function, have a clear cause and effect, and allow the child to be more focused and in charge of their experience. Whether it's a puzzle, a board game, or a shape sorter, the activity should be clear and the child should be actively engaging and problem solving in play.
I like to ask myself what underlying skills each toy will help develop. For instance, if a child is 3 years old, there are certain motor, cognitive, and social milestones that they are expected to be meeting for their age (e.g., engaging in pretend play and using their imagination). I like to choose toys that will reinforce those milestones. It's key to note the importance of keeping toys age appropriate, as toys for a younger age group won't help develop new skills, and children may not be ready to get the most out of the experience when rushing ahead to toys for an older age group.
If I have the opportunity to choose a wooden toy over a plastic one, I tend to do that. There are many plastic toys out there that are great. However, wooden toys typically leave more room for open-ended play, imagination, social interaction, critical thinking, and problem solving, as they tend not to have electronic components that can be distracting and direct the experience for the child. I find the simplified nature of wooden toys to be soothing and calming, allowing for more focused play. Wooden toys are also natural, more durable, and more tactile, having slight variations in weight and texture for little hands to explore.
I prefer toys that enable kids to use different senses. Think of the value of hearing a musical instrument, looking into a kaleidoscope, smelling a flower, or feeling through finger paint. Toys that encourage the feel of movement such, as running, jumping, or steering are also incredibly valuable in supporting of coordination and brain development.
Hope you enjoyed the glimpse into my selection process. Next time I share a new toy, you'll have a better understanding of why it made the list.


There is nothing worse than making an important decision without having all the information. A lack of preparation can result in mistakes that can cost you thousands of dollars. At Ideal Lending Solutions, we know that preparation, along with a little bit of education, can go a long way in helping prospective buyers and sellers avoid costly mistakes and ensure a positive and affordable outcome.
You're in the market for a home, but don't know just how much house you can afford.
Learning too late in the buying process that your Realtor represents the seller.
Choosing the wrong mortgage and paying unnecessary interest, closing fees and taxes.
When considering multiple lenders, review all completed Loan Applications with your CPA or a Financial Advisor to ensure you choose the most affordable mortgage.
Purchasing a home and discovering hidden defects after you've closed the deal.
Avoid surprises by hiring an independent professional home inspector It is always worth the additional expense. You'll be glad you did.
Discovering that your credit score is not where it needs to be when you go to buy or refinance.
Work with a mortgage lender in advance. He or she will review your credit rating and recommend steps needed to improve your credit, so you'll be ready when the time comes.
Setting an asking price too high based on personal need or emotions rather than fair market value.
A Realtor can help you determine fair market value using comparable homes recently sold in your area.
Your home has been on the market for some time and just isn't selling.
A good home, priced reasonably may not sell because it hasn't been properly showcased. Before you list your home be sure to repair and clean thoroughly to make the best impression.
You've signed a listing contract with a Realtor, you're unhappy with the results, but you can't get out of the contract.
Tell your Realtor up front that you want to be able to cancel the listing agreement, with no questions asked, before you sign the contract.
Meet with a minimum of three agents and be sure to check references. Make your decision on their track record and their proposed marketing plan for your home.
You've signed a legally binding contract with a lender before you've suddenly learned this transaction will cost you thousands of dollars.
The lender must provide you with a completed Loan Application before closing. Before you sign, review the application with your CPA or Financial Advisor and avoid costly mistakes.
Could you use a Reverse Mortgage in Retirement?
Should You Consider Buying an Airbnb Florida Investment Property?
Are You Getting the Home Tax Deductions You're Entitled To?


text:
Marshall University News
For the news media: Marshall experts on COVID-19 topics
MU Photos
HerdVideo
Dean's and President's Lists
Graduates for May 2022
Marshall Magazine
Board of Governors votes to remove name from campus building
Contact: Leah C. Payne, Director of Communications, 304-696-7153
The Marshall University Board of Governors this morning voted unanimously to remove the name from a building on the Huntington campus.
Board members issued the following statement after the vote:
"The Marshall University Board of Governors voted today to remove the name 'Jenkins Hall' from the Education Building. Upon the recommendation of President Jerome A. Gilbert, the board took this action to serve the university's best interests.
"The board considered this issue last year and decided to allow the name to remain intact, while also reinforcing the university's commitment to the principles of diversity and the equal treatment of all people. A statement released on behalf of the board at that time read, 'Marshall University will constantly confront and challenge bigotry, intolerance and unwarranted discrimination in all of their manifestations.'
"Our board reaffirmed that commitment today by voting, not to erase history, but simply to no longer honor a man whose accomplishments do not provide the university with enduring value.
"Removing the name will allow the board at a future date to honor someone who has made a significant and far-reaching impact on Marshall University through extraordinary public service, service to the university or a major monetary gift.
"The Board of Governors has carefully considered the name of every other campus building and concluded that this is the final step in a thoughtful, university-wide effort to make sure the people we honor represent the ideals of equality and justice embodied by Chief Justice John Marshall."
University officials said the building will be known as the Education Building for the time being.
Also at today's meeting, five new board members were sworn in by Chief Circuit Judge of Cabell County Gregory L. Howard.
The new members are as follows:
Kathy D'Antoni of Cabell County succeeds Timothy Dagostine. D'Antoni lives in Barboursville and is a recently retired education administrator.
Donald R. Holcomb of Raleigh County succeeds Gary White. Holcomb lives in Daniels and is co-owner of Mountaineer Automotive.
Angel R. Moore of Kanawha County succeeds James Bailes. Moore lives in Charleston and is an attorney.
Samuel R. Moore of Cabell County succeeds Christie Kinsey. Moore lives in Huntington and is a minister.
Anna Williams of Cabell County is the new student representative to the board. Williams lives in Huntington and is a senior majoring in public communication and English.
For a complete list of board members and committees, visit www.marshall.edu/board.
More Featured Spotlight News
Amicus Curiae Lecture Series continues with Nadine Strossen
Board of Governors meets in June session
Student wins in Team Case Competition at Beta Gamma Sigma's 2019 Global Leadership Summit
Featured Marshall News
Local Prevention Empowerment Partnership (PEP) staff and youth to present at National Prevention Day Monday
Department of Communication Disorders to hold 'Mandi-Ball'
Spring Green and White Days to take place Feb. 4 and April 1
Study shows impact of vitamin D, thyroid hormones on child development


Builder's Show Highlights Modular/Factory Built Application at Palm Harbor Model Homes Featured in Show Village 2009 – In addition, EZ Stairs® Announced a New Product Innovation in Development of a 'Rail Post Support Application' for use with Exterior Stairs.
Las Vegas, Nevada – January 19, 2009 – EZ Stairs®, a revolutionary advancement in stair building technology and construction, unveiled a new modular/factory built application on display in Palm Harbor's Model Homes featured in Show Village 2009 by the Convention Halls. The award winning EZ Stair® System features patented, adjustable parallel brackets that allow skilled carpenters and professional tradesmen to build stairs of superior strength and structural integrity up to four times faster than conventional methods. This adjustable two stringer stair building system is of particular value in the 'modular/factory built' construction environment due to substantially lower costs that result in builders using this efficient, streamlined technique as part of their basic design for multi-story units.
EZ Stairs® new Tongue & Groove interior system, combined with pre-finished risers and treads can be seen in the Palm Harbor Model Homes in the '09 IBS Show Village. 80% of the final trim work that is traditionally required is completely eliminated with this new innovative T&G Application- equating to major cost savings and additional profits. This new interior stair system allows, for the first time ever- track, modular, factory built and custom home builders to construct and fully install classic knee-wall stairs in 3 hours or less. Research has shown that builders save an average of 36% per flight of stairs using The EZ Stair® System compared to traditional methods of construction. The bottom line- the whole interior stair building process has been drastically simplified by using the most innovative, accurate and seamless system that has ever been available.
Gordon Walker, EZ Stairs® President, announced a major product development with use of its brackets for 'rail post support code requirements' with the addition of the rail post support application for risers and treads in stair building for decks.
EZ Stair® continues to evolve to meet the needs of the stair building marketplace.
Recent testing conducted by Testing Engineers Inc. (San Leandro, CA) has shown that EZ Stairs® brackets well exceed IBC lateral load specified code requirements with minimal deflection- this is a major advancement in the Decking Industry with our outstanding performance in strength and minimal deflection per code requirements. The IBC lateral load rail support requirements are 200 lbs. per 36" (residential), 42" (commercial) and 500 lbs. (ultimate).
Traditional stair construction usually requires multiple cut 2x12's be aligned and positioned at proper intervals serving as vertical support for various designated spans- with or without risers. For this traditional application (without risers), EZ Stairs® brackets can be used along with 2x6 cross blocking and positioned where rail post support is needed. Two 3/8" bolts are inserted through the 14 gauge steel EZ Stairs® bracket and the support post and secured.
The EZ Stairs® system only requires 2 outside stringers for exterior spans up to 7' wide. Where as traditional stair building requires vertical 2x12's as structural support, EZ Stairs® utilizes load bearing risers that provide superior horizontal support performing as load bearing joists.
The EZ Stair® patented adjustable stair building brackets can now be used with 'any' method of stair construction- (traditional saw tooth 2x12's customized and/or pre-cut- with risers or without) to greatly simplify the entire rail support process.
EZ Stairs® brackets are dual purpose for all interior and exterior applications and are available in stainless steel as optimal solution for salt water climates. These brackets are also phosphate treated and powder coated for ACQ compatibility and harsh weather environments.
Copyright © 2019 EZ Stairs, Inc., all rights reserved.


People may remember Reflections, the Flash based laser game where you have to setup mirrors, prisms, beam splitters, etc, to illuminate all the light bulbs.
Well, how about turning that into a competitive board game? That's kind of what Deflexion is. You play against your opponent, each of you trying to setup your pieces to direct your laser to zap their pieces. Looks like fun. I decided to buy a copy to try it out - it isn't cheap though, $45.90 for a board game including shipping and handling. But hey, it has lasers!


text:
Alfredo Morelos faces ban as Rangers striker cops SFA summons over Dundee United flashpoint
Morelos caught United defender Mark Connolly in the face with a forearm in Sunday's encounter.
Fraser Wilson
Join thousands of fans who have signed up to our Rangers newsletter.
Alfredo Morelos has been hit with an SFA notice of complaint over his clash with Dundee United defender Mark Connolly on Sunday.
The Rangers striker was booked by referee Steven McLean for catching the Irishman in the face with his forearm in the 12th minute of his side's 2-1 win at Tannadice.
But he has now been charged with violent conduct after the incident was reviewed.
United boss Micky Mellon reacted furiously to the flashpoint on the touchline while former Ibrox hero Ally McCoist branded the challenge "crazy" during commentary for Sky Sports.
Now Morelos has been cited by SFA compliance officer Clare Whyte over the incident after it was reviewed by a panel of former referees who agreed it was deserving of further action.
It is not an upgrade of the yellow card. Morelos has been cited for violent conduct - a red card offence - after referee McLean said his view of the incident had been obscured during the match.
Rangers' Alfredo Morelos booked by match referee Steven McLean (Image: PA Wire)
A disciplinary hearing will be held on Thursday.
If Rangers accept the charge by tomorrow he will be suspended for the game against St Mirren in the Betfred Cup but if the club fight the ban he will be free to play.
However, if found guilty on Thursday, Morelos will be banned for the weekend visit of Motherwell and next Wednesday's St Johnstone trip.
What Bournemouth pair could offer
Sakala in transfer tease
Fashion Sakala 'perfect' for Rangers
Antwerp problems mount
Whyte - who is leaving her position in the new year - cited Morelos as part of the SFA's fast-track procedures under disciplinary rule 200.
That states: "Where any one of the sending off offences of (A1) serious foul play, (A2) violent conduct, and (A3) spitting at an opponent or any other person is committed by a player at a match, but that sending off offence was not seen by any of the match officials at the time that it was committed, the mandatory suspension for that sending off offence as provided for in Annex C of the Judicial Panel Protocol shall be applied to the player.
"Any Fast Track Notice of Complaint alleging a breach of this rule shall be determined by a Fast Track Tribunal subject to the provisions of Section 13."
Speaking after full-time in the Premiership clash, Rangers boss Steven Gerrard shot down claims his player had elbowed Connolly.
"I didn't see an elbow," he insisted. "If you look at him again, there's no elbow there. The referee saw it and dealt with it.
"It was a foul and a yellow card and it's been dealt with. But if you look at it again, next time I see you you'll say it wasn't an elbow."
Rangers AGM 2020 LIVE reaction as Club 1872, Castore and Ibrox stadium upgrades take centre stage
It comes exactly three months after United defender Ryan Edwards escaped retrospective punishment for a challenge on Morelos in the first meeting of the sides this season at Ibrox.
Edwards' tackle left Morelos with a gash above the knee.
But a panel of ex-referees failed to reach consensus on whether the player was guilty of being reckless or committing serious foul play.


The Album is an experiment that dates back to history of Music from the early stages, harmonizing contemporary music and projecting into the future of music. It's a summary of the activities of Humanity. Ghetto life album is a collaborative album that feature music producers such as CIRUS, DANNIBIZZO, TEEKAY, DOUBLE G and CHARLCE CREATION.
Download ghetto life album Below, give us some shares and don't forget we love comments.


For undergraduate courses in New Religious Movements (NRMs) or Religious Cults.
Taking the approach that new religious movements are neither new nor inherently evil or dangerous, New Religious Movements takes a more historical and cultural perspective than other books on the market.
Elijah Siegler wrote this book to counter the common misconception that NRMs first appeared suddenly in North America and Western Europe in the 1960s and 1970s. He argues that this is a myopic perspective that derives from the fear that "cults" were seducing a young and naïve generation into leaving their comfortable lives and shows that NRMs have been developing across the globe over the last few centuries. Most books about NRMs also begin from the question as to why anyone would join them but Elijah Siegler argues that this is not the most important question for students in classes on NRMs and his text assumes that people join NRMs for all sorts of psychological, theological, or cultural reasons.
How do you teach your course on new religious movements (NRMs)?
An approach that new religious movements (NRMs) are neither new nor inherently evil or dangerous. This text takes the approach that NRMs are best defined as religious groups that are different enough from the values of the culture's dominant religious values to be in high tension with society. The Introduction colorfully demonstrates the variety of NRMs today and how our first impressions of them may be wrong.
Allows students to study NRMs more objectively.
A focus on NRMs as the product of historical processes and a consideration of NRMs around the globe. This text argues that NRMs are a normal response to cultural and social change, not just something that has "happened" to the Western World since the 1960s. The first half of this book examines how today's NRMs are products of historical processes. The second half looks at NRMs around the globe, covering Europe, America, Africa, Asia, East Asia, and the Middle East.
Provides students with a well-rounded introduction to Western and Eastern NRMs.
Accessible and colloquially-written with vivid snapshots of the history and practice of specific NRMs. A close-up section at the end of each chapter focuses inmore detail on key movements such as the Unification Church, Soka Gakkai, and Falun gong.
Helps students to truly understand the variety of NRMs.
Big questions in the academic field of religious studies addressed. This text touches on important issues such as religious identity and prejudice, globalization, heresy, and religion and the state.
Provokes thought and generates discussion.
Is it important to you that your text reflect the latest research?
Up-to-date research. By definition, NRMs are a fast changing phenomenon. This book includes the latest research on important NRMs such as Al-Qaeda and Falun gong. In addition, this text includes a very up-to-date and useful list of accessible books and websites.
Ensures that students receive the most relevant and accurate information about NRMs today.
1: What Are New Religious Movements?
Where are the nineteenth-century new religions now?
Is There a Future for NRMs?


Buckmaster's work on "Sweet Darlin'" is, in particular, a standout, but only because the strings highlight Ann's powerful vocals. Ann had always wanted another shot at "Sweet Darlin'" so it was an ideal choice for Beautiful Broken. "To me the original sounded somehow incomplete," Ann says. This version, with Buckmaster's strings, finishes the song properly, but it also showcases how Ann's voice has remained strong over the decades.
This summer Heart is touring with Joan Jett & the Blackhearts and Cheap Trick, which sounds like an amazing show. If you're interested in seeing if this tremendous trio is coming to your area, visit Heart's website for all of the tour dates.