## init
$ sudo mkdir /mount_point_absolute_path
$ sudo chown local_user /mount_point_absolute_path
## before
$ sshfs remote@remote_hostname:remote_absolute_path /mount_point_absolute_path
This file contains 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 <string> | |
#include "marsyas/MarSystemManager.h" | |
#include "marsyas/SoundFileSource.h" | |
#include "marsyas/SoundFileSink.h" | |
#include "marsyas/Series.h" | |
using namespace std; | |
using namespace Marsyas; | |
void |
This file contains 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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="pattern"> | |
<test name="family" qual="any"> | |
<string>AR PL ShanHeiSun Uni</string> | |
<string>AR PL New Sung</string> | |
</test> | |
<test compare="more_eq" name="pixelsize" > | |
<double>12</double> |
This file contains 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
cfdisk (util-linux 2.21.2) | |
Disk Drive: /dev/sda | |
Size: 320072933376 bytes, 320.0 GB | |
Heads: 255 Sectors per Track: 63 Cylinders: 38913 | |
Name Flags Part Type FS Type [Label] Size (MB) | |
------------------------------------------------------------------------------ | |
sda1 Boot Primary ntfs [Win7] 45271.95 | |
Pri/Log Free Space 0.04* |
This file contains 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
#!/usr/bin/python2 | |
# -*- coding:UTF-8 -*- | |
# code related at: http://blog.mckelv.in/articles/1453.html | |
import sys | |
distance = lambda a,b : 0 if a==b else 1 | |
def dtw(sa,sb): | |
''' |
This file contains 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
#!/usr/env python | |
# -*- coding: UTF-8 -*- | |
__author__ = 'Myautsai Pan' | |
import sys | |
import numpy as np | |
class SimHash(object): | |
'''Implements of SimHash for chromaprint''' | |
def __init__(self, chromaprint=[], bits=32): | |
self.hash_bits = 32 |
This file contains 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
#!/usr/bin/python | |
# -*- coding:UTF-8 -*- | |
import numpy as np | |
def main(): | |
random_hamming_dist() | |
def random_hamming_dist(): | |
def hamming_dist(a, b, bits=32): | |
x = a ^ b |
This file contains 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
var what; what = setInterval(function(){window.frames['main'].sendQueryFunc()},10000); | |
var the;the = setInterval( function(){if(window.frames['main'].$('#gridbox').html().indexOf('有')!=-1){alert('hehe');clearInterval(what);clearInterval(the);}else{console.log('hehehou')}},5000); |
This file contains 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
if (top.location !== self.location && document.referrer.search(/http:\/\/[^\/]+\.yourdomain\.com/i) !== 0) { | |
top.location = self.location; | |
} | |
// another to solve this problom is to add `X-Frame-Options` in http response header | |
// detail: https://blog.whitehatsec.com/x-frame-options/ |
This file contains 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
""" | |
binary search | |
""" | |
def binary_search(num_array, x): | |
l = 0 | |
r = len(num_array) | |
while l < r: | |
mid = l + (r - l) / 2 |