This file contains hidden or 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 Observable<Photo> searchForPhotos(String searchQuery) { | |
return Observable.fromCallable(() -> downloadUrlSource(searchQuery)) | |
.flatMap(googleSiteSource -> Observable.fromArray(extractPhotoUrls(googleSiteSource).toArray(new String[0]))) | |
.map(photoUrl -> { | |
try { | |
return getPhoto(photoUrl); | |
} catch (IOException e) { | |
log.log(Level.WARNING, "Could not download a photo", e); | |
} | |
return null; // ???!!! |
This file contains hidden or 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
String napis = "abc"; | |
char znak = napis.charAt(1); | |
int kodAscii = (int) znak; | |
char znowuZnak = (char) kodAscii; | |
System.out.println(kodAscii + " " + znowuZnak); |