<commit_before>@{
	double t_0 = 0;
	double t_end = 150;
	double step = 0.1;
	
	int N = Convert.ToInt32((t_end-t_0)/step) + 1;
	
	String data = "";
	bool show_chart = false;
	
	if (IsPost){
		show_chart = true;
		
		var number = Request["text1"];
		
		double xd = number.AsInt();
		
		double t = 0;
		double x1 = 0;
		double x2 = 0;
		double x3 = 0;
		double currentx1 = 0;
		double currentx2 = 0;
		double currentx3 = 0;
		
		for (int i=0; i < N; ++i){
			t = t_0 + step * i;
			
			currentx1 = x1 + step* (-0.1252*x1 + -0.004637*x2+-0.002198*x3); 
			currentx2 = x2 + step*x1 ;
			currentx3= x3 + step*(10*x1 + -0.2*x3 +1*(x2-xd));
			
			x1 = currentx1;
			x2 = currentx2;
			x3 = currentx3;
			
			data += "[" +t+"," + x2+"]";
			
			if( i < N - 1){
				data += ",";
			}
		}
	}
}

<html>
  <head>
  	<meta charset="utf-8">
	<title>MathBox</title>
    <script type="text/javascript"
          src="https://www.google.com/jsapi?autoload={
            'modules':[{
              'name':'visualization',
              'version':'1',
              'packages':['corechart']
            }]
          }"></script>

    <script type="text/javascript">
      google.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Time', 'Height'],
          @data
        ]);

        var options = {
          title: 'pitch',
          curveType: 'function',
          legend: { position: 'bottom' }
        };

        var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));

        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
  	<form action="" method="post">
		<p><label for="text1">Input Height</label><br>
			<input type="text" name="text1" /></p>
		<p><input type="submit" value=" Show " /></p>
	</form>
	@if (showChart)
	{
		<div id="curve_chart" style="width: 900px; height: 500px"></div>
	}
	else
	{
		<p></p>
	}
  </body>
</html><commit_msg>Update index.cshtml<commit_after>@{
	double t_0 = 0;
	double t_end = 150;
	double step = 0.1;
	
	int N = Convert.ToInt32((t_end-t_0)/step) + 1;
	
	String data = "";
	bool show_chart = false;
	
	if (IsPost){
		show_chart = true;
		
		var number = Request["text1"];
		
		double xd = number.AsInt();
		
		double t = 0;
		double x1 = 0;
		double x2 = 0;
		double x3 = 0;
		double currentx1 = 0;
		double currentx2 = 0;
		double currentx3 = 0;
		
		for (int i=0; i < N; ++i){
			t = t_0 + step * i;
			
			currentx1 = x1 + step* (-0.1252*x1 + -0.004637*x2+-0.002198*x3); 
			currentx2 = x2 + step*x1 ;
			currentx3= x3 + step*(10*x1 + -0.2*x3 +1*(x2-xd));
			
			x1 = currentx1;
			x2 = currentx2;
			x3 = currentx3;
			
			data += "[" +t+"," + x2+"]";
			
			if( i < N - 1){
				data += ",";
			}
		}
	}
}

<html>
  <head>
  	<meta charset="utf-8">
	<title>MathBox</title>
    <script type="text/javascript"
          src="https://www.google.com/jsapi?autoload={
            'modules':[{
              'name':'visualization',
              'version':'1',
              'packages':['corechart']
            }]
          }"></script>

    <script type="text/javascript">
      google.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Time', 'Height'],
          @data
        ]);

        var options = {
          title: 'pitch',
          curveType: 'function',
          legend: { position: 'bottom' }
        };

        var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));

        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
  	<form action="" method="post">
		<p><label for="text1">Input Height</label><br>
			<input type="text" name="text1" /></p>
		<p><input type="submit" value=" Show " /></p>
	</form>
	@if (show_сhart)
	{
		<div id="curve_chart" style="width: 900px; height: 500px"></div>
	}
	else
	{
		<p></p>
	}
  </body>
</html>
{'fraction_non_alphanumeric': 0.18368381048897897, 'fraction_numerical': 0.041550544717506965, 'mean_word_length': 2.20714865962632, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 59, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '761092', 'n_tokens_mistral': 1705, 'n_tokens_neox': 1465, 'n_words': 314}