NSString testing won't evaluate to true when it should - ios

So, I've been trying to get an NSPredicate to work, and it should. But it won't.
I've decided to loop through this array to test how come, and I've gotten to this point with testing
- (void)getItemsForGroup:(NSString *)groupID completion:(MenuQueryBlock)completion{
...
for (NSDictionary *group in [[[[[[self.singleMenuSet objectForKey:#"menuList"] firstObject] objectForKey:#"UnitMenu"] objectForKey:#"data"] objectForKey:#"groups"] objectForKey:#"group"]) {
NSLog(#"test");
NSLog(#"Group MasterGID: %#",[group objectForKey:#"MasterGID"]);
NSLog(#"test_ MasterGID: %#",groupID);
if ([[group objectForKey:#"MasterGID"] isEqualToString:groupID]) {
NSLog(#"Selected Group: %#",group);
}
}
....
completion(....)
}
Here is the section of the log where "Selected Group" should print.
2015-09-02 11:42:24.738 business_sect[3687:144610] test_ MasterGID: 24000040
2015-09-02 11:42:24.738 business_sect[3687:144610] test
2015-09-02 11:42:24.738 business_sect[3687:144610] Group MasterGID: 24000039
2015-09-02 11:42:24.738 business_sect[3687:144610] test_ MasterGID: 24000040
2015-09-02 11:42:24.738 business_sect[3687:144610] test
2015-09-02 11:42:24.738 business_sect[3687:144610] Group MasterGID: 24000040
2015-09-02 11:42:24.738 business_sect[3687:144610] test_ MasterGID: 24000040 <----right after this line
2015-09-02 11:42:24.738 business_sect[3687:144610] test
2015-09-02 11:42:24.739 business_sect[3687:144610] Group MasterGID: 24000041
2015-09-02 11:42:24.739 business_sect[3687:144610] test_ MasterGID: 24000040
2015-09-02 11:42:24.739 business_sect[3687:144610] test
2015-09-02 11:42:24.739 business_sect[3687:144610] Group MasterGID: 24000042
2015-09-02 11:42:24.739 business_sect[3687:144610] test_ MasterGID: 24000040
2015-09-02 11:42:24.739 business_sect[3687:144610] test
2015-09-02 11:42:24.739 business_sect[3687:144610] Group MasterGID: 24000043
2015-09-02 11:42:24.739 business_sect[3687:144610] test_ MasterGID: 24000040
So why isn't the "Selected Group" printing?

Can you try this ?
if ([(NSString *)group[#"MasterGID"] hash] == groupID.hash) {
NSLog(#"Selected Group: %#",group);
}

Related

When save next event, spring data neo4j delete previous relationships

I have a problem with save node in cascade. I have a 3 #NodeEntity: Event, Tag, UserNeo. When I save next event, the previous relationship was deleted between user and events, and also between events and tag. Sometimes this relations are saved. I don't know what I doing wrong.
Neo4j dependency
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>4.2.0.BUILD-SNAPSHOT</version>
</dependency>
Event.java
#NodeEntity(label = "Event")
public class Event {
#GraphId
private Long id;
#Property(name = "title")
private String title;
#Property(name = "short_description")
private String shortDescription;
#Property(name = "long_description")
private String longDescription;
#Property(name = "address")
private String address;
#Property(name = "lat")
private double lat;
#Property(name = "lon")
private double lon;
#Property(name = "time")
#DateLong
private Date time;
#Property(name = "nuts")
private int nuts;
#Property(name = "created_by")
private String createdBy;
#Property(name = "created_date")
#DateLong
private Date createdDate;
#Property(name = "modified_by")
private String modifiedBy;
#Property(name = "modified_date")
#DateLong
private Date modifiedDate;
#Property(name = "deleted_date")
#DateLong
private Date deletedDate = null;
#Relationship(type = "TAGGED", direction = Relationship.OUTGOING)
private Set<Tag> tagSet = new HashSet<>();
#Relationship(type = "JOINED_IN", direction = Relationship.INCOMING)
private Set<UserNeo> joinedUsers = new HashSet<>();
#Relationship(type = "ORGANIZED", direction = Relationship.INCOMING)
private Set<UserNeo> organizedUsers;
// getters and setters
UserNeo.java
#NodeEntity(label = "User")
public class UserNeo {
#GraphId
private Long id;
#Property(name = "first_name")
private String firstName;
#Property(name = "last_name")
private String lastName;
#Property(name = "email")
private String email;
#Property(name = "vip")
private boolean vip;
#Property(name = "nuts")
private int nuts;
#Property(name = "current_lat")
private double currentLat;
#Property(name = "current_lon")
private double currentLon;
#Property(name = "created_date")
#DateLong
private Date createdDate;
#Property(name = "deleted_date")
#DateLong
private Date deletedDate;
#Relationship(type = "JOINED_IN", direction = Relationship.OUTGOING)
private List<Event> joinEvents;
#Relationship(type = "ORGANIZED", direction = Relationship.OUTGOING)
private List<Event> organizeEvents;
// getters and setters
Tag.java
#NodeEntity(label = "Tag")
public class Tag {
#GraphId
private Long id;
#Property(name = "tag")
private String tag;
#Relationship(type = "TAGGED", direction = Relationship.INCOMING)
private Set<Event> events = new HashSet<>();
// getters and setters
My service method to save nodes
public Event createEvent(EventDTO event){
Set<Tag> tags = new HashSet<>(event.getTagSet().size());
Iterator it = event.getTagSet().iterator();
while(it.hasNext()){
String tag = it.next().toString();
Tag resultTag = tagRepository.findByName(tag);
if(resultTag != null){
tags.add(resultTag);
}else {
Tag newTag = new Tag(tag);
newTag = tagRepository.save(newTag);
tags.add(newTag);
}
}
UserNeo userNeo = userNeoRepository.findByEmail("sunday1601#gmail.com");
Set<UserNeo> userNeos = new HashSet<>();
userNeos.add(userNeo);
Event createEvent = new `Event(event.getTitle(),event.getShortDescription(),event.getLongDescription(),`
event.getAddress(),event.getLat(),event.getLon(),event.getTime(),event.getNuts(),
event.getCreatedBy(), new Timestamp(new Date().getTime()),null,null);
createEvent.setTagSet(tags);
createEvent.setOrganizedUsers(userNeos);
Event save = eventRepository.save(createEvent);
return save;
}
When I save in short time, then delete previous relationship. And when I watch in neo4j browser I have a two the same event node.
This is log from jhipster
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.MetaData : looking for concrete class to resolve label: User
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.MetaData : concrete class found: com.mycompany.myapp.domain.UserNeo. comparing with what's already been found previously...
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.MetaData : User resolving class: com.mycompany.myapp.domain.UserNeo
2016-07-14 22:04:42.863 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.GraphEntityMapper : Unable to find property: address on class: com.mycompany.myapp.domain.UserNeo for writing
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-init: ($3153)-[:ORGANIZED]->($2108)
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-init: ($2108)-[:TAGGED]->($2098)
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-init: ($2108)-[:TAGGED]->($2100)
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context initialised with 3 relationships
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]}
2016-07-14 22:04:42.864 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} has changed
2016-07-14 22:04:42.866 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]}
2016-07-14 22:04:42.866 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.866 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity Tag{id=2100, tag='Rock'} in one direction
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Tag{id=2100, tag='Rock'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Tag{id=2100, tag='Rock'}, has not changed
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Tag{id=2100, tag='Rock'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (2100)<-[:TAGGED]-()
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and Tag{id=2100, tag='Rock'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (-250914077)-[-1950378672:TAGGED]->(2100)
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity Tag{id=2098, tag='Festiwal'} in one direction
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Tag{id=2098, tag='Festiwal'}
2016-07-14 22:04:42.867 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Tag{id=2098, tag='Festiwal'}, has not changed
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Tag{id=2098, tag='Festiwal'}
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (2098)<-[:TAGGED]-()
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.872 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and Tag{id=2098, tag='Festiwal'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (-250914077)-[-1648969869:TAGGED]->(2098)
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity Tag{id=3231, tag='Plaża'} in one direction
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: Tag{id=3231, tag='Plaża'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : Tag{id=3231, tag='Plaża'}, has not changed
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: Tag{id=3231, tag='Plaża'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (3231)<-[:TAGGED]-()
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: TAGGED
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and Tag{id=3231, tag='Plaża'}
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (-250914077)-[-1054618601:TAGGED]->(3231)
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: ORGANIZED
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : linking to entity UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null} in one direction
2016-07-14 22:04:42.873 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : visiting: UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}, has not changed
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping references declared by: UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (3153)-[:JOINED_IN]->()
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: (3153)-[:ORGANIZED]->()
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : trying to map relationship between Event{id=null, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]} and UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-new: (3153)-[-1646367736:ORGANIZED]->(-250914077)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : mapping reference type: JOINED_IN
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: ($3153)-[null:ORGANIZED]->($2108)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing end node of: ($3153)-[:ORGANIZED]->($2108)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing start node of: ($3153)-[:ORGANIZED]->($2108)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: ($2108)-[null:TAGGED]->($2098)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing end node of: ($2108)-[:TAGGED]->($2098)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : flushing end node of: ($2108)-[:TAGGED]->($2100)
2016-07-14 22:04:42.874 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.context.EntityGraphMapper : context-del: ($2108)-[null:TAGGED]->($2100)
2016-07-14 22:04:42.875 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.session.Neo4jSession : Thread 41: beginTransaction()
2016-07-14 22:04:42.875 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.session.Neo4jSession : Thread 41: Neo4jSession identity: org.neo4j.ogm.session.delegates.TransactionsDelegate#32786293
2016-07-14 22:04:42.875 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: POST http://localhost:7474/db/data/transaction
2016-07-14 22:04:42.875 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction HTTP/1.1
2016-07-14 22:04:42.876 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 201 Created [Date: Thu, 14 Jul 2016 20:04:42 GMT, Location: http://localhost:7474/db/data/transaction/531, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 150, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 150,Chunked: false]}}
2016-07-14 22:04:42.881 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: {"commit":"http://localhost:7474/db/data/transaction/531/commit","results":[],"transaction":{"expires":"Thu, 14 Jul 2016 20:05:42 +0000"},"errors":[]}
2016-07-14 22:04:42.882 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: Connection released
2016-07-14 22:04:42.884 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.session.Neo4jSession : Thread 41: Transaction, tx id: org.neo4j.ogm.drivers.http.transaction.HttpTransaction#39e7461a
2016-07-14 22:04:42.884 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: request url http://localhost:7474/db/data/transaction/531
2016-07-14 22:04:42.884 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: request {"statements":[{"statement":"UNWIND {rows} as row CREATE (n:`Event`) SET n=row.props RETURN row.nodeRef as ref, ID(n) as id, row.type as type","parameters":{"rows":[{"nodeRef":-250914077,"type":"node","props":{"short_description":"Opis krotki short","deleted_date":0,"address":"address 5","nuts":17,"lon":20.957071,"created_date":1468526682863,"time":1497740854000,"long_description":"Opis długi long","title":"Event 47","created_by":"Michal Niedziela","lat":50.000452}}]},"resultDataContents":["row"],"includeStats":false}]}
2016-07-14 22:04:42.885 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction/531 HTTP/1.1
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 200 OK [Date: Thu, 14 Jul 2016 20:04:42 GMT, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 247, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 247,Chunked: false]}}
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.d.h.response.AbstractHttpResponse : Thread 41: Releasing HttpResponse
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to create: nodeEntity -250914077:2109
2016-07-14 22:04:42.889 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: request url http://localhost:7474/db/data/transaction/531
2016-07-14 22:04:42.890 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: request {"statements":[{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MERGE (startNode)-[rel:`TAGGED`]->(endNode) RETURN row.relRef as ref, ID(rel) as id, row.type as type","parameters":{"rows":[{"startNodeId":2109,"relRef":-1054618601,"type":"rel","endNodeId":3231},{"startNodeId":2109,"relRef":-1648969869,"type":"rel","endNodeId":2098},{"startNodeId":2109,"relRef":-1950378672,"type":"rel","endNodeId":2100}]},"resultDataContents":["row"],"includeStats":false},{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MERGE (startNode)-[rel:`ORGANIZED`]->(endNode) RETURN row.relRef as ref, ID(rel) as id, row.type as type","parameters":{"rows":[{"startNodeId":3153,"relRef":-1646367736,"type":"rel","endNodeId":2109}]},"resultDataContents":["row"],"includeStats":false},{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MATCH (startNode)-[rel:`ORGANIZED`]->(endNode) DELETE rel","parameters":{"rows":[{"startNodeId":3153,"endNodeId":2108}]},"resultDataContents":["row"],"includeStats":false},{"statement":"UNWIND {rows} as row MATCH (startNode) WHERE ID(startNode) = row.startNodeId MATCH (endNode) WHERE ID(endNode) = row.endNodeId MATCH (startNode)-[rel:`TAGGED`]->(endNode) DELETE rel","parameters":{"rows":[{"startNodeId":2108,"endNodeId":2098},{"startNodeId":2108,"endNodeId":2100}]},"resultDataContents":["row"],"includeStats":false}]}
2016-07-14 22:04:42.891 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction/531 HTTP/1.1
2016-07-14 22:04:42.895 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 200 OK [Date: Thu, 14 Jul 2016 20:04:42 GMT, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 505, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 505,Chunked: false]}}
2016-07-14 22:04:42.895 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.d.h.response.AbstractHttpResponse : Thread 41: Releasing HttpResponse
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1054618601:461
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1648969869:462
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1950378672:463
2016-07-14 22:04:42.896 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : to (maybe) create: relEntity -1646367736:464
2016-07-14 22:04:42.897 INFO 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: POST http://localhost:7474/db/data/transaction/531/commit HTTP/1.1
2016-07-14 22:04:42.908 DEBUG 26162 --- [nio-8080-exec-5] o.n.o.drivers.http.request.HttpRequest : Thread 41: HttpResponse HttpResponseProxy{HTTP/1.1 200 OK [Date: Thu, 14 Jul 2016 20:04:42 GMT, Content-Type: application/json, Access-Control-Allow-Origin: *, Content-Length: 26, Server: Jetty(9.2.9.v20150224)] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 26,Chunked: false]}}
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: {"results":[],"errors":[]}
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.drivers.http.driver.HttpDriver : Thread 41: Connection released
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.transaction.Transaction : Thread 41: Commit transaction extent: 0
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] org.neo4j.ogm.transaction.Transaction : Thread 41: Committed
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] o.n.ogm.session.request.RequestExecutor : creating new node id: 2109
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] c.m.myapp.aop.logging.LoggingAspect : Exit: com.mycompany.myapp.service.EventService.createEvent() with result = Event{id=2109, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]}
2016-07-14 22:04:42.909 DEBUG 26162 --- [nio-8080-exec-5] c.m.myapp.aop.logging.LoggingAspect : Exit: com.mycompany.myapp.web.rest.EventResources.createEvent() with result = <200 OK,Event{id=2109, title='Event 47', shortDescription='Opis krotki short', longDescription='Opis długi long', address='address 5', lat=50.000452, lon=20.957071, time=Sun Jun 18 01:07:34 CEST 2017, nuts=17, createdBy='Michal Niedziela', createdDate=2016-07-14 22:04:42.863, modifiedBy='null', modifiedDate=null, deletedDate=1970-01-01 01:00:00.0, tagSet=[Tag{id=2100, tag='Rock'}, Tag{id=2098, tag='Festiwal'}, Tag{id=3231, tag='Plaża'}], joinedUsers=[], organizedUsers=[UserNeo{id=3153, firstName='Michal', lastName='Niedziela', email='sunday1601#gmail.com', vip=false, nuts=100, currentLat=50.028797, currentLon=21.000123, createdDate=Tue Jul 12 11:07:55 CEST 2016, deletedDate=null, joinEvents=null, organizeEvents=null}]},{}>
When you add tags to the event, it looks like the Tag does not contain a reference back to the Event? This could be one of the reasons the event-tag relationships are deleted i.e. your object references inconsistent with what is expected in the graph.
In case you want to define relationship in only one of the entities, you may use Session.clear after saving of tag so that tag is not tracked by session and does not get automatically saved after change to event.
https://docs.spring.io/spring-data/neo4j/docs/5.0.0.M1/reference/html/#reference.architecture.session

Google Maps sdk ios Api error

I try to show the map on the simulator and I tried so much to sold this problem but I always have this error how can I fixed please ?
**2016-05-24 14:32:41.295 Menti[40241:2494765] ClientParametersRequest failed, 7 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:41.879 Menti[40241:2494765] Google Maps SDK for iOS (M4B) version: 1.13.24482.0
2016-05-24 14:32:42.389 Menti[40241:2494765] ClientParametersRequest failed, 6 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:44.661 Menti[40241:2494765] ClientParametersRequest failed, 5 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:49.102 Menti[40241:2494765] ClientParametersRequest failed, 4 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:32:57.173 Menti[40241:2494765] ClientParametersRequest failed, 3 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:33:13.234 Menti[40241:2494765] ClientParametersRequest failed, 2 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:33:45.302 Menti[40241:2494765] ClientParametersRequest failed, 1 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:34:49.602 Menti[40241:2494765] ClientParametersRequest failed, 0 attempts remaining (0 vs 7). Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:34:49.602 Menti[40241:2494765] Google Maps SDK for iOS (M4B) cannot connect or validate APIKey: Error Domain=com.google.HTTPStatus Code=400 "(null)" UserInfo={data=<3c48544d 4c3e0a3c 48454144 3e0a3c54 49544c45 3e426164 20526571 75657374 3c2f5449 544c453e 0a3c2f48 4541443e 0a3c424f 44592042 47434f4c 4f523d22 23464646 46464622 20544558 543d2223 30303030 3030223e 0a3c4831 3e426164 20526571 75657374 3c2f4831 3e0a3c48 323e4572 726f7220 3430303c 2f48323e 0a3c2f42 4f44593e 0a3c2f48 544d4c3e 0a>}
2016-05-24 14:34:49.602 Menti[40241:2494765] Your key may be invalid for your bundle ID: com.menti.maps**
You have created a key for your application in google portal right. So in that, you have specified projects bundle identifier. You have to use the same bundle identifier for your application also. And also in App delegate method you have to use the same key.
Please follow the link
1.Google Map Integration for IOS
https://www.codeschool.com/courses/exploring-google-maps-for-ios
Please note below point also
If you want to practice on google maps from iOS devices then just download the GoogleMaps.framework from the below link: https://developers.google.com/maps/documentation/ios/start#getting_the_google_maps_sdk_for_ios
If you want to use GoogleMapsM4B.framework in your project then
You should request support on the Enterprise Support portal(Google's website)
You must enable Google Maps Mobile SDK for Work not Google Maps SDK for iOS in Google’s console website.
You can find the key differences between the Google Maps SDK for iOS and the Google Maps Mobile SDK for Work(M4B) in the below link: https://developers.google.com/maps/documentation/business/mobile/ios/
Hope this will Help You.
Seems like you are using wrong sdk.
as error suggests Google Maps SDK for iOS (M4B) cannot connect or validate APIKey means you are using Google Maps SDK Business version sdk and may be you are using right API key.
import correct Google Maps SDK and use appropriate API key.
#import <GoogleMaps/GoogleMaps.h>
Also check here: not able to use Google map sdk in ios
Just enable "Google Maps SDK for Ios and Android on Google Cloud Platform Console

Apple simple ping not work on iOS why?

I am using apple simple ping source code it works for MAC but not works on iOS.
https://developer.apple.com/library/mac/samplecode/SimplePing/Introduction/Intro.html
below is code I am writing
ping = [SimplePing simplePingWithHostName:#"www.google.com"];
ping.delegate = self;
[ping start];
console response
2016-03-18 18:11:07.252 PinPin[383:49747] >CFHostStartInfoResolution
2016-03-18 18:11:07.256 PinPin[383:49747] <CFHostStartInfoResolution
2016-03-18 18:11:07.334 PinPin[383:49747] >HostResolveCallback
2016-03-18 18:11:07.336 PinPin[383:49747] didStartWithAddress
16-03-18 18:22:42.375 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:44.382 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:46.388 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:48.419 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:50.422 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:52.820 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:54.852 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:56.857 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:22:58.862 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:23:00.844 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:23:02.855 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:23:05.178 PinPin[383:49747] didReceiveUnexpectedPacket
2016-03-18 18:23:07.006 PinPin[383:49747] didReceiveUnexpectedPacket
Nothing happens after this, no other delegate called like
- (void)simplePing:(SimplePing *)pinger didFailWithError:(NSError *)error;
- (void)simplePing:(SimplePing *)pinger didSendPacket:(NSData *)packet;
- (void)simplePing:(SimplePing *)pinger didFailToSendPacket:(NSData *)packet error:(NSError *)error;
- (void)simplePing:(SimplePing *)pinger didReceivePingResponsePacket:(NSData *)packet;
And in readMe.txt apple say
"SimplePing runs on Mac OS X 10.7 and later, although the core code works just fine on all versions of iOS and the underlying approach works on earlier versions of Mac OS X (back to 10.2)."
// UPDATE
MAC. response
Anands-MacBook-Air:~ anand$ cd ~/Downloads/SimplePing
Anands-MacBook-Air:SimplePing anand$ build/Debug/SimplePing www.apple.com
2016-03-19 19:55:48.042 SimplePing[1149:19595] >CFHostStartInfoResolution
2016-03-19 19:55:48.045 SimplePing[1149:19595] <CFHostStartInfoResolution
2016-03-19 19:55:49.490 SimplePing[1149:19595] >HostResolveCallback
2016-03-19 19:55:49.491 SimplePing[1149:19595] pinging 23.211.220.146
2016-03-19 19:55:49.491 SimplePing[1149:19595] #0 sent
2016-03-19 19:55:49.551 SimplePing[1149:19595] #0 received
2016-03-19 19:55:50.493 SimplePing[1149:19595] #1 sent
2016-03-19 19:55:50.557 SimplePing[1149:19595] #1 received
2016-03-19 19:55:51.495 SimplePing[1149:19595] #2 sent
2016-03-19 19:55:51.553 SimplePing[1149:19595] #2 received
2016-03-19 19:55:52.493 SimplePing[1149:19595] #3 sent
2016-03-19 19:55:52.551 SimplePing[1149:19595] #3 received
2016-03-19 19:55:53.493 SimplePing[1149:19595] #4 sent
2016-03-19 19:55:53.551 SimplePing[1149:19595] #4 received
2016-03-19 19:55:54.497 SimplePing[1149:19595] #5 sent
2016-03-19 19:55:54.556 SimplePing[1149:19595] #5 received
2016-03-19 19:55:55.494 SimplePing[1149:19595] #6 sent
2016-03-19 19:55:55.550 SimplePing[1149:19595] #6 received
2016-03-19 19:55:56.492 SimplePing[1149:19595] #7 sent
2016-03-19 19:55:56.551 SimplePing[1149:19595] #7 received
2016-03-19 19:55:57.498 SimplePing[1149:19595] #8 sent
2016-03-19 19:55:57.562 SimplePing[1149:19595] #8 received
2016-03-19 19:55:58.494 SimplePing[1149:19595] #9 sent
2016-03-19 19:55:58.552 SimplePing[1149:19595] #9 received
Try adding this to your didStartWithAddress:
- (void)simplePing:(SimplePing *)pinger didStartWithAddress:(NSData *)address
{
[pinger sendPingWithData:nil];
}

IOS Components From Date Changes Timezone

I am using
NSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:_startDate];
[components setHour:0];
[components setMinute:0];
[components setSecond:0];
_date = [CURRENT_CALENDAR dateFromComponents:components];
With dates I receive from an API.
The _date returns 2 different outputs depending on the calendar day:
2016-01-04 05:00:00 +0000
2015-10-26 04:00:00 +0000
As if there was a change in time zone.
Is there a reason the time of _date changes from 5 to 4 ?Is there something to prevent that?
Problem is that unexpected time offset (-1) reflects in all the other dates I create with dateFromComponents:components
Output for different dates showing the offset
2016-01-04 05:00:00 +0000
2015-12-21 05:00:00 +0000
2015-12-14 05:00:00 +0000
2015-12-07 05:00:00 +0000
2015-11-23 05:00:00 +0000
2015-11-16 05:00:00 +0000
2015-11-09 05:00:00 +0000
2015-11-02 05:00:00 +0000
2015-10-26 04:00:00 +0000
2015-10-19 04:00:00 +0000
2015-10-22 04:00:00 +0000
2015-10-01 04:00:00 +0000
2015-09-24 04:00:00 +0000

SQL database not showing. Ruby on rails

I’m trying to bring Adopt a Hydrant to Helsinki.
So far I've managed to change the location of the map to Helsinki, build a database with postgreSQL, set the private key and deploy the app in heroku (the app is available at paloposti.herokuapp.com).
However no hydrants are showing in the map. I’ve replaced all the latitudes and longitutes in the seeds.rb file and run:
bundle exec rake db:create
bundle exec rake db:schema:load
rake db:setup
bundle exec rake db:seed
I’m sure I’m missing something very stupid, but what?
my logs :
2015-08-15T11:47:39.043348+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:47:39.043351+00:00 app[web.1]: ):
2015-08-15T11:47:39.043353+00:00 app[web.1]: app/models/thing.rb:22:in `find_closest'
2015-08-15T11:47:39.043354+00:00 app[web.1]: app/controllers/things_controller.rb:5:in `show'
2015-08-15T11:47:39.043355+00:00 app[web.1]:
2015-08-15T11:47:39.043357+00:00 app[web.1]:
2015-08-15T11:50:07.856659+00:00 heroku[router]: at=info method=GET path="/things.json?utf8=%E2%9C%93&lat=60.180887&lng=24.94053800000006" host=paloposti.herokuapp.com request_id=568f316d-88c7-4fae-9d00-697994614ba9 fwd="82.214.17.63" dyno=web.1 connect=1ms service=6ms status=500 bytes=245
2015-08-15T11:50:07.848768+00:00 app[web.1]: Started GET "/things.json?utf8=%E2%9C%93&lat=60.180887&lng=24.94053800000006" for 82.214.17.63 at 2015-08-15 11:50:07 +0000
2015-08-15T11:50:07.850481+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "lat"=>"60.180887", "lng"=>"24.94053800000006"}
2015-08-15T11:50:07.852069+00:00 app[web.1]: Thing Load (0.8ms) SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:07.852071+00:00 app[web.1]: FROM things
2015-08-15T11:50:07.852074+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:07.852076+00:00 app[web.1]:
2015-08-15T11:50:07.852109+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "things" does not exist
2015-08-15T11:50:07.852110+00:00 app[web.1]: LINE 2: FROM things
2015-08-15T11:50:07.852112+00:00 app[web.1]: ^
2015-08-15T11:50:07.852116+00:00 app[web.1]: FROM things
2015-08-15T11:50:07.852117+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:07.852118+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:07.850436+00:00 app[web.1]: Processing by ThingsController#show as JSON
2015-08-15T11:50:07.852073+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:07.852245+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.8ms)
2015-08-15T11:50:07.852115+00:00 app[web.1]: : SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:07.852120+00:00 app[web.1]:
2015-08-15T11:50:07.853033+00:00 app[web.1]:
2015-08-15T11:50:07.853036+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "things" does not exist
2015-08-15T11:50:07.853038+00:00 app[web.1]: LINE 2: FROM things
2015-08-15T11:50:07.853039+00:00 app[web.1]: ^
2015-08-15T11:50:07.853040+00:00 app[web.1]: : SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:07.853042+00:00 app[web.1]: FROM things
2015-08-15T11:50:07.853043+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:07.853044+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:07.853046+00:00 app[web.1]: ):
2015-08-15T11:50:07.853047+00:00 app[web.1]: app/models/thing.rb:22:in `find_closest'
2015-08-15T11:50:07.853048+00:00 app[web.1]: app/controllers/things_controller.rb:5:in `show'
2015-08-15T11:50:07.853050+00:00 app[web.1]:
2015-08-15T11:50:07.853051+00:00 app[web.1]:
2015-08-15T11:50:12.578442+00:00 heroku[router]: at=info method=GET path="/things.json?utf8=%E2%9C%93&lat=60.180887&lng=24.94053800000006" host=paloposti.herokuapp.com request_id=03a40dd8-6fdd-4a34-8258-b37583c1d490 fwd="82.214.17.63" dyno=web.1 connect=1ms service=7ms status=500 bytes=245
2015-08-15T11:50:12.569835+00:00 app[web.1]: Started GET "/things.json?utf8=%E2%9C%93&lat=60.180887&lng=24.94053800000006" for 82.214.17.63 at 2015-08-15 11:50:12 +0000
2015-08-15T11:50:12.573575+00:00 app[web.1]: LINE 2: FROM things
2015-08-15T11:50:12.573578+00:00 app[web.1]: : SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:12.573580+00:00 app[web.1]: FROM things
2015-08-15T11:50:12.573581+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:12.573583+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:12.573536+00:00 app[web.1]: Thing Load (1.3ms) SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:12.573584+00:00 app[web.1]:
2015-08-15T11:50:12.573542+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:12.573573+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "things" does not exist
2015-08-15T11:50:12.571510+00:00 app[web.1]: Processing by ThingsController#show as JSON
2015-08-15T11:50:12.574536+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "things" does not exist
2015-08-15T11:50:12.573540+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:12.571537+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "lat"=>"60.180887", "lng"=>"24.94053800000006"}
2015-08-15T11:50:12.573543+00:00 app[web.1]:
2015-08-15T11:50:12.573709+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.3ms)
2015-08-15T11:50:12.574539+00:00 app[web.1]: ^
2015-08-15T11:50:12.574534+00:00 app[web.1]:
2015-08-15T11:50:12.574541+00:00 app[web.1]: : SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:12.574538+00:00 app[web.1]: LINE 2: FROM things
2015-08-15T11:50:12.574542+00:00 app[web.1]: FROM things
2015-08-15T11:50:12.574543+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:12.573576+00:00 app[web.1]: ^
2015-08-15T11:50:12.573539+00:00 app[web.1]: FROM things
2015-08-15T11:50:12.574545+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:12.574548+00:00 app[web.1]: app/models/thing.rb:22:in `find_closest'
2015-08-15T11:50:12.574546+00:00 app[web.1]: ):
2015-08-15T11:50:12.574550+00:00 app[web.1]:
2015-08-15T11:50:12.574551+00:00 app[web.1]:
2015-08-15T11:50:12.574549+00:00 app[web.1]: app/controllers/things_controller.rb:5:in `show'
2015-08-15T11:50:12.886199+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=paloposti.herokuapp.com request_id=0f37c35f-4795-453f-8f43-2b51fd0533f5 fwd="82.214.17.63" dyno=web.1 connect=4ms service=2ms status=200 bytes=736
2015-08-15T11:50:13.655695+00:00 app[web.1]: Started GET "/things.json?utf8=%E2%9C%93&lat=60.180887&lng=24.94053800000006" for 82.214.17.63 at 2015-08-15 11:50:13 +0000
2015-08-15T11:50:13.657311+00:00 app[web.1]: Processing by ThingsController#show as JSON
2015-08-15T11:50:13.657318+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "lat"=>"60.180887", "lng"=>"24.94053800000006"}
2015-08-15T11:50:13.659033+00:00 app[web.1]: Thing Load (1.0ms) SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:13.659036+00:00 app[web.1]: FROM things
2015-08-15T11:50:13.659037+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:13.659038+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:13.659040+00:00 app[web.1]:
2015-08-15T11:50:13.659066+00:00 app[web.1]: PG::UndefinedTable: ERROR: relation "things" does not exist
2015-08-15T11:50:13.659067+00:00 app[web.1]: LINE 2: FROM things
2015-08-15T11:50:13.659069+00:00 app[web.1]: ^
2015-08-15T11:50:13.659070+00:00 app[web.1]: : SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:13.659072+00:00 app[web.1]: FROM things
2015-08-15T11:50:13.659073+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:13.659075+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:13.659076+00:00 app[web.1]:
2015-08-15T11:50:13.659209+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.0ms)
2015-08-15T11:50:13.659999+00:00 app[web.1]:
2015-08-15T11:50:13.660004+00:00 app[web.1]: ^
2015-08-15T11:50:13.660006+00:00 app[web.1]: : SELECT *, (3959 * ACOS(COS(RADIANS(60.180887)) * COS(RADIANS(lat)) * COS(RADIANS(lng) - RADIANS(24.94053800000006)) + SIN(RADIANS(60.180887)) * SIN(RADIANS(lat)))) AS distance
2015-08-15T11:50:13.660001+00:00 app[web.1]: ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "things" does not exist
2015-08-15T11:50:13.660003+00:00 app[web.1]: LINE 2: FROM things
2015-08-15T11:50:13.660007+00:00 app[web.1]: FROM things
2015-08-15T11:50:13.660009+00:00 app[web.1]: ORDER BY distance
2015-08-15T11:50:13.660011+00:00 app[web.1]: ):
2015-08-15T11:50:13.660010+00:00 app[web.1]: LIMIT 10
2015-08-15T11:50:13.660013+00:00 app[web.1]: app/models/thing.rb:22:in `find_closest'
2015-08-15T11:50:13.660015+00:00 app[web.1]: app/controllers/things_controller.rb:5:in `show'
2015-08-15T11:50:13.660016+00:00 app[web.1]:
2015-08-15T11:50:13.660017+00:00 app[web.1]:
2015-08-15T11:50:13.663608+00:00 heroku[router]: at=info method=GET path="/things.json?utf8=%E2%9C%93&lat=60.180887&lng=24.94053800000006" host=paloposti.herokuapp.com request_id=e523b244-725d-4671-82db-2555d0836704 fwd="82.214.17.63" dyno=web.1 connect=1ms service=6ms status=500 bytes=245
2015-08-15T11:50:13.876213+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=paloposti.herokuapp.com request_id=f81408cd-cdc4-4c6b-afda-a4d8633bf033 fwd="82.214.17.63" dyno=web.1 connect=1ms service=1ms status=200 bytes=736
When you run bundle exec rake db:seed. You are actually just running it on your local machine. So to seed to the database on heroku you would run heroku run rake db:seed.

Resources