Skip to content

Commit

Permalink
DOC - added proper copyright statement
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoostenveld committed Jan 6, 2025
1 parent 3901097 commit 1396046
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 22 deletions.
21 changes: 18 additions & 3 deletions fileio/private/db_close.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,28 @@
%
% Use as
% db_close
%
% See also DB_OPEN, DB_SELECT, DB_INSERT, DB_SELECT_BLOB, DB_INSERT_BLOB

% Copyright (C) 2007, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% $Log: db_close.m,v $
% Revision 1.1 2007/11/07 10:50:45 roboos
% created helper functions for easy access to a MySQL database table using a structure for representing the data
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

mysql('close');

22 changes: 17 additions & 5 deletions fileio/private/db_insert.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,28 @@ function db_insert(tablename, s)
%
% Use as
% db_insert(tablename, s)
%
% See also DB_OPEN, DB_SELECT, DB_SELECT_BLOB, DB_INSERT_BLOB, DB_CLOSE

% Copyright (C) 2007, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% $Log: db_insert.m,v $
% Revision 1.2 2007/12/03 12:35:24 roboos
% fixed bug when input is double([])
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% Revision 1.1 2007/11/07 10:50:46 roboos
% created helper functions for easy access to a MySQL database table using a structure for representing the data
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

if isempty(s)
% the input consists of an empty structure. so nothing to do
Expand Down
21 changes: 18 additions & 3 deletions fileio/private/db_insert_blob.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,28 @@ function db_insert_blob(tablename, fieldname, s)
%
% Use as
% db_insert_blob(tablename, fieldname, s)
%
% See also DB_OPEN, DB_SELECT, DB_SELECT_BLOB, DB_INSERT, DB_CLOSE

% Copyright (C) 2007, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% $Log: db_insert_blob.m,v $
% Revision 1.1 2007/11/07 10:50:45 roboos
% created helper functions for easy access to a MySQL database table using a structure for representing the data
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

format = 'serialize';
cmd = sprintf('insert into %s ( %s ) values ( "{M}" )', tablename, fieldname);
Expand Down
22 changes: 17 additions & 5 deletions fileio/private/db_open.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,28 @@ function db_open(user, password, server, port, database)
% db_open
% db_open(user, password, server, port, database)
% db_open('mysql://<user>:<password>@<host>:<port>')
%
% See also DB_CLOSE, DB_SELECT, DB_INSERT, DB_SELECT_BLOB, DB_INSERT_BLOB

% Copyright (C) 2007, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% $Log: db_open.m,v $
% Revision 1.2 2007/11/27 14:38:49 roboos
% added query "use database"
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% Revision 1.1 2007/11/07 10:50:46 roboos
% created helper functions for easy access to a MySQL database table using a structure for representing the data
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

% persistent variables should be defined at the beginning of the function
persistent prev_filename
Expand Down
21 changes: 18 additions & 3 deletions fileio/private/db_select.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@
% s = db_select(tablename, fields, num)
%
% The optional argument num allows you to select a specific row number.
%
% See also DB_OPEN, DB_INSERT, DB_SELECT_BLOB, DB_INSERT_BLOB, DB_CLOSE

% Copyright (C) 2007, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% $Log: db_select.m,v $
% Revision 1.1 2007/11/07 10:50:46 roboos
% created helper functions for easy access to a MySQL database table using a structure for representing the data
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

nfields = length(fields);
fieldstr = sprintf('%s, ', fields{:});
Expand Down
21 changes: 18 additions & 3 deletions fileio/private/db_select_blob.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,28 @@
% s = db_select_blob(tablename, fieldname, num)
%
% The optional argument num allows you to select a specific row number.
%
% See also DB_OPEN, DB_INSERT, DB_SELECT, DB_INSERT_BLOB, DB_CLOSE

% Copyright (C) 2007, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% $Log: db_select_blob.m,v $
% Revision 1.1 2007/11/07 10:50:46 roboos
% created helper functions for easy access to a MySQL database table using a structure for representing the data
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

format = 'serialize';

Expand Down
18 changes: 18 additions & 0 deletions fileio/private/fixsampleinfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@
% See also FT_DATATYPE_RAW, FT_DATATYPE_TIMELOCK

% Copyright (C) 2009-2020, Robert Oostenveld and Jan-Mathijs Schoffelen
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

if isfield(data, 'sampleinfo')
% sampleinfo is present (as requested), trialinfo is optional
Expand Down
16 changes: 16 additions & 0 deletions fileio/private/loadvar.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
% See also SAVEVAR

% Copyright (C) 2010, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

Expand Down
16 changes: 16 additions & 0 deletions fileio/private/read_ply.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@
% See also WRITE_PLY, WRITE_VTK, READ_VTK

% Copyright (C) 2013-2018, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

Expand Down
18 changes: 18 additions & 0 deletions fileio/private/volumewrite_spm.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@

% Copyright (C) 2006, Robert Oostenveld
% Copyright (C) 2011, Jan-Mathijs Schoffelen
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

if nargin<4 || isempty(spmversion)
spmversion = 'spm12';
Expand Down
16 changes: 16 additions & 0 deletions fileio/private/write_ply.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ function write_ply(fn, pnt, tri, format)
% See also READ_PLY, READ_VTK, WRITE_VTK

% Copyright (C) 2012, Robert Oostenveld
%
% This file is part of FieldTrip, see http://www.fieldtriptoolbox.org
% for the documentation and details.
%
% FieldTrip is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% FieldTrip is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with FieldTrip. If not, see <http://www.gnu.org/licenses/>.
%
% $Id$

Expand Down

0 comments on commit 1396046

Please sign in to comment.