text:
#define LOG_LEVEL CONFIG_USB_DEVICE_NETWORK_LOG_LEVEL
#include <logging/log.h>
LOG_MODULE_REGISTER(usb_rndis);

/* Enable verbose debug printing extra hexdumps */
#define VERBOSE_DEBUG		0

#include <init.h>

#include <net/ethernet.h>
#include <net_private.h>

#include <usb/usb_device.h>
#include <usb/usb_common.h>
#include <usb/class/usb_cdc.h>
#include <os_desc.h>

#include "netusb.h"
#include "function_rndis.h"

/* RNDIS handling */
#define CFG_RNDIS_TX_BUF_COUNT	5
#define CFG_RNDIS_TX_BUF_SIZE	512
NET_BUF_POOL_DEFINE(rndis_tx_pool, CFG_RNDIS_TX_BUF_COUNT,
		    CFG_RNDIS_TX_BUF_SIZE, 0, NULL);
static struct k_fifo rndis_tx_queue;

/* Serialize RNDIS command queue for later processing */
#define CFG_RNDIS_CMD_BUF_COUNT	2
#define CFG_RNDIS_CMD_BUF_SIZE	512
NET_BUF_POOL_DEFINE(rndis_cmd_pool, CFG_RNDIS_CMD_BUF_COUNT,
		    CFG_RNDIS_CMD_BUF_SIZE, 0, NULL);
static struct k_fifo rndis_cmd_queue;

/*
 * Stack for cmd thread
 */
static K_THREAD_STACK_DEFINE(cmd_stack, 2048);
static struct k_thread cmd_thread_data;

struct usb_rndis_config {
#ifdef CONFIG_USB_COMPOSITE_DEVICE
	struct usb_association_descriptor iad;
#endif
	struct usb_if_descriptor if0;
	struct cdc_header_descriptor if0_header;
	struct cdc_cm_descriptor if0_cm;
	struct cdc_acm_descriptor if0_acm;
	struct cdc_union_descriptor if0_union;
	struct usb_ep_descriptor if0_int_ep;

	struct usb_if_descriptor if1;
	struct usb_ep_descriptor if1_in_ep;
	struct usb_ep_descriptor if1_out_ep;
} __packed;

USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_rndis_config rndis_cfg = {
#ifdef CONFIG_USB_COMPOSITE_DEVICE
	.iad = {
		.bLength = sizeof(struct usb_association_descriptor),
		.bDescriptorType = USB_ASSOCIATION_DESC,
		.bFirstInterface = 0,
		.bInterfaceCount = 0x02,
		.bFunctionClass = COMMUNICATION_DEVICE_CLASS,
		.bFunctionSubClass = 6,
		.bFunctionProtocol = 0,
		.iFunction = 0,
	},
#endif
	/* Interface descriptor 0 */
	/* CDC Communication interface */
	.if0 = {
		.bLength = sizeof(struct usb_if_descriptor),
		.bDescriptorType = USB_INTERFACE_DESC,
		.bInterfaceNumber = 0,
		.bAlternateSetting = 0,
		.bNumEndpoints = 1,
		.bInterfaceClass = COMMUNICATION_DEVICE_CLASS,
		.bInterfaceSubClass = ACM_SUBCLASS,
		.bInterfaceProtocol = ACM_VENDOR_PROTOCOL,
		.iInterface = 0,
	},
	/* Header Functional Descriptor */
	.if0_header = {
		.bFunctionLength = sizeof(struct cdc_header_descriptor),
		.bDescriptorType = CS_INTERFACE,
		.bDescriptorSubtype = HEADER_FUNC_DESC,
		.bcdCDC = sys_cpu_to_le16(USB_1_1),
	},
	/* Call Management Functional Descriptor */
	.if0_cm = {
		.bFunctionLength = sizeof(struct cdc_cm_descriptor),
		.bDescriptorType = CS_INTERFACE,
		.bDescriptorSubtype = CALL_MANAGEMENT_FUNC_DESC,
		.bmCapabilities = 0x00,
		.bDataInterface = 1,
	},
	/* ACM Functional Descriptor */
	.if0_acm = {
		.bFunctionLength = sizeof(struct cdc_acm_descriptor),
		.bDescriptorType = CS_INTERFACE,
		.bDescriptorSubtype = ACM_FUNC_DESC,
		/* Device supports the request combination of:
		 *	Set_Line_Coding,
		 *	Set_Control_Line_State,
		 *	Get_Line_Coding
		 *	and the notification Serial_State
		 */
		.bmCapabilities = 0x00,
	},
	/* Union Functional Descriptor */
	.if0_union = {
		.bFunctionLength = sizeof(struct cdc_union_descriptor),
		.bDescriptorType = CS_INTERFACE,
		.bDescriptorSubtype = UNION_FUNC_DESC,
		.bControlInterface = 0,
		.bSubordinateInterface0 = 1,
	},
	/* Notification EP Descriptor */
	.if0_int_ep = {
		.bLength = sizeof(struct usb_ep_descriptor),
		.bDescriptorType = USB_ENDPOINT_DESC,
		.bEndpointAddress = RNDIS_INT_EP_ADDR,
		.bmAttributes = USB_DC_EP_INTERRUPT,
		.wMaxPacketSize =
			sys_cpu_to_le16(CONFIG_RNDIS_INTERRUPT_EP_MPS),
		.bInterval = 0x09,
	},

	/* Interface descriptor 1 */
	/* CDC Data Interface */
	.if1 = {
		.bLength = sizeof(struct usb_if_descriptor),
		.bDescriptorType = USB_INTERFACE_DESC,
		.bInterfaceNumber = 1,
		.bAlternateSetting = 0,
		.bNumEndpoints = 2,
		.bInterfaceClass = COMMUNICATION_DEVICE_CLASS_DATA,
		.bInterfaceSubClass = 0,
		.bInterfaceProtocol = 0,
		.iInterface = 0,
	},
	/* Data Endpoint IN */
	.if1_in_ep = {
		.bLength = sizeof(struct usb_ep_descriptor),
		.bDescriptorType = USB_ENDPOINT_DESC,
		.bEndpointAddress = RNDIS_IN_EP_ADDR,
		.bmAttributes = USB_DC_EP_BULK,
		.wMaxPacketSize =
			sys_cpu_to_le16(CONFIG_RNDIS_BULK_EP_MPS),
		.bInterval = 0x00,
	},
	/* Data Endpoint OUT */
	.if1_out_ep = {
		.bLength = sizeof(struct usb_ep_descriptor),
		.bDescriptorType = USB_ENDPOINT_DESC,
		.bEndpointAddress = RNDIS_OUT_EP_ADDR,
		.bmAttributes = USB_DC_EP_BULK,
		.wMaxPacketSize =
			sys_cpu_to_le16(CONFIG_RNDIS_BULK_EP_MPS),
		.bInterval = 0x00,
	},
};

/*
 * TLV structure is used for data encapsulation parsing
 */
struct tlv {
	u32_t type;
	u32_t len;
	u8_t data[];
} __packed;

static struct __rndis {
	u32_t net_filter;

	enum {
		UNINITIALIZED,
		INITIALIZED,
	} state;

	struct net_pkt *in_pkt;	/* Pointer to pkt assembling at the moment */
	int in_pkt_len;		/* Packet length to be assembled */
	int skip_bytes;		/* In case of low memory, skip bytes */

	u16_t mtu;
	u16_t speed;		/* TODO: Calculate right speed */

	/* Statistics */
	u32_t rx_err;
	u32_t tx_err;
	u32_t rx_no_buf;

	atomic_t notify_count;

	u8_t mac[6];
	u8_t media_status;
} rndis = {
	.mac =  { 0x00, 0x00, 0x5E, 0x00, 0x53, 0x01 },
	.mtu = 1500, /* Ethernet frame */
	.media_status = RNDIS_OBJECT_ID_MEDIA_DISCONNECTED,
	.state = UNINITIALIZED,
	.skip_bytes = 0,
	.speed = 0,
};

static u8_t manufacturer[] = CONFIG_USB_DEVICE_MANUFACTURER;
static u32_t drv_version = 1U;

static u8_t tx_buf[NET_ETH_MAX_FRAME_SIZE +
				sizeof(struct rndis_payload_packet)];

static u32_t object_id_supported[] = {
	RNDIS_OBJECT_ID_GEN_SUPP_LIST,
	RNDIS_OBJECT_ID_GEN_HW_STATUS,
	RNDIS_OBJECT_ID_GEN_SUPP_MEDIA,
	RNDIS_OBJECT_ID_GEN_IN_USE_MEDIA,

	RNDIS_OBJECT_ID_GEN_MAX_FRAME_SIZE,
	RNDIS_OBJECT_ID_GEN_LINK_SPEED,
	RNDIS_OBJECT_ID_GEN_BLOCK_TX_SIZE,
	RNDIS_OBJECT_ID_GEN_BLOCK_RX_SIZE,

	RNDIS_OBJECT_ID_GEN_VENDOR_ID,
	RNDIS_OBJECT_ID_GEN_VENDOR_DESC,
	RNDIS_OBJECT_ID_GEN_VENDOR_DRV_VER,

	RNDIS_OBJECT_ID_GEN_PKT_FILTER,
	RNDIS_OBJECT_ID_GEN_MAX_TOTAL_SIZE,
	RNDIS_OBJECT_ID_GEN_CONN_MEDIA_STATUS,
	RNDIS_OBJECT_ID_GEN_PHYSICAL_MEDIUM,
#if defined(USE_RNDIS_STATISTICS)
	/* Using RNDIS statistics puts heavy load on
	 * USB bus, disable it for now
	 */
	RNDIS_OBJECT_ID_GEN_TRANSMIT_OK,
	RNDIS_OBJECT_ID_GEN_RECEIVE_OK,
	RNDIS_OBJECT_ID_GEN_TRANSMIT_ERROR,
	RNDIS_OBJECT_ID_GEN_RECEIVE_ERROR,
	RNDIS_OBJECT_ID_GEN_RECEIVE_NO_BUF,
#endif /* USE_RNDIS_STATISTICS */
	RNDIS_OBJECT_ID_802_3_PERMANENT_ADDRESS,
	RNDIS_OBJECT_ID_802_3_CURR_ADDRESS,
	RNDIS_OBJECT_ID_802_3_MCAST_LIST,
	RNDIS_OBJECT_ID_802_3_MAX_LIST_SIZE,
	RNDIS_OBJECT_ID_802_3_MAC_OPTIONS,
};

#define RNDIS_INT_EP_IDX		0
#define RNDIS_OUT_EP_IDX		1
#define RNDIS_IN_EP_IDX			2

static void rndis_bulk_out(u8_t ep, enum usb_dc_ep_cb_status_code ep_status);

static struct usb_ep_cfg_data rndis_ep_data[] = {
	{
		.ep_cb = usb_transfer_ep_callback,
		.ep_addr = RNDIS_INT_EP_ADDR
	},
	{
		.ep_cb = rndis_bulk_out,
		.ep_addr = RNDIS_OUT_EP_ADDR
	},
	{
		.ep_cb = usb_transfer_ep_callback,
		.ep_addr = RNDIS_IN_EP_ADDR
	},
};

static int parse_rndis_header(const u8_t *buffer, u32_t buf_len)
{
	struct rndis_payload_packet *hdr = (void *)buffer;
	u32_t len;

	if (buf_len < sizeof(*hdr)) {
		LOG_ERR("Too small packet len %u", buf_len);
		return -EINVAL;
	}

	if (hdr->type != sys_cpu_to_le32(RNDIS_DATA_PACKET)) {
		LOG_ERR("Wrong data packet type 0x%x",
			sys_le32_to_cpu(hdr->type));
		return -EINVAL;
	}

	len = sys_le32_to_cpu(hdr->len);
	/*
	 * Calculate additional offset since payload_offset is calculated
	 * from the start of itself ;)
	 */
	if (len < sys_le32_to_cpu(hdr->payload_offset) +
	    sys_le32_to_cpu(hdr->payload_len) +
	    offsetof(struct rndis_payload_packet, payload_offset)) {
		LOG_ERR("Incorrect RNDIS packet");
		return -EINVAL;
	}

	LOG_DBG("Parsing packet: len %u payload offset %u payload len %u",
		len, sys_le32_to_cpu(hdr->payload_offset),
		sys_le32_to_cpu(hdr->payload_len));

	return len;
}

void rndis_clean(void)
{
	LOG_DBG("");

	if (rndis.in_pkt) {
		net_pkt_unref(rndis.in_pkt);

		rndis.in_pkt = NULL;
		rndis.in_pkt_len = 0;
	}

	rndis.skip_bytes = 0;
}

static void rndis_bulk_out(u8_t ep, enum usb_dc_ep_cb_status_code ep_status)
{
	u8_t buffer[CONFIG_RNDIS_BULK_EP_MPS];
	u32_t hdr_offset = 0U;
	u32_t len, read;

	usb_read(ep, NULL, 0, &len);

	LOG_DBG("EP 0x%x status %d len %u", ep, ep_status, len);

	if (len > CONFIG_RNDIS_BULK_EP_MPS) {
		LOG_WRN("Limit read len %u to MPS %u", len,
			CONFIG_RNDIS_BULK_EP_MPS);
		len = CONFIG_RNDIS_BULK_EP_MPS;
	}

	usb_read(ep, buffer, len, &read);
	if (len != read) {
		LOG_ERR("Read %u instead of expected %u, skip the rest",
			    read, len);
		rndis.skip_bytes = len - read;
		return;
	}

	/* We already use frame keeping with len, warn here about
	 * receiving frame delimeter
	 */
	if (len == 1U && !buffer[0]) {
		LOG_DBG("Got frame delimeter, skip");
		return;
	}

	/* Handle skip bytes */
	if (rndis.skip_bytes) {
		LOG_WRN("Skip %u bytes out of remaining %d bytes",
			len, rndis.skip_bytes);

		rndis.skip_bytes -= len;

		if (rndis.skip_bytes < 0) {
			LOG_ERR("Error skipping bytes");

			rndis.skip_bytes = 0;
		}

		return;
	}

	/* Start new packet */
	if (!rndis.in_pkt) {
		struct net_pkt *pkt;

		/* Append data only, skipping RNDIS header */
		hdr_offset = sizeof(struct rndis_payload_packet);

		rndis.in_pkt_len = parse_rndis_header(buffer, len);
		if (rndis.in_pkt_len < 0) {
			LOG_ERR("Error parsing RNDIS header");

			rndis.rx_err++;
			return;
		}

		pkt = net_pkt_alloc_with_buffer(netusb_net_iface(),
						rndis.in_pkt_len,
						AF_UNSPEC, 0, K_NO_WAIT);
		if (!pkt) {
			/* In case of low memory: skip the whole packet
			 * hoping to get buffers for later ones
			 */
			rndis.skip_bytes = rndis.in_pkt_len - len;
			rndis.rx_no_buf++;

			LOG_ERR("Not enough pkt buffers, len %u, skip %u",
				rndis.in_pkt_len, rndis.skip_bytes);

			return;
		}

		rndis.in_pkt = pkt;
	}

	if (net_pkt_write(rndis.in_pkt,
			  buffer + hdr_offset, len - hdr_offset)) {
		LOG_ERR("Error writing data to pkt: %p", rndis.in_pkt);
		rndis_clean();
		rndis.rx_err++;
		return;
	}

	LOG_DBG("To asemble %d bytes, reading %u bytes",
		rndis.in_pkt_len, len);

	rndis.in_pkt_len -= len;
	if (!rndis.in_pkt_len) {
		LOG_DBG("Assembled full RNDIS packet");

		if (IS_ENABLED(VERBOSE_DEBUG)) {
			net_pkt_hexdump(rndis.in_pkt, ">");
		}

		/* Queue data to iface */
		netusb_recv(rndis.in_pkt);

		/* Start over for new packets */
		rndis.in_pkt = NULL;
	} else if (rndis.in_pkt_len < 0) {
		LOG_ERR("Error assembling packet, drop and start over");
		rndis_clean();
	}
}

static void rndis_notify_cb(u8_t ep, int size, void *priv)
{
	LOG_DBG("ep %x size %u", ep, size);

	atomic_dec(&rndis.notify_count);
}

static void rndis_queue_rsp(struct net_buf *rsp)
{
	if (!k_fifo_is_empty(&rndis_tx_queue)) {
		LOG_WRN("Transmit response queue is not empty");
	}

	LOG_DBG("Queued response pkt %p", rsp);

	net_buf_put(&rndis_tx_queue, rsp);
}

/* Notify host about available data */
static void rndis_notify_rsp(void)
{
	static u32_t buf[2] = {
		sys_cpu_to_le32(0x01),
		sys_cpu_to_le32(0x00)
	};
	int ret;

	LOG_DBG("count %u", atomic_get(&rndis.notify_count));

	if (atomic_get(&rndis.notify_count)) {
		LOG_WRN("Notification is already sent");
		return;
	}

	atomic_inc(&rndis.notify_count);

	ret = usb_transfer(rndis_ep_data[RNDIS_INT_EP_IDX].ep_addr,
			   (u8_t *)buf, sizeof(buf),
			   USB_TRANS_WRITE | USB_TRANS_NO_ZLP,
			   rndis_notify_cb, NULL);
	if (ret < 0) {
		LOG_ERR("Transfer failure, ret %d", ret);
	}
}

static int rndis_init_handle(u8_t *data, u32_t len)
{
	struct rndis_init_cmd *cmd = (void *)data;
	struct rndis_init_cmd_complete *rsp;
	struct net_buf *buf;

	LOG_DBG("req_id 0x%x", cmd->req_id);

	buf = net_buf_alloc(&rndis_tx_pool, K_NO_WAIT);
	if (!buf) {
		LOG_ERR("Cannot get free buffer");
		return -ENOMEM;
	}

	rsp = net_buf_add(buf, sizeof(*rsp));
	rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_SUCCESS);
	rsp->type = sys_cpu_to_le32(RNDIS_CMD_INITIALIZE_COMPLETE);
	rsp->len = sys_cpu_to_le32(sizeof(*rsp));
	rsp->req_id = cmd->req_id;

	rsp->major_ver = sys_cpu_to_le32(RNDIS_MAJOR_VERSION);
	rsp->minor_ver = sys_cpu_to_le32(RNDIS_MINOR_VERSION);

	rsp->flags = sys_cpu_to_le32(RNDIS_FLAG_CONNECTIONLESS);
	rsp->medium = sys_cpu_to_le32(RNDIS_MEDIUM_WIRED_ETHERNET);
	rsp->max_packets = sys_cpu_to_le32(1);
	rsp->max_transfer_size = sys_cpu_to_le32(rndis.mtu +
						 sizeof(struct net_eth_hdr) +
						 sizeof(struct
							rndis_payload_packet));

	rsp->pkt_align_factor = sys_cpu_to_le32(0);
	(void)memset(rsp->__reserved, 0, sizeof(rsp->__reserved));

	rndis.state = INITIALIZED;

	rndis_queue_rsp(buf);

	/* Nofity about ready reply */
	rndis_notify_rsp();

	return 0;
}

static int rndis_halt_handle(void)
{
	LOG_DBG("");

	rndis.state = UNINITIALIZED;

	/* TODO: Stop networking */

	return 0;
}

static uint32_t rndis_query_add_supp_list(struct net_buf *buf)
{
	for (int i = 0; i < ARRAY_SIZE(object_id_supported); i++) {
		net_buf_add_le32(buf, object_id_supported[i]);
	}

	return sizeof(object_id_supported);
}

static int rndis_query_handle(u8_t *data, u32_t len)
{
	struct rndis_query_cmd *cmd = (void *)data;
	struct rndis_query_cmd_complete *rsp;
	struct net_buf *buf;
	u32_t object_id, buf_len = 0U;

	buf = net_buf_alloc(&rndis_tx_pool, K_NO_WAIT);
	if (!buf) {
		LOG_ERR("Cannot get free buffer");
		return -ENOMEM;
	}

	object_id = sys_le32_to_cpu(cmd->object_id);

	LOG_DBG("req_id 0x%x Object ID 0x%x buf_len %u buf_offset %u",
		sys_le32_to_cpu(cmd->req_id),
		object_id,
		sys_le32_to_cpu(cmd->buf_len),
		sys_le32_to_cpu(cmd->buf_offset));

	rsp = net_buf_add(buf, sizeof(*rsp));
	rsp->type = sys_cpu_to_le32(RNDIS_CMD_QUERY_COMPLETE);
	rsp->req_id = cmd->req_id;

	/* offset is from the beginning of the req_id field */
	rsp->buf_offset = sys_cpu_to_le32(16);

	switch (object_id) {
	case RNDIS_OBJECT_ID_GEN_SUPP_LIST:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_SUPP_LIST");
		rndis_query_add_supp_list(buf);
		break;
	case RNDIS_OBJECT_ID_GEN_PHYSICAL_MEDIUM:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_PHYSICAL_MEDIUM");
		net_buf_add_le32(buf, RNDIS_PHYSICAL_MEDIUM_TYPE_UNSPECIFIED);
		break;
	case RNDIS_OBJECT_ID_GEN_MAX_FRAME_SIZE:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_MAX_FRAME_SIZE");
		net_buf_add_le32(buf, rndis.mtu);
		break;
	case RNDIS_OBJECT_ID_GEN_LINK_SPEED:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_LINK_SPEED");
		if (rndis.media_status == RNDIS_OBJECT_ID_MEDIA_DISCONNECTED) {
			net_buf_add_le32(buf, 0);
		} else {
			net_buf_add_le32(buf, rndis.speed);
		}
		break;
	case RNDIS_OBJECT_ID_GEN_CONN_MEDIA_STATUS:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_CONN_MEDIA_STATUS");
		net_buf_add_le32(buf, rndis.media_status);
		break;
	case RNDIS_OBJECT_ID_GEN_MAX_TOTAL_SIZE:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_MAX_TOTAL_SIZE");
		net_buf_add_le32(buf, RNDIS_GEN_MAX_TOTAL_SIZE);
		break;

		/* Statistics stuff */
	case RNDIS_OBJECT_ID_GEN_TRANSMIT_ERROR:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_TRANSMIT_ERROR: %u", rndis.tx_err);
		net_buf_add_le32(buf, rndis.tx_err);
		break;
	case RNDIS_OBJECT_ID_GEN_RECEIVE_ERROR:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_RECEIVE_ERROR: %u", rndis.rx_err);
		net_buf_add_le32(buf, rndis.rx_err);
		break;
	case RNDIS_OBJECT_ID_GEN_RECEIVE_NO_BUF:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_RECEIVE_NO_BUF: %u",
			rndis.rx_no_buf);
		net_buf_add_le32(buf, rndis.rx_no_buf);
		break;

		/* IEEE 802.3 */
	case RNDIS_OBJECT_ID_802_3_PERMANENT_ADDRESS:
		LOG_DBG("RNDIS_OBJECT_ID_802_3_PERMANENT_ADDRESS");
		memcpy(net_buf_add(buf, sizeof(rndis.mac)), rndis.mac,
		       sizeof(rndis.mac));
		break;
	case RNDIS_OBJECT_ID_802_3_CURR_ADDRESS:
		LOG_DBG("RNDIS_OBJECT_ID_802_3_CURR_ADDRESS");
		memcpy(net_buf_add(buf, sizeof(rndis.mac)), rndis.mac,
		       sizeof(rndis.mac));
		break;
	case RNDIS_OBJECT_ID_802_3_MCAST_LIST:
		LOG_DBG("RNDIS_OBJECT_ID_802_3_MCAST_LIST");
		net_buf_add_le32(buf, 0xE0000000); /* 224.0.0.0 */
		break;
	case RNDIS_OBJECT_ID_802_3_MAX_LIST_SIZE:
		LOG_DBG("RNDIS_OBJECT_ID_802_3_MAX_LIST_SIZE");
		net_buf_add_le32(buf, 1); /* one address */
		break;

		/* Vendor information */
	case RNDIS_OBJECT_ID_GEN_VENDOR_ID:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_VENDOR_ID");
		net_buf_add_le32(buf, CONFIG_USB_DEVICE_VID);
		break;
	case RNDIS_OBJECT_ID_GEN_VENDOR_DESC:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_VENDOR_DESC");
		memcpy(net_buf_add(buf, sizeof(manufacturer) - 1), manufacturer,
		       sizeof(manufacturer) - 1);
		break;
	case RNDIS_OBJECT_ID_GEN_VENDOR_DRV_VER:
		LOG_DBG("RNDIS_OBJECT_ID_GEN_VENDOR_DRV_VER");
		net_buf_add_le32(buf, drv_version);
		break;
	default:
		LOG_WRN("Unhandled query for Object ID 0x%x", object_id);
		break;
	}

	buf_len = buf->len - sizeof(*rsp);

	if (buf_len) {
		rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_SUCCESS);
	} else {
		rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_NOT_SUPP);
	}

	/* Can be zero if object_id not handled / found */
	rsp->buf_len = sys_cpu_to_le32(buf_len);

	rsp->len = sys_cpu_to_le32(buf_len + sizeof(*rsp));

	LOG_DBG("buf_len %u rsp->len %u buf->len %u",
		buf_len, rsp->len, buf->len);

	rndis_queue_rsp(buf);

	/* Nofity about ready reply */
	rndis_notify_rsp();

	return 0;
}

static int rndis_set_handle(u8_t *data, u32_t len)
{
	struct rndis_set_cmd *cmd = (void *)data;
	struct rndis_set_cmd_complete *rsp;
	struct net_buf *buf;
	u32_t object_id;
	u8_t *param;

	if (len < sizeof(*cmd)) {
		LOG_ERR("Packet is shorter then header");
		return -EINVAL;
	}

	/* Parameter starts at offset buf_offset of the req_id field ;) */
	param = (u8_t *)&cmd->req_id + sys_le32_to_cpu(cmd->buf_offset);

	if (len - ((u32_t)param - (u32_t)cmd) !=
	    sys_le32_to_cpu(cmd->buf_len)) {
		LOG_ERR("Packet parsing error");
		return -EINVAL;
	}

	buf = net_buf_alloc(&rndis_tx_pool, K_NO_WAIT);
	if (!buf) {
		LOG_ERR("Cannot get free buffer");
		return -ENOMEM;
	}

	object_id = sys_le32_to_cpu(cmd->object_id);

	LOG_DBG("req_id 0x%x Object ID 0x%x buf_len %u buf_offset %u",
		sys_le32_to_cpu(cmd->req_id), object_id,
		sys_le32_to_cpu(cmd->buf_len),
		sys_le32_to_cpu(cmd->buf_offset));

	rsp = net_buf_add(buf, sizeof(*rsp));
	rsp->type = sys_cpu_to_le32(RNDIS_CMD_SET_COMPLETE);
	rsp->len = sys_cpu_to_le32(sizeof(*rsp));
	rsp->req_id = cmd->req_id; /* same endianness */

	switch (object_id) {
	case RNDIS_OBJECT_ID_GEN_PKT_FILTER:
		if (sys_le32_to_cpu(cmd->buf_len) < sizeof(rndis.net_filter)) {
			LOG_ERR("Packet is too small");
			rsp->status = RNDIS_CMD_STATUS_INVALID_DATA;
			break;
		}

		rndis.net_filter = sys_get_le32(param);
		LOG_DBG("RNDIS_OBJECT_ID_GEN_PKT_FILTER 0x%x",
			rndis.net_filter);
		/* TODO: Start / Stop networking here */
		rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_SUCCESS);
		break;
	case RNDIS_OBJECT_ID_802_3_MCAST_LIST:
		LOG_DBG("RNDIS_OBJECT_ID_802_3_MCAST_LIST");
		/* ignore for now */
		rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_SUCCESS);
		break;
	default:
		LOG_ERR("Unhandled object_id 0x%x", object_id);
		rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_NOT_SUPP);
		break;
	}

	rndis_queue_rsp(buf);

	/* Nofity about ready reply */
	rndis_notify_rsp();

	return 0;
}

static int rndis_reset_handle(u8_t *data, u32_t len)
{
	struct rndis_reset_cmd_complete *rsp;
	struct net_buf *buf;

	buf = net_buf_alloc(&rndis_tx_pool, K_NO_WAIT);
	if (!buf) {
		LOG_ERR("Cannot get free buffer");
		return -ENOMEM;
	}

	LOG_DBG("");

	rsp = net_buf_add(buf, sizeof(*rsp));
	rsp->type = sys_cpu_to_le32(RNDIS_CMD_RESET_COMPLETE);
	rsp->len = sys_cpu_to_le32(sizeof(*rsp));
	rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_SUCCESS);
	rsp->addr_reset = sys_cpu_to_le32(1);

	rndis_queue_rsp(buf);

	/* Nofity about ready reply */
	rndis_notify_rsp();

	return 0;
}

static int rndis_keepalive_handle(u8_t *data, u32_t len)
{
	struct rndis_keepalive_cmd *cmd = (void *)data;
	struct rndis_keepalive_cmd_complete *rsp;
	struct net_buf *buf;

	buf = net_buf_alloc(&rndis_tx_pool, K_NO_WAIT);
	if (!buf) {
		LOG_ERR("Cannot get free buffer");
		return -ENOMEM;
	}

	LOG_DBG("");

	rsp = net_buf_add(buf, sizeof(*rsp));
	rsp->type = sys_cpu_to_le32(RNDIS_CMD_KEEPALIVE_COMPLETE);
	rsp->len = sys_cpu_to_le32(sizeof(*rsp));
	rsp->req_id = cmd->req_id; /* same order */
	rsp->status = sys_cpu_to_le32(RNDIS_CMD_STATUS_SUCCESS);

	rndis_queue_rsp(buf);

	/* Nofity about ready reply */
	rndis_notify_rsp();

	return 0;
}

static int queue_encapsulated_cmd(u8_t *data, u32_t len)
{
	struct net_buf *buf;

	buf = net_buf_alloc(&rndis_cmd_pool, K_NO_WAIT);
	if (!buf) {
		LOG_ERR("Cannot get free buffer");
		return -ENOMEM;
	}

	memcpy(net_buf_add(buf, len), data, len);

	net_buf_put(&rndis_cmd_queue, buf);

	LOG_DBG("queued buf %p", buf);

	return 0;
}

static int handle_encapsulated_cmd(u8_t *data, u32_t len)
{
	struct tlv *msg = (void *)data;

	if (IS_ENABLED(VERBOSE_DEBUG)) {
		net_hexdump("CMD >", data, len);
	}

	if (len != msg->len) {
		LOG_WRN("Total len is different then command len %u %u",
			len, msg->len);
		/* TODO: need actions? */
	}

	LOG_DBG("RNDIS type 0x%x len %u total len %u",
		msg->type, msg->len, len);

	switch (msg->type) {
	case RNDIS_CMD_INITIALIZE:
		return rndis_init_handle(data, len);
	case RNDIS_CMD_HALT:
		return rndis_halt_handle();
	case RNDIS_CMD_QUERY:
		return rndis_query_handle(data, len);
	case RNDIS_CMD_SET:
		return rndis_set_handle(data, len);
	case RNDIS_CMD_RESET:
		return rndis_reset_handle(data, len);
	case RNDIS_CMD_KEEPALIVE:
		return rndis_keepalive_handle(data, len);
	default:
		LOG_ERR("Message 0x%x unhandled", msg->type);
		return -ENOTSUP;
	}

	return 0;
}

static int handle_encapsulated_rsp(u8_t **data, u32_t *len)
{
	struct net_buf *buf;

	LOG_DBG("");

	buf = net_buf_get(&rndis_tx_queue, K_NO_WAIT);
	if (!buf) {
		LOG_ERR("Error getting response buffer");
		*len = 0U;
		return -ENODATA;
	}

	if (IS_ENABLED(VERBOSE_DEBUG)) {
		net_hexdump("RSP <", buf->data, buf->len);
	}

	memcpy(*data, buf->data, buf->len);
	*len = buf->len;

	net_buf_unref(buf);

	return 0;
}

static int rndis_class_handler(struct usb_setup_packet *setup, s32_t *len,
			       u8_t **data)
{
	LOG_DBG("len %d req_type 0x%x req 0x%x enabled %u",
		*len, setup->bmRequestType, setup->bRequest,
		netusb_enabled());

	if (!netusb_enabled()) {
		LOG_ERR("interface disabled");
		return -ENODEV;
	}

	if (setup->bRequest == CDC_SEND_ENC_CMD &&
	    REQTYPE_GET_DIR(setup->bmRequestType) == REQTYPE_DIR_TO_DEVICE) {
		/*
		 * Instead of handling here, queue
		 * handle_encapsulated_cmd(*data, *len);
		 */
		queue_encapsulated_cmd(*data, *len);
	} else if (setup->bRequest == CDC_GET_ENC_RSP &&
		   REQTYPE_GET_DIR(setup->bmRequestType) ==
		   REQTYPE_DIR_TO_HOST) {
		handle_encapsulated_rsp(data, len);
	} else {
		*len = 0; /* FIXME! */
		LOG_WRN("Unknown USB packet req 0x%x type 0x%x",
			setup->bRequest, setup->bmRequestType);
	}

	return 0;
}

static void cmd_thread(void)
{
	LOG_INF("Command thread started");

	while (true) {
		struct net_buf *buf;

		buf = net_buf_get(&rndis_cmd_queue, K_FOREVER);

		LOG_DBG("got buf %p", buf);

		handle_encapsulated_cmd(buf->data, buf->len);

		net_buf_unref(buf);

		k_yield();
	}
}

/*
 * RNDIS Send functions
 */

static void rndis_hdr_add(u8_t *buf, u32_t len)
{
	struct rndis_payload_packet *hdr = (void *)buf;
	u32_t offset = offsetof(struct rndis_payload_packet, payload_offset);

	(void)memset(hdr, 0, sizeof(*hdr));

	hdr->type = sys_cpu_to_le32(RNDIS_DATA_PACKET);
	hdr->len = sys_cpu_to_le32(len + sizeof(*hdr));
	hdr->payload_offset = sys_cpu_to_le32(sizeof(*hdr) - offset);
	hdr->payload_len = sys_cpu_to_le32(len);

	LOG_DBG("type %u len %u payload offset %u payload len %u",
		hdr->type, hdr->len, hdr->payload_offset, hdr->payload_len);
}

static int rndis_send(struct net_pkt *pkt)
{
	size_t len = net_pkt_get_len(pkt);
	int ret;

	LOG_DBG("send pkt %p len %u", pkt, len);

	if (rndis.media_status == RNDIS_OBJECT_ID_MEDIA_DISCONNECTED) {
		LOG_DBG("Media disconnected, drop pkt %p", pkt);
		return -EPIPE;
	}

	if (IS_ENABLED(VERBOSE_DEBUG)) {
		net_pkt_hexdump(pkt, "<");
	}

	if (len + sizeof(struct rndis_payload_packet) > sizeof(tx_buf)) {
		LOG_WRN("Trying to send too large packet, drop");
		return -ENOMEM;
	}

	rndis_hdr_add(tx_buf, len);

	ret = net_pkt_read(pkt,
			   tx_buf + sizeof(struct rndis_payload_packet),
			   len);
	if (ret < 0) {
		return ret;
	}

	ret = usb_transfer_sync(rndis_ep_data[RNDIS_IN_EP_IDX].ep_addr,	tx_buf,
				len + sizeof(struct rndis_payload_packet),
				USB_TRANS_WRITE);
	if (ret != len + sizeof(struct rndis_payload_packet)) {
		LOG_ERR("Transfer failure");
		return ret;
	}

	return 0;
}

#if defined(CONFIG_USB_DEVICE_OS_DESC)
/* This string descriptor would be read the first time device is plugged in.
 * It is Microsoft extension called an OS String Descriptor
 */
#define MSOS_STRING_LENGTH	18
static struct string_desc {
	u8_t bLength;
	u8_t bDescriptorType;
	u8_t bString[MSOS_STRING_LENGTH - 4];
	u8_t bMS_VendorCode;
	u8_t bPad;
} __packed msosv1_string_descriptor = {
	.bLength = MSOS_STRING_LENGTH,
	.bDescriptorType = USB_STRING_DESC,
	/* Signature MSFT100 */
	.bString = {
		'M', 0x00, 'S', 0x00, 'F', 0x00, 'T', 0x00,
		'1', 0x00, '0', 0x00, '0', 0x00
	},
	.bMS_VendorCode = 0x03,	/* Vendor Code, used for a control request */
	.bPad = 0x00,		/* Padding byte for VendorCode look as UTF16 */
};

static struct compat_id_desc {
	/* MS OS 1.0 Header Section */
	u32_t dwLength;
	u16_t bcdVersion;
	u16_t wIndex;
	u8_t bCount;
	u8_t Reserved[7];
	/* MS OS 1.0 Function Section */
	struct compat_id_func {
		u8_t bFirstInterfaceNumber;
		u8_t Reserved1;
		u8_t compatibleID[8];
		u8_t subCompatibleID[8];
		u8_t Reserved2[6];
	} __packed func[1];
} __packed msosv1_compatid_descriptor = {
	.dwLength = sys_cpu_to_le32(40),
	.bcdVersion = sys_cpu_to_le16(0x0100),
	.wIndex = sys_cpu_to_le16(USB_OSDESC_EXTENDED_COMPAT_ID),
	.bCount = 0x01, /* One function section */
	.Reserved = {
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
	},

	.func = {
		{
			.bFirstInterfaceNumber = 0x00,
			.Reserved1 = 0x01,
			.compatibleID = {
				'R', 'N', 'D', 'I', 'S', 0x00, 0x00, 0x00
			},
			.subCompatibleID = {
				'5', '1', '6', '2', '0', '0', '1', 0x00
			},
			.Reserved2 = {
				0x00, 0x00, 0x00, 0x00, 0x00, 0x00
			}
		},
	}
};

static struct usb_os_descriptor os_desc = {
	.string = (u8_t *)&msosv1_string_descriptor,
	.string_len = sizeof(msosv1_string_descriptor),
	.vendor_code = 0x03,
	.compat_id = (u8_t *)&msosv1_compatid_descriptor,
	.compat_id_len = sizeof(msosv1_compatid_descriptor),
};
#endif /* CONFIG_USB_DEVICE_OS_DESC */

static int rndis_init(struct device *arg)
{
	ARG_UNUSED(arg);

	LOG_DBG("RNDIS initialization");

	/* Transmit queue init */
	k_fifo_init(&rndis_tx_queue);
	/* Command queue init */
	k_fifo_init(&rndis_cmd_queue);

	/* Register MS OS Descriptor */
	usb_register_os_desc(&os_desc);

	k_thread_create(&cmd_thread_data, cmd_stack,
			K_THREAD_STACK_SIZEOF(cmd_stack),
			(k_thread_entry_t)cmd_thread,
			NULL, NULL, NULL, K_PRIO_COOP(8), 0, K_NO_WAIT);

	return 0;
}

static int rndis_connect_media(bool status)
{
	if (status) {
		rndis.media_status = RNDIS_OBJECT_ID_MEDIA_CONNECTED;
	} else {
		rndis.media_status = RNDIS_OBJECT_ID_MEDIA_DISCONNECTED;
	}

	return 0;
}

static struct netusb_function rndis_function = {
	.connect_media = rndis_connect_media,
	.send_pkt = rndis_send,
};

static void rndis_status_cb(struct usb_cfg_data *cfg,
			    enum usb_dc_status_code status,
			    const u8_t *param)
{
	ARG_UNUSED(cfg);

	/* Check the USB status and do needed action if required */
	switch (status) {
	case USB_DC_CONFIGURED:
		LOG_DBG("USB device configured");
		netusb_enable(&rndis_function);
		break;

	case USB_DC_DISCONNECTED:
		LOG_DBG("USB device disconnected");
		netusb_disable();
		break;

	case USB_DC_ERROR:
	case USB_DC_RESET:
	case USB_DC_CONNECTED:
	case USB_DC_SUSPEND:
	case USB_DC_RESUME:
	case USB_DC_INTERFACE:
		LOG_DBG("USB unhandlded state: %d", status);
		break;

	case USB_DC_SOF:
		break;

	case USB_DC_UNKNOWN:
	default:
		LOG_DBG("USB unknown state %d", status);
		break;
	}
}

static void netusb_interface_config(struct usb_desc_header *head,
				    u8_t bInterfaceNumber)
{
	ARG_UNUSED(head);

	rndis_cfg.if0.bInterfaceNumber = bInterfaceNumber;
	rndis_cfg.if0_union.bControlInterface = bInterfaceNumber;
	rndis_cfg.if0_union.bSubordinateInterface0 = bInterfaceNumber + 1;
	rndis_cfg.if1.bInterfaceNumber = bInterfaceNumber + 1;
#ifdef CONFIG_USB_COMPOSITE_DEVICE
	rndis_cfg.iad.bFirstInterface = bInterfaceNumber;
#endif
}

USBD_CFG_DATA_DEFINE(netusb) struct usb_cfg_data netusb_config = {
	.usb_device_description = NULL,
	.interface_config = netusb_interface_config,
	.interface_descriptor = &rndis_cfg.if0,
	.cb_usb_status = rndis_status_cb,
	.interface = {
		.class_handler = rndis_class_handler,
		.custom_handler = NULL,
		.vendor_handler = NULL,
	},
	.num_endpoints = ARRAY_SIZE(rndis_ep_data),
	.endpoint = rndis_ep_data,
};

/* Initialize this before eth_netusb device init */
SYS_INIT(rndis_init, POST_KERNEL, 0);


text:
It was a dark yellow, says Arsene Wenger, but Arsenal will not appeal Granit Xhaka red card
Arsenal beat Swansea 3-2 in a Premier League match that swung one way and then other
By : Deepak Vikraman
Oct 16, 2016 09:32 IST
Granit Xhaka reacts as Jon Moss shows the Arsenal midfielder a straight red card in the Premier League match against SwanseaReuters
Arsene Wenger has confirmed Arsenal will not appeal the red card received by Granit Xhaka during their 3-2 win over Swansea City in the Premier League on Saturday. Xhaka was shown a disputable straight red by the referee Jon Moss for tripping up Modou Barrow with 20 minutes remaining in the game.
Wenger was in a relieved and happy mood after Arsenal's nervy win, a match that they should have really won by a big margin and gone into cruise mode in the second half. However, owing to their fondness for making things difficult for themselves, particularly against this opposition, the match ended up being a lot closer than it should have been, with Xhaka's red card only piling the pressure on the team in the final moments.
Asked if Arsenal will appeal the red card, Wenger said: "No," before adding, "It looked harsh to me. But it was a deliberate foul. It looked a dark yellow – and the referee went for a bright red."
Wenger is confident that Xhaka will learn from his mistake. "I think intelligence means you don't make the same mistake twice, and I hope he learns from that," the manager said.
Xhaka came to Arsenal from Borussia Monchengladbach with a bit of a reputation, having seen plenty of red cards in his career already. While Arsenal have been crying out for someone in midfield with a bit of a mean streak, Wenger does not think Xhaka has a discipline issue. And going by the red card he received against Swansea, 99 times out of a 100, that would have been a yellow and the commentator would have been heard saying "that is a smart foul there, he has taken one for the team."
"Before, in Germany, he had some [red cards], but I don't think he's a dirty player at all," Wenger added. "Sometimes there have been some clumsy tackles, because he's not a natural defender, he's a guy who likes to play forward.
"I will speak to him. I think Barrow made a lot of it as well, because he could go on. But the referee saw a bad tackle and you have to respect that. It is what it is, and he has to learn from it."
Oh Wow! Look at Sanya Malhotra killing it with her bodacious dance moves

redpajama_set_name: RedPajamaCommonCrawl


text:
Sox on Fox - Fox Sports announces 2014 schedule for MLB on Fox
Ben Whitehead
To the victor go the spoils. Thus, the Boston Red Sox - the 2013 World Champions - will receive plenty of air time during their 2014 campaign. We've already seen ESPN's Sunday Night Baseball schedule will include three Red Sox games prior to the All-Star Break.
MLB on Fox followed suit and released its full-season slate Thursday night with the lovable Red Sox receiving more national TV slots. Boston will be featured on either Fox or Fox Sports 1 six times, including three games against the Yankees. There's potential for more, as the final two weekends of the regular season are "TBD." The Sox are at Baltimore and home against New York those two weekends, two AL East rivalry series that could impact the playoff race.
Here are the dates the Sox can be seen on Fox networks (all times ET):
April 12 at New York Yankees (FS1) - 1 pm
May 31 vs. Tampa Bay Rays (Fox) - 7 pm
June 7 at Detroit Tigers (Fox) - 7 pm
June 28 at New York Yankees (Fox) - 7 pm
July 5 vs. Baltimore Orioles (Fox) - 7 pm
August 2 vs. New York Yankees (FS1) - 4 pm
The Yankees are slated to be on the networks 11 times, the most of any MLB club. With the announcement of Derek Jeter's retirement, it's no surprise the national media will want to cover every step along his final journey. Click here to see the full MLB on Fox schedule.
Like what you read? See more from Ben here.
Have a question or comment for Ben? Give him a shout on Twitter: @thebenwhitehead
Unknown 2/28/2014 07:30:00 AM


text:
The MICCAI Society is a professional organization for scientists in the areas of Medical Image Computing and Computer Assisted Interventions. Due to the multidisciplinary nature of these fields, the society brings together researchers from several scientific disciplines. including computer science, robotics, physics, and medicine. The society is best known for its annual flagship event, The MICCAI Conference, which facilitates the publication and presentation of original research on MICCAI-related topics. However, the society provides endorsements and sponsorships for several scientific events each year.

History

In 1998, three international conferences: Visualization in Biomedical Computing (VBC), Computer Vision and Virtual Reality in Robotics and Medicine (CVRMed), and Medical Robotics and Computer Assisted Surgery (MRCAS) merged into a single conference entitled "The International Conference on Medical Image Computing and Computer Assisted Interventions" (abbreviated MICCAI) with its first edition in Boston. The MICCAI Society was founded in 2004 by several active members of this research community and former chairs of the MICCAI conference. In 2009, the society introduced the "MICCAI Fellow" award to recognize senior members who had made substantial contributions to the MICCAI community. 12 fellows were elected in 2009 and three additional fellows are elected each year. New MICCAI Fellows are announced each year at the Annual MICCAI Conference. Since 2012, the society is involved in several events each year outside of the annual conference through endorsements and/or sponsorships. These include a number of smaller international conferences, MICCAI-focused workshop sessions at related conferences, and educational programs such as "summer schools".

Research focus

Medical Image Computing

Medical Image Computing (the "MIC" in MICCAI) is the field of study involving the application of image processing and computer vision to medical imaging. The goals of medical image computing tasks are diverse, but some common examples are computer-aided diagnosis, image segmentation of anatomical structures and/or abnormalities, and the registration or "alignment" of medical images acquired through different means or at different points in time.

Computer Assisted Interventions

Computer Assisted Interventions (the "CAI" in MICCAI) is the field of study concerned with the use of computational tools in medical interventions. Prominent examples of computer aided interventions currently in widespread use include image guided biopsy and robot-assisted surgery. Integral to this research area is effective human-computer interaction and user interface design.

Subgroups

Within the MICCAI community, a number of organizations have emerged to represent and advocate for certain populations of MICCAI researchers. Among these are the MICCAI Student Board and the Women in MICCAI Committee.

MICCAI Student Board

The MICCAI Student Board began in 2010 when MICCAI initiated its social media presence by creating a facebook group. This effort was championed by student researchers who used the group to organize events specifically for students at the 2011 and 2012 annual conferences. After the 2012 event, the MICCAI board of directors formally recognized the MICCAI student board as a part of the society and began providing support for the student board's annual events.

Women in MICCAI Committee

The Women in MICCAI Committee began as a series of networking sessions for female researchers within the medical image analysis research community during the 2015 MICCAI conference and the 2016 IEEE International Symposium on Biomedical Imaging. In October 2016, the MICCAI board of directors approved a measure to create the "Women in MICCAI Committee" with the goal of strengthening the representation of female scientists in this research area.

Since its inception, the Women in MICCAI Committee has continued to organize networking sessions in conjunction with MICCAI events. It also developed and maintains several online platforms for discussion on social media. The committee is the primary interface between the MICCAI board of directors and the community of women researchers in MICCAI.

Annual MICCAI conference

Conference format

MICCAI conferences are typically scheduled for five days, of which the first and last days set aside for satellite events consisting of tutorials, workshops, and challenges. Those include  the Brain lesion workshop (BrainLes),  the Workshop on Interpretability of Machine Intelligence in Medical Image Computing (iMIMIC), the Workshop on Domain Adaptation and Representation Transfer (DART), the International Workshop on Multimodal Brain Image Analysis (MBIA), and others. The main conference includes invited presentations, panel discussions, and podium and poster presentations of original research papers which are published by Springer Nature as conference proceedings.

Past MICCAI conferences

Upcoming MICCAI conferences

Publications

The MICCAI conference proceedings consist of full-length papers which undergo comprehensive peer review. Since even before the merger of the CVRMed, MRCAS, and VBC conferences (see History), the proceedings of the annual conference have been published by Springer Nature as part of the Lecture Notes in Computer Science (LNCS) series.

In addition to the proceedings of the annual conference, MICCAI officially partners with two peer reviewed scientific journals: "Medical Image Analysis" published by Elsevier and "The International Journal of Computer Assisted Radiology and Surgery" (IJCARS) published by Springer Nature. These journals loosely correspond to the "MIC" and "CAI" focuses of the MICCAI Society respectively, but they have substantial overlap in subject matter.

The MICCAI Society also partners with Elsevier to develop a series of books on MICCAI-related research, written by scientists in the MICCAI research community. , nine books have been published in this series

See also
 Robot-assisted surgery
 Computer vision
 Conference on Computer Vision and Pattern Recognition
 International Conference on Computer Vision
 European Conference on Computer Vision
 Institute of Electrical and Electronics Engineers
 International Society for Computer Aided Surgery

References

External links
 The MICCAI Society Website

Computer science-related professional associations
Computer science organizations
Medical technology
Health informatics

redpajama_set_name: RedPajamaWikipedia


text:
Tribes Ascend: Why It's Great
The Duellists
Feature: Wheeee--
Have You Played… Tribes: Ascend?
Matt Cox • 2 years ago	• 25
--eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee--
Tagged with feature, Have You Played, Hi-Rez, Tribes: Ascend.
Tribes: Ascend Gets Final Update, Again
Alice O'Connor • 4 years ago	• 3
Eleven months after Tribes: Ascend [official site] unexpectedly received the 'Out of the Blue' update, reviving development on the superfast multiplayer FPS, here comes 'Parting Gifts'. Update 1.4 is now out and seems to be the end for this fleeting reinvigoration. 1.4 is less flashy than some of the recent patches, mostly bringing one last set of balance tweaks and bug fixes. You're a big…
Tagged with Hi-Rez Studios, Tribes: Ascend.
I Am The God Of Hellfire, And I Bring You A Tribes Map
Hi-Rez Studios stopped updating Tribes: Ascend [official site] in 2013 as they shifted focus to their MOBA Smite, but they have recently returned to the free-to-play jetpacking FPS. Following December's 'Out of the Blue' update and another patch in January, last night Hi-Rez released version 1.3. This latest update has brought more balance tweaks and a new map named Hellfire.
Tribes: Ascend 1.2 Patch Coming Later Today
Tribes: Ascend [official site] is receiving another update this evening. Patch 1.2 will bring sweeping balance changes to the gotta-go-fast jetpack FPS, increasing heavy armour there, reducing blast radii here, making it so pressing 'Q' selects your previously held weapon, that sort of thing. There's a full list of changes in this Google Doc and a chart of new weapon values in this here spreadsheet.
Let's Spin Again: Tribes Ascend V1.1 Released
Hi-Rez Studios gave up on Tribes Ascend [official site] for a couple of years, but a few months back made the unexpected announcement that they we working on a big ole update for their F2P jetpacking FPS. And they did release it! The 'Out of the Blue' update (or version 1.1, if you have no romance in your heart - if you wouldn't pash with…
Tagged with free to play, Hi-Rez Studios, Tribes: Ascend.
Tribes! Tribes! Tribes! Earthsiege And Tribes For Free
Say, reader dear, do you like the future? Do you like jetpacks? Do you like mechs? Do you like first-person shooters? Do you like multiplayer with vehicles and bases? Do you like classic series which folks grumble go forgotten too often? Do you like skill-based movement exploiting weird physics tricks? Do you like free video games?If you answered yes to at least three of those,…
Tagged with Dynamix, Earthsiege, Earthsiege 2, free games, Hi-Rez Studios, starsiege: tribes, Tribes, Tribes 2, Tribes: Ascend.
Tribes: Ascend's First Patch In Over 2 Years
Hi-Rez Studios stepped away from Tribes: Ascend [official site], their free-to-play revival of the classic FPS series, in 2013 to focus on their MOBA Smite. When they recently announced a new F2P FPS, the MOBA-tinged Paladins, well, they chances of them returning to Tribes seemed even slimmer. And yet!Over the weekend, Hi-Rez announced 'Out of the Blue', the first patch for Tribes since March 12,…
Ex-BioWare Devs Fuse Tribes And An Open World In Epoch
As long as this planet continues to spin, there will be a new Intriguing Kickstarter From Folks Who Used To Work On Major Triple-A Franchise X Of The Day. In this case, that Kickstarter is one for Epoch: Return, and the games that once - at least, in pieces, like so many tinker toys scattering from a bucket - emerged from developer Innate's collective brain…
Tagged with BioWare, Epoch: Return, Innate Games, Tribes, Mass Effect, Tribes: Ascend.
Feature: Jetpacking It In
Hi-Rez On Tribes' Failings And Future, Tribes Ascend 2
Oh Tribes Ascend, say it ain't so. Sure, we had our ups and downs, but you know you were loved, right? Right?! Just hold on a little bit longer and then-- oh, you're not dying. Just ceasing updates for the foreseeable future, maybe forever. Well, that's still a shame, but I guess I can stop frantically shaking you and screaming spittle into your face. But…
Tagged with feature, Hi-Rez Studios, Tribes: Ascend.
Not Dead Yet: Tribes Ascend To Get Map-Making Tools
Tribes Ascend isn't quite riding its sound-barrier-breaking coffin to Jetpack Valhalla just yet, but its future is looking rather desolate. Last week, Hi-Rez announced that major updates are out of the question for at least the next six months - and probably long after that due to SMITE's company-devouring need for attention. However, in an interview with RPS, COO Todd Harris explained that the high-flying…
Is This The End For Tribes Ascend?
OK, I usually hate misleading question mark headlines, but look at that one. It rhymes!That is probably the most positive thing you're going to read in this entire post.It sounds like Tribes Ascend is - for all intents and purposes - a done deal. Its servers will continue to run (and jump and jetpack) of course, but there hasn't been a major update since March,…
All The Guns: Tribes' Game Of The Year Update
Huh. Wow. I'll be honest: I'm a bit surprised. Hi-Rez has tied information about Tribes Ascend's single-purchase option to a searing ball of plasma and hurled it through our window, and it comes out to a measly $29.99/£20.99. For everything. VIPs, meanwhile, can instantly unlock all weapons, perks, and classes for $19.99/£13.99. That's... um. I mean, I still had a wonderful time for roughly the…
Blue Plate Spectacular: Tribes' Single Purchase Option
For being the developer of a game all about lightning-quick reaction times, Hi-Rez could be accused of reacting rather, um, glacially. More or less since day one, Tribes Ascend's free-to-play pricing model's taken flack for making new items prohibitively hard to come by, but recent months have finally seen the reigning king of Jetpack Mountain come down and deal with it. First, Hi-Rez halved XP…
Feature: So I turned myself to face me
Trendspotting: How Gaming's Changing In 2012 (Sez I)
Alec Meer • 8 years ago	• 195
No doubt there are big things yet to come from the last quarter of 2012, but even by October it feels like it's been an uncommonly important, even vital, year for games. The hit rate of great things, expected and unexpected, has been pretty steady, but on top of that there have been major emerging trends as gaming starts to move out of the awkward…
Tagged with have chin will scratch, Dishonored, Dota 2, Spec Ops: The Line, The Walking Dead, Tribes: Ascend.
Now With More German: Tribes' 'Marksman' Update
The Tribes: Ascend updates keep on rolling out, and so too does evidence of Hi-Rez's continued commitment to filling this game with strange stuff. Sure, they've already added disco, but now there are costumes. And elaborate backdrops. And German. But anyway, as long as the game keeps being good, we should not question the nature of these updates. And there are some pretty intriguing new…
Tagged with free to play, Hi-Rez Studios, update, Tribes: Ascend.
The Flag That Runs Like A Man: Tribes Ascend's Blitz Mode
I have something to confess to you all: I've been living a withered up husk of an existence. I honestly haven't played Tribes in weeks, and every other aspect of my life has suffered immeasurably for it. I'm a mess. A devastatingly attractive mess. But no more. Hi-Rez has revealed Ascend's latest giant update, and I have turned the most vibrant of all colors: interested. See, in…
Skiing Double: Tribes Ascend's Twinfusor Update
Can you remember when the last Tribes: Ascend update came out? I can't - at least, not well. I mean, I recall a few hazy images of youthful innocence, but it's as though they're being beamed in from another lifetime or a place with an overabundance of haze. In reality, however, I just have vaguely worrisome memory problems probably stemming from the fact that I…
Feature: The Duellists
Tribes Ascend: Why It's Great
Robert Florence • 8 years ago	• 191
I was asked to write about why Tribes: Ascend is great. I want to tell you why Tribes: Ascend is beautiful.
Tagged with feature, free games, Tribes: Ascend.
Making Progress: Tribes Ascend's Accelerate Update
It seems like only yesterday that Nathan wrote these words in regards to unlocking gear in Tribes: Ascend: "item unlocks still present a rather intimidating series of (often literally) uphill battles." The Accelerate Update flattens out those hills, or perhaps raises players to the top and allows them to roll down the other side. Well, sort of. The update addresses some frustrations by having gear…
Feature: Jet Set Interview
Let There Be Jetpacks: Hi-Rez On The Future Of Tribes
By most accounts, Tribes: Ascend's existence is quantifiably a Good Thing. It is, after all, a PC-exclusive (!) high-quality free-to-play first-person shooter (!!) that's in no way spit-shining Call of Duty's combat boots or leaping just high enough when it barks an order (!!!). Almost paradoxically, it's managed to be both slavishly devoted to the series' jetpack-jousting legacy while also paving the way for a new…


Cheryl's cookies with free shipping? That's almost too good to be true! Order Cheryl's with no shipping charge and get your cookies delivered for free!
Enjoy 25% Off with Cheryl's Cookies(cheryls.com) coupon and coupon code at AnyCodes.com. Do not miss the handpicked Cheryls promo codes and deals in April 2018!
50 best Cheryl's coupons and promo codes. Save big on gourmet cookies and candy. Today's top deal: 40% off.
Nobody does a deal like Groupon Coupons. Get coupon code. 12 used today Free Shipping On Cookies With Cheryl's Coupon Code. from Cheryls.com! See sale. $16. off.
© Free location coupons Incorp coupon | Promo Codes & Deals 2018 Cheryls cookies coupon code.


Are you aged between 11 – 16?
We are offering our young people the opportunity to come along to a 6 week workshop, beginning Tuesday 6th March at 18.00 – 19.30.
The workshop will consist of the following …….
Support to keep you in education & help with course you may be interested in.
Our tutor is very experienced and has a level 2 & 3 YMCA fitness instructor certificates, & is also a boxing coach.


text:
This New Coating Can Protect Electronics and Surfaces From Every Liquid
The University of Michigan has conceived of a new coating that can repel nearly all liquids. The new material is clear, durable and can easily bind to any surface.
By Loukia Papadopoulos
Robert Coelius/The Michigan Engineer News Center
The University of Michigan has published a new study in the journal ACS Applied Materials & Interfaces that demonstrates a new coating that swiftly sheds water and oil-based liquids, alcohols and many more. The coating, called "omniphobic", could soon be used to protect electronics and surfaces from nearly everything.
A multi-purpose product
The new liquid-repellent coating is the work of the lab of Anish Tuteja, associate professor of materials science and engineering at the University of Michigan. The product is durable, clear and can easily be applied to any surface making it very multifunctional.
"I have a 2-year-old at home, so for me, this particular project was about more than just the science," Tuteja said. "We're excited about what this could do to make homes and daycares cleaner places, and we're looking at a variety of possible applications in industry as well."
A unique mix of substances
The ingenious material is the result of a unique combination of fluorinated polyurethane and fluid-repellant fluorodecyl polyhedral oligomeric silsesquioxane (F-POSS). Tuteja's lab decided on this carefully selected clever mix by "mapping out the fundamental properties of a vast library of substances" in order "to mathematically predict how any two will behave when they're combined."
Self-Healing Coating Promises to Make Cracked Phone Screens History
"You can repel water with a rough surface that creates tiny pockets of air between the water and the surface, but those surfaces don't always repel oils or alcohols because of their lower surface tension," said Tuteja. "We needed a very smooth surface that interacts as little as possible with a variety of liquids, and we also needed ingredients that mix together very well, because too much phase separation between ingredients will scatter light."
This process allowed the researchers to conceive of a recipe that delivered a coating "that can be sprayed, brushed, dipped or spin-coated onto a wide variety of surfaces, where it binds tightly." The researchers also took into consideration strength and transparency when creating their recipe resulting in a product that is durable for everyday use but clear.
"The repellent and binder mix together well enough to make a clear coating, but there's a very small amount of phase separation between them," said Mathew Boban, a materials science and engineering graduate researcher and an author on the paper." That separation allows the F-POSS to sort of float to the surface and create a nice repellent layer."
Tuteja says his product would be cheap to manufacture and could go to market within the next two years. His team has already begun studies to ensure it is non-toxic in order to be used in childproof coatings.
Research for the coating was provided by the Air Force Office of Scientific Research, the Office of Naval Research and the National Science Foundation. Patent applications for the coating were filed jointly by The University of Michigan and the U.S. Air Force.
Via: The Michigan Engineer News Center
Air Pollution Can Cause Birth Defects and Fetal Death According to a New Study
Jessica Miley
Ice-Proofing Might Not Just Be A Dream Anymore
Kashyap Vyas
Mussels Inspire Research to Clean Oil Spills, Contaminated Water
Donna Fuscaldo
Massive Superflare Eruption from Sun within 100 Years Possible, New Study Says


text:
Q: Animate tabBox in shiny or shinydashboard In a shiny app I wanted to include an animated tabBox, similar to animated sliderInput - after specified time the tab would automatically switch to the next one. This doesn't seem to be an option in tabBox. I tried two solutions, neither worked. First I tried to simply link animation from sliderInput to tabBox:
library("shiny")
library("shinydashboard")

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
    sliderInput(inputId = "slider", label = "Player", min = 1, max = 4, value = 1,
                animate = animationOptions(interval = 1000, loop = TRUE)),
    textOutput(outputId = "text")
  ),
  dashboardBody(
    tabBox(
      id="tabbox",
        tabPanel(title = 1),
        tabPanel(title = 2),
        tabPanel(title = 3),
        tabPanel(title = 4)
      )
    )
  )
)

server <- function(input, output, session){
  output$text <- renderText({paste0("tabbox: ", input$tabbox, " slider: ",input$slider, " reactive: ", A$a)})
  A <- reactiveValues(a = 1)
  observeEvent(
    input$slider,
    A$a <- input$slider
    updateTabItems(session = session, inputId = "tabbox", selected = A$a)
  )
}

shinyApp(ui=ui, server=server)

However, this code only changes the reactive value A$a, but doesn't change input$tabbox (A$a is there only so I could see which step fails).
The second solution I tried was to run this function on button click, but it also failed:
for(i in 1:4){
  Sys.sleep(2)
  updateTabItems(session = session, inputId = "tabbox", selected = i)
}

Questions:
Is it possible by just using R? How could it be done?

redpajama_set_name: RedPajamaStackExchange


text:
Дубовые листья — символ, используемый в геральдике и системе символов разных стран. Плоские или рельефные изображения листьев дуба, единичные, или собранные в пучки, можно увидеть в государственной символике, наградах, военных знаках отличия.

Германия
Дубовые листья — один из национальных символов Германии.

Дуб в Германии издавна считается «германским» деревом. Его твёрдая древесина и характерные листья уже со времён германцев стали символами бессмертия и стойкости (сравни Ирминсуль).

В новое время, в эпоху Романтизма дуб стал символом верности.

После создания Германской империи в 1871 году дуб как символ национального единства стал очень популярным. На памятниках, государственной символике, орденах и монетах дубовые листья, дубовые веточки заменили листья лавра.

Орден Pour le Mérite и Рыцарский крест Железного креста были украшены дубовыми листями.

На фуражках Национальной народной армии кокарда была обрамлена венком из дубовых листьев.

Во времена нацистской Германии Дубовые листья являлись дополнительной наградой к ордену Рыцарский крест Железного креста. Также дубовые листья использовались на петлицах офицеров и генералов СС и различных подразделений РСХА.

США
В Соединённых Штатах Америки дубовые листья используются в военной символике: являются элементом наград и знаков различия.

Дубовые листья: дополнительный знак награды

Согласно действующим в США правилам при повторном награждении военной наградой второй знак награды (медаль) не вручается, а второе и последующие награждения обозначаются дополнительными знаками награды (), которые носится на орденской колодке или планке награды.

Одним из таких дополнительных знаков, обозначающих повторные награждения, являются Дубовые листья (, аббревиатура ), используемые преимущественно в Армии США и Военно-воздушных силах

Этот дополнительный знак военных наград США представляет собой пучок из четырёх листьев дуба с тремя желудями на стеблях листьев. Используется 3 размерных варианта знака:
 длина пучка 13/32 дюйма (10,3 мм) — для размещения на орденских колодках полноразмерных наград;
 длина пучка 5/16 дюйма (около 8 мм) — для планок наград;
 длина пучка 7/32 дюйма (5,6 мм) — для размещения на орденских колодках миниатюрных медалей.

Знаки существуют в двух вариантах цвета: бронзовые и серебряные Дубовые листья.

Бронзовые Дубовые листья обозначают одно награждение:
1 знак бронзовых Дубовых листьев, размещенный на ленте награды, обозначает двукратное награждение данной наградой (первое награждение обозначается самой медалью или планкой)
2 знака на ленте обозначают трёхкратное награждение.
Серебряные Дубовые листья обозначают пять награждений. Таким образом, серебряный знак, размещённый на колодке медали или планке, обозначает шестикратное награждение.

На планке награды должно быть расположено не более четырёх знаков Дубовых листьев (серебряных или бронзовых). Если необходимое число награждений не может быть обозначено при помощи четырёх знаков, размещённых на одной планке, допускается ношение второй планки награды (которая считается за одну награду). Когда при последующем награждении число наград может быть обозначено знаками, размещаемыми на одной планке, ношение второй планки прекращается.

Во всех видах Вооружённых сил США дубовые листья обозначают многократные награждения персональными или коллективными наградами Министерства обороны и наградами Объединённого командования ()

В Армии США дополнительный знак Дубовые листья используется для обозначения повторных награждений:
 персональными военными наградами (), за исключением награждения Воздушной медалью;
 ;
 коллективными наградами подразделений ().

В Военно-воздушных силах Дубовые листья обозначают повторные награждения:
 персональными военными наградами;
 коллективными наградами подразделений и рядом наград за службу.

В Военно-морских силах, Корпусе морской пехоты, Береговой охране военнослужащие названных видов Вооружённых силах носят Дубовые листья на полученных ими наградах Армии США и Военно-воздушных сил.

В случае повторного награждения военнослужащих иностранных государств или посмертного награждения Дубовые листья могут не вручаться, вместо них вручается второй, третий и т. д. знак награды.

В Военно-морских силах, Корпусе морской пехоты и Береговой охране повторные награждения персональными военными наградами названных видов Вооружённых сил обозначаются звёздами повторного награждения, повторные награждения коллективными наградами подразделений — звёздами за службу.

Дубовые листья в униформе
Стилизованные дубовые листья используются в качестве элемента военной формы Вооружённых сил США. Изображение листа, именуемого дубовым (хотя эмблемы похожи на каштановые листья), используется в системе американских военных знаков различия: золотой дубовый лист используется для обозначения званий майора, а в ВМС и Береговой охране — капитана 3-го ранга (лейтенант-коммандера), серебряный — подполковника и коммандера.

Дубовые листья являются элементом декора форменных фуражек офицеров в звании майора и выше в Армии США и Корпусе морской пехоты, а в ВМС и Береговой охране США — офицеров в звании коммандера и выше.

Примечания

Ссылки
Германия
 Немецкие монеты

США

См. также

Германия
 Дуб кайзера в Берлине

США

 Звезда повторного награждения — знак, обозначающий второе и последующие награждения персональными военными наградами Военно-морского министерства и Береговой охраны США.
 Звезда за службу — знак, обозначающий повторные награждения медалями кампаний и медалями за службу, а в ВМС, Корпусе морской пехоты и Береговой охране США также повторные награждения коллективными наградами подразделений.
 Военные награды США — общие сведения о наградах Вооружённых сил США.

Государственные символы Германии
Дополнительные знаки военных наград США
Растительные символы


text:
Scott Utterback/Courier Journal / USA TODAY NETWORK
Iowa at Kentucky 1/11/22 - Vrbo Citrus Bowl Picks & Predictions
Kentucky Wildcats vs Iowa Hawkeyes Odds & Info
Kentucky Wildcats vs Iowa Hawkeyes
Saturday January 1, 2022, 1:00 PM (EST)
Camping World Stadium
UK -3 ; Total 44
Georgia vs Alabama- Monday 1/10/22- NCAAF Betting Picks and Predictions
The Vrbo Citrus Bowl will take place on New Year's Day, when the Iowa Hawkeyes square off against the Kentucky Wildcats from Camping World Stadium. The 15th ranked Hawkeyes (11-2) reeled off six straight victories to start the season and rely on a stingy defense that allowed 19.2 points per game. In the Big Ten Conference Championship game, Iowa was gashed for 461 yards of total offense during an ugly 42-3 loss against Michigan.
Iowa surrendered a 67-yard touchdown run and a 75-yard touchdown pass in the first quarter and could never recover. Sam LaPorta caught six passes for 62 yards in a losing effort for the Hawkeyes.
The Kentucky Wildcats also started the season on a six-game winning streak and finished with a 5-3 record in SEC Conference play. Last time out, Kentucky built a 17-point halftime lead and cruised to a 522-21 road triumph against Louisville. The Wildcats (9-3) grinded the Cardinals into submission with a rushing attack that compiled 362 yards on 49 attempts.
Kentucky QB Will Levis rushed for four touchdowns and finished the day with 149 yards passing. Chris Rodriguez Jr. contributed 121 yards rushing and found the end zone on a two-yard plunge.
Hawkeyes are 2-5 ATS in their last 7 games overall.
Wildcats are 21-7-1 ATS vs. a team with a winning record.
Wildcats are 10-2 ATS in their last 12 non-conference games.
Over is 4-0 in Hawkeyes last 4 games overall.
Over is 4-1 in Wildcats last 5 games overall.
Free NCAAF Pick:
Kentucky Wildcats -3
This will be the first meeting ever between these two schools. Iowa RB Tyler Goodson has declared for the NFL Draft and will not play in this game. Kentucky has improved greatly on offense and will have too much for the Hawkeyes. Final Score Prediction, Kentucky Wildcats win 27-17.


text: React JS Sandbox Repository

redpajama_set_name: RedPajamaGithub


text:
<?php

use yii\helpers\Html;
use kartik\widgets\ActiveField;
use yii\helpers\ArrayHelper;

$model_action_property->actionProperty = $actionProperty->value_default;
?>

    <?= Html::activeLabel($model_action_property, '['.$key.']actionProperty', [
        'label'=>$property->label,
        'class'=>'col-sm-3 control-label'
    ]); ?>

        <?= $form->field($model_action_property, '['.$key.']actionProperty', [
                'addon' => [
                    'append' => ['content'=>($property->unit!=null) ? $property->unit->oznaka : null],
                    'groupOptions' => ['class'=>'input-group-lg']],
                'feedbackIcon' => [
                    'success' => 'ok',
                    'error' => 'exclamation-sign',
                    'successOptions' => ['class'=>'text-primary', 'style'=>'padding-right:60%'],
                    'errorOptions' => ['class'=>'text-primary', 'style'=>'padding-right:60%; top: 6px;']
                ],
                'hintType' => ActiveField::HINT_SPECIAL,
                'hintSettings' => ['onLabelClick' => true, 'onLabelHover' => false, 'title' => ' Napomena', ],
                'showLabels'=>false
            ])->input('number', ['min'=>$actionProperty->value_min, 'max'=>$actionProperty->value_max, 'step'=>$actionProperty->step])->hint($property->tHint) ?>


"Preoviposition paternal care in a fully aquatic giant salamander: nest" by Jen Terry, Yuki Taguchi et al.
Parental care in salamanders is thought to be simple and typically limited to female egg attendance. No elaborate preoviposition parental care had been described from salamanders. Recent studies revealed complex care behaviours by male Japanese giant salamanders (Andrias japonicus), a fully aquatic, secretive species with external fertilization. These studies emphasize behavioural convergence in paternal care between some of the fish species and the giant salamanders. The fish examples further imply the possibility that males of A. japonicus provide preoviposition parental care in the form of nest cleaning and building. We tested this possibility and also predicted that cleaning effort by a male salamander, if exists, would increase as it approaches the spawning event. Prior to the breeding season, large males (i.e. den masters) of A. japonicus occupy and guard suitable burrows well-hidden along the stream bank. In the falls of 2012, 2013 and 2015, we videotaped and examined a single den master's pre- and postoviposition behaviours at Asa Zoological Park in Hiroshima, Japan. The den master repeatedly exhibited vigorous movements of front and hind limbs in a paddling motion at the bottom of the nest every day for the three separate years. The cleaning effort by the den master lineally increased as the spawning event approached, after which the den master completely ceased cleaning. With the cleaning behaviour, the den master made the den filled with debris including leaves and twigs buried in the sand. The floating debris was subsequently removed by the water current flowing through the nest. Water mould infection is a major cause of offspring mortality of aquatic amphibians including A. japonicus. By reducing the amount of organic matter that provides food sources for water mould, the nest cleaning likely reduces the risk of water mould infection among the offspring, serving as an important preoviposition parental care.
Terry, Jen; Taguchi, Yuki; Dixon, Jake; Kuwabara, Kazushi; and Takahashi, Mizuki. "Preoviposition paternal care in a fully aquatic giant salamander: nest cleaning by a den master." Journal of Zoology (2019) : 36-42.


Standing near the entrance to one of the hottest after-parties at the ARIA Awards, a tall, dark-haired brunette enthusiastically welcomed guests inside. "Welcome to my party," she said gleefully, with a sweep of her hand - gesturing towards the Sony BMG event that was crammed with partygoers.
It was Erica Baxter, hanging solo after being accompanied by her on-again, off-again beau James Packer to the main awards ceremony at Acer Arena in Homebush.
Packer, who seemed cheerful and relaxed throughout the night, earlier told a friend, "This is my first ARIAs, I'm excited." He later nodded along to the live performances by the Veronicas and Wolfmother, although he looked nonplussed when Daniel Johns scrawled "PG 4 PM" on the wall during Silverchair's tribute to Midnight Oil.
Being on the main floor of the ARIAs event is like being inside the goldfish bowl of music stardom - all the big players are mingling with each other, from the rock stars dominating nominations (Wolfmother, Eskimo Joe, Bernard Fanning) to the senior record label executives who help propel them to stardom.
And yes, there are Idol and Big Brother stars and Kamahl (of course), all adding to the colourful stories behind Australian music's biggest awards night.
As one of the international guests on the night, Mayer performed on stage with Pete Murray, but it was obvious he was keen to keep up appearances beforehand. "How many drinks have you had?" he asked Murray, at one point before they went on stage. "I don't want to get ahead of you, man."
Murray's new wife Amanda proved to be a fabulous party guest, with her warm and exuberant personality. She also had a spot-on theory about surviving the lengthy awards ceremony: "Getting pissed."
Stockdale could be hardly accused of making insightful comments on stage - in one of his notable speeches of the night he said: "Yeah . . . there's all these bands out there." That wasn't exactly surprising Andrew - it was the ARIAs, after all.
By comparison, the warmest speaker on the night was best female winner Clare Bowditch, who won a lot of new fans with her excited revelation she was expecting twins. Despite the hype surrounding Silverchair's Oils tribute (we would have dearly loved to see Midnight Oil play) the truly spine-tingling moment of the night was when Bowditch, Kasey Chambers and Fanning performed Watch Over Me. The entire stadium listened silently, in awe of the song.
The seating arrangements inside Acer Arena were the subject of continued gossip - and a touch of sniping - throughout the night. When Eskimo Joe stood on stage and warmly thanked their partners, who were sitting in the audience, a member of Augie March muttered, "How come they got to bring their girlfriends?"
Hilltop Hoods were seated away from the main floor, despite having five nominations, mainly because they don't belong to a leading record company. They were seated near the fresh crop of Australian Idol stars, who were besieged by curious well-wishers. Last year's winner Kate DeAraugo tried to cosy up with the new Idols, but they seemed uninterested.
Meanwhile Guy Sebastian was enjoying a quiet gossip with fellow Idol graduate Anthony Callea. It was good to see Sebastian kicking back and relaxing during the awards, including knocking back a few red wines with his girlfriend Jules.
Coolest table of the night was the TV Rock table, where they were loudly celebrating two ARIA awards. Excuse the pun, but they had every right to flaunt it!
Although rock artists were the heroes of the night, it was a true thrill for Human Nature when they won their first-ever ARIA award, for highest-selling album. All the band members thanked their wives, apart from Toby Allen who simply said "I love you Darren". It was a lovely and dignified way to acknowledge his own partner (good on you, Toby).
And it was vodkas all round for Human Nature who were rightfully over the moon about their win after such a long and successful career.
Toby and Darren were later spotted on the dance floor at the after-party, where groups ranging from Youth Group to Hilltop Hoods were kicking up their heels. (Believe it or not, the hot songs on the dance floor included Wham! tracks and Farnsey's Take the Pressure Down.) Danny Allen from Youth Group seemed to be particularly keen on showing off his dance skills amid the Hilltop Hoods' hip-hop posse.
The after-parties were split across a number of levels inside Acer Arena, with some record companies completely sectioning themselves off from others. There was also an exclusive A-list party inside the InterContinental Sydney in Circular Quay, which played host to Fanning, the Wolfmother boys, Johns and guests including Mick Molloy. The Veronicas, Jess and Lisa Origliasso, popped their heads into the party briefly, while others including Fanning stayed for the long haul.
Johns was still up at 4am, hanging on the balcony with Myles Heskett from Wolfmother, enjoying a smoko break. Ben Gillies from Silverchair was in merry form, jokingly wandering into the female toilets in the early hours of the morning.
Molloy, who was dressed in his usual shabby chic (i.e. jeans and a T-shirt) meandered past a taxi queue at 4.30am with his brother John and a friend. Molloy is one of our favourite down-to-earth comedians, but he left the venue in true millionaire style - perhaps courtesy of the profits from Crackerjack and his new flick BoyTown. He was greeted by a sleek, gleaming black BMW (with a driver) at the door of the hotel.
Meanwhile, back at the Novotel hotel in Homebush, the members of Eskimo Joe were holding up the bar - sharing their joy about their two ARIA awards with punters. Veteran rockers Midnight Oil spent hours at the Sony BMG party, which was full of revellers until the early hours of Monday morning.
Rob Hirst, the Oils drummer, earlier summed up the band's career with these words: "This amazing journey, this strange, fantastic dream." He might as well have been describing ARIAs night itself - such was the scale of the celebrations.


Samuel was upset that Saul disturbed him by "bringing him up", but none the less spoke God's judgement on Saul: "tomorrow you and your sons will be with me".
There is a strange world of evil and spirit forces.
God is in control and even this display of the reality of darkness was totally under God's control and it served his purpose. God is the great reality.
There are two forces in this world: On the one side God who is light and truth and on the other side the devil, darkness and the lie, which is no threat to God. The Biblical truth is that everything, even the evil and the devil exist only because God allows it to exist. In the Psalms the night which is seen as the birth place and habitat of evil, is employed as messenger of God. Although this Samuel and medium story is very strange and evil, God is still in control.
This strange story should not allow us to think that mediums and spiritualists are ways to make contact with the spirit world or with God, or to take part in ancestral worship.
The Bible mentions this reality and warns us against it. Paul wrote: "For our struggle is not against flesh and blood, but against rulers, against authorities, against the powers of this dark world and against the spiritual forces of evil in the heavenly realms." (Eph 6:12).
In 1 Chronicles 10:11 we read: "So the Lord put him (Saul) to death and turned the kingdom to David, son of Jesse." God did it because Saul: "… did not keep the word of the Lord but consulted a medium for guidance, …".
Leviticus 19:31 and Deuteronomy 18:9-14 contains God's warning against: a medium or spiritist or whoever consults the death.
The Biblical truth is that the only way to go to God is through Jesus and the working of the Holy Spirit. Jesus said: "God is spirit, and his worshippers must worship in spirit and in truth." (John 4:24).
The Luke 16 story is a parable although it is not mentioned as such. Many of Jesus' parables started with: "There was …". The content of Luke 16 is in the parable gender style. In a parable the speaker is conveying certain truths with the help of a story. One is not allowed to give meaning to every detail of the story. You have to ask: "What is the specific truth that the speaker wants to convey with this parable?" Certainly it is not possible that the parable suggests a conversation between the rich man in hell and Abraham in heaven or the possibility that somebody in heaven can put water on the tongue of somebody in hell or that somebody from there can come to earth to convey a message.
The parable does however convey the truth that there are two different destinations: one for God fearing people and another for those who do not fear God, an eternal heaven and an eternal hell with no crossing between the two. And also that there is no possibility of sending a messenger from the other side to warn people on this side. They have to listen to Moses and the Prophets, the Bible and God's messengers.
There is no indication that one can or is allowed to make contact with people in hell or heaven or ancestral worship.
Finally, I have to put it straight, as you already know that the New Testament is very clear that Jesus our Lord and Saviour is the only door to God and salvation, and that salvation is worked through the Holy Spirit. The people of Galatians wanted to add something else to this truth of Jesus and the work of the Holy Spirit but Paul was furious with them for doing this: "…let them be eternally condemned!" (Gal 1:9).
I trust that this will help.
Ek hoop nie u gee om dat ek in afrikaans n bydrae lewer nie. Ek vind dit altyd interesand as mense met bybelse waarhede, taboes en skrifte gekonfronteer word waar ons soms gaan draai om verduidelings te gee.
Ek besef dat ek geen teologiese onderig ontvang het nie maar kan met opregtheid se dat ek uit genade "vrygekoopte kind van God" agter my naam kan skryf.
In ons menswees vergeet ons soms dat ons eindelik min van die geestelikke realim en wette weet. My mening is dat God dit juis so wou he. Ons kan net Levitikus 19:31, 20:6 en Jesaja 8:19 gaan lees soos God in sy woord vir ons laat opteken het dan is die verduidelikking reeds genoeg en duidelik wat God van die voorgeslagtelikke geeste beoefening dink. Is dit nie ook die selfde God wat gese het dat " Ek jou met geen ander afgod deel nie" en dat Hy nie so iets by jou wil vind nie. Ons weet almal dat God geestelik is en so ook satan. As jy op die vlak is om geestelikke kommunikasie te he met enige geeste dan moet jy dienssbaar en onderdanig wees aan die geeste. Waarom wil ons die punt probeer bewys of dit moontlik is al dan nie as ons nie toegerus word of deur God toegelaat word om dit te doen nie. Vir God is enige iets moontlik en Hy kan toelaat wat Hy wil of nie wil nie!!
Ek wonder of my boetie nie juis moet verduidelik aan sy mensies dat dit n gebied is waar kinders van God nie moet wees nie. Of jy "African Tripe" is met sy eie wette of westerse, oosterse of enige ander persoon, God se woord is vir almal die selfde met die selfde betekenis of bedoeling en ons almal sal die selfde oordeel ontvang soos ons woord vir ons leer.
Kindly take note that as a born again Christian we are not allowed to do the ancestral worship. 1 Thes 4: 13 "13 Brothers and sisters, we do not want you to be uninformed about those who sleep in death, so that you do not grieve like the rest of mankind, who have no hope. 14 For we believe that Jesus died and rose again, and so we believe that God will bring with Jesus those who have fallen asleep in him. 15 According to the Lord's word, we tell you that we who are still alive, who are left until the coming of the Lord, will certainly not precede those who have fallen asleep. 16 For the Lord himself will come down from heaven, with a loud command, with the voice of the archangel and with the trumpet call of God, and the dead in Christ will rise first. 17 After that, we who are still alive and are left will be caught up together with them in the clouds to meet the Lord in the air. And so we will be with the Lord forever. 18 Therefore encourage one another with these words.
1 Sam 28: 15 – 16 that was a vision Saul has seen because Samuel was always rebuking Saul because of disobedient, it was not Samuel as ghost or ancestral.
Hi ,thank you so much Prof for that information because those scriptures confuse quite a number of people.
l though l could also add my comments and understanding pertaining the verses mentioned above.Starting with 1 Sam 28:15, why would Samuel who died a man of God appear when Saul had inquired from a woman with familiar spirits( ungodly spirit), ancestral worshiper.
So as rightly said above in that parable in Luke 16:24 there are certain truths that were being tough us by our Lord e.g all the dead were under the control of the Satan, those who died without a good relationship with Jehovah would go to hell(a place to await the final judgement)which l believe is different from the lake of fire the place of eternal punishment.Those with a good relationship with Jehovah would go to Abraham's bosom(another place to await judgement) these places where in the same vicinity but with a barrier.
Thus 1 peter 3:19 talks of Jesus going to preach unto the spirits that were in prison, this is referring to the three days when He went to the heart of the earth when he preached to the spirits that were in the hands of Satan, this means even Samuel was part of the people who were preached to.To quote the words of pastor Perry Stone ,He was trying to paraphrase the message that our Lord could have preached to the spirits who were in prison as in 1 Peter 3:19 , He says Jesus could have started by asking Adam are you here and Adam responds yes I am here Iv been bound by Satan and Jesus in response says i have come, that tree that was called the tree of life in the Garden its me ,Isiah are you here, when you said unto as a child is born you were referring to me i have come ,pack your bags we are going, Abraham are you here ,when you said the Lord shall provide a lamp, you were prophesying about me pack your bags we are going.
On the third day when Jesus was resurrected it is said that even the graves of those who had died were opened and they rose from the dead and appeared to many.This marked the exodus of the dead Godly, who were in prison. Abraham's bosom now paradise was transferred as result of the death and resurrection of Christ.
In conclusion and answer to the initial question ,Satan was in charge of all who died so when those with familiar spirits (ancestral worshipers) inquire of the dead, their inquiries go straight to the master of the dead who would decide which of the dead to show to the inquirers. And this phenomenon can never happen now because Satan is no longer in charge of those who sleep in Christ.
I am a Pastor….I want to further my studies from 2015. I have a diploma but now I want to carry on. Please assist me on how to register for next year. .
Wow! Such a wonderful information especially from Farai. It really makes sense. Thank you all for these truth. Good to share.May GOD ALMIGHTY bless you all.
Thank you man of God Farai for we share the same understanding and I glorify God for that. Its quite an interesting discussion. glory to God who reveals deeper things about Himself to us through the Holy Spirit.


text:
Q: OpenGL is present in the minGW folder, but CLion can't reach/see it I'm trying to get OpenGL to work in CLion, downloaded the bin/include/library files from freeglut and copied them to minGW. They are there, and CLion is using that minGW folder when compiling, however when it tries to compile the test code that freeglut provides, it returns with "fatal error: GL/glut.h: No such file or directory #include <GL/glut.h>"
I have already tried different versions of CMakeLists, all of them return with the same issue. If I copy the GL folder next to the project, I get loads of undefined references.
After trying this CMakeList, I get the same error. (from Running Opengl program with CLion IDE)
cmake_minimum_required(VERSION 3.14)
project(gltest)

set(CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_FLAGS "-lglut")
set (CMAKE_CXX_FLAGS "-lGL")
set (CMAKE_CXX_FLAGS "-lGLU")
include_directories(GL/)

add_executable(gltest Callbacks.c HelloGLUT.c)

target_link_libraries(gltest -lglut -lGL -lGLU)

UPDATE
After using a new CMakeList(as suggested in the comments, im more than grateful to you wonderful people here) I get some new errors, but CLion seems to be able to reach the GL libraries now.
The CMakeList:
cmake_minimum_required(VERSION 3.14)
project(gltest)

set(SOURCE_FILES Callbacks.c HelloGLUT.c)
set(OPENGL_INCLUDE_DIR C:/minGW/mingw64/include)
set(OPENGL_LIBRARY C:/minGW/mingw64/lib)

find_package(OPENGL REQUIRED)

add_executable(gltest ${SOURCE_FILES})
include_directories(${OPENGL_INCLUDE_DIR})
target_link_libraries(gltest ${OPENGL_LIBRARY} )

Errors:
CMakeFiles\gltest.dir/objects.a(Callbacks.c.obj): In function "glutInit_ATEXIT_HACK':
C:/minGW/mingw64/include/GL/freeglut_std.h:637: undefined reference to "__imp___glutInitWithExit"
CMakeFiles\gltest.dir/objects.a(Callbacks.c.obj): In function "glutCreateWindow_ATEXIT_HACK":
And several more undefined references in the same manner to various "__imp___glut" functions. Any ideas?
If I use target_link_libraries(gltest ${OPENGL_LIBRARY} glut GL GLU) I get
"C:/minGW/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lglut " , same for lGL and lGLU

A: SOLUTION FOR THOSE WHO RUN INTO THE SAME ERRORS
Make sure you follow the readme and have freeglut installed in a DIFFERENT folder inside mingw (for me it is C:/minGW/mingw64/freeglut) and copy freeglut's include and lib there. Make sure you have a FindFREEGLUT.cmake file (i pulled mine from https://git.omkov.net/Jamozed/Chip8Emulator/releases , if you have a download where it is only the FindFREEGLUT.cmake feel free to post it). Copy the FindFREEGLUT.cmake into your project's directory like "C:/CLionProjects/gltest/cmake/FindFREEGLUT.cmake". After this, I used the following CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
project(gltest)

set(SOURCE_FILES Callbacks.c HelloGLUT.c)
set(GLUT_INCLUDE_DIR "C:/minGW/mingw64/freeglut/include")
set(OPENGL_LIBRARY_DIR "C:/minGW/mingw64/freeglut/lib")

# GLUT
find_package(GLUT REQUIRED)
include_directories(${GLUT_INCLUDE_DIR})
if(NOT GLUT_FOUND)
    message(ERROR "GLUT not found!")
endif(NOT GLUT_FOUND)

# OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OpenGL_INCLUDE_DIRS})
if(NOT OPENGL_FOUND)
    message(ERROR "OPENGL not found!")
endif(NOT OPENGL_FOUND)

add_executable(gltest ${SOURCE_FILES})
target_link_libraries(gltest ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})


text:
Home Careers Teach How To Apply Teaching Schemes Mid-career Professionals
Mid-career Professionals
Are you chasing your professional career, but thinking twice about your goals?
Are you considering the possibility of a mid-career switch?
Are you looking for a workplace where you can use your talents to make a difference, where your unique experiences and perspectives can be appreciated, or where you can find fresh meaning and satisfaction in going to work every day?
If so, consider teaching!
We are looking for teachers with analytical minds and a sense of wonder for the world, who can teach our students to think and inspire them to dream.
We want professionals who can bring something new to the classroom, and share their wealth of knowledge from their previous careers with a generation eager to learn more.
We want you to be part of our teaching fraternity: a place where you can find lasting satisfaction in transforming lives and shaping the future, a community that provides opportunities for growth and career development.
Take up the challenge. Be a teacher.
Mid-career officers may be granted increments, depending on the number of years and relevance of your working experience, subject to the submission of the relevant supporting documents.
If you have the relevant content knowledge and passion to teach and inculcate sound moral values, you are the one we are looking for. Please click on this link to find out more about the different teacher training programmes and how to apply for them.
Read on for stories on our teachers who have made their mid-career switch to teaching.
"My work in the private sector was about dollars and cents; in teaching, it's about the lives and well-being of the students under my care."
Edward Yee
Physical Education teacher, Tampines North Primary School
Coaching Young Hearts
Edward started his working life in the finance sector, but eventually found his calling in a career which marries his love for sports and desire to work with children.
As a Physical Education teacher at Tampines North Primary School, he gets to impart knowledge and nurture young minds.
He became interested in teaching when he was studying for his Bachelor of Business in Banking and Finance. He learnt more about the profession from friends who were in teaching or who were trainee teachers.
At that time, he was also coaching at-risk youths in dragon boating, which gave him satisfaction. He has been involved in the sport of dragon boating for 14 years and still does it every weekend.
"Having given it much thought, and after two years in the private sector as an investment banker, I decided that teaching was what I wanted to do and chose to make it my career".
Edward specialised in the teaching of Physical Education at the primary level because he enjoys working with children, loves sports and likes physical activity on the job.
Edward's current work is different from his previous job. "My work in the private sector was about dollars and cents; in teaching, it's about the lives and well-being of the students under my care.
"Teaching offers me job satisfaction and a sense of achievement when I see my students improving. As teachers, we play a very important role in getting children to give their very best in what they do, and make a difference in the process."
Lim Chin Kuan
Level Head (General Paper) Pioneer Junior College
Building Students' Spirits
Becoming a teacher has led Chin Kuan on his own self-discovery journey. Formerly from the market research and tourism sectors, he made a career switch to education some years ago. He has found that he is learning as much as he is helping others to learn.
When he first started out in the private sector after completing his Bachelor in Communications Studies, he felt it was often about meeting the profit bottom line. In the school environment, however, the targets then swivelled to developing the human mind and building the human spirit.
"Having worked with students who come mostly from average families, I have learnt to empathise more with people, the problems they are going through, the kinds of aspirations they have. While I am helping the students, they have at the same time helped me grow as a person as well."
Chin Kuan currently teaches General Paper (GP) at Pioneer Junior College, and is also level head at the English Department (GP) where he manages 14 teachers.
In addition, he chairs his school's Green Committee and sits in other committees that look into service learning, project work and vetting of testimonials.
Leaving an impact
Chin Kuan feels that the qualities needed for a teacher include having the right attitude towards the job and taking responsibility for the development of his or her students.
"It is a meaningful job. But it's not just a job, because at the end of the day, teaching is about developing people.
"You leave a huge impact on students' lives. You may not become a star teacher, nor is there a need to, but deep down if you know that you have tried your best to conduct meaningful lessons, you know that you have done some good in your life."
Application Process for Applicants without Teaching Qualifications
Application for Applicants with Teaching Qualifications
Application for Contract Adjunct Teaching Position
Teaching Schemes
'O' Levels
'A' Level / IB Holders
Degree Holders
Scheme for Relief Educators and Relief Allied Educator (READ) Scheme
Adjunct Teachers
Arts & Music Instructors Scheme


A trip for two around vietnam and cambodia. Nice hotels and a relaxing pace.
Options with prices far above my budget will not be opened or looked at.
Prefer to leave from Hanoi on Oct 28, but some flexibility.
Hi, we are a young couple from Spain and we are interested in traveling to southeast Asia this May. We are thinking about going to Myanmar, Vietnam and Cambodia. We can spend 30-35 days total.
We would like to spend more or less 15 days in Myanmar, 10 days in Vietnam and 7 days in Cambodia.
Could you tell us your opinion/suggestions and send additional information regarding price and places we will be seeing if we travel with you.
So we need transfer from Phnom Penh hotel to airport for this flight for 3 people.
The other person will leave with another flight still not booked but he also need airport transfer.
We'd like to have a quotation with 3* and 4* hotels if possible.
I know I can not cover all of these cities and I am very open to suggestions, but would definitely like to include either Vietnam or Cambodia with options to see one of the other countries -no more than total of 2 countries total.
I am interested in visiting local markets and cooking either in cooking schools or with well know locals. Visiting restaurants that locals eat at would be great as long as the cuisine as not too out there...I tend to eat more fruits and vegetables.
I also like to visit temples, museums, and take in some local sight seeing.
I am flexible and open to suggestions as I have never traveled to this part of the world. After the tour, I will be flying to Singapore to visit family. I need to be in Singapore by June 3 at the latest. I am a single female in my mid-50's and will be traveling alone. I am very open to touring with others but would like private room accommodations.
Can you please provide a price for the following tour (or similar) to Vietnam and Cambodia in September 2014 for approx 14 nights. This will be for a family of 4 people including 2 adults and 2 children 8yr and 6yr. Can you also please quote on an additional 2 adults (To be confirmed).
Please let me know if you have similar trips or can suggest alternatives and what is included in each trip, we would like an English speaking guide and would like to use internal flights instead of trains.
Please quote for a tour covering Vietnam, Cambodia & Bangkok in 16-17 days. In the quote what is included (mentioning class of Hotel & Coach etc).


She's baaaack — in business, that is!
Only two months after Linda Lundstrom, the founder of one of Canada's best-known fashion brands announced her company was in receivership, she has once again reinvented herself.
Lundstrom was hoping for a miracle. And thanks to Eleventh Floor Apparel Ltd., a Canadian company, she got one.
Eleventh Floor Apparel Ltd. now owns the rights to the Lundstrom name, assets and the state-of-the-art Lundstrom manufacturing plant in Toronto. But Lundstrom remains in the role of chief creative officer. So now the 56-year-old designer can focus soley on designing her seasonal collections.
Lundstrom's spring/summer 2008 collection is already being shipped to retailers across North America and the UK. Cutters are already back at the factory. So are many of the sewers.
Many of the former Linda Lundstrom Inc. employees are being called back. But not all of them. The new team will be "leaner and meaner" — an economic necessity. Among those who will not be moving over to the new company is Lundstrom's husband, Joel Halbert, who was CEO of Linda Lundstrom Inc..
"Today was his last day," Lundstrom said Wednesday, explaining that Halbert acted as an advisor to ensure a smooth transition from the bankrupt company to Eleventh Elevator Apparel Ltd.
Not working side-by-side with her husband will be a major change for Lundstrom. So will having a boss, she pointed out.
But she'll still be going to work at the same place. And that couldn't please her more, a clearly jubilant Lundstrom said.
Keeping the manufacturing in Canada was important to her, Lundstrom said in a telephone interview on Wednesday — the day she was "officially" back in business. She said she would have felt like a hypocrite if she'd licensed her name to a company intent on manufacturing her designs offshore.
Anyone who has met Lundstrom and heard one of her motivational speeches would expect nothing less from her. She's passionate about what she does. And she's determined to practise what she preaches.
Lundstrom said she received more than 300 cards and letters encouraging her not to give up after news of her company's plight became known.
"I've had amazing support from retailers," Lundstrom said.