text:
using System;
using System.Collections;
using System.Text;
using C5;
using Iso85834Net.Parse;
using Iso85834Net.Util;
using Serilog;
using Logger = Serilog.Core.Logger;

namespace Iso85834Net
{
    /// <summary>
    ///     This class is used to create messages, either from scratch or from an existing String or byte
    ///     buffer. It can be configured to put default values on newly created messages, and also to know
    ///     what to expect when reading messages from a Stream.
    ///     The factory can be configured to know what values to set for newly created messages, both from
    ///     a template (useful for fields that must be set with the same value for EVERY message created)
    ///     and individually (for trace [field 11] and message date [field 7]).
    ///     It can also be configured to know what fields to expect in incoming messages (all possible values
    ///     must be stated, indicating the date type for each). This way the messages can be parsed from
    ///     a byte buffer.
    /// </summary>
    public class MessageFactory<T> where T : IsoMessage
    {
        private static readonly Logger logger = new LoggerConfiguration().ReadFrom.AppSettings().CreateLogger();

        /// <summary>
        /// </summary>
        private readonly HashDictionary<int, sbyte[]> _binIsoHeaders = new HashDictionary<int, sbyte[]>();

        /// <summary>
        ///     A map for the custom field encoder/decoders, keyed by field number.
        /// </summary>
        private readonly HashDictionary<int, ICustomField> _customFields = new HashDictionary<int, ICustomField>();

        /// <summary>
        ///     The ISO header to be included in each message type
        /// </summary>
        private readonly HashDictionary<int, string> _isoHeaders = new HashDictionary<int, string>();

        /// <summary>
        ///     This map stores the message template for each message type.
        /// </summary>
        private readonly HashDictionary<int, T> _typeTemplates = new HashDictionary<int, T>();

        private Encoding _encoding = Encoding.Default;
        private bool _forceStringEncoding;

        /// <summary>
        ///     Stores the information needed to parse messages sorted by type
        /// </summary>
        protected HashDictionary<int, HashDictionary<int, FieldParseInfo>> ParseMap =
            new HashDictionary<int, HashDictionary<int, FieldParseInfo>>();

        /// <summary>
        ///     Stores the field numbers to be parsed, in order of appearance.
        /// </summary>
        protected HashDictionary<int, ArrayList<int>> ParseOrder = new HashDictionary<int, ArrayList<int>>();

        public ITraceNumberGenerator TraceGenerator { get; set; }

        /// <summary>
        ///     Indicates if the current date should be set on new messages (field 7).
        /// </summary>
        public bool AssignDate { get; set; }

        /// <summary>
        ///     Indicates if the factory should create binary messages and also parse binary messages.
        /// </summary>
        public bool UseBinaryMessages { get; set; }

        /// <summary>
        /// </summary>
        public int Etx { get; set; } = -1;

        public bool IgnoreLast { get; set; }
        public bool Forceb2 { get; set; }
        public bool UseBinaryBitmap { get; set; }

        public bool ForceStringEncoding
        {
            get => _forceStringEncoding;
            set
            {
                _forceStringEncoding = value;
                foreach (var mapValue in ParseMap.Values)
                foreach (var parser in mapValue.Values) parser.ForceStringDecoding = value;
            }
        }

        public Encoding Encoding
        {
            get => _encoding;
            set
            {
                _encoding = value;
                if (_encoding == null) throw new ArgumentException("Cannot set null encoding.");

                if (!ParseMap.IsEmpty)
                    foreach (var mapValue in ParseMap.Values) foreach (var fpi in mapValue.Values) fpi.Encoding = value;

                if (_typeTemplates.IsEmpty) return;

                foreach (var tmpl in _typeTemplates.Values)
                {
                    tmpl.Encoding = value;
                    for (var i = 2; i < 129; i++)
                    {
                        var v = tmpl.GetField(i);
                        if (v != null) v.Encoding = value;
                    }
                }
            }
        }

        public void SetCustomField(int index,
            ICustomField value)
        {
            _customFields.Add(index,
                value);
        }

        public ICustomField GetCustomField(int index)
        {
            return _customFields.Contains(index) ? _customFields[index] : null;
        }

        protected T CreateIsoMessageWithBinaryHeader(sbyte[] binHeader)
        {
            return (T) new IsoMessage(binHeader);
        }

        protected T CreateIsoMessage(string isoHeader)
        {
            return (T) new IsoMessage(isoHeader);
        }

        /// <summary>
        ///     Creates a new message of the specified type, with optional trace and date values as well
        ///     as any other values specified in a message template. If the factory is set to use binary
        ///     messages, then the returned message will be written using binary coding.
        /// </summary>
        /// <param name="type">The message type, for example 0x200, 0x400, etc.</param>
        /// <returns></returns>
        public T NewMessage(int type)
        {
            var keyPresent = _binIsoHeaders.Contains(type);
            sbyte[] val = null;
            var valStr = string.Empty;

            if (keyPresent)
                _binIsoHeaders.Find(ref type,
                    out val);
            else
                _isoHeaders.Find(ref type,
                    out valStr);
            var m = keyPresent ? CreateIsoMessageWithBinaryHeader(val) : CreateIsoMessage(valStr);
            m.Type = type;
            m.Etx = Etx;
            m.Binary = UseBinaryMessages;
            m.Forceb2 = Forceb2;
            m.BinBitmap = UseBinaryBitmap;
            m.Encoding = Encoding;
            m.ForceStringEncoding = ForceStringEncoding;

            //Copy the values from the template
            IsoMessage templ = _typeTemplates.Contains(type) ? _typeTemplates[type] : null;
            if (templ != null)
                for (var i = 2; i <= 128; i++)
                    if (templ.HasField(i))
                        m.SetField(i,
                            (IsoValue) templ.GetField(i).Clone());
            if (TraceGenerator != null)
                m.SetValue(11,
                    TraceGenerator.NextTrace(),
                    IsoType.NUMERIC,
                    6);
            if (AssignDate)
                m.SetValue(7,
                    DateTime.Now,
                    IsoType.DATE10,
                    10);
            return m;
        }

        /// <summary>
        ///     Creates a message to respond to a request. Increments the message type by 16,
        ///     sets all fields from the template if there is one, and copies all values from the request,
        ///     overwriting fields from the template if they overlap.
        /// </summary>
        /// <param name="request">An ISO8583 message with a request type (ending in 00).</param>
        /// <returns></returns>
        public T CreateResponse(T request)
        {
            var resp = CreateIsoMessage(_isoHeaders[request.Type + 16]);
            resp.Encoding = request.Encoding;
            resp.Binary = request.Binary;
            resp.BinBitmap = request.BinBitmap;
            resp.Type = request.Type + 16;
            resp.Etx = request.Etx;
            resp.Forceb2 = request.Forceb2;
            IsoMessage templ = _typeTemplates[resp.Type];
            if (templ == null)
            {
                for (var i = 2; i < 128; i++)
                    if (request.HasField(i))
                        resp.SetField(i,
                            request.GetField(i).Clone() as IsoValue);
            }
            else
            {
                for (var i = 2; i < 128; i++)
                    if (request.HasField(i))
                        resp.SetField(i,
                            request.GetField(i).Clone() as IsoValue);
                    else if (templ.HasField(i))
                        resp.SetField(i,
                            templ.GetField(i).Clone() as IsoValue);
            }
            return resp;
        }

        /// <summary>
        ///     Sets the timezone for the specified FieldParseInfo, if it's needed for parsing dates.
        /// </summary>
        /// <param name="messageType"></param>
        /// <param name="field"></param>
        /// <param name="tz"></param>
        public void SetTimezoneForParseGuide(int messageType,
            int field,
            TimeZoneInfo tz)
        {
            var guide = ParseMap[messageType];
            if (guide != null)
            {
                var fpi = guide[field];
                var dateTimeParseInfo = fpi as DateTimeParseInfo;
                if (dateTimeParseInfo != null)
                {
                    dateTimeParseInfo.TimeZoneInfo = tz;
                    return;
                }
            }
            logger.Warning("Field {@Field} for message type {@MessageType} is not for dates, cannot set timezone",
                field,
                messageType);
        }

        /// <summary>
        ///     Parses a byte buffer containing an ISO8583 message. The buffer must
        ///     not include the length header. If it includes the ISO message header,
        ///     then its length must be specified so the message type can be found.
        /// </summary>
        /// <param name="buf">
        ///     The byte buffer containing the message, starting
        ///     at the ISO header or the message type.
        /// </param>
        /// <param name="isoHeaderLength">
        ///     Specifies the position at which the message
        ///     type is located, which is algo the length of the ISO header.
        /// </param>
        /// <param name="binaryIsoHeader"></param>
        /// <returns>The parsed message.</returns>
        public T ParseMessage(sbyte[] buf,
            int isoHeaderLength,
            bool binaryIsoHeader = false)
        {
            var minlength = isoHeaderLength + (UseBinaryMessages ? 2 : 4) +
                            (UseBinaryBitmap || UseBinaryMessages ? 8 : 16);
            if (buf.Length < minlength)
                throw new ParseException("Insufficient buffer length, needs to be at least " + minlength);
            T m;
            if (binaryIsoHeader && isoHeaderLength > 0)
            {
                var bih = new sbyte[isoHeaderLength];
                Array.Copy(buf,
                    0,
                    bih,
                    0,
                    isoHeaderLength);
                m = CreateIsoMessageWithBinaryHeader(bih);
            }
            else
            {
                var string0 = buf.SbyteString(0,
                    isoHeaderLength,
                    _encoding);
                m = CreateIsoMessage(isoHeaderLength > 0 ? string0 : null);
            }
            m.Encoding = _encoding;
            int type;
            if (UseBinaryMessages)
            {
                type = ((buf[isoHeaderLength] & 0xff) << 8) | (buf[isoHeaderLength + 1] & 0xff);
            }
            else if (ForceStringEncoding)
            {
                var string0 = buf.SbyteString(isoHeaderLength,
                    4,
                    _encoding);
                type = Convert.ToInt32(string0,
                    16);
            }
            else
            {
                type = ((buf[isoHeaderLength] - 48) << 12)
                       | ((buf[isoHeaderLength + 1] - 48) << 8)
                       | ((buf[isoHeaderLength + 2] - 48) << 4)
                       | (buf[isoHeaderLength + 3] - 48);
            }
            m.Type = type;
            //Parse the bitmap (primary first)
            var bs = new BitArray(64);
            var pos = 0;
            if (UseBinaryMessages || UseBinaryBitmap)
            {
                var bitmapStart = isoHeaderLength + (UseBinaryMessages ? 2 : 4);
                for (var i = bitmapStart; i < 8 + bitmapStart; i++)
                {
                    var bit = 128;
                    for (var b = 0; b < 8; b++)
                    {
                        bs.Set(pos++,
                            (buf[i] & bit) != 0);
                        bit >>= 1;
                    }
                }
                //Check for secondary bitmap and parse if necessary
                if (bs.Get(0))
                {
                    bs.Length = 128;
                    if (buf.Length < minlength + 8)
                        throw new ParseException($"Insufficient length for secondary bitmap : {minlength}");

                    for (var i = 8 + bitmapStart; i < 16 + bitmapStart; i++)
                    {
                        var bit = 128;
                        for (var b = 0; b < 8; b++)
                        {
                            bs.Set(pos++,
                                (buf[i] & bit) != 0);
                            bit >>= 1;
                        }
                    }
                    pos = minlength + 8;
                }
                else
                {
                    pos = minlength;
                }
            }
            else
            {
                //ASCII parsing
                try
                {
                    sbyte[] bitmapBuffer;
                    if (ForceStringEncoding)
                    {
                        var bb = buf.SbyteString(isoHeaderLength + 4,
                            16,
                            _encoding).GetSbytes();

                        bitmapBuffer = new sbyte[36 + isoHeaderLength];
                        Array.Copy(bb,
                            0,
                            bitmapBuffer,
                            4 + isoHeaderLength,
                            16);
                    }
                    else
                    {
                        bitmapBuffer = buf;
                    }
                    for (var i = isoHeaderLength + 4; i < isoHeaderLength + 20; i++)
                        if (bitmapBuffer[i] >= '0' && bitmapBuffer[i] <= '9')
                        {
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 48) & 8) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 48) & 4) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 48) & 2) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 48) & 1) > 0);
                        }
                        else if (bitmapBuffer[i] >= 'A' && bitmapBuffer[i] <= 'F')
                        {
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 55) & 8) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 55) & 4) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 55) & 2) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 55) & 1) > 0);
                        }
                        else if (bitmapBuffer[i] >= 'a' && bitmapBuffer[i] <= 'f')
                        {
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 87) & 8) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 87) & 4) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 87) & 2) > 0);
                            bs.Set(pos++,
                                ((bitmapBuffer[i] - 87) & 1) > 0);
                        }

                    //Check for secondary bitmap and parse it if necessary
                    if (bs.Get(0))
                    {
                        bs.Length = 128;
                        if (buf.Length < minlength + 16)
                            throw new ParseException($"Insufficient length for secondary bitmap :{minlength}");
                        if (ForceStringEncoding)
                        {
                            var bb = buf.SbyteString(isoHeaderLength + 20,
                                16,
                                _encoding).GetSbytes();
                            Array.Copy(bb,
                                0,
                                bitmapBuffer,
                                20 + isoHeaderLength,
                                16);
                        }
                        for (var i = isoHeaderLength + 20; i < isoHeaderLength + 36; i++)
                            if (bitmapBuffer[i] >= '0' && bitmapBuffer[i] <= '9')
                            {
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 48) & 8) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 48) & 4) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 48) & 2) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 48) & 1) > 0);
                            }
                            else if (bitmapBuffer[i] >= 'A' && bitmapBuffer[i] <= 'F')
                            {
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 55) & 8) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 55) & 4) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 55) & 2) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 55) & 1) > 0);
                            }
                            else if (bitmapBuffer[i] >= 'a' && bitmapBuffer[i] <= 'f')
                            {
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 87) & 8) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 87) & 4) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 87) & 2) > 0);
                                bs.Set(pos++,
                                    ((bitmapBuffer[i] - 87) & 1) > 0);
                            }
                        pos = 16 + minlength;
                    }
                    else
                    {
                        pos = minlength;
                    }
                }
                catch (FormatException e)
                {
                    var exception = new ParseException($"Invalid ISO8583 bitmap: Cause {e}");
                    throw exception;
                }
            }

            //Parse each field
            var parseGuide = ParseMap[type];
            var index = ParseOrder[type];
            if (index == null)
            {
                logger.Error(
                    $"ISO8583 MessageFactory has no parsing guide for message type {type:X} [{buf.SbyteString(0, buf.Length, _encoding)}]");
                throw new Exception(
                    $"ISO8583 MessageFactory has no parsing guide for message type {type:X} [{buf.SbyteString(0, buf.Length, _encoding)}]");
            }
            //First we check if the message contains fields not specified in the parsing template
            var abandon = false;
            for (var i = 1; i < bs.Length; i++)
                if (bs.Get(i) && !index.Contains(i + 1))
                {
                    logger.Warning("ISO8583 MessageFactory cannot parse field {Field}: unspecified in parsing guide",
                        i + 1);
                    abandon = true;
                }

            if (abandon) throw new ParseException("ISO8583 MessageFactory cannot parse fields");

            //Now we parse each field
            if (UseBinaryMessages)
                foreach (var i in index)
                {
                    var fpi = parseGuide[i];
                    if (!bs.Get(i - 1)) continue;
                    if (IgnoreLast && pos >= buf.Length && i == index[index.Count - 1])
                    {
                        logger.Warning("Field {@Index} is not really in the message even though it's in the bitmap",
                            i);

                        bs.Set(i - 1,
                            false);
                    }
                    else
                    {
                        var decoder = fpi.Decoder ?? GetCustomField(i);

                        var val = fpi.ParseBinary(i,
                            buf,
                            pos,
                            decoder);

                        m.SetField(i,
                            val);

                        if (val == null) continue;
                        if (val.Type == IsoType.NUMERIC || val.Type == IsoType.DATE10 || val.Type == IsoType.DATE4 ||
                            val.Type == IsoType.DATE12 || val.Type == IsoType.DATE14 || val.Type == IsoType.DATE_EXP ||
                            val.Type == IsoType.AMOUNT || val.Type == IsoType.TIME)
                        {
                            pos += val.Length / 2 + val.Length % 2;
                        }
                        else pos += val.Length;
                        switch (val.Type)
                        {
                            case IsoType.LLVAR:
                            case IsoType.LLBIN:
                                pos++;
                                break;
                            case IsoType.LLLVAR:
                            case IsoType.LLLBIN:
                            case IsoType.LLLLVAR:
                            case IsoType.LLLLBIN:
                                pos += 2;
                                break;
                        }
                    }
                }
            else
                foreach (var i in index)
                {
                    var fpi = parseGuide[i];
                    if (bs.Get(i - 1))
                        if (IgnoreLast && pos >= buf.Length && i == index[index.Count - 1])
                        {
                            logger.Warning(
                                "Field {@FieldId} is not really in the message even though it's in the bitmap",
                                i);
                            bs.Set(i - 1,
                                false);
                        }
                        else
                        {
                            var decoder = fpi.Decoder ?? GetCustomField(i);
                            var val = fpi.Parse(i,
                                buf,
                                pos,
                                decoder);
                            m.SetField(i,
                                val);
                            //To get the correct next position, we need to get the number of bytes, not chars
                            pos += val.ToString().GetSbytes(fpi.Encoding).Length;
                            switch (val.Type)
                            {
                                case IsoType.LLVAR:
                                case IsoType.LLBIN:
                                    pos += 2;
                                    break;
                                case IsoType.LLLVAR:
                                case IsoType.LLLBIN:
                                    pos += 3;
                                    break;
                                case IsoType.LLLLVAR:
                                case IsoType.LLLLBIN:
                                    pos += 4;
                                    break;
                            }
                        }
                }
            m.Binary = UseBinaryMessages;
            m.BinBitmap = UseBinaryBitmap;
            return m;
        }

        /// <summary>
        ///     Sets the ISO header to be used in each message type.
        /// </summary>
        /// <param name="val">A map where the keys are the message types and the values are the ISO headers.</param>
        public void SetIsoHeaders(HashDictionary<int, string> val)
        {
            _isoHeaders.Clear();
            _isoHeaders.AddAll(val);
        }

        /// <summary>
        ///     Sets the ISO header for a specific message type.
        /// </summary>
        /// <param name="type">The message type, for example 0x200</param>
        /// <param name="val">The ISO header, or NULL to remove any headers for this message type.</param>
        public void SetIsoHeader(int type,
            string val)
        {
            if (string.IsNullOrEmpty(val))
            {
                _isoHeaders.Remove(type);
            }
            else
            {
                if (_isoHeaders.Contains(type)) _isoHeaders[type] = val;
                else
                    _isoHeaders.Add(type,
                        val);

                _binIsoHeaders.Remove(type);
            }
        }

        /// <summary>
        ///     Returns the ISO header used for the specified type.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public string GetIsoHeader(int type)
        {
            return _isoHeaders[type];
        }

        /// <summary>
        ///     Sets the ISO header for a specific message type, in binary format.
        /// </summary>
        /// <param name="type">The message type, for example 0x200.</param>
        /// <param name="val">The ISO header, or NULL to remove any headers for this message type.</param>
        public void SetBinaryIsoHeader(int type,
            byte[] val)
        {
            if (val == null)
            {
                _binIsoHeaders.Remove(type);
            }
            else
            {
                if (_binIsoHeaders.Contains(type)) _binIsoHeaders[type] = val.ToSbytes();
                else
                    _binIsoHeaders.Add(type,
                        val.ToSbytes());

                _isoHeaders.Remove(type);
            }
        }

        /// <summary>
        ///     Returns the binary ISO header used for the specified type.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public sbyte[] GetBinaryIsoHeader(int type)
        {
            return _binIsoHeaders[type];
        }

        /// <summary>
        ///     Adds a message template to the factory. If there was a template for the same
        ///     message type as the new one, it is overwritten.
        /// </summary>
        /// <param name="templ"></param>
        public void AddMessageTemplate(T templ)
        {
            if (templ != null)
                if (_typeTemplates.Contains(templ.Type)) _typeTemplates[templ.Type] = templ;
                else
                    _typeTemplates.Add(templ.Type,
                        templ);
        }

        /// <summary>
        ///     Removes the message template for the specified type.
        /// </summary>
        /// <param name="type"></param>
        public void RemoveMessageTemplate(int type)
        {
            _typeTemplates.Remove(type);
        }

        /// <summary>
        ///     Returns the template for the specified message type. This allows templates to be modified
        ///     programmatically.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public T GetMessageTemplate(int type)
        {
            return _typeTemplates[type];
        }

        public void SetParseMap(int type,
            HashDictionary<int, FieldParseInfo> map)
        {
            if (ParseMap.Contains(type)) ParseMap[type] = map;
            else
                ParseMap.Add(type,
                    map);

            var index = new ArrayList<int>();
            index.AddAll(map.Keys);
            index.Sort();
            logger.Warning($"ISO8583 MessageFactory adding parse map for type {type:X} with fields {index}");

            if (ParseOrder.Contains(type)) ParseOrder[type] = index;
            else
                ParseOrder.Add(type,
                    index);
        }

        /// <summary>
        ///     Tells the receiver to read the configuration at the specified path. This just calls
        ///     ConfigParser.configureFromClasspathConfig() with itself and the specified path at arguments,
        ///     but is really convenient in case the MessageFactory is being configured from within
        /// </summary>
        /// <param name="path"></param>
        public void SetConfigPath(string path)
        {
            ConfigParser.ConfigureFromClasspathConfig(this,
                path);
            //Now re-set some properties that need to be propagated down to the recently assigned objects
            Encoding = _encoding;
            ForceStringEncoding = _forceStringEncoding;
        }
    }
}


[S61] 1881 Ontario Census, Mara, Ontario North, Ontario, Film No. 1375881, #C-13245, District 133 G, Div 1, Pg 65, HH# 259.
[S242] 1861 Canada Census, Roll C-1057, p.32; Mary Corrigan; 9 June 2010.
[S207] 1871 Ontario, Canada Census, 19 June 2010; Maryann Corrigan, Mara, Ontario North, p.58.


TACURONG CITY — His job is supposed to put out a fire but on Thursday night, when an emergency call came at the city disaster office here, Fire Officer 1 (FO1) Ralph Bajit responded to help deliver a baby.
Bajit, who worked for the Bureau of Fire Protection (BFP) here, said the disaster office received a call about a woman having difficulty delivering her baby in Barangay San Pablo, Tacurong City.
When the firemen arrived at the scene, the baby was already halfway out of his mother.
Bajit, a nurse, quickly cut off the umbilical cord and rushed the mother and child to the hospital at 7 p.m. Thursday.
He said they learned that the baby, a boy, was only six months old. "I hope the baby survives," he said.
"We thank the concerned citizen for informing us quickly, we all saved the mother and her child," he said.
In Pigcawayan, North Cotabato, a 17-year-old high school student admitted throwing her newly born baby boy into the river to avoid humiliation.
The municipal health office said some passersby found the baby floating in a river in Barangay Poblacion 3 at 7 a.m. Thursday.
The girl admitted it was her baby, adding she did it to keep her unwanted pregnancy from her mother and boyfriend.


Posted by by RuthieM at Citysearch on October 26, 2009. Brought to you by Citysearch.
We don't have very many tack, and western shops in our area. This place is very nice and has been here for many years. they have a little of everything. Tack, gifts, clothing.
Posted by by marge g. on December 13, 2008. Brought to you by openlist.
Since 1992 the company has been providing Retail - Riding Apparel.
Springhouse Tack Shop Inc can be found at Pa-119 1860. The following is offered: Horse Boarding Stables. The entry is present with us since Sep 9, 2010 and was last updated on Nov 14, 2013. In Greensburg there are 1 other Horse Boarding Stables. An overview can be found here.


Unisex Tee – Dark Grey – see size chart in additional photos.
The Disco Biscuits continue the systematic release of their most beloved albums on vinyl with the 15th Anniversary Edition of TranceFusionRadio Broadcast 01 & 02!
Remastered audio by Jon Altschiller has been pressed onto three, 140g virgin vinyl discs, and contained within brilliantly redesigned packaging by Ben Langsfeld – both of whom worked on the first edition release. Each box set also includes 2 CDs, an mp3 download card and a DVD of 12/29/02 set II!
Red, Blue, Green, Clear pint glass with "baked in" long lasting design, buy individual colors or save with a 4 pack!
New Logo Icon stickers, buy one city or buy them all!
High quality, water and wind resistant, soft shell jacket is perfect for winter weather and sports. Full zip up jacket with scuba hood, two zippered low pockets (one with grometted media pocket), PLUS additional left chest zippered pocket. Black jacket is embroidered with white round Disco Biscuits logo.
See size chart in additional photos.
Made to protect you from the elements, the soft polyester waterproof exterior fabric keeps the weather out, a bonded Micro Fleece interior lining gives comfort and warmth, a scuba hood good coverage, water resistant zippers with interior wind blocking flap, welt pockets, and drawcords with toggles at hood and waist. The Polyester exterior fabric is coated with a 100% water proof Coating… however, we give this jacket a water resistant rating since the seams are not waterproofed, which may allow water to eventually enter through the seams when exposed for extended periods of time in a downpour.
300 gm 100% waterproof polyester shell bonded to 160gm micro fleece lining.
Splashy colorful Disco Biscuits illustrated round logo is screenprinted large across the front of hand-dyed bullet-style tie dye tees in a rainbow of colors. The back of the shirt is screenprinted with the band's written logo.
Part of a series of location-themed tees, this design features numerous Massachusetts icons such as geographic locations and sports characters, illustrated into the shape of the Disco Biscuits circular logo. Screenprinted in full color on the front of heather cardinal red unisex tees. See size chart in additional photos.


Failed to completely uninstall Understanding Infants: Cognitive Development but still have no idea how to do it? There are times you may want to uninstall Understanding Infants: Cognitive Development for various reasons although it is quite popular and adopted by computer users. If this is the case in your machine, read this article and learn more detailed instructions about uninstalling this application.
Removal Instruction Part 1 - Uninstall Understanding Infants: Cognitive Development Under Windows Safe Mode.
The above uninstall method can not guarantee you a 100% complete removal of it, you need to manually remove the leftover(files, registry entries, keys, values) by yourself to completely uninstall Understanding Infants: Cognitive Development.
Step 2: Launch Max Uninstaller, find out and select Understanding Infants: Cognitive Development on the right hand list, then click "Run Analysis" button.
Step 4: Click "Yes" to start uninstalling Understanding Infants: Cognitive Development.
Step 6: Max Uninstaller will scan over your computer for a few minutes. After the scan finished, click "Delete Leftovers" to remove all the leftovers of Understanding Infants: Cognitive Development.
Step7: Max Uninstaller has now fully uninstalled Understanding Infants: Cognitive Development and deleted all its files and extensions. Click OK to finish.
Sometimes you tried time and time again to remove Understanding Infants: Cognitive Development using the Add/remove Program in the Control Panel, you find that it's nearly impossible because the program didn't show up in the installed program list. So you won't be able to delete it through Control Panel. Does it sound frustrating? Don't be too concerned as this is a common problem when this software is half installed...It could be easily solved using the force uninstall wizard.
In case you can't find Understanding Infants: Cognitive Development in the program list, here is the additional instruction to force uninstall it completely.
Finish the above steps and Understanding Infants: Cognitive Development is 100% guarantee to disappear from your PC.
If you ever meet errors related to Understanding Infants: Cognitive Development, click the below button to download program error fix tool, install it in your computer system, and follow the instruction to scan and repair existing problems on your computer, then you should be able to get Understanding Infants: Cognitive Development running properly and uninstall Understanding Infants: Cognitive Development without receiving any errors.


The HEUER Collapsible provides an especially ergonomic solution to clustered workspaces in the workshop. In its working position, the vice is fixed sturdily to the workbench and free of any vibration.
When additional height adjustment and rotating capability are needed, the HEUER Collapsible-Lift on the following pages is the right choice.


text:
TRiO: Student Support Services and McNair Scholars Programs
WhatisTRiO
A-Z | Portals | Course Login | Webmail
Freshman Admissions
Health Program Admissions
Non-degree Admissions
We Are CU Denver
Lynx Life
- Resources for -
What is TRiO
TRiO Newsletter
STS Club
TRiO McNair Scholars Program
Who is Ronald McNair?
The Scholar (Research Blog)
What is TRiOCurrently selected
1201 Larimer Street
Student Commons, Suite 2011
Director (SSS & McNair)
Teresa De Herrera
Project Specialist (SSS & McNair)
Alexandria Joo
Program Coordinator (SSS)
Daniela Castorena
Program Manager (SSS)
Henry Ornelas
Senior Program Coordinator (McNair)
What is TRiO?
Our nation has asserted a commitment to providing educational opportunity for all Americans regardless of race, ethnic background or economic circumstance. In support of this commitment, Congress established a series of programs to help low-income Americans enter college, graduate and move on to participate more fully in America's economic and social life. These Programs are funded under Title IV of the Higher Education Act of 1965 and are referred to as the TRiO Programs (initially just three programs). While student financial aid programs help students overcome financial barriers to higher education, TRiO programs help students overcome class, social and cultural barriers to higher education.
Additional Information on TRiO Programs
Council for Opportunity in Education
The Council for Opportunity in Education is a nonprofit organization, established in 1981, dedicated to furthering the expansion of educational opportunities throughout the United States. Through its numerous membership services, the Council works in conjunction with colleges, universities, and agencies that host TRiO Programs to specifically help low-income students enter college and graduate.
Federal TRIO Programs
Federal TRiO Programs include: Talent Search, Upward Bound, Upward Bound Math/Science, Veterans' Upward Bound, Student Support Services, Educational Opportunity Centers, the Ronald E. McNair Post-Baccalaureate Achievement Program, and Training Grants. The Federal TRiO Programs are educational opportunity outreach programs designed to motivate and support students from disadvantaged backgrounds and to provide relevant training to directors and staff. TRiO includes five outreach and support programs targeted to serve and assist low-income, first-generation college students, and students with disabilities to progress through the academic pipeline from middle school to postbaccalaureate programs and one training grant program for staff.

redpajama_set_name: RedPajamaCommonCrawl


text:
Who is Susan Rice? Former US national security adviser
David Boroff
Nov 23 2020, 14:29 ET
Updated: Nov 23 2020, 14:49 ET
SUSAN Rice is a longtime diplomat and public official who may be called to serve in Joe Biden's administration.
Biden is selecting his cabinet after defeating President Donald Trump in the November 3 election.
Susan Rice answers reporters' questions during a press briefing at the White House February 28, 2011, in Washington, DCCredit: Getty Images - Getty
Who is Susan Rice?
Rice was President Barack Obama's US ambassador to the United Nations from 2009 to 2013 before serving as national security adviser from 2013 until 2017.
As national security adviser Rice was was "responsible for coordinating the formulation and implementation of all aspects" of Obama's foreign and national security policy, according to her online bio.
She served as US Assistant Secretary of State for African Affairs from 1997 to 2001.
Rice, who is 56, has worked in public service for several decades after graduating with honors from Stanford University in 1986.
She is currently a distinguished visiting research fellow at American University's School of International Service.
Rice, a native of Washington, DC, is married to Ian Cameron and they have two children.
Susan Rice at the White HouseCredit: Getty Images - Getty
What role will Rice serve in the Biden administration?
It is not clear if Rice will be picked to join the next administration.
President-elect Biden is expected to nominate Antony Blinken as secretary of state, a position that some believe Rice was a contender for.
Rice would have faced significant GOP opposition and likely rejection in the Senate.
She has long been a target of Republicans, including for statements she made after the deadly 2012 attacks on Americans in Benghazi, Libya.
Rice was accused of downplaying the possibility that a planned terrorist act had led to the deaths of US ambassador Christopher Stevens and three others, according to Politifact.
Joe Biden and National Security Adviser Susan Rice confer as President Barack Obama and Iraqi Prime Minister Haider al-Abadi brief the press in the Oval Office of the White House, April 14, 2015Credit: Getty Images - Getty
Who has Biden picked for his administration?
Biden has announced picks for six Cabinet-level positions ahead of his January 20 inauguration.
The formal announcement on Biden filling out his administration came on Monday after the nominations began to trickle out to the news media.
Biden confirmed that he is going to nominate Blinken for secretary of state.
Blinken served as deputy secretary of state and deputy national security adviser in the Obama administration.
Susan Rice speaks as President-elect Barack Obama and Senator Hillary Clinton listen during a press conference in December of 2008Credit: Getty Images - Getty
Biden has also picked nominees for Homeland Security, United Nations ambassador, special presidential envoy for climate change, director of national intelligence, and national security adviser.
John Kerry - a Vietnam War vet, former secretary of state, and senator who ran for president in 2004 and lost to George W Bush - has been nominated to lead the Biden administration's climate change effort.
Alejandro Mayorkas will be nominated as the secretary for the Homeland Security – the first-ever Latino and immigrant to serve as secretary.
Biden has chosen Avril Haines to serve as the director of national intelligence, and Linda Thomas-Greenfield, as the US ambassador to the United Nations.
Haines served as the deputy CIA director from 2013 to 2017, and was the first woman to hold that office – and is the first woman nominated to lead the intelligence community.
He will also nominate Jake Sullivan to serve as national security adviser.
Climate change and environment
US Explainers


[ENGLISH] Welcome to our forum!
Thema: [ENGLISH] Welcome to our forum!
In this topic we would like to greet all international fans of "Pandora:First Contact" the inofficial successor of "Sid Meier's Alpha Centauri". Welcome to the Pandora section of Civforum!
Pandora players from Germany, Austria, Switzerland and other can find a German speaking community for their game here. However, we would also like to invite international players to our community and you will find a lot of English speakers among us. Civforum is an independent forum but here in this section for Pandora we're working together closely with the developers from Proxy Studios and with the publisher Slitherine.
As of now most of our content is German obviously. But we want to provide a platform for English players as well and you are more than welcome to add content! When our international community grows bigger we will be happy to provide more topics in English and later maybe even a whole subforum for Pandora in English.
For now please use this topic to communicate freely in English. But also don't hesitate to write in other topics (see list below) if your question fits there. As mentioned earlier most of us speak English well enough to help you.
"Um deine Registrierung abzuschließen, klicke bitte auf folgenden Link:"
In our virtual inn "Zum Xenomorphen" you will quickly get in touch with other players.
At our live-evenings on twitch.tv we're streaming multiplayer matches and after the game we're publishing the live-recordings on YouTube; on the first three events on the 6th of february, 7th of March and 30th of May even the developer Lorenz Ruhmann pitted his skill against us. The next even is planned for September.
AIL is currently engaged as a freelancer in futher developing the game and especially its AI. He's offering his intermediate steps here for testing purposes.
We have organized two MP tournaments, Pandora: First Cup and Pandora: Open.
Very nice to see some animation here!
Anyway I would love to give it a try nevertheless, don't hesitate posting your planned game time here so me and other english speakers can try to hook up! Also if you are looking for a player, don't hesitate hitting me on Steam, my pseudo is boulugre .
Hello and welcome to our forums! It's good to see players from "abroad" find their ways to us. In case you have any questions, especially because everything's so German in here, feel free to ask at any time. But beware: The peacefulness will come to an end once we face each other on Pandora.
Hi Boulugre! Glad to see you found your way to us here.
Damn it would be nice if you could also join our tournament. But the ping problem (and your work) could make this impossible.
But there's still some time left before we start so maybe we can find a solution until then.
We might just give it a try and see if the latency really is that bad. I think the even bigger problem might be the time difference. Whenever we want to play in the evenings, it's almost morning at his place. So this will make compromises necessary.
Well maybe my connection had some influence but in the game we played I had to wait ~4 seconds at the beginning of every turn before I could do or move anything. This was and will be deadly in war times. If someone else hosts the game then Boulugre will have that heavy handicap.
Ah, I didn't know the two of you already know each other and have played together.
I really don't mind having a high ping on my side, but I wouldn't want to deteriorate the speed and quality of your game on your side. I played a 3 player game with 2 european players ( I was not hosting) and despite my high ping the game was stable and i actually manage to do rather well.
Well if you will see Monaldinio's nukes pouring down on your stack you will wish to be able to move faster.
Yes, i think we should try!
Did write few small mods if you intrested you can find them here.
Yes, I saw them. Blackarchon with whom you had contact there is also a user of our forum.
So, I am a old SMAC(X) fanatic, and new to Pandora. I just played for about 10 years, and the first thing that started to bother me was that even the biggest world size is quite small. 48x48? I had contact with AI factions almost immediately, and they soon declared war on me. I'd like to have more space and later conflict. Is it possible to modify the world sizes?
I know I can also achieve later conflict by reducing the number of players, but eh. I like big playing areas and the variety of having many factions.


text:
Food Network is an American cable television network.

Food Network may also refer to:

Food Network (Canada)
Food Network (New Zealand)
7food network, an Australian television channel
SBS Food, an Australian television channel, formerly branded Food Network
Food Network Asia, a cable television channel in Asia
Food Network Magazine, published by Hearst Magazines
Food Network (Italy), the Italian version of the channel

See also
Food chain, a concept in ecological science
Carlton Food Network, a defunct British cable television network
Good Food, a defunct British television network merged by Discovery with Food Network UK
Asian Food Network, an Asian pay TV channel formerly known as Asian Food Channel

redpajama_set_name: RedPajamaWikipedia


text:
Authors & Creators
Independent Sentinel's Logo
Home Home Georgetown Prof Says White GOP Should Be Castrated & Fed to Swine
Georgetown Prof Says White GOP Should Be Castrated & Fed to Swine
M. Dowling
Campus Reform has an article up about the Georgetown University professor who previously tweeted profanity-laced comments about Republicans. She now wants them to be castrated, die miserable deaths, and be fed to the pigs.
It seems the Distinguished Associate Professor Christine Fair says white GOP senators in Thursday's Kavanaugh hearing "deserve miserable deaths."
She tweeted of GOP senators, "we castrate their corpses and feed them to swine."
One current Georgetown student said others who see the professor's tweet might feel "threatened" if they hold different opinions.
Christine Fair tweeted:
"Look at thus [sic] chorus of entitled white men justifying a serial rapist's arrogated entitlement," Fair tweeted on Thursday. Referencing a video of "Lindsey Graham's tirade," Fair, who is a victim of sexual assault, added, "all of them deserve miserable deaths while feminists laugh as they take their last gasps."
"Bonus: we castrate their corpses and feed them to swine? Yes," she concluded the tweet.
Fair is an inveterate hate monger
Her hate knows no bounds and she is a sexist and racist.
No. What is at stake is elite male privilege and entitlement and they've been successful on running on this agenda. Look at the republican shitscape of the senate judiciary committee. The hearing was NOT about Dr. Ford's credibility, rather elite male privilege and entitlement. https://t.co/AsNOPz5i74
— (((Christine Fair))) (@CChristineFair) September 30, 2018
Fair's Twitter page has a banner that reads, "DON'T GRAB MY PUSSY." She bills herself in her Twitter bio as a "Scholar of South Asian pol-mil affairs, inter-sectional feminist, pitbull apostle, scotch devotee, nontheist, resister."
She also runs a blog called ShitMenSay where she doxxes people. It's about 'accountability', she claims. It is a hateful blog.
A few days ago, Fair tweeted, "GOP doesn't care about women. We knew this. Fuck them.".
She is a complete lunatic and Georgetown employs her as a "Distinguished Associate Professor". There must be hundreds of people who could do her job and who are also sane.
PowerInbox
Previous articleThis Week in History: Oct. 1-7, 2018
Next articleDemocrats Can't Win on Sexual Assault So They're Moving on to Perjury
Ray Bryant October 1, 2018 at 8:13 am
This says more about her employer than her…….she is a disgusting pig…they are worse for allowing her to be anywhere near a young mind.
A thoughtful parent would not allow their son or daughter near the place with her on campus.
hillbilly4 October 1, 2018 at 5:55 pm
Exactly. Maybe the Pope needs to close GU for about a year. You know to clean out the sewer system.
Dorota Mosiewicz-Patalas October 1, 2018 at 7:14 pm
The pope??? Pedophile enabler???
Dave Huff October 1, 2018 at 10:01 am
Leftist cowards like Christine always run their mouth, but will never get in the trenches….
theamericanhippie October 1, 2018 at 10:53 am
I would bet anything this woman, unfortunately, is a sick and suffering alcoholic. And I would never want to wake up in her head. She is headed for a breakdown.
herbert r richmond October 1, 2018 at 11:10 am
This truly arrogant woman is simply following the dictates of a hardcore philosophy of feminist Valerie Solanas, a lesbian who shot Andy Warhol, she wrote 'SCUM Manifesto.' "Life in this society being, at best, an utter bore and no aspect of society being at all relevant to women, there remains to civic-minded, responsible, thrill-seeking females only to overthrow the government, eliminate the money system, institute complete automation and destroy the male sex." This is a book every conservative should obtain and read.
John Vieira October 1, 2018 at 10:19 pm
Stupid IS??? After the raving idiot destroys the male sex…Karma…that will be the end of the opposite sex too…Well she obviously not to bright…
hitrestart1 October 1, 2018 at 12:23 pm
White people advocating the deaths of white people are no different than black people who captured and sold black people into slavery.
arcticstormer October 12, 2018 at 12:33 am
Obviously you don't know what the ((())) around her name mean. She isn't white. Internet a little, bro.
Obviously you don't know what the ((())) around her name means. She isn't white. Internet a little, bro.
Nuya buniss October 1, 2018 at 2:24 pm
Parents, consider where you allow your children to get their education. Many schools are no longer schools but are indoctrination centers that you pay for. I say this as a retired college professor.
Sparky McBiff October 1, 2018 at 2:30 pm
She looks amazingly like an ex-close old friend I had for decades. I hate to cut off contact with her because she turned into an SJW and severely chewed me out for using "bad" words.
Once somebody tell me what words are not allowed to be used I tell them to shove it and will no longer have any contact with them.
These fascists are going to cause a new holocaust if they're not stopped before it's too late.
Reid scott October 1, 2018 at 3:19 pm
I realize this so called "woman" is a Progressive Socialist, so she's not among the brightest bulbs in the socket, but does she even realize that SHE IS A WHITE PERSON?
She is her own worst enemy. She just needs to off herself, immediately and put herself out of misery.
Tinderbox October 8, 2018 at 1:41 pm
She's aware of it. No longer attractive to white men, women like this turn on them in favor of minorities and third world immigrants who are the only ones willing to, uh… consider them sexually.
Richard Maxson October 1, 2018 at 3:32 pm
"Bonus: we castrate their corpses and feed them to swine? Yes," she concluded.
Sounds like the "professor" has the munchies.
Michele Lyon-Brown October 1, 2018 at 3:42 pm
How can any educational facility have such criminally irresponsible thoughts expressed in regards to such as this by teachers. Honestly? Serial rapist? Where is this "rape" charge or even allegation? This is truly deranged thinking. It is also fundamentally directed against an entire body of, selected by gender and color, people without regard to anything else????????????
Mark Webb October 1, 2018 at 4:15 pm
Nothing to see here, just another leftist loud mouth…..
BilboQBaggins October 1, 2018 at 5:04 pm
Here lies a prime example of a deranged, violent person who needs to be put on a no fly list as well as a no guns list for threats against groups of people. Definitely a candidate for charges of hate speech.
Jane Dowe October 1, 2018 at 6:41 pm
Bring it, b!tc#. Republicans and conservatives are the ones who own the guns.
As a woman, I would just beat the snot out of you with a good right hook.
Frank Woitel October 1, 2018 at 7:19 pm
https://www.facebook.com/PresidentJohnJDeGioia/
President of Georgetown….Give him a piece of your mind! No reason some POS like this should ever be teaching in higher education!
Kathleen03 October 1, 2018 at 9:23 pm
99.9% of professors do prove "…..the world is filled with educated derelicts….."
Sorry, they are NOT educated….please replace with "learned"….and they ARE idiots too!!!
"White men should be castrated and fed to swine" | Goodbye, America (in a photo) October 8, 2018 at 12:36 pm
[…] Story. […]
It's sad that no one here knows what the parenthesis around her name represents. She isn't white. She's Jewish. Every. Single. Time.
Reg October 12, 2018 at 12:18 pm
Christine?
Academia is the most effectively subversive entity in Western society today. (Frankfurt School) that's why I laugh every time is see a bumper sticker that says "Thank a teacher"…
The articles will be sent directly to your mailbox with a small descriptive paragraph for each. Unsubscribe at any time.
Dem Superstar Maxine Waters Might Impeach the President Again
Adam Schiff Continues His Lying in the Senate
This Is What Will Happen at Today's Impeachment Trial, PAINFUL!
VA Gov & NBC labeling veterans joining gun rally as "domestic terror threats"
REPORT ALL ERRORS TO SARA@INDEPENDENTSENTINEL.COM
We report the news the media won't.
The Sentinel provides news, opinion and commentary, analysis, factual and original content, mostly political, usually right-of-center, for a Conservative, Libertarian, and Republican audience.
If you click the subcategories, you should find the general information you need to know about us. Please make special note of the terms of use.
Thank you for taking an interest in our site.
We welcome information, corrections, news stories and submissions.
We can be reached at sara@independentsentinel.com
Powered By Eklektika
© 2016 www.independentsentinel.com. All Rights Reserved.
We use cookies to ensure that we give you the best experience on our website. We do not save any of your information.Ok


text:
package com.intellij.find.impl;

import com.intellij.find.FindBundle;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.vfs.newvfs.VfsPresentationUtil;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.ui.ColoredListCellRenderer;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.usageView.UsageViewBundle;
import com.intellij.usages.TextChunk;
import com.intellij.usages.UsageInfo2UsageAdapter;
import com.intellij.util.ui.JBUI;
import org.jetbrains.annotations.NotNull;

import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
import javax.accessibility.AccessibleStateSet;
import javax.swing.*;
import java.awt.*;

class TextSearchRenderer extends JPanel implements ListCellRenderer<UsageInfo2UsageAdapter> {
  private final ColoredListCellRenderer<UsageInfo2UsageAdapter> myUsageRenderer = new ColoredListCellRenderer<>() {
    @Override
    protected void customizeCellRenderer(@NotNull JList<? extends UsageInfo2UsageAdapter> list,
                                         UsageInfo2UsageAdapter value, int index, boolean selected, boolean hasFocus) {
      if (!value.isValid()) {
        myUsageRenderer.append(" " + UsageViewBundle.message("node.invalid") + " ", SimpleTextAttributes.ERROR_ATTRIBUTES);
      }
      TextChunk[] text = value.getPresentation().getText();

      // skip line number / file info
      for (int i = 1; i < text.length; ++i) {
        TextChunk textChunk = text[i];
        myUsageRenderer.append(textChunk.getText(), getAttributes(textChunk, selected));
      }

      myUsageRenderer.setIcon(AllIcons.Nodes.TextArea);
      setBorder(null);
    }

    @NotNull
    private SimpleTextAttributes getAttributes(@NotNull TextChunk textChunk, boolean selected) {
      SimpleTextAttributes attributes = textChunk.getSimpleAttributesIgnoreBackground();
      if (!(attributes.getFontStyle() == Font.BOLD)) return attributes;

      return new SimpleTextAttributes(null, attributes.getFgColor(), attributes.getWaveColor(),
                                      attributes.getStyle() & ~SimpleTextAttributes.STYLE_BOLD |
                                      (selected ? SimpleTextAttributes.STYLE_SEARCH_MATCH : SimpleTextAttributes.STYLE_PLAIN));
    }
  };

  private final ColoredListCellRenderer<UsageInfo2UsageAdapter> myFileAndLineNumber;

  TextSearchRenderer(@NotNull GlobalSearchScope scope) {
    setLayout(new BorderLayout());
    myFileAndLineNumber = new FileAndLineTextRenderer(scope);
    add(myUsageRenderer, BorderLayout.CENTER);
    add(myFileAndLineNumber, BorderLayout.EAST);
    setBorder(JBUI.Borders.empty(2, 2, 2, 0));
  }

  @Override
  public Component getListCellRendererComponent(JList<? extends UsageInfo2UsageAdapter> list,
                                                UsageInfo2UsageAdapter value, int index, boolean isSelected, boolean cellHasFocus) {
    myUsageRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    myFileAndLineNumber.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    setBackground(myUsageRenderer.getBackground());
    if (!isSelected) {
      Color color = VfsPresentationUtil.getFileBackgroundColor(value.getUsageInfo().getProject(), value.getFile());
      setBackground(color);
      myUsageRenderer.setBackground(color);
      myFileAndLineNumber.setBackground(color);
    }
    getAccessibleContext().setAccessibleName(
      FindBundle.message("find.popup.found.element.accesible.name", myUsageRenderer.getAccessibleContext().getAccessibleName(),
                         myFileAndLineNumber.getAccessibleContext().getAccessibleName()));
    return this;
  }

  @Override
  public AccessibleContext getAccessibleContext() {
    if (accessibleContext == null) {
      accessibleContext = new StateSetAccessibleJPanel();
    }
    return accessibleContext;
  }

  class StateSetAccessibleJPanel extends AccessibleJPanel {
    @Override
    public AccessibleRole getAccessibleRole() {
      return AccessibleRole.UNKNOWN;
    }

    @Override
    public AccessibleStateSet getAccessibleStateSet() {
      AccessibleStateSet stateSet = new AccessibleStateSet();
      stateSet.addAll(myUsageRenderer.getAccessibleContext().getAccessibleStateSet().toArray());
      stateSet.addAll(myFileAndLineNumber.getAccessibleContext().getAccessibleStateSet().toArray());
      return stateSet;
    }

    @Override
    public int getAccessibleIndexInParent() {
      return 0;
    }

    @Override
    public int getAccessibleChildrenCount() {
      return 0;
    }

    @Override
    public Accessible getAccessibleChild(int i) {
      return null;
    }
  }
}

redpajama_set_name: RedPajamaGithub


Rosa's Thai Cafe has opened its fourteenth branch, situated in the One Tower Bridge development. It's the perfect place grab a Pad Thai whilst enjoying the view of the historic Tower Bridge.
With the Bridge Theatre just around the corner on the waterfront, and only a ten-minute walk to the Fashion & Textile Museum and the White Cube gallery, you'll have plenty of time for a pick-me-up meal before heading out for some art!


The NSW Aquaculture Association presents a field day for members and the general public. All those with an interest in aquaculture and growing leafy greens from fish wastes are welcome.
The day begins at Port Stephens Fisheries Institute, Taylors Beach, NSW. Join us for a private tour of the NSW Fisheries facilities, get an insider's look at all the latest in hatcheries, recirculating aquaculture facilities, broodstock tanks and ponds, etc. The Port Stephens Fisheries Institute (PSFI) is the key research institute for NSW. Their aquaculture research group develops technology for new or existing aquaculture industries. Key facilities used for this research at the PSFI include a mollusc hatchery, a quarantine mollusc hatchery, marine fish broodstock centre, marine fish hatchery, marine fish nursery facilities and grow-out tanks and ponds.
DPI Fisheries Technician feeding Kingfish in a growing tank at the Port Stephens DPI Fisheries Research Centre.
DPI Fisheries Technician Ian Russell holding a sedated Kingfish at the Port Stephens DPI Fisheries Research Centre.
A rundown on what NSW Fisheries does and its different research projects. Aquatic ecosystem research, Marine Parks, Artificial reefs, Aquaculture research.
Oysters – Developing and improving hatchery and nursery techniques for Sydney rock, Pacific, Pearl and Flat oysters, as well as other molluscs (eg. pipis). Genetically improving Sydney rock oysters (eg for disease resistance, faster growth and improved condition). Researching the impacts of human activities and climate change on oysters.
Marine Fish – Improving methods for hatchery production of mulloway, Australian bass, yellowtail kingfish and southern bluefin tuna. Producing Australian bass and mulloway for stock enhancement. Investigating potential of inland saline water for aquaculture. A highlight will be to see the new Yellowtail Kingfish broodstock holding and breeding facility.
Algal Production – Production of live algae for PSFI and industry. Mass culture 7-12 algal species.
Recirculating aquaculture systems and ponds – A large number of different systems for different projects. Nutrition, Diet Development, Developing and improving diets for fish and prawns. Currently focused on mulloway and yellowtail kingfish growout diets. Replacing fishmeal with Australian agriculture ingredients. Producing more cost-effective, environmentally friendly feeds, etc.
This is a bio-security site: Clothing and footwear must be clean and not have been worn during aquaculture activities within the last 48 hours. Flat soled, covered, non-slip footwear essential.
Various DPI staff working at tanks in the brood stock facility at the Port Stephens DPI Fisheries Research Centre.
After the NSW Fisheries tour we head approximately 14 minutes drive down the road to Cookabarra Restaurant for lunch. Fresh fish chips & salad cooked as either a baked fillet or in a light batter or a chicken Schnitzel option for anyone that does not eat fish.
After lunch we take a tour of Tailor Made Barramundi and hydroponic farm. This is an integrated aquaculture facility producing 1000kgs of premium barramundi per week. The integrated hydroponic tables produce Lettuce varieties and Asian vegetables, such as Boc choy and Baby boc. The tables can produce 22,000 heads over one growing cycle, which takes about 3-4 weeks during summer.
Integrated Aquaculture: a system of aquaculture in which the waste produced by farmed fish or other aquatic creatures supplies the nutrients for plants grown hydroponically.
Tailor Made Fish Farms has been operating a fully functional production system for over 17 years, over this time they have developed an easy to operate, land-based modular fish production system that is both sustainable and environmentally responsible. Production of 'year-round' premium quality fish and vegetables is achieved through compact and controlled production areas using much less water than conventional methods, additional benefit and cash stream are enjoyed by utilizing wastewater from the fish production as a resource to produce a second crop of fresh vegetables.
This efficient combination of fish & vegetable production has two major advantages, firstly water use is minimized, and secondly the environment remains protected by the vegetables ability to fully utilize wastewater from fish production instead of being discharged into the environment.
There are limited seats available for this event. Register now to ensure your place.
This entry was published on March 16, 2017 / Robert McCormack. Posted in Events and tagged aquaculture, Aquaculture Events, barramundi, commercial aquaponics training, integrated aquaculture, Recirculating aquaculture. Bookmark the permalink.


text:
Q: What's the difference between model and props in `mobx-state-tree`? It seems to me that people are using model and props interchangeably. I try to find documents about props but failed. Could someone tell me the difference?

A: The model method creates a new model. It takes two parameters:

*

*name

*properties (optional)

You can create a new model and specify the properties. Or you can create the model first and then 'extend' it with the props method (props is short for properties). TodoOne and TodoTwo are the same.
const TodoOne = types.model("Todo", {title: types.string, done: types.boolean})

const TodoTwo = types.model("Todo")
  .props({
    title: types.string,
    done: types.boolean
  })

But how is this useful? Well the props method doesn't mutate the current type it creates a new one and extends it. This means that we can add or override existing props.
const Todo = types.model("Todo", {title: types.string, done: types.boolean})

const ColorfulTodo = Todo.props({color: types.string}) // returns a new model with a new property

const DefaultTodo = Todo.props({done: false}) // returns a new model with done property overwritten to default to false

The views and actions methods can extend models in same way as the props method.

A: Model needs properties.
const Todo = types
    .model("Todo", {
        title: types.string,
        done: false
    })

In the example above we created a Todo model (MST model) with two properties:
title which is a String
done witch is a Boolean and defaults to false
So when you hear props they are referring to the properties of the model.

redpajama_set_name: RedPajamaStackExchange


To join our chapter, register on CISV Central. If you are already registered on CISV Central and need to renew, simply log in to CISV Central and select "Renew your Membership".
Local Memberships are $50 per family and extend for a calendar year. Memberships are tax deductible. We require all children who apply to participate in a CISV international program have a family membership.