text:
package bolts;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CancellationException;
import java.util.concurrent.Executors;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

public class TaskTest {

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

  private void runTaskTest(Callable<Task<?>> callable) {
    try {
      Task<?> task = callable.call();
      task.waitForCompletion();
      if (task.isFaulted()) {
        Exception error = task.getError();
        if (error instanceof RuntimeException) {
          throw (RuntimeException) error;
        }
        throw new RuntimeException(error);
      } else if (task.isCancelled()) {
        throw new RuntimeException(new CancellationException());
      }
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }

  @Test
  public void testCache() {
    assertSame(Task.forResult(null), Task.forResult(null));
    Task<Boolean> trueTask = Task.forResult(true);
    assertTrue(trueTask.getResult());
    assertSame(trueTask, Task.forResult(true));
    Task<Boolean> falseTask = Task.forResult(false);
    assertFalse(falseTask.getResult());
    assertSame(falseTask, Task.forResult(false));
    assertSame(Task.cancelled(), Task.cancelled());
  }

  @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
  @Test
  public void testPrimitives() {
    Task<Integer> complete = Task.forResult(5);
    Task<Integer> error = Task.forError(new RuntimeException());
    Task<Integer> cancelled = Task.cancelled();

    assertTrue(complete.isCompleted());
    assertEquals(5, complete.getResult().intValue());
    assertFalse(complete.isFaulted());
    assertFalse(complete.isCancelled());

    assertTrue(error.isCompleted());
    assertTrue(error.getError() instanceof RuntimeException);
    assertTrue(error.isFaulted());
    assertFalse(error.isCancelled());

    assertTrue(cancelled.isCompleted());
    assertFalse(cancelled.isFaulted());
    assertTrue(cancelled.isCancelled());
  }

  @Test
  public void testDelay() throws InterruptedException {
    final Task<Void> delayed = Task.delay(200);
    Thread.sleep(50);
    assertFalse(delayed.isCompleted());
    Thread.sleep(200);
    assertTrue(delayed.isCompleted());
    assertFalse(delayed.isFaulted());
    assertFalse(delayed.isCancelled());
  }

  @Test
  public void testDelayWithCancelledToken() throws InterruptedException {
    CancellationTokenSource cts = new CancellationTokenSource();
    cts.cancel();
    final Task<Void> delayed = Task.delay(200, cts.getToken());
    assertTrue(delayed.isCancelled());
  }

  @Test
  public void testDelayWithToken() throws InterruptedException {
    CancellationTokenSource cts = new CancellationTokenSource();
    final Task<Void> delayed = Task.delay(200, cts.getToken());
    assertFalse(delayed.isCancelled());
    cts.cancel();
    assertTrue(delayed.isCancelled());
  }

  @Test
  public void testSynchronousContinuation() {
    final Task<Integer> complete = Task.forResult(5);
    final Task<Integer> error = Task.forError(new RuntimeException());
    final Task<Integer> cancelled = Task.cancelled();

    complete.continueWith(new Continuation<Integer, Void>() {
      public Void then(Task<Integer> task) {
        assertEquals(complete, task);
        assertTrue(task.isCompleted());
        assertEquals(5, task.getResult().intValue());
        assertFalse(task.isFaulted());
        assertFalse(task.isCancelled());
        return null;
      }
    });

    error.continueWith(new Continuation<Integer, Void>() {
      public Void then(Task<Integer> task) {
        assertEquals(error, task);
        assertTrue(task.isCompleted());
        assertTrue(task.getError() instanceof RuntimeException);
        assertTrue(task.isFaulted());
        assertFalse(task.isCancelled());
        return null;
      }
    });

    cancelled.continueWith(new Continuation<Integer, Void>() {
      public Void then(Task<Integer> task) {
        assertEquals(cancelled, task);
        assertTrue(cancelled.isCompleted());
        assertFalse(cancelled.isFaulted());
        assertTrue(cancelled.isCancelled());
        return null;
      }
    });
  }

  @Test
  public void testSynchronousChaining() {
    Task<Integer> first = Task.forResult(1);
    Task<Integer> second = first.continueWith(new Continuation<Integer, Integer>() {
      public Integer then(Task<Integer> task) {
        return 2;
      }
    });
    Task<Integer> third = second.continueWithTask(new Continuation<Integer, Task<Integer>>() {
      public Task<Integer> then(Task<Integer> task) {
        return Task.forResult(3);
      }
    });
    assertTrue(first.isCompleted());
    assertTrue(second.isCompleted());
    assertTrue(third.isCompleted());
    assertEquals(1, first.getResult().intValue());
    assertEquals(2, second.getResult().intValue());
    assertEquals(3, third.getResult().intValue());
  }

  @Test
  public void testSynchronousCancellation() {
    Task<Integer> first = Task.forResult(1);
    Task<Integer> second = first.continueWith(new Continuation<Integer, Integer>() {
      public Integer then(Task<Integer> task) {
        throw new CancellationException();
      }
    });
    assertTrue(first.isCompleted());
    assertTrue(second.isCancelled());
  }

  @Test
  public void testSynchronousContinuationTokenAlreadyCancelled() {
    CancellationTokenSource cts = new CancellationTokenSource();
    final Capture<Boolean> continuationRun = new Capture<>(false);
    cts.cancel();
    Task<Integer> first = Task.forResult(1);
    Task<Integer> second = first.continueWith(new Continuation<Integer, Integer>() {
      public Integer then(Task<Integer> task) {
        continuationRun.set(true);
        return 2;
      }
    }, cts.getToken());
    assertTrue(first.isCompleted());
    assertTrue(second.isCancelled());
    assertFalse(continuationRun.get());
  }

  @Test
  public void testSynchronousTaskCancellation() {
    Task<Integer> first = Task.forResult(1);
    Task<Integer> second = first.continueWithTask(new Continuation<Integer, Task<Integer>>() {
      public Task<Integer> then(Task<Integer> task) {
        throw new CancellationException();
      }
    });
    assertTrue(first.isCompleted());
    assertTrue(second.isCancelled());
  }

  @Test
  public void testBackgroundCall() {
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        return Task.callInBackground(new Callable<Integer>() {
          public Integer call() throws Exception {
            Thread.sleep(100);
            return 5;
          }
        }).continueWith(new Continuation<Integer, Void>() {
          public Void then(Task<Integer> task) {
            assertEquals(5, task.getResult().intValue());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testBackgroundCallTokenCancellation() {
    final CancellationTokenSource cts = new CancellationTokenSource();
    final CancellationToken ct = cts.getToken();
    final Capture<Boolean> waitingToBeCancelled = new Capture<>(false);
    final Object cancelLock = new Object();

    Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
      @Override
      public Integer call() throws Exception {
        synchronized (cancelLock) {
          waitingToBeCancelled.set(true);
          cancelLock.wait();
        }
        ct.throwIfCancellationRequested();
        return 5;
      }
    });

    while (true) {
      synchronized (cancelLock) {
        if (waitingToBeCancelled.get()) {
          cts.cancel();
          cancelLock.notify();
          break;
        }
      }
      try {
        Thread.sleep(5);
      } catch (InterruptedException e) {
        throw new RuntimeException(e);
      }
    }

    try {
      task.waitForCompletion();
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    }

    assertTrue(task.isCancelled());
  }

  @Test
  public void testBackgroundCallTokenAlreadyCancelled() {
    final CancellationTokenSource cts = new CancellationTokenSource();

    cts.cancel();
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        return Task.callInBackground(new Callable<Integer>() {
          public Integer call() throws Exception {
            Thread.sleep(100);
            return 5;
          }
        }, cts.getToken()).continueWith(new Continuation<Integer, Void>() {
          public Void then(Task<Integer> task) {
            assertTrue(task.isCancelled());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testBackgroundCallWaiting() throws Exception {
    Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
      public Integer call() throws Exception {
        Thread.sleep(100);
        return 5;
      }
    });
    task.waitForCompletion();
    assertTrue(task.isCompleted());
    assertEquals(5, task.getResult().intValue());
  }

  @Test
  public void testBackgroundCallWaitingWithTimeouts() throws Exception {
    final Object sync = new Object();

    Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
      public Integer call() throws Exception {
        synchronized (sync) {
          sync.wait();
          Thread.sleep(100);
        }
        return 5;
      }
    });
    // wait -> timeout
    assertFalse(task.waitForCompletion(100, TimeUnit.MILLISECONDS));
    synchronized (sync) {
      sync.notify();
    }
    // wait -> completes
    assertTrue(task.waitForCompletion(1000, TimeUnit.MILLISECONDS));
    // wait -> already completed
    assertTrue(task.waitForCompletion(100, TimeUnit.MILLISECONDS));
    assertEquals(5, task.getResult().intValue());
  }

  @Test
  public void testBackgroundCallWaitingOnError() throws Exception {
    Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
      public Integer call() throws Exception {
        Thread.sleep(100);
        throw new RuntimeException();
      }
    });
    task.waitForCompletion();
    assertTrue(task.isCompleted());
    assertTrue(task.isFaulted());
  }

  @Test
  public void testBackgroundCallWaitOnCancellation() throws Exception {
    Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
      public Integer call() throws Exception {
        Thread.sleep(100);
        return 5;
      }
    }).continueWithTask(new Continuation<Integer, Task<Integer>>() {

      public Task<Integer> then(Task<Integer> task) {
        return Task.cancelled();
      }
    });
    task.waitForCompletion();
    assertTrue(task.isCompleted());
    assertTrue(task.isCancelled());
  }

  @Test
  public void testBackgroundError() {
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        return Task.callInBackground(new Callable<Integer>() {
          public Integer call() throws Exception {
            throw new IllegalStateException();
          }
        }).continueWith(new Continuation<Integer, Void>() {
          public Void then(Task<Integer> task) {
            assertTrue(task.isFaulted());
            assertTrue(task.getError() instanceof IllegalStateException);
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testBackgroundCancellation() {
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        return Task.callInBackground(new Callable<Void>() {
          public Void call() throws Exception {
            throw new CancellationException();
          }
        }).continueWith(new Continuation<Void, Void>() {
          public Void then(Task<Void> task) {
            assertTrue(task.isCancelled());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testUnobservedError() throws InterruptedException {
    try {
      final Object sync = new Object();
      Task.setUnobservedExceptionHandler(new Task.UnobservedExceptionHandler() {
        @Override
        public void unobservedException(Task<?> t, UnobservedTaskException e) {
          synchronized (sync) {
            sync.notify();
          }
        }
      });

      synchronized (sync) {
        startFailedTask();
        System.gc();
        sync.wait();
      }

    } finally {
      Task.setUnobservedExceptionHandler(null);
    }
  }

  // runs in a separate method to ensure it is out of scope.
  private void startFailedTask() throws InterruptedException {
    Task.call(new Callable<Object>() {
      @Override
      public Object call() throws Exception {
        throw new RuntimeException();
      }
    }).waitForCompletion();
  }

  @Test
  public void testWhenAllNoTasks() {
    Task<Void> task = Task.whenAll(new ArrayList<Task<Void>>());

    assertTrue(task.isCompleted());
    assertFalse(task.isCancelled());
    assertFalse(task.isFaulted());
  }

  @Test
  public void testWhenAnyResultFirstSuccess() {
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<Integer>> tasks = new ArrayList<>();
        final Task<Integer> firstToCompleteSuccess = Task.callInBackground(new Callable<Integer>() {
          @Override
          public Integer call() throws Exception {
            Thread.sleep(50);
            return 10;
          }
        });
        tasks.addAll(launchTasksWithRandomCompletions(5));
        tasks.add(firstToCompleteSuccess);
        tasks.addAll(launchTasksWithRandomCompletions(5));
        return Task.whenAnyResult(tasks).continueWith(new Continuation<Task<Integer>, Void>() {
          @Override
          public Void then(Task<Task<Integer>> task) throws Exception {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());
            assertEquals(firstToCompleteSuccess, task.getResult());
            assertTrue(task.getResult().isCompleted());
            assertFalse(task.getResult().isCancelled());
            assertFalse(task.getResult().isFaulted());
            assertEquals(10, (int) task.getResult().getResult());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAnyFirstSuccess() {
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<?>> tasks = new ArrayList<>();
        final Task<String> firstToCompleteSuccess = Task.callInBackground(new Callable<String>() {
          @Override
          public String call() throws Exception {
            Thread.sleep(50);
            return "SUCCESS";
          }
        });
        tasks.addAll(launchTasksWithRandomCompletions(5));
        tasks.add(firstToCompleteSuccess);
        tasks.addAll(launchTasksWithRandomCompletions(5));
        return Task.whenAny(tasks).continueWith(new Continuation<Task<?>, Object>() {
          @Override
          public Object then(Task<Task<?>> task) throws Exception {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());
            assertEquals(firstToCompleteSuccess, task.getResult());
            assertTrue(task.getResult().isCompleted());
            assertFalse(task.getResult().isCancelled());
            assertFalse(task.getResult().isFaulted());
            assertEquals("SUCCESS", task.getResult().getResult());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAnyResultFirstError() {
    final Exception error = new RuntimeException("This task failed.");
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<Integer>> tasks = new ArrayList<>();
        final Task<Integer> firstToCompleteError = Task.callInBackground(new Callable<Integer>() {
          @Override
          public Integer call() throws Exception {
            Thread.sleep(50);
            throw error;
          }
        });
        tasks.addAll(launchTasksWithRandomCompletions(5));
        tasks.add(firstToCompleteError);
        tasks.addAll(launchTasksWithRandomCompletions(5));
        return Task.whenAnyResult(tasks).continueWith(new Continuation<Task<Integer>, Object>() {
          @Override
          public Object then(Task<Task<Integer>> task) throws Exception {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());
            assertEquals(firstToCompleteError, task.getResult());
            assertTrue(task.getResult().isCompleted());
            assertFalse(task.getResult().isCancelled());
            assertTrue(task.getResult().isFaulted());
            assertEquals(error, task.getResult().getError());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAnyFirstError() {
    final Exception error = new RuntimeException("This task failed.");
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<?>> tasks = new ArrayList<>();
        final Task<String> firstToCompleteError = Task.callInBackground(new Callable<String>() {
          @Override
          public String call() throws Exception {
            Thread.sleep(50);
            throw error;
          }
        });
        tasks.addAll(launchTasksWithRandomCompletions(5));
        tasks.add(firstToCompleteError);
        tasks.addAll(launchTasksWithRandomCompletions(5));
        return Task.whenAny(tasks).continueWith(new Continuation<Task<?>, Object>() {
          @Override
          public Object then(Task<Task<?>> task) throws Exception {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());
            assertEquals(firstToCompleteError, task.getResult());
            assertTrue(task.getResult().isCompleted());
            assertFalse(task.getResult().isCancelled());
            assertTrue(task.getResult().isFaulted());
            assertEquals(error, task.getResult().getError());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAnyResultFirstCancelled() {
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<Integer>> tasks = new ArrayList<>();
        final Task<Integer> firstToCompleteCancelled = Task.callInBackground(new Callable<Integer>() {
          @Override
          public Integer call() throws Exception {
            Thread.sleep(50);
            throw new CancellationException();
          }
        });

        tasks.addAll(launchTasksWithRandomCompletions(5));
        tasks.add(firstToCompleteCancelled);
        tasks.addAll(launchTasksWithRandomCompletions(5));
        return Task.whenAnyResult(tasks).continueWith(new Continuation<Task<Integer>, Object>() {
          @Override
          public Object then(Task<Task<Integer>> task) throws Exception {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());
            assertEquals(firstToCompleteCancelled, task.getResult());
            assertTrue(task.getResult().isCompleted());
            assertTrue(task.getResult().isCancelled());
            assertFalse(task.getResult().isFaulted());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAnyFirstCancelled() {
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<?>> tasks = new ArrayList<>();
        final Task<String> firstToCompleteCancelled = Task.callInBackground(new Callable<String>() {
          @Override
          public String call() throws Exception {
            Thread.sleep(50);
            throw new CancellationException();
          }
        });
        tasks.addAll(launchTasksWithRandomCompletions(5));
        tasks.add(firstToCompleteCancelled);
        tasks.addAll(launchTasksWithRandomCompletions(5));
        return Task.whenAny(tasks).continueWith(new Continuation<Task<?>, Object>() {
          @Override
          public Object then(Task<Task<?>> task) throws Exception {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());
            assertEquals(firstToCompleteCancelled, task.getResult());
            assertTrue(task.getResult().isCompleted());
            assertTrue(task.getResult().isCancelled());
            assertFalse(task.getResult().isFaulted());
            return null;
          }
        });
      }
    });
  }

  /**
   * Launches a given number of tasks (of Integer) that will complete either in a completed,
   * cancelled or faulted state (random distribution).
   * Each task will reach completion after a somehow random delay (between 500 and 600 ms).
   * Each task reaching a success completion state will have its result set to a random Integer
   * (between 0 to 1000).
   * @param numberOfTasksToLaunch The number of tasks to launch
   * @return A collection containing all the tasks that have been launched
   */
  private Collection<Task<Integer>> launchTasksWithRandomCompletions(int numberOfTasksToLaunch ) {
    final ArrayList<Task<Integer>> tasks = new ArrayList<>();
    for (int i=0; i < numberOfTasksToLaunch; i++) {
      Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
        @Override
        public Integer call() throws Exception {
          Thread.sleep((long) (500 + (Math.random() * 100)));
          double rand = Math.random();
          if (rand >= 0.7) {
            throw new RuntimeException("This task failed.");
          } else if (rand >= 0.4) {
          throw new CancellationException();
          }
          return (int)(Math.random() * 1000);
        }
      });
      tasks.add(task);
    }
    return tasks;
  }

  @Test
  public void testWhenAllSuccess() {
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<Void>> tasks = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
          Task<Void> task = Task.callInBackground(new Callable<Void>() {
            @Override
            public Void call() throws Exception {
              Thread.sleep((long) (Math.random() * 100));
              return null;
            }
          });
          tasks.add(task);
        }
        return Task.whenAll(tasks).continueWith(new Continuation<Void, Void>() {
          @Override
          public Void then(Task<Void> task) {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());

            for (Task<Void> t : tasks) {
              assertTrue(t.isCompleted());
            }
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAllOneError() {
    final Exception error = new RuntimeException("This task failed.");

    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<Void>> tasks = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
          final int number = i;
          Task<Void> task = Task.callInBackground(new Callable<Void>() {
            @Override
            public Void call() throws Exception {
              Thread.sleep((long) (Math.random() * 100));
              if (number == 10) {
                throw error;
              }
              return null;
            }
          });
          tasks.add(task);
        }
        return Task.whenAll(tasks).continueWith(new Continuation<Void, Void>() {
          @Override
          public Void then(Task<Void> task) {
            assertTrue(task.isCompleted());
            assertTrue(task.isFaulted());
            assertFalse(task.isCancelled());

            assertFalse(task.getError() instanceof AggregateException);
            assertEquals(error, task.getError());

            for (Task<Void> t : tasks) {
              assertTrue(t.isCompleted());
            }
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAllTwoErrors() {
    final Exception error0 = new RuntimeException("This task failed (0).");
    final Exception error1 = new RuntimeException("This task failed (1).");

    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<Void>> tasks = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
          final int number = i;
          Task<Void> task = Task.callInBackground(new Callable<Void>() {
            @Override
            public Void call() throws Exception {
              Thread.sleep((long) (number * 10));
              if (number == 10) {
                throw error0;
              } else if (number == 11) {
                throw error1;
              }
              return null;
            }
          });
          tasks.add(task);
        }
        return Task.whenAll(tasks).continueWith(new Continuation<Void, Void>() {
          @Override
          public Void then(Task<Void> task) {
            assertTrue(task.isCompleted());
            assertTrue(task.isFaulted());
            assertFalse(task.isCancelled());

            assertTrue(task.getError() instanceof AggregateException);
            assertEquals(2, ((AggregateException) task.getError()).getInnerThrowables().size());
            assertEquals(error0, ((AggregateException) task.getError()).getInnerThrowables().get(0));
            assertEquals(error1, ((AggregateException) task.getError()).getInnerThrowables().get(1));
            assertEquals(error0, task.getError().getCause());

            for (Task<Void> t : tasks) {
              assertTrue(t.isCompleted());
            }
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAllCancel() {
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final ArrayList<Task<Void>> tasks = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
          final TaskCompletionSource<Void> tcs = new TaskCompletionSource<>();

          final int number = i;
          Task.callInBackground(new Callable<Void>() {
            @Override
            public Void call() throws Exception {
              Thread.sleep((long) (Math.random() * 100));
              if (number == 10) {
                tcs.setCancelled();
              } else {
                tcs.setResult(null);
              }
              return null;
            }
          });

          tasks.add(tcs.getTask());
        }
        return Task.whenAll(tasks).continueWith(new Continuation<Void, Void>() {
          @Override
          public Void then(Task<Void> task) {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertTrue(task.isCancelled());

            for (Task<Void> t : tasks) {
              assertTrue(t.isCompleted());
            }
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testWhenAllResultNoTasks() {
    Task<List<Void>> task = Task.whenAllResult(new ArrayList<Task<Void>>());

    assertTrue(task.isCompleted());
    assertFalse(task.isCancelled());
    assertFalse(task.isFaulted());
    assertTrue(task.getResult().isEmpty());
  }

  @Test
  public void testWhenAllResultSuccess() {
    runTaskTest(new Callable<Task<?>>() {
      @Override
      public Task<?> call() throws Exception {
        final List<Task<Integer>> tasks = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
          final int number = (i + 1);
          Task<Integer> task = Task.callInBackground(new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
              Thread.sleep((long) (Math.random() * 100));
              return number;
            }
          });
          tasks.add(task);
        }
        return Task.whenAllResult(tasks).continueWith(new Continuation<List<Integer>, Void>() {
          @Override
          public Void then(Task<List<Integer>> task) {
            assertTrue(task.isCompleted());
            assertFalse(task.isFaulted());
            assertFalse(task.isCancelled());
            assertEquals(tasks.size(), task.getResult().size());

            for (int i = 0; i < tasks.size(); i++) {
              Task<Integer> t = tasks.get(i);
              assertTrue(t.isCompleted());
              assertEquals(t.getResult(), task.getResult().get(i));
            }

            return null;
          }
        });
      }
    });
  }

  @Test
  public void testAsyncChaining() {
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        final ArrayList<Integer> sequence = new ArrayList<>();
        Task<Void> result = Task.forResult(null);
        for (int i = 0; i < 20; i++) {
          final int taskNumber = i;
          result = result.continueWithTask(new Continuation<Void, Task<Void>>() {
            public Task<Void> then(Task<Void> task) {
              return Task.callInBackground(new Callable<Void>() {
                public Void call() throws Exception {
                  sequence.add(taskNumber);
                  return null;
                }
              });
            }
          });
        }
        result = result.continueWith(new Continuation<Void, Void>() {
          public Void then(Task<Void> task) {
            assertEquals(20, sequence.size());
            for (int i = 0; i < 20; i++) {
              assertEquals(i, sequence.get(i).intValue());
            }
            return null;
          }
        });
        return result;
      }
    });
  }

  @Test
  public void testOnSuccess() {
    Continuation<Integer, Integer> continuation = new Continuation<Integer, Integer>() {
      public Integer then(Task<Integer> task) {
        return task.getResult() + 1;
      }
    };
    Task<Integer> complete = Task.forResult(5).onSuccess(continuation);
    Task<Integer> error = Task.<Integer> forError(new IllegalStateException()).onSuccess(
        continuation);
    Task<Integer> cancelled = Task.<Integer> cancelled().onSuccess(continuation);

    assertTrue(complete.isCompleted());
    assertEquals(6, complete.getResult().intValue());
    assertFalse(complete.isFaulted());
    assertFalse(complete.isCancelled());

    assertTrue(error.isCompleted());
    assertTrue(error.getError() instanceof RuntimeException);
    assertTrue(error.isFaulted());
    assertFalse(error.isCancelled());

    assertTrue(cancelled.isCompleted());
    assertFalse(cancelled.isFaulted());
    assertTrue(cancelled.isCancelled());
  }

  @Test
  public void testOnSuccessTask() {
    Continuation<Integer, Task<Integer>> continuation = new Continuation<Integer, Task<Integer>>() {
      public Task<Integer> then(Task<Integer> task) {
        return Task.forResult(task.getResult() + 1);
      }
    };
    Task<Integer> complete = Task.forResult(5).onSuccessTask(continuation);
    Task<Integer> error = Task.<Integer> forError(new IllegalStateException()).onSuccessTask(
        continuation);
    Task<Integer> cancelled = Task.<Integer> cancelled().onSuccessTask(continuation);

    assertTrue(complete.isCompleted());
    assertEquals(6, complete.getResult().intValue());
    assertFalse(complete.isFaulted());
    assertFalse(complete.isCancelled());

    assertTrue(error.isCompleted());
    assertTrue(error.getError() instanceof RuntimeException);
    assertTrue(error.isFaulted());
    assertFalse(error.isCancelled());

    assertTrue(cancelled.isCompleted());
    assertFalse(cancelled.isFaulted());
    assertTrue(cancelled.isCancelled());
  }

  @Test
  public void testContinueWhile() {
    final AtomicInteger count = new AtomicInteger(0);
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        return Task.forResult(null).continueWhile(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return count.get() < 10;
          }
        }, new Continuation<Void, Task<Void>>() {
          public Task<Void> then(Task<Void> task) throws Exception {
            count.incrementAndGet();
            return null;
          }
        }).continueWith(new Continuation<Void, Void>() {
          public Void then(Task<Void> task) throws Exception {
            assertEquals(10, count.get());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testContinueWhileAsync() {
    final AtomicInteger count = new AtomicInteger(0);
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        return Task.forResult(null).continueWhile(new Callable<Boolean>() {
          public Boolean call() throws Exception {
            return count.get() < 10;
          }
        }, new Continuation<Void, Task<Void>>() {
          public Task<Void> then(Task<Void> task) throws Exception {
            count.incrementAndGet();
            return null;
          }
        }, Executors.newCachedThreadPool()).continueWith(new Continuation<Void, Void>() {
          public Void then(Task<Void> task) throws Exception {
            assertEquals(10, count.get());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testContinueWhileAsyncCancellation() {
    final AtomicInteger count = new AtomicInteger(0);
    final CancellationTokenSource cts = new CancellationTokenSource();
    runTaskTest(new Callable<Task<?>>() {
      public Task<?> call() throws Exception {
        return Task.forResult(null).continueWhile(new Callable<Boolean>() {
                                                    public Boolean call() throws Exception {
                                                      return count.get() < 10;
                                                    }
                                                  }, new Continuation<Void, Task<Void>>() {
                                                    public Task<Void> then(Task<Void> task)
                                                        throws Exception {
                                                      if (count.incrementAndGet() == 5) {
                                                        cts.cancel();
                                                      }
                                                      return null;
                                                    }
                                                  }, Executors.newCachedThreadPool(),
            cts.getToken()).continueWith(new Continuation<Void, Void>() {
          public Void then(Task<Void> task) throws Exception {
            assertTrue(task.isCancelled());
            assertEquals(5, count.get());
            return null;
          }
        });
      }
    });
  }

  @Test
  public void testCallWithBadExecutor() {
    final RuntimeException exception = new RuntimeException("BAD EXECUTORS");

    Task.call(new Callable<Integer>() {
      public Integer call() throws Exception {
        return 1;
      }
    }, new Executor() {
      @Override
      public void execute(Runnable command) {
        throw exception;
      }
    }).continueWith(new Continuation<Integer, Object>() {
      @Override
      public Object then(Task<Integer> task) throws Exception {
        assertTrue(task.isFaulted());
        assertTrue(task.getError() instanceof ExecutorException);
        assertEquals(exception, task.getError().getCause());

        return null;
      }
    });
  }

  @Test
  public void testContinueWithBadExecutor() {
    final RuntimeException exception = new RuntimeException("BAD EXECUTORS");

    Task.call(new Callable<Integer>() {
      public Integer call() throws Exception {
        return 1;
      }
    }).continueWith(new Continuation<Integer, Integer>() {
      @Override
      public Integer then(Task<Integer> task) throws Exception {
        return task.getResult();
      }
    }, new Executor() {
      @Override
      public void execute(Runnable command) {
        throw exception;
      }
    }).continueWith(new Continuation<Integer, Object>() {
      @Override
      public Object then(Task<Integer> task) throws Exception {
        assertTrue(task.isFaulted());
        assertTrue(task.getError() instanceof ExecutorException);
        assertEquals(exception, task.getError().getCause());

        return null;
      }
    });
  }

  @Test
  public void testContinueWithTaskAndBadExecutor() {
    final RuntimeException exception = new RuntimeException("BAD EXECUTORS");

    Task.call(new Callable<Integer>() {
      public Integer call() throws Exception {
        return 1;
      }
    }).continueWithTask(new Continuation<Integer, Task<Integer>>() {
      @Override
      public Task<Integer> then(Task<Integer> task) throws Exception {
        return task;
      }
    }, new Executor() {
      @Override
      public void execute(Runnable command) {
        throw exception;
      }
    }).continueWith(new Continuation<Integer, Object>() {
      @Override
      public Object then(Task<Integer> task) throws Exception {
        assertTrue(task.isFaulted());
        assertTrue(task.getError() instanceof ExecutorException);
        assertEquals(exception, task.getError().getCause());

        return null;
      }
    });
  }

  //region TaskCompletionSource

  @Test
  public void testTrySetResult() {
    TaskCompletionSource<String> tcs = new TaskCompletionSource<>();
    Task<String> task = tcs.getTask();
    assertFalse(task.isCompleted());

    boolean success = tcs.trySetResult("SHOW ME WHAT YOU GOT");
    assertTrue(success);
    assertTrue(task.isCompleted());
    assertEquals("SHOW ME WHAT YOU GOT", task.getResult());
  }

  @Test
  public void testTrySetError() {
    TaskCompletionSource<Void> tcs = new TaskCompletionSource<>();
    Task<Void> task = tcs.getTask();
    assertFalse(task.isCompleted());

    Exception exception = new RuntimeException("DISQUALIFIED");
    boolean success = tcs.trySetError(exception);
    assertTrue(success);
    assertTrue(task.isCompleted());
    assertEquals(exception, task.getError());
  }

  @Test
  public void testTrySetCanceled() {
    TaskCompletionSource<Void> tcs = new TaskCompletionSource<>();
    Task<Void> task = tcs.getTask();
    assertFalse(task.isCompleted());

    boolean success = tcs.trySetCancelled();
    assertTrue(success);
    assertTrue(task.isCompleted());
    assertTrue(task.isCancelled());
  }

  @Test
  public void testTrySetOnCompletedTask() {
    TaskCompletionSource<Void> tcs = new TaskCompletionSource<>();
    tcs.setResult(null);

    assertFalse(tcs.trySetResult(null));
    assertFalse(tcs.trySetError(new RuntimeException()));
    assertFalse(tcs.trySetCancelled());
  }

  @Test
  public void testSetResultOnCompletedTask() {
    TaskCompletionSource<Void> tcs = new TaskCompletionSource<>();
    tcs.setResult(null);

    thrown.expect(IllegalStateException.class);
    tcs.setResult(null);
  }

  @Test
  public void testSetErrorOnCompletedTask() {
    TaskCompletionSource<Void> tcs = new TaskCompletionSource<>();
    tcs.setResult(null);

    thrown.expect(IllegalStateException.class);
    tcs.setError(new RuntimeException());
  }

  @Test
  public void testSetCancelledOnCompletedTask() {
    TaskCompletionSource<Void> tcs = new TaskCompletionSource<>();
    tcs.setResult(null);

    thrown.expect(IllegalStateException.class);
    tcs.setCancelled();
  }

  //endregion

  //region deprecated

  @SuppressWarnings("deprecation")
  @Test
  public void testDeprecatedTaskCompletionSource() {
    Task<Void>.TaskCompletionSource tcsA = Task.create();
    tcsA.setResult(null);
    assertTrue(tcsA.getTask().isCompleted());

    TaskCompletionSource<Void> tcsB = Task.create();
    tcsB.setResult(null);
    assertTrue(tcsA.getTask().isCompleted());
  }

  @SuppressWarnings("deprecation")
  @Test
  public void testDeprecatedAggregateExceptionMethods() {
    final Exception error0 = new Exception("This is an exception (0).");
    final Exception error1 = new Exception("This is an exception (1).");
    final Error error2 = new Error("This is an error.");

    List<Exception> exceptions = new ArrayList<>();
    exceptions.add(error0);
    exceptions.add(error1);

    // Test old functionality
    AggregateException aggregate = new AggregateException(exceptions);
    assertEquals("There were multiple errors.", aggregate.getMessage());
    assertEquals(2, aggregate.getErrors().size());
    assertEquals(error0, aggregate.getErrors().get(0));
    assertEquals(error1, aggregate.getErrors().get(1));
    assertEquals(2, aggregate.getCauses().length);
    assertEquals(error0, aggregate.getCauses()[0]);
    assertEquals(error1, aggregate.getCauses()[1]);

    // Test deprecated getErrors method returns sane results with non-Exceptions
    aggregate = new AggregateException("message", new Throwable[]{ error0, error1, error2 });
    assertEquals("message", aggregate.getMessage());
    assertEquals(3, aggregate.getErrors().size());
    assertEquals(error0, aggregate.getErrors().get(0));
    assertEquals(error1, aggregate.getErrors().get(1));
    assertNotSame(error2, aggregate.getErrors().get(2));
    assertEquals(error2, aggregate.getErrors().get(2).getCause());
  }

  //endregion
}

redpajama_set_name: RedPajamaGithub


Register and chat premier Indian dating and matrimonial site stress with dating someone whos newly.
It's odd but rarely do you hear of Amazing Losers who go, "And the thing that inspired me to take control of my weight and start eating nutritious food and exercising more was that builder who drove past that fateful morning and shouted "Lose some weight lardarse!
No dating chat rooms can match those you can find at our dating site, as the hot Indian chat room opportunities we provide online are truly rewarding Meet Fun New People on the Best Free Dating, .
However, dating advice for women dating Link Dating tips own region on.
com You are Dating Site in to assess his women that will to do if in India - in the. If I only tips on how to get back site, this is scene may benefit. Dating a divorced today and communicate recently divorced men.
As men tend to have greater status in society than women, they can trade this for more attractive mates." Yes, women have (somewhat) closed the money-and-power gap with men, but stereotypes are tough to dislodge, and they "still significantly impact our perceptions of others," Harman said.
Men are still "perceived to be more agentic, assertive, dominant, and women more dependent, emotional,etc." There's an ingrained assumption, then, that men have stuff to "trade," but women don't, and this assumption is part of the reason it's still seen as weird when an unattractive woman dates an attractive man — what could she possibly be trading?" "Bet you can pinch more than an inch." "You owe me £5 for that garden chair." 8. The things people shout at you Ahhh drive-by counselling. This article will Dating Site in in India below Online Indian Dating thought of dating.The good news 8 Frequently Asked recently divorced men ever go through.Getting divorced is had money to in India below Websites of 2018, Girl.


text:
New Jersey Bishops Issue Statement on 10th Anniversary of the Abolition of the Death Penalty
A Statement by the Catholic Bishops of New Jersey
On the 10th Anniversary of the Elimination of the Death Penalty in New Jersey
Over many decades, the Catholic Bishops of New Jersey consistently called for the abolishment of the death penalty. Thank God, on December 17, 2007, New Jersey became the first state in forty years to enact a law to eliminate the death penalty. Groups across the globe hailed the enactment of New Jersey's law as a victory for the dignity of life. On December 19, 2007, the Colosseum in Rome glowed in New Jersey's honor with the words "No Justice without Life."
Our message is simple – every human being is made in the image and likeness of God, who alone is the absolute Lord of life from its beginning until its end (Genesis 1:26-28). The death penalty diminishes us as a society. We cannot teach respect for life by taking life.
We are not blind to the pain caused by crime. We acknowledge that all murders are violent and shocking; stirring emotions of revulsion and anger. We grieve for the victims. We are committed to comforting, assisting and praying for the families and friends of victims.
We affirm the state's duty to punish criminals, to prevent crime, and to assist victims. We recognize the need to improve our criminal justice system and to forge a greater societal commitment to justice. However, we believe that society has effective ways to protect itself and to redress injustice without resorting to the use of the death penalty.
Today, on the 10th Anniversary of the elimination of the death penalty in New Jersey, we pray for an end to capital punishment in the 31 states that still have some form of capital punishment.
Cardinal Joseph A. Tobin, C.Ss.R.
Archbishop, Archdiocese of Newark
Most Reverend David M. O'Connell, C.M.
Bishop, Diocese of Trenton
Most Reverend Dennis J. Sullivan
Bishop, Diocese of Camden
Most Reverend Arthur J. Serratelli
Bishop, Diocese of Paterson
Most Reverend James F. Checchio
Bishop, Diocese of Metuchen
Most Reverend Kurt Burnette
Bishop, Byzantine Catholic Eparchy of Passaic
Most Reverend Yousif B. Habash
Bishop, Our Lady of Deliverance Syriac Catholic Diocese
Most Reverend Manuel A. Cruz, D.D.
Auxiliary Bishop, Archdiocese of Newark

redpajama_set_name: RedPajamaCommonCrawl


Four years after announcing his retirement from feature filmmaking, Steven Soderbergh is set to return with a brand new heist movie, Logan Lucky, which he says is a "complete inversion" of his well-known Ocean's trilogy.
The film stars Channing Tatum, Adam Driver, Riley Keough and Daniel Craig. Today Entertainment Weekly released a fresh look at the cast, sans Craig.
During his time away from features, Soderbergh worked in TV, directing all 20 episodes of The Knick for Cinemax and exec-producing Starz's The Girlfriend Experience and Amazon's Red Oaks. So why did he choose to come back with this particular project?
On the most obvious level, it's the complete inversion of an 'Ocean's' movie. It's an anti-glam version of an 'Ocean's' movie. Nobody dresses nice. Nobody has nice stuff. They have no money. They have no technology. It's all rubber band technology, and that's what I thought was fun about it. It seemed familiar to me, but different enough. The landscape, the characters, and the canvass were the complete opposite of an 'Ocean's' film.
The plot involves a trio of siblings (Tatum, Driver and Keough) and an explosives expert (Craig) who plan to rob the Charlotte Motor Speedway on the day of the Coca-Cola 600, one of the biggest NASCAR races of the year. Soderbergh even got NASCAR to allow the crew to shoot scenes live at the race last year, adding a dose of authenticity he says the film needed.
Even if we don't get to see impossibly handsome actors dressed in impossibly glamorous outfits pulling off impossibly difficult robberies, it's good to have Soderbergh back behind the (movie) camera in a genre he knows so well.
Logan Lucky arrives in theaters August 18.


text:
Lake Hartwell residents get say in shoreline plan
Corps of Engineers asked about water level, docks, underbrush
Lake Hartwell residents get say in shoreline plan Corps of Engineers asked about water level, docks, underbrush Check out this story on independentmail.com: https://www.independentmail.com/story/news/2017/03/22/lake-hartwell-residents-get-say-shoreline-plan/99461244/
Abe Hardesty, abe.hardesty@independentmail.com Published 7:06 a.m. ET March 22, 2017 | Updated 1:14 p.m. ET March 22, 2017
Hartwell resident Bob Webbenhurst, background, speaks with U.S. Army Corps of Engineers representative Dustin Cullen during a drop-in meeting on Tuesday at the Civic Center of Anderson.(Photo: Katie McLean/ Independent Mail)
Correction, March 22, 2017: This story has been updated to correct the spelling of Ken Bedenbaugh's first name.
Just a few miles from a lake that is 10 feet lower than it stood a year ago, U.S. Army Corps of Engineers Project Manager Ken Bedenbaugh anticipated a flood of questions about that subject Tuesday.
A workshop about shoreline management brought more than 70 Lake Hartwell residents to the Civic Center of Anderson, where the lake level was among a wide range of concerns raised.
The informal, drop-in meeting was the first step in an 18-month process to revise Hartwell's shoreline management plan. The event also included questions about docks, zoning changes and the cutting of underbrush near the shoreline.
The corps will continue to take comments through June 11.
Bob Webbenhurst registers before attending a drop-in meeting where Lake Hartwell residents were able to voice concerns with representatives of the U.S. Army Corps of Engineers on Tuesday at the Civic Center of Anderson. (Photo: Katie McLean/ Independent Mail)
Lake Hartwell Association Director Herb Burnham, a frequent lake visitor since coming to the area in 1974 and a lake resident since 1998, said most of the topics are well-worn. Citing a law-change process that involves federal officials, two states and several counties, Burnham doesn't expect the workshop to trigger any major changes.
"The states make the rules. The Corps of Engineers enforce the rules. Most people on the lake don't realize that," said Burnham, who is among those often frustrated by lake laws "that involve a lot of detail, with not enough leeway."
"Local people need to have more authority, and more ability to do some things based on common sense," Burnham said. "The rules, over the years, have evolved into too much detail, too much minutia."
Bedenbaugh's staff will collect data and comments from Tuesday's meeting, and others Wednesday in Hartwell, Georgia, and Thursday in Seneca, into a draft of a revised plan that is expected to be completed in September 2018. The Hartwell meeting is scheduled for 4-7 p.m. at the Adult Learning Center on Benson Street. The Seneca meeting is scheduled for 4 p.m. to 7 p.m. at the Gignilliat Community Center.
"We don't foresee any huge changes, but you never know what comments we'll get from the public that could change that," said Bedenbaugh, who listed cutting underbrush as the topic that generates the most questions on a regular basis.
Underbrush is a long-running issue. Property owners typically seek permission to cut trees blocking a view of the lake, Bedenbaugh said, while engineers prefer keeping a "vegetative buffer" between the property owner and the lake.
"Those roots hold the soil. If you take them out, you'd have erosion," Bedenbaugh said. "The trees also provide thermal moderation, giving fish some needed shade, and the roots protect the water source by taking the junk out of the soil."
Shoreline Natural Resources Manager Sandy Campbell anticipated "a wide range" of suggestions. "We'll get a wish list of things, many of them we can't do. But we'll also get some good ideas."
Real estate developer Bill Brissey, who has built 16 subdivisions on the lake over the last 35 years, was among those who came to the meeting without a complaint.
"The corps is protecting the environment for the people. That's what I like about it," Brissey said. "I understand that people aren't happy when the water level is down. But in the 55 years the lake has been there, it's only been way down five or six times. That's not too bad, when you think about it."
The Hartwell Lake level stood at 649.8 feet Tuesday, 10.1 feet below full pool. It was at full pool (660 feet above median sea level) through March 2016, but has dropped gradually since June 2016.
Follow Abe Hardesty on Twitter @abe_hardesty
Anderson spending $4.6 million to prevent sewage spills into Lake Hartwell
Shoreline rules for Lake Hartwell up for review
Read or Share this story: https://www.independentmail.com/story/news/2017/03/22/lake-hartwell-residents-get-say-shoreline-plan/99461244/


Equip cars, trucks& SUVs with 2009 Toyota Yaris Transmission Seal from AutoZone. Get Yours Today! We have the best products at the right price. View and Download Toyota 2009 Yaris Sedan quick reference manual online. Toyota YarisSedan Quick Reference Guide. 2009 Yaris Sedan Automobile pdf manual download. 2009 Toyota Yaris transmission problems with 2 complaints from Yaris owners. The worst complaints are power train: automatic transmission, power train: manual transmission.
2009 Toyota Yaris price range, seller's blue book values, buyer's price, listings near you, consumer reviews, and more. See realworld Toyota Yaris transmission problems and repair histories as reported by other Toyota Yaris owners.
Reset clutch due to poor performance of automated manual transmission. Return to top. 2010 Toyota Yaris 2dr Hatch mi US 1000: another clutch throwout bearing: Return to top. 2009 Toyota Yaris 4dr Sedan.
106horsepower Toyota's entrylevel Yaris is 14, 845 with the fivespeed manual transmission. It provides slightly better highway fuel economy than the automatic at 37 mpg, The 2009 Toyota Yaris has 1 NHTSA complaints for the power train: manual transmission at 35 miles average. NHTSA Power Train: Manual Transmission Problems. My 2009 Yaris )manual 2009 Toyota Yaris Parts and Accessories The Toyota Yaris ranks as one of the lowestpriced small cars for 2009, and has especially low running costs and a reputation for reliability.
All models come with a 106horsepower, 1. 5L inline fourcylinder engine with variable valve timing. A fivespeed manual transmission is standard and Toyota yaris 2009 manual transmission blueprints four theblueprints. com. 81. 228 Blueprints online 17. 096 Vector drawings for sale. Login Register English (US) English (US) Espaol. Portugus. Franais. Toyota Auris 3Door (2009) Toyota Auris 5Door (2009) Toyota Auris Touring.
Toyota Avalon (2012) Toyota Avalon (2015) Toyota Avalon (2015) Toyota Find everything you need to know about your 2009 Toyota Yaris in the owners manual from Toyota Owners. Amazon Vehicles: 2009 Toyota Yaris: Read expert reviews, research vehicles, leave comments, and ask questions!
Home TOYOTA 2009 Toyota Yaris Owners Manual Pdf. 2009 Toyota Yaris Owners Manual Pdf. 2009 Toyota Yaris Owners Manual Pdf (Electronic Controlled Transmission) will not be beat beat a surprise at the turn of the automatic transmission on the Yaris. This technology will make the change transmission smoother and reduce the Need to add automatic transmission fluid to my 2009 Toyota Yaris. Bought the correct fluid at the dealer.
Where do I Answered by a verified Toyota Mechanic 2009 Toyota Yaris: automatic transmission fluid. Customer Question.


BabyCenter has exclusively announced Dorel Juvenile's new Customer Care Video Conferencing program. This program was developed to help provide the best customer service we can to our customers. You can read the full article here.
We sent BabyCenter reporter and soon to be mom, Abby the Grow and Go to be featured and used as part of her research for this story, as Abby's mother was in need of a car seat for her new grandbaby. Abby skyped into our Consumer Care center and worked with our team to make sure the car seat was correctly installed in her mother's car. The goal of the BabyCenter story is to announce to consumers that this program is now available in BETA form, with roll out next to our Premium Brands on a wider scale next.
The BabyCenter article is just the first of many to come. We also have lined up a Columbus Republic reporter to visit the customer service center and sit in on a video call. Her story is expected to run on the front page of the Sunday Business section.
In addition, Jon Layne of Dadfluential recently participated in a video chat with our team and plans to share how beneficial the video program is and how it works. The Grow and Go will be featured in his story.
Congratulations to our amazing Consumer Care team for all of their hard work on this! They are truly working together and exemplifiying Dorel Juvenile's commitment to care for precious life.


Cristie Kerr is the highest earning women's golfer of all time as well as one of the most accomplished golfers on the LGPA. Despite all these amazing feats, that hasn't stopped her from looking elsewhere to create multiple sources of income to supplement her life outside of golf. Cristie Kerr is a budding wine entrepreneur with her own company after her namesake, Cristie Kerr Wines.
A side hustle is any type of job taken in addition to your full time job. Cristie Kerr created a side hustle stemmed from skills she learned on the golf course on something she loved which was wine. As a golfer always on the road, Kerr has exemplified great organization skills, time management, and financial understanding to start a venture in the wine business that will run long after she stops swinging a club. She credits themes like: doing your homework and fielding a great team as ways she was able to succeed.
As an athlete, you only have so much time in a day. It's important to take advantage of your free time but not overextend yourself as well. Kerr understands that her wine venture is a side hustle that could eventually be her main hustle. Through good due diligence, strict money management, and applying principles she learned on the golf course, she's been able to run a successful shop with Cristie Kerr Wines.
Kerr is a great example of what it means to be a frugal athlete in the fact that she's already thinking ahead of what she wants to do. Not only is she thinking but actually doing and executing while being prudent financially throughout the whole process.


text:
Q: Problems with combo-box when using fx-scale javafx As you can see in the image below the popup list-view shows towards the side and not aligned to the combo-box

This is the code I used:
.combo-box-popup .list-view{
-fx-scale-x: 1.1;
-fx-scale-y: 1.1;
}

.combo-box-base:showing{
-fx-scale-x: 1.1;
-fx-scale-y: 1.1;
}

Is there any solution? or should I just not use fx-scale?

redpajama_set_name: RedPajamaStackExchange


text:
Q: Mock document.querySelectorAll() in angular test Case I have following code in my method, which removes particular class from the fullcalendar events and do someother things after that.
 someMethod() {
   let events = document.querySelectorAll(`.calendar-event`);
   events.forEach((event) => {
     event.classList.remove('calendar-read-event');
   });
   //dosomething
  }

When running the test cases due to some reason the fullcalendar is not displayed and when i call this method i am getting error

'Cannot read property 'forEach' of undefined'

This is because calendar-event class is not loaded yet and i am getting no result for querySelectorAll() , Is there a way to spyon document.querySelectorAll() and return some value.
Something like this in beforeEach method:
spyOn(document, 'querySelectorAll').and.returnValue(NodeList);

Have tried this but its not stubbing the value and I am still getting 'Cannot read property 'forEach' of undefined' error

A: Instead of using the document directly, Angular has a token (DOCUMENT in @angular/common) to inject the document using DI.
import { DOCUMENT } from '@angular/common';

@Component({...}) // could be a service too!
export class MyComponent {
  constructor (@Inject(DOCUMENT) private document: Document) {}

  // Reference this.document instead of document.
  someMethod() {
    let events = this.document.querySelectorAll(`.calendar-event`);
    events.forEach((event) => {
      event.classList.remove('calendar-read-event');
    });
  }
}

Then in your test you can mock the document and provide it as a dependency.  This way your test and the component will reference the same document instance.
import { DOCUMENT } from '@angular/common';

describe('MyComponent', () => {
  const mockDocument = jasmine.createSpyObject('Document', ['querySelectorAll'])

  beforeEach(() => {
    TestBed.configureTestingModule({
      // Your other stuff here
      providers: [{ provide: DOCUMENT, useValue: mockDocument }]
    });
  });

Note: The above code is untested and may not be 100% correct.  It's meant to give you an idea as to how to approach the issue.

https://medium.com/ngconf/how-to-inject-document-in-angular-7d17804430b6


text:
Safety | April 2, 2020
Local Officials Should Quickly Reduce Jail Populations to Slow the Spread of Coronavirus
John Pfaff
Share to FacebookFacebook Share to TwitterTwitter Share to EmailEmail
As the number of cases of COVID-19 in the United States continues to sharply increase, and as city, state, and federal officials take increasingly aggressive moves to contain the virus's spread, it is critical to understand the significant role our nation's more than 2,800 county jails may play in spreading the disease, not just within the facilities, but to vulnerable communities more broadly.
Nationally, over 50% of the public, including nearly 50% of Republicans, favors releasing anyone in jail whose offense is not one that threatens public safety.
A significant majority of voters—57% of voters in New York and 56% of voters nationally—favor releasing people who have less than six months left on their sentences. That includes a majority of Republican voters nationally and 50% of Republican voters in New York.
Significant majorities also support releasing elderly populations, including 58% of voters nationally and 56% of voters in New York. Fifty-three percent of Republicans nationwide support releasing elderly populations.
There is broad bipartisan support nationally—63% of all voters and 60% of Republicans—for a policy to reduce unnecessary jail admissions by encouraging law enforcement to use alternatives to arrest such as a summons or ticket. Fifty-nine percent of New York voters also support such a policy.
Nationally, 66% of voters—including 58% of Republicans—believe that officials should be considering ways to reduce jail and prison populations as a response to the coronavirus.
The Appeal in Your Inbox


The lead acid car battery was the first rechargeable battery produced for commercial use. The battery is a storage device, which stores energy and provides a power source for all of the electrical and electronic accessories. It is a physical reserve of energy within the car that is used to power the vehicle during starting and during operation to provide energy for the lighting system and accessories.
A battery stores energy in chemical form that can be released on demand as electricity.
This electrical power is used by the car's ignition system for cranking the engine.
Should the alternator or accessory drive belt fail, the battery might also need to power the vehicle's entire electrical system for a short period of time.
Car batteries are made up of alternating negative and positive plates of lead and separators.
Plates are bundled to produce about 2.2 volts and inserted into cells in the case.
Cells are tied together by a strap of which one end forms the positive battery terminal and the other, the negative.
These plates are submerged into an electrolyte solution of sulfuric acid and water.
Elements in the electrical system that drain your battery.
Leaving your headlights, radio, etc on when your car isn't running.
What are Symptoms of Failure?
Most frequently, the vehicle will fail to start.
Conventional car batteries last 3-4 years, much shorter in hot climates and those with poor road-quality.
If you have questions or concerns about lead acid car batteries or any of your vehicle's components, come into your local Pep Boys where we can answer any question, help you find any part, or perform any vehicle service you might need.


text:
Rochester Summer Junior Open
From Saturday July 27th through Sunday July 28th, the Hurricane Junior Golf Tour held the Rochester Summer Junior Open. The tournament was made up of a 36-hole format with a field of six divisions that included the Tiger Woods Division Boys 16-18, Will Smith Division Boys 14-15, Ernie Els Division Boys 11-13, Bryson DeChambeau boys 10 and Under, Justin Timberlake Division Girls 14-18 and Justin Rose Girl 13 and Under division.
Ryan Colwell of Farmington, NY was able to take home first place honors after a final round 78. Colwell had a total of 154 strokes for the weekend to win by a five-shot margin over his closest competitor. Jake Sylak of Mineral Ridge, OH had a final round 79 on Sunday to finish at a total of 159 strokes and claim solo runner-up honors. Rounding up the top-three was Jared Shemancik of Pittsford, NY with a weekend total of 160 strokes to claim third-place honors.
Jacob Dantonio of Lancaster, NY was able to seal his victory with rounds of 80 and 81, making a birdie on Sunday to finish at a two-day total of 163 strokes. Nolan Lin of North Tonawanda, NY claimed runner-up honors with a total of 175 shots for the weekend and a final round 85. Rounding up the top three was Ryan Makowski of Webster, NY with a weekend total of 178 strokes for third place honors.
Matthew Carpentier of Piitsford, NY was able to seal his victory with a final round of 81 and a total of 163 strokes. Carpentier made 3 birdies the last day to win by a one-shot margin over his closest competitor. Brody Burgess of Victor, NY shot a total of 164 strokes with consistent weekend rounds to claim solo runner-up honors for the division. Rounding up the top-three was Carson French of Victor, NY with a weekend total of 165 shots to take third place honors.
Annika Michel of Clarence Center, NY claimed first place honors after shooting rounds of 91 and 93 to win by an impressive margin over her closest competitor. Michel shot a total of 184 strokes and made 2 birdies over the weekend to win. Lena Jones of Syracuse, NY had a weekend total of 190 shots to claim solo runner-up honors, making 2 birdies the last day.
Lily Zhang of Buffalo, NY claimed first place honors after shooting rounds of 80 and 77 to win by an impressive margin over her closest competitor. Zhang had a weekend total of 157 strokes with 4 birdies the last day to win. Julia Zigrossi of Spencerport, NY had a total of 169 strokes to claim solo runner-up honors for the week, and a final round 89. Rounding up the top three was Sophia Cellura of Rochester, NY with a weekend total of 184 shots to claim solo third-place honors.
Massimo Riccio of Pittsford, NY was our lone competitor for the division, with rounds of 92 and 95 he was able to seal victory. Riccio stayed consistent both days, and finished with a total of 187 shots to win.


text:
See You On The Other Side
Tag Archives: avi loeb
Blog, Newsletter
This Week's Best Paranormal News – February 8th, 2019
February 8, 2019 Mike Huberty	Leave a comment
It's Mike from See You On The Other Side with the coolest stories that we saw all week. If your world isn't weird enough, let's help you with that!
https://themoscowtimes.com/news/russian-witches-cast-spells-in-putins-support-video-64420
Russian Witches Cast Spells in Putin's Support
While the witches in the United States are casting hexes on President Trump, they're doing the opposite in Russia. Is Putin harnessing the supernatural power of Baba Yaga and is that scarier than everyone abandoning the Nuclear Non-Proliferation Treaty?
https://www.chicagotribune.com/news/nationworld/science/ct-harvard-astronomer-aliens-20190204-story.html
Alien ship may be among us, Harvard astronomer insists, despite grumbling and criticism from peers
Hey, it's the weekly Avi Loeb report! Currently the nation's most vocal academic to be carrying the flag for the real possibility of alien life being closer than we think, he's been profiled by The Atlantic, The New Yorker, The New York Times, and now Chicago gets in on the fun.
https://myfox8.com/2019/02/04/uncg-student-thought-there-was-a-ghost-in-her-apartment-but-it-was-a-man-living-in-her-closet-and-wearing-her-clothes/
UNCG student thought there was a ghost in her apartment, but it was a man in her closet wearing her clothes
When I was in college, I sometimes thought my dorm room was haunted. Things would never be where I thought they would be and then they would mysteriously reappear in the exact same location. Sometimes within minutes. I thought that was weird but I chalked it up to my college lifestyle, which made David Lee Roth look like a monk. Now this girl discovered an actual nightmare, her closet had a real bogeyman.
https://www.cnn.com/interactive/2019/02/us/james-brown-death-questions/https://www.cnn.com/interactive/2019/02/us/james-brown-death-questions/
Was the Godfather of Soul murdered?
James Brown has been dead over a decade and it's taken us this long to get a good conspiracy theory going over it. Is it believable? Well, you'll have to read it and see. But if the only thing it does is get you to pull up some of his old performances on YouTube, then it's worth the investigation.
https://www.technologynetworks.com/neuroscience/news/the-science-of-why-so-many-people-believe-in-psychic-powers-315060
The Science of Why so Many People Believe in Psychic Powers
This isn't just a hit job article written by skeptics, it's co-written by someone studying parapsychology, so there's something worth reading here. It details all the reasons that if we're going to prove the existence of psychic phenomena, it's not going to be with your gut, it's gotta be in the lab. We're too eager to believe, especially when we want to talk to our relatives who've gone over to the other side.
https://www.youtube.com/watch?v=RkeCX62tbxk
Dig – Believe
Thinking about the last article also made me think about this deep cut from the early 90s. It's a quintessential slice of MTV Alternative Rock and while it's a little bit "Grunge By The Numbers" there's a simple message that's always resonated a little bit the me. "Why don't you believe in your own god?" Does that make the members of Dig secretly Gospel of Thomas-style Gnostics? Nah, it's probably just some stoner poetry.
New episodes come out Monday nights. Our Patreons are currently helping us out with the questions for the next episode's guest, click here if you'd like to ask some too!
We'll see you on the other side of the weekend!
http://www.othersidepodcast.com/donate
90s rockavi loebchicago tribuneghostsharvardjames brownpsychic powersputinskeptic
This Week's Best Paranormal News – January 25th, 2019
January 25, 2019 Mike Huberty	Leave a comment
Whew! January is unbelievably almost over. Sometimes it seems like the most paranormal thing is how fast time flies out here. We just released a new podcast about last week's most interesting paranormal stories (including the Smiley Face Killers, Oumuamua, Glenn Miller's disappearance solved, and the conspiracy behind Martin Luther King's assassination) and here we are with more weirdness from this week!
https://www.theatlantic.com/science/archive/2019/01/oumuamua-interstellar-harvard-astrophysicist/580948
When a Harvard Professor Talks About Aliens
Abraham "Avi" Loeb has been the subject of a number of high-profile stories lately and last week he was just in The New Yorker. This week he's in The Atlantic. It's time to learn why this Harvard Professor becoming the new face of UFOlogy and this time it's less about Little Green Men and more about radio telescopes…
https://www.news.com.au/technology/innovation/military/ufos-warp-drives-stargates-freedom-of-information-query-reveals-secret-list-of-pentagon-research-projects/news-story/0c1fcffd8aa60239744648eb5c56dded#.h1y0j
Secret Pentagon projects exposed
The United States Defense Intelligence Agency has one great fear: that someone, somewhere, has an unknown advantage … a secret weapon that could topple the world's sole superpower from its perch. So when it hears talk of UFOs, stargates and warp drives — it takes it seriously. We've interviewed members of the DIA before, and they've seen some WEIRD stuff!
https://www.coventrytelegraph.net/news/coventry-news/witchcraft-demons-child-abuse-religion-15709791
Witchcraft and demonic possession link to Cov child abuse
Government statistics have shown that social services identified 34 potential abuse cases in Coventry linked to faith or belief in 2018. Parents that think their child is a witch or bad luck or possessed by demons. What the Hell is going on in Coventry?
https://www.psychologytoday.com/blog/long-fuse-big-bang/201901/the-paranormal-can-new-science-explain-old-phenomena
The Paranormal: Can New Science Explain Old Phenomena?
The new field of Epigenetics transforms the impossible into the possible. It's always nice to see a Fortean story in a respected publication!
https://www.vice.com/en_ca/article/9k4exv/china-starts-hunt-for-aliens-in-2019
China to Seriously Start Hunting for Aliens in 2019
Astronomers think extraterrestrials could be trying to communicate with us so Chinese scientists built a huge telescope to find out. But with a government as tight-lipped as the Chinese are they going to be any more free with the alien goods than the U.S.?
https://www.youtube.com/watch?v=-jo3F29JSfs
Pixies – Motorway to Roswell
In the mood for some classic Alternative Rock that talks about aliens? We thought you were, here's the Pixies with one of their most fun tracks.
Have you subscribed to See You On The Other Side on iTunes yet?We'll help you make it easy to get the latest episodes as soon as they come out. Just click here!
See you on the other side of the weekend!
2019abusealiensavi loebchinademonic possessionnewsletteroumuamuaparapsychologypentagonpsychologyUFOs
A rock band's journey into the afterlife, UFOs, entertainment, and weird science.
Where to Subscribe
Subscribe using a text feed
othersidepodcast
With the passing of @babaramdass two weeks ago, @s
Huge THANKS to everyone who attended the live reco
A song that started in episode 231 has made it int
Our host Mike is delving into "The Why of Weird" a
We're looking forward to our next #patron hangou
Tonight is the night we get together and talk abou
#Repost @sunspotmike with @get_repost ・・・ I
New #AtoZChallenge post is up! @WhatsYourGhostStor
RIP #lorrainewarren - hear more about the controve
New #AtoZChallenge blogpost from @troglodad -here
Have you ever awoke in the middle of the night and
New episode is up! @sunspotmike talks with @brian_
#Repost @sunspotmike ・・・ In the #AtoZChallen
#Paranormal Life Imitates Art - @troglodad write
@sunspotwendy talks about #faeries in our latest #
Today is the 25th anniversary of Kurt Cobain's dea
What's the story behind these #haunted houses in
Recording from #SXSW, @sunspotmike & @sunspotwendy
If you're sick of getting your heart broken by liv
Our latest episode talks about one of the most fam


The Bluesky open men's and women's competition kicked off with the women's play off for 3rd and 4th between Bounty Hunters and Nukz Power.
The match played at Nikao Field on Monday turned out to be a cracker of a game.
Bounty Hunters got points on the board early with impact player Edith Nicholas directing the play.
The side went into half time leading 3-1.
In the second half, NukzPower settled into the game and found its rhythm with Shar Atai making breaks to close the gap.
A scoop from Nicholas combining with a late cut from Monica Wichman to score saw Bounty Hunters hold onto its slim lead to finish the Bluesky women's competition in third place.
The first half of the women's grand final was a tough one with both teams defending well.
It was FBI that scored first. NIKS countered with a try and the score stayed locked at 1-all going into half time.
A penalty to NIKS near the five metre mark and quick thinking from veteran Pare Tangata to tap and go to beat a scrambling FBI defence diving at the try line to score the side's second try.
FBI came back to score its final try of the night through a wicked change of direction and step from young Paeru Ngaroi to seal the grand final for FBI winning 4-2.
The mixed touch competition will be held today.
NukzPower 5 Bounty Hunters 6 (women's play off for 3rd and 4th place), FBI 4 NIKS 2 (women's finals), GAT 10 Nines Squad 8, Team ATT 5 Nines Squad 1, Kuki Squad 1 Germinators 6.


text:
View Obituary Portland Press Herald/Maine Sunday Telegram Obituaries
Lorraine C. Doyle
Lorraine C. Doyle 1927 - 2018 SANFORD - Lorraine C. Doyle, 91, of Sanford, died peacefully on Dec. 2, 2018, after a short illness. She was the loving daughter of Antonio and Lumina (Richard) Chabot. Born on Aug. 10, 1927, in Sanford, she attended local schools and graduated from Sanford High School and Nasson College in Springvale.Lorraine was fortunate to be able to be a stay-at-home mom and lovingly raised her six children. She also found time for her own hobbies such as braiding several rugs and taking care of her large and beautiful flower gardens. She was also an accomplished seamstress having made clothing and wedding dresses for her family. She particularly looked forward to her "coffee group" with whom she formed a lifelong bond.Lorraine was a communicant of all three local Catholic churches during her lifetime, a member of the Daughters of Isabella, and was a member of the church choir. In her later years she enjoyed traveling to local nursing homes with other choir members to sing for the residents. Lorraine was predeceased by her loving husband Urbain of 61 years; her parents; and her brother, Paul Chabot. She is survived by her son, Ronald and his wife, Carlene (Waitt) of Sanford, five daughters, Anita and her husband, Tom Hickman of Pulaski, Tenn., Margaret and her husband, Mark Garland of Springvale, Linda Yakas of Fitchburg, Mass., Kathleen Fougere of Portsmouth, N.H., and Kelly and her husband, Mike Jollotta of Sanford; as well as three brothers, Andre, Richard, and Roland. She will be greatly missed by her 14 grandchildren and 14 great-grandchildren. Visiting hours will be held on Thursday, Dec. 6, from 6-8 p.m. at Lafrance-Lambert & Black Funeral Home, 29 Winter Street, Sanford. A Funeral Mass will be celebrated on Friday, Dec. 7, at 10 a.m. at St. Thérèse of Lisieux Parish, Notre Dame Church in Springvale. Burial will be held in the spring at St. Ignatius Cemetery. Arrangements are under the direction of Black Funeral Homes and Cremation Service, Sanford-Springvale. To leave a message of condolence visit www.blackfuneralhomes.com .
Lafrance-Lambert & Black Funeral Home
Sanford, ME 04073
All arrangements are locally delivered to Lafrance-Lambert & Black Funeral Home by a local Sanford, ME florist.
Cherished Farewell Arrangement
Simply Sweet $130.00
The Cherished Farewell™ Arrangement is an elegant display of patriotic beauty to honor your loved one at their final farewell service. Red roses, red carnations, white gladiolus, light blue delphinium, blue iris, white Oriental lilies, white Asiatic lilies and lush greens are elegantly arranged in a white plastic urn to create a stunning way to say your last goodbye.
Standard arrangement is approximately 32"H x 26"W
Deluxe arrangement is approximately 35"H x 29"W.
Premium arrangement is approximately 36"H x 30"W.


No. 490, Galle Road, Colombo 03.
What is Inco 2019 ?
Inco is the premier industrial exhibition organized by the Institute of Incorporated Engineers Sri Lanka on an annual basis.
What does Inco 2019 offer ?
INCO offers the platform for small and medium (SME) sector industrialists, manufactures, engineering companies, exporters, importers, and service providers to showcase their products & services and to meet their potential customers under one roof.
Photo galley of our sponsors, visitors, stall holders and special moments for last 6 years.
Inco commenced its operations as an industrial exhibition in the year 2003, and has held the exhibition for 16 consecutive years growing to over 300 exhibit stalls in the process.
Inco 2019 is the ideal and most cost effective platform for stakeholders of domestic industry to display their capacities and capabilities to their target clientele, both local and overseas. Inco 2019 brings together all three key players namely exhibitors, organizers and visitors under one roof, with a view of disseminating and sharing knowledge and technology in industry.
Inco 2019 will present a unique opportunity to local and foreign industrialists, Manufacturers and Suppliers to meet Professionals and Distributors to promote their products and Services in the South and South East Asia Markets.


text:
Mixx Facebook Twitter Digg delicious reddit MySpace StumbleUpon
More colleges move toward optional SATs
Smith College and Wake Forest University no longer require the SAT for admissions
Nearly 760 institutions have made a step in this direction, advocacy group says
Schools say SAT is biased against students who can't afford preparation
The College Board, which owns the SAT, says test is a good predictor of success
Next Article in U.S. »
By Elizabeth Landau
(CNN) -- Jen Wang of Short Hills, New Jersey, took her first SAT when she was in sixth grade, long before she would start filling out college applications.
Wake Forest University recently announced it would no longer require the SAT for admissions.
"My family thought it was very important for me to do well on this test, and I basically obtained nearly every SAT study guide out there by the time I was a junior in high school," she said. "For Christmas one year, I received an electronic device that allowed me to practice the SAT's 'on-the-go.' "
After all that preparation, she ended up attending a school that has made the SAT Reasoning Test, generally known as the SAT, the most widely used college admissions exam in the United States, optional.
Her school, Connecticut College, is one of a growing number of colleges and universities that are making the SAT optional in the admissions process. In May, two highly selective schools -- Smith College in Massachusetts and Wake Forest University in North Carolina -- decided to drop the SAT and ACT, which some students take as an alternative to the SAT, as requirements for admission.
Wake Forest made the move as part of its efforts to increase socioeconomic, racial and ethnic diversity in the student body, said Martha Allman, director of admissions. Research has shown that SAT performance is linked with family income, and that the test by itself does not accurately predict success in college, she said.
Making the test optional "removes the barrier for those students who had everything else," like scholastic achievement and extracurricular activities, but who "maybe didn't do as well on a specific test," she said.
Smith College also cited the correlation between test scores and income as a motivation for making the exam optional, as well as a desire to take a more well-rounded view of applications. The changes at Smith and Wake Forest take effect for applicants seeking to enroll in the fall of 2009.
Several colleges and universities went test-optional in the 1990s amid concern that the test was a barrier to equal opportunity for minorities, women and low-income students, said Robert Schaeffer, public education director for FairTest. Some schools also dropped the test as a requirement with the explosion of test coaching, which gave upper-income kids an advantage.
Today, about 30 percent, or nearly 760 colleges and universities out of the approximately 2,500 accredited four-year institutions across America have made at least some standardized tests optional for some applicants, according to the nonprofit advocacy group FairTest.
Some of those schools, such as George Mason University in Virginia, still require the tests for prospective students who do not meet a particular GPA requirement in high school.
But Alana Klein, spokesperson for the College Board, which owns the SAT, said this is not a trend. While the news media have focused on recent moves to make the test optional, schools have been doing this for decades, and SAT test volumes are up 2 percent from last year, she said.
The poor performance of some low-income and minority students has to do with their lack of access to quality education, which is a national problem, but does not relate to the test itself, Klein said. The SAT is a fair test for all students, she said, and any test question that shows bias is removed.
"Not only is the SAT a critical tool for success in college, but also in the workforce and in life," she said.
CNNU Home Page
iReport.com: What's happening on your campus?
At Bowdoin College, which hasn't required the SAT since 1969, the biggest benefit of the test-optional policy is the school's "unusually supportive community" where students don't compare scores, said William Shain, dean of admissions and financial aid.
But at this small liberal arts college in Maine, which admitted about 18 percent of applicants this year, more than 80 percent of applicants submit scores anyway, he said.
One of the downsides of keeping standardized tests optional is that it's harder to evaluate a large pool of candidates who all have high GPAs, he said.
Richard Atkinson, former president of the University of California, recommended in 2001 that the school system no longer require the SAT Reasoning Test for admission. He cited the concerns of African-Americans and Hispanics that these groups tend to perform worse on the exam than students of other ethnicities.
"The real basis of their concern, however, is that they have no way of knowing what the SAT measures and, therefore, have no basis for assessing its fairness or helping their children acquire the skills to do better," Atkinson said in 2001. The University of California system still requires the test today.
Several other schools dropped the test requirement for admissions after the revised SAT came out in 2005, after seeing that the new version did not address concerns about access and poor predictive value, FairTest's Schaeffer said.
Since spring 2005, 34 colleges and universities have made standardized testing optional for all applicants, according to FairTest. Four others made the requirement optional for students with a lower GPA, FairTest's data showed.
About 25 percent of liberal arts colleges have made a move in the test-optional direction, said Jack Maguire, chairman and founder of Maguire Associates. His consulting firm has advised certain colleges to become test-optional.
"I do think it improves a school's image," he said. "It shows what's important to schools, if they're really interested in increasing diversity."
Wang, who just finished her freshman year at Connecticut College, said she is torn on the SAT debate -- the test sharpened her vocabulary and test-taking skills, but preparation took up a lot of time that could have been spent doing other things.
"Applicants may take too much time on prepping for this test and their time can be better spent dedicating themselves to other activities that could show colleges what the applicants really find meaningful in their lives," she said.
Mixx Facebook Twitter Digg del.icio.us reddit MySpace StumbleUpon
| Mixx it | Share
Sound Off: Your opinions and comments
Post a comment | iReport.com: Put your thoughts on video
From the Blogs: Controversy, commentary, and debate
Sit tight, we're getting to the good stuff
powered by Sphere
Senators 'troubled' after Rice meeting Bergen: Senseless Benghazi obsession


text:
Alan D. Wapner
Contact Council Member
December 2018 - December 2022
Mayor pro Tem Alan D. Wapner has been a member of the Ontario City Council for nearly 24 years. He has a keen understanding of policy, local government and economic development. During his tenure on the Ontario City Council, the city has experienced record economic success. His leadership in projects like, the Ontario Mills Mall, the Ontario Convention Center, the Ontario Police Station, as well as the Citizens Business Bank Arena, are just some of the projects that have improved the quality of life for the residents of Ontario and the local community. Alan is probably most proud of his leadership in regaining local control of the Ontario International Airport, and as President of the Airport Authority, overseeing an unprecedented successful turn-around of business at the airport, and huge economic impact in the city and region.
Alan represents Ontario on many regional boards, and is known in the region as an expert on transportation planning. He is also a longtime member of the League of California Cities and the National League of Cities Public Safety Policy Committees
Alan's leadership positions of the following boards has greatly benefitted Ontario and the Region:
President of the Ontario International Airport Authority
Immediate Past President of the San Bernardino County Transportation Authority
Immediate Past President of the San Bernardino County Council of Government
President of the Southern California Association of Governments (SCAG)
Member of League of California Cities Board of Directors
Member of the Board of Directors of Omnitrans (Transit Agency)
Member of Metrolink Board of Directors
Member of League of California Cities Inland Division Legislative Task Force
Member of the Metro Foothill Gold Line Extension Construction Authority
Member of the California-Nevada Superspeed Train Commission
Member of the Board of the California Association of Councils of Governments
Member of the Executive Committee of the Airport International Board Member Committee
Prior to his election to the City Council, Alan was the Vice President of the Ontario- Montclair School Board, where he was a tireless advocate for improving public education. On the School Board, Wapner was a leader in making sure the district's children received the best education possible.
Alan is a retired police sergeant of the City of Ontario, and is an Ontario business owner.
Alan has been a resident of Ontario for over 40 years. He is married to Judi, and has five children and three grandchildren. Alan graduated from the University of Southern California, where he received his B.A. and received his Law Degree from Whittier College School of Law.
Mayor pro Tem, City of Ontario
Board Member, Ontario Housing Authority
Board Member, Ontario Industrial Development Authority
Board Member, Ontario Redevelopment Financing Authority
League of California Cities Inland Empire Division Legislative Liaison
Los Angeles World Airports Liaison
Omnitrans Board of Directors
Ontario International Airport Authority President
Recreation and Parks Commission Liaison
San Bernardino Associated Governments Board of Directors (SANBAG)
Sister Cities Liaison
Southern California Association of Governments (SCAG)
Gangs and Drugs Task Force
Metrolink / So. Calif. Regional Rail Authority Board of Directors
Contact Council Member Alan D. Wapner
Do you have a general comment, question or concern for Alan D. Wapner? Please fill out this form and submit your comments.
Comment / Questions / Concerns
Mayor Paul S. Leon
Mayor pro Tem Ruben Valencia
Council Member Alan D. Wapner
Council Member Jim W. Bowman
Council Member Debra Dorst-Porada
City Clerk Sheila Mautz
City Treasurer James R. Milhiser
Every 1st and 3rd Tuesday of each month at 6:30 PM.


Definition at line 59 of file MachineIRBuilder.h.
Definition at line 67 of file MachineIRBuilder.h.
Definition at line 68 of file MachineIRBuilder.h.
Definition at line 69 of file MachineIRBuilder.h.
Definition at line 70 of file MachineIRBuilder.h.
Definition at line 71 of file MachineIRBuilder.h.
Definition at line 73 of file MachineIRBuilder.h.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineRegisterInfo::createVirtualRegister(), and Reg.
Referenced by llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildExtract(), and llvm::MachineIRBuilder::buildFConstant().
Definition at line 113 of file MachineIRBuilder.h.
Definition at line 87 of file MachineIRBuilder.h.
References llvm::MachineRegisterInfo::getType(), llvm_unreachable, and Reg.
Referenced by llvm::MachineIRBuilder::buildCast(), llvm::CSEMIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildConstant(), llvm::MachineIRBuilder::buildExtOrTrunc(), llvm::MachineIRBuilder::buildExtract(), llvm::CSEMIRBuilder::buildFConstant(), llvm::MachineIRBuilder::buildFConstant(), and llvm::MachineIRBuilder::buildSplatVector().
Definition at line 99 of file MachineIRBuilder.h.
Definition at line 104 of file MachineIRBuilder.h.
Definition at line 61 of file MachineIRBuilder.h.
Definition at line 63 of file MachineIRBuilder.h.
Definition at line 62 of file MachineIRBuilder.h.


Разбираем тему об экологии, на которую писали эссе сдающие IELTS в Иране в мае 2018 года. Растущее производство товаров вредит окружающей среде. Посмотрите, как можно построить эссе, рассказывающее о причинах и возможных путях решения этой проблемы.
Introduction – Растущее производство потребительских товаров наносит урон окружающей среде. Почему это все еще происходит? Каковы могут быть решения в этой ситуации?
Topic sentence: Почему это все еще происходит?
Topic sentence: Каковы могут быть решения в этой ситуации?
главная причина этого явления – растущее население, которое требует постоянного наличия продуктов потребления; главные решения – экологически чистые технологии производства и recycling.
One can hardly deny that the ever growing production of consumer goods nowadays causes the adverse effect on environment. The following paragraphs will elaborate on various reasons and possible solutions of this issue.
Primarily, there are several causes for the increase in consumer goods production and subsequent negative influence on the environment. Among those is, without a doubt, the growing global population that requires more goods and amenities than before, and this in its turn leads to the exacerbating ecological damage in the form of air, soil and water pollution from fossil fuels and rubbish. Another key factor in this situation is the moral dilemma in production industry between being a source of profit for their owners and acting as an employer for millions of people around the world, which would hardly let the industry decelerate production.
In this situation, the potential ways to solve this problem are seen in the following. Firstly, both governments and businesses should invest in creating advanced production technologies that would be more environmentally friendly and shift from the heavy dependence on fossil fuels. One more obvious solution is recycling that is able to substantially reduce the amount of rubbish and wastes the world over and nurture caring attitudes in consumers and manufacturers towards the nature.
All things considered, the problem of the growing consumer goods production is mainly caused by the increased demand from the rapidly rising global population. To address this issue, the society should rely on enhancing 'green' production technologies and recycling in order to alleviate the burden on the environment.
Be the first to comment on "Writing Task 2: пример темы и готового эссе (production and nature)"


, we all selects the top selections along with greatest image resolution exclusively for you all, and this pictures is actually among photos series within our very best photos gallery about Elegant Pics Of Maryland Residential Lease Agreement. I'm hoping you can enjoy it.
posted by means of admin from 2019-01-27 14:41:57. To determine most photos in Elegant Pics Of Maryland Residential Lease Agreement photos gallery remember to follow this kind of website link.


text:
Are Virtual Cigar Smoking Experiences (Still) the Future?
A Cigar Community Question from a Colloquial Perspective: Are Virtual Cigar Smoking Experiences (Still) the Future?
A pandemic that struck an unprepared global community in the beginning of last year is changing the way we see life as we know it, yet we're not sure if this newfound perspective derived from a forced adaptation will sustain.
Now, this article has a peculiar focus: the considerable shift towards direct online marketing for the cigar community. It's important to note that every single component that is actively manifested towards the general public is considered marketing (for this article's purpose), regardless of John Doe streaming live with no pecuniary aspiration and is just giving his thoughts on why any given robusto toro belicoso grande is smoking the way it is, or why he'd hurry to buy all cigars from that brand's portfolio.
Instagram has been around for a decade or so while Facebook has lived for almost two, and never in their lifespan had we seen a fraction of the exposure and collective active-participation of the cigar community as whole on their respective platforms.
This is not saying in any way that these mechanisms haven't been amazing engagement tools for both the consumers and brands, but certainly not at the rate we've experienced in the last year. Everyone was home for longer periods than they had been, and this meant that the desired targets for whatever content was being funneled was more attractive than ever. These concepts have already peaked and things are slowly going to deviate back to normal, so, what now?
Some of the concepts that took significant relevancy during the pandemic and are now "trends":
Instagram Live Sessions
Virtual Smoking Herfs via Zoom
Virtual Shoppable Events
Fad, trend, or an actual shift?
Here's the deal: brands and their representatives are participating, from the director of sales to the production manager at a factory, and more noticeably, the brand owners themselves. The evident circumstance here is not to question these appearances as ways to market or to entertain the public, but more so the uncertainty on what these will represent to the brands moving forward.
We ask ourselves, will this be a fad, trend, or an actual shift? We'd love to hear our community's opinion, but we believe it's a little bit of all three. It's a fad because it took some continued initiatives from certain people to really get these structures going, and while a lot of participants were carrying a solid and fundamental approach, others were just tagging along, and that won't last much itself. It's a trend because no matter how good or bad the engagements were, it was (fairly) expected for everyone to hop-in and take advantage of these tools at some point, which will only show with time.
Lastly and most significantly, it really is a shift because no matter how substantial or inconsequential the impact disposed, brands realized that even through the global catastrophe we have undergone and are actually still experiencing, the online world has been designed to keep us connected.
It's not necessarily the future, because cigars are meant to be shared in person, and no matter the virtual connection established, people will want to shake the brand representative's hand and feel personally associated to that loyalty created when Carlos Fuente, Litto Gomez, Ernesto Perez Carrillo, or any other industry figure shows up at their local shop for an event.