ecat.elit.cz##.overlay
ecat.elit.cz##.modalBackgroud
ecat.elit.cz###ctl00_inline_content_not_logged
ecat.elit.cz###ctl00_divEmptyDarkOverlayVisible
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
package optional; | |
import java.util.Optional; | |
import java.util.function.Supplier; | |
import java.util.stream.Stream; | |
public class StreamOfOptional { | |
public static void main(String[] args) { | |
System.out.println("--Before eager--"); |
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
#!/usr/bin/env bash | |
# the database name, that will be analyzed | |
DATABASE_NAME="test" | |
# read all collection names, using mongo shell | |
COLLECTIONS=$(mongo $DATABASE_NAME --eval "db.getCollectionNames().join('\n');" --quiet) | |
echo -e "Found collections: \n$COLLECTIONS" |
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
/** | |
* https://plus.google.com/114134834346472219368/posts/CR1ZoNe9ojQ | |
* | |
* Three farmers were selling chickens at the local market. | |
* One farmer had 10 chickens to sell, another had 16 chickens to sell, | |
* and the last had 26 chickens to sell. In order not to compete with | |
* each other, they agreed to all sell their chickens at the same price. | |
* But by lunchtime, they decided that sales were not going so well, | |
* and they all decided to lower their prices to the same lower price point. | |
* By the end of the day, they had sold all their chickens. |
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 Response SendSimpleMessage() { | |
Client client = ClientBuilder.newClient(); | |
client.register(HttpAuthenticationFeature.basic("api", "key-################################")); | |
WebTarget target = client.target("https://api.mailgun.net/v2/sandbox################################.mailgun.org/messages"); | |
MultivaluedMapImpl formData = new MultivaluedMapImpl(); | |
formData.add("from", "Mailgun Sandbox <postmaster@sandbox################################.mailgun.org>"); | |
formData.add("to", "Tomas Dvorak <todvora@gmail.com>"); | |
formData.add("subject", "Hello Tomas Dvorak"); | |
formData.add("text", "Congratulations Tomas Dvorak, you just sent an email with Mailgun! You are truly awesome! You can see a record of this email in your logs: https://mailgun.com/cp/log . You can send up to 300 emails/day from this sandbox server. Next, you should add your own domain so you can send 10,000 emails/month for free."); | |
return target.request(MediaType.APPLICATION_FORM_URLENCODED).post(Entity. |
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
language: node_js | |
node_js: | |
- "0.11" | |
install: | |
- npm install jshint -g | |
- npm install PrettyCSS -g | |
script: | |
- jshint main.js | |
- prettycss main.css |
NewerOlder