layout: post type: posts title: "Encapsulation: I don't think it means what you think it means" tags: [design, object-oriented-programming] categories: Development picture: src: /assets/resources/encapsulation-dont-think-means-think-means/inigomontoya.jpg height: 453 width: 525
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 com.packtpub.learnvaadin.twaattin.service; | |
import org.quartz.Job; | |
import org.quartz.JobExecutionContext; | |
import org.quartz.JobExecutionException; | |
import org.quartz.SchedulerContext; | |
import org.quartz.SchedulerException; | |
import com.packtpub.learnvaadin.twaattin.ui.TimelineWindow; |
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
declare -A students | |
students[foo]=abricot | |
students[bar]=brique | |
students[baz]=botte | |
for k in "${!students[@]}" | |
do | |
adduser "$k" | |
echo "$k":${students["$k"]} | /usr/sbin/chpasswd | |
done |
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
db.grades.aggregate([ | |
{$unwind: "$aaa"}, | |
{$match: {$or: [{"aaa.bbb": "gloubi"}, {"aaa.bbb": "boulga"}]}}, | |
{$group: { _id: {ccc: "$ccc_id", ddd: "$ddd_id"}, avg: {$avg: "$aaa.eee"}}}, | |
{$group: {_id: "$_id.ccc", avg: {$avg: "$fff"}}}, | |
{$sort: {ggg : -1}}, | |
{$limit: 1} | |
]) |
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
{ | |
{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any | |
interesting article like yours. {It’s|It is} pretty worth enough for me. | |
{In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web | |
owners} and bloggers made good content as you did, the {internet|net|web} will be {much more|a | |
lot more} useful than ever before.| | |
I {couldn’t|could not} {resist|refrain from} commenting. | |
{Very well|Perfectly|Well|Exceptionally well} written!| | |
{I will|I’ll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} | |
as I {can not|can’t} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} |
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
@Configuration | |
open class AppConfiguration { | |
// ... Abridged for readability's sake | |
@Bean | |
open fun vaadinServlet() = CustomVaadinServlet{ event: SessionInitEvent -> | |
event.session.addBootstrapListener(object : BootstrapListener { | |
override fun modifyBootstrapFragment(response: BootstrapFragmentResponse) { | |
// NOP, this is for portlets etc |
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
JavaScript.eval("document.querySelector('html').setAttribute('lang', 'fr')") |
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
image: ruby:2.1 # the script will run in Ruby 2.1 using the Docker image ruby:2.1 | |
pages: # the build job must be named pages | |
script: | |
- gem install jekyll # we install jekyll | |
- gem install jekyll-asciidoc | |
- jekyll build -d public/ # we tell jekyll to build the site for us | |
artifacts: | |
paths: |
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 org.springframework.boot.json.BasicJsonParser; | |
import org.springframework.http.HttpEntity; | |
import org.springframework.http.HttpHeaders; | |
import org.springframework.http.HttpMethod; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.util.LinkedMultiValueMap; | |
import org.springframework.util.MultiValueMap; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestParam; | |
import org.springframework.web.bind.annotation.RestController; |
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
#/bin/sh | |
git checkout gh-pages | |
git checkout master -- README.adoc | |
asciidoctor README.adoc | |
mv README.html index.html | |
git add index.html | |
git commit -m "Update site with documentation" | |
git push origin HEAD --force | |
git checkout master |
OlderNewer