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
-- for calculation of norm vector -- | |
DELIMITER $$ | |
CREATE FUNCTION vector_norm( vector JSON ) | |
RETURNS DOUBLE | |
READS SQL DATA | |
DETERMINISTIC | |
BEGIN | |
DECLARE array_length INTEGER(11); | |
DECLARE retval DOUBLE(19,2); |
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/env sh | |
if [ "$#" -ne 3 ]; then | |
echo "use: gmv <source_dir> <file_name> <new_file_name>" >&2 | |
exit 1 | |
fi | |
seqname=`echo 's/\/'$2'$/'$3'/'` | |
find $1 -type f -name $2 | while read fn; do mv -v "${fn}" "`echo "${fn}" | sed -e "$seqname"`"; done |
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
/** | |
* Prepare android resource files | |
* | |
* @copyright Dmitry Ponomarev <[email protected]> 2014 | |
* | |
* Files: <src_dir>/file_name_<dpi_dir>.<ext> => <dst_dit>/<dpi_dir>file_name.<ext> | |
*/ | |
package main |
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
using System; | |
using System.IO; | |
namespace MonoCache.Android | |
{ | |
public class SeekableBufferedStream : Stream | |
{ | |
private long _BufferOffset = 0; | |
private long _Position = 0; | |
private long _BufferSize = 0; |