* Checks that code block doesn't throw corresponding exception.
   *
   * @param exceptionCase Block annotated with some exception type
   * @throws Throwable
   */
  protected void assertNoException(final AbstractExceptionCase exceptionCase) throws Throwable {
    assertExceptionOccurred(false, exceptionCase, null);
  }

  protected void assertNoThrowable(final Runnable closure) {
    String throwableName = null;
    try {
      closure.run();
    }
    catch (Throwable thr) {
      throwableName = thr.getClass().getName();
    }
    assertNull(throwableName);
  }

  private static void assertExceptionOccurred(boolean shouldOccur,
                                              AbstractExceptionCase exceptionCase,
                                              String expectedErrorMsg) throws Throwable {
    boolean wasThrown = false;
    try {
      exceptionCase.tryClosure();
    }
    catch (Throwable e) {
      if (shouldOccur) {
        wasThrown = true;
        final String errorMessage = exceptionCase.getAssertionErrorMessage();
        assertEquals(errorMessage, exceptionCase.getExpectedExceptionClass(), e.getClass());
        if (expectedErrorMsg!= null) {
          assertEquals("Compare error messages", expectedErrorMsg, e.getMessage());
        }
      }
      else if (exceptionCase.getExpectedExceptionClass().equals(e.getClass())) {
        wasThrown = true;

        System.out.println("");
        e.printStackTrace(System.out);

        fail("Exception isn't expected here. Exception message: " + e.getMessage());
      }
      else {
        throw e;
      }
    }
    finally {
      if (shouldOccur &&!wasThrown) {
        fail(exceptionCase.getAssertionErrorMessage());
      }
    }
  }

  protected boolean annotatedWith(@NotNull Class annotationClass) {
    Class aClass = getClass();
    String methodName = "test" + getTestName(false);
    boolean methodChecked = false;
    while (aClass!= null && aClass!= Object.class) {
      if (aClass.getAnnotation(annotationClass)!= null) return true;
      if (!methodChecked) {
        try {
          Method method = aClass.getDeclaredMethod(methodName);
          if (method.getAnnotation(annotationClass)!= null) return true;
          methodChecked = true;
        }
        catch (NoSuchMethodException e) {
        }
      }
      aClass = aClass.getSuperclass();
    }
    return false;
  }

  protected String getHomePath() {
    return PathManager.getHomePath().replace(File.separatorChar, '/');
  }

  protected static boolean isInHeadlessEnvironment() {
    return GraphicsEnvironment.isHeadless();
  }

  public static void refreshRecursively(@NotNull VirtualFile file) {
    VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor() {
      @Override
      public boolean visitFile(@NotNull VirtualFile file) {
        file.getChildren();
        return true;
      }
    });
    file.refresh(false, true);
  }

  public static @NotNull Test filteredSuite(@RegExp String regexp, @NotNull Test test) {
    final Pattern pattern = Pattern.compile(regexp);
    final TestSuite testSuite = new TestSuite();
    new Processor<Test>() {

      @Override
      public boolean process(Test test) {
        if (test instanceof TestSuite) {
          for (int i = 0, len = ((TestSuite)test).testCount(); i < len; i++) {
            process(((TestSuite)test).testAt(i));
          }
        }
        else if (pattern.matcher(test.toString()).find()) {
          testSuite.addTest(test);
        }
        return false;
      }
    }.process(test);
    return testSuite;
  }
}
#!/usr/bin/python
 
###############################################################################
#
#
###############################################################################

#
# MODULES
#
#import Numeric,sys,os
import numpy,sys,os

from diag_functions import *

import matplotlib.pyplot as plt


#---------- Get Arguments ------------------------------------------

if len(sys.argv) < 2:
    print "usage: plot_vs_time.py <infile> <outfile>"
    sys.exit(1)
else:
    tcfilename = sys.argv[1]
    figname = sys.argv[2]


#---------- Setup Plotting  ------------------------------------------


#---------- Get storm tracks  ------------------------------------------

[tracks] = read_trajectories(tcfilename)

plt.title("Intensity vs Time")
plt.ylabel("Wind Speed (m/s)")
plt.xlabel("Time (hrs)")

# loop through trajectories
#for i in range(len(tracks)):
for i in range(2):
    nt = len(tracks[i][0])

    time = []
    wind = []

    for j in range(nt-1):
	x = tracks[i][0][j]
	y = tracks[i][1][j]
	w = tracks[i][2][j]
	p = tracks[i][3][j]

        time.append(6.0*j)
	wind.append(w)

    plt.plot(time,wind)

plt.savefig(figname)


Walking along the white sandy beaches of Hawaii never gets old...
Ah, I never tire of walking on the beach and these are gorgeous! We actually had a bit of sun yesterday for the first time in over a week, back to gray now though, and cold! Ah, well, it's winter in the northwest!! Hope you have a great week, Carolyn, and a very Merry Christmas!
Pretty one...Happy blue Monday.
Beautiful shore shot. I love the sea.
Wow, great shot, I'm wondering if you got wet.
Someday I'd LOVE to visit Hawaii. Meanwhile, than you for sharing your lovely photos of it.
Nice shot, captures the action wonderfully.
Wow...dramatic and amazing shot. Love the long exposure!
Oh … how fortunate to miss the wintry weather and be in such a lovely place over Christmas. White sand instead of snow sounds so much easier to walk in and warmer!
what a dramatic scene. happy holidays.
Great perspective on this Carolyn. Nice capture of the wave - just such a beautiful scene!
Such a tease. Looks like an awesome place to be.
What a wonderful place Carolyn! Merry Christmas. Thank you for the year-long gift of your beautiful pictures!
Another beauty! I love your compositions.
TEHRAN (FNA)- Iranian Ambassador to Belgium Peyman Saadat voiced his country's readiness to cooperate with the Belgian companies.
"Given Belgium's achievements in the health sector, we are willing cooperate with Brussels in this field," Saadat said.
The Iranian ambassador underlined that Belgium has immense capacity and potential in building hospitals as well as producing medicine and medical equipment.
Saadat pointed to the cooperation pact signed between Iran and Belgium during a recent visit by Iranian Health Minister Hassan Hashemi to the European country, and called for speedy implementation of the agreements.
"Most Belgian companies are small- and medium-sized and political developments cannot have significant effect on them," he added.
In relevant remarks in early February, a senior Belgian official called for broadening of Tehran-Brussels relations, and voiced his country's readiness to build hospitals in Iran.
Secretary-general of Flanders’ Ministry of Health in Belgium Karine Moykens made the remarks in a meeting with Iranian Deputy Health Minister Iraj Jarirchi in Tehran.
"Exchanging positive, scientific and effective experiences in the field of management and construction of hospitals is of great importance to us,” she said.
"We can help Iran to reduce the number of hospital beds and therefore the costs of health and treatment by taking care of patients at home with the use of new electronic laboratory technologies," Moykens added.
She said that the Belgian Agfa Corporate’s project with Iranian Imam Khomeini Hospital in the field of electronic hospital infrastructures can open new doors to exchanging experiences with Iran.
Moykens also pointed to her trip to Isfahan, and said that an agreement was reached during the visit under which Belgium would have research cooperation with an Iranian university for the very first time.
Supreme Court releases...
The Supreme Court of India has released an Android App for displaying the Supreme Court case status. The app is a replica of the display board present in the Supreme Court. Like the display board, the app will indicate the respective item number which is being heard across all the Courts.
This application has been developed by C-DAC, Mumbai in consultation with e-Committee, Supreme Court of India. The app is sponsored by Department of Electronic and Information Technology (