<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/NPRuntime" version="1.0.0" viewmodes="maximized">
- <tizen:application id="9vbpmj3Mru" required_version="1.0"/>
- <content src="index.html"/>
- <icon src="icon.png"/>
- <name>NPRuntime</name>
+<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/NPRuntime" version="1.0.0" viewmodes="maximized">
+ <tizen:application id="ZKMTeYYCI6.NPRuntime" package="ZKMTeYYCI6" required_version="2.1"/>
+ <content src="index.html"/>
+ <icon src="icon.png"/>
+ <name>NPRuntime</name>
</widget>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
- <meta name="description" content="Tizen NPPlugin Sample Web Application" />
+ <meta name="description" content="Tizen NPRuntime Sample Web Application" />
<script type="text/javascript" src="./js/main.js"></script>
- <title>Tizen Web IDE - Tizen - NPPlugin Sample Web Application</title>
+ <title>Tizen Web IDE - Tizen - NPRuntime Sample Web Application</title>
</head>
<body>
- <object id="NPPluginMatrix" type="application/test" width="0" height="0"></object>
+ <object id="NPRuntimeMatrix" type="application/test" width="0" height="0"></object>
<header>
<hgroup>
- <h1>NPPlugin Sample</h1>
+ <h1>NPRUNTIME Sample</h1>
<hr />
<h3>Description</h3>
- <h4>This sample application compares Javascript and NPPlugin about matrix multiplication time.
+ <h4>This sample application compares Javascript and NPRuntime about matrix multiplication time.
<hr /></h4>
<h3>Running steps</h3>
<h4>1. Get the matrix length <br />2. Create two square matrixes with random generated number <br />3. Measure the multiplication time </h4>
<hr />
</hgroup>
</header>
- <p>Enter the matrix length : <input type="number" min="100" max="500" value="100" id="length_btn" onkeydown="check_input_onkeydown()" style="height: 30px; width: 70px" /> (100~500)<br /></p>
+ <p>Enter the matrix length : <input type="number" min="100" max="300" value="100" id="length_btn" onkeydown="check_input_onkeydown()" style="height: 30px; width: 70px" /> (100~300)<br /></p>
<hr />
<div id="resultByJS_div">
Javascript :
</div>
<br />
<div id="resultByPlugin_div">
- NPPlugin :
+ NPRuntime :
</div>
<p><input type="button" value="Get the multiplication time" id="result_btn" onclick="resultFunction()" /><br /></p>
<div id="array1"></div>
<div id="array3"></div>
<div id="array4"></div>
</body>
-</html>
\ No newline at end of file
+</html>
matB[i][j] = Math.ceil(Math.random()*100-1);
}
}
-
- NPPluginMatrix.setMatrixA(matA);
- NPPluginMatrix.setMatrixB(matB);
+ NPRuntimeMatrix.setMatrixA(matA);
+ NPRuntimeMatrix.setMatrixB(matB);
document.getElementById('resultByJS_div').innerHTML = "Javascript : Calculating...";
- document.getElementById('resultByPlugin_div').innerHTML = "NPPlugin : Calculating...";
+ document.getElementById('resultByPlugin_div').innerHTML = "NPRuntime : Calculating...";
setTimeout("getResult()", 10);
}
document.getElementById('resultByJS_div').innerHTML = "Javascript : " + (after.getTime() - before.getTime()) + "ms";
var beforeP = new Date();
- NPPluginMatrix.multiplication();
+ NPRuntimeMatrix.multiplication();
var afterP = new Date();
- document.getElementById('resultByPlugin_div').innerHTML = "NPPlugin : " + (afterP.getTime() - beforeP.getTime()) + "ms";
+ document.getElementById('resultByPlugin_div').innerHTML = "NPRuntime : " + (afterP.getTime() - beforeP.getTime()) + "ms";
//document.getElementById('array1').innerHTML = "matA :<br>" + matA + "<br>";
//document.getElementById('array2').innerHTML = "matB :<br>" + matB + "<br>";
//document.getElementById('array3').innerHTML = "matResult JS :<br>" + matResult + "<br>";
- //document.getElementById('array4').innerHTML = "matResult Plugin :<br>" + NPPluginMatrix.getMatrixResult() + "<br>";
+ //document.getElementById('array4').innerHTML = "matResult Plugin :<br>" + NPRuntimeMatrix.getMatrixResult() + "<br>";
document.getElementById('result_btn').style.display = "block";
}
function resultFunction() {
document.getElementById('resultByJS_div').innerHTML = "Javascript :";
- document.getElementById('resultByPlugin_div').innerHTML = "NPPlugin :";
+ document.getElementById('resultByPlugin_div').innerHTML = "NPRuntime :";
var inputValue = parseInt(document.getElementById('length_btn').value);
- if( inputValue > 500 || inputValue < 100) {
- alert("input value 100 ~ 500");
+ if( inputValue > 300 || inputValue < 100 || isNaN(inputValue)) {
+ alert("input value 100 ~ 300");
document.getElementById('length_btn').value = 100;
return;
}
document.getElementById('result_btn').style.display = "none";
document.getElementById('resultByJS_div').innerHTML = "Javascript : Creating matrix...";
- document.getElementById('resultByPlugin_div').innerHTML = "NPPlugin : Creating matrix...";
+ document.getElementById('resultByPlugin_div').innerHTML = "NPRuntime : Creating matrix...";
setTimeout("createArray()", 10);
}
if( !( (event.keyCode >= 48 && event.keyCode<=57) || (event.keyCode >= 96 && event.keyCode <= 105) || event.keyCode==8 ) ){
event.returnValue=false;
}
-}
\ No newline at end of file
+}