text:
package org.apache.wink.json4j.tests;

import org.apache.wink.json4j.JSONArray;
import org.apache.wink.json4j.JSONException;
import org.apache.wink.json4j.JSONObject;
import org.apache.wink.json4j.formatter.FormatOptions;
import org.apache.wink.json4j.formatter.FormatOptionsBuilderImpl;
import org.apache.wink.json4j.tests.utils.CauseCauseMatcher;
import org.apache.wink.json4j.tests.utils.VerifyUtils;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.text.SimpleDateFormat;
import java.util.*;

import static org.junit.Assert.*;

/**
 * Tests for the basic Java JSONObject model
 */
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
public class JSONObjectTest {

    @Rule
    public ExpectedException thrown = ExpectedException.none();

    private Date date;

    @Before
    public void setUp() throws Exception {
        date = new SimpleDateFormat("MMM dd, yyyy HH:mm").parse("Oct 26, 1985 01:21");
    }

    /**
     * Test the no-args constructor.
     */
    @Test
    public void test_new() {
        final JSONObject jObject = new JSONObject();
        assertNotNull(jObject);
        assertEquals(0, jObject.length());
    }

    /**
     * Test the String empty object constructor "{}"
     */
    @Test
    public void test_newFromEmptyObjectString() throws JSONException {
        final JSONObject jObject = new JSONObject("{}");
        assertNotNull(jObject);
        assertEquals(0, jObject.length());
    }

    /**
     * Test the String empty: ""
     */
    @Test
    public void test_newFromEmptyString_throwsException() throws JSONException {
        thrown.expect(JSONException.class);
        new JSONObject("");
    }

    /**
     * Test the String non-empty object constructor.
     */
    @Test
    public void test_newFromString() throws Exception {
        final JSONObject jObject = new JSONObject("{\"foo\":\"bar\",\"bool\":true}");
        assertNotNull(jObject);
        assertEquals(2, jObject.length());
        assertEquals("bar", jObject.getString("foo"));
        assertTrue(jObject.getBoolean("bool"));
    }

    /**
     * Test the construction from a reader.
     */
    @SuppressWarnings("EmptyFinallyBlock")
    @Test
    public void test_newFromReader() throws Exception {
        try (Reader rdr = new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("utf8_basic.json"), "UTF-8")) {
            final JSONObject jObject = new JSONObject(rdr);
            assertNotNull(jObject);
            assertEquals(12, jObject.length());
        } finally {
            /* */
        }
    }

    /**
     * Test the construction from a stream.
     */
    @SuppressWarnings("EmptyFinallyBlock")
    @Test
    public void test_newFromStream() throws Exception {
        try (InputStream is = this.getClass().getClassLoader().getResourceAsStream("utf8_basic.json")) {
            final JSONObject jObject = new JSONObject(is);
            assertNotNull(jObject);
            assertEquals(12, jObject.length());
        } finally {
            /* */
        }
    }

    /**
     * Test the construction from a simple map.
     */
    @Test
    public void test_newFromMap() throws Exception {
        int anInt = 1;
        final HashMap<String, Object> map = new HashMap<>();
        map.put("string", "This is a string");
        map.put("null", null);
        map.put("integer", anInt);
        map.put("bool", true);
        map.put("strArr", new String[]{"first", "second", "third"});

        final JSONObject jObject = new JSONObject(map);
        assertTrue(jObject.has("strArr"));
        final JSONArray jArr = jObject.getJSONArray("strArr");

        assertNotNull(jObject);
        assertEquals(5, jObject.length());
        assertTrue(jObject.has("string"));
        assertTrue(jObject.has("null"));
        assertTrue(jObject.has("integer"));
        assertTrue(jObject.has("bool"));
        assertEquals("first", jArr.get(0));
        assertEquals("second", jArr.get(1));
        assertEquals("third", jArr.get(2));
    }

    @Test
    public void test_newFromBean_usingDate() throws Exception {

        final JSONObject j = new JSONObject(date);
        assertEquals("java.util.Date", j.get("class"));
        assertEquals("85 and not 1985 because getYear() on Date is deprecated for good reason", 85, j.get("year"));
        assertEquals(9, j.get("month"));  // zero-based month in Java
        assertEquals(1, j.get("hours"));
        assertEquals(21, j.get("minutes"));
    }

    @Test
    public void test_newFromBeanWithSuper_usingDate() throws Exception {
        final JSONObject j = new JSONObject(date, true);
        assertEquals("java.util.Date", j.get("class"));
        assertEquals("85 and not 1985 because getYear() on Date is deprecated for good reason", 85, j.get("year"));
        assertEquals(9, j.get("month"));  // zero-based month in Java
        assertEquals(1, j.get("hours"));
        assertEquals(21, j.get("minutes"));
    }

    @Test
    public void test_newFromBeanWithoutSuper_usingDate() throws Exception {
        final JSONObject j = new JSONObject(date, false);
        assertNull(j.opt("class"));
        assertEquals("85 and not 1985 because getYear() on Date is deprecated for good reason", 85, j.get("year"));
        assertEquals(9, j.get("month"));  // zero-based month in Java
        assertEquals(1, j.get("hours"));
        assertEquals(21, j.get("minutes"));
    }

    @Test
    public void test_newFromCompactJsonString() throws Exception {
        final JSONObject jObject = new JSONObject("{\"foo\":\"bar\",\"bool\":true}");
        assertTrue(jObject.getBoolean("bool"));
    }

    @Test
    public void test_parseFailure() throws Exception {

        thrown.expect(JSONException.class);
        thrown.expectMessage("expecting either ',' or '}' on line 1, column 26");
        new JSONObject("{\"foo\":\"bar\", \"bool\": true");
    }

    @Test
    public void test_noQuotesParseFailure() throws Exception {
        thrown.expect(JSONException.class);
//        thrown.expectMessage("expecting either ',' or '}' on line 1, column 26");
        new JSONObject("{foo:\"bar\", bool: true}", true);
    }

    /**
     * Test parsing a value which ia a number bigger than <tt>Long.MAX_VALUE</tt>
     */
    @Test
    public void test_parseNumberGreaterThanMaxLong_throwsException() throws JSONException {
        String strGreaterThanMaxLong = Long.MAX_VALUE + "0";
        thrown.expectCause(new CauseCauseMatcher(NumberFormatException.class, String.format("For input string: \"%s\"", strGreaterThanMaxLong)));
        new JSONObject("{\"foo\":[" + strGreaterThanMaxLong + "}");
    }

    /**
     * Test parsing a value which ia a number smaller than <tt>Long.MIN_VALUE</tt>
     */
    @Test
    public void test_parseNumberLessThanMinLong_throwsException() throws JSONException {
        String strLessThanMinLong = Long.MIN_VALUE + "0";
        thrown.expectCause(new CauseCauseMatcher(NumberFormatException.class, String.format("For input string: \"%s\"", strLessThanMinLong)));
        new JSONObject("{\"foo\":" + strLessThanMinLong + "}");
    }

    /**
     * Test toString(). Because JSONObject is non-ordered, we could have
     * two possible outcomes for a 2 attribute json object.
     * TODO: This needs to move to an output formatter
     */
    @Test
    public void test_toStringVerbose() throws Exception {

        final JSONObject jObject = new JSONObject("{\"foo\":\"bar\",\"bool\":true}");
        final String actualStr = jObject.toString(true);
        final String possibleStr1 = "{" + System.lineSeparator() +
                "\t\"foo\": \"bar\"," + System.lineSeparator() +
                "\t\"bool\": true" + System.lineSeparator() +
                "}";
        final String possibleStr2 = "{" + System.lineSeparator() +
                "\t\"bool\": true," + System.lineSeparator() +
                "\t\"foo\": \"bar\"" + System.lineSeparator() +
                "}";

        assertTrue(possibleStr1.equals(actualStr) || possibleStr2.equals(actualStr));
    }

    /**
     * Test toString(). Because JSONObject is non-ordered, we could have
     * two possible outcomes for a 2 attribute json object.
     */
    @Test
    public void test_toStringVerboseWithDepthTo3Spaces() throws Exception {
        final JSONObject jObject = new JSONObject("{\"foo\":\"bar\",\"bool\":true}");
        final String actualStr = jObject.toString(3);
        final String possibleStr1 = "{" + System.lineSeparator() +
                "   \"foo\": \"bar\"," + System.lineSeparator() +
                "   \"bool\": true" + System.lineSeparator() +
                "}";
        final String possibleStr2 = "{" + System.lineSeparator() +
                "   \"bool\": true," + System.lineSeparator() +
                "   \"foo\": \"bar\"" + System.lineSeparator() +
                "}";

        assertTrue(possibleStr1.equals(actualStr) || possibleStr2.equals(actualStr));
    }

    /**
     * Test the key check method.
     */
    @Test
    public void test_has() throws Exception {

        final JSONObject jObject = new JSONObject("{\"foo\":\"bar\", \"bool\": false, \"null\": null}");
        assertTrue(jObject.has("foo"));
        assertTrue(jObject.has("bool"));
        assertTrue(jObject.has("null"));
        assertFalse(jObject.has("noKey"));
    }

    @Test
    public void test_putNullKey_throwsException() throws Exception {
        thrown.expect(IllegalArgumentException.class);
        thrown.expectMessage("key must not be null");
        new JSONObject().put(null, 311);
    }

    @Test
    public void test_putKeyIsNotAString_throwsException() throws Exception {
        thrown.expect(IllegalArgumentException.class);
        thrown.expectMessage("key must be a String");
        new JSONObject().put(Integer.valueOf(311), 311);
    }

    @Test
    public void test_putLong() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("long", 311L);
        final Object x = jObject.get("long");
        assertNotNull(x);
        assertTrue(x instanceof java.lang.Long);
        assertEquals(311L, jObject.getLong("long"));
    }

    @Test
    public void test_putInt() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("integer", 311);
        final Object x = jObject.get("integer");
        assertNotNull(x);
        assertTrue(x instanceof java.lang.Integer);
        assertEquals(311, jObject.getInt("integer"));
    }

    @Test
    public void test_putShort() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("short", (short) 311);
        final Object x = jObject.get("short");
        assertNotNull(x);
        assertTrue(x instanceof java.lang.Short);
        assertEquals(311, jObject.getShort("short"));
    }

    @Test
    public void test_putDouble() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("double", 3.11);
        final Object x = jObject.get("double");
        assertNotNull(x);
        assertTrue(x instanceof java.lang.Double);
        assertEquals(3.11, jObject.getDouble("double"), Double.POSITIVE_INFINITY);
    }

    @Test
    public void test_putBoolean() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("bool", Boolean.valueOf(true));
        final Object x = jObject.get("bool");
        assertNotNull(x);
        assertTrue(x instanceof java.lang.Boolean);
        assertTrue(jObject.getBoolean("bool"));
    }

    @Test
    public void test_putString() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("string", "a bolt of lightning");
        final Object x = jObject.get("string");
        assertNotNull(x);
        assertTrue(x instanceof java.lang.String);
        assertEquals("a bolt of lightning", jObject.getString("string"));
    }

    @Test
    public void test_putJSONObject() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("sub_object", new JSONObject("{\"key\":\"val\"}"));
        final Object obj = jObject.get("sub_object");
        assertNotNull(obj);
        assertTrue(obj instanceof JSONObject);
        assertEquals("val", jObject.getJSONObject("sub_object").getString("key"));
    }

    @Test
    public void test_putJSONArray() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("array", new JSONArray());
        final Object obj = jObject.get("array");
        assertTrue(obj != null);
        assertTrue(obj instanceof JSONArray);
        assertEquals(0, jObject.getJSONArray("array").size());
    }

    @Test
    public void test_putStringArray_createsArray() throws Exception {
        final JSONObject jObject = new JSONObject();
        final String[] someArray = {"Marty", "Biff"};
        jObject.put("string_array", someArray);
        assertEquals(JSONArray.class, jObject.get("string_array").getClass());
        final JSONArray array = jObject.getJSONArray("string_array");
        assertEquals("Marty", array.get(0));
        assertEquals("Biff", array.get(1));
    }

    @Test
    public void test_appendWithNoExistingKey_createsArray() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.append("not_really_a_string", "a bolt of lightning");
        final Object obj = jObject.get("not_really_a_string");
        assertNotNull(obj);
        assertTrue(obj instanceof JSONArray);
        assertEquals("a bolt of lightning", jObject.getJSONArray("not_really_a_string").getString(0));
    }

    @Test
    public void test_appendToExistingKey_withStringValue_createsArrayWithBothStrings() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("foo", "its just too darn loud");
        jObject.append("foo", "1.21 gigawatts");
        final Object obj = jObject.get("foo");
        assertNotNull(obj);
        assertTrue(obj instanceof JSONArray);
        final JSONArray array = jObject.getJSONArray("foo");
        assertEquals(2, array.size());
        assertEquals("its just too darn loud", array.getString(0));
        assertEquals("1.21 gigawatts", array.getString(1));
    }

    @Test
    public void test_appendToExistingKey_withNullValue() throws Exception {
        final JSONObject jObject = new JSONObject();
        jObject.put("null", (Object) null);
        final String s = (String) jObject.get("null");
        assertNull(s);
        assertTrue(jObject.has("null"));
        jObject.append("null", "watch me for the changes and try to keep up");
        final Object obj = jObject.get("null");
        assertNotNull(obj);
        assertTrue(obj instanceof JSONArray);
        final JSONArray array = jObject.getJSONArray("null");
        assertTrue(array.size() == 2);
        assertNull(array.get(0));
        assertEquals("watch me for the changes and try to keep up", array.getString(1));
    }

    @Test
    public void test_appendToExistingKey_withArray_appendsNewValue() throws Exception {

        final JSONObject jObject = new JSONObject();
        final JSONArray array = new JSONArray();
        array.add("Einstein");
        jObject.put("array", array);
        jObject.append("array", "Doc Brown");
        final JSONArray j = jObject.getJSONArray("array");
        assertEquals(2, j.size());
        assertEquals("Einstein", j.getString(0));
        assertEquals("Doc Brown", j.getString(1));
    }

    @Test
    public void test_appendToExistingKey_withObject_createsArrayWithObjectAndNewNullValue() throws Exception {

        final JSONObject jObject = new JSONObject();
        final JSONObject subObj = new JSONObject("{\"key\":\"value\"}");
        jObject.put("sub_object", subObj);
        jObject.append("sub_object", null);
        final Object obj = jObject.get("sub_object");
        assertNotNull(obj);
        assertTrue(obj instanceof JSONArray);
        final JSONArray array = jObject.getJSONArray("sub_object");
        final JSONObject j = array.getJSONObject(0);
        assertEquals("value", j.getString("key"));
        assertNull(j.get(1));
    }

    /**
     * Test <tt>getLong</tt> with Long.MAX_VALUE
     */
    @Test
    public void test_getMaxLongPositive() throws JSONException {
        assertEquals(Long.MAX_VALUE, new JSONObject("{\"num\":" + Long.MAX_VALUE + "}").getLong("num"));
    }

    /**
     * Test <tt>getLong</tt> with Long.MIN_VALUE
     */
    @Test
    public void test_getMaxLongNegative() throws JSONException {
        assertEquals(Long.MIN_VALUE, new JSONObject("{\"num\":" + Long.MIN_VALUE + "}").getLong("num"));
    }

    /**
     * Test <tt>getInt</tt> with <tt>Integer.MAX_VALUE</tt>
     */
    @Test
    public void test_getMaxIntegerPositive() throws JSONException {
        assertEquals(Integer.MAX_VALUE, new JSONObject("{\"num\":" + Integer.MAX_VALUE + "}").getInt("num"));
    }

    /**
     * Test <tt>getInt</tt> with <tt>Integer.MIN_VALUE</tt>
     */
    @Test
    public void test_getMaxIntegerNegative() throws JSONException {
        assertEquals(Integer.MIN_VALUE, new JSONObject("{\"num\":" + Integer.MIN_VALUE + "}").getInt("num"));
    }

    /**
     * Test <tt>getDouble</tt> with <tt>Double.MAX_VALUE</tt>
     */
    @Test
    public void test_getMaxDoublePositive() throws JSONException {
        assertEquals(Double.MAX_VALUE, new JSONObject("{\"num\":" + Double.MAX_VALUE + "}").getDouble("num"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with <tt>Double.MIN_VALUE</tt>
     */
    @Test
    public void test_getMaxDoubleNegative() throws JSONException {
        assertEquals(Double.MIN_VALUE, new JSONObject("{\"num\":" + Double.MIN_VALUE + "}").getDouble("num"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with double decimal
     */
    @Test
    public void test_getPositiveDoubleWithDecimal() throws JSONException {
        assertEquals(311.617, new JSONObject("{\"num\":311.617}").getDouble("num"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with negative double decimal
     */
    @Test
    public void test_getNegativeDoubleWithDecimal() throws JSONException {
        assertEquals(-311.617, new JSONObject("{\"num\":-311.617}").getDouble("num"), Double.NEGATIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with double decimal with an exponent (eg. e-3)
     */
    @Test
    public void test_getPositiveDoubleWithExponential() throws JSONException {
        assertEquals(311.617, new JSONObject("{\"num\":311617e-3}").getDouble("num"), Double.POSITIVE_INFINITY);
        assertEquals(311.617, new JSONObject("{\"num\":311617E-3}").getDouble("num"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with negative double decimal with an exponent (eg. e-3)
     */
    @Test
    public void test_getNegativeDoubleWithExponential() throws JSONException {
        assertEquals(-311.617, new JSONObject("{\"num\":-311617e-3}").getDouble("num"), Double.NEGATIVE_INFINITY);
        assertEquals(-311.617, new JSONObject("{\"num\":-311617E-3}").getDouble("num"), Double.NEGATIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with double decimal with an exponent (eg. e+3)
     */
    @Test
    public void test_getPositiveDoubleWithPlusExponential() throws JSONException {
        assertEquals(311617000, new JSONObject("{\"num\":311617e+3}").getDouble("num"), Double.POSITIVE_INFINITY);
        assertEquals(311617000, new JSONObject("{\"num\":311617E+3}").getDouble("num"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with negative double decimal with an exponent (eg. e+3)
     */
    @Test
    public void test_getNegativeDoubleWithPlusExponential() throws JSONException {
        assertEquals(-311617000, new JSONObject("{\"num\":-311617e+3}").getDouble("num"), Double.NEGATIVE_INFINITY);
        assertEquals(-311617000, new JSONObject("{\"num\":-311617E+3}").getDouble("num"), Double.NEGATIVE_INFINITY);
    }

    @Test
    public void test_getString() throws Exception {
        assertEquals("1.21 gigwatts", new JSONObject("{\"string\":\"1.21 gigwatts\"}").getString("string"));
    }

    @Test
    public void test_getBoolean() throws Exception {
        assertTrue(new JSONObject("{\"bool\":true}").getBoolean("bool"));
        assertFalse(new JSONObject("{\"bool\":false}").getBoolean("bool"));
    }

    @Test
    public void test_getBoolean_StringValue_true_And_false() throws Exception {
        assertTrue(new JSONObject("{\"bool_string\":\"true\"}").getBoolean("bool_string"));
        assertFalse(new JSONObject("{\"bool_string\":\"false\"}").getBoolean("bool_string"));
    }

    @Test
    public void test_getBoolean_StringValue_True_throwsException() throws Exception {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [invalid_bool_string]: [True] was not 'true' or 'false'");
        new JSONObject("{\"invalid_bool_string\":\"True\"}").getBoolean("invalid_bool_string");
    }

    @Test
    public void test_getBoolean_StringValue_False_throwsException() throws Exception {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [invalid_bool_string]: [False] was not 'true' or 'false'");
        new JSONObject("{\"invalid_bool_string\":\"False\"}").getBoolean("invalid_bool_string");
    }

    @Test
    public void test_optLong() throws Exception {
        final JSONObject jObject = new JSONObject("{\"long\":311}");
        assertEquals(311, jObject.optLong("long"));
        assertEquals(Long.MAX_VALUE, jObject.optLong("long2", Long.MAX_VALUE));
        assertEquals(0, jObject.optLong("long2"));
    }

    @Test
    public void test_optLongNegative() throws Exception {
        final JSONObject jObject = new JSONObject("{\"long\":-311}");
        assertEquals(-311, jObject.optLong("long"));
        assertEquals(Long.MIN_VALUE, jObject.optLong("long2", Long.MIN_VALUE));
        assertEquals(0, jObject.optLong("long2"));
    }

    @Test
    public void test_optInt() throws Exception {
        final JSONObject jObject = new JSONObject("{\"int\":311}");
        assertEquals(311, jObject.optInt("int"));
        assertEquals(Integer.MAX_VALUE, jObject.optInt("int2", Integer.MAX_VALUE));
        assertEquals(0, jObject.optInt("int2"));
    }

    @Test
    public void test_optIntNegative() throws Exception {
        final JSONObject jObject = new JSONObject("{\"int\":-311}");
        assertEquals(-311, jObject.optInt("int"));
        assertEquals(Integer.MIN_VALUE, jObject.optInt("int2", Integer.MIN_VALUE));
        assertEquals(0, jObject.optInt("int2"));
    }

    @Test
    public void test_optDouble() throws Exception {
        final JSONObject jObject = new JSONObject("{\"double\":123456789}");
        assertEquals(123456789, jObject.optDouble("double"), Double.POSITIVE_INFINITY);
        assertEquals(Double.MAX_VALUE, jObject.optDouble("double2", Double.MAX_VALUE), Double.POSITIVE_INFINITY);
        assertEquals(Double.NaN, jObject.optDouble("double2"), Double.POSITIVE_INFINITY);
    }

    @Test
    public void test_optDoubleNegative() throws Exception {
        final JSONObject jObject = new JSONObject("{\"double\":-123456789}");
        assertEquals(-123456789, jObject.optDouble("double"), Double.NEGATIVE_INFINITY);
        assertEquals(Double.MIN_VALUE, jObject.optDouble("double2", Double.MIN_VALUE), Double.NEGATIVE_INFINITY);
        assertEquals(Double.NaN, jObject.optDouble("int2"), Double.NEGATIVE_INFINITY);
    }

    @Test
    public void test_optDoubleDecimal() throws Exception {
        final JSONObject jObject = new JSONObject("{\"double\":311.617}");
        assertEquals(311.617, jObject.optDouble("double"), Double.POSITIVE_INFINITY);
    }

    @Test
    public void test_optDoubleNegativeDecimal() throws Exception {
        final JSONObject jObject = new JSONObject("{\"double\":-311.617}");
        assertEquals(-311.617, jObject.optDouble("double"), Double.NEGATIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with double decimal with an exponent (eg. e-3)
     */
    @Test
    public void test_optPositiveDoubleWithExponential() throws JSONException {
        assertEquals(311.617, new JSONObject("{\"double\":311617e-3}").optDouble("double"), Double.POSITIVE_INFINITY);
        assertEquals(311.617, new JSONObject("{\"double\":311617E-3}").optDouble("double"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with negative double decimal with an exponent (eg. e-3)
     */
    @Test
    public void test_optNegativeDoubleWithExponential() throws JSONException {
        assertEquals(-311.617, new JSONObject("{\"double\":-311617e-3}").optDouble("double"), Double.POSITIVE_INFINITY);
        assertEquals(-311.617, new JSONObject("{\"double\":-311617E-3}").optDouble("double"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with double decimal with an exponent (eg. e+3)
     */
    @Test
    public void test_optPositiveDoubleWithPlusExponential() throws JSONException {
        assertEquals(311617000, new JSONObject("{\"double\":311617e+3}").optDouble("double"), Double.POSITIVE_INFINITY);
        assertEquals(311617000, new JSONObject("{\"double\":311617E+3}").optDouble("double"), Double.POSITIVE_INFINITY);
    }

    /**
     * Test <tt>getDouble</tt> with negative double decimal with an exponent (eg. e+3)
     */
    @Test
    public void test_optNegativeDoubleWithPlusExponential() throws JSONException {
        assertEquals(-311617000, new JSONObject("{\"double\":-311e+3}").optDouble("double"), Double.POSITIVE_INFINITY);
        assertEquals(-311617000, new JSONObject("{\"double\":-311E+3}").optDouble("double"), Double.POSITIVE_INFINITY);
    }

    @Test
    public void test_optString() throws Exception {
        final JSONObject jObject = new JSONObject("{\"string\":\"Mayor Goldie Wilson. I like the sound of that.\"}");
        assertEquals("Mayor Goldie Wilson. I like the sound of that.", jObject.optString("string"));
        assertEquals("string!", jObject.optString("string2", "string!"));
        assertNull(jObject.optString("string2"));
    }

    @Test
    public void test_optBoolean() throws Exception {
        final JSONObject jObject = new JSONObject("{\"bool\":true}");
        assertTrue(jObject.optBoolean("bool"));
        assertFalse(jObject.optBoolean("bool2"));
        assertTrue(jObject.optBoolean("bool2", true));
    }

    @Test
    public void test_optBoolean_StringValue_true() throws Exception {
        final JSONObject jObject = new JSONObject("{\"bool\":\"true\"}");
        assertTrue(jObject.optBoolean("bool"));
    }

    @Test
    public void test_optBoolean_StringValue_false() throws Exception {
        final JSONObject jObject = new JSONObject("{\"bool\":\"false\"}");
        assertFalse(jObject.optBoolean("bool"));
    }

    @Test
    public void test_opt_ReturnsIntegerClass() throws Exception {
        final JSONObject jObject = new JSONObject("{\"int\" : " + Integer.MAX_VALUE + "}");
        final JSONObject jObject2 = new JSONObject("{\"int\" : " + Integer.MIN_VALUE + "}");
        final JSONObject jObject3 = new JSONObject("{\"int\" : 4500}");
        final JSONObject jObject4 = new JSONObject("{\"int\" : 0}");
        final JSONObject jObject5 = new JSONObject("{\"int\" : 0X7fffffff}");
        final JSONObject jObject6 = new JSONObject("{\"int\" : 017777777777}");

        assertEquals(Integer.class, jObject.opt("int").getClass());
        assertEquals(Integer.class, jObject2.opt("int").getClass());
        assertEquals(Integer.class, jObject3.opt("int").getClass());
        assertEquals(Integer.class, jObject4.opt("int").getClass());
        assertEquals(Integer.class, jObject5.opt("int").getClass());
        assertEquals(Integer.class, jObject6.opt("int").getClass());
    }

    @Test
    public void test_opt_ReturnsLongClass_whenValueOutOfIntegerRange() throws Exception {

        final Long val1 = Long.valueOf(Integer.MAX_VALUE) + 1;
        final Long val2 = Long.valueOf(Integer.MIN_VALUE) - 1;
        final JSONObject jObject = new JSONObject("{\"int\" : " + val1 + "}");
        final JSONObject jObject2 = new JSONObject("{\"int\" : " + val2 + "}");
        final JSONObject jObject3 = new JSONObject("{\"int\" : 0X" + Long.toHexString(val1) + "}");
        final JSONObject jObject4 = new JSONObject("{\"int\" : 020000000000}");
        assertEquals(Long.class, jObject.opt("int").getClass());
        assertEquals(Long.class, jObject2.opt("int").getClass());
        assertEquals(Long.class, jObject3.opt("int").getClass());
        assertEquals(Long.class, jObject4.opt("int").getClass());
    }

    @Ignore("JSONObject does not currently support this notation")
    @Test
    /**
     * See javadoc for that class for more details
     */
    public void test_parsesHexadeximalFloatingPointConstantNotation() throws Exception {
        final String doubleHexStr = Double.toHexString(Double.valueOf(Long.MAX_VALUE) + 1.0);
        final JSONObject jObject3 = new JSONObject("{\"number\" : " + doubleHexStr + "}");
        assertEquals(Double.class, jObject3.opt("number").getClass());
    }

    @Ignore("Tokenizer does not support parsing leading-zero doubles")
    @Test
    /**
     * The fix for this is in Tokenizer.java on/around line 409
     * @see org.apache.wink.json4j.internal.Tokenizer#readNumber()
     */
    public void test_parsesDoubleWithLeadingZeros() throws Exception {
        // 003.110
        final String numberStr = "003.110";
        final JSONObject jObject = new JSONObject("{\"number\" : " + numberStr + "}");
        assertEquals(Double.class, jObject.opt("number").getClass());
        assertEquals(3.11, jObject.optDouble("number"), Double.POSITIVE_INFINITY);
    }

    @Test
    public void test_optWithValidHex() throws Exception {
        final JSONObject jObject1 = new JSONObject("{\"int\" : 0X7f}");
        final JSONObject jObject2 = new JSONObject("{\"int\" : 0x7f}");
        final JSONObject jObject3 = new JSONObject("{\"int\" : -0x99e}");
        final JSONObject jObject4 = new JSONObject("{\"int\" : -0X99e}");

        assertEquals(127, jObject1.opt("int"));
        assertEquals(127, jObject2.opt("int"));
        assertEquals(-2462, jObject3.opt("int"));
        assertEquals(-2462, jObject4.opt("int"));
    }

    @Test
    public void test_optWithInvalidHexG() throws Exception {
        thrown.expect(JSONException.class);
        new JSONObject("{\"int\" : 343g}");
    }

    @Test
    public void test_optWithInvalidHexA() throws Exception {
        thrown.expect(JSONException.class);
        new JSONObject("{\"int\" : 343a}");
    }

    /**
     * Presumably there was an issue that the exceptions weren't the same
     * calling two different parses with invalid Hex.
     */
    @Test
    public void test_optNumberReturnsSameException() {

        // Test to make sure same exception is thrown when hex char is included in
        // normal identifier.
        try {
            new JSONObject("{\"int\" : 343h}");
            assertFalse(true);
        } catch (Exception ex) {
            assertTrue(ex instanceof JSONException);
            assertNull(ex.getCause());
        }

        try {
            new JSONObject("{\"int\" : 343a}");
            assertFalse(true);
        } catch (Exception ex) {
            assertTrue(ex instanceof JSONException);
            assertNull(ex.getCause());
        }
    }

    /* *********************************************************************** */
    /* The following tests all test failure scenarios due to type mismatching. */
    /* *********************************************************************** */

    /**
     * Test <tt>getLong</tt> function failure due to type mismatch
     */
    @Test
    public void test_getLong_typeMisMatchString_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was not a type that can be converted to long");
        new JSONObject("{\"foo\":\"1\"}").getLong("foo");
    }

    /**
     * Test <tt>getDouble</tt> function failure due to type mismatch
     */
    @Test
    public void test_getDouble_typeMisMatchString_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was not a type that can be converted to double");
        new JSONObject("{\"foo\":\"1\"}").getDouble("foo");
    }

    /**
     * Test <tt>getInt</tt> function failure due to type mismatch
     */
    @Test
    public void test_getInt_typeMisMatchString_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was not a type that can be converted to integer");
        new JSONObject("{\"foo\":\"1\"}").getInt("foo");
    }

    /**
     * Test <tt>getShort</tt> function failure due to type mismatch
     */
    @Test
    public void test_getShort_typeMisMatchString_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was not a type that can be converted to short");
        new JSONObject("{\"foo\":\"1\"}").getShort("foo");
    }

    /**
     * Test <tt>getShort</tt> function failure due to type mismatch
     */
    @Test
    public void test_getString_typeMisMatchNull_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was null.  Object required");
        new JSONObject("{\"foo\":null}").getString("foo");
    }

    /**
     * Test <tt>getString</tt> function returns string representation of number
     */
    @Test
    public void test_getString_returnsIntegerToString() throws JSONException {
        assertEquals("311", new JSONObject("{\"foo\":311}").getString("foo"));
    }

    /**
     * Test <tt>getBoolean</tt> function failure due to type mismatch
     */
    @Test
    public void test_getBoolean_typeMisMatchNumber_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("Value at key: [foo] was not a boolean or string value of 'true' or 'false'");
        new JSONObject("{\"foo\":311}").getBoolean("foo");
    }

    /**
     * Test <tt>getLong</tt> function failure due to value null
     */
    @Test
    public void test_getLong_typeMisMatchNull_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was null.  Number required.");
        new JSONObject("{\"foo\":null}").getLong("foo");
    }

    /**
     * Test <tt>getInt</tt> function failure due to value null
     */
    @Test
    public void test_getInt_typeMisMatchNull_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was null.  Number required.");
        new JSONObject("{\"foo\":null}").getInt("foo");
    }

    /**
     * Test <tt>getDouble</tt> function failure due to value null
     */
    @Test
    public void test_getDouble_typeMisMatchNull_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was null.  Number required.");
        new JSONObject("{\"foo\":null}").getLong("foo");
    }

    /**
     * Test <tt>getShort</tt> function failure due to value null
     */
    @Test
    public void test_getShort_typeMisMatchNull_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was null.  Number required.");
        new JSONObject("{\"foo\":null}").getShort("foo");
    }

    /**
     * Test <tt>getBoolean</tt> function failure due to value null
     */
    @Test
    public void test_getBoolean_typeMisMatchNull_throwsJSONException() throws JSONException {
        thrown.expect(JSONException.class);
        thrown.expectMessage("The value for key: [foo] was null");
        new JSONObject("{\"foo\":null}").getBoolean("foo");
    }

    /**
     * Test the iterator of the keys.
     */
    @Test
    public void test_keys() throws Exception {
        final HashMap<String, Object> map = new HashMap<>();
        final JSONObject jObject = new JSONObject("{\"foo\": \"bar\", \"number\": 1.21, \"bool\":null}");
        final Iterator keys = jObject.keys();
        while (keys.hasNext()) {
            String key = (String) keys.next();
            map.put(key, key);
        }
        assertEquals(3, map.size());
        assertTrue(map.containsKey("foo"));
        assertTrue(map.containsKey("number"));
        assertTrue(map.containsKey("bool"));
    }

    /**
     * Test the iterator of the sorted keys.
     */
    @Test
    public void test_sortedKeys() throws Exception {
        final JSONObject jObject = new JSONObject("{\"foo\": \"bar\", \"number\": 1, \"bool\":null}");
        Iterator keys = jObject.sortedKeys();
        final String[] sKeys = new String[]{"bool", "foo", "number"};
        VerifyUtils.verifyKeys(keys, sKeys);
    }

    /**
     * Test the toString of JSONObject.
     * Use the value to construct a new object and verify contents match.
     */
    @Test
    public void test_toString_isSymmetrical() throws Exception {

        final String jsonStr = "{\"foo\":\"bar\",\"number\":1,\"bool\":true}";
        final JSONObject jObject = new JSONObject(jsonStr);
        final JSONObject jObject2 = new JSONObject(jObject.toString());

        assertEquals(jObject.length(), jObject2.length());
        assertEquals(jObject.getString("foo"), jObject2.getString("foo"));
        assertEquals(jObject.getBoolean("bool"), jObject2.getBoolean("bool"));
        assertEquals(jObject.getInt("number"), jObject2.getInt("number"));
    }

    /**
     * Test JSONObject creation does not throw exception if key is missing and
     * does not add missing value.
     */
    @Test
    public void test_constructFromExistingObject_withMissingKey_keyIsIgnored() throws Exception {
        final JSONObject obj = new JSONObject();
        obj.put("key1", "val1");
        obj.put("key2", "val2");
        obj.put("key3", "val3");
        String[] keys = {"key1", "key3"};
        final JSONObject testObj = new JSONObject(obj, keys);
        assertEquals(2, testObj.size());
        assertEquals("val1", testObj.opt("key1"));
        assertFalse(testObj.has("key2"));
        assertEquals("val3", testObj.opt("key3"));
    }

    /* ******************************************************** */
    /* The following tests checks UTF-8 encoded DBCS characters */
    /* ******************************************************** */

    /**
     * Verify a standard UTF-8 file with high character codes (Korean), can be read via a reader and parsed.
     */
    @SuppressWarnings("EmptyFinallyBlock")
    @Test
    public void test_utf8_korean() throws Exception {
        final String expectedKoreanStr = "\uc548\ub155 \uc138\uc0c1\uc544";
        try (Reader reader = new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("utf8_helloworld_ko.json"), "UTF-8")) {
            final JSONObject jObject = new JSONObject(reader);
            assertEquals(expectedKoreanStr, jObject.getString("greet"));
        } finally {
            /* */
        }
    }

    /**
     * Verify a UTF 8 file with character codes in the lower part will parse and
     * serialize correctly in escaped unicode format (which is valid JSON and easier
     * to debug)
     * <p>
     * TODO: Address this when the toggle for escaped vs unescaped is allowed during outputting
     */
    @SuppressWarnings("EmptyFinallyBlock")
    @Test
    public void test_utf8_lowerchar_toStringEscapesCodes() throws Exception {
        try (Reader reader = new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("utf8_lowerchar.json"), "UTF-8")) {
            final JSONObject jObject = new JSONObject(reader);
            assertTrue(jObject.getString("message").equals("\u00c5\u00c5\u00c5\u00c5"));
            assertTrue(jObject.toString().equals("{\"message\":\"\\u00c5\\u00c5\\u00c5\\u00c5\"}"));
        } finally {
            /* */
        }
    }

    @Test
    public void test_toString_doesNotEscapeForwardSlashes_whenOptionDisabled() throws Exception {
        final String jsonStr = "{\"special_string\":\"1 > ../log/file-1234.log 2>&1&\"}";
        assertEquals(jsonStr, new JSONObject(jsonStr).toString(new FormatOptionsBuilderImpl().setEscapeForwardSlashes(false).build()));
    }

    @Test
    public void test_toString_putsEmptyArraysBracketsOnSameLine_whenVerboseAndOptionEnabled() throws Exception {
        final String jsonStr = "{\n\t\"empty_array\": []\n}";
        assertEquals(jsonStr, new JSONObject(jsonStr).toString(
                new FormatOptionsBuilderImpl()
                        .setFormat(FormatOptions.Format.Verbose)
                        .setNewlineString("\n")
                        .setEmptyArrayOnSameLine(true)
                        .build()));
    }

    @Test
    public void test_toString_putsEmptyObjectBracesOnSameLine_whenVerboseAndOptionEnabled() throws Exception {
        final String jsonStr = "{\n\t\"empty_object\": {}\n}";
        assertEquals(jsonStr, new JSONObject(jsonStr).toString(
                new FormatOptionsBuilderImpl()
                        .setFormat(FormatOptions.Format.Verbose)
                        .setNewlineString("\n")
                        .setEmptyArrayOnSameLine(true)
                        .build()));
    }

    /* ************************************************************************************* */
    /* These tests check for specific 'behaviors' so that the parser is compatible to others */
    /* and allows comments, etc.                                                             */
    /*                                                                                */
    /* TODO: Implement a method to retain comments between a parse, and a save                */
    /* ************************************************************************************* */

    @Test
    public void test_CStyleComment() throws Exception {
        final JSONObject jObj = new JSONObject("/* comment */ { 'test' : 'value' }");
        assertTrue(jObj.has("test"));
        assertEquals("value", jObj.getString("test"));
        assertFalse(jObj.has("comment"));
    }

    @Test
    public void test_CPPComment() throws Exception {
        final JSONObject jObj = new JSONObject("// test comment\n{'test':'value'}");
        assertTrue(jObj.has("test"));
        assertEquals("value", jObj.getString("test"));
        assertFalse(jObj.has("comment"));
    }

    @Test
    public void test_CStyleCommentWithACommentCharInMiddle() throws Exception {
        final JSONObject jObj = new JSONObject("/* * */ { 'test' : 'value' }");
        assertTrue(jObj.has("test"));
        assertEquals("value", jObj.getString("test"));

        final JSONObject jObj2 = new JSONObject("/* / */ { 'test' : 'value' }");
        assertTrue(jObj2.has("test"));
        assertEquals("value", jObj2.getString("test"));
    }

    @Test
    public void test_UnquotedObjectKey() throws Exception {
        final JSONObject jObj = new JSONObject("{ some_key:'A String',another_key:311}");
        assertTrue(jObj.has("some_key"));
        assertEquals("A String", jObj.getString("some_key"));
        assertTrue(jObj.has("some_key"));
        assertEquals(311, jObj.getInt("another_key"));
    }

    /**
     * Test special characters in unquoted string key.
     */
    @Test
    public void test_UnquotedObjectKeyWithSpecialChars() throws Exception {
        JSONObject jObj = new JSONObject("{test-key:'value'}");
        assertTrue(jObj.has("test-key"));
        assertEquals("value", jObj.getString("test-key"));

        jObj = new JSONObject("{test0:'value'}");
        assertTrue(jObj.has("test0"));
        assertEquals("value", jObj.getString("test0"));

        jObj = new JSONObject("{test$:'value'}");
        assertTrue(jObj.has("test$"));
        assertEquals("value", jObj.getString("test$"));

        jObj = new JSONObject("{test_key:'value'}");
        assertTrue(jObj.has("test_key"));
        assertEquals("value", jObj.getString("test_key"));
    }

    /**
     * Test special characters in unquoted string value.
     */
    @Test
    public void test_UnquotedObjectValueWithSpecialChars() throws Exception {
        JSONObject jObj = new JSONObject("{test:@value}");
        assertTrue(jObj.has("test"));
        assertEquals("@value", jObj.getString("test"));

        jObj = new JSONObject("{test:$100}");
        assertTrue(jObj.has("test"));
        assertEquals("$100", jObj.getString("test"));

        jObj = new JSONObject("{test:$value}");
        assertTrue(jObj.has("test"));
        assertEquals("$value", jObj.getString("test"));
    }

    @Test
    public void test_CStyleCommentFailsStrict() throws Exception {
        thrown.expect(JSONException.class);
        new JSONObject("/* comment */ { 'test' : 'value' }", true);
    }

    @Test
    public void test_CPPCommentFailsStrict() throws Exception {
        thrown.expect(JSONException.class);
        new JSONObject("// test comment\n{'test':'value'}", true);
    }

    @Test
    public void test_UnquotedObjectKeyFailsStrict() throws Exception {
        thrown.expect(JSONException.class);
        new JSONObject("{test:'value'}", true);
    }

    @Test
    public void test_isNull_withNullVarieties() throws Exception {
        final Map jsonMap = new LinkedHashMap(3);
        jsonMap.put("key1", null);
        jsonMap.put("key2", JSONObject.NULL);
        jsonMap.put("key3", "NOT NULL");

        final JSONObject json = new JSONObject(jsonMap);

        assertTrue(json.isNull("key1"));
        assertTrue(json.isNull("key2"));
        assertFalse(json.isNull("key3"));
    }
}


Offering a terrace with sea view, this cottage has a living room, a dining area, a bathroom and a kitchenette. Accessed by steep stairs, there are also a bedroom and an alcove. For stays of more than 6 days, a final cleaning fee of EUR 29 is not included in the price. Electricity costs (except in July and August), a TV, bed linen and towels also are at a surcharge.


Sunday the 8th July Red Hill Riders are organizing a social ride at You Yangs MTB park which is located north-west of Melbourne. Approx. 2-hours drive from Red Hill, we will be riding the Stockyards area of the You Yangs MTB park which includes a mixture of medium to advanced trails.
We are meeting at 9 am at the MTB Park car park located in lot 10a Drysdale Rd, Little River VIC 3211. This is an informal social ride, and we are expecting to cover approx. 30kms for the morning (without any shuttling). If you have not ridden at You Yangs before it is a great way to get to know the trails as key riders attending are familiar with the trails.
If you have space in your car, or are keen to come but cannot drive yourself, please email Cameron on secretary@redhillriders.com.au, and he will help to coordinate car-pooling were possible.
Cameron is also happy to meet locally at Boundary Rd 6.30 am to drive in convoy, again just email.


text:
SUNDAY LIFESTYLE
LIFESTYLE BUSINESS
FOOD AND LEISURE
YSTYLE
Helping our helpers help themselves
IT'S A WONDERFUL LIFE - Rod Nepomuceno (The Philippine Star) - July 15, 2013 - 12:00am
Recently, I was in Hong Kong and read a news article about an upcoming football match between the Philippine team and the Hong Kong team that was going to be held there. As I was browsing through the article, I was bothered by what I read. The football authorities of each country were working out a way to avoid a situation where there would be hurtful and derogatory chants shouted during the match by insensitive fans. One of the derogatory chants that was trying to be addressed by the authorities was the jeers thrown by some Hong Kong fans who were calling the Philippine players "slaves." This, of course, was in reference to a good number of Filipinos who are making the ultimate sacrifice of being away from their families to serve as domestic helpers to Hong Kong-based employers. Personally, I found that quite ironic. How can you insult the very people who serve your meals, wash your clothes, clean your bathrooms, and watch over your children while you make a decent living running a business?
Needless to say, I was appalled by this bit of news. I couldn't believe that in this day and age of globalization, free markets, and universal acceptance of human equality, there are still some idiots who think that calling people "slaves" — even in jest — is all right and acceptable. For me, before you can even call yourself a good businessman or a good manager, you have to be a good employer in your own household. And the first step that you need to take is to treat your household help with dignity and respect. This particular issue cuts deep into my heart, as well as my wife's, since we are both very sensitive when it comes to the plight of domestic helpers. We've talked about it lots of times and we've always wanted to do something concrete, not just for our own helpers but also Filipino helpers here and around the world.
A few days ago, I think I finally found a way to help. During a taping for my show Legal HD (Help Desk) on the Solar News Channel, I met human rights pioneer Cecilia Flores-Oebanda. Oebanda was recently featured in a two-hour CNN documentary entitled, The Fighters, which chronicles Philippine human rights and her journey to protect children from the sex trade and how she convinced the Philippines' biggest star, Manny Pacquiao, to join her as a fighter in the battle against modern-day slavery.
CNN spent two years investigating and researching Oebanda's work. It's estimated that more than 100,000 children work in the sex trade in the Philippines. Since founding her anti-trafficking organization, Visayan Forum, in 1991, Cecilia Flores-Oebanda has helped more than 70,000 victims or potential victims of human trafficking. She believes if Pacquiao, an elected congressman in the Philippines and the country's biggest star, champions her cause, it could mean a turning point. "The Fighters represents the very core of the CNN Freedom Project, namely a desire to shine a spotlight into the darkness of human trafficking and to champion those who have dedicated their lives to ending it."
Needless to say, I was honored to meet Miss Oebanda. Apart from her very commendable work in trying to end human trafficking, she is also the main proponent of "The Kasambahay Law" that was recently passed by Congress. For those not familiar, "The Kasambahay Law" is the long-overdue legislation that provides mandatory benefits for household helpers.
"I lobbied for The Kasambahay Law as early a 1994," said Oebanda, whose foundation, Visayan Forum, fought hard to get the law passed. "It took close to 20 years, but the wait is worth it. Coming from the Visayas myself, I was fully aware of the plight of young women from the provinces trying to get a decent job in Manila. A lot of them end up being maids in households because of the lack of other jobs available. And unfortunately, the Labor Code doesn't provide any protection for them. In fact, the Labor Code provisions are very oppressive. The minimum salary for household help, as provided by the Labor Code, is only P1,000 a month. And we all know that P1,000 a month can hardly buy you anything."
Oebanda said that under the Kasambahay Law, the mandatory minimum compensation now for household help is P2,500 a month. Plus, the employer is now required to have a signed contract with the household help, and is required to cover the helper's SSS, Philhealth and Pag-Ibig contributions, which amount to a little over P400 (or around three cappuccinos in your favorite coffee shop). The law also provides the helper mandatory rest periods per day (at least eight hours), vacation leave benefits (at least five days a year), and one day off (24 hours) every week.
Oebanda said she felt compelled to fight for household helpers' rights because they are almost like family. "Our household helpers are involved in our most intimate activities at home, and whether we like it or not, they are part of our daily lives. So I think it's only right that we give them more importance in terms of the benefits they are entitled to."
Personally, I think this law is way overdue. But then again, better late than never. If there is one law that I truly commend Congress for, it's this law. Our household help are not just "extras" in our home. They are the backbone of our daily lives. Without our household help, it would be a major challenge for all of us to pursue our careers and dreams. We would need to be home to watch over our kids, secure our homes, prepare our food, and do our chores. But with the benefit of our household help, we can delegate all of that, and go ahead and do what we need to do to make a living. So really, our household help have a direct contribution to our professional growth.
Thanks to people like Cecilia Oebanda, we are now in a better position to help the people who help us the most.
Thanks for your letters! You may e-mail me at rodnepo@yahoo.com.
CECILIA FLORES-OEBANDA HELP HONG KONG HOUSEHOLD KASAMBAHAY LAW LABOR CODE LAW OEBANDA VISAYAN FORUM
How Bayview Hotel GM Eugene Yap leads with compassion
Eugene T. Yap, general manager of Bayview Hotel Manila, wants to make a mark in the hotel industry through 'leadership by...
MoneyGram Foundation expands literacy project to Bicol Region
MoneyGram Foundation heads to south of Manila, Philippines to make educational programs accessible for students.
Want to start a business this 2020? Liza Soberano gives tips
By Jan Milo Severo | 19 days ago
Liza said she chose the wellness business because it's close to her heart.
Coke Studio goes beyond supporting OPM, becomes environment advocate
Coca-Cola not only supports local artists, it also supports the environmental cause.
LIST: 4 things you need to know about proudly Filipino company World Balance
Here are the reasons why local shoe brand World Balance continues to make waves in the industry.
CDM champions digital transformation in Philippines and beyond
Certified Digital Professionals (CDP) launched a two-day "Marketing in a Digital World" workshop which aims to...

redpajama_set_name: RedPajamaCommonCrawl


Sharda Cropchem Limited is engaged in the marketing and distribution of a wide range of formulations and generic active ingredients globally. It's core strength lies in identifying generic molecules, preparing dossiers, seeking registrations, marketing and distributing formulations or generic active ingredients in fungicide, herbicide and insecticide segments. The company has also recently entered into the biocide segment and has acquired several registrations from the existing registration holders, primarily, in Europe.
As of August 5, 2014, the company has over 180 Good Laboratory Practices ("GLP") certified dossiers and as of July 15, 2014, the company owns over 1040 registrations for formulations and over 155 registrations for generic active ingredients across Europe, NAFTA, Latin America and Rest of the world.
"The company procures formulations and generic active ingredients in their finished form from third party manufacturers for onward sale. It also procures generic active ingredients for preparation and sale of formulations wherein it outsources the process of preparation of formulations to third party formulators. This enables the company to offer diversified range of formulations and generic active ingredients in fungicide, herbicide and insecticide segments for protecting different kind of crops as well as serve turf and specialty markets and in biocide segment as disinfectants, thereby catering to varied market demand."


Service Manual 2018 Jeep Grand Cherokee Laredo is good choice for you that looking for nice reading experience. We hope you glad to visit our website. Please read our description and our privacy and policy page.
Finally I get this ebook, thanks for all these Service Manual 2018 Jeep Grand Cherokee Laredo can get now!


text:
/*	$NetBSD: console.h,v 1.1 2002/10/05 17:16:36 chs Exp $	*/

struct tty *find_tp(dev_t);
struct vconsole *vconsole_spawn_re(dev_t, struct vconsole *);

void console_switch(u_int);
int console_unblank(void);
int console_scrollback(void);
int console_scrollforward(void);

redpajama_set_name: RedPajamaGithub


text:
Posts Tagged 'Amtrak Viewliner diners'
Not Much Breakfast to be had in Diner Dover
Amtrak began putting Viewliner dining cars built by CAF USA into service not longer before it stopped offering full service dining aboard the Lake Shore Limited in favor of what it termed "fresh and contemporary" meal service.
At the time that service launched in June 2018, no hot meal offerings were offered. Everything served was prepared off the train.
Since then hot food had made a sort of comeback on the Lake Shore Limited and Capitol Limited.
Breakfast now includes a breakfast sandwich of ham, egg and cheddar cheese served on a ciabatta roll that an attendant can heat for you in a microwave oven.
I imagine that one or more passengers were having that sandwich as the westbound Lake Shore passed through Olmsted Falls, Ohio, near Cleveland on the morning I made this image.
It wasn't a hot, freshly prepared meal created by a chef aboard the train, but I suppose it was better than the alternative of breakfast bars.
Dover, like most of the Viewliner diners, is named after a state capitol city. Like many of those capitols, Dover is not on the Amtrak route map.
Tags:Amtrak dining cars, Amtrak photographs, Amtrak photography, Amtrak Photos, Amtrak Viewliner diners, Amtrak Viewliners, Amtrak's Lake Shore Limited, Olmsted Falls Ohio
Posted in Amtrak Photos | 1 Comment »
In Its Customary Position
An Amtrak Viewliner baggage car brings up the rear of the westbound Lake Shore Limited as it cruises through Olmsted Fall, Ohio, en route to Chicago.
The next stop for Train 49 will be Elyria, Ohio.
The typical operation of Nos. 48 and 49 has the Boston section at the front of the train. Only the New York section still has a baggage car and it is always on the rear.
And that's for good reason, too. You would not want passengers walking through a baggage going to and from the Boston and New York sections.
Ahead of the baggage cars are a pair of Viewliner sleepers and Viewliner dining car Dover.
Tags:Amfleet equipment, Amtrak, Amtrak photographs, Amtrak photography, Amtrak Photos, Amtrak trains, Amtrak Viewliner diners, Amtrak Viewliners, Amtrak's Lake Shore Limited, Olmsted Falls Ohio, Viewliner baggage cars, Viewliner sleeping cars
Posted in Amtrak Photos | Leave a Comment »
Seeing the Sunrise in Ohio
Your train didn't get out of Chicago Union Station until 12:33 a.m., making it just over three hours late when its wheels finally began to turn.
So maybe you wanted to sleep in a little the next morning.
By the time you pulled back the curtains from the windows in your Viewliner sleeping accommodations on Train No. 48 it was just after 8 a.m.
The skies were mostly cloudy, but a bit of sunlight was peaking through as the Lake Shore Limited roared through Olmsted Falls in suburban Cleveland.
No. 48 has made some of the time lost leaving Chicago, but not much.
By the time it halted at the Amtrak station next to Lake Erie in downtown Cleveland No. 48 was 2 hours and 51 minutes late.
It would not get much better the rest of the way, reaching New York City at 8:09 p.m. The scheduled arrival time at Penn Station is 6:23 p.m.
Around Utica, New York, No. 48 had dropped down to 3 hours, 15 minutes off the published time card.
As it the practice these days, a continental breakfast is available in the dining car just ahead of the two New York sleepers.
Today's train has one of those new Viewliner dining cars that are named for state capital cities.
This one is named after the capital of Ohio, Columbus, a city that has not seen a scheduled Amtrak train since the last National Limited snuck out of town on May 1, 1979, on its last day of operation.
Tags:Amtrak eastern long-distance trains, Amtrak photographs, Amtrak photography, Amtrak Photos, Amtrak Viewliner diners, Amtrak Viewliners, Amtrak's Lake Shore Limited, Olmsted Falls Ohio, Viewliner sleeping cars
Tis The Season for Late Trains
Amtrak's eastbound Lake Shore Limited is running five hours late as it rushes through Berea, Ohio, on Jan. 22 on Norfolk Southern tracks.
No. 48 was 3.5 hours late leaving Chicago Union Station the night before and was expected to reach New York Penn Station at 11:57 p.m. on Tuesday night, having lost another half hour en route.
Note that No. 48 has its winter consist of one coach for the Boston section and two coaches to New York. The Boston baggage car is gone.
Also in the consist is Viewliner diner Montgomery, a city in Alabama that Amtrak has not served in several years.
Tags:Amfleet coach, Amfleet equipment, Amtrak P42 No. 100, Amtrak photographs, Amtrak photography, Amtrak Photos, Amtrak Viewliner diners, Amtrak Viewliner II baggage cars, Amtrak Viewliners, Amtrak's Lake Shore Limited, Berea Ohio
Not Open for Meals
Bringing up the rear of Amtrak's northbound Saluki is Viewliner diner Indianapolis.
But the diner is not open to serve meals to passengers. Instead, it's purpose is to help Train 390 meet an axle count requirement mandated by host railroad Canadian National.
It's a safety measure to ensure that the train triggers grade crossing warning devices. Any Amtrak train using a CN route must have a minimum number of axles.
The Indianapolis is the not the only dining car on the Saluki. Ahead of the baggage car is Heritage diner No. 8505, a former Northern Pacific car built by Budd in 1957.
Amtrak may have retired its Heritage diners from their intended purpose, but some of those cars continue to run up miles in a different type of revenue service.
The Saluki is shown departing Effingham, Illinois.
Tags:Amtrak dining cars, Amtrak heritage fleet, Amtrak Midwest Corridor trains, Amtrak photographs, Amtrak photography, Amtrak Photos, Amtrak trains, Amtrak Viewliner diners, Amtrak's Saluki, Midwest passenger rail service, Midwest rail service, Viewliner diner Indianapolis
Frigid Outside, Warm Inside
Outside the temperature was in the low teens and the wind chill was below zero. A friend and I were waiting to photograph Amtrak's eastbound Lake Shore Limited roaring through Geneva, Ohio. No. 48 was running two hours late. It also was running a few minutes behind a CSX stack train.
The usual consist of the eastbound Lake Shore Limited has the Boston cars toward the front and the New York cars on the rear. Typically, No. 48 has two Viewliner sleepers for New York.
This day was no exception. Shown above is the first of the two New York sleepers. Some passengers in those rooms might just now be getting up and about while others might be watching the wintry countryside of Northeast Ohio fly by. Still others might be having breakfast in the "dining car" just ahead of the first New York sleeper.
I placed the phrase "dining car" in quotations because it is not the same as the dining cars that used to run on this train. With Viewliner diners, presumably, being readied for revenue service, the Lake Shore Limited might get a full dining car some day.
Tags:Amtrak, Amtrak eastern long-distance trains, Amtrak late trains, Amtrak trains, Amtrak Viewliner diners, Amtrak Viewliners, Amtrak's Lake Shore Limited, Geneva Ohio, Late Amtrak trains, Viewliner sleeping cars, Viewliners
More Empire Corridor Track Work Planned
More track work is planned for Amtrak's Empire Corridor rail officials said this week.
Speaking at a ceremony to make the 50th anniversary of the New York-Buffalo, New York, route, Amtrak's Joe McHugh, vice president of state supported services and business development, said work is planned for the Empire Connector, which leads into New York's Penn Station.
The ceremony was held at the Capital District Transportation Authority rail station in Rensselaer.
McHugh and other officials wouldn't provide any specifics, but the Albany Times-Union reported that sources with knowledge of the plans said Empire Service trains would have to be temporarily redirected to Grand Central Terminal next summer.
Amtrak apparently still needs to reach an agreement with the Metropolitan Transportation Authority to use GCT.
The event was held to look back on the history of the Empire Corridor, which was developed in 1967 by the New York Central Railroad.
McHugh said that in the middle 1960s it wasn't clear whether there was a future for passenger rail.
"The people who rethought the roles that trains could fill are the people who saved the railroad," he said.
In recent years, Amtrak has rebuilt some tracks used by Empire Service trains, added a fourth track at the Albany-Rensselaer station, and installed a second track between Albany and Schenectady.
A new station for Schenectady is currently under construction.
Amtrak is still awaiting delivery of new dining cars and sleeping cars for its long-distance trains, including the Lake Shore Limited.
McHugh said the diners that have been delivered have received positive comments from passengers, and that refurbishment of the interiors of the carrier's Amfleet I cars should be completed by March 2018.
Tags:Amtrak eastern corridor trains, Amtrak Viewliner diners, Amtrak Viewliner II cars, Amtrak Viewliners, Amtrak's Empire Corridor, Amtrak's Empire Service, Amtrak's Lake Shore Limited, Joe McHugh, New York City, New York Grand Central Terminal, New York Penn Station, New York-Buffalo corridor
Another Viewliner II Diner Expected in March
The National Association of Railroad Passengers reported this week that Amtrak officials have said that the first Viewliner II diner has been performing satisfactorily in its trial revenue service.
The diner, built by CAF USA in Elmira, New York, has been operating on the New York-Miami Silver Meteor since late November.
Amtrak will place another Viewliner II diner in service in March with the remaining 23 diners that Amtrak ordered being delivered by late spring.
The diners are slated to be assigned to eastern long-distance trains. NARP said no date has been set for restoration of full dining service to the Chicago-New York/Boston Lake Shore Limited.
The Viewliner diners also are slated to be assigned to the New York-New Orleans Crescent.
Once the diners are delivered, CAF will focus on finishing the baggage-dorm cars and sleepers that Amtrak ordered.
NARP noted that Amtrak said adding the baggage-dorm cars to the Chicago-New York Cardinal will enable it make more sleeper space available to the public.
At present, the on-board crew of Nos. 50 and 51 are housed in revenue space and the availability of rooms on the Cardinal for the public is tight.
Amtrak's Viewliner order was placed in 2010. When finished, CAF will have built 70 baggage cars, 25 diners, 10 baggage-dormitory cars and 25 sleepers.
Tags:Amtrak, Amtrak dining cars, Amtrak rolling stock, Amtrak Silver Meteor, Amtrak Viewliner diners, Amtrak Viewliner II cars, Amtrak Viewliners, Amtrak's Crescent, Amtrak's Lake Shore Limited, diner, dining cars
Viewliner Diner in Revenue Service Testing
Revenue service testing began last week of the first Viewliner dining car built by CAF USA.
No. 68001, the Annapolis, ran northbound from Miami to New York on the Silver Meteor on Dec. 5.
The testing is part of an Amtrak acceptance program for new cars. If No. 68001 passes the testing program, Amtrak will begin taking delivery of additional Viewliners in January.
Amtrak has one other Viewliner diner, No. 8400, the Indianapolis, which was a prototype diner built in 1988.
The Viewliner diners will be assigned to Eastern single-level long-distance train. Amtrak has ordered 25 Viewliner diners from CAF.
Tags:Amtrak, Amtrak dining cars, Amtrak Viewliner diners, Amtrak Viewliner II cars, CAF USA, Viewliner dining cars
Viewliner Diner Training May Start Soon
Amtrak's first Viewliner II diner will be ready for crew training once it completes a testing program in Florida.
The dining car is at the Hialeah Maintenance Facility near Miami.
Amtrak has ordered 25 Viewliner II diners for assignment to single-level long-distance trains, including the Lake Shore Limited and the Cardinal.
The cars were originally scheduled to be delivered two years ago but have been delayed by production issues.
The Viewliner diners will replace Heritage Fleet dining cars, some of which have in the past several months been replaced by Amfleet food service cars.
Only the New York-New Orleans Crescent and the New York-Miami Silver Meteor are operating with Heritage dining cars.
The testing is being done at Hialeah because it maintains single-level long-distance equipment.
Tags:Amtrak, Amtrak dining cars, Amtrak Silver Meteor, Amtrak Viewliner diners, Amtrak Viewliner II cars, Amtrak Viewliners, Amtrak's Crescent, Amtrak's Lake Shore Limited


TLC has grown to a team of 50 talented teachers.
We now have over 500 students.
The Turner Learning Center (TLC) was founded in 2003 by Marina Duchene with the aim of developing English as a skill for life.
As of 2018, TLC supports over 500 students with developing English as a skill for life and works with 50 teachers. Regarded as one of the leading EFL schools in Paris, we look for truly dedicated, passionate and motivated teachers to represent TLC.
TLC experiences growth year on year in terms of both students and teachers. As an organisation that is constantly expanding we are frequently on the look out for new teachers to help us achieve our mission. You can find out more about our head office team below.
Co-founder of TLC. Frank helped set up TLC and joined the team full time in 2011. His role is divided into three main poles: ensuring our administrative obligations are met, financial control and development.
Co-Founder of TLC. Marina started of as a free lance English teacher in 2003. Her role at TLC focuses on teaching, liasing with parents and development. She also writes and develops academic material and support.
Mala joined TLC as a teacher in February 2015. In August 2015 Mala was promoted to the position of Head Teacher. Her role is split into three areas: head teacher, hiring and developing TLC school.
Marie joined TLC as a teacher in September 2010. In August 2014 Marie became in charge of IT. Her role is divided into two poles: IT support and control.
Eleanor arrived at TLC in September 2015, a year later became part of the HO team. Her role includes: teaching, TLC School operations, parent support and admin.
Jacob became part of TLC in February 2017 as a teacher before joining the HO team. His role involves teaching, hiring, teacher support and admin.


Here is the information we have on Galtres Lodge Hotel, which is a hotel located in York. Find That Hotel is first for Galtres Lodge Hotel reviews and Galtres Lodge Hotel York information and maps.
If you are familiar with this the Galtres Lodge Hotel hotel, you can add a review for Galtres Lodge Hotel.
This listing has been rated by 1 visitors. 10% of visitors recommend Galtres Lodge Hotel. If you would like, you can add a review for Galtres Lodge Hotel.


text:
Damn The War Criminals,
Bush,Cheney,Rice,Rumsfeld,Wolfowitz, Powell and Blair from England.
Afghan War Children
Civilian casualties in the war in Afghanistan (2001–present)
During the war in Afghanistan (2001–present), over 31,000 civilian deaths due to war-related violence have been documented;[1][2] 29,900 civilians have been wounded.[2] Over 111,000 Afghans, including civilians, soldiers and militants, are estimated to have been killed in the conflict.[1] The Cost of War project estimated that the number who have died through indirect causes related to the war may be as high 360,000 additional people based on a ratio of indirect to direct deaths in contemporary conflicts.[3] These numbers do not include those who have died in Pakistan.
The war, launched by the United States as "Operation Enduring Freedom" in 2001, began with an initial air campaign that almost immediately prompted concerns over the number of Afghan civilians being killed[4] as well as international protests. With civilian deaths from airstrikes rising again in recent years,[5] the number of Afghan civilians being killed by foreign military operations has led to mounting tension between the foreign countries and the government of Afghanistan. In May 2007, President Hamid Karzai summoned foreign military commanders to warn them of the consequences of further Afghan civilian deaths.[6] The civilian losses are a continuation of the extremely high civilian losses experienced during the Soviet–Afghan War in the 1980s, and the three periods of civil war following it: 1989–1992, 1992–1996, and 1996–2001.
1.1 Aggregation of estimates
1.2 Civilian casualties (2001–2003)
1.3 Civilian and overall casualties (2005)
NYT: Opinion End the War in Afghanistan
It is time to bring American soldiers back home.
On Sept. 14, 2001, Congress wrote what would prove to be one of the largest blank checks in the country's history. The Authorization for Use of Military Force Against Terrorists gave President George W. Bush authority to attack the Taliban, the Sunni fundamentalist force then dominating Afghanistan that refused to turn over the mastermind of the attacks perpetrated three days earlier, Osama bin Laden.
In the House of Representatives and the Senate combined, there was only one vote in opposition: Barbara Lee, a Democratic representative from California, who warned of another Vietnam. "We must be careful not to embark on an open-ended war with neither an exit strategy nor a focused target," she said. "We cannot repeat past mistakes."
Days later, Mr. Bush told a joint session of Congress just how broadly he planned to use his new war powers. "Our war on terror begins with Al Qaeda, but it does not end there," Mr. Bush declared. "It will not end until every terrorist group of global reach has been found, stopped and defeated."
More than 17 years later, the United States military is engaged in counterterrorism missions in 80 nations on six continents. The price tag, which includes the wars in Afghanistan and Iraq and increased spending on veterans' care, will reach $5.9 trillion by the end of fiscal year 2019, according to the Costs of War project at Brown University. Since nearly all of that money has been borrowed, the total cost with interest will be substantially higher.
The war on terror has been called the "forever war," the "long war," a "crusade gone wrong." It has claimed an estimated half a million lives around the globe.
It is long past time for a reappraisal.
More than 2.7 million Americans have fought in the war since 2001. Nearly 7,000 service members — and nearly 8,000 private contractors — have been killed. More than 53,700 people returned home bearing physical wounds, and numberless more carry psychological injuries. More than one million Americans who served in a theater of the war on terror receive some level of disability compensation from the Department of Veterans Affairs.
The blood was spilled and the money was spent based on the idea that war abroad could prevent bloodshed at home. As Mr. Bush explained in 2004: "We are fighting these terrorists with our military in Afghanistan and Iraq and beyond so we do not have to face them in the streets of our own cities."
But hatred is borderless. It is true that since 9/11, no foreign terrorist group has conducted a deadly attack inside the United States. But there have been more than 200 deadly terrorist attacks during that period, most often at the hands of Americans radicalized by ideologies that such groups spread. Half of those attacks were motivated by radical Islam, while 86 came at the hands of far-right extremists.
When Donald Trump ran for the White House, one of his central promises was to rein in overseas military adventurism and focus the country's limited resources on its core strategic priorities. While Mr. Trump's foreign policy has been unwise if not self-defeating in many areas, he is right, as was Barack Obama, to want to scale back a global conflict that appears to have no outer bound.
GUARD: UK's arms export supervisor attacks NGOs over Yemen deaths
Graham Jones MP says reports of civilian deaths from airstrikes have been 'grossly exaggerated'
The neutrality of the chief gatekeeper to the UK's arms control regime has been brought into question after he repeatedly attacked the integrity of British NGOs' claims about civilian deaths in Yemen.
Graham Jones, a Labour MP and chair of the Commons committees on arms export controls (CAEC), also said that blame for the war in Yemen lay primarily with Iran, and not the west or Saudi Arabia.
Jones is the most senior parliamentarian overseeing Britain's arms control regime, including the lawfulness of UK arms sales to Saudi Arabia and Yemen.
Yemen's UN-backed government, supported by Saudi and UAE forces, has been trying to dislodge a Houthi militia in the country…………….Jones said there was "a constant stream of stories" generated by NGOs based on so-called evidence that turned out to be false.
NGOs working in the region are privately furious at what they regard as a belittling of their legitimate efforts to highlight the number of civilian casualties caused by Saudi air strikes. They insist they have also called out Houthi war crimes, but point out the UK is supplying weapons to the Saudis and not the Houthis.
GUARD: Yemen war: UN anchors ship off Red Sea port for 'neutral ground' talks
Vessel moored near Hodeidah hosts meetings with Yemen government delegates and Houthi rebels
Yemen peace talks have been held onboard a UN-chartered boat anchored in the Red Sea in an attempt to find a neutral venue acceptable to both sides.
Patrick Cammaert, a retired Dutch general and head of the UN mission in Yemen, chaired the meeting on the ship moored off the port city of Hodeidah. Houthi rebel military officials had refused to meet in government-held areas in southern Hodeidah, citing security fears.
The dispute over the talks venue had prevented military leaders from the two sides meeting since 2 January. The first two meetings had been held in Houthi-controlled zones.
The meetings of the regional redeployment committee (RCC) are seen as critical to building on the UN-brokered agreement reached in Stockholm in Decemberthat under which Houthi fighters would be redeployed out of Hodeida's city and port. The agreement envisaged a new security force taking over the city, a move critical to preventing famine and to opening humanitarian corridors.
The UN mission, despite delays and setbacks, remains optimistic that progress can be made, partly because external forces, including the US and Saudi, recognise that a purely military solution in Yemen might come at an unacceptable price.
REU: Kabul sees Taliban-Afghan opposition talks in Moscow as betrayal
KABUL (Reuters) – Senior Afghan officials warned on Monday that talks this week between Taliban militants and opposition politicians, including former President Hamid Karzai, betrayed the principles of democracy and Afghanistan's best interests.
The talks, starting on Tuesday in Moscow, come 10 days after peace negotiations between the United States and the Taliban in Qatar ended with signs of progress toward the withdrawal of thousands of foreign troops from Afghanistan and an end to more than 17 years of war.
The push for peace comes as the Taliban, ousted by U.S.-led forces in 2001, have staged near daily attacks and are in control of or contesting districts across nearly half the country.
Moscow had decided to snub Afghan government officials, sources said, to ensure the participation of the Taliban who refuse to hold talks with representatives of Western-backed President Ashraf Ghani, branding them puppets of the United States.
Fazel Fazly, chief adviser to Ghani, expressed "regret" that politicians who previously led Afghanistan's democratic transition were to meet the Taliban.
"(They) are ready to bypass these principles and move toward (the principles') destruction due to differences and being away from power," Fazly said in a Tweet.
REU: No plan for Mosul: chaos and neglect slow Iraqi city's recovery
MOSUL, Iraq (Reuters) – The demolition of a wrecked building in the northern Iraqi city of Mosul where Islamic State used to execute men they said were gay is already in its third month.
A destroyed house is seen in the Old City of Mosul, Iraq January 29, 2019. Picture taken January 29, 2019. REUTERS/Ari Jalal
Homeless boys who hunt for scrap in the remains of the former National Insurance Company building work quicker some days than the lone digger perched on its crumbling carcass.
Two years after the battle in which Iraqi forces recaptured Mosul from IS, the authorities do not own enough equipment to clear the rubble littered across the city.
Hundreds of Mosul council's vehicles were destroyed in fighting or used by IS as suicide bombs. Few have been replaced.
Companies hired by the governor on lucrative contracts to make up the shortfall work deliberately slowly, or sometimes do not exist, lawmakers and locals say.
AP: 7 Iranian pilgrims wounded in shooting attack in Iraq
BAGHDAD (AP) — Police and medical officials say seven Iranian Shiite pilgrims traveling in central Iraq were wounded when their bus came under attack by unidentified gunmen.
The officials said late Sunday that the bus carrying 10 pilgrims was north of the capital of Baghdad when gunmen opened fire.
They say the wounded passengers were taken to a hospital, including a woman who was in serious condition. The officials spoke on condition of anonymity in line with briefing regulations.
There was no immediate claim of responsibility for the attack.
Casualties, Exclusive of Civilians
Staff Sgt. Joshua Z. Beale, 32, of Carrollton, Virginia, died Jan. 22, 2019, as a result of injuries sustained from enemy small arms fire during combat operations in Tarin Kowt, Uruzgan Province, Afghanistan.
Beale was assigned to 1st Battalion, 3rd Special Forces Group (Airborne), Fort Bragg, North Carolina.
The Department of Defense announced today the deaths of one soldier, one sailor and one DOD civilian who were supporting Operation Inherent Resolve.
The deceased are:
Army Chief Warrant Officer 2 Jonathan R. Farmer, 37, of Boynton Beach, Florida. Farmer was assigned to 3rd Battalion, 5th Special Forces Group (Airborne), Fort Campbell, Kentucky.
Navy Chief Cryptologic Technician (Interpretive) Shannon M. Kent, 35, of upstate New York. Kent was assigned to Cryptologic Warfare Activity 66, based at Fort George G. Meade, Maryland.
DOD civilian Scott A. Wirtz of St. Louis, Missouri. Wirtz was assigned to the Defense Intelligence Agency as an operations support specialist.
Farmer, Kent and Wirtz died Jan. 16, 2019, in Manbij, Syria, as a result of wounds sustained from a suicide improvised explosive device.
Sgt. Cameron A. Meddock, 26, of Spearman, Texas, died Jan. 17, 2019, in Landstuhl, Germany, as a result of injuries sustained from small arms fire during combat operations on Jan. 13, 2019, in Jawand District, Badghis Province, Afghanistan.
Meddock was assigned to 2nd Battalion, 75th Ranger Regiment, Joint Base Lewis-McChord, Washington.
Yemen War Child
Yemeni mother Nadia Nahari holding her five-year-old son Abdelrahman Manhash, who is suffering from severe malnutrition and weighing 5 kilograms, at a treatment clinic in the Khokha district in the western province of Hodeidah. Photograph: AFP/Getty Images
Please do not forget the children.
This entry was posted on Monday, February 4th, 2019 at 8:38 am and is filed under United States Wars. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.
News and Analyses, A Foreign Perspective »


text:
Serious Head and Hand Wounds Described by Bergdahl Searchers
The testimony came at a sentencing hearing for Bergdahl, who walked away from a remote post in Afghanistan and was held by Taliban allies for five years
By Jonathan Drew • Published October 25, 2017 • Updated on October 26, 2017 at 2:18 pm
Soldiers and an airman described a shattered hand and a head wound Thursday as prosecutors presented evidence that Army Sgt. Bowe Bergdahl's disappearance endangered those who searched for him.
The testimony came during the sentencing phase for Bergdahl, who faces up to life in prison after he pleaded guilty to desertion and misbehavior before the enemy. Bergdahl was held captive by Taliban allies for five years after abandoning his remote post in 2009.
Several witnesses described a search mission by U.S. and Afghan troops to comb two villages for information related to Bergdahl days after he disappeared.
Among the most vivid testimony came from Jonathan Morita, describing how his hand was shattered by a rocket-propelled grenade. He has since had multiple surgeries and is left without full use of his right hand.
"Right about here is where they sewed on my thumb where it was dangling off," he said, pointing to a picture of sutures displayed on a video monitor.
He said he can't bend his index finger and thumb and had to learn again how to write and brush his teeth with limited mobility in his dominant hand.
He was with a half-dozen U.S. troops that were accompanying a larger group of Afghan soldiers on the July 2009 search mission when they were ambushed by insurgents using small arms, machine guns and explosive projectiles. One rocket-propelled grenade hit Morita's rifle, shattering his hand. A second landed nearby, lodging shrapnel in his left elbow.
News from around the country and around the globe
news 7 mins ago
Detroit Museum Can Hold Onto Van Gogh Painting Disputed by Brazilian Collector, Federal Court Rules
politics 34 mins ago
Arizona's GOP Lawmakers Vote to Shield Themselves From Public Records Laws
"I just thought I was going to definitely die right there in Afghanistan," said Morita, who earned the rank of sergeant before leaving the Army.
After his injury during the firefight, he said he "pulled out a Bible, read a quick verse" and then grabbed a handgun to return fire before a medical helicopter arrived.
Nearby, Master Sgt. Mark Allen suffered a head wound during the ambush. National Guard Staff Sgt. Jason Walters testified that Allen was trying to make a radio call when Walters saw him get hit by a bullet.
"I watched just as a cloud of his blood came out the side of his head," Walters testified.
Walters became emotional when he described tending to his friend's wound.
"I grabbed a pressure bandage, and started. Sorry ma'am," he told a prosecutor before pausing and resuming testimony. "I started treating his wound ... telling him to hang on."
Allen now uses a wheelchair and is unable to speak, requiring assistance for everyday tasks such as getting out of bed. Walters said it was difficult visiting Allen in a hospital after the deployment.
"Seeing him like that is something I don't wish anyone would have to see," he said.
While Bergdahl acknowledged at his plea hearing that his actions triggered the search missions that resulted in the wounds, his lawyers argued Thursday that there's a limit to his responsibility for a lengthy chain of events including others' decisions and enemy fighters.
"Enemy forces were the direct cause of the horrific wounds to Master Sgt. Allen," said Army Maj. Oren Gleich, a defense lawyer.
Allen's wife is expected to testify Monday. Gleich told the judge he believes it's appropriate for her to testify to the wound's effects on Allen himself, but the defense could object if prosecutors steer her toward testimony that goes too far into the impact on his family. The judge, Col. Jeffery R. Nance, said he would have to wait and see what the objections were before weighing in on the defense's stance.
Bergdahl, a 31-year-old soldier from Hailey, Idaho, has said he was caged by his captors, kept in darkness and beaten, and tried to escape more than a dozen times before President Barack Obama brought him home in 2014 in a swap for five Taliban prisoners at Guantanamo Bay.
Donald TrumpAfghanistancommander in chiefGuantanamo Bay
Why Are Flags at Half-Staff Today? The Tragedy Behind the Proclamation
Lottery Scratcher Sold in San Pedro Makes SoCal Man $10 Million Richer
Big Rig Flips on 15 Freeway During a Day of Powerful Winds
Cancun Travel Warning Issued After Taxi Drivers Attack Uber Drivers and Passengers
Contact Us and Meet the News Team
KNBC Public Inspection File
KNBC Accessibility
KNBC Employment Information
Local Let Me Explain California US & World Coronavirus Pandemic Weather I-Team Investigations Consumer Submit a tip Sports Play The Challenge Politics NewsConference Entertainment & Lifestyle Entertainment News California Live The Scene Travel & Adventure NBC4 in the Community Life Connected
Meet the News Team Submit a Consumer Complaint Send us your photos and videos Contests Our Apps Newsletters Cozi TV


text:
Harnois v. University of Massachusetts at Dartmouth, No. 19-10705-RGS (D.Mass. Oct. 28, 2019)
John Harnois, a former graduate student at the University of Massachusetts Dartmouth, brought suit against UMass Dartmouth and a number of its employees for the alleged mishandling of a Title IX investigation, which saw Harnois sanctioned despite insufficient evidence to support the charges against him. Defendants moved to dismiss the complaint, the Court granted the motion in part and denied in part.
For his Title IX claims, Harnois alleged selective enforcement, erroneous outcome, deliberate indifference/hostile environment harassment, and retaliation. To make out a selective enforcement claim, Harnois was required to allege sufficient facts to support a reasonable inference that "the severity of the penalty and/or the decision to initiate the proceeding was affected by [Harnois's] gender." The Court held that Harnois met his burden by alleging that UMass Dartmouth officials threatened to get rid of "[his] kind with a Title IX investigation" if Harnois did not leave on his own. UMass Dartmouth officials are also alleged to have expressed the view that "sexual assaults are perpetrated [exclusively] by men." This, coupled with the threat of losing federal funding from an ongoing DoE investigation into possible Title IX violations at the University of Massachusetts, was sufficient to state a claim for selective enforcement.
For erroneous outcome, Harnois needed to cast some articulable doubt on the accuracy of the Title IX outcome, and show gender bias was a motivating factor. Here, Harnois alleged procedural flaws which included "the official solicitation of baseless complaints from Harnois's female fellow students." UMass Dartmouth was also alleged to have stated that they aim to assume the accuracy of what the victim is saying. Furthermore, Harnois was allegedly sanctioned without any finding of a disciplinary violation. Therefore, the erroneous outcome claim survived the motion to dismiss.
In order to support a procedural due process claim, Harnois "must allege first that [he] has a property interest as defined by state law, and, second, that [UMass Dartmouth], acting under color of state law, deprived [him] of that property interest without constitutionally adequate process." Here, Harnois alleged that he was not given adequate notice and opportunity to be heard. UMass Dartmouth never elaborated on the allegations against Harnois, and refused to provide him with a copy of the investigation report. Additionally, Harnois was on interim suspension throughout the investigation without any exigency to justify such suspension. Furthermore, despite determining there was insufficient evidence to support a finding of responsibility, UMass Dartmouth allegedly sanctioned Harnois and gave him no opportunity to appeal those sanctions. For these reasons, Harnois's procedural due process claim could move forward.
Harnois was also successful in pleading his Title IX retaliation, deliberate indifference, First Amendment retaliation, and Massachusetts Civil Rights Act claims. Lastly, Harnois's defamation claims against some of the individual defendants were allowed to proceed based on false statements made in a written letter to the UMass Dartmouth community, and to another university Harnois was seeking admission to.
CATEGORIES: Due Process, Selective Enforcement
Harnois v. University of Mass


Following on from yesterday's post about making Pull-to-Refresh more discoverable, today I've made it a bit more customisable. As you can see above, instead of the standard Android indeterminate spinner we have Andy spinning instead. This drawable is completely customisable by you.
That's not all as I've removed the rotating arrows, and added an effect so that the drawable (in this case Andy) is rotated based on how far you'll scrolled. It makes more sense when you use it.
If you'd like to test this, I've built a new version of the sample app for download here: http://bit.ly/Lou5lv (the GridView sample has the Andy custom drawable).