Examples of Coordinates


Examples of aQute.maven.MavenRepository.Coordinates

  static Pattern  COORDINATE_PATTERN_OLD  = Pattern
                          .compile("([-_.\\d\\w]+):([-_.\\d\\w]+)(?::([-_.\\d\\w]+))?(?:(.+))");

  public static Coordinates getCoordinatesFromReq(Map<String,Object> ps) {
    String filter = (String) ps.get("filter:");
    Coordinates c = new Coordinates();
    // String coordinates = (String) ps.get("name:");
    // if (coordinates != null) {
    // Matcher m2 = COORDINATE_PATTERN.matcher(coordinates);
    // if (!m2.matches())
    // m2 = COORDINATE_PATTERN_OLD.matcher(coordinates);
View Full Code Here

Examples of aQute.maven.MavenRepository.Coordinates

  static Pattern COORDINATE_PATTERN_OLD = Pattern
      .compile("([-_.\\d\\w]+):([-_.\\d\\w]+)(?::([-_.\\d\\w]+))?(?:(.+))");

  public static Coordinates getCoordinatesFromReq(Map<String, Object> ps) {
    String filter = (String) ps.get(DIRECTIVE_FILTER);
    Coordinates c = new Coordinates();
    // String coordinates = (String) ps.get("name:");
    // if (coordinates != null) {
    // Matcher m2 = COORDINATE_PATTERN.matcher(coordinates);
    // if (!m2.matches())
    // m2 = COORDINATE_PATTERN_OLD.matcher(coordinates);
View Full Code Here

Examples of aQute.maven.MavenRepository.Coordinates

    return c;
  }

  public static MavenCoordinate toCoordinate(Map<String, Object> ps) {
    Coordinates cr = getCoordinatesFromReq(ps);
    if (cr == null)
      return null;

    return new MavenCoordinate(cr.groupId, cr.artifactId, cr.classifier,
        cr.version);
View Full Code Here

Examples of br.com.ema.maze.components.Coordinates

      for (int x = 0; x < line.length(); x++) {
        char symbol = line.charAt(x);
        MazeSpace space = createSpace(symbol, x, y);
        maze.addSpace( space );
        if (symbol == 'E'){
          mazeConfiguration.setExitCoordinates(new Coordinates(x, y));
        }else if (symbol == 'S'){
          mazeConfiguration.setStartCoordinates(new Coordinates(x, y));
        }
      }
     
    }
  }
View Full Code Here

Examples of br.com.ema.maze.components.Coordinates

  @Test
  public void test_Build_Maze_With_Correct_Quantity(){
    int width = 10;
    int height = 5;
    int wallPercentage = 0;
    MazeParameters parameters = new MazeParameters(width, height, wallPercentage, 0, new Coordinates(0, 0), new Coordinates(0, 0));
   
    Maze maze = factory.buildMaze(parameters );
   
    for (int y = 0; y < height; y++) {
      for (int x = 0; x < width; x++) {
View Full Code Here

Examples of br.com.ema.maze.components.Coordinates

  @Test
  public void test_Build_Maze_With_Every_Space_Has_The_Correct_Nearby_Spaces(){
    int width = 3;
    int height = 2;
    int wallPercentage = 0;
    MazeParameters parameters = new MazeParameters(width, height, wallPercentage, 0, new Coordinates(0, 0), new Coordinates(0, 0));
   
    Maze maze = factory.buildMaze(parameters );

    MazeSpace space00 = maze.getSpace(0, 0);
    MazeSpace space01 = maze.getSpace(0, 1);
View Full Code Here

Examples of br.com.ema.maze.components.Coordinates

  @Test
  public void test_Build_Maze_With_Correct_Walls_Percentage(){
    int width = 10;
    int height = 5;
    int wallPercentage = 25;
    MazeParameters parameters = new MazeParameters(width, height, wallPercentage, 0, new Coordinates(0, 0), new Coordinates(0, 0));
   
    Maze maze = factory.buildMaze(parameters );
   
    int walls = 0;
    for (int y = 0; y < height; y++) {
View Full Code Here

Examples of com.cloudinary.Coordinates

  }
 
  @Test
  public void testUpdateCustomCoordinates() throws IOException, Exception {
    //should update custom coordinates
      Coordinates coordinates = new Coordinates("121,31,110,151");
      Map uploadResult = cloudinary.uploader().upload("src/test/resources/logo.png", Cloudinary.emptyMap());
      cloudinary.api().update(uploadResult.get("public_id").toString(), Cloudinary.asMap("custom_coordinates", coordinates));
      Map result = cloudinary.api().resource(uploadResult.get("public_id").toString(), Cloudinary.asMap("coordinates", true));
      long[] expected = new long[]{121L,31L,110L,151L};
      Object[] actual = ((org.json.simple.JSONArray)((org.json.simple.JSONArray)((Map)result.get("coordinates")).get("custom")).get(0)).toArray();
View Full Code Here

Examples of com.eclipsesource.tabris.geolocation.Coordinates

  private Position getPosition( JsonObject properties ) {
    String timestampValue = properties.get( PROPERTY_TIMESTAMP ).asString();
    try {
      Date timestamp = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ssZ" ).parse( timestampValue );
      Coordinates coordinates = getCoordinates( properties );
      Position position = new Position( coordinates, timestamp );
      return position;
    } catch( ParseException e ) {
      throw new IllegalStateException( "Could not parse date from string: " +  timestampValue
                                       + ", needs to be yyyy-MM-dd'T'HH:mm:ssZ" );
View Full Code Here

Examples of com.google.gwt.geolocation.client.Position.Coordinates

      });
    }
  }

  private void fire(Position result) {
    Coordinates c = result.getCoordinates();
    GeoLocationEvent geoLocationEvent = new GeoLocationEvent(c.getLatitude(), c.getLongitude(), c.getAccuracy());
    geoLocationEventSource.fire(geoLocationEvent);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.