Guest User

Untitled

a guest
Aug 2nd, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.23 KB | None | 0 0
  1. /* function drawRegionsMap() {
  2. var data = google.visualization.arrayToDataTable([
  3. ['City', 'GSDP'],
  4. ['Andhra Pradesh',6],
  5. ['Arunachal Pradesh',16],
  6. ['Assam',7],
  7. ['Bihar',15],
  8. ['Chhattisgarh',5],
  9. ['Delhi',17],
  10. ['Goa',27],
  11. ['Gujarat',25],
  12. ['Haryana',14],
  13. ['Himachal Pradesh',4],
  14. ['Jammu and Kashmir',20],
  15. ['Jharkhand',2],
  16. ['Karnataka',29],
  17. ['Kerala',24],
  18. ['Madhya Pradesh',1],
  19. ['Maharashtra',21],
  20. ['Manipur',19],
  21. ['Meghalaya',10],
  22. ['Mizoram',28],
  23. ['Nagaland',8],
  24. ['Orissa',22],
  25. ['Punjab',23],
  26. ['Rajasthan',26],
  27. ['Sikkim',3],
  28. ['Tamil Nadu',18],
  29. ['Tripura',12],
  30. ['Uttar Pradesh',9],
  31. ['Uttarakhand',11],
  32. ['West Bengal',13]
  33. ]);
  34.  
  35.  
  36. var options = {datalessRegionColor: '#e31b23', displayMode: 'regions', region:'IN', resolution: 'provinces',colorAxis:{colors:['#c9df8a','#006400']}};
  37.  
  38. var chart = new google.visualization.GeoChart(document.getElementById('regions_div'));
  39.  
  40. chart.draw(data, options);
  41. }
  42. */
  43. function drawChart() {
  44. var query = new google.visualization.Query('https://docs.google.com/spreadsheets/d/167ChxWu2U_p8H43QofoIWU5VRMqo2dxuP6jeJ9qZwt0/edit?usp=sharing');
  45. query.send(handleQueryResponse);
  46. }
  47.  
  48. function handleQueryResponse(response) {
  49. var options = {datalessRegionColor: '#e31b23', displayMode: 'regions', region:'IN', resolution: 'provinces',colorAxis:{colors:['#c9df8a','#006400']}};
  50.  
  51. var data = response.getDataTable();
  52. var chart = new google.visualization.GeoChart(document.getElementById('regions_div'));
  53. chart.draw(data, options);
  54. }
  55.  
  56. </script>
  57. </head>
  58. <body>
  59. <div id="regions_div" style="width: 900px; height: 500px;"></div>
  60. </body>
  61. </html>
  62.  
  63.  
  64.  
  65. <%--
  66. Document : newjsp
  67. --%>
  68.  
  69. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  70. <!DOCTYPE html>
  71. <html>
  72. <head>
  73. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  74. <title>JSP Page</title>
  75.  
  76.  
  77. <style>
  78. body
  79. {
  80. background-color: #021A3D;
  81. }
  82.  
  83. .container {
  84. padding: 16px;
  85. background-color: #023278;
  86. width: 700px;
  87.  
  88. }
  89.  
  90. </style>
  91. <script>
  92. //window.alert("entered");
  93. var x,y,z;
  94. function assign()
  95. {
  96. x =Math.floor(Math.random() *4);
  97. var oper=['+','-','*','/'];
  98. y= oper[x];
  99. //window.alert(y);
  100. x =Math.floor(Math.random() *100);
  101. document.getElementById("one").innerHTML = x;
  102. document.getElementById("Two").innerHTML = y;
  103. z =Math.floor(Math.random() *100);
  104. document.getElementById("Three").innerHTML =z;
  105. }
  106.  
  107. function pass(){
  108.  
  109. var str="/lab/bit?x="+x+"&y="+y+"&z="+z;
  110. document.getElementById("butt1").action = str;
  111. document.getElementById("butt1").submit();
  112. }
  113.  
  114. //document.getElementById("Two").innerHTML = y;
  115. //document.getElementById("Three").innerHTML = Math.floor((math.random()*100)+1);
  116.  
  117.  
  118. </script>
  119.  
  120. </head>
  121. <body onload="assign()">
  122. <div class="container">
  123. <p id ="demo"></p>
  124. <h1 style='color:red;'>Registration Form</h1>
  125. <form action="labbit" id="butt1" method="POST">
  126. Username:<input style ="color:blue;" type ="text" align="centre" name ="username" required /><br/><br/>
  127. Password:<input type="password" align="centre" name="password" alt ='Enter your password'required /><br/><br/>
  128. name:<input type ="text" align="centre" name ="name" required /><br/><br/>
  129. address:<input type ="text" align="centre" name="address" /><br/><br/>
  130. country:<select name ="India" size="1" required>
  131. <option value ="India">India</option>
  132. <option value ="USA">USA</option>
  133. <option value ="UK">UK </option>
  134. </select><br/><br/>
  135. code:<input type="number" align="centre" name ="code" value="code" required id="zip"/><br/><br/>
  136. email:<input type="email" align="centre" name="email" required /><br/><br/>
  137. Gender:<input type="radio" align="centre" name="gender" value ="male" required/>Male
  138. <input type="radio" align="centre" name="gender" value="female"/>Female
  139. <br/><br/>
  140. Language:<input type="checkbox" align="centre" name="language" value="English" />English
  141. <input type ="checkbox" name="language" align="centre" value="Non-English" />Non-English<br/><br/>
  142. About:<textarea cols="50" rows="5" maxlength ="10"></textarea><br/><br/>
  143. <h3 style='color:red'/>Capcha</h3>
  144.  
  145.  
  146. <div> <span id="one" name="num1" style="color:chocolate;"></span> <span id="Two" name="operator" style ="color:green"></span> <span id="Three" name="num2" style ="color:red;"></span></div>
  147. <input type ="number" name="result" required> <br/><br/>
  148. <input type="button" onclick="pass()" value="Submit"/>
  149. </form>
  150. </div>
  151. <%-- start web service invocation --%>
  152. <%--
  153. try {
  154. example.com.webservice.NewWebService_Service service = new example.com.webservice.NewWebService_Service();
  155. example.com.webservice.NewWebService port = service.getNewWebServicePort();
  156. // TODO initialize WS operation arguments here
  157. java.lang.String name = "ROSHAN";
  158. // TODO process result here
  159. java.lang.String result = port.hello(name);
  160. out.println("Result = "+result);
  161. } catch (Exception ex) {
  162. // TODO handle custom exceptions here
  163. }
  164. %>
  165. <%-- end web service invocation --%><hr/>
  166. <%-- start web service invocation --%>
  167. <%--
  168. try {
  169. example.com.webservice.NewWebService_Service service = new example.com.webservice.NewWebService_Service();
  170. example.com.webservice.NewWebService port = service.getNewWebServicePort();
  171. // TODO initialize WS operation arguments here
  172. java.lang.String name = "";
  173. // TODO process result here
  174. java.lang.String result = port.hello(name);
  175. out.println("Result = "+result);
  176. } catch (Exception ex) {
  177. // TODO handle custom exceptions here
  178. }
  179. %>
  180. <%-- end web service invocation --%>
  181. <%-- start web service invocation --%>
  182. <%--
  183. try {
  184. example.com.webservice.NewWebService_Service service = new example.com.webservice.NewWebService_Service();
  185. example.com.webservice.NewWebService port = service.getNewWebServicePort();
  186. // TODO initialize WS operation arguments here
  187. java.lang.String name = "";
  188. // TODO process result here
  189. java.lang.String result = port.hello(name);
  190. out.println("Result = "+result);
  191. } catch (Exception ex) {
  192. // TODO handle custom exceptions here
  193. }
  194. --%>
  195. <%-- end web service invocation --%>
  196. </body>
  197. </html>
Add Comment
Please, Sign In to add comment