Skip to content

Commit

Permalink
Fixes Broken PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCatarino committed Mar 7, 2024
1 parent 8f70cb8 commit 5c4783d
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?
$fileType = "notebook";
$openProjectLink = "/docs/v2/cloud-platform/projects/getting-started#02-View-All-Projects";
$videoLink = "";
include(DOCS_RESOURCES."/getting-started/projects/rename-files.php");
?>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

if(!isset($leanCLI)){
$leanCLI = false;
if(!isset($leanCli)){
$leanCli = false;
}

include(DOCS_RESOURCES."/cli/version-control/push-changes-to-git.php");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?
$fileType = "notebook";
$openProjectLink = "/docs/v2/local-platform/projects/getting-started#04-Open-Projects";
$videoLink = "";
include(DOCS_RESOURCES."/getting-started/projects/rename-files.php");
?>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
$typeOf = "Tick";
$createConsolidatorExtraArgs = ", TickType.Quote";
$resolveConsolidatorExtraArgsC = ", typeof(QuoteBar)";
$resolveConsolidatorExtraArgsPy = "";
$resolutionArgExtraExamplesC = "";
$resolutionArgExtraExamplesPy = "";
$consolidationHandlerType = "QuoteBar";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

<p>The following table shows which <a href='/docs/v2/writing-algorithms/reality-modeling/settlement/key-concepts'>settlement model</a> the <code>InteractiveBrokersBrokerageModel</code> uses based on the security type and your account type:</p>

<?
<?
$brokerageModelName = "InteractiveBrokersBrokerageModel";
$includeLinks = false;
include(DOCS_RESOURCES."/reality-modeling/default-settlement-models.php");
?>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?
$fileType = "notebook";
$openProjectLink = "/docs/v2/cloud-platform/projects/getting-started#02-View-All-Projects";
$videoLink = "";
include(DOCS_RESOURCES."/getting-started/projects/rename-files.php");
?>
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
$underlyingSymbolVariablePy = "equity_symbol";
$underlyingSymbolVariableC = "equitySymbol";

$contractVariableC = "contractSymbol";
$contractVariablePy = "contract_symbol";

$underlyingAssetClass = "Equity";
$supportsTicks = false;
$contractVariableC = "contractSymbol";
$contractVariablePy = "contract_symbol";
include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php");
?>
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
$underlyingSymbolVariablePy = "future.Symbol";
$underlyingSymbolVariableC = "future.Symbol";

$contractVariableC = "contractSymbol";
$contractVariablePy = "contract_symbol";

$underlyingAssetClass = "";
$supportsTicks = true;
$contractVariableC = "contractSymbol";
$contractVariablePy = "contract_symbol";
include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php");
?>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<? $specificAsset = " for Futures contracts"; include(DOCS_RESOURCES."/securities/data-normalization-raw-only.php"); ?>
<? $specificAsset = " for Futures contracts"; $additionalInformation = ""; include(DOCS_RESOURCES."/securities/data-normalization-raw-only.php"); ?>

<p>The following data normalization modes are available for <a href='/docs/v2/writing-algorithms/universes/futures#12-Continous-Contracts'>continuous Futures contracts</a>:</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

$underlyingAssetClass = "Futures contract";
$supportsTicks = false;
$contractVariablePy ="fop_contract_symbol";
$contractVariableC ="fopContractSymbol";
$contractVariablePy ="fop_contract_symbol";
include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php");
?>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
$underlyingSymbolVariableC = "option.Symbol";

$underlyingAssetClass = "Index";
$contractVariablePy = "\"SPX\"";
$supportsTicks = false;
$contractVariableC = "\"SPX\"";
$contractVariablePy = "\"SPX\"";
include(DOCS_RESOURCES."/datasets/research-environment/get-historical-data.php");
?>
2 changes: 1 addition & 1 deletion Resources/cli/version-control/push-changes-to-git.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<pre>$ lean cloud pull</pre>
</div>
<? } ?>
<li><? if ($leanCLI) { ?>A<? } else { ?>Open a terminal in your organization workspace and then a<? } ?>dd the project directories and the <span class='public-directory-name'>Library</span>.</li>
<li><? if ($leanCli) { ?>A<? } else { ?>Open a terminal in your organization workspace and then a<? } ?>dd the project directories and the <span class='public-directory-name'>Library</span>.</li>
<div class="cli section-example-container">
<pre>$ git add Library/
$ git add &lt;projectDirectory1&gt;/
Expand Down
2 changes: 1 addition & 1 deletion Resources/initialization/set-time-zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div data-tree='QuantConnect.TimeZones'></div>

<div class='section-example-container'>
<pre class='csharp'><?=$cCodePrefix?>SetTimeZone("Europe/London");
<pre class='csharp'><?=$writingAlgorithms ? "" : "qb."?>SetTimeZone("Europe/London");
<?=$writingAlgorithms ? "" : "qb."?>SetTimeZone(NodaTime.DateTimeZone.Utc);
<?=$writingAlgorithms ? "" : "qb."?>SetTimeZone(TimeZones.Chicago);
</pre>
Expand Down
2 changes: 1 addition & 1 deletion Resources/projects/ide/keyboard-shortcuts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<p>Follow these steps to view the keyboard shortcuts of your account:</p>

<ol>
<li><a href='<?=$projectLink?>'>Open a project</a>.</li>
<li><a href='<?=$openProjectLink?>'>Open a project</a>.</li>
<li>Press <span class='key-combinations'>F1</span>.</li>
<li>Enter "Preferences: Open Keyboard Shortcuts".</li>
<li>Click <span class='button-name'>Preferences: Open Keyboard Shortcuts</span>.</li>
Expand Down
2 changes: 1 addition & 1 deletion Resources/projects/structure/parameters.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. <a href='<?=$addParametersLink?>'>Add parameters to your projects</a> to remove hard-coded values from your code files and to perform <a href='<?=$parameterOptimizationLink?>'>parameter optimizations</a>. To get the parameter values into your algorithm, see <a href='/docs/v2/writing-algorithms/parameters#03-Get-Parameters'>Get Parameters</a>. The parameter values are sent to your algorithm when you deploy the algorithm, so it's not possible to change the parameter values while the algorithm runs.</p>
<p>Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. <a href='<?=$addParametersLink?>'>Add parameters to your projects</a> to remove hard-coded values from your code files and to perform <a href='<?=$parameterOptimizationsLink?>'>parameter optimizations</a>. To get the parameter values into your algorithm, see <a href='/docs/v2/writing-algorithms/parameters#03-Get-Parameters'>Get Parameters</a>. The parameter values are sent to your algorithm when you deploy the algorithm, so it's not possible to change the parameter values while the algorithm runs.</p>
2 changes: 1 addition & 1 deletion Resources/securities/data-normalization.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>The data normalization mode defines how historical data is adjusted for <a href='/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions'>corporate actions</a>.<? if ($isWritingAlgorithms) { ?> The data normalization mode affects the data that LEAN passes to <code>OnData</code> and the data from <a href='/docs/v2/writing-algorithms/historical-data/history-requests'>history requests</a>. <? } ?> By default, LEAN adjusts US Equity data for splits and dividends to produce a smooth price curve, but the following data normalization modes are available:</p>
<p>The data normalization mode defines how historical data is adjusted for <a href='/docs/v2/writing-algorithms/securities/asset-classes/us-equity/corporate-actions'>corporate actions</a>.<? if ($writingAlgorithms) { ?> The data normalization mode affects the data that LEAN passes to <code>OnData</code> and the data from <a href='/docs/v2/writing-algorithms/historical-data/history-requests'>history requests</a>. <? } ?> By default, LEAN adjusts US Equity data for splits and dividends to produce a smooth price curve, but the following data normalization modes are available:</p>

<div data-tree='QuantConnect.DataNormalizationMode' data-fields='Raw,Adjusted,SplitAdjusted,TotalReturn<?=$research ? ",ScaledRaw" : "";?>'></div>

Expand Down
4 changes: 3 additions & 1 deletion code-generators/SinglePageDocGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ def ExtractImage(content: str) -> dict:
images = soup.findAll('img')

for image in images:
url = image["src"]
url = image["src"].strip()
if not url:
continue
path = f'{IMAGE_DIR}/{url.split("/")[-1].split("?")[0]}'
try:
if url and not os.path.exists(path):
Expand Down

0 comments on commit 5c4783d

Please sign in to comment.