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
Пример, шлем запрос на авторизацию | |
http://oauth.vkontakte.ru/authorize?client_id=2664589&scope=notify,friends,photos,offline&redirect_uri=http://api.vkontakte.ru/blank.html&display=touch&response_type=token | |
И получаем вместо эрана со списком разрешений пустую страницу | |
http://vk.com/login.php?act=slogin&role=fast&no_redirect=1&to=&s=1&hash=d854beb0b5860cb5cb096905a2362490 |
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
eval$s=%q(eval(%w(B=92.chr;N=10.chr;n=0;e=->(s){s.gsub(/[#{B+B+N}"]/){B+(N==$&??n:$&)}};E=->(s){'("'+e[s]+'")'} | |
;d=->(s,t=?"){s.gsub(t){t+t}};D=->(s,t=?@){s.gsub(B){t}};Q=->(s,t=?$){s.gsub(t){B+$&}};puts(eval(%q("objectXQRX | |
extendsXApp{Hln#{E[%((displayX"#{e[%(HfX% sX"#{Q[ e["Trans criptXshow:X'#{d[%(putsX[regsubX-allX{.}X"#{Q[e[%[ | |
intXK(){sJXs=#{E[%(withXAda.Text _Io;p roce dure XQRXisXbeginXAda.Text_Io.Put_Line("#{d[%(BEGINXH("# | |
{d[%(BEGIN{s=#{E[D[%(forXbXinX Sys t em.Text.ASCIIEncoding().GetBytes(#{Q[E["#i | |
nclude<stdio.h>`nintXK (){pu t s#{E["#include<iostream>`nintXK(){std::cout | |
<<#{E[%(classXProgram {pu blicXstaticXvoidXMain(){System.Co | |
nsole.Write(#{E[D[%( ( defnXf[lXr](if(>(countXr)45)(lazy- | |
seq(cons(str"XXXX^" "r"^"&")(fXl"")))(let[c(fir | |
stXl)](ifXc(f(ne |
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
03-11 18:11:21.676 20745-20819/com.bandlab.bandlab.test E/BroadcastUtils.putError():48﹕ Error intent | |
retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a name but was BEGIN_OBJECT at line 1 column 4254 path $[3].Notes[1].Picture | |
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:383) | |
at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220) | |
at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265) | |
at retrofit.RxSupport$2.run(RxSupport.java:55) | |
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:237) | |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) |
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 kotlinx.coroutines.experimental.runBlocking | |
import retrofit2.Call | |
import retrofit2.Retrofit | |
import retrofit2.converter.gson.GsonConverterFactory | |
import retrofit2.http.GET | |
import retrofit2.http.Path | |
import ru.gildor.coroutines.retrofit.awaitResponse | |
/** | |
dependencies { |
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 kotlin.coroutines.experimental.* | |
import kotlin.js.Date | |
fun main(args: Array<String>) { | |
println("before launch") | |
launch { | |
println("hello: ${Date()}") | |
delay(3000) | |
println("bye: ${Date()}") | |
} |
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 kotlinx.coroutines.experimental.* | |
import okhttp3.* | |
import okio.Buffer | |
import okio.Okio | |
import java.io.File | |
import java.io.IOException | |
/** | |
* Custom coroutine dispatcher for blocking calls | |
*/ |
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
//File src/main/kotlin/HelloWorld.kt | |
import tornadofx.* | |
class HelloWorld : View() { | |
override val root = hbox { | |
label("Hello world") | |
} | |
} | |
class MyApp : App(HelloWorld::class) |
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 com.google.protobuf.gradle.protobuf | |
import com.google.protobuf.gradle.protoc | |
plugins { | |
java | |
idea | |
id("com.google.protobuf") version "0.8.7" | |
} | |
repositories { |
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
def afterEvaluation = false | |
gradle.projectsEvaluated { | |
afterEvaluation = true | |
} | |
allprojects { project -> | |
configurations.all { configuration -> | |
configuration.incoming.beforeResolve { | |
if (!afterEvaluation) { | |
throw new Exception("Configuration $configuration.name of project $project.name is being resolved at configuration time.") |
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 com.google.maps.GeoApiContext | |
import com.google.maps.GeocodingApi | |
import com.google.maps.PendingResult | |
import kotlinx.coroutines.suspendCancellableCoroutine | |
import kotlin.coroutines.resume | |
import kotlin.coroutines.resumeWithException | |
/** | |
* Coroutine adapter for Google Maps API future type [PendingResult] | |
* |
OlderNewer