├── JewishCalendar
├── PHPExcel
│ ├── .htaccess
│ └── PHPExcel
│ │ ├── Chart
│ │ ├── Renderer
│ │ │ └── PHP Charting Libraries.txt
│ │ ├── Exception.php
│ │ ├── Title.php
│ │ └── PlotArea.php
│ │ ├── Shared
│ │ ├── JAMA
│ │ │ ├── CHANGELOG.TXT
│ │ │ ├── utils
│ │ │ │ ├── Maths.php
│ │ │ │ └── Error.php
│ │ │ └── CholeskyDecomposition.php
│ │ ├── Escher
│ │ │ ├── DggContainer
│ │ │ │ ├── BstoreContainer.php
│ │ │ │ └── BstoreContainer
│ │ │ │ │ ├── BSE
│ │ │ │ │ └── Blip.php
│ │ │ │ │ └── BSE.php
│ │ │ ├── DgContainer.php
│ │ │ └── DgContainer
│ │ │ │ └── SpgrContainer.php
│ │ ├── PasswordHasher.php
│ │ ├── Escher.php
│ │ ├── OLE
│ │ │ └── PPS
│ │ │ │ └── File.php
│ │ ├── XMLWriter.php
│ │ └── trend
│ │ │ ├── linearBestFitClass.php
│ │ │ ├── logarithmicBestFitClass.php
│ │ │ └── powerBestFitClass.php
│ │ ├── locale
│ │ ├── en
│ │ │ └── uk
│ │ │ │ └── config
│ │ ├── bg
│ │ │ └── config
│ │ ├── de
│ │ │ └── config
│ │ ├── fr
│ │ │ └── config
│ │ ├── it
│ │ │ └── config
│ │ ├── no
│ │ │ └── config
│ │ ├── pt
│ │ │ ├── config
│ │ │ └── br
│ │ │ │ └── config
│ │ ├── ru
│ │ │ └── config
│ │ ├── tr
│ │ │ └── config
│ │ ├── cs
│ │ │ └── config
│ │ ├── nl
│ │ │ └── config
│ │ ├── pl
│ │ │ └── config
│ │ ├── hu
│ │ │ └── config
│ │ ├── da
│ │ │ └── config
│ │ ├── sv
│ │ │ └── config
│ │ ├── fi
│ │ │ └── config
│ │ └── es
│ │ │ └── config
│ │ ├── IComparable.php
│ │ ├── Writer
│ │ ├── OpenDocument
│ │ │ ├── WriterPart.php
│ │ │ ├── Thumbnails.php
│ │ │ ├── Mimetype.php
│ │ │ ├── Cell
│ │ │ │ └── Comment.php
│ │ │ ├── Settings.php
│ │ │ └── MetaInf.php
│ │ ├── IWriter.php
│ │ ├── Exception.php
│ │ ├── Excel2007
│ │ │ ├── WriterPart.php
│ │ │ ├── RelsVBA.php
│ │ │ └── RelsRibbon.php
│ │ └── PDF.php
│ │ ├── Reader
│ │ ├── IReadFilter.php
│ │ ├── IReader.php
│ │ ├── Exception.php
│ │ ├── DefaultReadFilter.php
│ │ ├── Excel5
│ │ │ └── RC4.php
│ │ └── Excel2007
│ │ │ └── Theme.php
│ │ ├── Cell
│ │ ├── IValueBinder.php
│ │ ├── Hyperlink.php
│ │ ├── DataType.php
│ │ └── DefaultValueBinder.php
│ │ ├── Calculation
│ │ ├── ExceptionHandler.php
│ │ ├── Exception.php
│ │ ├── Token
│ │ │ └── Stack.php
│ │ ├── functionlist.txt
│ │ └── Function.php
│ │ ├── Exception.php
│ │ ├── RichText
│ │ ├── ITextElement.php
│ │ ├── TextElement.php
│ │ └── Run.php
│ │ ├── CalcEngine
│ │ ├── CyclicReferenceStack.php
│ │ └── Logger.php
│ │ ├── Worksheet
│ │ ├── CellIterator.php
│ │ ├── Row.php
│ │ ├── Column.php
│ │ └── Drawing.php
│ │ ├── WorksheetIterator.php
│ │ ├── Autoloader.php
│ │ ├── Style
│ │ └── Supervisor.php
│ │ └── CachedObjectStorage
│ │ ├── ICache.php
│ │ └── Memory.php
├── logo.png
├── css.css
├── README.md
├── js.js
└── api.php
├── README.md
├── .github
└── workflows
│ └── php.yml
├── composer.json
└── Zmaney Hayom API
├── README.md
└── ZmaneyHayomApi.php
/JewishCalendar/PHPExcel/.htaccess:
--------------------------------------------------------------------------------
1 | deny from all
--------------------------------------------------------------------------------
/JewishCalendar/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YehudaEi/Hebrew-Calendar-PHP/master/JewishCalendar/logo.png
--------------------------------------------------------------------------------
/JewishCalendar/css.css:
--------------------------------------------------------------------------------
1 | .form {
2 | width: 100%;
3 | max-width: 330px;
4 | padding: 15px;
5 | margin: 0 auto;
6 | }
--------------------------------------------------------------------------------
/JewishCalendar/README.md:
--------------------------------------------------------------------------------
1 | # JewishCalendar
2 |
3 | * [Demo](https://yehudae.net/JewishCalendar/)
4 | * Site for converting and calculating a Gregorian date to a Hebrew date.
5 | * Includes options for exporting to a wide range of platforms
6 | * Suitable for both computers and phones
7 | * Works after 2038 (2038 bug)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hebrew Calendar In php
2 |
3 | => JewishCalendar
4 | * [Demo](https://yehudae.net/JewishCalendar/)
5 | * Site for converting and calculating a Gregorian date to a Hebrew date.
6 |
7 |
8 | => Zmaney Hayom API
9 | * API that gives the time of day (including sunrise, sunset, etc.)
10 | * Very simple to use, consists of only one file!
11 |
12 |
13 | Feedback: [HebCalendar@yehudae.net](mailto:HebCalendar@yehudae.net)
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Chart/Renderer/PHP Charting Libraries.txt:
--------------------------------------------------------------------------------
1 | ChartDirector
2 | http://www.advsofteng.com/cdphp.html
3 |
4 | GraPHPite
5 | http://graphpite.sourceforge.net/
6 |
7 | JpGraph
8 | http://www.aditus.nu/jpgraph/
9 |
10 | LibChart
11 | http://naku.dohcrew.com/libchart/pages/introduction/
12 |
13 | pChart
14 | http://pchart.sourceforge.net/
15 |
16 | TeeChart
17 | http://www.steema.com/products/teechart/overview.html
18 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/JAMA/CHANGELOG.TXT:
--------------------------------------------------------------------------------
1 | Mar 1, 2005 11:15 AST by PM
2 |
3 | + For consistency, renamed Math.php to Maths.java, utils to util,
4 | tests to test, docs to doc -
5 |
6 | + Removed conditional logic from top of Matrix class.
7 |
8 | + Switched to using hypo function in Maths.php for all php-hypot calls.
9 | NOTE TO SELF: Need to make sure that all decompositions have been
10 | switched over to using the bundled hypo.
11 |
12 | Feb 25, 2005 at 10:00 AST by PM
13 |
14 | + Recommend using simpler Error.php instead of JAMA_Error.php but
15 | can be persuaded otherwise.
16 |
17 |
--------------------------------------------------------------------------------
/.github/workflows/php.yml:
--------------------------------------------------------------------------------
1 | name: PHP Composer
2 |
3 | on: [push]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v1
12 |
13 | - name: Validate composer.json and composer.lock
14 | run: composer validate
15 |
16 | - name: Install dependencies
17 | run: composer install --prefer-dist --no-progress --no-suggest
18 |
19 | # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
20 | # Docs: https://getcomposer.org/doc/articles/scripts.md
21 |
22 | # - name: Run test suite
23 | # run: composer run-script test
24 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "yehudae/hebrew-celander-php",
3 | "type": "library",
4 | "description": "get hebrew date other jewish info",
5 | "keywords": ["celander","api","hebrew","jewish"],
6 | "homepage": "https://github.com/YehudaEi/Hebrew-Celander-PHP",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Yehuda Eisenberg",
11 | "email": "Yehuda.Telegram@gmail.com",
12 | "homepage": "https://YehudaE.ga",
13 | "role": "Developer"
14 | }
15 | ],
16 | "require": {
17 | "php": ">=5.3.0"
18 | },
19 | "autoload": {
20 | "psr-0": {
21 | "YehudaEi": "hebCelanderApi.php"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Zmaney Hayom API/README.md:
--------------------------------------------------------------------------------
1 | # Zmaney-Hayom-API
2 | Zmaney-Hayom in php -
זמני היום מדוייקים בשפת PHP
3 |
4 | # Do not rely on times for Dauriyta! - אין לסמוך על הזמנים לדאורייתא!
5 |
6 | The best library for calculating daytime times in PHP - הספרייה הכי טובה לחישוב של זמני היום ב-PHP
7 |
8 | Returned:
9 | * Zmanit (MGA) - שעה זמנית (מג"א)
10 | * Zmanit (GRA) - שעה זמנית (גר"א)
11 | * Date - תאריך
12 | * Alot Hashahar - עלות השחר
13 | * Talit And Tfilin - זמן טלית ותפילין
14 | * Sunrise - זריחה
15 | * End Kriat Shma (MGA) - סזק"ש (מג"א)
16 | * End Tfilha (MGA) - סזת"פ (מג"א)
17 | * End Kriat Shma (GRA) - סזק"ש (גר"א)
18 | * End Tfilha (GRA) - סזת"פ (גר"א)
19 | * Midnight - חצות
20 | * Mincha Gdola - מנחה גדולה
21 | * Plag Mincha - פלג המנחה
22 | * Sunset - שקיעה
23 | * Tzet HaCochavim - צאת הכוכבים
24 |
25 | All in one short file! Very simple to use!
26 | Enjoy :)
27 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/JAMA/utils/Maths.php:
--------------------------------------------------------------------------------
1 | abs($b)) {
16 | $r = $b / $a;
17 | $r = abs($a) * sqrt(1 + $r * $r);
18 | } elseif ($b != 0) {
19 | $r = $a / $b;
20 | $r = abs($b) * sqrt(1 + $r * $r);
21 | } else {
22 | $r = 0.0;
23 | }
24 | return $r;
25 | } // function hypo()
26 |
27 |
28 | /**
29 | * Mike Bommarito's version.
30 | * Compute n-dimensional hyotheneuse.
31 | *
32 | function hypot() {
33 | $s = 0;
34 | foreach (func_get_args() as $d) {
35 | if (is_numeric($d)) {
36 | $s += pow($d, 2);
37 | } else {
38 | throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException));
39 | }
40 | }
41 | return sqrt($s);
42 | }
43 | */
44 |
--------------------------------------------------------------------------------
/JewishCalendar/js.js:
--------------------------------------------------------------------------------
1 | function messageAlert(s,a,e=!1){var l='';e?$("#message").html(l):$("#message").append(l)}
2 |
3 | $(document).ready(function(){
4 | $(document).on("click", "#submit", function(){
5 | $("#submit").attr('disabled','disabled');
6 | $("#submit").text("טוען...");
7 |
8 | $.ajax({
9 | type: "POST",
10 | url: "api.php",
11 | data: JSON.stringify({
12 | date: $("#date").val(),
13 | name: $("#name").val(),
14 | night: $("#night")[0].checked,
15 | type: $("#type").val()
16 | }),
17 | contentType: "application/json; charset=utf-8",
18 | success: function(data){
19 | $("#submit").removeAttr('disabled');
20 | $("#submit").text("חשב");
21 | $("#result").html(data);
22 | },
23 | failure: function(errMsg){messageAlert(errMsg, "danger");}
24 | });
25 | });
26 | });
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/locale/en/uk/config:
--------------------------------------------------------------------------------
1 | ##
2 | ## PHPExcel
3 | ##
4 | ## Copyright (c) 2006 - 2013 PHPExcel
5 | ##
6 | ## This library is free software; you can redistribute it and/or
7 | ## modify it under the terms of the GNU Lesser General Public
8 | ## License as published by the Free Software Foundation; either
9 | ## version 2.1 of the License, or (at your option) any later version.
10 | ##
11 | ## This library is distributed in the hope that it will be useful,
12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | ## Lesser General Public License for more details.
15 | ##
16 | ## You should have received a copy of the GNU Lesser General Public
17 | ## License along with this library; if not, write to the Free Software
18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 | ##
20 | ## @category PHPExcel
21 | ## @package PHPExcel_Settings
22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
24 | ## @version ##VERSION##, ##DATE##
25 | ##
26 | ##
27 |
28 |
29 | ##
30 | ## (For future use)
31 | ##
32 | currencySymbol = £
33 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/locale/bg/config:
--------------------------------------------------------------------------------
1 | ##
2 | ## PHPExcel
3 | ##
4 |
5 | ## Copyright (c) 2006 - 2013 PHPExcel
6 | ##
7 | ## This library is free software; you can redistribute it and/or
8 | ## modify it under the terms of the GNU Lesser General Public
9 | ## License as published by the Free Software Foundation; either
10 | ## version 2.1 of the License, or (at your option) any later version.
11 | ##
12 | ## This library is distributed in the hope that it will be useful,
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | ## Lesser General Public License for more details.
16 | ##
17 | ## You should have received a copy of the GNU Lesser General Public
18 | ## License along with this library; if not, write to the Free Software
19 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 | ##
21 | ## @category PHPExcel
22 | ## @package PHPExcel_Settings
23 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)
24 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 | ## @version ##VERSION##, ##DATE##
26 | ##
27 | ##
28 |
29 |
30 | ArgumentSeparator = ;
31 |
32 |
33 | ##
34 | ## (For future use)
35 | ##
36 | currencySymbol = лв
37 |
38 |
39 | ##
40 | ## Excel Error Codes (For future use)
41 |
42 | ##
43 | NULL = #ПРАЗНО!
44 | DIV0 = #ДЕЛ/0!
45 | VALUE = #СТОЙНОСТ!
46 | REF = #РЕФ!
47 | NAME = #ИМЕ?
48 | NUM = #ЧИСЛО!
49 | NA = #Н/Д
50 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/IComparable.php:
--------------------------------------------------------------------------------
1 | line = $line;
49 | $e->file = $file;
50 | throw $e;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Reader/Exception.php:
--------------------------------------------------------------------------------
1 | line = $line;
49 | $e->file = $file;
50 | throw $e;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/Exception.php:
--------------------------------------------------------------------------------
1 | line = $line;
49 | $e->file = $file;
50 | throw $e;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Exception.php:
--------------------------------------------------------------------------------
1 | line = $line;
49 | $e->file = $file;
50 | throw $e;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Calculation/Exception.php:
--------------------------------------------------------------------------------
1 | line = $line;
49 | $e->file = $file;
50 | throw $e;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/RichText/ITextElement.php:
--------------------------------------------------------------------------------
1 |
36 | */
37 | class PHPExcel_Writer_OpenDocument_Thumbnails extends PHPExcel_Writer_OpenDocument_WriterPart
38 | {
39 | /**
40 | * Write Thumbnails/thumbnail.png to PNG format
41 | *
42 | * @param PHPExcel $pPHPExcel
43 | * @return string XML Output
44 | * @throws PHPExcel_Writer_Exception
45 | */
46 | public function writeThumbnail(PHPExcel $pPHPExcel = null)
47 | {
48 | return '';
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/OpenDocument/Mimetype.php:
--------------------------------------------------------------------------------
1 |
36 | */
37 | class PHPExcel_Writer_OpenDocument_Mimetype extends PHPExcel_Writer_OpenDocument_WriterPart
38 | {
39 | /**
40 | * Write mimetype to plain text format
41 | *
42 | * @param PHPExcel $pPHPExcel
43 | * @return string XML Output
44 | * @throws PHPExcel_Writer_Exception
45 | */
46 | public function write(PHPExcel $pPHPExcel = null)
47 | {
48 | return 'application/vnd.oasis.opendocument.spreadsheet';
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Reader/DefaultReadFilter.php:
--------------------------------------------------------------------------------
1 | _BSECollection[] = $BSE;
52 | $BSE->setParent($this);
53 | }
54 |
55 | /**
56 | * Get the collection of BLIP Store Entries
57 | *
58 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE[]
59 | */
60 | public function getBSECollection()
61 | {
62 | return $this->_BSECollection;
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/Escher/DgContainer.php:
--------------------------------------------------------------------------------
1 | _dgId;
56 | }
57 |
58 | public function setDgId($value)
59 | {
60 | $this->_dgId = $value;
61 | }
62 |
63 | public function getLastSpId()
64 | {
65 | return $this->_lastSpId;
66 | }
67 |
68 | public function setLastSpId($value)
69 | {
70 | $this->_lastSpId = $value;
71 | }
72 |
73 | public function getSpgrContainer()
74 | {
75 | return $this->_spgrContainer;
76 | }
77 |
78 | public function setSpgrContainer($spgrContainer)
79 | {
80 | return $this->_spgrContainer = $spgrContainer;
81 | }
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Chart/Title.php:
--------------------------------------------------------------------------------
1 | _caption = $caption;
59 | $this->_layout = $layout;
60 | }
61 |
62 | /**
63 | * Get caption
64 | *
65 | * @return string
66 | */
67 | public function getCaption() {
68 | return $this->_caption;
69 | }
70 |
71 | /**
72 | * Set caption
73 | *
74 | * @param string $caption
75 | * @return PHPExcel_Chart_Title
76 | */
77 | public function setCaption($caption = null) {
78 | $this->_caption = $caption;
79 |
80 | return $this;
81 | }
82 |
83 | /**
84 | * Get Layout
85 | *
86 | * @return PHPExcel_Chart_Layout
87 | */
88 | public function getLayout() {
89 | return $this->_layout;
90 | }
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php:
--------------------------------------------------------------------------------
1 | _data;
59 | }
60 |
61 | /**
62 | * Set the raw image data
63 | *
64 | * @param string
65 | */
66 | public function setData($data)
67 | {
68 | $this->_data = $data;
69 | }
70 |
71 | /**
72 | * Set parent BSE
73 | *
74 | * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent
75 | */
76 | public function setParent($parent)
77 | {
78 | $this->_parent = $parent;
79 | }
80 |
81 | /**
82 | * Get parent BSE
83 | *
84 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent
85 | */
86 | public function getParent()
87 | {
88 | return $this->_parent;
89 | }
90 |
91 | }
92 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/PasswordHasher.php:
--------------------------------------------------------------------------------
1 | .
44 | *
45 | * @param string $pPassword Password to hash
46 | * @return string Hashed password
47 | */
48 | public static function hashPassword($pPassword = '') {
49 | $password = 0x0000;
50 | $charPos = 1; // char position
51 |
52 | // split the plain text password in its component characters
53 | $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY);
54 | foreach ($chars as $char) {
55 | $value = ord($char) << $charPos++; // shifted ASCII value
56 | $rotated_bits = $value >> 15; // rotated bits beyond bit 15
57 | $value &= 0x7fff; // first 15 bits
58 | $password ^= ($value | $rotated_bits);
59 | }
60 |
61 | $password ^= strlen($pPassword);
62 | $password ^= 0xCE4B;
63 |
64 | return(strtoupper(dechex($password)));
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/Escher.php:
--------------------------------------------------------------------------------
1 | _dggContainer;
59 | }
60 |
61 | /**
62 | * Set Drawing Group Container
63 | *
64 | * @param PHPExcel_Shared_Escher_DggContainer $dggContainer
65 | */
66 | public function setDggContainer($dggContainer)
67 | {
68 | return $this->_dggContainer = $dggContainer;
69 | }
70 |
71 | /**
72 | * Get Drawing Container
73 | *
74 | * @return PHPExcel_Shared_Escher_DgContainer
75 | */
76 | public function getDgContainer()
77 | {
78 | return $this->_dgContainer;
79 | }
80 |
81 | /**
82 | * Set Drawing Container
83 | *
84 | * @param PHPExcel_Shared_Escher_DgContainer $dgContainer
85 | */
86 | public function setDgContainer($dgContainer)
87 | {
88 | return $this->_dgContainer = $dgContainer;
89 | }
90 |
91 | }
92 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/Excel2007/WriterPart.php:
--------------------------------------------------------------------------------
1 | _parentWriter = $pWriter;
53 | }
54 |
55 | /**
56 | * Get parent IWriter object
57 | *
58 | * @return PHPExcel_Writer_IWriter
59 | * @throws PHPExcel_Writer_Exception
60 | */
61 | public function getParentWriter() {
62 | if (!is_null($this->_parentWriter)) {
63 | return $this->_parentWriter;
64 | } else {
65 | throw new PHPExcel_Writer_Exception("No parent PHPExcel_Writer_IWriter assigned.");
66 | }
67 | }
68 |
69 | /**
70 | * Set parent IWriter object
71 | *
72 | * @param PHPExcel_Writer_IWriter $pWriter
73 | * @throws PHPExcel_Writer_Exception
74 | */
75 | public function __construct(PHPExcel_Writer_IWriter $pWriter = null) {
76 | if (!is_null($pWriter)) {
77 | $this->_parentWriter = $pWriter;
78 | }
79 | }
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/CalcEngine/CyclicReferenceStack.php:
--------------------------------------------------------------------------------
1 | _stack);
53 | }
54 |
55 | /**
56 | * Push a new entry onto the stack
57 | *
58 | * @param mixed $value
59 | */
60 | public function push($value) {
61 | $this->_stack[$value] = $value;
62 | }
63 |
64 | /**
65 | * Pop the last entry from the stack
66 | *
67 | * @return mixed
68 | */
69 | public function pop() {
70 | return array_pop($this->_stack);
71 | }
72 |
73 | /**
74 | * Test to see if a specified entry exists on the stack
75 | *
76 | * @param mixed $value The value to test
77 | */
78 | public function onStack($value) {
79 | return isset($this->_stack[$value]);
80 | }
81 |
82 | /**
83 | * Clear the stack
84 | */
85 | public function clear() {
86 | $this->_stack = array();
87 | }
88 |
89 | /**
90 | * Return an array of all entries on the stack
91 | *
92 | * @return mixed[]
93 | */
94 | public function showStack() {
95 | return $this->_stack;
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/OLE/PPS/File.php:
--------------------------------------------------------------------------------
1 | |
17 | // | Based on OLE::Storage_Lite by Kawai, Takanori |
18 | // +----------------------------------------------------------------------+
19 | //
20 | // $Id: File.php,v 1.11 2007/02/13 21:00:42 schmidt Exp $
21 |
22 |
23 | /**
24 | * Class for creating File PPS's for OLE containers
25 | *
26 | * @author Xavier Noguer
27 | * @category PHPExcel
28 | * @package PHPExcel_Shared_OLE
29 | */
30 | class PHPExcel_Shared_OLE_PPS_File extends PHPExcel_Shared_OLE_PPS
31 | {
32 | /**
33 | * The constructor
34 | *
35 | * @access public
36 | * @param string $name The name of the file (in Unicode)
37 | * @see OLE::Asc2Ucs()
38 | */
39 | public function __construct($name)
40 | {
41 | parent::__construct(
42 | null,
43 | $name,
44 | PHPExcel_Shared_OLE::OLE_PPS_TYPE_FILE,
45 | null,
46 | null,
47 | null,
48 | null,
49 | null,
50 | '',
51 | array());
52 | }
53 |
54 | /**
55 | * Initialization method. Has to be called right after OLE_PPS_File().
56 | *
57 | * @access public
58 | * @return mixed true on success
59 | */
60 | public function init()
61 | {
62 | return true;
63 | }
64 |
65 | /**
66 | * Append data to PPS
67 | *
68 | * @access public
69 | * @param string $data The data to append
70 | */
71 | public function append($data)
72 | {
73 | $this->_data .= $data;
74 | }
75 |
76 | /**
77 | * Returns a stream for reading this file using fread() etc.
78 | * @return resource a read-only stream
79 | */
80 | public function getStream()
81 | {
82 | $this->ole->getStream($this);
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Worksheet/CellIterator.php:
--------------------------------------------------------------------------------
1 | _subject);
66 | }
67 |
68 | /**
69 | * Get loop only existing cells
70 | *
71 | * @return boolean
72 | */
73 | public function getIterateOnlyExistingCells() {
74 | return $this->_onlyExistingCells;
75 | }
76 |
77 | /**
78 | * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary
79 | *
80 | * @throws PHPExcel_Exception
81 | */
82 | abstract protected function adjustForExistingOnlyRange();
83 |
84 | /**
85 | * Set the iterator to loop only existing cells
86 | *
87 | * @param boolean $value
88 | * @throws PHPExcel_Exception
89 | */
90 | public function setIterateOnlyExistingCells($value = true) {
91 | $this->_onlyExistingCells = (boolean) $value;
92 |
93 | $this->adjustForExistingOnlyRange();
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Reader/Excel5/RC4.php:
--------------------------------------------------------------------------------
1 | i = 0; $this->i < 256; $this->i++) {
52 | $this->s[$this->i] = $this->i;
53 | }
54 |
55 | $this->j = 0;
56 | for ($this->i = 0; $this->i < 256; $this->i++) {
57 | $this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256;
58 | $t = $this->s[$this->i];
59 | $this->s[$this->i] = $this->s[$this->j];
60 | $this->s[$this->j] = $t;
61 | }
62 | $this->i = $this->j = 0;
63 | }
64 |
65 | /**
66 | * Symmetric decryption/encryption function
67 | *
68 | * @param string $data Data to encrypt/decrypt
69 | *
70 | * @return string
71 | */
72 | public function RC4($data)
73 | {
74 | $len = strlen($data);
75 | for ($c = 0; $c < $len; $c++) {
76 | $this->i = ($this->i + 1) % 256;
77 | $this->j = ($this->j + $this->s[$this->i]) % 256;
78 | $t = $this->s[$this->i];
79 | $this->s[$this->i] = $this->s[$this->j];
80 | $this->s[$this->j] = $t;
81 |
82 | $t = ($this->s[$this->i] + $this->s[$this->j]) % 256;
83 |
84 | $data[$c] = chr(ord($data[$c]) ^ $this->s[$t]);
85 | }
86 | return $data;
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Worksheet/Row.php:
--------------------------------------------------------------------------------
1 | _parent = $parent;
63 | $this->_rowIndex = $rowIndex;
64 | }
65 |
66 | /**
67 | * Destructor
68 | */
69 | public function __destruct() {
70 | unset($this->_parent);
71 | }
72 |
73 | /**
74 | * Get row index
75 | *
76 | * @return int
77 | */
78 | public function getRowIndex() {
79 | return $this->_rowIndex;
80 | }
81 |
82 | /**
83 | * Get cell iterator
84 | *
85 | * @param string $startColumn The column address at which to start iterating
86 | * @param string $endColumn Optionally, the column address at which to stop iterating
87 | * @return PHPExcel_Worksheet_CellIterator
88 | */
89 | public function getCellIterator($startColumn = 'A', $endColumn = null) {
90 | return new PHPExcel_Worksheet_RowCellIterator($this->_parent, $this->_rowIndex, $startColumn, $endColumn);
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Worksheet/Column.php:
--------------------------------------------------------------------------------
1 | _parent = $parent;
63 | $this->_columnIndex = $columnIndex;
64 | }
65 |
66 | /**
67 | * Destructor
68 | */
69 | public function __destruct() {
70 | unset($this->_parent);
71 | }
72 |
73 | /**
74 | * Get column index
75 | *
76 | * @return int
77 | */
78 | public function getColumnIndex() {
79 | return $this->_columnIndex;
80 | }
81 |
82 | /**
83 | * Get cell iterator
84 | *
85 | * @param integer $startRow The row number at which to start iterating
86 | * @param integer $endRow Optionally, the row number at which to stop iterating
87 | * @return PHPExcel_Worksheet_CellIterator
88 | */
89 | public function getCellIterator($startRow = 1, $endRow = null) {
90 | return new PHPExcel_Worksheet_ColumnCellIterator($this->_parent, $this->_columnIndex, $startRow, $endRow);
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/Excel2007/RelsVBA.php:
--------------------------------------------------------------------------------
1 | getParentWriter()->getUseDiskCaching()) {
49 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
50 | } else {
51 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
52 | }
53 |
54 | // XML header
55 | $objWriter->startDocument('1.0','UTF-8','yes');
56 |
57 | // Relationships
58 | $objWriter->startElement('Relationships');
59 | $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');
60 | $objWriter->startElement('Relationship');
61 | $objWriter->writeAttribute('Id', 'rId1');
62 | $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature');
63 | $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin');
64 | $objWriter->endElement();//Relationship
65 | $objWriter->endElement();//Relationships
66 |
67 | // Return
68 | return $objWriter->getData();
69 |
70 | }
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/RichText/TextElement.php:
--------------------------------------------------------------------------------
1 | _text = $pText;
52 | }
53 |
54 | /**
55 | * Get text
56 | *
57 | * @return string Text
58 | */
59 | public function getText() {
60 | return $this->_text;
61 | }
62 |
63 | /**
64 | * Set text
65 | *
66 | * @param $pText string Text
67 | * @return PHPExcel_RichText_ITextElement
68 | */
69 | public function setText($pText = '') {
70 | $this->_text = $pText;
71 | return $this;
72 | }
73 |
74 | /**
75 | * Get font
76 | *
77 | * @return PHPExcel_Style_Font
78 | */
79 | public function getFont() {
80 | return null;
81 | }
82 |
83 | /**
84 | * Get hash code
85 | *
86 | * @return string Hash code
87 | */
88 | public function getHashCode() {
89 | return md5(
90 | $this->_text
91 | . __CLASS__
92 | );
93 | }
94 |
95 | /**
96 | * Implement PHP __clone to create a deep clone, not just a shallow copy.
97 | */
98 | public function __clone() {
99 | $vars = get_object_vars($this);
100 | foreach ($vars as $key => $value) {
101 | if (is_object($value)) {
102 | $this->$key = clone $value;
103 | } else {
104 | $this->$key = $value;
105 | }
106 | }
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/Excel2007/RelsRibbon.php:
--------------------------------------------------------------------------------
1 | getParentWriter()->getUseDiskCaching()) {
49 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
50 | } else {
51 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
52 | }
53 |
54 | // XML header
55 | $objWriter->startDocument('1.0','UTF-8','yes');
56 |
57 | // Relationships
58 | $objWriter->startElement('Relationships');
59 | $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships');
60 | $localRels=$pPHPExcel->getRibbonBinObjects('names');
61 | if(is_array($localRels)){
62 | foreach($localRels as $aId=>$aTarget){
63 | $objWriter->startElement('Relationship');
64 | $objWriter->writeAttribute('Id', $aId);
65 | $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image');
66 | $objWriter->writeAttribute('Target', $aTarget);
67 | $objWriter->endElement();//Relationship
68 | }
69 | }
70 | $objWriter->endElement();//Relationships
71 |
72 | // Return
73 | return $objWriter->getData();
74 |
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/RichText/Run.php:
--------------------------------------------------------------------------------
1 | setText($pText);
52 | $this->_font = new PHPExcel_Style_Font();
53 | }
54 |
55 | /**
56 | * Get font
57 | *
58 | * @return PHPExcel_Style_Font
59 | */
60 | public function getFont() {
61 | return $this->_font;
62 | }
63 |
64 | /**
65 | * Set font
66 | *
67 | * @param PHPExcel_Style_Font $pFont Font
68 | * @throws PHPExcel_Exception
69 | * @return PHPExcel_RichText_ITextElement
70 | */
71 | public function setFont(PHPExcel_Style_Font $pFont = null) {
72 | $this->_font = $pFont;
73 | return $this;
74 | }
75 |
76 | /**
77 | * Get hash code
78 | *
79 | * @return string Hash code
80 | */
81 | public function getHashCode() {
82 | return md5(
83 | $this->getText()
84 | . $this->_font->getHashCode()
85 | . __CLASS__
86 | );
87 | }
88 |
89 | /**
90 | * Implement PHP __clone to create a deep clone, not just a shallow copy.
91 | */
92 | public function __clone() {
93 | $vars = get_object_vars($this);
94 | foreach ($vars as $key => $value) {
95 | if (is_object($value)) {
96 | $this->$key = clone $value;
97 | } else {
98 | $this->$key = $value;
99 | }
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/OpenDocument/Cell/Comment.php:
--------------------------------------------------------------------------------
1 |
36 | */
37 | class PHPExcel_Writer_OpenDocument_Cell_Comment
38 | {
39 | public static function write(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Cell $cell)
40 | {
41 | $comments = $cell->getWorksheet()->getComments();
42 | if (!isset($comments[$cell->getCoordinate()])) {
43 | return;
44 | }
45 | $comment = $comments[$cell->getCoordinate()];
46 |
47 | $objWriter->startElement('office:annotation');
48 | //$objWriter->writeAttribute('draw:style-name', 'gr1');
49 | //$objWriter->writeAttribute('draw:text-style-name', 'P1');
50 | $objWriter->writeAttribute('svg:width', $comment->getWidth());
51 | $objWriter->writeAttribute('svg:height', $comment->getHeight());
52 | $objWriter->writeAttribute('svg:x', $comment->getMarginLeft());
53 | $objWriter->writeAttribute('svg:y', $comment->getMarginTop());
54 | //$objWriter->writeAttribute('draw:caption-point-x', $comment->getMarginLeft());
55 | //$objWriter->writeAttribute('draw:caption-point-y', $comment->getMarginTop());
56 | $objWriter->writeElement('dc:creator', $comment->getAuthor());
57 | // TODO: Not realized in PHPExcel_Comment yet.
58 | //$objWriter->writeElement('dc:date', $comment->getDate());
59 | $objWriter->writeElement('text:p', $comment->getText()->getPlainText());
60 | //$objWriter->writeAttribute('draw:text-style-name', 'P1');
61 | $objWriter->endElement();
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/WorksheetIterator.php:
--------------------------------------------------------------------------------
1 | _subject = $subject;
63 | }
64 |
65 | /**
66 | * Destructor
67 | */
68 | public function __destruct()
69 | {
70 | unset($this->_subject);
71 | }
72 |
73 | /**
74 | * Rewind iterator
75 | */
76 | public function rewind()
77 | {
78 | $this->_position = 0;
79 | }
80 |
81 | /**
82 | * Current PHPExcel_Worksheet
83 | *
84 | * @return PHPExcel_Worksheet
85 | */
86 | public function current()
87 | {
88 | return $this->_subject->getSheet($this->_position);
89 | }
90 |
91 | /**
92 | * Current key
93 | *
94 | * @return int
95 | */
96 | public function key()
97 | {
98 | return $this->_position;
99 | }
100 |
101 | /**
102 | * Next value
103 | */
104 | public function next()
105 | {
106 | ++$this->_position;
107 | }
108 |
109 | /**
110 | * More PHPExcel_Worksheet instances available?
111 | *
112 | * @return boolean
113 | */
114 | public function valid()
115 | {
116 | return $this->_position < $this->_subject->getSheetCount();
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/Zmaney Hayom API/ZmaneyHayomApi.php:
--------------------------------------------------------------------------------
1 | "שעה זמנית (מג\"א)",
33 | "Zmanit (GRA)" => "שעה זמנית (גר\"א)",
34 | "Date" => "תאריך",
35 | "Alot Hashahar" => "עלות השחר",
36 | "Talit And Tfilin" => "זמן טלית ותפילין",
37 | "Sunrise" => "זריחה",
38 | "End Kriat Shma (MGA)" => "סזק\"ש (מג\"א)",
39 | "End Tfilha (MGA)" => "סזת\"פ (מג\"א)",
40 | "End Kriat Shma (GRA)" => "סזק\"ש (גר\"א)",
41 | "End Tfilha (GRA)" => "סזת\"פ (גר\"א)",
42 | "Midnight" => "חצות",
43 | "Mincha Gdola" => "מנחה גדולה",
44 | "Plag Mincha" => "פלג המנחה",
45 | "Sunset" => "שקיעה",
46 | "Tzet HaCochavim" => "צאת הכוכבים"
47 | );
48 |
49 | $zmanim = array(
50 | "Zmanit (MGA)" => $zmanitMga,
51 | "Zmanit (GRA)" => $zmanitGra,
52 | "Date" => iconv ('WINDOWS-1255', 'UTF-8', jdtojewish(unixtojd(), true, CAL_JEWISH_ADD_GERESHAYIM)),
53 | "Alot Hashahar" => tsToTime($sunrise - (72 * 60)),
54 | "Talit And Tfilin" => tsToTime($sunrise - (45 * 60)),
55 | "Sunrise" => tsToTime($sunrise),
56 | "End Kriat Shma (MGA)" => tsToTime(($sunrise - (72 * 60)) + ($zmanitMga * (60 * 3))),
57 | "End Tfilha (MGA)" => tsToTime(($sunrise - (72 * 60)) + ($zmanitMga * (60 * 4))),
58 | "End Kriat Shma (GRA)" => tsToTime($sunrise + $zmanitGra * (60 * 3)),
59 | "End Tfilha (GRA)" => tsToTime($sunrise + $zmanitGra * (60 * 4)),
60 | "Midnight" => tsToTime($sunrise + $zmanitGra * (60 * 6)),
61 | "Mincha Gdola" => tsToTime($sunrise + $zmanitGra * (60 * 6.5)),
62 | "Plag Mincha" => tsToTime($sunset - $zmanitGra * (60 * 1.25)),
63 | "Sunset" => tsToTime($sunset),
64 | "Tzet HaCochavim" => tsToTime($sunset + (20 * 60))
65 | );
66 |
67 | if(isset($_GET['output']) && $_GET['output'] == "html"){
68 | $html = "| שם | ערך |
";
69 | foreach ($zmanim as $name => $val){
70 | $html .= "| " . $translate[$name] . " | " . $val . " |
";
71 | }
72 | $html .= "
";
73 | echo "" . $html . "
";
74 | }
75 | else{
76 | $res["en"] = $zmanim;
77 | foreach ($zmanim as $name => $val){
78 | $res["he"][$translate[$name]] = $val;
79 | }
80 | header("Contact-type: text/json");
81 | echo json_encode($res);
82 | }
83 | ?>
84 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/JAMA/utils/Error.php:
--------------------------------------------------------------------------------
1 | _parent = $parent;
59 | }
60 |
61 | /**
62 | * Get the parent Shape Group Container if any
63 | *
64 | * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer|null
65 | */
66 | public function getParent()
67 | {
68 | return $this->_parent;
69 | }
70 |
71 | /**
72 | * Add a child. This will be either spgrContainer or spContainer
73 | *
74 | * @param mixed $child
75 | */
76 | public function addChild($child)
77 | {
78 | $this->_children[] = $child;
79 | $child->setParent($this);
80 | }
81 |
82 | /**
83 | * Get collection of Shape Containers
84 | */
85 | public function getChildren()
86 | {
87 | return $this->_children;
88 | }
89 |
90 | /**
91 | * Recursively get all spContainers within this spgrContainer
92 | *
93 | * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer[]
94 | */
95 | public function getAllSpContainers()
96 | {
97 | $allSpContainers = array();
98 |
99 | foreach ($this->_children as $child) {
100 | if ($child instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) {
101 | $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers());
102 | } else {
103 | $allSpContainers[] = $child;
104 | }
105 | }
106 |
107 | return $allSpContainers;
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Reader/Excel2007/Theme.php:
--------------------------------------------------------------------------------
1 | _themeName = $themeName;
76 | $this->_colourSchemeName = $colourSchemeName;
77 | $this->_colourMap = $colourMap;
78 | }
79 |
80 | /**
81 | * Get Theme Name
82 | *
83 | * @return string
84 | */
85 | public function getThemeName()
86 | {
87 | return $this->_themeName;
88 | }
89 |
90 | /**
91 | * Get colour Scheme Name
92 | *
93 | * @return string
94 | */
95 | public function getColourSchemeName() {
96 | return $this->_colourSchemeName;
97 | }
98 |
99 | /**
100 | * Get colour Map Value by Position
101 | *
102 | * @return string
103 | */
104 | public function getColourByIndex($index=0) {
105 | if (isset($this->_colourMap[$index])) {
106 | return $this->_colourMap[$index];
107 | }
108 | return null;
109 | }
110 |
111 | /**
112 | * Implement PHP __clone to create a deep clone, not just a shallow copy.
113 | */
114 | public function __clone() {
115 | $vars = get_object_vars($this);
116 | foreach ($vars as $key => $value) {
117 | if ((is_object($value)) && ($key != '_parent')) {
118 | $this->$key = clone $value;
119 | } else {
120 | $this->$key = $value;
121 | }
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php:
--------------------------------------------------------------------------------
1 | _parent = $parent;
77 | }
78 |
79 | /**
80 | * Get the BLIP
81 | *
82 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip
83 | */
84 | public function getBlip()
85 | {
86 | return $this->_blip;
87 | }
88 |
89 | /**
90 | * Set the BLIP
91 | *
92 | * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip $blip
93 | */
94 | public function setBlip($blip)
95 | {
96 | $this->_blip = $blip;
97 | $blip->setParent($this);
98 | }
99 |
100 | /**
101 | * Get the BLIP type
102 | *
103 | * @return int
104 | */
105 | public function getBlipType()
106 | {
107 | return $this->_blipType;
108 | }
109 |
110 | /**
111 | * Set the BLIP type
112 | *
113 | * @param int
114 | */
115 | public function setBlipType($blipType)
116 | {
117 | $this->_blipType = $blipType;
118 | }
119 |
120 | }
121 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Autoloader.php:
--------------------------------------------------------------------------------
1 | = 0) {
59 | return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'), true, true);
60 | } else {
61 | return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'));
62 | }
63 | } // function Register()
64 |
65 |
66 | /**
67 | * Autoload a class identified by name
68 | *
69 | * @param string $pClassName Name of the object to load
70 | */
71 | public static function Load($pClassName){
72 | if ((class_exists($pClassName,FALSE)) || (strpos($pClassName, 'PHPExcel') !== 0)) {
73 | // Either already loaded, or not a PHPExcel class request
74 | return FALSE;
75 | }
76 |
77 | $pClassFilePath = PHPEXCEL_ROOT .
78 | str_replace('_',DIRECTORY_SEPARATOR,$pClassName) .
79 | '.php';
80 |
81 | if ((file_exists($pClassFilePath) === FALSE) || (is_readable($pClassFilePath) === FALSE)) {
82 | // Can't load
83 | return FALSE;
84 | }
85 |
86 | require($pClassFilePath);
87 | } // function Load()
88 |
89 | }
90 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Calculation/Token/Stack.php:
--------------------------------------------------------------------------------
1 | _count;
60 | } // function count()
61 |
62 | /**
63 | * Push a new entry onto the stack
64 | *
65 | * @param mixed $type
66 | * @param mixed $value
67 | * @param mixed $reference
68 | */
69 | public function push($type, $value, $reference = NULL) {
70 | $this->_stack[$this->_count++] = array('type' => $type,
71 | 'value' => $value,
72 | 'reference' => $reference
73 | );
74 | if ($type == 'Function') {
75 | $localeFunction = PHPExcel_Calculation::_localeFunc($value);
76 | if ($localeFunction != $value) {
77 | $this->_stack[($this->_count - 1)]['localeValue'] = $localeFunction;
78 | }
79 | }
80 | } // function push()
81 |
82 | /**
83 | * Pop the last entry from the stack
84 | *
85 | * @return mixed
86 | */
87 | public function pop() {
88 | if ($this->_count > 0) {
89 | return $this->_stack[--$this->_count];
90 | }
91 | return NULL;
92 | } // function pop()
93 |
94 | /**
95 | * Return an entry from the stack without removing it
96 | *
97 | * @param integer $n number indicating how far back in the stack we want to look
98 | * @return mixed
99 | */
100 | public function last($n = 1) {
101 | if ($this->_count - $n < 0) {
102 | return NULL;
103 | }
104 | return $this->_stack[$this->_count - $n];
105 | } // function last()
106 |
107 | /**
108 | * Clear the stack
109 | */
110 | function clear() {
111 | $this->_stack = array();
112 | $this->_count = 0;
113 | }
114 |
115 | } // class PHPExcel_Calculation_Token_Stack
116 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Chart/PlotArea.php:
--------------------------------------------------------------------------------
1 | _layout = $layout;
58 | $this->_plotSeries = $plotSeries;
59 | }
60 |
61 | /**
62 | * Get Layout
63 | *
64 | * @return PHPExcel_Chart_Layout
65 | */
66 | public function getLayout() {
67 | return $this->_layout;
68 | }
69 |
70 | /**
71 | * Get Number of Plot Groups
72 | *
73 | * @return array of PHPExcel_Chart_DataSeries
74 | */
75 | public function getPlotGroupCount() {
76 | return count($this->_plotSeries);
77 | }
78 |
79 | /**
80 | * Get Number of Plot Series
81 | *
82 | * @return integer
83 | */
84 | public function getPlotSeriesCount() {
85 | $seriesCount = 0;
86 | foreach($this->_plotSeries as $plot) {
87 | $seriesCount += $plot->getPlotSeriesCount();
88 | }
89 | return $seriesCount;
90 | }
91 |
92 | /**
93 | * Get Plot Series
94 | *
95 | * @return array of PHPExcel_Chart_DataSeries
96 | */
97 | public function getPlotGroup() {
98 | return $this->_plotSeries;
99 | }
100 |
101 | /**
102 | * Get Plot Series by Index
103 | *
104 | * @return PHPExcel_Chart_DataSeries
105 | */
106 | public function getPlotGroupByIndex($index) {
107 | return $this->_plotSeries[$index];
108 | }
109 |
110 | /**
111 | * Set Plot Series
112 | *
113 | * @param [PHPExcel_Chart_DataSeries]
114 | * @return PHPExcel_Chart_PlotArea
115 | */
116 | public function setPlotSeries($plotSeries = array()) {
117 | $this->_plotSeries = $plotSeries;
118 |
119 | return $this;
120 | }
121 |
122 | public function refresh(PHPExcel_Worksheet $worksheet) {
123 | foreach($this->_plotSeries as $plotSeries) {
124 | $plotSeries->refresh($worksheet);
125 | }
126 | }
127 |
128 | }
129 |
--------------------------------------------------------------------------------
/JewishCalendar/api.php:
--------------------------------------------------------------------------------
1 | messageAlert("המידע שהתקבל שגוי", "danger")';
8 | die();
9 | }
10 |
11 | $time = strtotime($post['date'] ?? "now");
12 | if(empty($time)){
13 | echo '';
14 | die();
15 | }
16 |
17 | $name = $post['name'] ?? "";
18 | if(!is_string($name)){
19 | echo '';
20 | die();
21 | }
22 | else if(mb_strlen($name) > 50){
23 | echo '';
24 | die();
25 | }
26 |
27 | $night = $post['night'] ?? false;
28 | if(!is_bool($night)){
29 | echo '';
30 | die();
31 | }
32 |
33 | $type = $post['type'] ?? false;
34 | if($type != false && (!is_numeric($type) || $type < 0 || $type > 3)){
35 | echo '';
36 | die();
37 | }
38 |
39 | $hebDays = array('ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת');
40 |
41 | if($night){ $time += 86400; } //24*60*60
42 |
43 | $_SESSION['JewishCalendarData'] = array(
44 | "time" => $time,
45 | "name" => $name,
46 | "type" => ($type - 1)
47 | );
48 |
49 | echo <<
51 | ייצוא ל-Google Calendar
52 | יצא ללוח שנה (.ics)
53 | יצא ל-Excel
54 |
55 |
56 |
57 |
58 | | # |
59 | תאריך לועזי |
60 | תאריך עברי |
61 | יום בשבוע |
62 |
63 |
64 |
65 |
66 | HTML;
67 |
68 | $currentHebDate = explode("/", jdtojewish(unixtojd($time)));
69 | $nowHebDate = explode("/", jdtojewish(unixtojd()));
70 |
71 | $tmpTime = jewishtojd($currentHebDate[0], $currentHebDate[1], $currentHebDate[2]);
72 | $hebDate = iconv('WINDOWS-1255', 'UTF-8', jdtojewish($tmpTime, true, CAL_JEWISH_ADD_GERESHAYIM));
73 | $date = date("d/m/Y", jdtounix($tmpTime));
74 | $day = $hebDays[date("w", jdtounix($tmpTime))];
75 | echo <<
77 | תאריך מקורי |
78 | {$date} |
79 | {$hebDate} |
80 | {$day} |
81 |
82 |
83 | HTML;
84 |
85 | for($i = 0; $i < 20; $i++){
86 | $tmpTime = jewishtojd($currentHebDate[0], $currentHebDate[1], ($nowHebDate[2] + $i));
87 | $num = $i + 1;
88 | $hebDate = iconv('WINDOWS-1255', 'UTF-8', jdtojewish($tmpTime, true, CAL_JEWISH_ADD_GERESHAYIM));
89 | $gulDate = explode("/", jdtogregorian($tmpTime));
90 | $tmp = $gulDate[0];
91 | $gulDate[0] = $gulDate[1];
92 | $gulDate[1] = $tmp;
93 | $date = implode("/", $gulDate);
94 | $day = $hebDays[date("w", mktime(0, 0, 0, $gulDate[1], $gulDate[0], $gulDate[2]))];
95 | echo <<
97 | {$num} |
98 | {$date} |
99 | {$hebDate} |
100 | {$day} |
101 |
102 |
103 | HTML;
104 | }
105 |
106 | echo <<
108 |
109 | HTML;
110 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Cell/Hyperlink.php:
--------------------------------------------------------------------------------
1 | _url = $pUrl;
62 | $this->_tooltip = $pTooltip;
63 | }
64 |
65 | /**
66 | * Get URL
67 | *
68 | * @return string
69 | */
70 | public function getUrl() {
71 | return $this->_url;
72 | }
73 |
74 | /**
75 | * Set URL
76 | *
77 | * @param string $value
78 | * @return PHPExcel_Cell_Hyperlink
79 | */
80 | public function setUrl($value = '') {
81 | $this->_url = $value;
82 | return $this;
83 | }
84 |
85 | /**
86 | * Get tooltip
87 | *
88 | * @return string
89 | */
90 | public function getTooltip() {
91 | return $this->_tooltip;
92 | }
93 |
94 | /**
95 | * Set tooltip
96 | *
97 | * @param string $value
98 | * @return PHPExcel_Cell_Hyperlink
99 | */
100 | public function setTooltip($value = '') {
101 | $this->_tooltip = $value;
102 | return $this;
103 | }
104 |
105 | /**
106 | * Is this hyperlink internal? (to another worksheet)
107 | *
108 | * @return boolean
109 | */
110 | public function isInternal() {
111 | return strpos($this->_url, 'sheet://') !== false;
112 | }
113 |
114 | /**
115 | * Get hash code
116 | *
117 | * @return string Hash code
118 | */
119 | public function getHashCode() {
120 | return md5(
121 | $this->_url
122 | . $this->_tooltip
123 | . __CLASS__
124 | );
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/PDF.php:
--------------------------------------------------------------------------------
1 | _renderer = new $rendererName($phpExcel);
71 | }
72 |
73 |
74 | /**
75 | * Magic method to handle direct calls to the configured PDF renderer wrapper class.
76 | *
77 | * @param string $name Renderer library method name
78 | * @param mixed[] $arguments Array of arguments to pass to the renderer method
79 | * @return mixed Returned data from the PDF renderer wrapper method
80 | */
81 | public function __call($name, $arguments)
82 | {
83 | if ($this->_renderer === NULL) {
84 | throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined.");
85 | }
86 |
87 | return call_user_func_array(array($this->_renderer, $name), $arguments);
88 | }
89 |
90 | /**
91 | * {@inheritdoc}
92 | */
93 | public function save($pFilename = null)
94 | {
95 | $this->_renderer->save($pFilename);
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/XMLWriter.php:
--------------------------------------------------------------------------------
1 | openMemory();
66 | } else {
67 | // Create temporary filename
68 | if ($pTemporaryStorageFolder === NULL)
69 | $pTemporaryStorageFolder = PHPExcel_Shared_File::sys_get_temp_dir();
70 | $this->_tempFileName = @tempnam($pTemporaryStorageFolder, 'xml');
71 |
72 | // Open storage
73 | if ($this->openUri($this->_tempFileName) === false) {
74 | // Fallback to memory...
75 | $this->openMemory();
76 | }
77 | }
78 |
79 | // Set default values
80 | if (DEBUGMODE_ENABLED) {
81 | $this->setIndent(true);
82 | }
83 | }
84 |
85 | /**
86 | * Destructor
87 | */
88 | public function __destruct() {
89 | // Unlink temporary files
90 | if ($this->_tempFileName != '') {
91 | @unlink($this->_tempFileName);
92 | }
93 | }
94 |
95 | /**
96 | * Get written data
97 | *
98 | * @return $data
99 | */
100 | public function getData() {
101 | if ($this->_tempFileName == '') {
102 | return $this->outputMemory(true);
103 | } else {
104 | $this->flush();
105 | return file_get_contents($this->_tempFileName);
106 | }
107 | }
108 |
109 | /**
110 | * Fallback method for writeRaw, introduced in PHP 5.2
111 | *
112 | * @param string $text
113 | * @return string
114 | */
115 | public function writeRawData($text)
116 | {
117 | if (is_array($text)) {
118 | $text = implode("\n",$text);
119 | }
120 |
121 | if (method_exists($this, 'writeRaw')) {
122 | return $this->writeRaw(htmlspecialchars($text));
123 | }
124 |
125 | return $this->text($text);
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Style/Supervisor.php:
--------------------------------------------------------------------------------
1 | _isSupervisor = $isSupervisor;
63 | }
64 |
65 | /**
66 | * Bind parent. Only used for supervisor
67 | *
68 | * @param PHPExcel $parent
69 | * @return PHPExcel_Style_Supervisor
70 | */
71 | public function bindParent($parent, $parentPropertyName=NULL)
72 | {
73 | $this->_parent = $parent;
74 | return $this;
75 | }
76 |
77 | /**
78 | * Is this a supervisor or a cell style component?
79 | *
80 | * @return boolean
81 | */
82 | public function getIsSupervisor()
83 | {
84 | return $this->_isSupervisor;
85 | }
86 |
87 | /**
88 | * Get the currently active sheet. Only used for supervisor
89 | *
90 | * @return PHPExcel_Worksheet
91 | */
92 | public function getActiveSheet()
93 | {
94 | return $this->_parent->getActiveSheet();
95 | }
96 |
97 | /**
98 | * Get the currently active cell coordinate in currently active sheet.
99 | * Only used for supervisor
100 | *
101 | * @return string E.g. 'A1'
102 | */
103 | public function getSelectedCells()
104 | {
105 | return $this->getActiveSheet()->getSelectedCells();
106 | }
107 |
108 | /**
109 | * Get the currently active cell coordinate in currently active sheet.
110 | * Only used for supervisor
111 | *
112 | * @return string E.g. 'A1'
113 | */
114 | public function getActiveCell()
115 | {
116 | return $this->getActiveSheet()->getActiveCell();
117 | }
118 |
119 | /**
120 | * Implement PHP __clone to create a deep clone, not just a shallow copy.
121 | */
122 | public function __clone() {
123 | $vars = get_object_vars($this);
124 | foreach ($vars as $key => $value) {
125 | if ((is_object($value)) && ($key != '_parent')) {
126 | $this->$key = clone $value;
127 | } else {
128 | $this->$key = $value;
129 | }
130 | }
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/OpenDocument/Settings.php:
--------------------------------------------------------------------------------
1 |
36 | */
37 | class PHPExcel_Writer_OpenDocument_Settings extends PHPExcel_Writer_OpenDocument_WriterPart
38 | {
39 | /**
40 | * Write settings.xml to XML format
41 | *
42 | * @param PHPExcel $pPHPExcel
43 | * @return string XML Output
44 | * @throws PHPExcel_Writer_Exception
45 | */
46 | public function write(PHPExcel $pPHPExcel = null)
47 | {
48 | if (!$pPHPExcel) {
49 | $pPHPExcel = $this->getParentWriter()->getPHPExcel();
50 | }
51 |
52 | $objWriter = null;
53 | if ($this->getParentWriter()->getUseDiskCaching()) {
54 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
55 | } else {
56 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
57 | }
58 |
59 | // XML header
60 | $objWriter->startDocument('1.0', 'UTF-8');
61 |
62 | // Settings
63 | $objWriter->startElement('office:document-settings');
64 | $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');
65 | $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
66 | $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0');
67 | $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');
68 | $objWriter->writeAttribute('office:version', '1.2');
69 |
70 | $objWriter->startElement('office:settings');
71 | $objWriter->startElement('config:config-item-set');
72 | $objWriter->writeAttribute('config:name', 'ooo:view-settings');
73 | $objWriter->startElement('config:config-item-map-indexed');
74 | $objWriter->writeAttribute('config:name', 'Views');
75 | $objWriter->endElement();
76 | $objWriter->endElement();
77 | $objWriter->startElement('config:config-item-set');
78 | $objWriter->writeAttribute('config:name', 'ooo:configuration-settings');
79 | $objWriter->endElement();
80 | $objWriter->endElement();
81 | $objWriter->endElement();
82 |
83 | return $objWriter->getData();
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/trend/linearBestFitClass.php:
--------------------------------------------------------------------------------
1 | getIntersect() + $this->getSlope() * $xValue;
58 | } // function getValueOfYForX()
59 |
60 |
61 | /**
62 | * Return the X-Value for a specified value of Y
63 | *
64 | * @param float $yValue Y-Value
65 | * @return float X-Value
66 | **/
67 | public function getValueOfXForY($yValue) {
68 | return ($yValue - $this->getIntersect()) / $this->getSlope();
69 | } // function getValueOfXForY()
70 |
71 |
72 | /**
73 | * Return the Equation of the best-fit line
74 | *
75 | * @param int $dp Number of places of decimal precision to display
76 | * @return string
77 | **/
78 | public function getEquation($dp=0) {
79 | $slope = $this->getSlope($dp);
80 | $intersect = $this->getIntersect($dp);
81 |
82 | return 'Y = '.$intersect.' + '.$slope.' * X';
83 | } // function getEquation()
84 |
85 |
86 | /**
87 | * Execute the regression and calculate the goodness of fit for a set of X and Y data values
88 | *
89 | * @param float[] $yValues The set of Y-values for this regression
90 | * @param float[] $xValues The set of X-values for this regression
91 | * @param boolean $const
92 | */
93 | private function _linear_regression($yValues, $xValues, $const) {
94 | $this->_leastSquareFit($yValues, $xValues,$const);
95 | } // function _linear_regression()
96 |
97 |
98 | /**
99 | * Define the regression and calculate the goodness of fit for a set of X and Y data values
100 | *
101 | * @param float[] $yValues The set of Y-values for this regression
102 | * @param float[] $xValues The set of X-values for this regression
103 | * @param boolean $const
104 | */
105 | function __construct($yValues, $xValues=array(), $const=True) {
106 | if (parent::__construct($yValues, $xValues) !== False) {
107 | $this->_linear_regression($yValues, $xValues, $const);
108 | }
109 | } // function __construct()
110 |
111 | } // class linearBestFit
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/CachedObjectStorage/ICache.php:
--------------------------------------------------------------------------------
1 | 0,
55 | '#DIV/0!' => 1,
56 | '#VALUE!' => 2,
57 | '#REF!' => 3,
58 | '#NAME?' => 4,
59 | '#NUM!' => 5,
60 | '#N/A' => 6
61 | );
62 |
63 | /**
64 | * Get list of error codes
65 | *
66 | * @return array
67 | */
68 | public static function getErrorCodes() {
69 | return self::$_errorCodes;
70 | }
71 |
72 | /**
73 | * DataType for value
74 | *
75 | * @deprecated Replaced by PHPExcel_Cell_IValueBinder infrastructure, will be removed in version 1.8.0
76 | * @param mixed $pValue
77 | * @return string
78 | */
79 | public static function dataTypeForValue($pValue = null) {
80 | return PHPExcel_Cell_DefaultValueBinder::dataTypeForValue($pValue);
81 | }
82 |
83 | /**
84 | * Check a string that it satisfies Excel requirements
85 | *
86 | * @param mixed Value to sanitize to an Excel string
87 | * @return mixed Sanitized value
88 | */
89 | public static function checkString($pValue = null)
90 | {
91 | if ($pValue instanceof PHPExcel_RichText) {
92 | // TODO: Sanitize Rich-Text string (max. character count is 32,767)
93 | return $pValue;
94 | }
95 |
96 | // string must never be longer than 32,767 characters, truncate if necessary
97 | $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 32767);
98 |
99 | // we require that newline is represented as "\n" in core, not as "\r\n" or "\r"
100 | $pValue = str_replace(array("\r\n", "\r"), "\n", $pValue);
101 |
102 | return $pValue;
103 | }
104 |
105 | /**
106 | * Check a value that it is a valid error code
107 | *
108 | * @param mixed Value to sanitize to an Excel error code
109 | * @return string Sanitized value
110 | */
111 | public static function checkErrorCode($pValue = null)
112 | {
113 | $pValue = (string) $pValue;
114 |
115 | if ( !array_key_exists($pValue, self::$_errorCodes) ) {
116 | $pValue = '#NULL!';
117 | }
118 |
119 | return $pValue;
120 | }
121 |
122 | }
123 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/JAMA/CholeskyDecomposition.php:
--------------------------------------------------------------------------------
1 | L = $A->getArray();
51 | $this->m = $A->getRowDimension();
52 |
53 | for($i = 0; $i < $this->m; ++$i) {
54 | for($j = $i; $j < $this->m; ++$j) {
55 | for($sum = $this->L[$i][$j], $k = $i - 1; $k >= 0; --$k) {
56 | $sum -= $this->L[$i][$k] * $this->L[$j][$k];
57 | }
58 | if ($i == $j) {
59 | if ($sum >= 0) {
60 | $this->L[$i][$i] = sqrt($sum);
61 | } else {
62 | $this->isspd = false;
63 | }
64 | } else {
65 | if ($this->L[$i][$i] != 0) {
66 | $this->L[$j][$i] = $sum / $this->L[$i][$i];
67 | }
68 | }
69 | }
70 |
71 | for ($k = $i+1; $k < $this->m; ++$k) {
72 | $this->L[$i][$k] = 0.0;
73 | }
74 | }
75 | } else {
76 | throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException));
77 | }
78 | } // function __construct()
79 |
80 |
81 | /**
82 | * Is the matrix symmetric and positive definite?
83 | *
84 | * @return boolean
85 | */
86 | public function isSPD() {
87 | return $this->isspd;
88 | } // function isSPD()
89 |
90 |
91 | /**
92 | * getL
93 | *
94 | * Return triangular factor.
95 | * @return Matrix Lower triangular matrix
96 | */
97 | public function getL() {
98 | return new Matrix($this->L);
99 | } // function getL()
100 |
101 |
102 | /**
103 | * Solve A*X = B
104 | *
105 | * @param $B Row-equal matrix
106 | * @return Matrix L * L' * X = B
107 | */
108 | public function solve($B = null) {
109 | if ($B instanceof Matrix) {
110 | if ($B->getRowDimension() == $this->m) {
111 | if ($this->isspd) {
112 | $X = $B->getArrayCopy();
113 | $nx = $B->getColumnDimension();
114 |
115 | for ($k = 0; $k < $this->m; ++$k) {
116 | for ($i = $k + 1; $i < $this->m; ++$i) {
117 | for ($j = 0; $j < $nx; ++$j) {
118 | $X[$i][$j] -= $X[$k][$j] * $this->L[$i][$k];
119 | }
120 | }
121 | for ($j = 0; $j < $nx; ++$j) {
122 | $X[$k][$j] /= $this->L[$k][$k];
123 | }
124 | }
125 |
126 | for ($k = $this->m - 1; $k >= 0; --$k) {
127 | for ($j = 0; $j < $nx; ++$j) {
128 | $X[$k][$j] /= $this->L[$k][$k];
129 | }
130 | for ($i = 0; $i < $k; ++$i) {
131 | for ($j = 0; $j < $nx; ++$j) {
132 | $X[$i][$j] -= $X[$k][$j] * $this->L[$k][$i];
133 | }
134 | }
135 | }
136 |
137 | return new Matrix($X, $this->m, $nx);
138 | } else {
139 | throw new PHPExcel_Calculation_Exception(JAMAError(MatrixSPDException));
140 | }
141 | } else {
142 | throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionException));
143 | }
144 | } else {
145 | throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException));
146 | }
147 | } // function solve()
148 |
149 | } // class CholeskyDecomposition
150 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/trend/logarithmicBestFitClass.php:
--------------------------------------------------------------------------------
1 | getIntersect() + $this->getSlope() * log($xValue - $this->_Xoffset);
58 | } // function getValueOfYForX()
59 |
60 |
61 | /**
62 | * Return the X-Value for a specified value of Y
63 | *
64 | * @param float $yValue Y-Value
65 | * @return float X-Value
66 | **/
67 | public function getValueOfXForY($yValue) {
68 | return exp(($yValue - $this->getIntersect()) / $this->getSlope());
69 | } // function getValueOfXForY()
70 |
71 |
72 | /**
73 | * Return the Equation of the best-fit line
74 | *
75 | * @param int $dp Number of places of decimal precision to display
76 | * @return string
77 | **/
78 | public function getEquation($dp=0) {
79 | $slope = $this->getSlope($dp);
80 | $intersect = $this->getIntersect($dp);
81 |
82 | return 'Y = '.$intersect.' + '.$slope.' * log(X)';
83 | } // function getEquation()
84 |
85 |
86 | /**
87 | * Execute the regression and calculate the goodness of fit for a set of X and Y data values
88 | *
89 | * @param float[] $yValues The set of Y-values for this regression
90 | * @param float[] $xValues The set of X-values for this regression
91 | * @param boolean $const
92 | */
93 | private function _logarithmic_regression($yValues, $xValues, $const) {
94 | foreach($xValues as &$value) {
95 | if ($value < 0.0) {
96 | $value = 0 - log(abs($value));
97 | } elseif ($value > 0.0) {
98 | $value = log($value);
99 | }
100 | }
101 | unset($value);
102 |
103 | $this->_leastSquareFit($yValues, $xValues, $const);
104 | } // function _logarithmic_regression()
105 |
106 |
107 | /**
108 | * Define the regression and calculate the goodness of fit for a set of X and Y data values
109 | *
110 | * @param float[] $yValues The set of Y-values for this regression
111 | * @param float[] $xValues The set of X-values for this regression
112 | * @param boolean $const
113 | */
114 | function __construct($yValues, $xValues=array(), $const=True) {
115 | if (parent::__construct($yValues, $xValues) !== False) {
116 | $this->_logarithmic_regression($yValues, $xValues, $const);
117 | }
118 | } // function __construct()
119 |
120 | } // class logarithmicBestFit
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/CachedObjectStorage/Memory.php:
--------------------------------------------------------------------------------
1 | _cellCache[$pCoord] = $cell;
56 |
57 | // Set current entry to the new/updated entry
58 | $this->_currentObjectID = $pCoord;
59 |
60 | return $cell;
61 | } // function addCacheData()
62 |
63 |
64 | /**
65 | * Get cell at a specific coordinate
66 | *
67 | * @param string $pCoord Coordinate of the cell
68 | * @throws PHPExcel_Exception
69 | * @return PHPExcel_Cell Cell that was found, or null if not found
70 | */
71 | public function getCacheData($pCoord) {
72 | // Check if the entry that has been requested actually exists
73 | if (!isset($this->_cellCache[$pCoord])) {
74 | $this->_currentObjectID = NULL;
75 | // Return null if requested entry doesn't exist in cache
76 | return null;
77 | }
78 |
79 | // Set current entry to the requested entry
80 | $this->_currentObjectID = $pCoord;
81 |
82 | // Return requested entry
83 | return $this->_cellCache[$pCoord];
84 | } // function getCacheData()
85 |
86 |
87 | /**
88 | * Clone the cell collection
89 | *
90 | * @param PHPExcel_Worksheet $parent The new worksheet
91 | * @return void
92 | */
93 | public function copyCellCollection(PHPExcel_Worksheet $parent) {
94 | parent::copyCellCollection($parent);
95 |
96 | $newCollection = array();
97 | foreach($this->_cellCache as $k => &$cell) {
98 | $newCollection[$k] = clone $cell;
99 | $newCollection[$k]->attach($this);
100 | }
101 |
102 | $this->_cellCache = $newCollection;
103 | }
104 |
105 |
106 | /**
107 | * Clear the cell collection and disconnect from our parent
108 | *
109 | * @return void
110 | */
111 | public function unsetWorksheetCells() {
112 | // Because cells are all stored as intact objects in memory, we need to detach each one from the parent
113 | foreach($this->_cellCache as $k => &$cell) {
114 | $cell->detach();
115 | $this->_cellCache[$k] = null;
116 | }
117 | unset($cell);
118 |
119 | $this->_cellCache = array();
120 |
121 | // detach ourself from the worksheet, so that it can then delete this object successfully
122 | $this->_parent = null;
123 | } // function unsetWorksheetCells()
124 |
125 | }
126 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Worksheet/Drawing.php:
--------------------------------------------------------------------------------
1 | _path = '';
52 |
53 | // Initialize parent
54 | parent::__construct();
55 | }
56 |
57 | /**
58 | * Get Filename
59 | *
60 | * @return string
61 | */
62 | public function getFilename() {
63 | return basename($this->_path);
64 | }
65 |
66 | /**
67 | * Get indexed filename (using image index)
68 | *
69 | * @return string
70 | */
71 | public function getIndexedFilename() {
72 | $fileName = $this->getFilename();
73 | $fileName = str_replace(' ', '_', $fileName);
74 | return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension();
75 | }
76 |
77 | /**
78 | * Get Extension
79 | *
80 | * @return string
81 | */
82 | public function getExtension() {
83 | $exploded = explode(".", basename($this->_path));
84 | return $exploded[count($exploded) - 1];
85 | }
86 |
87 | /**
88 | * Get Path
89 | *
90 | * @return string
91 | */
92 | public function getPath() {
93 | return $this->_path;
94 | }
95 |
96 | /**
97 | * Set Path
98 | *
99 | * @param string $pValue File path
100 | * @param boolean $pVerifyFile Verify file
101 | * @throws PHPExcel_Exception
102 | * @return PHPExcel_Worksheet_Drawing
103 | */
104 | public function setPath($pValue = '', $pVerifyFile = true) {
105 | if ($pVerifyFile) {
106 | if (file_exists($pValue)) {
107 | $this->_path = $pValue;
108 |
109 | if ($this->_width == 0 && $this->_height == 0) {
110 | // Get width/height
111 | list($this->_width, $this->_height) = getimagesize($pValue);
112 | }
113 | } else {
114 | throw new PHPExcel_Exception("File $pValue not found!");
115 | }
116 | } else {
117 | $this->_path = $pValue;
118 | }
119 | return $this;
120 | }
121 |
122 | /**
123 | * Get hash code
124 | *
125 | * @return string Hash code
126 | */
127 | public function getHashCode() {
128 | return md5(
129 | $this->_path
130 | . parent::getHashCode()
131 | . __CLASS__
132 | );
133 | }
134 |
135 | /**
136 | * Implement PHP __clone to create a deep clone, not just a shallow copy.
137 | */
138 | public function __clone() {
139 | $vars = get_object_vars($this);
140 | foreach ($vars as $key => $value) {
141 | if (is_object($value)) {
142 | $this->$key = clone $value;
143 | } else {
144 | $this->$key = $value;
145 | }
146 | }
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Calculation/functionlist.txt:
--------------------------------------------------------------------------------
1 | ABS
2 | ACCRINT
3 | ACCRINTM
4 | ACOS
5 | ACOSH
6 | ADDRESS
7 | AMORDEGRC
8 | AMORLINC
9 | AND
10 | AREAS
11 | ASC
12 | ASIN
13 | ASINH
14 | ATAN
15 | ATAN2
16 | ATANH
17 | AVEDEV
18 | AVERAGE
19 | AVERAGEA
20 | AVERAGEIF
21 | AVERAGEIFS
22 | BAHTTEXT
23 | BESSELI
24 | BESSELJ
25 | BESSELK
26 | BESSELY
27 | BETADIST
28 | BETAINV
29 | BIN2DEC
30 | BIN2HEX
31 | BIN2OCT
32 | BINOMDIST
33 | CEILING
34 | CELL
35 | CHAR
36 | CHIDIST
37 | CHIINV
38 | CHITEST
39 | CHOOSE
40 | CLEAN
41 | CODE
42 | COLUMN
43 | COLUMNS
44 | COMBIN
45 | COMPLEX
46 | CONCATENATE
47 | CONFIDENCE
48 | CONVERT
49 | CORREL
50 | COS
51 | COSH
52 | COUNT
53 | COUNTA
54 | COUNTBLANK
55 | COUNTIF
56 | COUNTIFS
57 | COUPDAYBS
58 | COUPDAYBS
59 | COUPDAYSNC
60 | COUPNCD
61 | COUPNUM
62 | COUPPCD
63 | COVAR
64 | CRITBINOM
65 | CUBEKPIMEMBER
66 | CUBEMEMBER
67 | CUBEMEMBERPROPERTY
68 | CUBERANKEDMEMBER
69 | CUBESET
70 | CUBESETCOUNT
71 | CUBEVALUE
72 | CUMIPMT
73 | CUMPRINC
74 | DATE
75 | DATEDIF
76 | DATEVALUE
77 | DAVERAGE
78 | DAY
79 | DAYS360
80 | DB
81 | DCOUNT
82 | DCOUNTA
83 | DDB
84 | DEC2BIN
85 | DEC2HEX
86 | DEC2OCT
87 | DEGREES
88 | DELTA
89 | DEVSQ
90 | DGET
91 | DISC
92 | DMAX
93 | DMIN
94 | DOLLAR
95 | DOLLARDE
96 | DOLLARFR
97 | DPRODUCT
98 | DSTDEV
99 | DSTDEVP
100 | DSUM
101 | DURATION
102 | DVAR
103 | DVARP
104 | EDATE
105 | EFFECT
106 | EOMONTH
107 | ERF
108 | ERFC
109 | ERROR.TYPE
110 | EVEN
111 | EXACT
112 | EXP
113 | EXPONDIST
114 | FACT
115 | FACTDOUBLE
116 | FALSE
117 | FDIST
118 | FIND
119 | FINDB
120 | FINV
121 | FISHER
122 | FISHERINV
123 | FIXED
124 | FLOOR
125 | FORECAST
126 | FREQUENCY
127 | FTEST
128 | FV
129 | FVSCHEDULE
130 | GAMAMDIST
131 | GAMMAINV
132 | GAMMALN
133 | GCD
134 | GEOMEAN
135 | GESTEP
136 | GETPIVOTDATA
137 | GROWTH
138 | HARMEAN
139 | HEX2BIN
140 | HEX2OCT
141 | HLOOKUP
142 | HOUR
143 | HYPERLINK
144 | HYPGEOMDIST
145 | IF
146 | IFERROR
147 | IMABS
148 | IMAGINARY
149 | IMARGUMENT
150 | IMCONJUGATE
151 | IMCOS
152 | IMEXP
153 | IMLN
154 | IMLOG10
155 | IMLOG2
156 | IMPOWER
157 | IMPRODUCT
158 | IMREAL
159 | IMSIN
160 | IMSQRT
161 | IMSUB
162 | IMSUM
163 | INDEX
164 | INDIRECT
165 | INFO
166 | INT
167 | INTERCEPT
168 | INTRATE
169 | IPMT
170 | IRR
171 | ISBLANK
172 | ISERR
173 | ISERROR
174 | ISEVEN
175 | ISLOGICAL
176 | ISNA
177 | ISNONTEXT
178 | ISNUMBER
179 | ISODD
180 | ISPMT
181 | ISREF
182 | ISTEXT
183 | JIS
184 | KURT
185 | LARGE
186 | LCM
187 | LEFT
188 | LEFTB
189 | LEN
190 | LENB
191 | LINEST
192 | LN
193 | LOG
194 | LOG10
195 | LOGEST
196 | LOGINV
197 | LOGNORMDIST
198 | LOOKUP
199 | LOWER
200 | MATCH
201 | MAX
202 | MAXA
203 | MDETERM
204 | MDURATION
205 | MEDIAN
206 | MID
207 | MIDB
208 | MIN
209 | MINA
210 | MINUTE
211 | MINVERSE
212 | MIRR
213 | MMULT
214 | MOD
215 | MODE
216 | MONTH
217 | MROUND
218 | MULTINOMIAL
219 | N
220 | NA
221 | NEGBINOMDIST
222 | NETWORKDAYS
223 | NOMINAL
224 | NORMDIST
225 | NORMINV
226 | NORMSDIST
227 | NORMSINV
228 | NOT
229 | NOW
230 | NPER
231 | NPV
232 | OCT2BIN
233 | OCT2DEC
234 | OCT2HEX
235 | ODD
236 | ODDFPRICE
237 | ODDFYIELD
238 | ODDLPRICE
239 | ODDLYIELD
240 | OFFSET
241 | OR
242 | PEARSON
243 | PERCENTILE
244 | PERCENTRANK
245 | PERMUT
246 | PHONETIC
247 | PI
248 | PMT
249 | POISSON
250 | POWER
251 | PPMT
252 | PRICE
253 | PRICEDISC
254 | PRICEMAT
255 | PROB
256 | PRODUCT
257 | PROPER
258 | PV
259 | QUARTILE
260 | QUOTIENT
261 | RADIANS
262 | RAND
263 | RANDBETWEEN
264 | RANK
265 | RATE
266 | RECEIVED
267 | REPLACE
268 | REPLACEB
269 | REPT
270 | RIGHT
271 | RIGHTB
272 | ROMAN
273 | ROUND
274 | ROUNDDOWN
275 | ROUNDUP
276 | ROW
277 | ROWS
278 | RSQ
279 | RTD
280 | SEARCH
281 | SEARCHB
282 | SECOND
283 | SERIESSUM
284 | SIGN
285 | SIN
286 | SINH
287 | SKEW
288 | SLN
289 | SLOPE
290 | SMALL
291 | SQRT
292 | SQRTPI
293 | STANDARDIZE
294 | STDEV
295 | STDEVA
296 | STDEVP
297 | STDEVPA
298 | STEYX
299 | SUBSTITUTE
300 | SUBTOTAL
301 | SUM
302 | SUMIF
303 | SUMIFS
304 | SUMPRODUCT
305 | SUMSQ
306 | SUMX2MY2
307 | SUMX2PY2
308 | SUMXMY2
309 | SYD
310 | T
311 | TAN
312 | TANH
313 | TBILLEQ
314 | TBILLPRICE
315 | TBILLYIELD
316 | TDIST
317 | TEXT
318 | TIME
319 | TIMEVALUE
320 | TINV
321 | TODAY
322 | TRANSPOSE
323 | TREND
324 | TRIM
325 | TRIMMEAN
326 | TRUE
327 | TRUNC
328 | TTEST
329 | TYPE
330 | UPPER
331 | USDOLLAR
332 | VALUE
333 | VAR
334 | VARA
335 | VARP
336 | VARPA
337 | VDB
338 | VERSION
339 | VLOOKUP
340 | WEEKDAY
341 | WEEKNUM
342 | WEIBULL
343 | WORKDAY
344 | XIRR
345 | XNPV
346 | YEAR
347 | YEARFRAC
348 | YIELD
349 | YIELDDISC
350 | YIELDMAT
351 | ZTEST
352 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Cell/DefaultValueBinder.php:
--------------------------------------------------------------------------------
1 | format('Y-m-d H:i:s');
64 | } elseif (!($value instanceof PHPExcel_RichText)) {
65 | $value = (string) $value;
66 | }
67 | }
68 |
69 | // Set value explicit
70 | $cell->setValueExplicit( $value, self::dataTypeForValue($value) );
71 |
72 | // Done!
73 | return true;
74 | }
75 |
76 | /**
77 | * DataType for value
78 | *
79 | * @param mixed $pValue
80 | * @return string
81 | */
82 | public static function dataTypeForValue($pValue = null) {
83 | // Match the value against a few data types
84 | if ($pValue === null) {
85 | return PHPExcel_Cell_DataType::TYPE_NULL;
86 | } elseif ($pValue === '') {
87 | return PHPExcel_Cell_DataType::TYPE_STRING;
88 | } elseif ($pValue instanceof PHPExcel_RichText) {
89 | return PHPExcel_Cell_DataType::TYPE_INLINE;
90 | } elseif ($pValue{0} === '=' && strlen($pValue) > 1) {
91 | return PHPExcel_Cell_DataType::TYPE_FORMULA;
92 | } elseif (is_bool($pValue)) {
93 | return PHPExcel_Cell_DataType::TYPE_BOOL;
94 | } elseif (is_float($pValue) || is_int($pValue)) {
95 | return PHPExcel_Cell_DataType::TYPE_NUMERIC;
96 | } elseif (preg_match('/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) {
97 | $tValue = ltrim($pValue, '+-');
98 | if (is_string($pValue) && $tValue{0} === '0' && strlen($tValue) > 1 && $tValue{1} !== '.' ) {
99 | return PHPExcel_Cell_DataType::TYPE_STRING;
100 | } elseif((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) {
101 | return PHPExcel_Cell_DataType::TYPE_STRING;
102 | }
103 | return PHPExcel_Cell_DataType::TYPE_NUMERIC;
104 | } elseif (is_string($pValue) && array_key_exists($pValue, PHPExcel_Cell_DataType::getErrorCodes())) {
105 | return PHPExcel_Cell_DataType::TYPE_ERROR;
106 | }
107 |
108 | return PHPExcel_Cell_DataType::TYPE_STRING;
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Writer/OpenDocument/MetaInf.php:
--------------------------------------------------------------------------------
1 |
36 | */
37 | class PHPExcel_Writer_OpenDocument_MetaInf extends PHPExcel_Writer_OpenDocument_WriterPart
38 | {
39 | /**
40 | * Write META-INF/manifest.xml to XML format
41 | *
42 | * @param PHPExcel $pPHPExcel
43 | * @return string XML Output
44 | * @throws PHPExcel_Writer_Exception
45 | */
46 | public function writeManifest(PHPExcel $pPHPExcel = null)
47 | {
48 | if (!$pPHPExcel) {
49 | $pPHPExcel = $this->getParentWriter()->getPHPExcel();
50 | }
51 |
52 | $objWriter = null;
53 | if ($this->getParentWriter()->getUseDiskCaching()) {
54 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
55 | } else {
56 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
57 | }
58 |
59 | // XML header
60 | $objWriter->startDocument('1.0', 'UTF-8');
61 |
62 | // Manifest
63 | $objWriter->startElement('manifest:manifest');
64 | $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0');
65 | $objWriter->writeAttribute('manifest:version', '1.2');
66 |
67 | $objWriter->startElement('manifest:file-entry');
68 | $objWriter->writeAttribute('manifest:full-path', '/');
69 | $objWriter->writeAttribute('manifest:version', '1.2');
70 | $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet');
71 | $objWriter->endElement();
72 | $objWriter->startElement('manifest:file-entry');
73 | $objWriter->writeAttribute('manifest:full-path', 'meta.xml');
74 | $objWriter->writeAttribute('manifest:media-type', 'text/xml');
75 | $objWriter->endElement();
76 | $objWriter->startElement('manifest:file-entry');
77 | $objWriter->writeAttribute('manifest:full-path', 'settings.xml');
78 | $objWriter->writeAttribute('manifest:media-type', 'text/xml');
79 | $objWriter->endElement();
80 | $objWriter->startElement('manifest:file-entry');
81 | $objWriter->writeAttribute('manifest:full-path', 'content.xml');
82 | $objWriter->writeAttribute('manifest:media-type', 'text/xml');
83 | $objWriter->endElement();
84 | $objWriter->startElement('manifest:file-entry');
85 | $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png');
86 | $objWriter->writeAttribute('manifest:media-type', 'image/png');
87 | $objWriter->endElement();
88 | $objWriter->startElement('manifest:file-entry');
89 | $objWriter->writeAttribute('manifest:full-path', 'styles.xml');
90 | $objWriter->writeAttribute('manifest:media-type', 'text/xml');
91 | $objWriter->endElement();
92 | $objWriter->endElement();
93 |
94 | return $objWriter->getData();
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Calculation/Function.php:
--------------------------------------------------------------------------------
1 | _category = $pCategory;
84 | $this->_excelName = $pExcelName;
85 | $this->_phpExcelName = $pPHPExcelName;
86 | } else {
87 | throw new PHPExcel_Calculation_Exception("Invalid parameters passed.");
88 | }
89 | }
90 |
91 | /**
92 | * Get Category (represented by CATEGORY_*)
93 | *
94 | * @return string
95 | */
96 | public function getCategory() {
97 | return $this->_category;
98 | }
99 |
100 | /**
101 | * Set Category (represented by CATEGORY_*)
102 | *
103 | * @param string $value
104 | * @throws PHPExcel_Calculation_Exception
105 | */
106 | public function setCategory($value = null) {
107 | if (!is_null($value)) {
108 | $this->_category = $value;
109 | } else {
110 | throw new PHPExcel_Calculation_Exception("Invalid parameter passed.");
111 | }
112 | }
113 |
114 | /**
115 | * Get Excel name
116 | *
117 | * @return string
118 | */
119 | public function getExcelName() {
120 | return $this->_excelName;
121 | }
122 |
123 | /**
124 | * Set Excel name
125 | *
126 | * @param string $value
127 | */
128 | public function setExcelName($value) {
129 | $this->_excelName = $value;
130 | }
131 |
132 | /**
133 | * Get PHPExcel name
134 | *
135 | * @return string
136 | */
137 | public function getPHPExcelName() {
138 | return $this->_phpExcelName;
139 | }
140 |
141 | /**
142 | * Set PHPExcel name
143 | *
144 | * @param string $value
145 | */
146 | public function setPHPExcelName($value) {
147 | $this->_phpExcelName = $value;
148 | }
149 | }
150 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/CalcEngine/Logger.php:
--------------------------------------------------------------------------------
1 | _cellStack = $stack;
78 | }
79 |
80 | /**
81 | * Enable/Disable Calculation engine logging
82 | *
83 | * @param boolean $pValue
84 | */
85 | public function setWriteDebugLog($pValue = FALSE) {
86 | $this->_writeDebugLog = $pValue;
87 | }
88 |
89 | /**
90 | * Return whether calculation engine logging is enabled or disabled
91 | *
92 | * @return boolean
93 | */
94 | public function getWriteDebugLog() {
95 | return $this->_writeDebugLog;
96 | }
97 |
98 | /**
99 | * Enable/Disable echoing of debug log information
100 | *
101 | * @param boolean $pValue
102 | */
103 | public function setEchoDebugLog($pValue = FALSE) {
104 | $this->_echoDebugLog = $pValue;
105 | }
106 |
107 | /**
108 | * Return whether echoing of debug log information is enabled or disabled
109 | *
110 | * @return boolean
111 | */
112 | public function getEchoDebugLog() {
113 | return $this->_echoDebugLog;
114 | }
115 |
116 | /**
117 | * Write an entry to the calculation engine debug log
118 | */
119 | public function writeDebugLog() {
120 | // Only write the debug log if logging is enabled
121 | if ($this->_writeDebugLog) {
122 | $message = implode(func_get_args());
123 | $cellReference = implode(' -> ', $this->_cellStack->showStack());
124 | if ($this->_echoDebugLog) {
125 | echo $cellReference,
126 | ($this->_cellStack->count() > 0 ? ' => ' : ''),
127 | $message,
128 | PHP_EOL;
129 | }
130 | $this->_debugLog[] = $cellReference .
131 | ($this->_cellStack->count() > 0 ? ' => ' : '') .
132 | $message;
133 | }
134 | } // function _writeDebug()
135 |
136 | /**
137 | * Clear the calculation engine debug log
138 | */
139 | public function clearLog() {
140 | $this->_debugLog = array();
141 | } // function flushLogger()
142 |
143 | /**
144 | * Return the calculation engine debug log
145 | *
146 | * @return string[]
147 | */
148 | public function getLog() {
149 | return $this->_debugLog;
150 | } // function flushLogger()
151 |
152 | } // class PHPExcel_CalcEngine_Logger
153 |
154 |
--------------------------------------------------------------------------------
/JewishCalendar/PHPExcel/PHPExcel/Shared/trend/powerBestFitClass.php:
--------------------------------------------------------------------------------
1 | getIntersect() * pow(($xValue - $this->_Xoffset),$this->getSlope());
58 | } // function getValueOfYForX()
59 |
60 |
61 | /**
62 | * Return the X-Value for a specified value of Y
63 | *
64 | * @param float $yValue Y-Value
65 | * @return float X-Value
66 | **/
67 | public function getValueOfXForY($yValue) {
68 | return pow((($yValue + $this->_Yoffset) / $this->getIntersect()),(1 / $this->getSlope()));
69 | } // function getValueOfXForY()
70 |
71 |
72 | /**
73 | * Return the Equation of the best-fit line
74 | *
75 | * @param int $dp Number of places of decimal precision to display
76 | * @return string
77 | **/
78 | public function getEquation($dp=0) {
79 | $slope = $this->getSlope($dp);
80 | $intersect = $this->getIntersect($dp);
81 |
82 | return 'Y = '.$intersect.' * X^'.$slope;
83 | } // function getEquation()
84 |
85 |
86 | /**
87 | * Return the Value of X where it intersects Y = 0
88 | *
89 | * @param int $dp Number of places of decimal precision to display
90 | * @return string
91 | **/
92 | public function getIntersect($dp=0) {
93 | if ($dp != 0) {
94 | return round(exp($this->_intersect),$dp);
95 | }
96 | return exp($this->_intersect);
97 | } // function getIntersect()
98 |
99 |
100 | /**
101 | * Execute the regression and calculate the goodness of fit for a set of X and Y data values
102 | *
103 | * @param float[] $yValues The set of Y-values for this regression
104 | * @param float[] $xValues The set of X-values for this regression
105 | * @param boolean $const
106 | */
107 | private function _power_regression($yValues, $xValues, $const) {
108 | foreach($xValues as &$value) {
109 | if ($value < 0.0) {
110 | $value = 0 - log(abs($value));
111 | } elseif ($value > 0.0) {
112 | $value = log($value);
113 | }
114 | }
115 | unset($value);
116 | foreach($yValues as &$value) {
117 | if ($value < 0.0) {
118 | $value = 0 - log(abs($value));
119 | } elseif ($value > 0.0) {
120 | $value = log($value);
121 | }
122 | }
123 | unset($value);
124 |
125 | $this->_leastSquareFit($yValues, $xValues, $const);
126 | } // function _power_regression()
127 |
128 |
129 | /**
130 | * Define the regression and calculate the goodness of fit for a set of X and Y data values
131 | *
132 | * @param float[] $yValues The set of Y-values for this regression
133 | * @param float[] $xValues The set of X-values for this regression
134 | * @param boolean $const
135 | */
136 | function __construct($yValues, $xValues=array(), $const=True) {
137 | if (parent::__construct($yValues, $xValues) !== False) {
138 | $this->_power_regression($yValues, $xValues, $const);
139 | }
140 | } // function __construct()
141 |
142 | } // class powerBestFit
--------------------------------------------------------------------------------