Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IN(COR-e)[port80];GG::STDoUT(GG);
- html {height:100%;}
- source include/master-slave.inc;
- source include/have_binlog_format_statement.inc;
- call mtr.add_suppression("Unsafe statement written to the binary log");
- CREATE TABLE t1 (a int);
- INSERT INTO t1 VALUES(SLEEP(2));
- connection slave;
- let $run = 5;
- let $old = 0;
- let $acc = (0);
- while ($run)
- {
- dec $run;
- let $new=query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1);
- if (`SELECT $new-$old > 1`)
- {
- echo "new = $new, old = $old";
- die "Test failed, values are not as expected";
- }
- if (`SELECT $new-$old < 0`)
- {
- let $run = 0;
- }
- let $old = $new;
- sleep 0.5;
- }
- connection master;
- drop table t1;
- source include/rpl_end.inc;
- UnitConvert[Quantity[1., 1/"Meters"], "Centimeters"]
- (* returns 0.01/cm *)
- UnitConvert[Quantity[1., "Amperes"/"Meters"], "Centimters"]
- (* returns 0.01 A/cm *)
- UnitConvert[Quantity[1., "Meters"*"Kilograms"/"Amperes"], "Pounds"]
- (* returns 2.20462 lb m/A *)
- UnitConvert[Quantity[1., "Meters"*"Feet"*"Kilograms"/"Amperes"], "Centimeters"]
- (* returns 3048 kg cm^2/A *)
- signout.js:
- var express = require('express');
- var Parse = require('parse').Parse;
- var signout = express.Router();
- module.exports = signout;
- signout.post('/signout', function (req, res) {
- Parse.User.logOut();
- console.log("Logout Successful!");
- res.redirect('/')
- })
- html:
- <form method="post" action="/signout">
- <input class="btn btn-custom signout" type="button" name="signoutBtn" value="Signout"/>
- </form>
- TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
- tm.getDeviceId();
- @app.route('/login/', methods=['GET','POST'])
- def login():
- try:
- c,conn = connection()
- if request.method == 'POST':
- data = c.execute("SELECT * FROM users WHERE username = %s",
- thwart(request.form['username']))
- if sha256_crypt.verify(request.form['password'], data):
- session['logged_in'] = True
- session['username'] = request.form['username']
- flash('You are now logged in.'+str(session['username']))
- return redirect(url_for('dashboard'))
- else:
- error = 'Invalid credentials. Try again'
- return render_template('login.html', error=error)
- except Exception, e:
- flash(e)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- write(3, "\1\0\0\0\0\0\0\0", 8) = 8
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 1 ([{fd=3, revents=POLLIN}])
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
- writev(6, [{"+\3\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
- poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
- 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
- recvmsg(6, 0x7ffdaa12d420, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12d420, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
- 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
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 1 ([{fd=3, revents=POLLIN}])
- read(3, "\1\0\0\0\0\0\0\0", 16) = 8
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- read(3, 0x7ffdaa12dd50, 16) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- poll([{fd=3, events=POLLIN}, {fd=6, events=POLLIN}, {fd=31, events=POLLIN}], 3, 0) = 0 (Timeout)
- recvmsg(6, 0x7ffdaa12dbd0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- recvmsg(6, 0x7ffdaa12dbb0, 0) = -1 EAGAIN (Resource temporarily unavailable)
- String basicAuth = request.getHeader("Auenter code herethorization");
- $.ajax({
- type: 'GET',
- url: 'http://localhost:8080/Test/endpoit/to/test',
- dataType : 'json',
- beforeSend: function (request) {
- request.withCredentials = true;
- request.setRequestHeader("Authorization", "Basic " + btoa('test' + ":" + 'test'));
- },
- success: function(data) {
- console.log(data);
- },
- error: function(data) {
- console.log(data);
- }
- });
- <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
- <display-name>File Explorer</display-name>
- <description>
- File Explorer
- </description>
- <servlet>
- <servlet-name>Test</servlet-name>
- <servlet-class>fr.vuzi.controller.FrontController</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>FrontController</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
- <filter>
- <filter-name>CorsFilter</filter-name>
- <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
- <init-param>
- <param-name>cors.allowed.origins</param-name>
- <param-value></param-value>
- </init-param>
- <init-param>
- <param-name>cors.allowed.methods</param-name>
- <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
- </init-param>
- <init-param>
- <param-name>cors.allowed.headers</param-name>
- <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
- </init-param>
- <init-param>
- <param-name>cors.exposed.headers</param-name>
- <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
- </init-param>
- <init-param>
- <param-name>cors.support.credentials</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>cors.preflight.maxage</param-name>
- <param-value>10</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>CorsFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- </web-app>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement