Answer the question
In order to leave comments, you need to log in
Difficulties with Xcode
There is a project like this:
Project
{
Class1.cpp
Class2.cpp
…
Core
{
Class1.cpp
Framework
{
Class2.cpp
}
}
}
But I still haven't figured out how to connect it to Xcode. And I also didn’t understand the tricks with folders and subfolders, how are they created? I think there are experienced Xcode users here, I hope for you. Thank you.
Xcode 4.6.3
Answer the question
In order to leave comments, you need to log in
If the project is not from Xcode, then it is enough to create an empty project and add all these files (File - Add Files).
If the project is from Xcode, then there is a file with the extension .xcodeproj, which must be opened in Xcode.
IMHO, @alexclear has overcomplicated it . It can be easier:
SELECT a.* FROM Apartment a
LEFT JOIN Apartment_Dates ad
ON ad.apartment_id=a.id AND ? BETWEEN ad.arrival_time AND ad.departure_time
WHERE ad.id IS NULL
select a.id, a.location from apartments a
where not exists (select d.apartment_id
from apartment_dates d
where d.apartment_id = a.id
and d.arrival_time<=? and d.departure_time>=?)
You need to use the Apartment_Dates table as an index. And in my experience < and > are faster than BETWEEN.
It is better to use reverse logic than direct. Since when the intervals are free are in different rows of records.
SELECT a.*
FROM Apartment AS a
WHERE a.id NOT IN(SELECT apartment_id
FROM Apartment_Dates
WHERE ? <= departure_time AND ? >= arrival_time)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question