How do I include a .pl file in Prolog?

If your file is called foo.pl, you can include it using :- [foo]. or, equivalently and a bit more explicit :- consult(foo). or, if you’re worried it may be loaded several times in a larger app :- ensure_loaded(foo). or, if you’re using full-blown modules :- use_module(foo). though the exact name of the last predicate differs … Read more

Where “include” in C++

As a rule, put your includes in the .cpp files when you can, and only in the .h files when that is not possible. You can use forward declarations to remove the need to include headers from other headers in many cases: this can help reduce compilation time which can become a big issue as … Read more

rsync exclude a directory but include a subdirectory

Sometime it’s just a detail. Just change your include pattern adding a trailing / at the end of include pattern and it’ll work: rsync -avz –delete –include=specs/install/project1/ \ –exclude=specs/* /srv/http/projects/project/ \ [email protected]:~/projects/project Or, in alternative, prepare a filter file like this: $ cat << EOF >pattern.txt > + specs/install/project1/ > – specs/* > EOF Then … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)