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
long start = System.nanoTime(); | |
Bitmap image = originalImage; | |
Bitmap res = image.copy(image.getConfig(), true); | |
RenderScript rs = RenderScript.create(this); | |
Allocation allocationA = Allocation.createFromBitmap(rs, res); | |
Allocation allocationB = Allocation.createTyped(rs, allocationA.getType()); | |
ScriptC_FuzzHistEq fuzzhistEq= new ScriptC_FuzzHistEq(rs); | |
fuzzhistEq.forEach_root(allocationA, allocationB); | |
int tmp = 1+1; | |
Log.i("Info","Hello World,again"); |
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
uint8_t fuzzyLut[256] ={101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, | |
101,101,101,101,101,102,102,102,102,102,102,102,102,102,102,102,102,102,102, | |
102,102,102,102,102,102,102,102,102,102,103,103,103,103,103,103,103,103,103, | |
103,103,103,103,103,103,103,103,103,103,103,103,103,103,104,104,104,104,104, | |
104,104,104,104,104,104,104,104,104,104,104,104,104,104,105,106,107,108,109, | |
110,111,112,113,114,116,117,118,119,120,122,123,124,125,127,128,130,131,133, | |
134,136,138,140,142,144,146,148,150,153,156,159,162,166,168,168,168,168,169, | |
169,169,170,170,171,171,172,173,173,174,175,176,177,178,179,180,181,182,183, | |
185,186,188,190,192,194,196,199,202,205,209,213,218,224,230,230,229,229,229, |
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
BitmapFactory.Options options = new BitmapFactory.Options(); | |
options.inJustDecodeBounds = true; | |
Bitmap bitmap = BitmapFactory.decodeFile(files[0], options); | |
if (options.outWidth != -1 && options.outHeight != -1) { | |
options.inPreferredConfig = Bitmap.Config.ARGB_8888; | |
options.inJustDecodeBounds = false; | |
bitmap = BitmapFactory.decodeFile(files[0],options); | |
originalImage.setImageBitmap(bitmap); |
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
typedef vector<int> vint; | |
class Score_Variant | |
{ | |
public: | |
virtual ~Score_Variant() = default; | |
virtual string name() const { return to_str();} | |
virtual int score(const vint&) = 0; | |
protected: | |
Score_Variant() = default; | |
private: |
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
typedef vector<int> vint; | |
class Base | |
{ | |
public: | |
virutal int score(const vint&) = 0; | |
}; | |
class Derived | |
{ | |
public: |
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
auto last2 = std::remove_if(std::begin(words),std::end(words),[&forbiddenWords](const std::string& word) | |
{ return (std::find(std::begin(forbiddenWords),std::end(forbiddenWords),word) != end(forbiddenWords)); }); | |
words.erase(last2,std::end(words)); |
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
.flex-nav ul | |
{ | |
display: none; | |
} | |
.flex-nav ul.open | |
{ | |
display: flex; | |
} |
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 SMART_POINTER_H | |
#define SMART_POINTER_H | |
template <bool flag, typename T1, typename T2> | |
struct select_type | |
{ | |
typedef T1 result; | |
}; | |
template <typename T1, typename T2> | |
struct select_type<false, T1,T2> |