Advertisement
neurrowcat_kattzukic

VIRRI DETECHTE-d(gg);

Apr 30th, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 10.34 KB | None | 0 0
  1. IN(COR-e)[port80];GG::STDoUT(GG);
  2.  
  3. html {height:100%;}
  4.  
  5. source include/master-slave.inc;
  6. source include/have_binlog_format_statement.inc;
  7.  
  8. call mtr.add_suppression("Unsafe statement written to the binary log");
  9.  
  10. CREATE TABLE t1 (a int);
  11. INSERT INTO t1 VALUES(SLEEP(2));
  12.  
  13. connection slave;
  14. let $run = 5;
  15. let $old = 0;
  16. let $acc = (0);
  17. while ($run)
  18. {
  19.   dec $run;
  20.   let $new=query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1);
  21.   if (`SELECT $new-$old > 1`)
  22.   {
  23.     echo "new = $new, old = $old";
  24.     die "Test failed, values are not as expected";
  25.   }
  26.   if (`SELECT $new-$old < 0`)
  27.   {
  28.     let $run = 0;
  29.   }
  30.   let $old = $new;
  31.   sleep 0.5;
  32. }
  33.  
  34. connection master;
  35. drop table t1;
  36.  
  37. source include/rpl_end.inc;
  38.  
  39. UnitConvert[Quantity[1., 1/"Meters"], "Centimeters"]
  40. (* returns 0.01/cm *)
  41.        
  42. UnitConvert[Quantity[1., "Amperes"/"Meters"], "Centimters"]
  43. (* returns 0.01 A/cm *)
  44. UnitConvert[Quantity[1., "Meters"*"Kilograms"/"Amperes"], "Pounds"]
  45. (* returns 2.20462 lb m/A *)
  46. UnitConvert[Quantity[1., "Meters"*"Feet"*"Kilograms"/"Amperes"], "Centimeters"]
  47. (* returns 3048 kg cm^2/A *)
  48.  
  49.  
  50. signout.js:
  51. var express = require('express');
  52. var Parse = require('parse').Parse;
  53. var signout = express.Router();
  54. module.exports = signout;
  55. signout.post('/signout', function (req, res) {
  56.         Parse.User.logOut();
  57.         console.log("Logout Successful!");
  58.         res.redirect('/')
  59. })
  60.  
  61. html:
  62. <form method="post" action="/signout">
  63.         <input class="btn btn-custom signout" type="button" name="signoutBtn" value="Signout"/>
  64. </form>
  65.  
  66. TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
  67. tm.getDeviceId();
  68.  
  69. @app.route('/login/', methods=['GET','POST'])
  70. def login():
  71. try:
  72.     c,conn = connection()
  73.  
  74.  
  75.     if request.method == 'POST':
  76.  
  77.         data = c.execute("SELECT * FROM users WHERE username = %s",
  78.                 thwart(request.form['username']))
  79.  
  80.  
  81.         if sha256_crypt.verify(request.form['password'], data):
  82.             session['logged_in'] = True
  83.             session['username'] = request.form['username']
  84.             flash('You are now logged in.'+str(session['username']))
  85.             return redirect(url_for('dashboard'))
  86.  
  87.  
  88.     else:
  89.         error = 'Invalid credentials. Try again'
  90.  
  91.     return render_template('login.html', error=error)
  92. except Exception, e:
  93.     flash(e)
  94.  
  95. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  96. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  97. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  98. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  99. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  100. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  101. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  102. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  103. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  104. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  105. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  106. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  107. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  108. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  109. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  110. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  111. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  112. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  113. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  114. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  115. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  116. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  117. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  118. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  119. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  120. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  121. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  122. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  123. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  124. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  125. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  126. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  127. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  128. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  129. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  130. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  131. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  132. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  133. write(3, "\1\0\0\0\0\0\0\0", 8)         = 8
  134. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  135. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 1 ([{fd=3, revents=POLLIN}])
  136. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  137. poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
  138. writev(6, [{"+\3\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
  139. poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
  140. recvmsg(6, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\330+\0\0\0\0\7\0\340\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
  141. recvmsg(6, 0x7ffdaa12d420, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  142. recvmsg(6, 0x7ffdaa12d420, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  143. poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
  144. writev(6, [{"\202\3\n\0,\1 \3.\1 \3V\7\373\3\341\0009\0\207\0\36\0\341\0009\0\30\2\0\0"..., 40}, {NULL, 0}, {"", 0}], 3) = 40
  145. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  146. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 1 ([{fd=3, revents=POLLIN}])
  147. read(3, "\1\0\0\0\0\0\0\0", 16)         = 8
  148. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  149. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  150. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  151. read(3, 0x7ffdaa12dd50, 16)             = -1 EAGAIN (Resource temporarily unavailable)
  152. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  153. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  154. poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
  155. recvmsg(6, 0x7ffdaa12dbd0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  156. recvmsg(6, 0x7ffdaa12dbb0, 0)           = -1 EAGAIN (Resource temporarily unavailable)
  157.  
  158.  
  159. String basicAuth = request.getHeader("Auenter code herethorization");
  160.        
  161. $.ajax({
  162.     type: 'GET',
  163.     url: 'http://localhost:8080/Test/endpoit/to/test',
  164.     dataType : 'json',
  165.     beforeSend: function (request) {
  166.         request.withCredentials = true;
  167.         request.setRequestHeader("Authorization", "Basic  " + btoa('test' + ":" + 'test'));
  168.     },
  169.     success: function(data) {
  170.         console.log(data);
  171.     },
  172.     error: function(data) {
  173.         console.log(data);
  174.     }
  175. });
  176.        
  177. <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  178.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  179.     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  180.     version="2.4">
  181.  
  182.     <display-name>File Explorer</display-name>
  183.     <description>
  184.         File Explorer
  185.     </description>
  186.  
  187.     <servlet>
  188.         <servlet-name>Test</servlet-name>
  189.         <servlet-class>fr.vuzi.controller.FrontController</servlet-class>
  190.     </servlet>
  191.  
  192.     <servlet-mapping>
  193.         <servlet-name>FrontController</servlet-name>
  194.         <url-pattern>/*</url-pattern>
  195.     </servlet-mapping>
  196.  
  197.     <filter>
  198.         <filter-name>CorsFilter</filter-name>
  199.         <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
  200.         <init-param>
  201.             <param-name>cors.allowed.origins</param-name>
  202.             <param-value></param-value>
  203.         </init-param>
  204.         <init-param>
  205.             <param-name>cors.allowed.methods</param-name>
  206.             <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
  207.         </init-param>
  208.         <init-param>
  209.             <param-name>cors.allowed.headers</param-name>
  210.             <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
  211.         </init-param>
  212.         <init-param>
  213.             <param-name>cors.exposed.headers</param-name>
  214.             <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
  215.         </init-param>
  216.         <init-param>
  217.             <param-name>cors.support.credentials</param-name>
  218.             <param-value>true</param-value>
  219.         </init-param>
  220.         <init-param>
  221.             <param-name>cors.preflight.maxage</param-name>
  222.             <param-value>10</param-value>
  223.         </init-param>
  224.     </filter>
  225.     <filter-mapping>
  226.         <filter-name>CorsFilter</filter-name>
  227.         <url-pattern>/*</url-pattern>
  228.     </filter-mapping>
  229.  
  230. </web-app>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement