text:
#include "postgres.h"

#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>

#include "access/htup_details.h"
#include "access/xlog_internal.h"
#include "catalog/pg_authid.h"
#include "catalog/pg_tablespace_d.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "postmaster/syslogger.h"
#include "storage/fd.h"
#include "utils/builtins.h"
#include "utils/memutils.h"
#include "utils/syscache.h"
#include "utils/timestamp.h"
#include "utils/datetime.h"

#ifdef WIN32

#ifdef rename
#undef rename
#endif

#ifdef unlink
#undef unlink
#endif
#endif

typedef struct
{
	char	   *location;
	DIR		   *dirdesc;
	bool		include_dot_dirs;
} directory_fctx;

/*
 * Convert a "text" filename argument to C string, and check it's allowable.
 *
 * Filename may be absolute or relative to the DataDir, but we only allow
 * absolute paths that match DataDir or Log_directory.
 *
 * This does a privilege check against the 'pg_read_server_files' role, so
 * this function is really only appropriate for callers who are only checking
 * 'read' access.  Do not use this function if you are looking for a check
 * for 'write' or 'program' access without updating it to access the type
 * of check as an argument and checking the appropriate role membership.
 */
static char *
convert_and_check_filename(text *arg)
{
	char	   *filename;

	filename = text_to_cstring(arg);
	canonicalize_path(filename);	/* filename can change length here */

	/*
	 * Members of the 'pg_read_server_files' role are allowed to access any
	 * files on the server as the PG user, so no need to do any further checks
	 * here.
	 */
	if (is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_SERVER_FILES))
		return filename;

	/* User isn't a member of the default role, so check if it's allowable */
	if (is_absolute_path(filename))
	{
		/* Disallow '/a/b/data/..' */
		if (path_contains_parent_reference(filename))
			ereport(ERROR,
					(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
					 (errmsg("reference to parent directory (\"..\") not allowed"))));

		/*
		 * Allow absolute paths if within DataDir or Log_directory, even
		 * though Log_directory might be outside DataDir.
		 */
		if (!path_is_prefix_of_path(DataDir, filename) &&
			(!is_absolute_path(Log_directory) ||
			 !path_is_prefix_of_path(Log_directory, filename)))
			ereport(ERROR,
					(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
					 (errmsg("absolute path not allowed"))));
	}
	else if (!path_is_relative_and_below_cwd(filename))
		ereport(ERROR,
				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
				 (errmsg("path must be in or below the current directory"))));

	return filename;
}

/*
 * check for superuser, bark if not.
 */
static void
requireSuperuser(void)
{
	if (!superuser())
		ereport(ERROR,
				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
			  (errmsg("only superuser may access generic file functions"))));
}

/*
 * Read a section of a file, returning it as bytea
 *
 * Caller is responsible for all permissions checking.
 *
 * We read the whole of the file when bytes_to_read is negative.
 */
static bytea *
read_binary_file(const char *filename, int64 seek_offset, int64 bytes_to_read,
				 bool missing_ok)
{
	bytea	   *buf;
	size_t		nbytes;
	FILE	   *file;

	if (bytes_to_read < 0)
	{
		if (seek_offset < 0)
			bytes_to_read = -seek_offset;
		else
		{
			struct stat fst;

			if (stat(filename, &fst) < 0)
			{
				if (missing_ok && errno == ENOENT)
					return NULL;
				else
					ereport(ERROR,
							(errcode_for_file_access(),
							 errmsg("could not stat file \"%s\": %m", filename)));
			}

			bytes_to_read = fst.st_size - seek_offset;
		}
	}

	/* not sure why anyone thought that int64 length was a good idea */
	if (bytes_to_read > (MaxAllocSize - VARHDRSZ))
		ereport(ERROR,
				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
				 errmsg("requested length too large")));

	if ((file = AllocateFile(filename, PG_BINARY_R)) == NULL)
	{
		if (missing_ok && errno == ENOENT)
			return NULL;
		else
			ereport(ERROR,
					(errcode_for_file_access(),
					 errmsg("could not open file \"%s\" for reading: %m",
							filename)));
	}

	if (fseeko(file, (off_t) seek_offset,
			   (seek_offset >= 0) ? SEEK_SET : SEEK_END) != 0)
		ereport(ERROR,
				(errcode_for_file_access(),
				 errmsg("could not seek in file \"%s\": %m", filename)));

	buf = (bytea *) palloc((Size) bytes_to_read + VARHDRSZ);

	nbytes = fread(VARDATA(buf), 1, (size_t) bytes_to_read, file);

	if (ferror(file))
		ereport(ERROR,
				(errcode_for_file_access(),
				 errmsg("could not read file \"%s\": %m", filename)));

	SET_VARSIZE(buf, nbytes + VARHDRSZ);

	FreeFile(file);

	return buf;
}

/*
 * Similar to read_binary_file, but we verify that the contents are valid
 * in the database encoding.
 */
static text *
read_text_file(const char *filename, int64 seek_offset, int64 bytes_to_read,
			   bool missing_ok)
{
	bytea	   *buf;

	buf = read_binary_file(filename, seek_offset, bytes_to_read, missing_ok);

	if (buf != NULL)
	{
		/* Make sure the input is valid */
		pg_verifymbstr(VARDATA(buf), VARSIZE(buf) - VARHDRSZ, false);

		/* OK, we can cast it to text safely */
		return (text *) buf;
	}
	else
		return NULL;
}

/*
 * Read a section of a file, returning it as text
 *
 * This function is kept to support adminpack 1.0.
 */
Datum
pg_read_file(PG_FUNCTION_ARGS)
{
	text	   *filename_t = PG_GETARG_TEXT_PP(0);
	int64		seek_offset = 0;
	int64		bytes_to_read = -1;
	bool		missing_ok = false;
	char	   *filename;
	text	   *result;

	if (!superuser())
		ereport(ERROR,
				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
				 (errmsg("must be superuser to read files with adminpack 1.0"),
		/* translator: %s is a SQL function name */
				  errhint("Consider using %s, which is part of core, instead.",
						  "pg_file_read()"))));

	/* handle optional arguments */
	if (PG_NARGS() >= 3)
	{
		seek_offset = PG_GETARG_INT64(1);
		bytes_to_read = PG_GETARG_INT64(2);

		if (bytes_to_read < 0)
			ereport(ERROR,
					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
					 errmsg("requested length cannot be negative")));
	}
	if (PG_NARGS() >= 4)
		missing_ok = PG_GETARG_BOOL(3);

	filename = convert_and_check_filename(filename_t);

	result = read_text_file(filename, seek_offset, bytes_to_read, missing_ok);
	if (result)
		PG_RETURN_TEXT_P(result);
	else
		PG_RETURN_NULL();
}

/*
 * Read a section of a file, returning it as text
 *
 * No superuser check done here- instead privileges are handled by the
 * GRANT system.
 */
Datum
pg_read_file_v2(PG_FUNCTION_ARGS)
{
	text	   *filename_t = PG_GETARG_TEXT_PP(0);
	int64		seek_offset = 0;
	int64		bytes_to_read = -1;
	bool		missing_ok = false;
	char	   *filename;
	text	   *result;

	/* handle optional arguments */
	if (PG_NARGS() >= 3)
	{
		seek_offset = PG_GETARG_INT64(1);
		bytes_to_read = PG_GETARG_INT64(2);

		if (bytes_to_read < 0)
			ereport(ERROR,
					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
					 errmsg("requested length cannot be negative")));
	}
	if (PG_NARGS() >= 4)
		missing_ok = PG_GETARG_BOOL(3);

	filename = convert_and_check_filename(filename_t);

	result = read_text_file(filename, seek_offset, bytes_to_read, missing_ok);
	if (result)
		PG_RETURN_TEXT_P(result);
	else
		PG_RETURN_NULL();
}

/*
 * Read a section of a file, returning it as bytea
 */
Datum
pg_read_binary_file(PG_FUNCTION_ARGS)
{
	text	   *filename_t = PG_GETARG_TEXT_PP(0);
	int64		seek_offset = 0;
	int64		bytes_to_read = -1;
	bool		missing_ok = false;
	char	   *filename;
	bytea	   *result;

	/* handle optional arguments */
	if (PG_NARGS() >= 3)
	{
		seek_offset = PG_GETARG_INT64(1);
		bytes_to_read = PG_GETARG_INT64(2);

		if (bytes_to_read < 0)
			ereport(ERROR,
					(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
					 errmsg("requested length cannot be negative")));
	}
	if (PG_NARGS() >= 4)
		missing_ok = PG_GETARG_BOOL(3);

	filename = convert_and_check_filename(filename_t);

	result = read_binary_file(filename, seek_offset,
							  bytes_to_read, missing_ok);
	if (result)
		PG_RETURN_BYTEA_P(result);
	else
		PG_RETURN_NULL();
}

/*
 * Wrapper functions for the 1 and 3 argument variants of pg_read_file_v2()
 * and pg_binary_read_file().
 *
 * These are necessary to pass the sanity check in opr_sanity, which checks
 * that all built-in functions that share the implementing C function take
 * the same number of arguments.
 */
Datum
pg_read_file_off_len(PG_FUNCTION_ARGS)
{
	return pg_read_file_v2(fcinfo);
}

Datum
pg_read_file_all(PG_FUNCTION_ARGS)
{
	return pg_read_file_v2(fcinfo);
}

Datum
pg_read_binary_file_off_len(PG_FUNCTION_ARGS)
{
	return pg_read_binary_file(fcinfo);
}

Datum
pg_read_binary_file_all(PG_FUNCTION_ARGS)
{
	return pg_read_binary_file(fcinfo);
}

/*
 * stat a file
 */
Datum
pg_stat_file(PG_FUNCTION_ARGS)
{
	text	   *filename_t = PG_GETARG_TEXT_PP(0);
	char	   *filename;
	struct stat fst;
	Datum		values[6];
	bool		isnull[6];
	HeapTuple	tuple;
	TupleDesc	tupdesc;
	bool		missing_ok = false;

	/* check the optional argument */
	if (PG_NARGS() == 2)
		missing_ok = PG_GETARG_BOOL(1);

	filename = convert_and_check_filename(filename_t);

	if (stat(filename, &fst) < 0)
	{
		if (missing_ok && errno == ENOENT)
			PG_RETURN_NULL();
		else
			ereport(ERROR,
					(errcode_for_file_access(),
					 errmsg("could not stat file \"%s\": %m", filename)));
	}

	/*
	 * This record type had better match the output parameters declared for me
	 * in pg_proc.h.
	 */
	tupdesc = CreateTemplateTupleDesc(6);
	TupleDescInitEntry(tupdesc, (AttrNumber) 1,
					   "size", INT8OID, -1, 0);
	TupleDescInitEntry(tupdesc, (AttrNumber) 2,
					   "access", TIMESTAMPTZOID, -1, 0);
	TupleDescInitEntry(tupdesc, (AttrNumber) 3,
					   "modification", TIMESTAMPTZOID, -1, 0);
	TupleDescInitEntry(tupdesc, (AttrNumber) 4,
					   "change", TIMESTAMPTZOID, -1, 0);
	TupleDescInitEntry(tupdesc, (AttrNumber) 5,
					   "creation", TIMESTAMPTZOID, -1, 0);
	TupleDescInitEntry(tupdesc, (AttrNumber) 6,
					   "isdir", BOOLOID, -1, 0);
	BlessTupleDesc(tupdesc);

	memset(isnull, false, sizeof(isnull));

	values[0] = Int64GetDatum((int64) fst.st_size);
	values[1] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_atime));
	values[2] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_mtime));
	/* Unix has file status change time, while Win32 has creation time */
#if !defined(WIN32) && !defined(__CYGWIN__)
	values[3] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_ctime));
	isnull[4] = true;
#else
	isnull[3] = true;
	values[4] = TimestampTzGetDatum(time_t_to_timestamptz(fst.st_ctime));
#endif
	values[5] = BoolGetDatum(S_ISDIR(fst.st_mode));

	tuple = heap_form_tuple(tupdesc, values, isnull);

	pfree(filename);

	PG_RETURN_DATUM(HeapTupleGetDatum(tuple));
}

/*
 * stat a file (1 argument version)
 *
 * note: this wrapper is necessary to pass the sanity check in opr_sanity,
 * which checks that all built-in functions that share the implementing C
 * function take the same number of arguments
 */
Datum
pg_stat_file_1arg(PG_FUNCTION_ARGS)
{
	return pg_stat_file(fcinfo);
}

/*
 * List a directory (returns the filenames only)
 */
Datum
pg_ls_dir(PG_FUNCTION_ARGS)
{
	FuncCallContext *funcctx;
	struct dirent *de;
	directory_fctx *fctx;
	MemoryContext oldcontext;

	if (SRF_IS_FIRSTCALL())
	{
		bool		missing_ok = false;
		bool		include_dot_dirs = false;

		/* check the optional arguments */
		if (PG_NARGS() == 3)
		{
			if (!PG_ARGISNULL(1))
				missing_ok = PG_GETARG_BOOL(1);
			if (!PG_ARGISNULL(2))
				include_dot_dirs = PG_GETARG_BOOL(2);
		}

		funcctx = SRF_FIRSTCALL_INIT();
		oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);

		fctx = palloc(sizeof(directory_fctx));
		fctx->location = convert_and_check_filename(PG_GETARG_TEXT_PP(0));

		fctx->include_dot_dirs = include_dot_dirs;
		fctx->dirdesc = AllocateDir(fctx->location);

		if (!fctx->dirdesc)
		{
			if (missing_ok && errno == ENOENT)
			{
				MemoryContextSwitchTo(oldcontext);
				SRF_RETURN_DONE(funcctx);
			}
			else
				ereport(ERROR,
						(errcode_for_file_access(),
						 errmsg("could not open directory \"%s\": %m",
								fctx->location)));
		}
		funcctx->user_fctx = fctx;
		MemoryContextSwitchTo(oldcontext);
	}

	funcctx = SRF_PERCALL_SETUP();
	fctx = (directory_fctx *) funcctx->user_fctx;

	while ((de = ReadDir(fctx->dirdesc, fctx->location)) != NULL)
	{
		if (!fctx->include_dot_dirs &&
			(strcmp(de->d_name, ".") == 0 ||
			 strcmp(de->d_name, "..") == 0))
			continue;

		SRF_RETURN_NEXT(funcctx, CStringGetTextDatum(de->d_name));
	}

	FreeDir(fctx->dirdesc);

	SRF_RETURN_DONE(funcctx);
}

/*
 * List a directory (1 argument version)
 *
 * note: this wrapper is necessary to pass the sanity check in opr_sanity,
 * which checks that all built-in functions that share the implementing C
 * function take the same number of arguments.
 */
Datum
pg_ls_dir_1arg(PG_FUNCTION_ARGS)
{
	return pg_ls_dir(fcinfo);
}

/* ------------------------------------
 * pg_file_write_internal - Workhorse for pg_file_write functions.
 *
 * This handles the actual work for pg_file_write.
 */
static int64
pg_file_write_internal(text *file, text *data, bool replace)
{
	FILE       *f;
	char       *filename;
	int64           count = 0;

	filename = convert_and_check_filename(file);

	if (!replace)
	{
		struct stat fst;

		if (stat(filename, &fst) >= 0)
			ereport(ERROR,
					(errcode(ERRCODE_DUPLICATE_FILE),
					 errmsg("file \"%s\" exists", filename)));

		f = AllocateFile(filename, "wb");
	}
	else
		f = AllocateFile(filename, "ab");

	if (!f)
		ereport(ERROR,
				(errcode_for_file_access(),
				 errmsg("could not open file \"%s\" for writing: %m",
					 filename)));

	count = fwrite(VARDATA_ANY(data), 1, VARSIZE_ANY_EXHDR(data), f);
	if (count != VARSIZE_ANY_EXHDR(data) || FreeFile(f))
		ereport(ERROR,
				(errcode_for_file_access(),
				 errmsg("could not write file \"%s\": %m", filename)));

	return (count);
}

/* ------------------------------------
 * pg_file_write - old version
 *
 * keep the superuser check
 */
Datum
pg_file_write(PG_FUNCTION_ARGS)
{
	text	   *file = PG_GETARG_TEXT_PP(0);
	text	   *data = PG_GETARG_TEXT_PP(1);
	bool		replace = PG_GETARG_BOOL(2);
	int64		count = 0;

	requireSuperuser();

	count = pg_file_write_internal(file, data, replace);

	PG_RETURN_INT64(count);
}

/* ------------------------------------
 * pg_file_write_v1_1 - Version 1.1
 *
 * No superuser check done here- instead privileges are handled by the
 * GRANT system.
 */
Datum
pg_file_write_v1_1(PG_FUNCTION_ARGS)
{
	text	   *file = PG_GETARG_TEXT_PP(0);
	text	   *data = PG_GETARG_TEXT_PP(1);
	bool		replace = PG_GETARG_BOOL(2);
	int64		count = 0;

	count = pg_file_write_internal(file, data, replace);

	PG_RETURN_INT64(count);
}

/* ------------------------------------
 * pg_file_rename_internal - Workhorse for pg_file_rename functions.
 *
 * This handles the actual work for pg_file_rename.
 */
static bool
pg_file_rename_internal(text *file1, text *file2, text *file3)
{
	char	   *fn1,
			   *fn2,
			   *fn3;
	int			rc;

	fn1 = convert_and_check_filename(file1);
	fn2 = convert_and_check_filename(file2);

	if (file3 == NULL)
		fn3 = NULL;
	else
		fn3 = convert_and_check_filename(file3);

	if (access(fn1, W_OK) < 0)
	{
		ereport(WARNING,
				(errcode_for_file_access(),
				 errmsg("file \"%s\" is not accessible: %m", fn1)));

		return false;
	}

	if (fn3 && access(fn2, W_OK) < 0)
	{
		ereport(WARNING,
				(errcode_for_file_access(),
				 errmsg("file \"%s\" is not accessible: %m", fn2)));

		return false;
	}

	rc = access(fn3 ? fn3 : fn2, W_OK);
	if (rc >= 0 || errno != ENOENT)
	{
		ereport(ERROR,
				(errcode(ERRCODE_DUPLICATE_FILE),
				 errmsg("cannot rename to target file \"%s\"",
						fn3 ? fn3 : fn2)));
	}

	if (fn3)
	{
		if (rename(fn2, fn3) != 0)
		{
			ereport(ERROR,
					(errcode_for_file_access(),
					 errmsg("could not rename \"%s\" to \"%s\": %m",
							fn2, fn3)));
		}
		if (rename(fn1, fn2) != 0)
		{
			ereport(WARNING,
					(errcode_for_file_access(),
					 errmsg("could not rename \"%s\" to \"%s\": %m",
							fn1, fn2)));

			if (rename(fn3, fn2) != 0)
			{
				ereport(ERROR,
						(errcode_for_file_access(),
						 errmsg("could not rename \"%s\" back to \"%s\": %m",
								fn3, fn2)));
			}
			else
			{
				ereport(ERROR,
						(errcode(ERRCODE_UNDEFINED_FILE),
						 errmsg("renaming \"%s\" to \"%s\" was reverted",
								fn2, fn3)));
			}
		}
	}
	else if (rename(fn1, fn2) != 0)
	{
		ereport(ERROR,
				(errcode_for_file_access(),
				 errmsg("could not rename \"%s\" to \"%s\": %m", fn1, fn2)));
	}

	return true;
}

/* ------------------------------------
 * pg_file_rename - old version
 *
 * keep the superuser check
 */
Datum
pg_file_rename(PG_FUNCTION_ARGS)
{
	text	   *file1;
	text	   *file2;
	text	   *file3;
	bool		result;

	requireSuperuser();

	if (PG_ARGISNULL(0) || PG_ARGISNULL(1))
		PG_RETURN_NULL();

	file1 = PG_GETARG_TEXT_PP(0);
	file2 = PG_GETARG_TEXT_PP(1);

	if (PG_ARGISNULL(2))
		file3 = NULL;
	else
		file3 = PG_GETARG_TEXT_PP(2);

	result = pg_file_rename_internal(file1, file2, file3);

	PG_RETURN_BOOL(result);
}

/* ------------------------------------
 * pg_file_rename_v1_1 - Version 1.1
 *
 * No superuser check done here- instead privileges are handled by the
 * GRANT system.
 */
Datum
pg_file_rename_v1_1(PG_FUNCTION_ARGS)
{
	text	   *file1;
	text	   *file2;
	text	   *file3;
	bool		result;

	if (PG_ARGISNULL(0) || PG_ARGISNULL(1))
		PG_RETURN_NULL();

	file1 = PG_GETARG_TEXT_PP(0);
	file2 = PG_GETARG_TEXT_PP(1);

	if (PG_ARGISNULL(2))
		file3 = NULL;
	else
		file3 = PG_GETARG_TEXT_PP(2);

	result = pg_file_rename_internal(file1, file2, file3);

	PG_RETURN_BOOL(result);
}

/* ------------------------------------
 * pg_file_unlink - old version
 *
 * keep the superuser check
 */
Datum
pg_file_unlink(PG_FUNCTION_ARGS)
{
	char	   *filename;

	requireSuperuser();

	filename = convert_and_check_filename(PG_GETARG_TEXT_PP(0));

	if (access(filename, W_OK) < 0)
	{
		if (errno == ENOENT)
			PG_RETURN_BOOL(false);
		else
			ereport(ERROR,
					(errcode_for_file_access(),
					 errmsg("file \"%s\" is not accessible: %m", filename)));
	}

	if (unlink(filename) < 0)
	{
		ereport(WARNING,
				(errcode_for_file_access(),
				 errmsg("could not unlink file \"%s\": %m", filename)));

		PG_RETURN_BOOL(false);
	}
	PG_RETURN_BOOL(true);
}

/* ------------------------------------
 * pg_file_unlink_v1_1 - Version 1.1
 *
 * No superuser check done here- instead privileges are handled by the
 * GRANT system.
 */
Datum
pg_file_unlink_v1_1(PG_FUNCTION_ARGS)
{
	char	   *filename;

	filename = convert_and_check_filename(PG_GETARG_TEXT_PP(0));

	if (access(filename, W_OK) < 0)
	{
		if (errno == ENOENT)
			PG_RETURN_BOOL(false);
		else
			ereport(ERROR,
					(errcode_for_file_access(),
					 errmsg("file \"%s\" is not accessible: %m", filename)));
	}

	if (unlink(filename) < 0)
	{
		ereport(WARNING,
				(errcode_for_file_access(),
				 errmsg("could not unlink file \"%s\": %m", filename)));

		PG_RETURN_BOOL(false);
	}
	PG_RETURN_BOOL(true);
}

Datum
pg_file_length(PG_FUNCTION_ARGS)
{
	text	   *filename_t = PG_GETARG_TEXT_P(0);
	char	   *filename;
	struct stat fst;

	requireSuperuser();

	filename = convert_and_check_filename(filename_t);

	if (stat(filename, &fst) < 0)
		ereport(ERROR,
				(errcode_for_file_access(),
				 errmsg("could not stat file \"%s\": %m", filename)));

	PG_RETURN_INT64((int64) fst.st_size);
}

static Datum
pg_logdir_ls_internal(FunctionCallInfo fcinfo)
{
	FuncCallContext *funcctx;
	struct dirent *de;
	directory_fctx *fctx;
	bool prefix_is_gpdb = true;

	if (strcmp(Log_filename, "gpdb-%Y-%m-%d_%H%M%S.csv") != 0 &&
		strcmp(Log_filename, "gpdb-%Y-%m-%d_%H%M%S.log") != 0 &&
		strcmp(Log_filename, "postgresql-%Y-%m-%d_%H%M%S.log") != 0)
		ereport(ERROR,
				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
				 (errmsg("the log_filename parameter must equal 'gpdb-%%Y-%%m-%%d_%%H%%M%%S.csv'"))));

	if (strncmp(Log_filename, "gpdb", 4) != 0)
		prefix_is_gpdb = false;

	if (SRF_IS_FIRSTCALL())
	{
		MemoryContext oldcontext;
		TupleDesc	tupdesc;

		funcctx = SRF_FIRSTCALL_INIT();
		oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);

		fctx = palloc(sizeof(directory_fctx));

		tupdesc = CreateTemplateTupleDesc(2);
		TupleDescInitEntry(tupdesc, (AttrNumber) 1, "starttime",
						   TIMESTAMPOID, -1, 0);
		TupleDescInitEntry(tupdesc, (AttrNumber) 2, "filename",
						   TEXTOID, -1, 0);

		funcctx->attinmeta = TupleDescGetAttInMetadata(tupdesc);

		fctx->location = pstrdup(Log_directory);
		fctx->dirdesc = AllocateDir(fctx->location);

		if (!fctx->dirdesc)
			ereport(ERROR,
					(errcode_for_file_access(),
					 errmsg("could not open directory \"%s\": %m",
							fctx->location)));

		funcctx->user_fctx = fctx;
		MemoryContextSwitchTo(oldcontext);
	}

	funcctx = SRF_PERCALL_SETUP();
	fctx = (directory_fctx *) funcctx->user_fctx;

	while ((de = ReadDir(fctx->dirdesc, fctx->location)) != NULL)
	{
		char	   *values[2];
		HeapTuple	tuple;
		char		timestampbuf[32];
		char	   *field[MAXDATEFIELDS];
		char		lowstr[MAXDATELEN + 1];
		int			dtype;
		int			nf,
					ftype[MAXDATEFIELDS];
		fsec_t		fsec;
		int			tz = 0;
		struct pg_tm date;

		if (prefix_is_gpdb)
		{
			/*
			 * Default format: gpdb-YYYY-MM-DD_HHMMSS.log or gpdb-YYYY-MM-DD_HHMMSS.csv
			 */
			if (strlen(de->d_name) != 26
				|| strncmp(de->d_name, "gpdb-", 5) != 0
				|| de->d_name[15] != '_'
				|| (strcmp(de->d_name + 22, ".log") != 0 && strcmp(de->d_name + 22, ".csv") != 0))
				continue;
			/* extract timestamp portion of filename */
			snprintf(timestampbuf, sizeof(timestampbuf), "%s", de->d_name + 5);
			timestampbuf[17] = '\0';
		}
		else
		{
			/*
			 * Default format: postgresql-YYYY-MM-DD_HHMMSS.log
			 */
			if (strlen(de->d_name) != 32
				|| strncmp(de->d_name, "postgresql-", 11) != 0
				|| de->d_name[21] != '_'
				|| strcmp(de->d_name + 28, ".log") != 0)
				continue;

			/* extract timestamp portion of filename */
			snprintf(timestampbuf, sizeof(timestampbuf), "%s", de->d_name + 11);
			timestampbuf[17] = '\0';
		}

		/* parse and decode expected timestamp to verify it's OK format */
		if (ParseDateTime(timestampbuf, lowstr, MAXDATELEN, field, ftype, MAXDATEFIELDS, &nf))
			continue;

		if (DecodeDateTime(field, ftype, nf, &dtype, &date, &fsec, &tz))
			continue;

		/* Seems the timestamp is OK; prepare and return tuple */

		values[0] = timestampbuf;
		values[1] = psprintf("%s/%s", fctx->location, de->d_name);

		tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);

		SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple));
	}

	FreeDir(fctx->dirdesc);
	SRF_RETURN_DONE(funcctx);
}

/* ------------------------------------
 * pg_logdir_ls - Old version
 *
 * keep the superuser check
 */
Datum
pg_logdir_ls(PG_FUNCTION_ARGS)
{
	if (!superuser())
		ereport(ERROR,
				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
				 (errmsg("only superuser can list the log directory"))));

	return (pg_logdir_ls_internal(fcinfo));
}

/* ------------------------------------
 * pg_logdir_ls_v1_1 - Version 1.1
 *
 * No superuser check done here- instead privileges are handled by the
 * GRANT system.
 */
Datum
pg_logdir_ls_v1_1(PG_FUNCTION_ARGS)
{
	return (pg_logdir_ls_internal(fcinfo));
}

/* Generic function to return a directory listing of files */
static Datum
pg_ls_dir_files(FunctionCallInfo fcinfo, const char *dir, bool missing_ok)
{
	FuncCallContext *funcctx;
	struct dirent *de;
	directory_fctx *fctx;

	if (SRF_IS_FIRSTCALL())
	{
		MemoryContext oldcontext;
		TupleDesc	tupdesc;

		funcctx = SRF_FIRSTCALL_INIT();
		oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);

		fctx = palloc(sizeof(directory_fctx));

		tupdesc = CreateTemplateTupleDesc(3);
		TupleDescInitEntry(tupdesc, (AttrNumber) 1, "name",
						   TEXTOID, -1, 0);
		TupleDescInitEntry(tupdesc, (AttrNumber) 2, "size",
						   INT8OID, -1, 0);
		TupleDescInitEntry(tupdesc, (AttrNumber) 3, "modification",
						   TIMESTAMPTZOID, -1, 0);
		funcctx->tuple_desc = BlessTupleDesc(tupdesc);

		fctx->location = pstrdup(dir);
		fctx->dirdesc = AllocateDir(fctx->location);

		if (!fctx->dirdesc)
		{
			if (missing_ok && errno == ENOENT)
			{
				MemoryContextSwitchTo(oldcontext);
				SRF_RETURN_DONE(funcctx);
			}
			else
				ereport(ERROR,
						(errcode_for_file_access(),
						 errmsg("could not open directory \"%s\": %m",
								fctx->location)));
		}

		funcctx->user_fctx = fctx;
		MemoryContextSwitchTo(oldcontext);
	}

	funcctx = SRF_PERCALL_SETUP();
	fctx = (directory_fctx *) funcctx->user_fctx;

	while ((de = ReadDir(fctx->dirdesc, fctx->location)) != NULL)
	{
		Datum		values[3];
		bool		nulls[3];
		char		path[MAXPGPATH * 2];
		struct stat attrib;
		HeapTuple	tuple;

		/* Skip hidden files */
		if (de->d_name[0] == '.')
			continue;

		/* Get the file info */
		snprintf(path, sizeof(path), "%s/%s", fctx->location, de->d_name);
		if (stat(path, &attrib) < 0)
			ereport(ERROR,
					(errcode_for_file_access(),
					 errmsg("could not stat directory \"%s\": %m", dir)));

		/* Ignore anything but regular files */
		if (!S_ISREG(attrib.st_mode))
			continue;

		values[0] = CStringGetTextDatum(de->d_name);
		values[1] = Int64GetDatum((int64) attrib.st_size);
		values[2] = TimestampTzGetDatum(time_t_to_timestamptz(attrib.st_mtime));
		memset(nulls, 0, sizeof(nulls));

		tuple = heap_form_tuple(funcctx->tuple_desc, values, nulls);
		SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple));
	}

	FreeDir(fctx->dirdesc);
	SRF_RETURN_DONE(funcctx);
}

/* Function to return the list of files in the log directory */
Datum
pg_ls_logdir(PG_FUNCTION_ARGS)
{
	return pg_ls_dir_files(fcinfo, Log_directory, false);
}

/* Function to return the list of files in the WAL directory */
Datum
pg_ls_waldir(PG_FUNCTION_ARGS)
{
	return pg_ls_dir_files(fcinfo, XLOGDIR, false);
}

/*
 * Generic function to return the list of files in pgsql_tmp
 */
static Datum
pg_ls_tmpdir(FunctionCallInfo fcinfo, Oid tblspc)
{
	char		path[MAXPGPATH];

	if (!SearchSysCacheExists1(TABLESPACEOID, ObjectIdGetDatum(tblspc)))
		ereport(ERROR,
				(errcode(ERRCODE_UNDEFINED_OBJECT),
				 errmsg("tablespace with OID %u does not exist",
						tblspc)));

	TempTablespacePath(path, tblspc);
	return pg_ls_dir_files(fcinfo, path, true);
}

/*
 * Function to return the list of temporary files in the pg_default tablespace's
 * pgsql_tmp directory
 */
Datum
pg_ls_tmpdir_noargs(PG_FUNCTION_ARGS)
{
	return pg_ls_tmpdir(fcinfo, DEFAULTTABLESPACE_OID);
}

/*
 * Function to return the list of temporary files in the specified tablespace's
 * pgsql_tmp directory
 */
Datum
pg_ls_tmpdir_1arg(PG_FUNCTION_ARGS)
{
	return pg_ls_tmpdir(fcinfo, PG_GETARG_OID(0));
}

/*
 * Function to return the list of files in the WAL archive status directory.
 */
Datum
pg_ls_archive_statusdir(PG_FUNCTION_ARGS)
{
	return pg_ls_dir_files(fcinfo, XLOGDIR "/archive_status", true);
}

redpajama_set_name: RedPajamaGithub


text:
Q: Animation between Activities and shared views: glitchy/hack at the ends of animation? So, the problem I am facing is that the animation I do between two Activities and two shared views is not looking great.
The problem is that its "glitchy", when going from Activity2 back to Activity1, the TextViews being shared sort of blinks at the end of the animation, revealing the "bigger text" from Activity2 for a fraction of a second, so it "blinks".
Activity 1 (RecyclerView with three items):

Activity 2 (Details):

I filmed the screen, while doing the animation. When going back from Activity2 to Activit2, you can see the text blink at the very end. This video (36MB, sorry for size) shows it:
https://drive.google.com/file/d/0B3wIZ9CS9Kj_a0MyVFlzX1YtY0E/view?usp=sharing
The question is: what I am doing wrong? Why is it blinking like that? I see videos on other anims, and they are all super smooth and nice.
I have tested different type of transitions (changeBounds, explode, etc etc), but there is always something weird going on. Any tips, ideas would be greatly appreciated =)
MY CODE
MainActivity (Activity1):
package se.snapcode.lollipoptest;

import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.util.Pair;
import android.view.GestureDetector;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v7.widget.RecyclerView;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends Activity {

    private RecyclerView mRecyclerView;
    private MyAdapter mAdapter;
    private RecyclerView.LayoutManager mLayoutManager;
    GestureDetectorCompat gestureDetector;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);

        // use this setting to improve performance if you know that changes
        // in content do not change the layout size of the RecyclerView
        mRecyclerView.setHasFixedSize(true);

        // use a linear layout manager
        mLayoutManager = new LinearLayoutManager(this);
        mRecyclerView.setLayoutManager(mLayoutManager);

        // specify an adapter (see also next example)
        String[] strings = new String[3];
        strings[0] = "A1";
        strings[1] = "A2";
        strings[2] = "A3";
        mAdapter = new MyAdapter(strings);
        mRecyclerView.setAdapter(mAdapter);

        mAdapter.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(View view, int position) {
                final TextView headerView = (TextView)view.findViewById(R.id.textView1);
                final TextView textView = (TextView)view.findViewById(R.id.textView2);
                Intent intent = new Intent(MainActivity.this, DetailsActivity.class);
                intent.putExtra("header", headerView.getText().toString());
                intent.putExtra("text", textView.getText().toString());

                ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(MainActivity.this, Pair.create((View)headerView, "header"),
                        Pair.create((View)textView, "text"));

                startActivity(intent, options.toBundle());
            }
        });

        RecyclerView.ItemDecoration itemDecoration =
                new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST);
        mRecyclerView.addItemDecoration(itemDecoration);

        // this is the default; this call is actually only necessary with custom ItemAnimators
        mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    }
}

DetailsActivity (Activity2):
package se.snapcode.lollipoptest;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;

public class DetailsActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_details);

        String header = getIntent().getStringExtra("header");
        String text = getIntent().getStringExtra("text");

        TextView tv1 = (TextView)findViewById(R.id.tv_details_header);
        tv1.setText(header);
        TextView tv2 = (TextView)findViewById(R.id.tv_details_text);
        tv2.setText(text);
    }
}

And the layouts, first my_text_view that is in the list of the RecyclerView:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clickable="true"
    android:focusable="true"
    android:background="?android:attr/selectableItemBackground"
    android:colorControlHighlight="@android:color/holo_blue_light"
    android:padding="10dp">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="MY HEADER IS HERE"
        android:transitionName="header"
        android:id="@+id/textView1" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:text="This is some text that is of relevance"
        android:transitionName="text"
        android:id="@+id/textView2" />
</LinearLayout>

And the activity_details.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:orientation="vertical"
    tools:context="se.snapcode.lollipoptest.DetailsActivity">

    <TextView android:id="@+id/tv_details_header" android:text="A1" android:layout_width="wrap_content"
        android:transitionName="header"
        android:textSize="48dp"
        android:layout_height="wrap_content" />

    <TextView android:id="@+id/tv_details_text" android:text="Some text of lesser importance" android:layout_width="wrap_content"
        android:textSize="24dp"
        android:transitionName="text"
        android:layout_height="wrap_content" />

</LinearLayout>

And the transition xml (in /res/transition):
<?xml version="1.0" encoding="utf-8"?>
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
    <changeBounds/>
    <explode />
</transitionSet>

and the styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AppTheme" parent="android:Theme.Material.Light">
        <!-- enable window content transitions -->
        <item name="android:windowContentTransitions">true</item>

        <!-- specify enter and exit transitions -->
        <item name="android:windowEnterTransition">@android:transition/slide_left</item>
        <item name="android:windowExitTransition">@android:transition/slide_right</item>

        <!-- specify shared element transitions -->
        <item name="android:windowSharedElementEnterTransition">
            @transition/change_image_transform</item>
        <item name="android:windowSharedElementExitTransition">
            @transition/change_image_transform</item>
    </style>
</resources>

A: The problem is that you are trying to animate a TextView's size as a shared element using a ChangeBounds transition. This will not work because of the way ChangeBounds works. The ChangeBounds transition analyzes the layout bounds of a view at the start and end of the transition and animates between the two. ChangeBounds works for arbitrary views, so it will not call setTextSize() on your TextView during the transition for you... this is something you would need to do yourself using a custom transition if you wanted to see the TextView's size seamlessly increase/decrease during the animation. There is some information on how to do this in this StackOverflow answer.

redpajama_set_name: RedPajamaStackExchange


Annual Icarda Report Icarda Report Icarda 2005 2005 Report Annual Annual Deputies, when they interviewed Wright at Tanger Outlets, asked him what he planned to do with the jewelry from Kay's if he had been successful.
Icarda Annual Annual Icarda Report 2005 2005 Report Annual Report Icarda Power to the well was shut off, then crews set up a boom around the spill to prevent any further encroachment on the waterway. Authorities said only a portion of the estimated spill reached the bayou.


DESCRIPTION: Substantial semi-detached Hotel located immediately off the Promenade between Central & South Pier. Excellent 3 star family hotel close to the beach, Sandcastle Water Park, Pleasure Beach and all amenities. The 12 bedroom hotel is operating 10 bedrooms with 3 x 2 room family suites with en suite facilities, TV's, tea/coffee making facilities, heaters and hair dryers. Excellent family bar lounge plus separate breakfast room providing comfortable public facilities. Self-contained owners accommodation offers a lounge, double en-suite, 2 double bedrooms and family bathroom. The business enjoys good repeat business and advance bookings with strong Trip Advisor reviews together with exceptional ratings (9.6) on Booking.com. Viewing recommended. Optional 7 car garage available if required.
LOCATION: On Alexandra Road at South Shore near to the Promenade between Central & South Pier and close to all attractions.
Exterior: Side parking for 2 cars with potential to increase to 4, presently in use as a private decked garden area.
BUSINESS: The hotel is fully equipped to cater for 30 guests including rotary toaster, 6 burner cooker, grill, Bain Marie, hot cupboard, dish washer, fridge and freezer. A full inventory will be prepared by Kays prior to exchange of contracts. The business trades on strong regular repeat business with the turnover averaging between £65,000 & £70,000, bed & breakfast February to November. Strong advance bookings and deposits. The purchaser would benefit from these deposits if they purchase prior to the season.


text:
Mysidopsis furca är en kräftdjursart som beskrevs av Bowman 1957. Mysidopsis furca ingår i släktet Mysidopsis och familjen Mysidae. Inga underarter finns listade i Catalogue of Life.

Källor

Pungräkor
furca

redpajama_set_name: RedPajamaWikipedia


text:
Langs het spoor, noto anche con il titolo Voyage au pays du rail, è un documentario del 1951, diretto da Charles Dekeukeleire , realizzato per conto della Nationale Maatschappij der Belgische Spoorwegen (Società Nazionale delle Ferrovie del Belgio).

Trama

Note

Bibliografia

Collegamenti esterni


As chief entertainer at this Iris Parc campsite, you have the final responsibility of the team and the animation programme. Together with your team of 8 to 9 entertainers, you provide fun and qualitative entertainment for all guests: kids, teenagers, the entire family!
During the week, you create the staff planning and the animation programme. Furthermore, you guide and motivate your employees and trainees. You are also responsible for the promotion of the animation programme and you are the first contact person for the French campsite director. In addition, you discuss the programme with the reception manager and hospitality manager to see how you can effectively work together to make every game or activity a big success!
What do I get as a chief entertainer at this park?
What else: Travel allowance of max. €235,-, travel insurance, fun reunion with all your colleagues at the end of the season, new friends and of course an unforgettable experience!
Personality:: You work organised, you know how to guide and motivate a team and you, of all people, know how to cooperate and perform daily activities. Family and friends know you as a very positive and fun person, with lots of perseverance and creativity!
Ready for this adventure? Apply now through the button below or contact Yvonne through WhatsApp: +31 6 31 95 99 39! We'll get in touch within 2 working days!


text:
class Forgan < Formula
  desc "File ORGANize utils written with Go"
  homepage "https://github.com/muniere/forgan"
  url "https://github.com/muniere/forgan/archive/v0.1.0.tar.gz"
  sha256 "d7ef9ebdbf35a379774a0d0e67f8ed15df6076d7451e31a71e8fe95ba5b1e8f5"
  head "https://github.com/muniere/forgan.git"

  depends_on "dep" => :build
  depends_on "go" => :build

  def apps
    cmds.map { |x| ".bin/#{x}" }
  end

  def cmds
    ["count", "numberize", "randomize"]
  end

  def install
    ENV["GOPATH"] = buildpath

    srcpath = buildpath/"src/github.com/muniere/forgan/"
    srcpath.install buildpath.children

    cd srcpath do
      system "make deps"
      system "make"
      bin.install apps
    end
  end

  test do
    cmds.each do |cmd|
      system cmd, "--help"
    end
  end
end


Fantastic location, great value, lovely home.
Aim for Brides les Bains Tourist office or Marie which is the same building centre ville. Standing in front of the tourist office you will see Ave du Compte Greffie de Bellecome directly opposite. Travel up the road for 130M (approx) and La Cascade is on the left hand side of the road just before Hotel Les Chalets.


text:
Iowa Caucus App Developed By Shadow / Acronym Whose Founder is Married to Buttigieg Staffer
Politics, Technology Pete Buttigieg, Presidential Race 2020	0
The malfunctioning app used for tallying the votes in the Iowa caucuses of the Democratic Party was developed by Shadow, Inc.
Shadow Inc. is a technology and software development company whose stated aim is to "build political power for the progressive movement." It boasts that its technology has been used by Google, Kiva, Apple, the AFL-CIO, the DNC, and the campaigns of former presidential candidates Hillary Clinton and Barack Obama.
Gerard Niemira is the CEO of Shadow, Inc. He joined Twitter only in April 2013 where he has 357 followers; his account is currently private. His Github account gives Redwood City in the Bay Area of Northern California as his location and indicates that he is a developer who uses the Ruby programming language
According to Crunchbase, Niemira at one point held the title "Interim Vice President of Product" at Kiva.
Niemira graduated from Saint Thomas Aquinas, a private liberal arts college in Sparkill, New York, with a Bachelor of Arts degree in history.
Three different sources say a firm called "Shadow" developed the Iowa Dem caucus app. They haven't responded to comment, neither has Iowa Dem Party. The firm was paid by both Nevada & Iowa Democratic Party, disclosures show. Also by Mayor Pete's campaign.
— Lee Fang (@lhfang) February 4, 2020
Shadow Inc. was acquired by Acronym (aka "Another Acronym") in 2019. ACRONYM is a left-of-center political and advocacy organization designed to launch voter mobilization and digital advertising programs while also working on communications and organizing for left-progressive causes. ACRONYM advances a left-of-center agenda at the local, state, and national levels. On social media, ACRONYM describes itself as "an organization committed to building power + digital infrastructure for progressives."
Though ACRONYM is a 501(c)(4) organization whose funds are required to be used for social welfare causes, ACRONYM has been described as the umbrella organization for numerous for-profit, left-wing organizations and has participated in numerous initiatives with the Democratic Party.
Here's a breakdown of the 2020 candidate ad impressions on Facebook ahead of the #IowaCaucuses: pic.twitter.com/JfWJev4Uqp
— ACRONYM (@anotheracronym) February 4, 2020
Tara McGowan, a 34-year-old Democratic political strategist, founded ACRONYM in 2017. As of 2018, ACRONYM had raised more than $18 million and registered 60,000 people to vote. The organization has run 105 targeted ad campaigns covering 15 states, helping to elect 63 left-of-center candidates and winning 61 percent of all races in which they were involved.
"we all feel the romance of the caucuses…. and since when is romance rational?"
–@Lawrence on the #IACaucus
— Tara McGowan (@taraemcg) February 4, 2020
McGowan is married to Pete Buttigieg strategist Michael Halle.
Wedding Announcement 2015
The wedding of Tara Elizabeth McGowan and Michael Mackay Halle took place Sept. 5 at Black Point, Portsmouth, with Stephen Neuman, chief of staff to Rhode Island Governor Raimondo, officiating.
The bride is the daughter of Laurie McGowan and Andrew McGown of Portsmouth. She is a graduate of New York University and is employed by Priorities USA in Washington, D.C. The groom, son of Debra Gabler Halle and Jim Halle of Champaign, Ill., is a graduate of Illinois State University, Normal, Ill. He is employed by Hillary Clinton for America in Des Moines, Iowa.
Attending the couple were Andrew C. McGowan, brother of the bride; Benjamin Halle, brother of the groom; Caitlin Halle, sister of the groom, and Samantha Moni.
The couple will travel to Africa and Europe for a belated honeymoon after the 2016 election. They live in Des Moines.
ACRONYM has been consistently linked to the Democratic Party and its initiatives. ACRONYM controls a number of for-profit companies that are major players in Democratic Party politics, including campaign consulting firm Lockwood Strategy, a peer-to-peer political technology company known as Shadow, and a media company that invests in local left-leaning news outlets called FWIW Media.
According to Lee Fang, "Nevada Dem federal account paid Shadow $58k in August, Iowa Dems state account paid Shadow $63,183 in two payments over Nov & Dec, suggesting app wasn't developed until just months ago? Both caucus states. Shadow is a spin-off from PACRONYM, a new Dem dark money/superPAC hybrid."
Confirmed by Kevin Robiliard.
NEWS with @mtredden @aterkel: ACRONYM, a buzzy Democratic digital nonprofit, developed the failed Iowa Caucus app. https://t.co/f7K21mWEbC
— Kevin Robillard (@Robillard) February 4, 2020
When Iowans caucused Monday evening for their preferred Democratic presidential nominee, party leaders encouraged the faithful to use a new smartphone app to tally and transmit results. The app would allow caucus managers — Democrats who run the caucus process in each of Iowa's 1,678 precincts — to quickly report results back to the state for tabulation. But that's about all party leaders in Iowa have said about the app: It exists. (Fortune article, paywall)
Last week, party officials said keeping specifics of the app confidential is a strategic move to ensure it remains secure and out of hackers' crosshairs. "We are confident in the security systems we have in place," Iowa Democratic Party Chairman Troy Price told the Wall Street Journal (paywall).
Not great optics here, folks:
– Dems paid company literally called Shadow to create caucus app
– Buttigieg campaign also paid Shadow, FEC records show
– Caucus app fails
– Buttigieg declares himself Iowa winner with no results
— Walker Bragman (@WalkerBragman) February 4, 2020
Iowa, you have shocked the nation.
By all indications, we are going on to New Hampshire victorious. #IowaCaucuses
— Pete Buttigieg (@PeteButtigieg) February 4, 2020
Shadow app – Groundbase co-founders Krista Davis, who is the current Shadow CTO, and Gerard Niemira, who is the current Shadow CEO, both held senior positions with the Clinton campaign.
— Life-Liberty (@Politics1Speaks) February 4, 2020
Next Story: Bernie Sanders Campaign Release Internal Numbers for Iowa Caucus Results
Two Women Shot Dead at Texas A&M University-Commerce Residence Hall Bernie Sanders Campaign Releases Internal Iowa Caucus Numbers

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: Why can't you have multiple parent elements in a component? I'm new to react and if I write this code in the return() I get this error:

JSX expressions must have one parent element.

class Header extends React.Component {
  render() {
    return (

        <Navbar bg="dark" variant="dark" className="fixed-top-nav">
          <Navbar.Brand href="#home">Crypto Currency</Navbar.Brand>
        </Navbar>

        <Jumbotron fluid className="mb-0"></Jumbotron>

    );
  }
}

I understand if I surround the below code with a
 like the code below, it works perfectly fine.
class Header extends React.Component {
  render() {
    return (

        <Navbar bg="dark" variant="dark" className="fixed-top-nav">
          <Navbar.Brand href="#home">Crypto Currency</Navbar.Brand>
        </Navbar>

        <Jumbotron fluid className="mb-0"></Jumbotron>

    );
  }
}

I wonder why can't you have multiple indirect parents in a single component in react?

A: You can! React Fragment was made for this.
render() {
  return (
    <React.Fragment>
      <ChildA />
      <ChildB />
      <ChildC />
    </React.Fragment>
  );
}

You can read more about it in the official docs:
https://reactjs.org/docs/fragments.html

A: It's because of how JSX gets compiled into Javascript:
const myJSXValue = Some text
becomes
const myJSXValue = React.createElement("span", null, "Some text");
In other words it is creating a function call for the element, which can then be passed around as good ol' JavaScript.
JSX depends on single function call, even if that function call ends up being nested with more, so that it can be passed around and returned from functions. How many values can a JavaScript function return? Just one :) Even if, again, that single value includes other values, such as with an array.
A wrapped example:
const myJSXValue = <>Some textSome more text</>
becomes
const myJSXValue = React.createElement(React.Fragment, null, React.createElement("span", null, "Some text"), React.createElement("span", null, "Some more text"));
As you can see, since it is wrapped with a single parent, the myJSXValue gets assigned a single function call. That function call includes additional calls, but at the outer layer you have 1 value. Similarly, when you have a component that returns a JSX value, you get to return 1 single value.
So you at least need a dummy parent element to wrap your children into a single function call that can be passed around (i.e. returned from a component).
The simplest way is just to use React.Fragment, which can be abbreviated as in the example above with <></>

A: As per the React Documentation for render method, a React element (or null) is expected to be returned
React builds and maintains virtual DOM in order to function. Hence only one element is expected which will be treated as Root for that particular component.
We definitely will come across such scenarios, where we may have to return multiple elements. We can do this using by wrapping the group of element to be returned by React.Fragment or <></> (v16.2+)


text:
O Esporte Clube Macapá é uma agremiação esportiva brasileira sediado na cidade de Macapá, capital do Amapá. As suas cores principais são o azul e branco.

A equipe além de ser o primeiro campeão estadual na era amadora, também foi a primeira na era profissional. E foi campeão da primeira edição do Torneio Integração da Amazônia, ou Copão da Amazônia, após uma goleada por 3 a 0 em cima do Ferroviário, de Rondônia.

História

Panair Clube
No início dos anos de 1940, as partidas de futebol, na antiga Macapá, eram disputadas de forma amadorística no Campo da Praça da Matriz, atual Praça Veiga Cabral.

Dessa época vem o Panair Clube - clube dos funcionários da companhia aérea Panair do Brasil - fundado na cidade de Macapá, em 7 de setembro de 1940, por seu idealizador Emanuel Tarcilo Duarte Moraes, primeiro encarregado do Aeroporto de Macapá, durante os três primeiros anos de existência do Território Federal do Amapá. O Panair levantou brilhantemente o título de campeão de futebol do ano de 1944.

O Panair é considerado o embrião do Esporte Clube Macapá. Após a companhia aérea Panair do Brasil encerrar suas atividades na cidade de  Macapá, os dirigentes e sócios reuniram-se no dia 18 de julho de 1945 com o propósito de mudar o nome do clube. Ocorreu uma assembleia geral realizada na 1ª sede do clube, que era situada na Rua São José, em frente à praça Veiga Cabral, ao final dessa reunião, o clube passou a se chamar Esporte Clube Macapá.

Fontes: Arquivos pessoal e porta-retrato-ap

Jogadores notáveis
Destaques no futebol brasileiro:

 Bira (Atacante campeão brasileiro pelo Internacional/RS)
 Aldo (lateral direito campeão brasileiro pelo Fluminense/RJ)

Rivalidades

O principal rival do Macapá é o Amapá Clube, porém o Amapá não disputa competições oficiais desde 2008.

Títulos

* Na época era conhecido como Panair Esporte Clube.

Notas
 Campeão invicto

Outras conquistas
 Torneio Vargas Neto: 1951

Estatísticas

Participações

Desempenho em competições

Campeonato Amapaense

Campeonato Amapaense - Segunda Divisão

Torneio da Integração da Amazônia

Campeonato Brasileiro - Série C

Campeonato Brasileiro - Série D

Macapa
Esporte de Macapá
Fundações no Brasil em 1944


text:
Home › Focus on automotive › Search for Nissan
Focus on automotive: Nissan
Nissan Leaf becomes sparkling Nissan Christmas Tree powered by regenerative energy
Nissan will be dashing through the snow this Christmas with a bright festive Nissan Leaf powered by its own regenerated energy. To bring Christmas cheer while celebrating the power of regenerative energy creation, the special one-off vehicle sees the Nissan Leaf transformed into a Nissan (Christmas) Tree. Decked out in a spectacular light display...
Nissan Navara and NV400 are shortlisted at the International Commercial Vehicle Awards 2020
Following its win in 2016, the Nissan Navara has been again shortlisted for the International Pick-Up of the Year award with the NV400 shortlisted for Van of The Year at the International Commercial Vehicle Awards 2020. The Nissan Navara will be competing with the likes of the Ford Ranger, Toyota Hilux and Renault Alaskan to fight for its second...
Nissan Spain to complete pioneering exoskeleton project for production lines
Nissan Motor Ibérica will soon complete the testing phase of a pioneering exoskeleton project before integration into production lines at Barcelona's Zona Franca plant. The external exoskeleton devices help reduce the stresses normally placed on the muscles of line workers by up to 60%, lowering the risk of work-related injuries and enhancing...
Renault begins exports of Twizy from South Korea to Europe
Renault began exporting the Twizy mini electric vehicle from South Korea to Europe, a move designed to lift production at Renault-Samsung Motor's Busan plant which is currently struggling with low capacity utilisation. Renault Samsung, which is 80% owned by Renault, also hopes that local production - which started earlier in October - will help...
Nissan to showcase vision for mobility at new venue opening in 2020
Nissan plans to open an interactive venue near its global headquarters where people can experience the company's products, technology and vision for the future of mobility. Set to open early next summer in Yokohama, the Nissan Pavilion will be an all-new destination appealing not just to locals but also to visitors to Japan, who are projected to...
All-new Nissan JUKE drives the 2019/20 UEFA Champions League Trophy Tour
The UEFA Champions League Trophy Tour - driven by the New Nissan Juke, debuted in Leipzig, Germany this Saturday to kick off the start of a four-city European football road-trip. The new Nissan Juke will be the star attraction as Nissan's marks its sixth season as a leading UEFA Champions League partner by bringing a new and innovative UEFA...
Nissan starts production of the new Juke in UK
Nissan is marking the start of production of the new Juke at its Sunderland plant (UK) - the only production location for this second-generation compact crossove - following a £100 million investment. Developed by Nissan's European design and R&D teams in Paddington, London, and Cranfield, Bedfordshire, 70% of Juke production will be for the...


They went in and shut the door. But even as he did so Sam heard suddenly the sigh and murmur of the sea on the shores on Middle-earth.
Sauron Defeated is the nineth volume of The History of Middle-earth and it completes the telling of Tolkien's writing of The Lord of the Rings. It also includes The Notion Club Papers, which were penned by J.R.R.Tolkien, and are a report of the discussions of an Oxford literary club where Tolkien and C.S.Lewis were both members. Included as a part of these reports is The Drowning of Anadune which parallels, in many ways, the mythical tale of the drowning of Atlantis and concludes with Lowdham's Report on the Andunaic Language.
♦ Sam talking to his children long after Frodo has departed the Grey Havens. In The Epilogue, he tells them of an upcoming visit by King Aragorn and Queen Arwen, as well as answering their questions about Bilbo and Frodo. Absolutely priceless reading, not to be missed.
♦ You will see that in the original writings on The Scouring of the Shire, Frodo takes a far more active part which, in turn, changes the nature of this part of the story dramatically.


text:
English French Arabic Mandarin Urdu
What is CERP
Why CERP
CERP at a Glance
Research Approach
Thinking Firms
Evidence Based Programme Design
Building Capacity to Use Research Evidence
Innovative Leadership in the Age of Data
Policy Skills & Leadership
Dr. Adnan Khan's successful appointment with LSE and Harvard
Dr. Adnan Qadir Khan, founder and board member Centre for Economic Research in Pakistan (CERP), has recently been appointed as Professor in Practice by School of Public Policy, London School of Economics and Political Science (LSE), a joint appointment with Suntory Toyota International Centre for Economics and Related Disciplines (STICERD), LSE.
He has also been appointed as an Associate with the Building State Capability Program at Harvard's Center for International Development.
Prior to his appointment with Harvard and LSE, Dr. Adnan has successfully led the International Growth Centre (IGC) as Research and Policy Director and was also a Visiting Lecturer of Public Policy at Harvard Kennedy School from 2018-2019. He has been actively involved in the areas of policy, research, and training.
With 15 years of experience in the policy world, Dr. Adnan's name is synonymous as a practitioner and policymaker where he regularly interacts with policy actors from around the world, with a focus on Asia and Africa, in the areas of state fragility and state capacity building. He holds a multitude of experience in the research realm with a keen interest in the areas of economic development, the political economy of development and state fragility, state capacity, and social protection. He teaches courses on public policy and economic development in order to bridge the gap between academia and practice.
He has also served in the government as a member of the Pakistan Administrative Service (PAS) and is a recipient of President's Medal for performance.
Dr. Adnan has a bachelor's degree in Engineering from University of Engineering and Technology. He went on to do his graduate work obtaining a Master of Public Administration from Harvard Kennedy School and received his PhD in Economics from the Queen's University.
Read more about his work at http://bit.ly/326Vsxh.
Join the CERP Professional Network
Job Asaan Inaugurated to Facilitate Employment
In Punjab labour Force participatio..
Workshop on Evidence Based Program Design
A five-day workshop was held by CER..
Centre for Economic Research in Pakistan
29-P Gulberg II,
Lahore 54660, Pakistan
Email: contact@cerp.org.pk
Copyright © All rights reserved | Design by Webnet Pakistan


Welding Information Systems | Ron-Son's Torch Repairs & Sales Ltd.
Baseball fans love watching their favorite player hitting a home run. Of course, they prefer seeing a grand slam: the maximum number of runs (4) with 1 swing of the bat. If you're doing those things on a consistent basis, there are certain people who'll be lining up to pay you large sums of money. If you're exceptionally good at it, someone will want to make a movie about you.
Like Baseball, manufacturers would love to hit a home run, or better yet a grand slam– to create a giant gap between them and their competitors. So, this email is about a game changer for the welding industry: The Information Management System.
The big welding machine manufacturers are attaching to some of their new equipment the ability to monitor welding operations from the computer. The software is continuously taking data from the welding machines. The Information System crunches the data and produces numbers that can be used as benchmarks.
These Information Systems come in 2 flavors: Basic or Advanced.
There are 2 numbers that are obtained from the welding machine. There is no magic in the numbers nor from where they come.
The easiest number to understand is Arc On Time: how long were you welding.
From these 4 variables it calculates a deposition rate.
Those numbers create a Benchmark: the ability to measure whether you're going forward or backwards. If you've never used Benchmarks in welding this'll be a Home Run. If you're already using Benchmarks, this'll provide more insight in to your welding process.
So, how does that help productivity? For example, compare 2 welders. Welder A has 10% Arc Time compared to B who has 18% Arc Time. The hard part will be in figuring out why there's a difference. Is it lack of training? Or a lack of materials? The list goes on. Another example is if you have a good worker that is retiring, how's that going to affect your operations? The numbers are going to help you.
We know progress is being made when welding sparks are flying. The boss of South West Airlines told his people, "When the wheels are in the air, we're making money". So all efforts were made to get the plane off the tarmac.
You know welding sparks doesn't mean the job is being done correctly. But the Information System can tell if the welder is working within his given parameters. The System gives the number of how much weld is being deposited; too much or too little? Is the wire feeder running at the correct speed? The more advanced systems will detect if a weld has been missed.
We've all heard the complaints that not enough time was given to training. The Information system doesn't replace a trainer but can be a very good assistant. The Basic system will tell if you're welder is working within the acceptable ranges. The more Advanced system can be quite elaborate. It can provide pictures, video, instructions, and alerts when something hasn't been done correctly.
Baseball has a wonderful stat called L.O.B. (it's the number of runners who were on base when the inning ended). It's telling the baseball manager how many more potential runs the team could've gotten, if they'd found a way to get them home.
This kind of Information systems are like runners on base. You've got the numbers, now how can you turn these into a Win. Wins in business are called Profits.
If we can help you, please give us a call.


THK DECORATION OF THE HAI-I..
will have no reason to be ashamed of it.
bid 1 bein wi'Iconic!   Of jusl whal the ot]j in full force.
Tlie reporter poses on Hie stairs.
While we poor agents are nol in't.
Print your agents' names some day.
innORTAI.S IN A CLOAK ROOAl.
dado at   last i as il was before.
lut iir ■ will b ■ halved.   The 11 -v.
Muhvy had charge of the program.
not returned ii toils proper place.
Watts. Boom p. a. in.
noty and 1 lea awry.
Wh.-n they had to dress for thai  minstrel-show.
They'll ne'er again, of us. gain a-boon.


September 5, 2015—Noon to 6 p.m.
Washington, DC, August 20, 2015 – As dozens of bestselling authors and thousands of book fans converge on Washington, DC this Labor Day weekend for the 15th Annual Library of Congress National Book Festival, PBS Book View Now will be there to provide audiences nationwide with comprehensive coverage of the all-day literary event. Coverage will be produced by Detroit Public Television (DPTV) made possible thanks to the support of the Wyncote Foundation. The coverage will be hosted by Jeffrey Brown, Senior Correspondent and Chief Arts Correspondent for PBS NewsHour and Book View Now host Rich Fahle.
The National Book Festival will be held Saturday, September 5 at the Walter E. Washington Convention Center in DC. Live stream coverage of the event will air from 12 noon until 6 p.m. ET, with interviews tentatively scheduled with authors Kate DiCamillo, Jon Scieszka, David McCollough, Tom Brokaw, Louise Erdrich, Kwame Alexander, Marilynne Robinson, David Mariniss, and many more, as well as segments showcasing the energy of the Book Festival floor.
Live stream coverage will be available online via PBS.org and at www. BookViewNow.org, plus select PBS station websites, and the WORLDChannel.org. In addition, select segments will be archived and available for on-demand viewing on PBS.org, PBS station websites and all PBS video apps, including iPhone, iPad, Xbox, Roku and Apple TV, as well as YouTube.
The Library of Congress National Book Festival is an annual literary event that brings together best-selling authors and thousands of book fans for author talks, panel discussions, book signings and other activities. It was created by Laura Bush and Librarian of Congress James H. Billington at the suggestion of Mrs. Bush, who had created the Texas Book Festival.
Over its 15-year history, the National Book Festival has become one of the pre-eminent literary events in the United States. The first festival was Sept. 8, 2001. Mrs. Bush served as honorary chair of the festival through 2008. President and Mrs. Obama have served as honorary co-chairs from 2009 to the present.
This year also marks the 200th anniversary of the 1815 Acquisition of Thomas Jefferson's Personal Library. From its beginning in 1800, the Library of Congress was housed in the U.S. Capitol. During the War of 1812, the British burned the Capitol in August 1814, destroying the Library's collections. A month later, Thomas Jefferson, in retirement at his Monticello estate, offered to sell his personal library to the Library of Congress. The 6,487 volumes were considered to be the most comprehensive library in America at the time.
"The Library of Congress is so pleased to collaborate with Detroit Public Television and PBS to help connect book lovers all over America with the authors, discussions and energy of the National Book Festival in Washington, D.C.," said Marie Arana, co-director of the festival. Added Co-Director Guy Lamolinara, "The 15th annual festival will be bigger and better than ever - a great year to introduce it to audiences who haven't experienced it before."
The Wyncote Foundation was founded in 2009 with funds from the Otto and Phoebe Haas Charitable Trusts, at the direction of John C. Haas. Its mission is to support efforts that strengthen and enrich culture, community and the natural environment.
PBS,with its over 350 member stations, offers all Americans the opportunity to explore new ideas and new worlds through television and online content. Each month, PBS reaches nearly 109 million people through television and over 28 million people online, inviting them to experience the worlds of science, history, nature and public affairs; to hear diverse viewpoints; and to take front row seats to world-class drama and performances. PBS' broad array of programs has been consistently honored by the industry's most coveted award competitions. Teachers of children from pre-K through 12th grade turn to PBS for digital content and services that help bring classroom lessons to life. PBS' premier children's TV programming and its website, pbskids.org, are parents' and teachers' most trusted partners in inspiring and nurturing curiosity and love of learning in children. More information about PBS is available at www.pbs.org, one of the leading dot-org websites on the Internet, or by following PBS on Twitter, Facebook or through our apps for mobile devices. Specific program information and updates for press are available at pbs.org/pressroom or by following PBS PressRoom on Twitter.
The WORLD Channel is a 24/7, multicast channel dedicated to delivering the best of public television's nonfiction, news and documentary programming as well as a growing schedule of original content from independent producers and multi-cultural communities. The complementary website, www.WORLDchannel.org, expands on broadcast topics and fuels content across social media, providing opportunities for broad and diverse audience interaction. WORLD Channel is service of WGBH/Boston, in partnership with American Public Television and WNET/New York, and in association with the Public Broadcasting Service and the National Educational Telecommunications Association. Funding for WORLD Channel is provided by the Corporation for Public Broadcasting and the Ford Foundation.


Snow is one the issues that the people have to deal with when it comes to the winter time as you will find that it covers even the places that people live and even the roads and hence an immediate removal will be one of the ways to get rid of it. To make the activities that you are doing easy and the path accessible it will be important that you have the snow removal techniques so that you can be able to have the ease that you need.
It is important to know that the snow removal services are not an easy thing to do and hence it will require that you have the right professional that will bring the right skills and the expertise that is needed.
Below are some of the reasons as to why you should hire the services of the professional snow removers.
One of the reasons is that you will have the right people that the job will need since the professionals will have all that it takes to make the right and perfect job and that way you will have the snow removal needs well satisfied.
The other reason that will make you consider the snow removals service from the professionals is that you will have the right skills and the experience that will be needed to make the removal process more efficient and easy for you.
It goes without saying that the professionals will be better than anyone when it comes to the experience and the skills that are needed to the snow removal work and hence having them will be important to keep away the people that are not required.
With the professionals, you will have not to worry about the downtime as with them you will get the best of the chances to have the job finished at the stipulated time or even before and hence you will be able to do the other things that you will need to do.
It will be important to know that with the professional snow removal services you will stand the best chance to get the right peace and the sleep that you need knowing that you have the right people that will take care of your job in the manner that you want.
It is important to know that with the professional snow removal services you will stand the best chance to get the right equipment and the tools that your work will require and hence that way you will get all that you work will need so as to be effective and also done in the right way.


text:
Marshall Scholarships
The Scholarship
A Brief History of the Marshall Scholarship
Statistics and Resources
The Marshall Medal
Criteria and Who is Eligible
Information for Recommenders
UK Institutions
Partnership Scholarships
Marshall Partner Universities
The Scholars
Winners of the 2020 Scholarship
Scholar Profiles
Scholars' Experiences (Films)
Marshall Plus
60th Anniversary Marshall Alumni Lectures
Marshall Sherfield
Marshall Sherfield Fellows
Policies and Open Data
The Marshall Aid Commemoration Commission
The Marshall Aid Commemoration Commission runs the UK's flagship scholarship programme with the United States
The Marshall Commission was established by an Act of Parliament in 1953 to administer the Marshall Scholarship programme as an Executive Agency of the Foreign and Commonwealth Office (FCO).
The Commission comprises up to 10 Commissioners who act as a Board for the programme, setting direction, providing oversight and adding value to the scholars experience in the UK, using their personal networks and experience to give them access to interesting and insightful opportunities. The Commission is supported by dedicated staff at the Association of Commonwealth Universities, which is contracted to administer the Marshall Scholarship programme.
Commissioners are responsible for:
Overseeing the grant-in-aid provided by the FCO funding Marshall Scholarships for talented graduates from the United States, as well as nurturing the programme's increasingly important funding partnerships with academic institutions and others.
Overseeing the selection of Scholars, working with Regional Selection Committees in the USA, in co-ordination with Consuls General and the Ambassador's Advisory Council in Washington.
Ensuring Scholars receive appropriate advice and assistance while in the UK.
The effective delivery of the Marshall programme, with support from the secretariat.
Ensuring Marshall makes a valuable and enduring contribution to UK-US relations.
Marshall Scholars support the aims of General Marshall when, in 1947 he proposed the idea of American economic assistance for post-war Europe. He said "An essential part of any successful action on the part of the United States is an understanding on the part of the American people of the character of the problem and the remedies to be applied. Political passion and prejudice should have no part. With foresight and the willingness on the part of our people to face up to the vast responsibilities which history has clearly placed upon our country, the difficulties...can and will be overcome". Successive British Prime ministers have endorsed these ideals.
Privacy Notices and Cookie Policy
Marshall Aid Commemoration Commission
Woburn House, 20-24 Tavistock Square
London, WC1H 9HF
Site by Etch


As a research student in our Centre, you'll become part of a diverse and supportive community that plays an active role in the intellectual and social life of the University.
Our extensive training and development opportunities will allow you to develop your skills and enhance your employability, and the extensive programme of research student activites will help you to get the most out of your time with us.
With many groups, events, and other initiatives to choose from, you'll have the chance to meet research staff and students from across the University, exchange ideas, and gain new perspectives on your own research.
The Faculty of Arts, Humanities and Cultures has its own Graduate School, which offers work spaces, interdisciplinary research, networking and support groups, and more.
The Leeds Arts and Humanities Research Institute supports research that falls within a broad definition of the arts and humanities. It coordinates various interdisciplinary research groups within the Faculty of Arts, Humanities and Cultures, and hosts a programme of talks, lectures, and events.
Leeds Doctoral College brings together research students from across the University, helps to coordinate the many postgraduate initiatives on campus, and runs events like Research Nights and the Leeds Doctoral College Showcase.
At Leeds University Union there are many ways to get involved in the University's postgraduate community. They offer postgraduate social events, specialist support and advice, and opportunities to make your voice heard as a student representative.


text:
Strumigenys sinensis — вид мелких муравьёв из трибы Attini (ранее в Dacetini, подсемейство Myrmicinae).

Распространение
Китай, Fujian Prov., Jiangle Co., Longqi Mt..

Описание
Длина желтовато-коричневого тела 2,1 мм. Усики 6-члениковые. Скапус усика очень короткий, дорзо-вентрально сплющенный и широкий. Мандибулы узкие вытянутые, без преапикальных зубчиков (или с одним очень мелким). Хищный вид, охотится на мелкие виды почвенных членистоногих.
Вид был впервые описан в 2000 году американо-китайским мирмекологом М. Вангом (Wang, Minsheng) по материалам из Китая под первоначальным названием . С 2007 года в составе рода  (Baroni Urbani & De Andrade, 2007).
Вид включён в состав комплекса Strumigenys argiola-complex из видовой группы Strumigenys argiola group вместе с европейским  и с несколькими восточно-палеарктическими и ориентальными видами (, , , ). Но у первого вида 4-члениковые усики, а у других 6-члениковые усики (хотя иногда 2-й и 3-й членики жгутика редуцированы у S. lachesis); также эти виды имеют менее чем 4 преапикальных зубчика на каждой мандибуле (у S. lachesis их нет вообще) и имеют плотное орбикулярное опушение на промезонотальном дорзуме.

Примечания

Литература

Ссылки
 Biolib.cz: Strumigenys .
 Discoverlife.org: Strumigenys sinensis .

Strumigenys
Животные, описанные в 2000 году
Насекомые Азии
Эндемики Китая


As you're no doubt aware, we've been having some crazy weather in our corner of the country lately. One minute it's scorching, the next there is thunder and lightning…movie style. I mean seriously BIG storm action (note from Hector's Mum: admittedly, it has been loud, but even the slightest noise – like a motorbike starting – has sent H running for cover these last few days, sometimes in other people's cars if a door is open)!
Anyway, the extreme weather has also led to some really cool mist on my favourite river in the mornings. I've taken to chasing it. Just like the stones that Mum and Dad throw in for me. Best. Thing. Ever.
Check out the video and pics below!


text:
Q: How to pass in multidimensional data to xgboost model Essentially this is what I have for xgboost
model = XGBClassifier()

model.fit(X_train, y_train)

Where X_train and y_train are numpy arrays.
My problem is that X_train seems to have to take the format of a numeric matrix where each row is a set of numbers such as:
[1, 5, 3, 6]

However, the data I have is in the format of a set of vectors. Each vector consists of a number between 1, 3 and a confidence interval that is a between 0, 1. So a row of my X_train would look like:
[[1, .84], [2, .5], [3, .44], [2, .76]]

However I can't figure out how I would pass in data in this format to xgboost.
I'm fairly new to xgboost so I've been reading documentation but I can't seem to find what I'm looking for. Thanks for any help.

A: Approach 1:
I would recommend to make 3 columns for each system, which has the probability of all 3 classes by that system. And then combine these columns for all systems.
Something like this:
Index   Sys1_Cls1  Sys1_Cls2  Sys1_Cls3  Sys2_Cls1  Sys2_Cls2  Sys2_Cls3  \
    0   0.310903   0.521839   0.167258   0.034925   0.509087   0.455988
    1   0.402701   0.315302   0.281997   0.044981   0.137326   0.817693
    2   0.272443   0.409210   0.318347   0.591514   0.170707   0.237778
    3   0.272599   0.304014   0.423388   0.175838   0.324275   0.499887
    4   0.339352   0.341860   0.318788   0.574995   0.169180   0.255824

       Sys3_Cls1  Sys3_Cls2  Sys3_Cls3  Sys4_Cls1  Sys4_Cls2  Sys4_Cls3
       0.173293   0.279590   0.547117   0.441913   0.251394   0.306692
       0.224656   0.425100   0.350244   0.430451   0.382072   0.187476
       0.198573   0.603826   0.197600   0.412734   0.185472   0.401795
       0.011399   0.598892   0.389709   0.057813   0.651510   0.290677
       0.025087   0.478595   0.496317   0.539963   0.288596   0.171440

Here 'Sys1_Cls1' means the probability of System1 for class1 and so on..
This can be your X. For y, assign the actual class, you have for that sample.
So the shape of your X will be (n_samples, 12) and y will be (n_samples).
If you have more systems, these can be similarly appended as features (Columns).
Approach 2:
Other is that you take sum, or average (or weighted average) of all systems for a particular class. In this you will have only 3 columns irrespective of systems.
  Index       Cls1      Cls2      Cls3
    0       0.187362  0.151723  0.660914
    1       0.378118  0.293932  0.327950
    2       0.424903  0.278271  0.296825
    3       0.342273  0.274003  0.383723
    4       0.405926  0.104094  0.489981

Where the particular values in a column can be:
cls1_val = Sys1_Cls1 + Sys2_Cls1 + Sys3_Cls1 + ...

OR

cls1_val = (Sys1_Cls1 + Sys2_Cls1 + Sys3_Cls1 + ...)/number_systems

OR

cls1_val = (weight1 x Sys1_Cls1 + weight2 x Sys2_Cls1 + weight3 x Sys3_Cls1 + ...)/number_systems

Here shape of X  will be (n_samples, 3)
Try with different approaches and keep what works best.
Note: By the way, what you are trying to achieve here by combining the probabilities of different systems and then finally predicting a final class is called as Stacking. See these resources for more info:

*

*https://en.wikipedia.org/wiki/Ensemble_learning#Stacking

*http://scikit-learn.org/stable/modules/ensemble.html


Mandolin Tab Old Songs, Folk , Sheet Music for Traditional S ongs Beginning A. Choose from Drum Set sheet music for such popular songs as Anything You Can drum Do Puttin' on the Ritz, Take Five. The best online selection of songbook sheet music music DVDs , guitar tab books, piano songbooks more. ca – Canada' s only comprehensive drum online print sheet drum music retailer that stocks your product here in Canada. Pop Broadway Movies.
Jill Gallina: Partners in Spirit. Easy Piano Songbook. Drum music sheet songbook. Browse Our Songbook for 700+ Kids Songs. Get Free Lyrics Scottish ( Celtic) Kids Song ' Aiken Drum. Books, Sheet Music & Media. Print instantly , web , sync to our free PC songbook mobile apps. Drum Set Instruction.
Browse Alfred Music' s catalog of school choral arrangements resources from the industry' s leading composers , repertoire, arrangers. Performance Instruction. Sheet Music for a range of musical instruments, scores & songbooks for musicians of all ages , , abilities, Notation & Songbooks Musicroom has drum a huge online catalogue of sheet music, from trumpets to trombones bass guitar to the bouzouki. The Complete Library Of Drum Sheet Music 336 High- Quality Drum Charts. For 18 years we provide a free and drum legal service for songbook free sheet music. Download sheet music for Drum Set. There is no need to place an order and wait weeks for your order to arrive. Enjoy songbook substantial discounts when you buy sheet music online at MusicTime. Thank you for supporting this website.
Drum music sheet songbook. Welcome TO MUSICTIME. ' Print Download Related Free Easy Piano Sheet Music Piano/ Guitar Lead Sheet. com, thank you to consider support donation. The Least of My Kind. Learn Arabic music arabic maqam instruction, drum Arabic music books, learn arabic music scales , Arabic sheet music more at MAQAM! Save up to 20% each and every day! Current Page: Hard Rock Drum Play- Along Series Songbook with CD;.
Download free steel drum ( steel pan) sheet music. Covered in drum dirt you stir to rise , mud, spitting blood, aching , Cursing groan. Enrich your school church music program with this wonderful collection of well- known spirituals fresh gospel music. Music Dispatch - Sheet Music instructional music DVDs, sheet music, Songbooks, band & choral music, artist biographies, DVDs Your drum online destination for guitar books, Guitar Tab & songbook more. Difficulty: easy- medium. It has been a pleasure sharing with steel pan enthusiasts from around the world. Shuffle Groove Drum Beat Beat sheet music for Drums - 8notes. If you drum use and like Free- scores. Check Out songbook Our Music Lesson Plan for the Music Classroom. Lyrics and melody © songbook 1994 by Catherine Faber. This chart book contains every single song of high- quality drum sheet music we have in songbook our library, in by far the best deal on this site. It contains eight creative gospel music paired with original songbook music from partner song composer , singable, arranger, easy- to- teach arrangements of traditional spirituals Jill Gallina.
150 Of The Most Beautiful Songs Ever ( 4th Edition) sheet music - Piano/ Vocal/ Guitar sheet music by Various: Hal Leonard. Shop the World' s Largest Sheet Music Selection today at Sheet Music Plus. Simply the best place to find Drum Sheet Music, Drum Scores, Drum Tabs, Drum Music Transcription Search Drum Scores, Free Drum Tabs, Transcription, Free Drum Sheet Music Drum Sheet Music by Artist - Sheet Music - Drum Scores - Drum Tab. Once you become more intuitive at reading sheet music and playing the drum kit, you can buy sheet music for your favorite songs and genres. You have an abundance of choices, such as country music, holiday books, rock, classic rock, and metal. Music44: Search Sheet Music, Songbooks, Music Books, Sheet Music Downloads, Music Software, and Instruction Products for All Instruments.
Music44 is your one- stop shop to find all the best selections of sheet music, sheet music downloads, songbooks, music books and software for all instruments. Drum sheet music is heavily used in drum corps, as their music pieces can be very intricate and use many different rudiments I recommend that you start slow when doing this.
This video is a great example, as it starts at 60 beats per minute, exactly one beat per second.


text:
Updated 9 June, 2017 - 23:01 Theodoros Karasavvas
Was Pharaoh Akhenaten so Cruel that he Forced Children to Build his City of Amarna?
A recent investigation of Amarna's cemeteries in Egypt has revealed new evidence that clearly shows that a "disposable" working staff was mainly composed of children and teenagers. Experts now suggest that those children provided much of the work for the city's construction under cruel conditions.
Massive Tomb Discovered in Heretic Pharaoh Akhenaten's City
As The Guardian reports , a team of archaeologists led by Gretchen Dabbs of Southern Illinois University studied and examined the remains of 105 individuals whose skeletons were unearthed from the North Tombs Cemetery at Amarna, the ancient city that wasn't destined to last for too long as it was built by the 'heretic pharaoh' Akhenaten.
Amenhotep IV, also known as the Pharaoh Akhenaten, was destined to be remembered for his attempt at a religious conversion of ancient Egypt; one that saw the old gods put aside and replaced by a single god, the Aten.
Akhenaten took on the might of the priesthood of Amun-Ra, and enforced by the military, temples were closed and the names of the gods were removed from statues and inscriptions the length and breadth of the land. Akhenaten and his family were more concerned with their new religion, and left the empire unprotected and weakened – led by an ineffectual king more interested in poetry and nature rather than ruling. Statues and inscriptions depict Akhenaten and his family with long thin necks, sloping foreheads and elongated skulls, and this has led to claims – as a previous Ancient Origins article reports – that the king suffered from various disorders. His "legacy" remains to this day as one of the most controversial in Egyptian history.
Pharaoh Akhenaten (center) and his family worshiping the Aten, with characteristic rays seen emanating from the solar disk. ( Public Domain )
Study of the Burials Reveals Information About Amarna's Lower Social Classes
Inevitably, when Akhenaten died in 1332 BC, Egypt's ancient religion was restored under his successor Tutankhamun and the heretical city of Amarna was abandoned and forgotten. The entire cemetery, which is located near an ancient stone quarry, could contain thousands of burials. Recent exploration at the site that has mainly focused on Amarna's cemeteries, the city's humble desert graves, has revealed a lot of previously unknown information about the everyday people who lived and worked in Akhenaten's city and died with it.
The site of Amarna viewed from the desert cliffs to the north of the city. Photograph: Mary Shepperson/Courtesy of The Amarna Project
As The Guardian reports , from 2006 to 2013 the Amarna Project excavation, which aimed to unearth four hundred individuals from an immense cemetery behind the South Tombs cliffs, roughly calculated that it included nearly six thousand looted burials. The examination of these burials and the skeletons has opened a new research window on life and death in the lower classes of Egyptian society. They manifest a clear picture of poverty, hard work, poor diet, ill-health, frequent injury and relatively early death.
The Majority of Town's Building was Done by Children
The Guardian reports that the initial analysis of the 105 skeletons excavated at the North Tombs Cemetery in 2015, was conducted by Dr. Gretchen Dabbs of Southern Illinois University and is now completed. The analysis divulges that more than ninety percent of the deceased in the sample had been between the ages of seven and twenty-five, with most of them being under fifteen. Even though youngsters usually have an extremely good health, the majority of the teens in the sample showed signs of severe injuries and degenerative conditions associated with hard working under unhealthy conditions.
A juvenile burial under excavation at the North Tombs Cemetery, Amarna, Egypt. Photograph: Mary Shepperson/Courtesy of The Amarna Project
Additionally, researchers concluded that the young individuals were not buried by their family members, as the graves lacked grave goods. Also, archaeologists speculate that the young workers could possibly have been the children of slaves, or captured in order to build the pharaoh's city. Despite sounding completely barbaric by today's modern standards, the safest conclusion experts can make at the moment, is that children as young as seven were forced to carry out frequent heavy labor, with many of them dying from the inhumane conditions.
Last but not least, as The Guardian reports, all work at Amarna is carried out with the permission and support of the Egyptian Ministry of Antiquities. The work at the North Tombs Cemetery is supported with funding from the National Endowment of the Humanities. The Amarna Project is a project of the McDonald Institute for Archaeological Research, University of Cambridge.
Top image: Artist's reconstruction of the ancient city of Amarna. Credit: Paul Docherty. Amarna3d.com
By Theodoros Karasavvas
Amenhotep
Theodoros
Theodoros Karasavvas, J.D.-M.A. has a cum laude degree in Law from the University of Athens, a Masters Degree in Legal History from the University of Pisa, and a First Certificate in English from Cambridge University. When called upon to do... Read More
inken wrote on 8 June, 2019 - 22:44
Sorry, somewhat late to the party but just got two smooth shocks.
First by the cruel treatment of these small children and young adults in Amarna, who weren't allowed to have a life.
Second by some harsh comments here, interesting comments though.
True, especially in former times children were asked to work very early.
And yes, often they didn't have much time to enjoy their childhood, but it wasn't normal to drive them into death as work slaves.
Hard unhealthy child work still exists, unfortunately.
Findings of small tools, tunnels and huts may indicate mature "little people".
More likely these are hints to child labour and child exploitation.
Don't know for South Africa; in Germany only a few mature "little people" (did) exist.
But often -NOT normally- children here in Germany were abused as small miners and they had a sad short life expectancy either.
One of my favorite fairy tales was 'Snow White and the seven Dwarfs' ...till it became pretty clear that the seven dwarfs referred to underaged miners.
Yep, welcome to the real World.
What doesn't make child exploitation any better.
Odo Mayer wrote on 11 June, 2017 - 03:01
since the Hebrews are known to have come quite often to Egypt (see oral and written tradition = Abraham fled there during a famine, Joseph was sold by his brothers and became very rich there, many Canaanites ( Hebrews as well) invaded northern Egypt and ruled there until their Expulsion (Hyksos period) and Moses was brought up there until he led the Hebrew exodus. (which might be the same Hyksos-kickout story projected into later periods, but embellished and sanitized).
-therefore it's quite probable that the ruling Pharao not only ordered all male Hebrew newborns to be killed (see Moses' survival story) but also forced their already living children into hard labor in order to reduce their number because of the menace those unruly and patently un-egyptian Semite shephards constituted for the already shaky social atmosphere during the forced transition from Poly- to Monotheism. The fact that Moses rigorously imposed the same monotheism as Akhenaten (using the war-god JAHWE instead of ATEN) is another hint pointing to a connection between the 2 religio-social transformations. Even some verses of Akhenaten's hymn to the glorious ATEN were copied word for word by a Hebrew prophet of this time. So we should not be surprised that not only adult Hebrews worked at Amarna.The Old testament mentions the slave work of "brick laying"
Mr. Bo Tsang wrote on 10 June, 2017 - 18:15
I have been interested in Ark. for many years. Is there anything in the idea that Moses was in some way connect to him hence the spread of monotheism ?
Tracy Williams wrote on 29 December, 2018 - 20:41
I'm sure the dates are right, I just can't get it out of my mind about the first born were killed. Where are those bodies. Just a thought.
Claudius Pereira wrote on 13 June, 2017 - 18:43
Using children for hard labour is only partially true .For the most part it was not even children! Children of that young age were simply too weak to do such heavy work. The good doctor should re-examine the skeletons and it will be found that it was "little people" . These Little people were commonly found in Africa ,Europe and parts of Asia 2000 to 4500 years ago..Numerous stone tools of -to us - mini proportions and small tunnels indicate who they where.I have found much evidence in South Africa eg small stone huts, microlithic stone tools and other tiny stone artefacts.
29 December, 2022 - 13:47 Robbie Mitchell
Ancient Origins Top 10 Archaeological Finds of 2022
Archaeology may be the discovery of and research of things that happened long ago, but it is an ever-changing field. Every year new discoveries are made that either teach us something new or show us...
Read more about Ancient Origins Top 10 Archaeological Finds of 2022
28 December, 2021 - 17:59 Nathan Falde
Digital Scan of Ancient Egyptian Mummy Amenhotep I Shows His True Face
The 3,500-year-old mummy of Egyptian pharaoh Amenhotep I had remained virtually unexamined since its discovery at Luxor, Egypt in 1881. As one of the few royal mummies from ancient Egypt yet to be...
Read more about Digital Scan of Ancient Egyptian Mummy Amenhotep I Shows His True Face
26 August, 2021 - 01:31 Calumy
Solomon and Sheba: Were a Famous Pharaoh and Queen the Real Protagonists in this Love Story?
The story of Solomon and Sheba is well known as one of love. But it is only when we learn their true identities that we see how much affection and adoration Solomon had for his favorite Queen. He...
Read more about Solomon and Sheba: Were a Famous Pharaoh and Queen the Real Protagonists in this Love Story?
25 August, 2021 - 20:50 anand balaji
On The Trail Of The Mysterious Crown Prince Thutmose: Clues To A Sudden, Violent Death? – Part II
In addition to making Crown Prince Thutmose High Priest of Ptah, Amenhotep III prepared his intended successor in the ways of Aten worship too. This was a thread later picked up by Akhenaten , who as...
Read more about On The Trail Of The Mysterious Crown Prince Thutmose: Clues To A Sudden, Violent Death? – Part II
On The Trail Of The Mysterious Crown Prince Thutmose: The King Who Was Not To Be – Part I
Amenhotep IV, the youngest-known son of Pharaoh Nebmaatre Amenhotep III-heqa-Waset, ascended the throne at the height of Egypt's golden age. The seeds for that efflorescent era of the Eighteenth...
Read more about On The Trail Of The Mysterious Crown Prince Thutmose: The King Who Was Not To Be – Part I
17 July, 2020 - 21:34 Calumy
The Missing Prince And The Missing Papyri
A strange mystery baffled Egyptologists when opening the tombs of kings who had been laid to rest in The Valley of the Kings. In 1816 explorer Giovanni Belzoni had reached the far end of the valley...
Read more about The Missing Prince And The Missing Papyri


With a cumulative count of 636 million foreign arrivals into the region in 2017, Asia Pacific sets a new record according to a report released by the Pacific Asia Travel Association (PATA). Turkey, Japan, Mexico, Vietnam, and Thailand are the top 5 destinations in 2017 by annual volume gain in IVAS.
Intra-regional travel flows remained very strong for most Asia Pacific regions in 2017 with almost 94% of the foreign arrivals into Asia originating from within Asia itself. For the Americas, the intra-regional proportion of international travel was 78%.
The Pacific went against this trend however, with less than one-third (32%) of its foreign arrivals in 2017 originating from within the Pacific region; more than half (53%) of the foreign arrivals into the Pacific in that year came from Asian origin markets.
In terms of supplier markets into Asia Pacific in 2017, the vast majority of foreign arrivals came from Asia (62%), followed by the Americas (18%) and then Europe (12%). The Pacific supplied a little over two percent of the total arrivals into Asia Pacific in 2017, followed by Africa with less than one percent. A significant proportion of arrivals (5%) came from origin markets that were unspecified.
Αναρτήθηκε από geop στις 9:58 π.μ.


text:
package br.com.project.checkskills.utils.validators;

import static br.com.project.checkskills.utils.validators.IsNullUtil.isNullOrEmpty;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.lang3.StringUtils;

public final class EmailValidator {

	private static final String VIRGULA = ",";

	private static final String EMAIL_PATTERN =
			"\\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b";

	private EmailValidator() {
		throw new IllegalStateException("Class Not Instantiable");
	}

	public static boolean isValid(final String email) {
		if (isNullOrEmpty(email)){
			return false;
		}

		Pattern pattern = Pattern.compile(EMAIL_PATTERN, Pattern.CASE_INSENSITIVE);
		Matcher matcher = pattern.matcher(email);

		return matcher.matches();
	}

	/**
	 *
	 *
 Valida um conjunto de emails.

	 *
	 * @param emails - conjunto de emails a serem validados
	 * @return true - se todos os emails forem validos.
	 */
	public static boolean isValid(final String... emails) {
		for (final String email : emails) {
			if(!isValid(email)) {
				return Boolean.FALSE;
			}
		}

		return Boolean.TRUE;
	}

	/**
	 *
	 *
 Valida uma {@link String} com um conjunto de emails separados por VIRGULA.

	 *
	 * @param emails, separados por virgula a serem validados
	 * @return true, caso todos os emails forem validos
	 */
	public static boolean isMultiplosEmailsSeparadosPorVirgulaValidos(final String emails) {
		return isMultipleEmailsValid(emails, VIRGULA);
	}

	/**
	 *
	 *
 Valida uma {@link String} com um conjunto de emails separados pelo separator informado.

	 *
	 * @param emails, separados pelo separador informado a serem validados
	 * @return true, caso todos os emails forem validos
	 */
	public static boolean isMultipleEmailsValid(final String emails, final String separator) {
		final String[] emailsPosSplit = StringUtils.split(emails, separator);
		return isValid(emailsPosSplit);
	}

}