This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//图片预览 | |
function previewPicture(file) { | |
var img = new moxie.image.Image(); | |
img.onload = function () { | |
$preview.attr('id', this.uid).addClass('thumbnail').html(''); | |
this.bind('embedded', function () { | |
$preview.children().css({ | |
width: '100%', | |
height: 'auto' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <meta name="_csrf" th:content="${_csrf.token}"/> | |
// <meta name="_csrf_header" th:content="${_csrf.headerName}"/> | |
$(function () { | |
var token = $("meta[name='_csrf']").attr("content"); | |
var header = $("meta[name='_csrf_header']").attr("content"); | |
$(document).ajaxSend(function(e, xhr, options) { | |
xhr.setRequestHeader(header, token); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Solution { | |
class Node { | |
Node[] next = new Node[26]; | |
boolean end = false; | |
void add(String s) { | |
Node cur = this; | |
for (int i = 0;i < s.length(); ++i) { | |
int ind = s.charAt(i) - 'a'; | |
if (cur.next[ind] == null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public: | |
struct node { | |
int z, o; | |
node() { | |
z = o = 0; | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <cmath> | |
#include <algorithm> | |
using namespace std; | |
struct node { | |
int z, o; | |
node() {} |
NewerOlder