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
import java.util.*; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import java.util.concurrent.atomic.AtomicInteger; | |
/** | |
* Blocking queue | |
* | |
* @param <T> queue item type | |
*/ | |
class BlockQueue<T>{ |
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 algoritm | |
*/ | |
class BSAlgoritm { | |
/* | |
* @param c up sorted container | |
* @param src search value | |
* @param loop if false - tail recurcive implementatuion else iterate implementation. | |
* But it doesnt matter which variant need to use. | |
*/ |
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
public class StringReverce{ | |
/** | |
* Reverse string without buffer | |
*/ | |
public static byte[] reverse(byte[] str){ | |
int end = str.length - 1; | |
for( int i = 0; i < end - i; ++i ){ | |
str[i] = (byte)( str[i] ^ str[end-i] ); | |
str[end-i] = (byte)( str[end-i] ^ str[i] ); |
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
#ifndef __SN_H_ | |
#define __SN_H_ | |
// \author Ефремов Алексей (lexich) | |
/* | |
//Описание Snc технологии | |
//IBeanInterface.h | |
struct IBeanInterface{ |
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
#ifndef SMARTSTREAM_H | |
#define SMARTSTREAM_H | |
#include <QDataStream> | |
#include <QVariant> | |
#include <QList> | |
class SmartStream : public QDataStream{ | |
public: | |
enum EAccess{ |
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
import java.util.Scanner; | |
/** | |
* User: lexich Date: 02.07.12 Time: 10:24 | |
*/ | |
class Func{ | |
/** | |
* Integration function | |
* |
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.h> | |
#include <stdio.h> | |
/* | |
revert buffer C-string without temp | |
abc\0 -> cba\0 | |
@str buffer | |
@len size of buffer | |
*/ | |
void revert(char* str, int len ){ |
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
sudo rm /usr/lib/libfreetype.so | |
sudo rm /usr/lib/libz.so | |
sudo rm /usr/lib/libjpeg.so | |
#x86 | |
sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so /usr/lib/ | |
sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib/ | |
sudo ln -s /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib/ | |
#x64 | |
#sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/ | |
#sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/ |
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
JSON2 = | |
OBJECT:"Object" | |
ARRAY:"Array" | |
nextToken: (buf,i)-> | |
token = undefined | |
isWord = false | |
isNum = false | |
isFloat = false | |
str = "" | |
while i < buf.length |
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
// Generated by CoffeeScript 1.4.0 | |
(function() { | |
var DATA, JSON2, res; | |
JSON2 = { | |
OBJECT: "Object", | |
ARRAY: "Array", | |
nextToken: function(buf, i) { | |
var ch, isFloat, isNum, isWord, str, token; | |
token = void 0; |
OlderNewer