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 void processThumbs(int maxW, int maxH){ | |
ArrayList<ThumbAttachment> thumbs=new ArrayList<ThumbAttachment>(); | |
for(Attachment att:attachments) | |
if(att instanceof PhotoAttachment) thumbs.add((ThumbAttachment)att); | |
String orients=""; | |
int[] orients_cnt=new int[3]; | |
ArrayList<Float> ratios=new ArrayList<Float>(); | |
int cnt=thumbs.size(); | |
boolean bad=false; |
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 android.net.Uri; | |
import android.os.AsyncTask; | |
import android.util.Log; | |
import org.json.JSONException; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; |
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
/** | |
* Реализация API, не изменяйте ее | |
* @param {string} url | |
* @param {function} callback | |
*/ | |
function getData(url, callback) { | |
var RESPONSES = { | |
'/countries': [ | |
{name: 'Cameroon', continent: 'Africa'}, | |
{name :'Fiji Islands', continent: 'Oceania'}, |
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
@function str-last-index($string, $substr) { | |
$index: null; | |
$length: str-length($string); | |
@for $n from $length through 1 { | |
$index: str-index(str-slice($string, $n, $length), $substr); | |
@if $index { @return $index + $n - 1; } | |
} | |
@return $index; | |
} |