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
what ? | |
- As we know Dynomite doesn't support any kind of authentication, so, to make security teams happy, we need to obey this somehow. | |
One of possibilities is SSL Termination, our Redis client (Jedis for java) will not talk with Dynomite directly but will request NGINX, | |
NGINX will check client's certificate and if cert is valid, request will be forwarded to Dynomite. | |
technically how ? | |
- In normal setup Dynomite requires (for each instance) Dynomite and Redis, in secure setup you will need additionally NGINX, | |
and this will be only one open port. | |
With this sample configuration, both Client and Server needs to trust themselves. |
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
photos.flatMap(it -> Observable.from(it)) | |
.delay(1, TimeUnit.SECONDS) | |
.subscribeOn(AndroidSchedulers.mainThread()) | |
.flatMap(it -> { | |
view.pictureUploadProgress(it.getPictureType().name()); //to jest ustawienie widoku że wysyłam it element | |
client.uploadDriverPicture(reservationId, pictureInput) //to jest observable który wykonuje potem zapytanie i zwraca response | |
.subscribeOn(Schedulers.io()) // na tym wątku muszę wykonać zapytanie sieciowe | |
.observeOn(AndroidSchedulers.main()) //na tym wątku mogę robić update widoku, ale nie chcę tego robić tutaj | |
.doOnNext(response -> {}) |
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
Observable.just(1, 2, 3, 4, 5)// | |
.map(c -> { | |
System.out.println("1 " + Thread.currentThread().getName()); | |
return c; | |
})// | |
.flatMap(a -> { | |
return Observable.just(1) // | |
.observeOn(Schedulers.io())// | |
.map(b -> b)// |
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
Observable.just(1, 2, 3, 4, 5)// | |
.map(c -> { | |
System.out.println("1 " + Thread.currentThread().getName()); | |
return c; | |
})// | |
.flatMap(a -> { | |
return Observable.just(1) // | |
.observeOn(Schedulers.io())// | |
.map(b -> b)// |
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
char* adasidaisdu(char **args, int argc) | |
{ | |
char* szukaj = "-d"; | |
int i=1; //omit 0 - due to 0 is application name itself | |
for(i = 1; i < argc; i++) | |
{ | |
if(strcmp(decompressionFlag, args[i]) == 0) | |
{ |
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
int sprawdzanie_argumentow(char** argv,char* argument) | |
{ | |
int b = 1; | |
while ( b < 8 ){ | |
if (strcmp(argv[b],argument) == 0){ | |
printf("ARGV %s\n",argv[b]); | |
return 0; | |
} | |
else{ |
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 static void main(String... args) { | |
AtomicInteger a = new AtomicInteger(); | |
Observable.just(1, 2, 3, 4, 5, 6, 7, 8) | |
.repeatWhen(notification -> { | |
return notification.flatMap(o -> { | |
System.out.println("'repeatWhen'"); | |
if(a.getAndAdd(1) < 10){ | |
return Observable.just(o).delay(1,TimeUnit.SECONDS); |
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
Callable<List<String>> webService1Results1 = () -> { | |
List<String> result = Arrays.asList("TWEET[3]","TWEET[2]","TWEET[1]"); | |
Thread.sleep(5000); | |
return result; | |
}; | |
Callable<List<String>> webService1Results2 = () -> { | |
List<String> result = Arrays.asList("POST[3]","POST[2]","POST[1]"); | |
Thread.sleep(5000); | |
return result; | |
}; |
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
interface LoggerAwarenessController { | |
default Logger getLogger(){ | |
return LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); | |
} | |
} |
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
<div id="ID-WIADOMOSCI" class="custom-msg-class"> | |
Tutaj tresc wiadomosci | |
</div> |