forked from smilevo/DevGPT-Prompt-Analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Approach.html
128 lines (121 loc) · 3.99 KB
/
Approach.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html>
<head>
<title>Extract Method Research</title>
<style>
table {
border-collapse: collapse;
width: 100%;
font-family: Arial, sans-serif;
font-size: 14px;
}
th, td {
border: 1px solid black;
padding: 8px;
text-align: left;
}
th {
background-color: #ddd;
font-weight: bold;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Extract Method Refactoring Survey</title>
<link rel="stylesheet" href="css/components.css">
<link rel="stylesheet" href="css/icons.css">
<link rel="stylesheet" href="css/responsee.css">
<!-- CUSTOM STYLE -->
<link rel="stylesheet" href="css/template-style.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
</head>
<body>
<!-- TOP NAV WITH LOGO -->
<header>
<nav>
<div class="line">
<div class="s-12 l-2">
<a href="index.html"><img class="s-5 center" src="images/EMRS.png" style="width:60px;height:auto;" ></a>
</div>
<div class="top-nav s-12 l-10 right">
<p class="nav-text">Menu</p>
<ul class="right">
<li><a class="home" href="index.html">Home</a></li>
<!-- <li><a class="about">Experiment</a></li> -->
<!--<li><a class="download">Download</a></li>-->
<!-- <li><a class="details">Dataset</a></li> -->
<!--<li><a class="protection">Data Protection</a></li>-->
<!--<li><a class="support">Support</a></li>-->
<!--<li><a class="contribute">Join</a></li>-->
<!--<li><a class="cite">Cite</a></li>-->
<!--<li><a class="publications">Publications</a></li>-->
<!--<li><a class="contact">Contact</a></li>-->
</ul>
</div>
</div>
</nav>
</header>
<table id="csvTable">
<thead>
<tr>
<th>Row</th>
<th>Approach</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<script>
// Read the CSV file using XMLHttpRequest
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
// Split the CSV into an array of lines
var lines = xhr.responseText.split('\n');
// Loop over each line and split it into an array of values
for (var i = 0; i < lines.length; i++) {
var values = parseCSVLine(lines[i]);
// Create a new row in the table
var row = document.createElement('tr');
//add row number to each cell in first column of table
var cell = document.createElement('td');
cell.textContent = i + 1;
row.appendChild(cell);
// Loop over each value and create a new cell in the row
for (var j = 0; j < values.length; j++) {
var cell = document.createElement('td');
cell.textContent = values[j];
row.appendChild(cell);
}
// Add the row to the table body
document.querySelector('#csvTable tbody').appendChild(row);
}
}
};
xhr.open('GET', 'Approach.csv', true);
xhr.send();
// Helper function to parse a line of CSV data
function parseCSVLine(line) {
var values = [];
var inQuotes = false;
var start = 0;
for (var i = 0; i < line.length; i++) {
if (line[i] === '"') {
inQuotes = !inQuotes;
} else if (line[i] === ',' && !inQuotes) {
values.push(line.substring(start, i).trim());
start = i + 1;
}
}
values.push(line.substring(start).trim());
return values;
}
</script>
</body>
</html>