fibonacci.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!DOCTYPE html>
  2. <html ng-app="ivprog">
  3. <head>
  4. <title>ivProg - vers&atilde;o Java</title>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <link href="css/bootstrap.min.css" rel="stylesheet" media="screen" />
  8. <link href="css/font-awesome.css" rel="stylesheet" media="screen" />
  9. <link href="css/bootstrap-editable.css" rel="stylesheet" media="screen" />
  10. <link href="css/ivprog.css" rel="stylesheet" media="screen" />
  11. </head>
  12. <body>
  13. <div class="header">
  14. <h1><img src="img/logo_ivprog.png" title="iVProg" /></h1>
  15. </div>
  16. <h1>&nbsp;iVProg : Visual Programming (LInE-IME-USP)</h1>
  17. <a href="http://www.usp.br/line" title="Uma das paginas do LInE">LInE</a>.
  18. <a href="https://github.com/LInE-IME-USP" title="LInE no GitHub">Software educacional livre</a>.
  19. <a href="http://www.usp.br/line/wp" title="Prototipo ambiente LInE">Interatividade na Internet para aprendizagem</a>.
  20. <div class="bloco">
  21. Um exemplo de programa: dado N imprimir o N-&eacute;simo termo da sequ&ecirc;ncia de <i>Fibonacci</i>.<br/>
  22. Sequ&ecirc;ncia de <i>Fibonacci</i>: 1, 1, 2, 3, 5, 8, 13, ... (f_n = f_{n-1} + f_{n-2}).<br/>
  23. Para iniciar interpreta&cedil;&atilde;o do c&oacute;digo, clique no bot&atilde;o
  24. <img src="img/ivp_roda.png" title="Rodar">
  25. (no canto inferior esquerdo, o bot&atilde;o do meio).<br/>
  26. Para examinar um exemplo sem qualquer c&oacute;digo
  27. <a href="index.html" title="iVProg em branco">clique aqui</a>.
  28. <div class="bloco_ivprog">
  29. <div ng-view></div>
  30. <span ng-controller="CommCtrl" id="commCtrl"><center>
  31. <applet name="iLM" archive="iVProg2.jar" code="usp.ime.line.ivprog.Ilm.class"
  32. width="800" height="650" vspace=10 hspace=10>
  33. <param name="lang" value="pt"/>
  34. <param name="MA_PARAM_PropositionURL" value="true"/>
  35. <param name="MA_PARAM_Proposition" value="exemplo/fibonacci.ivp2">
  36. <param name="MA_PARAM_addresPOST" value=".">
  37. <param name="MA_PARAM_notSEND" value="false"/>
  38. </applet>
  39. </center></span>
  40. </div>
  41. </div>
  42. <script>
  43. function getParameterByName(name) {
  44. var match = RegExp('[?&]' + name + '=([^&]*)')
  45. .exec(window.location.search);
  46. return match ?
  47. decodeURIComponent(match[1].replace(/\+/g, ' '))
  48. : null;
  49. }
  50. function getAnswer(){
  51. return angular.element("#commCtrl").scope().getSource()
  52. }
  53. function getEvaluation(){
  54. return angular.element("#commCtrl").scope().getEvaluation();
  55. //return "getEvaluation will return some value in future";
  56. }
  57. function getEvaluationCallback(nota){
  58. parent.getEvaluationCallback(nota);
  59. }
  60. var ilaParams = {
  61. MA_PARAM_PropositionURL: getParameterByName("MA_PARAM_PropositionURL"),
  62. MA_PARAM_notSEND: getParameterByName("MA_PARAM_notSEND"),
  63. MA_PARAM_addresPOST: getParameterByName("MA_PARAM_addresPOST"),
  64. MA_PARAM_PropositionURL: getParameterByName("MA_PARAM_PropositionURL"),
  65. MA_PARAM_Proposition: getParameterByName("MA_PARAM_Proposition"),
  66. };
  67. function trackAction(action){
  68. if(ilaParams.MA_PARAM_addresPOST!=null){
  69. $.post(ilaParams.MA_PARAM_addresPOST+"&track=1", { trackingData: "html=1;"+action }, function(d){
  70. });
  71. }
  72. }
  73. </script>
  74. <div class="foot"><center>
  75. <a href="http://www.ime.usp.br/line">LInE</a> |
  76. <a href="http://www.matematica.br">iM&aacute;tica</a> |
  77. <a href="http://www.usp.br/line/mooc">MOOC</a>
  78. </center></div>
  79. </body>
  80. </html>