package ojs_ed
Using file editor in ojs_base applications, common part
Install
Dune Dependency
Authors
Maintainers
Sources
ojs-base-0.8.0.tar.bz2
md5=e706f1f9ec2f935d29c6b6e4832c8bdf
sha512=2596f6c59bea9c6b89923099c604a0e095a96880e7e91b06357e1de50867ae7e0261c87c35f608b7e426bddd6dd025a9868c07499287116ed458de4a0b9e9f30
doc/src/ojs_ed.server/files.ml.html
Source file files.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
(*********************************************************************************) (* Ojs-base *) (* *) (* Copyright (C) 2014-2021 INRIA. All rights reserved. *) (* *) (* This program 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, version 3 of the License. *) (* *) (* This program 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 Library General Public License for more details. *) (* *) (* You should have received a copy of the GNU General Public *) (* License along with this program; if not, write to the Free Software *) (* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *) (* 02111-1307 USA *) (* *) (* As a special exception, you have permission to link this program *) (* with the OCaml compiler and distribute executables, as long as you *) (* follow the requirements of the GNU GPL in regard to all of the *) (* software in the executable aside from the OCaml compiler. *) (* *) (* Contact: Maxence.Guesdon@inria.fr *) (* *) (*********************************************************************************) (** *) (*c==v=[File.string_of_file]=1.1====*) let string_of_file name = let chanin = open_in_bin name in let len = 1024 in let s = Bytes.create len in let buf = Buffer.create len in let rec iter () = try let n = input chanin s 0 len in if n = 0 then () else ( Buffer.add_subbytes buf s 0 n; iter () ) with End_of_file -> () in iter (); close_in chanin; Buffer.contents buf (*/c==v=[File.string_of_file]=1.1====*) (*c==v=[File.file_of_string]=1.1====*) let file_of_string ~file s = let oc = open_out file in output_string oc s; close_out oc (*/c==v=[File.file_of_string]=1.1====*)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>