first post

This commit is contained in:
Shautvast 2023-08-24 21:05:05 +02:00
commit e79d3f65ad
94 changed files with 14019 additions and 0 deletions

8
.idea/.gitignore generated vendored Normal file
View file

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

6
.idea/misc.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/sanderhautvast.github.io.iml" filepath="$PROJECT_DIR$/sanderhautvast.github.io.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

10
404.html Normal file
View file

@ -0,0 +1,10 @@
---
layout: default
title: 404
permalink: /404.html
---
<div class="text-center">
<h1 class="display-1 mt-5 mb-4"><span class="badge badge-danger">404</span> Page does not exist!</h1>
<p>Please use the search bar at the top or visit our <a href="{{site.baseurl}}/">homepage</a>!</p>
</div>

1
CNAME Normal file
View file

@ -0,0 +1 @@
sanderhautvast.github.io

22
Gemfile Normal file
View file

@ -0,0 +1,22 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# If you have any plugins, put them here!
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
group :jekyll_plugins do
gem 'jekyll-feed'
gem 'jekyll-sitemap'
gem 'jekyll-paginate'
gem 'jekyll-seo-tag'
gem 'jekyll-archives'
gem 'kramdown'
gem 'rouge'
end
gem "webrick", "~> 1.7"

87
Gemfile.lock Normal file
View file

@ -0,0 +1,87 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.2.2)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
forwardable-extended (2.6.0)
google-protobuf (3.22.2-arm64-darwin)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jekyll (4.3.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-archives (2.2.1)
jekyll (>= 3.6, < 5.0)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.1.0)
safe_yaml (1.0.5)
sass-embedded (1.59.3-arm64-darwin)
google-protobuf (~> 3.21)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.4.2)
webrick (1.8.1)
PLATFORMS
arm64-darwin-22
DEPENDENCIES
jekyll (~> 4.2)
jekyll-archives
jekyll-feed
jekyll-paginate
jekyll-seo-tag
jekyll-sitemap
kramdown
rouge
webrick (~> 1.7)
BUNDLED WITH
2.4.8

8
LICENSE.txt Normal file
View file

@ -0,0 +1,8 @@
Copyright (c) 2019 WowThemes.net
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# README
1. `gem install bundler`
2. `bundle install`
3. `bundle add webrick`
4. `bundle exec jekyll serve --watch`

61
_config.yml Normal file
View file

@ -0,0 +1,61 @@
# Site
name: "Sander's Blog"
title: "Infinite Improbablity"
description: "What I might have failed to mention"
logo: ''
favicon: ''
baseurl: ''
#google_analytics: 'UA-46278016-1'
#disqus: 'demowebsite'
#mailchimp-list: 'https://wowthemes.us11.list-manage.com/subscribe/post?u=8aeb20a530e124561927d3bd8&amp;id=8c3d2d214b'
include: ["_pages"]
permalink: /:title/
# Authors
authors:
sander.hautvast:
name: Sander Hautvast
display_name: Sander Hautvast
gravatar: c50cfcd38195af19d0f092b8d7dc15bc
email: s.hautvast@gmail.com
web: https://sanderhautvast.github.io
description: ""
# Plugins
plugins:
- jekyll-paginate
- jekyll-sitemap
- jekyll-feed
- jekyll-seo-tag
- jekyll-archives
# Archives
jekyll-archives:
enabled:
- categories
layout: archive
permalinks:
category: '/category/:name/'
# Pagination
paginate: 6
paginate_path: /page:num/
# Other
markdown: kramdown
kramdown:
input: GFM
syntax_highlighter: rouge
syntax_highlighter_opts:
block:
line_numbers: true
# Adsense (change to "enabled" to activate, also your client id and ad slot. Create a new ad unit from your Adsense account to get the slot.)
adsense: "disabled"
adsense-data-ad-client: "ca-pub-3412143450191416"
adsense-data-ad-slot: "1363087678"
# Lazy Images ("enabled" or "disabled")
lazyimages: "disabled"
exclude: [changelog.md, LICENSE.txt, README.md, Gemfile, Gemfile.lock]

View file

@ -0,0 +1,12 @@
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Under Header -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="{{site.adsense-data-ad-client}}"
data-ad-slot="{{site.adsense-data-ad-slot}}"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br/>

14
_includes/disqus.html Normal file
View file

@ -0,0 +1,14 @@
<!--<section class="disqus">-->
<!-- <div id="disqus_thread"></div>-->
<!-- <script type="text/javascript">-->
<!-- var disqus_shortname = '{{site.disqus}}';-->
<!-- var disqus_developer = 0;-->
<!-- (function() {-->
<!-- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;-->
<!-- dsq.src = window.location.protocol + '//' + disqus_shortname + '.disqus.com/embed.js';-->
<!-- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);-->
<!-- })();-->
<!-- </script>-->
<!-- <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>-->
<!-- <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>-->
<!--</section>-->

View file

@ -0,0 +1,59 @@
<!-- begin post -->
{% assign author = site.authors[post.author] %}
<div class="col-md-6 mb-30px">
<div class="listfeaturedtag h-100">
<div class="row h-100">
<div class="col-12 col-md-12 col-lg-5 pr-lg-0">
<div class="h-100">
<div class="wrapthumbnail">
<a href="{{ site.baseurl }}{{ post.url }}">
{% if site.lazyimages == "enabled" %}
<img class="featured-box-img-cover lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ site.baseurl }}/{{ post.image }}{% endif %}">
{% else %}
<img class="featured-box-img-cover" src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ site.baseurl }}/{{ post.image }}{% endif %}">
{% endif %}
</a>
</div>
</div>
</div>
<div class="col-12 col-md-12 col-lg-7">
<div class="h-100 card-group">
<div class="card">
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
{% if post.rating %}
<div class="mb-2 mt-2 font-weight-normal">
{% include star_rating_postbox.html %}
</div>
{% endif %}
</h2>
<h4 class="card-text">{{ post.excerpt | strip_html | truncatewords:25 }}</h4>
</div>
<div class="card-footer b-0 bg-white mt-auto">
<div class="wrapfooter">
{% if post.author %}
<span class="meta-footer-thumb">
{% if author.avatar %}
<img class="author-thumb" src="{{site.baseurl}}/{{ author.avatar }}" alt="{{ author.display_name }}">
{% else %}
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
{% endif %}
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="{{ author.web }}">{{ author.display_name }}</a></span><br/>
{% endif %}
<span class="post-date">{{ post.date | date_to_string }}</span>
</span>
<span class="post-read-more"><a href="{{ site.baseurl }}/{{ post.url }}" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end post -->

25
_includes/pagination.html Normal file
View file

@ -0,0 +1,25 @@
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a class="ml-1 mr-1" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
{% else %}
<span>&laquo; Prev</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="ml-1 mr-1">{{ page }}</span>
{% elsif page == 1 %}
<a class="ml-1 mr-1" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{% else %}
<a class="ml-1 mr-1" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a class="ml-1 mr-1" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next &raquo;</a>
{% else %}
<span>Next &raquo;</span>
{% endif %}
</div>
{% endif %}

51
_includes/postbox.html Normal file
View file

@ -0,0 +1,51 @@
<!-- begin post -->
{% assign author = site.authors[post.author] %}
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
<div class="maxthumb">
<a href="{{ site.baseurl }}{{ post.url }}">
{% if post.image %}
{% if site.lazyimages == "enabled" %}
<img class="img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ site.baseurl }}/{{ post.image }}{% endif %}" alt="{{ post.title }}">
{% else %}
<img class="img-fluid" src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ site.baseurl }}/{{ post.image }}{% endif %}" alt="{{ post.title }}">
{% endif %}
{% endif %}
</a>
</div>
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
{% if post.rating %}
<div class="mb-2 mt-2 font-weight-normal">
{% include star_rating_postbox.html %}
</div>
{% endif %}
</h2>
<h4 class="card-text">{{ post.excerpt | strip_html | truncatewords:30 }}</h4>
</div>
<div class="card-footer bg-white">
<div class="wrapfooter">
{% if post.author %}
<span class="meta-footer-thumb">
{% if author.avatar %}
<img class="author-thumb" src="{{site.baseurl}}/{{ author.avatar }}" alt="{{ author.display_name }}">
{% else %}
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
{% endif %}
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="{{ author.web }}">{{ author.display_name }}</a></span><br/>
{% endif %}
<span class="post-date">{{ post.date | date_to_string }}</span>
</span>
<span class="post-read-more"><a href="{{ site.baseurl }}{{ post.url }}" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- end post -->

View file

@ -0,0 +1,21 @@
<script src="{{site.baseurl}}/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="{{site.baseurl}}/assets/js/lunrsearchengine.js"></script>

34
_includes/share.html Normal file
View file

@ -0,0 +1,34 @@
<div class="share sticky-top sticky-top-offset">
<p>
Share
</p>
<ul>
<li class="ml-1 mr-1">
<a target="_blank" href="https://twitter.com/intent/tweet?text={{ page.title }}&url={{ page.url | absolute_url }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fab fa-twitter"></i>
</a>
</li>
<li class="ml-1 mr-1">
<a target="_blank" href="https://facebook.com/sharer.php?u={{ page.url | absolute_url }}" onclick="window.open(this.href, 'facebook-share', 'width=550,height=435');return false;">
<i class="fab fa-facebook-f"></i>
</a>
</li>
<li class="ml-1 mr-1">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url={{ page.url | absolute_url }}" onclick="window.open(this.href, 'width=550,height=435');return false;">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
</ul>
{% if page.comments != false %}
<div class="sep">
</div>
<ul>
<li>
<a class="small smoothscroll" href="#disqus_thread"></a>
</li>
</ul>
{% endif %}
</div>

View file

@ -0,0 +1,9 @@
<div class="rating-holder">
<div class="c-rating c-rating--regular" data-rating-value="{{page.rating}}">
<button>1</button>
<button>2</button>
<button>3</button>
<button>4</button>
<button>5</button>
</div>
</div>

View file

@ -0,0 +1,9 @@
<div class="rating-holder">
<div class="c-rating c-rating--regular" data-rating-value="{{post.rating}}">
<button>1</button>
<button>2</button>
<button>3</button>
<button>4</button>
<button>5</button>
</div>
</div>

87
_includes/toc.html Normal file
View file

@ -0,0 +1,87 @@
{% capture tocWorkspace %}
{% comment %}
Version 1.0.6
https://github.com/allejo/jekyll-toc
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
Usage:
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
Parameters:
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
Optional Parameters:
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
* class (string) : '' - a CSS class assigned to the TOC
* id (string) : '' - an ID to assigned to the TOC
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
* item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
* baseurl (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
* anchor_class (string) : '' - add custom class(es) for each anchor element
Output:
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
generate the table of contents and will NOT output the markdown given to it
{% endcomment %}
{% capture my_toc %}{% endcapture %}
{% assign orderedList = include.ordered | default: false %}
{% assign minHeader = include.h_min | default: 1 %}
{% assign maxHeader = include.h_max | default: 6 %}
{% assign nodes = include.html | split: '<h' %}
{% assign firstHeader = true %}
{% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
{% for node in nodes %}
{% if node == "" %}
{% continue %}
{% endif %}
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
{% if headerLevel < minHeader or headerLevel > maxHeader %}
{% continue %}
{% endif %}
{% if firstHeader %}
{% assign firstHeader = false %}
{% assign minHeader = headerLevel %}
{% endif %}
{% assign indentAmount = headerLevel | minus: minHeader | add: 1 %}
{% assign _workspace = node | split: '</h' %}
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
{% assign html_id = _idWorkspace[0] %}
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
{% assign space = '' %}
{% for i in (1..indentAmount) %}
{% assign space = space | prepend: ' ' %}
{% endfor %}
{% unless include.item_class == blank %}
{% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
{% endunless %}
{% capture my_toc %}{{ my_toc }}
{{ space }}{{ listModifier }} {{ listItemClass }} [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
{% endfor %}
{% if include.class %}
{% capture my_toc %}{:.{{ include.class }}}
{{ my_toc | lstrip }}{% endcapture %}
{% endif %}
{% if include.id %}
{% capture my_toc %}{: #{{ include.id }}}
{{ my_toc | lstrip }}{% endcapture %}
{% endif %}
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}

21
_layouts/archive.html Normal file
View file

@ -0,0 +1,21 @@
---
layout: default
title: Archive
---
<!-- Begin List Posts
================================================== -->
<section class="recent-posts">
<div class="section-title">
<h2>Archive of posts with <span>{{ page.type }} '{{ page.title }}'</span></h2>
</div>
<div class="row listrecent">
{% for post in page.posts %}
{% include postbox.html %}
{% endfor %}
</div>
</section>

23
_layouts/categories.html Normal file
View file

@ -0,0 +1,23 @@
---
title: "Categories"
layout: default
permalink: "/categories.html"
---
<div class="row listrecent">
{% for category in site.categories %}
<div class="section-title col-md-12 mt-4">
<h2 id="{{ category[0] | replace: " ","-" }}">Category <span class="text-capitalize">{{ category[0] }}</span></h2>
</div>
{% assign pages_list = category[1] %}
{% for post in pages_list %}
{% if post.title != null %}
{% if group == null or group == post.group %}
{% include postbox.html %}
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
{% endfor %}
</div>

210
_layouts/default.html Normal file
View file

@ -0,0 +1,210 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="{{ site.baseurl }}/{{ site.favicon }}">
<title>{{ page.title }} | {{site.name}}</title>
{% seo %}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="{{ site.baseurl }}/assets/css/screen.css" rel="stylesheet">
<link href="{{ site.baseurl }}/assets/css/main.css" rel="stylesheet">
<script src="{{ site.baseurl }}/assets/js/jquery.min.js"></script>
</head>
{% if jekyll.environment == 'production' %}
<!-- change your GA id in _config.yml -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{site.google_analytics}}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
{% capture layout %}{% if page.layout %}layout-{{ page.layout }}{% endif %}{% endcapture %}
<body class="{{layout}}">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="{{ site.baseurl }}/{{ site.logo }}" alt="{{ site.name }}">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- {% if page.url == "/" %}-->
<!-- <li class="nav-item active">-->
<!-- {% else %}-->
<!-- <li class="nav-item">-->
<!-- {% endif %}-->
<!-- <a class="nav-link" href="{{ site.baseurl }}/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="{{ site.baseurl }}/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
{% include search-lunr.html %}
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
{{ site.name }}
</h1>
<p class="lead">
{{ site.description }}
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
{{ content }}
</div>
{% if site.mailchimp-list %}
<!-- Bottom Alert Bar
================================================== -->
<div class="alertbar">
<div class="container text-center" style="max-height: 30px;">
<span style="max-height: 30px;"><img height="30" src="{{ site.baseurl }}/{{ site.logo }}" alt="{{site.title}}"> &nbsp; Never miss a <b>story</b> from us, subscribe to our newsletter</span>
<form action="{{site.mailchimp-list}}" method="post" name="mc-embedded-subscribe-form" class="wj-contact-form validate" target="_blank" novalidate>
<div class="mc-field-group">
<input type="email" placeholder="Email" name="EMAIL" class="required email" id="mce-EMAIL" autocomplete="on" required>
<input type="submit" value="Subscribe" name="subscribe" class="heart">
</div>
</form>
</div>
</div>
{% endif %}
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<a class="mt-1 mb-1" href="{{site.baseurl}}/categories#{{ category | url_escape | strip | replace: ' ', '-' }}">{{ category | camelcase }} ({{ site.tags[category].size }})</a>
{% endfor %}
{% else %}
{% for category in categories_list %}
<a class="mt-1 mb-1" href="{{site.baseurl}}/categories#{{ category[0] | url_escape | strip | replace: ' ', '-' }}">{{ category[0] | camelcase }} ({{ category[1].size }})</a>
{% endfor %}
{% endif %}
{% assign categories_list = nil %}
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © {{ site.time | date: "%Y" }} {{ site.name }}
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="{{ site.baseurl }}/assets/js/mediumish.js"></script>
{% if site.lazyimages == "enabled" %}
<script src="{{ site.baseurl }}/assets/js/lazyload.js"></script>
{% endif %}
<script src="{{ site.baseurl }}/assets/js/ie10-viewport-bug-workaround.js"></script>
{% if page.layout == 'post' %}
<script id="dsq-count-scr" src="//{{site.disqus}}.disqus.com/count.js"></script>
{% endif %}
</body>
</html>

24
_layouts/page.html Normal file
View file

@ -0,0 +1,24 @@
---
layout: default
---
<section>
<div class="section-title">
<h2><span>{{ page.title }}</span></h2>
</div>
<div class="article-post">
{{content}}
</div>
{% if page.comments == true %}
<div id="comments" class="row mb-5">
<div class="col-md-8">
{% include disqus.html %}
</div>
</div>
{% endif %}
</section>

181
_layouts/post.html Normal file
View file

@ -0,0 +1,181 @@
---
layout: default
disqus: false
archive: false
post_class: post-template
---
<!-- Begin Article
================================================== -->
<div class="container">
<div class="row">
<!-- Post Share -->
<div class="col-md-2 pl-0">
{% include share.html %}
</div>
<!-- Post -->
{% assign author = site.authors[page.author] %}
<div class="col-md-9 flex-first flex-md-unordered">
<div class="mainheading">
<!-- Author Box -->
{% if page.author %}
<div class="row post-top-meta">
<div class="col-xs-12 col-md-3 col-lg-2 text-center text-md-left mb-4 mb-md-0">
{% if author.avatar %}
<img class="author-thumb" src="{{site.baseurl}}/{{ author.avatar }}" alt="{{ author.display_name }}">
{% else %}
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
{% endif %}
</div>
<div class="col-xs-12 col-md-9 col-lg-10 text-center text-md-left">
<a target="_blank" class="link-dark" href="{{ author.web }}">{{ author.display_name }}</a><a target="_blank" href="{{ author.twitter }}" class="btn follow">Follow</a>
<span class="author-description">{{ author.description }}</span>
</div>
</div>
{% endif %}
<!-- Post Title -->
<h1 class="posttitle">{{ page.title }}</h1>
</div>
<!-- Adsense if enabled from _config.yml (change your pub id and slot) -->
{% if site.adsense == "enabled" %}
{% include adsense-under-header.html %}
{% endif %}
<!-- End Adsense -->
<!-- Post Featured Image -->
{% if page.image %}
{% if site.lazyimages == "enabled" %}
<img class="featured-image img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ site.baseurl }}/{{ page.image }}{% endif %}" alt="{{ page.title }}">
{% else %}
<img class="featured-image img-fluid" src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ site.baseurl }}/{{ page.image }}{% endif %}" alt="{{ page.title }}">
{% endif %}
{% endif %}
<!-- End Featured Image -->
<!-- Post Content -->
<div class="article-post">
<!-- Toc if any -->
{% if page.toc %}
{% if page.beforetoc %}
<p><em>{{page.beforetoc}}</em></p>
{% endif %}
<div class="toc mt-4 mb-4 lead">
<h3 class="font-weight-bold">Summary</h3>
{% include toc.html html=content %}
</div>
{% endif %}
<!-- End Toc -->
{{content}}
</div>
<!-- Rating -->
{% if page.rating %}
<div class="rating mb-4 d-flex align-items-center">
<strong class="mr-1">Rating:</strong> {% include star_rating.html %}
</div>
{% endif %}
<!-- Post Date -->
<p>
<small>
<span class="post-date"><time class="post-date" datetime="{{ page.date | date:"%Y-%m-%d" }}">{{ page.date | date_to_string }}</time></span>
{% if page.last_modified_at %}
(Updated: <time datetime="{{ page.last_modified_at | date_to_xmlschema }}" itemprop="dateModified">{{ page.last_modified_at | date: "%b %-d, %Y" }}</time>)
{% endif %}
</small>
</p>
<!-- Post Categories -->
<div class="after-post-cats">
<ul class="tags mb-4">
{% assign sortedCategories = page.categories | sort %}
{% for category in sortedCategories %}
<li>
<a class="smoothscroll" href="{{site.baseurl}}/categories#{{ category | replace: " ","-" }}">{{ category }}</a>
</li>
{% endfor %}
</ul>
</div>
<!-- End Categories -->
<!-- Post Tags -->
<div class="after-post-tags">
<ul class="tags">
{% assign sortedTags = page.tags | sort %}
{% for tag in sortedTags %}
<li>
<a class="smoothscroll" href="{{site.baseurl}}/tags#{{ tag | replace: " ","-" }}">#{{ tag }}</a>
</li>
{% endfor %}
</ul>
</div>
<!-- End Tags -->
<!-- Prev/Next -->
<div class="row PageNavigation d-flex justify-content-between font-weight-bold">
{% if page.previous.url %}
<a class="prev d-block col-md-6" href="{{ site.baseurl }}/{{page.previous.url}}"> &laquo; {{page.previous.title}}</a>
{% endif %}
{% if page.next.url %}
<a class="next d-block col-md-6 text-lg-right" href="{{ site.baseurl }}/{{page.next.url}}">{{page.next.title}} &raquo; </a>
{% endif %}
<div class="clearfix"></div>
</div>
<!-- End Categories -->
</div>
<!-- End Post -->
</div>
</div>
<!-- End Article
================================================== -->
<!-- Begin Comments
================================================== -->
{% if page.comments != false %}
<div class="container">
<div id="comments" class="row justify-content-center mb-5">
<div class="col-md-8">
{% include disqus.html %}
</div>
</div>
</div>
{% endif %}
<!--End Comments
================================================== -->
<!-- Review with LD-JSON, adapt it for your needs if you like, but make sure you test the generated HTML source code first:
https://search.google.com/structured-data/testing-tool/u/0/
================================================== -->
{% if page.rating %}
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Review",
"itemReviewed": {
"@type": "Thing",
"name": "{{ page.title }}"
},
"author": {
"@type": "Person",
"name": "{{ author.display_name }}"
},
"datePublished": "{{ page.date | date:"%Y-%m-%d" }}",
"reviewRating": {
"@type": "Rating",
"ratingValue": "{{ page.rating }}",
"bestRating": "5"
}
}
</script>
{% endif %}

23
_layouts/tags.html Normal file
View file

@ -0,0 +1,23 @@
---
title: "Tags"
layout: default
permalink: "/tags.html"
---
<div class="row listrecent">
{% for tag in site.tags %}
<div class="section-title col-md-12 mt-4">
<h2 id="{{ tag[0] | replace: " ","-" }}">Tag <span class="text-capitalize">{{ tag[0] }}</span></h2>
</div>
{% assign pages_list = tag[1] %}
{% for post in pages_list %}
{% if post.title != null %}
{% if group == null or group == post.group %}
{% include postbox.html %}
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
{% endfor %}
</div>

35
_pages/about.md Normal file
View file

@ -0,0 +1,35 @@
---
layout: page
title: Mediumish Template for Jekyll
permalink: /about
comments: false
---
<div class="row justify-content-between">
<div class="col-md-8 pr-5">
<p>This website is built with Jekyll and Mediumish template for Jekyll. It's for demonstration purposes, no real content can be found. Mediumish template for Jekyll is compatible with Github pages, in fact even this demo is created with Github Pages and hosted with Github.</p>
<p class="mb-5"><img class="shadow-lg" src="{{site.baseurl}}/assets/images/mediumish-jekyll-template.png" alt="jekyll template mediumish" /></p>
<h4>Documentation</h4>
<p>Please, read the docs <a href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/">here</a>.</p>
<h4>Questions or bug reports?</h4>
<p>Head over to our <a href="https://github.com/wowthemesnet/mediumish-theme-jekyll">Github repository</a>!</p>
</div>
<div class="col-md-4">
<div class="sticky-top sticky-top-80">
<h5>Buy me a coffee</h5>
<p>Thank you for your support! Your donation helps me to maintain and improve <a target="_blank" href="https://github.com/wowthemesnet/mediumish-theme-jekyll">Mediumish <i class="fab fa-github"></i></a>.</p>
<a target="_blank" href="https://www.wowthemes.net/donate/" class="btn btn-danger">Buy me a coffee</a> <a target="_blank" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/" class="btn btn-warning">Documentation</a>
</div>
</div>
</div>

5
_pages/categories.md Normal file
View file

@ -0,0 +1,5 @@
---
layout: categories
title: Categories
permalink: /categories
---

5
_pages/tags.md Normal file
View file

@ -0,0 +1,5 @@
---
layout: tags
title: Tags
permalink: /tags
---

View file

@ -0,0 +1,176 @@
---
layout: post
title: "The quirks and performance of java arrays"
author: sander.hautvast
categories: [java, performance]
beforetoc: "FOO"
featured: true
hidden: false
lang: en
---
Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?
The only (active) memory I have of seeing arrays in an _actual_ codebase was in a situation where ideally you'd used multiple return types (like in Python) or first-class tuples (like in rust). Please don't return multiple objects in an Object[].
>What made you write this then?
Several reasons, one of which is a recent blog from oracle called [Inside the JVM: Arrays and how they differ from other objects](https://blogs.oracle.com/javamagazine/post/java-array-objects) which was disappointing because it failed to reveal any useful new information. This [puzzler](https://blogs.oracle.com/javamagazine/post/quiz-yourself-evaluation-order-the-assignment-operator-and-array-access-in-java) is whacky though!
And, I had just written a blog post for [my company site](https://sanderhautvast.github.io.nl/multidim-arrays/) (in Dutch) about arrays. So I am all into them. This, by the way is the English translation of that post.
A little while ago I stumbled over the _ghastlily_ poor performance of _java.lang.reflect.Array_. That started the whole thing. See [here](https://bugs.openjdk.org/browse/JDK-8051447). I wanted to create a better alternative (but I haven't progressed much though).
Arrays haven't changed much (at all?) since java 1.0. Makes sense for backwards compatibility. And _java_ in those days was somewhat weird (_still is_), or should I say: _C-like_. Look at this for example:
__3 ways to instantiate multi-dimensional arrays__
1. `int[][] array = new int[3][2];` // ok..
2. `int[] array[] = new int[2][2];` // reminding of C pointer notations
3. `int[][] array = new int[5][];` // WTF?
>What does option #3 even mean?
And how can this not give an IndexOutOfBoundsException?
```java
String[][][] array = new String[1][1];
array[0] = new String[2];
```
I couldn't google the answer straightaway, so I turned to [Jol](https://github.com/openjdk/jol) to find out more. NB. Jol does not work really well on macos (dunno about windows), so ran it in a linux vm and saw the following:
![jol](/assets/images/arrays/screenshot-jol.png)
[Jol](https://github.com/openjdk/jol) is a tool to investigate the memory internals of java objects. For a 2-dimensional String array you'd have to do this:
```bash
java -jar jol-cli.jar internals "[[Ljava.lang.String;"
```
>BTW, notice the weird notation! I knew`[[L` and `;`. If you look at bytecode, this is all over the place. `L` indicates an object (as opposed to the primitives as in `I` for ints) and `[[` is indeed an array of two dimensions. So those are the bytecode notations, but internally it also uses `/` whereas here it's the `.` again. It's confusing, but it turns out this is just the way that `Class.forName` wants it (if you need to need a Class object of that type). So there's a thing I didn't know.
Then it dawned on me. The phrase _array of arrays_ means that the outer array really doesn't care about the lengths of the inner ones. The only thing the outer array knows is its own length.
![jol](/assets/images/arrays/screenshot-jol-length.png)
So `String[1][1]` is in fact `String[1][]`. Every element in the outer array is a 1-dimensional array, of any length! No runtime bounds checks here (C-like!). Of course once the inner array is initialized, there are checks again.
>There are no true multi-dimensional arrays in Java, just arrays of arrays. This is why int[][] is a subclass of Object[]. If you need a large multi-dimensional int[] in Java, it is a bit more efficient to allocate a large int[] and calculate the offset yourself. However, make sure to, if possible, navigate the int[] in such a way that 64 bytes at a time can be read. That is a lot more efficient than jumping around. **_[Heinz Kabutz](https://javaspecialists.teachable.com/courses/249332/lectures/3886639)_**
'Jumping around' is not efficient because it hinders CPU caching and _prefetching_. Random Access Memory is sloow! It's thanks to the L1/2/3 caches that processors can actually show off their speed while dealing with memory. They fetch more than needed at the time and cache it for future reads. The effect of this amplified when the CPU can also predict your _next ~~move~~ read_. So the way you read and write an array matters.
>__But what performance gain can you actually achieve?__
This question tripped me and I fell down the rabbithole of microbenchmarking. I learnt a lot more about JMH, but in the end I discarded all the measurements from my Mac M2 max and reran them on a standard Amazon linux AMI. The results were more in line with what I read elsewhere. It's also more generalisable in the sense that server applications rarely run on high-end laptop architectures. Most of the time, my laptop showed a less prominent effect of caching.
#### Benchmarking with JMH
Your friend, the JIT compiler becomes your adversary once you get into benchmarking. Initially I glowed observing a performance difference of 1342%, but that had more to do with unwanted removal of dead code, than the actual truth. Something to be very aware of.
Also, testing your benchmarks makes sense. Verify you expectations of the actual functionality, to avoid the wrong conclusions about performance. Seems obvious but yeah, somebody had to point me to a mistake in my code...
This is what I ended up with
```java
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public long classicArrayGetTDLR() {
long t = 0;
for (int r = 0; r < ROWS; r++) {
for (int c = 0; c < COLS; c++) {
t += intArray[r][c];
}
}
return t;
}
```
TDLR stands for Top Down (outer loop), then Left Right. This order means that the code traverses row by row, which is good, because the memory is layed out like this. LRTD on the other hand takes one column after another. This will result in cache misses most of the time.
Benchmark | Mode | Cnt | Score | Error | Units
----------------|-------|-----:|----------:|-----------:|---------
classic2DArrayGetLRTD | avgt | 5 | 4184284.298 |± 7651435.011 | ns/op
classic2DArrayGetTDLR | avgt | 5 | 389369.258 |± 4064.665 | ns/op
_Amazon Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz_
Wow, 10x as fast! Exactly what [simondev](https://www.youtube.com/watch?v=247cXLkYt2M) found (using javascript). And what my laptop annoyingly failed to reproduce. There the difference was around a factor of 2.
>**Caveat:**
The individual numbers don't mean that much.
Another thing that Kabutz says is that it pays off to simulate multidimensional arrays using a one-dimensional one. This is easy to do. But is it useful?
Benchmark | Mode | Cnt | Score | Error | Units
----------------|-------|-----:|----------:|-----------:|---------
seqMultArrayGetLRTD | avgt | 5 | 1399817.940 | ± 271516.298 | ns/op
seqMultArrayGetTDLR | avgt | 5 | 392543.679 | ± 3671.543 | ns/op
>
The code for this benchmark (see github in the link at the bottom) allows any dimensions. Surely we can do a little better with a specialised version for just two.
Like this:
```java
public int get(int row, int col) {
return data[row * this.cols + col];
}
public void set(int row, int col, int val) {
data[row * this.cols + col] = val;
}
```
Benchmark | Mode | Cnt | Score | Error | Units
-----------------|-------|-----:|-----------:|-----------:|---------
seq2DArrayGetLRTD | avgt | 5 | 1362950.693 |± 43153.084 | ns/op
seq2DArrayGetTDLR | avgt | 5 | 390777.378 |± 11339.226 | ns/op
>
>no difference!
**So?**
Ok, there is an advantage in calculating your own indexes, BUT only if you for some reason cannot benefit from caching. All TDLR scores are roughly equal. Suppose you are reading random parts of images, in that case, it helps.
>**What about _writes_?**
Benchmark | Mode | Cnt | Score | Error | Units
-----------------|-------|-----:|---------------:|--------------:|---------
classic2DArraySetLRTD | avgt | 5 | 4212263.046 |± 267087.769 | ns/op
classic2DArraySetTDLR | avgt | 5 | 1032451.067 |± 35040.403 | ns/op
seq2DArraySetLRTD | avgt | 5 | 2569007.766 |± 45255.561 | ns/op
seq2DArraySetTDLR | avgt | 5 | 721699.703 |± 22605.344 | ns/op
>
3 to 4 times as fast for TDLR. Here index-calculation has more of an impact. So for editing random parts of images, especially for writing, use it.
--> But of course you should do your own measurements before embarking on any specific approach.
##### _[compiler blackholes](https://shipilev.net/jvm/anatomy-quarks/27-compiler-blackholes/)_
How to avoid dead code elimination with JMH?
1. add a return parameter (like in the code example above)
2. use _compiler blackholes_ (as of jdk-17)
Not using the return parameter in a benchmark makes the JIT compiler think it can help you by removing your precious code. Adding a sensible return parameter prohibits it from being that clever.
JMH will pick up whatever is returned and drops it into a black hole, and the information is lost. This in itself has some performance overhead and when the benchmark duration is in the same range, this will interfere with your measurements. Sounds like quantum physics, doesn't it?
So _Compiler blackholes_ make sure that the JMH Blackhole is optimized away, but NOT your benchmark code. This is new a JVM feature that you have to enable as follows:
`java -Djmh.blackhole.mode=COMPILER -jar benchmark.jar`
#### Old School?
Returning to the start of this article? Are arrays irrelevant for most developers, building boring web applications? They won't often use them, but their JVM will, as arrays are used in String, ArrayList, and HashMap, in other words, the most prevalent classes (number of instances) in any running JVM.
So iterating the characters in a String or the elements in an ArrayList follows the same performance laws as those for arrays. Oh, and don't use LinkedList. Practice differs from theory here, because of CPU caching. Most of the internet is still not aware of this, judging from a recent poll on LinkedIn. This [video](https://www.youtube.com/watch?v=YQs6IC-vgmo&t=0s) with Bjarne Stroustrup explains exactly why.
### DIY
```bash
git clone https://github.com/shautvast/arraybench
mvn clean package
java -Djmh.blackhole.mode=COMPILER -jar target/benchmark.jar
```
<div style="text-align: right"></div>

137
_sass/_stars.scss Normal file
View file

@ -0,0 +1,137 @@
/// Credits to https://codepen.io/damianmuti/pen/KmEMdR
///
$rating-min-value: 0 !default;
///
$rating-max-value: 5 !default;
///
$rating-steps-value: .25 !default;
///
$rating-color-empty: '%23ddd' !default;
///
$rating-color-full: gold !default;
///
$rating-color-hover: grey !default;
/// This variable is a map containing the "d" attribute of each of the SVG icons
$rating-icons-paths: (
quarter: 'M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z',
half: 'M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z',
three-quarters: 'M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z',
full: 'M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z'
);
/// Creates a dynamic list of values that increment each .25 from 0 to 5
/// @return {list}
@function rating-values() {
$rating-values: ();
@for $i from $rating-min-value through ($rating-max-value / $rating-steps-value) {
$rating-value: abs($i * $rating-steps-value);
$rating-values: append($rating-values, $rating-value, 'comma');
}
@return $rating-values;
}
/// Generates an SVG with a given fill color depending on the type of icon passed as parameter. The SVG string is scaped for cross-browser support.
/// @param {string} $icon - Type of icon. Accepted values: `quarter`, `half`, `three-quarters` or `full`.
/// @param {color} $color - Passes the fill color of the SVG icon that is being generated. Note: Hexa color values must be escaped for cross-browser support.
/// @return {string} background value.
@function get-icon($icon, $color) {
@if not index(quarter half three-quarters full, $icon) {
@error "Interaction type must be either `quarter`, `half`, `three-quarters` or `full`.";
}
@return url('data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22' + $color + '%22%20d%3D%22' + map-get($rating-icons-paths, $icon) + '%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E') center / cover no-repeat;
}
/// This is a CSS-only star rating component that shows the proper rating depending on a data-attribute value. JS logic behind this component should round up values per quarter.
/// @param {number} $star-size [20px] - Provides width and height for each of the stars.
/// @param {string} $rating-element [button] - Element to use for each of the stars.
/// @param {string} $interaction-type [representative] - Indicates whether this component should be clickable or representative. Accepted values: `clickable` or `representative`.
/// @example scss
/// .class {
/// c-rating(toem(20px), button, clickable);
/// }
/// @example markup
/// <div class="c-rating" data-rating-value="3.25">
/// <span>1</span>
/// <span>2</span>
/// <span>3</span>
/// <span>4</span>
/// <span>5</span>
/// </div>
@mixin c-rating($star-size: 20px, $star-element: button, $interaction-type: representative) {
@if not index(clickable representative, $interaction-type) {
@error "Interaction type must be either `clickable` or `representative`.";
}
#{$star-element} {
display: inline-block;
float: left;
width: $star-size;
height: $star-size;
border: 0;
text-indent: -9999px;
outline: none;
background: get-icon(full, $rating-color-empty);
}
@each $rating-value in rating-values() {
// Get the next higher integer.
$rating-value-ceil: ceil($rating-value);
&[data-rating-value="#{$rating-value}"] {
#{$star-element}:nth-child(-n+#{$rating-value-ceil}) {
background: get-icon(full, $rating-color-full);
}
#{$star-element}:nth-child(#{$rating-value-ceil}) {
// Evaluate which fraction of a star this value is and add the proper background
@if str-slice("#{$rating-value}", 2, 4) == '.25' {
background: get-icon(quarter, $rating-color-full), get-icon(full, $rating-color-empty)
}
@else if str-slice("#{$rating-value}", 2, 4) == '.5' {
background: get-icon(half, $rating-color-full), get-icon(full, $rating-color-empty)
}
@else if str-slice("#{$rating-value}", 2, 4) == '.75' {
background: get-icon(three-quarters, $rating-color-full), get-icon(full, $rating-color-empty)
}
}
}
}
}
/// Convert to EMs function
/// @param {number} target - The value to be converted
/// @param {number} context [$msuxf-font-size] The base font size
/// @return {em} value
@function toem($target, $context: 16px) {
@if $target == 0 {
@return 0
}
@return $target / $context+0em;
}
.rating-holder {
font-size: 16px;
display: inline-block;
background-color: #fff;
border-radius: toem(25px);
box-sizing: border-box;
}
.c-rating {
@include c-rating(toem(20px), button, clickable);
&--small {
font-size: 50%
}
&--big {
font-size: 150%;
}
}

92
_sass/_starsnonscss.scss Normal file
View file

@ -0,0 +1,92 @@
.rating-holder {
font-size: 16px;
display: inline-block;
background-color: #fff;
border-radius: 1.5625em;
box-sizing: border-box; }
.c-rating button {
display: inline-block;
float: left;
width: 1.25em;
height: 1.25em;
border: 0;
text-indent: -9999px;
outline: none;
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="0"] button:nth-child(-n+0) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="0.25"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="0.25"] button:nth-child(1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="0.5"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="0.5"] button:nth-child(1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="0.75"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="0.75"] button:nth-child(1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="1"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="1.25"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="1.25"] button:nth-child(2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="1.5"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="1.5"] button:nth-child(2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="1.75"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="1.75"] button:nth-child(2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="2"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="2.25"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="2.25"] button:nth-child(3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="2.5"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="2.5"] button:nth-child(3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="2.75"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="2.75"] button:nth-child(3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="3"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="3.25"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="3.25"] button:nth-child(4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="3.5"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="3.5"] button:nth-child(4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="3.75"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="3.75"] button:nth-child(4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="4"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="4.25"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="4.25"] button:nth-child(5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="4.5"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="4.5"] button:nth-child(5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="4.75"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="4.75"] button:nth-child(5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating[data-rating-value="5"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat; }
.c-rating--small {
font-size: 50%; }
.c-rating--big {
font-size: 150%; }

69
_sass/_syntax.scss Normal file
View file

@ -0,0 +1,69 @@
.highlight {
background: #fff;
border: 0;
padding: 0;
margin-bottom:1.7rem;
.c { color: #999988; font-style: italic } /* Comment */
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
.k { font-weight: bold } /* Keyword */
.o { font-weight: bold } /* Operator */
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
.cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.c1 { color: #999988; font-style: italic } /* Comment.Single */
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.ge { font-style: italic } /* Generic.Emph */
.gr { color: #aa0000 } /* Generic.Error */
.gh { color: #999999 } /* Generic.Heading */
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.go { color: #888888 } /* Generic.Output */
.gp { color: #555555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaaaaa } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc { font-weight: bold } /* Keyword.Constant */
.kd { font-weight: bold } /* Keyword.Declaration */
.kp { font-weight: bold } /* Keyword.Pseudo */
.kr { font-weight: bold } /* Keyword.Reserved */
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
.m { color: #009999 } /* Literal.Number */
.s { color: #d14 } /* Literal.String */
.na { color: #008080 } /* Name.Attribute */
.nb { color: #0086B3 } /* Name.Builtin */
.nc { color: #445588; font-weight: bold } /* Name.Class */
.no { color: #008080 } /* Name.Constant */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #990000; font-weight: bold } /* Name.Exception */
.nf { color: #990000; font-weight: bold } /* Name.Function */
.nn { color: #555555 } /* Name.Namespace */
.nt { color: #000080 } /* Name.Tag */
.nv { color: #008080 } /* Name.Variable */
.ow { font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #009999 } /* Literal.Number.Float */
.mh { color: #009999 } /* Literal.Number.Hex */
.mi { color: #009999 } /* Literal.Number.Integer */
.mo { color: #009999 } /* Literal.Number.Oct */
.sb { color: #d14 } /* Literal.String.Backtick */
.sc { color: #d14 } /* Literal.String.Char */
.sd { color: #d14 } /* Literal.String.Doc */
.s2 { color: #d14 } /* Literal.String.Double */
.se { color: #d14 } /* Literal.String.Escape */
.sh { color: #d14 } /* Literal.String.Heredoc */
.si { color: #d14 } /* Literal.String.Interpol */
.sx { color: #d14 } /* Literal.String.Other */
.sr { color: #009926 } /* Literal.String.Regex */
.s1 { color: #d14 } /* Literal.String.Single */
.ss { color: #990073 } /* Literal.String.Symbol */
.bp { color: #999999 } /* Name.Builtin.Pseudo */
.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: #008080 } /* Name.Variable.Global */
.vi { color: #008080 } /* Name.Variable.Instance */
.il { color: #009999 } /* Literal.Number.Integer.Long */
}
td.rouge-code { width: 100%;}
pre.lineno { color: #9999;}

218
_site/404.html Normal file
View file

@ -0,0 +1,218 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>404 | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>404 | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="404" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="What I might have failed to mention" />
<meta property="og:description" content="What I might have failed to mention" />
<link rel="canonical" href="http://localhost:4000/404.html" />
<meta property="og:url" content="http://localhost:4000/404.html" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="404" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"What I might have failed to mention","headline":"404","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"}},"url":"http://localhost:4000/404.html"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-default">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<div class="text-center">
<h1 class="display-1 mt-5 mb-4"><span class="badge badge-danger">404</span> Page does not exist!</h1>
<p>Please use the search bar at the top or visit our <a href="/">homepage</a>!</p>
</div>
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

1
_site/CNAME Normal file
View file

@ -0,0 +1 @@
sanderhautvast.github.io

252
_site/about.html Normal file
View file

@ -0,0 +1,252 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>Mediumish Template for Jekyll | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Mediumish Template for Jekyll | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="Mediumish Template for Jekyll" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="What I might have failed to mention" />
<meta property="og:description" content="What I might have failed to mention" />
<link rel="canonical" href="http://localhost:4000/about" />
<meta property="og:url" content="http://localhost:4000/about" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Mediumish Template for Jekyll" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"What I might have failed to mention","headline":"Mediumish Template for Jekyll","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"}},"url":"http://localhost:4000/about"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-page">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<section>
<div class="section-title">
<h2><span>Mediumish Template for Jekyll</span></h2>
</div>
<div class="article-post">
<div class="row justify-content-between">
<div class="col-md-8 pr-5">
<p>This website is built with Jekyll and Mediumish template for Jekyll. It's for demonstration purposes, no real content can be found. Mediumish template for Jekyll is compatible with Github pages, in fact even this demo is created with Github Pages and hosted with Github.</p>
<p class="mb-5"><img class="shadow-lg" src="/assets/images/mediumish-jekyll-template.png" alt="jekyll template mediumish" /></p>
<h4>Documentation</h4>
<p>Please, read the docs <a href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/">here</a>.</p>
<h4>Questions or bug reports?</h4>
<p>Head over to our <a href="https://github.com/wowthemesnet/mediumish-theme-jekyll">Github repository</a>!</p>
</div>
<div class="col-md-4">
<div class="sticky-top sticky-top-80">
<h5>Buy me a coffee</h5>
<p>Thank you for your support! Your donation helps me to maintain and improve <a target="_blank" href="https://github.com/wowthemesnet/mediumish-theme-jekyll">Mediumish <i class="fab fa-github"></i></a>.</p>
<a target="_blank" href="https://www.wowthemes.net/donate/" class="btn btn-danger">Buy me a coffee</a> <a target="_blank" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/" class="btn btn-warning">Documentation</a>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

443
_site/assets/css/main.css Normal file
View file

@ -0,0 +1,443 @@
/* We need to add display:inline in order to align the '>>' of the 'read more' link */
.post-excerpt p {
display: inline;
}
.highlight {
background: #fff;
border: 0;
padding: 0;
margin-bottom: 1.7rem;
/* Comment */
/* Error */
/* Keyword */
/* Operator */
/* Comment.Multiline */
/* Comment.Preproc */
/* Comment.Single */
/* Comment.Special */
/* Generic.Deleted */
/* Generic.Deleted.Specific */
/* Generic.Emph */
/* Generic.Error */
/* Generic.Heading */
/* Generic.Inserted */
/* Generic.Inserted.Specific */
/* Generic.Output */
/* Generic.Prompt */
/* Generic.Strong */
/* Generic.Subheading */
/* Generic.Traceback */
/* Keyword.Constant */
/* Keyword.Declaration */
/* Keyword.Pseudo */
/* Keyword.Reserved */
/* Keyword.Type */
/* Literal.Number */
/* Literal.String */
/* Name.Attribute */
/* Name.Builtin */
/* Name.Class */
/* Name.Constant */
/* Name.Entity */
/* Name.Exception */
/* Name.Function */
/* Name.Namespace */
/* Name.Tag */
/* Name.Variable */
/* Operator.Word */
/* Text.Whitespace */
/* Literal.Number.Float */
/* Literal.Number.Hex */
/* Literal.Number.Integer */
/* Literal.Number.Oct */
/* Literal.String.Backtick */
/* Literal.String.Char */
/* Literal.String.Doc */
/* Literal.String.Double */
/* Literal.String.Escape */
/* Literal.String.Heredoc */
/* Literal.String.Interpol */
/* Literal.String.Other */
/* Literal.String.Regex */
/* Literal.String.Single */
/* Literal.String.Symbol */
/* Name.Builtin.Pseudo */
/* Name.Variable.Class */
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */
}
.highlight .c {
color: #999988;
font-style: italic;
}
.highlight .err {
color: #a61717;
background-color: #e3d2d2;
}
.highlight .k {
font-weight: bold;
}
.highlight .o {
font-weight: bold;
}
.highlight .cm {
color: #999988;
font-style: italic;
}
.highlight .cp {
color: #999999;
font-weight: bold;
}
.highlight .c1 {
color: #999988;
font-style: italic;
}
.highlight .cs {
color: #999999;
font-weight: bold;
font-style: italic;
}
.highlight .gd {
color: #000000;
background-color: #ffdddd;
}
.highlight .gd .x {
color: #000000;
background-color: #ffaaaa;
}
.highlight .ge {
font-style: italic;
}
.highlight .gr {
color: #aa0000;
}
.highlight .gh {
color: #999999;
}
.highlight .gi {
color: #000000;
background-color: #ddffdd;
}
.highlight .gi .x {
color: #000000;
background-color: #aaffaa;
}
.highlight .go {
color: #888888;
}
.highlight .gp {
color: #555555;
}
.highlight .gs {
font-weight: bold;
}
.highlight .gu {
color: #aaaaaa;
}
.highlight .gt {
color: #aa0000;
}
.highlight .kc {
font-weight: bold;
}
.highlight .kd {
font-weight: bold;
}
.highlight .kp {
font-weight: bold;
}
.highlight .kr {
font-weight: bold;
}
.highlight .kt {
color: #445588;
font-weight: bold;
}
.highlight .m {
color: #009999;
}
.highlight .s {
color: #d14;
}
.highlight .na {
color: #008080;
}
.highlight .nb {
color: #0086B3;
}
.highlight .nc {
color: #445588;
font-weight: bold;
}
.highlight .no {
color: #008080;
}
.highlight .ni {
color: #800080;
}
.highlight .ne {
color: #990000;
font-weight: bold;
}
.highlight .nf {
color: #990000;
font-weight: bold;
}
.highlight .nn {
color: #555555;
}
.highlight .nt {
color: #000080;
}
.highlight .nv {
color: #008080;
}
.highlight .ow {
font-weight: bold;
}
.highlight .w {
color: #bbbbbb;
}
.highlight .mf {
color: #009999;
}
.highlight .mh {
color: #009999;
}
.highlight .mi {
color: #009999;
}
.highlight .mo {
color: #009999;
}
.highlight .sb {
color: #d14;
}
.highlight .sc {
color: #d14;
}
.highlight .sd {
color: #d14;
}
.highlight .s2 {
color: #d14;
}
.highlight .se {
color: #d14;
}
.highlight .sh {
color: #d14;
}
.highlight .si {
color: #d14;
}
.highlight .sx {
color: #d14;
}
.highlight .sr {
color: #009926;
}
.highlight .s1 {
color: #d14;
}
.highlight .ss {
color: #990073;
}
.highlight .bp {
color: #999999;
}
.highlight .vc {
color: #008080;
}
.highlight .vg {
color: #008080;
}
.highlight .vi {
color: #008080;
}
.highlight .il {
color: #009999;
}
td.rouge-code {
width: 100%;
}
pre.lineno {
color: rgba(153, 153, 153, 0.6);
}
.rating-holder {
font-size: 16px;
display: inline-block;
background-color: #fff;
border-radius: 1.5625em;
box-sizing: border-box;
}
.c-rating button {
display: inline-block;
float: left;
width: 1.25em;
height: 1.25em;
border: 0;
text-indent: -9999px;
outline: none;
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="0"] button:nth-child(-n+0) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="0.25"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="0.25"] button:nth-child(1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="0.5"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="0.5"] button:nth-child(1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="0.75"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="0.75"] button:nth-child(1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="1"] button:nth-child(-n+1) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="1.25"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="1.25"] button:nth-child(2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="1.5"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="1.5"] button:nth-child(2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="1.75"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="1.75"] button:nth-child(2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="2"] button:nth-child(-n+2) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="2.25"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="2.25"] button:nth-child(3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="2.5"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="2.5"] button:nth-child(3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="2.75"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="2.75"] button:nth-child(3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="3"] button:nth-child(-n+3) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="3.25"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="3.25"] button:nth-child(4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="3.5"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="3.5"] button:nth-child(4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="3.75"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="3.75"] button:nth-child(4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="4"] button:nth-child(-n+4) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="4.25"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="4.25"] button:nth-child(5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="4.5"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="4.5"] button:nth-child(5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="4.75"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="4.75"] button:nth-child(5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat, url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating[data-rating-value="5"] button:nth-child(-n+5) {
background: url("data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E") center/cover no-repeat;
}
.c-rating--small {
font-size: 50%;
}
.c-rating--big {
font-size: 150%;
}
/*# sourceMappingURL=main.css.map */

File diff suppressed because one or more lines are too long

907
_site/assets/css/screen.css Normal file
View file

@ -0,0 +1,907 @@
/*
Template Name: Mediumish
Copyright: Sal, WowThemes.net, https://www.wowthemes.net
License: https://www.wowthemes.net/freebies-license/
*/
@media screen and (min-width:1500px) {
html { font-size:18px; } /* Increase the font size on higher resolutions */
.container {max-width:80%;}
}
.mainheading {
padding: 1rem 0rem;
}
a {
color: #00ab6b;
transition: all 0.2s;
}
a:hover {
color: #038252;
text-decoration: none;
}
pre {
-moz-box-sizing: border-box;
box-sizing: border-box;
border: #E3EDF3 1px solid;
width: 100%;
padding: 7px;
font-family: monospace, sans-serif;
font-size: .9rem;
white-space: pre;
overflow: auto;
background: #fff;
border-radius: 0px;
line-height: 1.6;
color: #333;
margin-bottom: -rem;
}
.mediumnavigation {
background: rgba(255, 255, 255, .97);
box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .15);
transition: top 0.2s ease-in-out;
}
.main-content {
min-height: 300px;
}
.site-content {
min-height: 60vh;
padding-top: 1.5rem;
margin-top: 57px;
transition: all 0.4s;
}
section {
margin-bottom: 20px;
}
section.recent-posts {
margin-bottom: 0;
}
.section-title h2 {
border-bottom: 1px solid rgba(0, 0, 0, .125);
margin-bottom: 25px;
font-weight: 700;
font-size: 1.4rem;
margin-bottom: 27px;
}
.section-title span {
border-bottom: 1px solid rgba(0, 0, 0, .44);
display: inline-block;
padding-bottom: 20px;
margin-bottom: -1px;
}
.article-post ol,
.article-post ul {
margin-bottom: 1.5rem;
}
.article-post ol ol,
.article-post ul ul {
list-style: disc;
margin-bottom: 0rem;
}
@media (min-width:576px) {
.card-columns.listfeaturedtag {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
}
@media (min-width:992px) {
.navbar-expand-lg .navbar-nav .nav-link {
padding-right: 0.8rem;
padding-left: 0.8rem;
}
}
.listfeaturedtag {
border: 1px solid rgba(0, 0, 0, .125);
border-radius: .25rem;
transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
}
.listfeaturedtag .wrapthumbnail {
height: 290px;
flex: 0 0 auto;
height: 100%;
}
.maxthumb {
max-height: 300px;
overflow: hidden;
}
.listfeaturedtag .card,
.card-footer {
border: 0;
}
.listfeaturedtag .thumbnail {
background-size: cover;
height: 100%;
display: block;
background-position: 38% 22% !important;
background-origin: border-box !important;
border-top-left-radius: .25rem;
border-bottom-left-radius: .25rem;
}
.listfeaturedtag .card-block {
padding-left: 0;
}
.listfeaturedtag h2.card-title,
.listrecent h2.card-title {
font-size: 1.3rem;
font-weight: 700;
line-height: 1.25;
}
.listfeaturedtag h4.card-text,
.listrecent h4.card-text {
color: rgba(0, 0, 0, .44);
font-size: 0.95rem;
line-height: 1.6;
font-weight: 400;
}
.featured-box-img-cover {
object-fit: cover;
width: 100%;
height: 100%;
max-height: 100%;
}
@media (max-width:991px) {
.featured-box-img-cover {
height: auto;
width: 100%;
}
}
.wrapfooter {
font-size: .8rem;
display: flex;
align-items: center;
margin-bottom: 15px;
}
.author-thumb {
width: 40px;
height: 40px;
margin-right: 13px;
border-radius: 100%;
}
.post-top-meta {
margin-bottom: 2rem;
}
.post-top-meta .author-thumb {
width: 72px;
height: 72px;
}
.post-top-meta.authorpage .author-thumb {
margin-top: 40px;
}
.post-top-meta span {
font-size: 0.9rem;
color: rgba(0, 0, 0, .44);
display: inline-block;
}
.post-top-meta .author-description {
margin-bottom: 5px;
margin-top: 5px;
font-size: 0.95rem;
}
.toc ul {
list-style: decimal;
font-weight: 400;
}
.author-meta {
flex: 1 1 auto;
white-space: nowrap !important;
text-overflow: ellipsis !important;
overflow: hidden !important;
}
span.post-name,
span.post-date,
span.author-meta {
display: inline-block;
}
span.post-date,
span.post-read {
color: rgba(0, 0, 0, .44);
}
span.post-read-more {
align-items: center;
display: inline-block;
float: right;
margin-top: 8px;
}
span.post-read-more a {
color: rgba(0, 0, 0, .44);
}
span.post-name a,
span.post-read-more a:hover {
color: rgba(0, 0, 0, .8);
}
.dot:after {
content: "·";
margin-left: 3px;
margin-right: 3px;
}
.mediumnavigation .form-control {
font-size: 0.8rem;
border-radius: 30px;
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.09);
min-width: 180px;
}
.mediumnavigation .form-inline {
margin-left: 15px;
}
.mediumnavigation .form-inline .btn {
margin-left: -50px;
border: 0;
border-radius: 30px;
cursor: pointer;
}
.mediumnavigation .form-inline .btn:hover,
.mediumnavigation .form-inline .btn:active {
background: transparent;
color: green;
}
.mediumnavigation .navbar-brand {
font-weight: 500;
}
.mediumnavigation .dropdown-menu {
border: 1px solid rgba(0, 0, 0, 0.08);
margin: .5rem 0 0;
}
.mediumnavigation .nav-item,
.dropdown-menu {
font-size: 0.9rem;
}
.mediumnavigation .search-icon {
margin-left: -40px;
display: inline-block;
margin-top: 3px;
cursor: pointer;
}
.mediumnavigation .navbar-brand img {
max-height: 30px;
margin-right: 5px;
}
.mainheading h1.sitetitle {
font-family: Righteous;
}
.mainheading h1.posttitle {
font-weight: 700;
margin-bottom: 1rem;
}
.footer {
border-top: 1px solid rgba(0, 0, 0, .05) !important;
padding-top: 15px;
padding-bottom: 12px;
font-size: 0.8rem;
color: rgba(0, 0, 0, .44);
margin-top: 50px;
margin-bottom: 62px;
position: relative;
background: #fff;
}
.link-dark {
color: rgba(0, 0, 0, .8);
}
.article-post {
font-family: Merriweather, source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
font-size: 1.1rem;
line-height: 1.84;
color: rgba(0, 0, 0, .8);
}
blockquote {
border-left: 4px solid #00ab6b;
padding: 0 20px;
font-style: italic;
color: rgba(0, 0, 0, .5);
}
.article-post p,
.article-post blockquote {
margin: 0 0 1.5rem 0;
}
.featured-image {
display: block;
margin-bottom: 1.5rem;
}
.share {
text-align: center;
}
.share p {
margin-bottom: 10px;
font-size: 0.95rem;
}
.share ul li {
display: inline-block;
margin-bottom: 9px;
}
.share ul {
padding-left: 0;
margin-left: 0;
}
.share ul li i.fa {
border: 1px solid #ddd;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 50%;
}
.svgIcon {
vertical-align: middle;
}
.sticky-top-offset {
top: 100px;
}
@media (min-width:1024px) {
.share ul li {
display: block;
}
}
@media (max-width:999px) {
.featured-box-img-cover {
height: 359px;
}
.alertbar {
position: relative !Important;
margin-bottom: 20px;
margin-top: 20px;
box-shadow: none !Important;
padding-right: 14px !Important;
}
#comments {
margin-right: 15px;
}
.jumbotron.fortags {
margin-bottom: 0 !Important;
}
.alertbar form {
margin-top: 20px;
}
.alertbar span,
.alertbar form {
display: block;
}
.alertbar input[type="submit"] {
border-radius: 3px !Important;
}
.alertbar input[type="email"] {
margin-right: 0px !Important;
display: block;
border-right: 1px solid #ddd !Important;
margin-bottom: 10px;
}
.jumbotron {
margin-bottom: 0;
border-radius: 0;
}
.listfeaturedtag .card {
height: auto;
}
.listfeaturedtag .wrapfooter {
position: relative;
margin-top: 30px;
}
.listfeaturedtag .card-block {
padding: 20px;
}
.footer {
margin-top: 0px;
margin-bottom: 0px;
}
}
@media (max-width:1024px) {
.post-top-meta .col-md-10 {
text-align: center;
}
}
@media (max-width:767px) {
.post-top-meta.authorpage {
text-align: center;
}
}
.share,
.share a {
color: rgba(0, 0, 0, .44);
fill: rgba(0, 0, 0, .44);
}
.graybg {
background-color: #fafafa;
padding: 40px 0 46px;
position: relative;
}
.listrelated .card {
box-shadow: 0 1px 7px rgba(0, 0, 0, .05);
border: 0;
}
ul.tags {
list-style: none;
padding-left: 0;
margin: 0 0 3rem 0;
}
ul.tags li {
display: inline-block;
font-size: 0.9rem;
}
ul.tags li a {
background: rgba(0, 0, 0, .05);
color: rgba(0, 0, 0, .6);
border-radius: 3px;
padding: 5px 10px;
}
ul.tags li a:hover {
background: rgba(0, 0, 0, .07);
text-decoration: none;
}
.margtop3rem {
margin-top: 3rem;
}
.sep {
height: 1px;
width: 20px;
background: #999;
margin: 0px auto;
margin-bottom: 1.2rem;
}
.btn.follow {
border-color: #02B875;
color: #1C9963;
padding: 3px 10px;
text-align: center;
border-radius: 999em;
font-size: 0.85rem;
display: inline-block;
}
.btn.subscribe {
background-color: #1C9963;
border-color: #1C9963;
color: rgba(255, 255, 255, 1);
fill: rgba(255, 255, 255, 1);
border-radius: 30px;
font-size: 0.85rem;
margin-left: 10px;
font-weight: 600;
text-transform: uppercase;
}
.post-top-meta .btn.follow {
margin-left: 5px;
margin-top: -4px;
}
.alertbar {
box-shadow: 0 -3px 10px 0 rgba(0, 0, 0, .0785);
position: fixed;
bottom: 0;
left: 0;
background-color: #fff;
width: 100%;
padding: 14px 0;
z-index: 1;
display: none;
}
.alertbar form {
display: inline-block;
}
.alertbar input[type="email"] {
font-size: 0.85rem;
padding: 3px 5px 3px 10px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border: 1px solid #ddd;
border-right: 0;
margin-right: -10px;
height: 34px;
letter-spacing: 0.5px;
margin-left: 5px;
}
.alertbar input[type="submit"] {
background-color: #1C9963;
border: 1px solid #1C9963;
color: rgba(255, 255, 255, 1);
fill: rgba(255, 255, 255, 1);
font-size: 0.85rem;
border-radius: 0;
padding: 4px 10px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
font-weight: 600;
height: 34px;
letter-spacing: 0.5px;
cursor: pointer;
}
.form-control::-webkit-input-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control:-moz-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control::-moz-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control:-ms-input-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control::-ms-input-placeholder {
color: rgba(0, 0, 0, .5);
}
.authorpage h1 {
font-weight: 700;
font-size: 30px;
}
.post-top-meta.authorpage .author-thumb {
float: none;
}
.authorpage .author-description {
font-size: 1rem;
color: rgba(0, 0, 0, .6);
}
.post-top-meta.authorpage .btn.follow {
padding: 7px 20px;
margin-top: 10px;
margin-left: 0;
font-size: 0.9rem;
}
.graybg.authorpage {
border-top: 1px solid #f0f0f0;
}
.authorpostbox {
width: 760px;
margin: 0px auto;
margin-bottom: 1.5rem;
max-width: 100%;
}
.authorpostbox .img-thumb {
width: 100%;
}
.sociallinks {
margin: 1rem 0;
}
.sociallinks a {
background: #666;
color: #fff;
width: 22px;
height: 22px;
display: inline-block;
text-align: center;
line-height: 22px;
border-radius: 50%;
font-size: 12px;
}
#comments {
margin-top: 3rem;
margin-bottom: 1.5rem;
}
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.article-post .h1,
.article-post .h2,
.article-post .h3,
.article-post .h4,
.article-post .h5,
.article-post .h6,
.article-post h1,
.article-post h2,
.article-post h3,
.article-post h4,
.article-post h5,
.article-post h6 {
font-weight: 700;
margin-bottom: 1.5rem;
}
.article-post img.shadow {
-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
-moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
}
.layout-page .article-post {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
}
.layout-page .article-post p {
margin-bottom: 1rem;
}
img {
max-width: 100%;
}
.bottompagination span.navigation {
display: block;
font-size: 0.93rem;
padding: 15px 0 0 0;
text-align: center;
margin-bottom: 0rem;
color: #999;
border-top: 1px solid #ddd;
}
.pointerup {
margin-bottom: -17px;
margin-left: 49%;
font-size: 30px;
}
.pointerup i.fa {
color: #eaeaea;
}
.bottompagination span.navigation i {
display: inline-block;
}
span.navigation {
display: inline-block;
font-size: 0.93rem;
font-weight: 700;
text-align: center;
}
.pagination {
display: block;
}
iframe {
max-width: 100%;
}
.transpdark {
background: rgba(0, 0, 0, 0.75);
color: #fff;
}
@media (min-width:768px) {
.jumbotron.fortags {
margin-bottom: -50px;
margin-top: 3rem;
padding: 0;
height: 350px;
border-radius: 0;
/*background-image: url(../images/jumbotron.jpg);*/
background-size: cover;
}
.jumbotron.fortags .col-md-4 {
background: rgba(0, 0, 0, 0.75);
color: #fff;
}
.jumbotron.fortags .row {
margin: 0;
}
}
.jumbotron.fortags {
margin-top: 3rem;
padding: 0;
border-radius: 0;
/*background-image: url(../images/jumbotron.jpg);*/
background-size: cover;
}
.jumbotron.fortags a {
padding: 5px 10px 7px;
background: #222;
border-radius: 30px;
color: #fff;
font-weight: 500;
text-transform: lowercase;
font-size: 0.8rem;
display: inline-block;
}
.layout-page .jumbotron.fortags {
display: none;
}
.mb-30px {
margin-bottom: 30px;
}
.flex-first {
-webkit-box-ordinal-group: 0;
-webkit-order: -1;
-ms-flex-order: -1;
order: -1;
}
@media (min-width: 768px) {
.flex-md-unordered {
-webkit-box-ordinal-group: 1;
-webkit-order: 1;
-ms-flex-order: 1;
order: 1;
}
.flex-first {
-webkit-box-ordinal-group: 0;
-webkit-order: 1;
-ms-flex-order: 1;
order: 1;
}
}
@media (max-width: 768px) {
.share {
margin-top: 30px;
}
}
.card .img-fluid {
width: 100%;
}
.sticky-top-80 {
top: 80px;
}
.spoiler {
color: transparent;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
transition: all .4s;
cursor: pointer;
position: relative;
}
.spoiler:after {
position: absolute;
opacity: 0;
content: 'Click to reveal spoiler';
top: 45%;
left: calc(50% - 100px);
text-shadow: none;
background: #222;
color: #fff;
display: inline-block;
font-size: 13px;
line-height: 1;
padding: 2px 3px;
width: 150px;
font-family: Arial;
text-align: center;
border-radius: 3px;
transition: all .4s;
}
.spoiler:hover:after {
opacity: 1;
}
/** Lazy img **/
.lazyimg {
display: block;
border: 0 none;
opacity: 1;
transition: opacity .25s;
background: #f2f2f2;
outline: 0 none;
}
.lazyimg[data-src],
.lazyimg[data-srcset] {
opacity: 0;
transition: opacity .25s;
}
table, th, td {
padding-right: 14px;
border: 1px solid rgba(0, 0, 0, .25);
font-family: Arial, Helvetica, sans-serif;
}

Binary file not shown.

View file

@ -0,0 +1,19 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="512">
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode="&#x20;" d="" horiz-adv-x="256" />
<glyph unicode="&#xf600;" d="M0 480v-102.4h307.2v102.4h-307.2zM0 275.2v-102.4h512v102.4h-512zM0 70.4v-102.4h204.8v102.4h-204.8zM307.2 70.4v-102.4h204.8v102.4h-204.8zM409.6 480v-102.4h102.4v102.4h-102.4z" />
<glyph unicode="&#xf601;" d="M421.344-32c-0.4 229.616-200.752 417.264-421.344 417.696v94.304c270.656 0 512-230.304 512-512h-90.656zM343.6-31.968h-90.608c0.304 56.384-28.336 119.488-73.664 166.736-45.072 47.632-124.96 77.648-179.104 77.36v94.272c169.040-3.648 339.936-163.312 343.376-338.368zM64.256 96.048c35.312 0 63.936-28.656 63.936-64 0-35.328-28.624-63.984-63.936-63.984s-63.936 28.656-63.936 63.984c0 35.344 28.624 64 63.936 64z" />
<glyph unicode="&#xf602;" d="M512 382.791c-18.838-8.354-39.082-14.001-60.33-16.54 21.686 13 38.343 33.585 46.186 58.115-20.298-12.039-42.778-20.78-66.705-25.49-19.16 20.415-46.461 33.17-76.673 33.17-58.011 0-105.044-47.029-105.044-105.039 0-8.233 0.929-16.25 2.72-23.939-87.3 4.382-164.701 46.2-216.509 109.753-9.042-15.514-14.223-33.558-14.223-52.809 0-36.444 18.544-68.596 46.73-87.433-17.219 0.546-33.416 5.271-47.577 13.139-0.010-0.438-0.010-0.878-0.010-1.321 0-50.894 36.209-93.348 84.261-103-8.813-2.4-18.094-3.686-27.674-3.686-6.769 0-13.349 0.66-19.764 1.886 13.368-41.73 52.16-72.103 98.126-72.948-35.95-28.175-81.243-44.967-130.458-44.967-8.479 0-16.84 0.497-25.058 1.47 46.486-29.805 101.701-47.197 161.021-47.197 193.211 0 298.868 160.062 298.868 298.872 0 4.554-0.103 9.084-0.305 13.59 20.528 14.81 38.336 33.31 52.418 54.374z" />
<glyph unicode="&#xf603;" d="M0.403 45.168c-0.122 1.266-0.226 2.535-0.292 3.815 0.065-1.28 0.17-2.549 0.292-3.815zM117.954 197.426c46.005-1.369 76.867 46.349 68.931 106.599-7.947 60.24-51.698 108.584-97.704 109.961-46.013 1.365-76.87-44.741-68.926-105 7.941-60.234 51.676-110.187 97.699-111.56zM512 352v42.655c0 46.94-38.391 85.345-85.329 85.345h-341.328c-46.138 0-84.006-37.116-85.282-82.963 29.181 25.693 69.662 47.158 111.437 47.158 44.652 0 178.622 0 178.622 0l-39.974-33.809h-56.634c37.565-14.402 57.578-58.062 57.578-102.861 0-37.624-20.905-69.977-50.444-92.984-28.822-22.451-34.286-31.854-34.286-50.939 0-16.289 30.873-44 47.016-55.394 47.191-33.269 62.458-64.156 62.458-115.728 0-8.214-1.021-16.415-3.033-24.48h153.871c46.937 0 85.328 38.375 85.328 85.345v266.654h-96v-95.999h-32v96h-95.999v32h95.999v96h32v-96h96zM92.943 97.032c10.807 0 20.711 0.295 30.968 0.295-13.573 13.167-24.313 29.3-24.313 49.19 0 11.804 3.782 23.168 9.067 33.26-5.391-0.385-10.895-0.497-16.563-0.497-37.178 0-68.753 12.038-92.102 31.927v-33.621l0.003-100.865c26.72 12.687 58.444 20.311 92.94 20.311zM1.71 36.371c-0.556 2.729-0.983 5.503-1.271 8.317 0.287-2.814 0.715-5.588 1.271-8.317zM227.725 3.577c-7.529 29.403-34.227 43.982-71.444 69.784-13.536 4.366-28.447 6.937-44.447 7.104-44.809 0.482-86.554-17.471-110.108-44.186 7.96-38.853 42.517-68.279 83.617-68.279h143.222c0.908 5.564 1.348 11.316 1.348 17.216 0 6.267-0.767 12.396-2.188 18.361z" />
<glyph unicode="&#xf604;" d="M426.672 480h-341.33c-46.936 0-85.342-38.407-85.342-85.344v-341.313c0-46.969 38.406-85.343 85.342-85.343l341.33 0.001c46.938 0 85.328 38.373 85.328 85.344v341.311c0 46.937-38.391 85.344-85.328 85.344zM435.296 224h-83.296v-224h-96v224h-46.263v73.282h46.263v47.593c0 64.671 27.896 103.125 103.935 103.125h87.622v-79.285h-71.565c-21.241 0.035-23.876-11.076-23.876-31.756l-0.116-39.677h96l-12.704-73.282z" />
<glyph unicode="&#xf605;" d="M368.615 34.099c6.861-6.938 6.861-18.125 0-25.063s-17.945-6.938-24.807 0l-200.448 202.419c-6.861 6.938-6.861 18.15 0 25.063l200.448 202.445c6.861 6.938 17.945 6.938 24.807 0s6.861-18.125 0-25.063l-182.784-189.901 182.784-189.901z" />
<glyph unicode="&#xf606;" d="M435.2 454.4h-56.32c-14.131 0-20.48-11.469-20.48-25.6v-435.2h102.4v435.2c0 14.131-11.443 25.6-25.6 25.6zM281.6 300.8h-56.32c-14.131 0-20.48-11.469-20.48-25.6v-281.6h102.4v281.6c0 14.131-11.443 25.6-25.6 25.6zM128 147.2h-56.32c-14.131 0-20.48-11.443-20.48-25.6v-128h102.4v128c0 14.157-11.469 25.6-25.6 25.6z" />
<glyph unicode="&#xf607;" d="M256 428.8c-70.707 0-128-57.319-128-128 0-122.214 128-281.6 128-281.6s128 159.386 128 281.6c0 70.681-57.293 128-128 128zM256 230.144c-38.169 0-69.12 30.951-69.12 69.12s30.951 69.12 69.12 69.12 69.12-30.951 69.12-69.12-30.95-69.12-69.12-69.12z" />
<glyph unicode="&#xf608;" d="M201.19 103.834l-20.736-20.582c-17.971-17.792-47.181-17.817-65.126 0-8.627 8.576-13.363 19.917-13.363 32.026s4.761 23.475 13.363 32.051l76.288 75.699c15.795 15.693 45.542 38.759 67.226 17.255 9.959-9.881 26.035-9.805 35.891 0.128 9.882 9.933 9.83 26.010-0.128 35.891-36.839 36.557-91.315 29.798-138.752-17.255l-76.288-75.699c-18.279-18.176-28.365-42.343-28.365-68.070 0-25.702 10.087-49.869 28.391-68.045 18.841-18.714 43.571-28.032 68.301-28.032s49.511 9.318 68.352 28.032l20.736 20.608c9.958 9.882 10.010 25.959 0.128 35.865-9.881 9.933-25.958 9.984-35.917 0.128zM432.409 397.85c-39.577 39.27-94.899 41.395-131.558 5.043l-25.831-25.626c-9.959-9.882-10.035-25.933-0.154-35.891 9.907-9.958 25.959-10.010 35.891-0.128l25.83 25.625c18.969 18.841 43.827 11.034 60.058-5.043 8.627-8.55 13.363-19.942 13.363-32.026 0-12.109-4.762-23.475-13.363-32.026l-81.408-80.742c-37.197-36.915-54.682-19.61-62.131-12.211-9.958 9.882-26.010 9.805-35.865-0.128-9.881-9.959-9.831-26.035 0.128-35.891 17.075-16.947 36.608-25.344 57.037-25.344 25.037 0 51.481 12.595 76.621 37.555l81.382 80.743c18.304 18.151 28.39 42.317 28.39 68.019s-10.087 49.894-28.39 68.070z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

View file

@ -0,0 +1,24 @@
/*!
* IE10 viewport hack for Surface/desktop Windows 8 bug
* Copyright 2014-2017 The Bootstrap Authors
* Copyright 2014-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
// See the Getting Started docs for more information:
// https://getbootstrap.com/getting-started/#support-ie10-width
(function () {
'use strict'
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement('style')
msViewportStyle.appendChild(
document.createTextNode(
'@-ms-viewport{width:auto!important}'
)
)
document.head.appendChild(msViewportStyle)
}
}())

2
_site/assets/js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

258
_site/assets/js/lazyload.js Normal file
View file

@ -0,0 +1,258 @@
/*! lazyload - v2.1.1 - 2018-04-01
* https://github.com/13twelve/lazyload
* Copyright (c) 2018
* License: MIT
* Author: Mike Byrne @13twelve https://github.com/13twelve
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.lazyLoad = factory();
}
}(this, function () {
var options = {
pageUpdatedEventName: 'page:updated', // how your app tells the rest of the app an update happened
elements: 'img[data-src], img[data-srcset], source[data-srcset], iframe[data-src], video[data-src], [data-lazyload]', // maybe you just want images?
rootMargin: '0px', // IntersectionObserver option
threshold: 0, // IntersectionObserver option
maxFrameCount: 10, // 60fps / 10 = 6 times a second
};
// set up
var frameLoop;
var frameCount;
var els = [];
var elsLength;
var observer;
var checkType;
/**
* Converts HTML collections to an array
* @private
* @param {Array} array to convert
* a loop will work in more browsers than the slice method
*/
function _htmlCollectionToArray(collection) {
var a = [];
var i = 0;
for (a = [], i = collection.length; i;) {
a[--i] = collection[i];
}
return a;
}
/**
* Checks if an element is in the viewport
* @private
* @param {Node} element to check.
* @returns {Boolean} true/false.
*/
function _elInViewport(el) {
el = (el.tagName === 'SOURCE') ? el.parentNode : el;
var rect = el.getBoundingClientRect();
return rect.bottom > 0 && rect.right > 0 && rect.left < (window.innerWidth || document.documentElement.clientWidth) && rect.top < (window.innerHeight || document.documentElement.clientHeight);
}
/**
* Removes data- attributes
* @private
* @param {Node} element to update
*/
function _removeDataAttrs(el) {
el.removeAttribute('data-src');
el.removeAttribute('data-srcset');
el.removeAttribute('data-lazyload');
}
/**
* On loaded, removes event listener, removes data- attributes
* @private
*/
function _loaded() {
this.removeEventListener('load', _loaded);
_removeDataAttrs(this);
}
/**
* Update an element
* @private
* @param {Node} element to update
*/
function _updateEl(el) {
var srcset = el.getAttribute('data-srcset');
var src = el.getAttribute('data-src');
var dlazyload = el.getAttribute('data-lazyload') !== null;
//
if (srcset) {
// if source set, update and try picturefill
el.setAttribute('srcset', srcset);
if (window.picturefill) {
window.picturefill({
elements: [el]
});
}
}
if (src) {
// if source set, update
el.src = src;
}
if (dlazyload) {
el.setAttribute('data-lazyloaded','');
el.removeEventListener('load', _loaded);
_removeDataAttrs(el);
}
}
/**
* The callback from the IntersectionObserver
* @private
* @entries {Nodes} elements being observed by the IntersectionObserver
*/
function _intersection(entries) {
// Disconnect if we've already loaded all of the images
if (elsLength === 0) {
observer.disconnect();
}
// Loop through the entries
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
// Are we in viewport?
if (entry.intersectionRatio > 0) {
elsLength--;
// Stop watching this and load the image
observer.unobserve(entry.target);
entry.target.addEventListener('load', _loaded, false);
_updateEl(entry.target);
}
}
}
/**
* Loops images, checks if in viewport, updates src/src-set
* @private
*/
function _setSrcs() {
var i;
// browser capability check
if (checkType === 'really-old') {
elsLength = els.length;
for (i = 0; i < elsLength; i++) {
if (els[i]) {
_updateEl(els[i]);
_removeDataAttrs(els[i]);
}
}
els = [];
} else if (checkType === 'old') {
// debounce checking
if (frameCount === options.maxFrameCount) {
// update cache of this for the loop
elsLength = els.length;
for (i = 0; i < elsLength; i++) {
// check if this array item exists, hasn't been loaded already and is in the viewport
if (els[i] && els[i].lazyloaded === undefined && _elInViewport(els[i])) {
// cache this array item
var thisEl = els[i];
// set this array item to be undefined to be cleaned up later
els[i] = undefined;
// give this element a property to stop us running twice on one thing
thisEl.lazyloaded = true;
// add an event listener to remove data- attributes on load
thisEl.addEventListener('load', _loaded, false);
// update
_updateEl(thisEl);
}
}
// clean up array
for (i = 0; i < elsLength; i++) {
if (els[i] === undefined) {
els.splice(i, 1);
}
}
// reset var to decide if to continue running
elsLength = els.length;
// will shortly be set to 0 to start counting
frameCount = -1;
}
// run again? kill if not
if (elsLength > 0) {
frameCount++;
frameLoop = window.requestAnimationFrame(_setSrcs);
}
} else if (checkType === 'new') {
observer = new IntersectionObserver(_intersection, {
rootMargin: options.rootMargin,
threshold: options.threshold,
});
elsLength = els.length;
for (i = 0; i < elsLength; i++) {
if (els[i] && els[i].lazyloaded === undefined) {
observer.observe(els[i]);
}
}
}
}
/**
* Gets the show on the road
* @private
*/
function _init() {
// kill any old loops if there are any
if (checkType === 'old') {
try {
cancelAnimationFrame(frameLoop);
} catch(err) {}
} else if (checkType === 'new') {
try {
observer.disconnect();
} catch(err) {}
}
// grab elements to lazy load
els = _htmlCollectionToArray(document.querySelectorAll(options.elements));
elsLength = els.length;
frameCount = options.maxFrameCount;
// go go go
_setSrcs();
}
/**
* GO GO GO
* @public
* @param {object} options (see readme)
*/
var lazyLoad = function(opts) {
for(var item in opts) {
if(opts.hasOwnProperty(item)) {
options[item] = opts[item];
}
}
if(!('addEventListener' in window) || !window.requestAnimationFrame || typeof document.body.getBoundingClientRect === undefined) {
checkType = 'really-old';
} else if ('IntersectionObserver' in window) {
checkType = 'new';
} else {
checkType = 'old';
}
_init();
if (options.pageUpdatedEventName) {
document.addEventListener(options.pageUpdatedEventName, _init, true);
}
};
return lazyLoad;
}));
lazyLoad();

2977
_site/assets/js/lunr.js Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,129 @@
jQuery(document).ready(function($){
//fix for stupid ie object cover
if (document.documentMode || /Edge/.test(navigator.userAgent)) {
jQuery('.featured-box-img-cover').each(function(){
var t = jQuery(this),
s = 'url(' + t.attr('src') + ')',
p = t.parent(),
d = jQuery('<div></div>');
p.append(d);
d.css({
'height' : '290',
'background-size' : 'cover',
'background-repeat' : 'no-repeat',
'background-position' : '50% 20%',
'background-image' : s
});
t.hide();
});
}
// alertbar later
$(document).scroll(function () {
var y = $(this).scrollTop();
if (y > 280) {
$('.alertbar').fadeIn();
} else {
$('.alertbar').fadeOut();
}
});
// Smooth on external page
$(function() {
setTimeout(function() {
if (location.hash) {
/* we need to scroll to the top of the window first, because the browser will always jump to the anchor first before JavaScript is ready, thanks Stack Overflow: http://stackoverflow.com/a/3659116 */
window.scrollTo(0, 0);
target = location.hash.split('#');
smoothScrollTo($('#'+target[1]));
}
}, 1);
// taken from: https://css-tricks.com/snippets/jquery/smooth-scrolling/
$('a[href*=\\#]:not([href=\\#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
smoothScrollTo($(this.hash));
return false;
}
});
function smoothScrollTo(target) {
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
}
}
});
// Hide Header on on scroll down
var didScroll;
var lastScrollTop = 0;
var delta = 5;
var navbarHeight = $('nav').outerHeight();
$(window).scroll(function(event){
didScroll = true;
});
setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
}, 250);
function hasScrolled() {
var st = $(this).scrollTop();
// Make sure they scroll more than delta
if(Math.abs(lastScrollTop - st) <= delta)
return;
// If they scrolled down and are past the navbar, add class .nav-up.
// This is necessary so you never see what is "behind" the navbar.
if (st > lastScrollTop && st > navbarHeight){
// Scroll Down
$('nav').removeClass('nav-down').addClass('nav-up');
$('.nav-up').css('top', - $('nav').outerHeight() + 'px');
} else {
// Scroll Up
if(st + $(window).height() < $(document).height()) {
$('nav').removeClass('nav-up').addClass('nav-down');
$('.nav-up, .nav-down').css('top', '0px');
}
}
lastScrollTop = st;
}
$('.site-content').css('margin-top', $('header').outerHeight() + 'px');
// spoilers
$(document).on('click', '.spoiler', function() {
$(this).removeClass('spoiler');
});
});
// deferred style loading
var loadDeferredStyles = function () {
var addStylesNode = document.getElementById("deferred-styles");
var replacement = document.createElement("div");
replacement.innerHTML = addStylesNode.textContent;
document.body.appendChild(replacement);
addStylesNode.parentElement.removeChild(addStylesNode);
};
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (raf) raf(function () {
window.setTimeout(loadDeferredStyles, 0);
});
else window.addEventListener('load', loadDeferredStyles);

318
_site/categories.html Normal file
View file

@ -0,0 +1,318 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>Categories | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Categories | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="Categories" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="What I might have failed to mention" />
<meta property="og:description" content="What I might have failed to mention" />
<link rel="canonical" href="http://localhost:4000/categories" />
<meta property="og:url" content="http://localhost:4000/categories" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Categories" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"What I might have failed to mention","headline":"Categories","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"}},"url":"http://localhost:4000/categories"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-categories">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<div class="row listrecent">
<div class="section-title col-md-12 mt-4">
<h2 id="java">Category <span class="text-capitalize">java</span></h2>
</div>
<!-- begin post -->
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
<div class="maxthumb">
<a href="/multidim-arrays/">
</a>
</div>
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="/multidim-arrays/">The quirks and performance of java arrays</a>
</h2>
<h4 class="card-text">Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?
</h4>
</div>
<div class="card-footer bg-white">
<div class="wrapfooter">
<span class="meta-footer-thumb">
<img class="author-thumb" src="https://www.gravatar.com/avatar/c50cfcd38195af19d0f092b8d7dc15bc?s=250&d=mm&r=x" alt="Sander Hautvast">
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="https://sanderhautvast.github.io">Sander Hautvast</a></span><br/>
<span class="post-date">24 Aug 2023</span>
</span>
<span class="post-read-more"><a href="/multidim-arrays/" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- end post -->
<div class="section-title col-md-12 mt-4">
<h2 id="performance">Category <span class="text-capitalize">performance</span></h2>
</div>
<!-- begin post -->
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
<div class="maxthumb">
<a href="/multidim-arrays/">
</a>
</div>
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="/multidim-arrays/">The quirks and performance of java arrays</a>
</h2>
<h4 class="card-text">Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?
</h4>
</div>
<div class="card-footer bg-white">
<div class="wrapfooter">
<span class="meta-footer-thumb">
<img class="author-thumb" src="https://www.gravatar.com/avatar/c50cfcd38195af19d0f092b8d7dc15bc?s=250&d=mm&r=x" alt="Sander Hautvast">
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="https://sanderhautvast.github.io">Sander Hautvast</a></span><br/>
<span class="post-date">24 Aug 2023</span>
</span>
<span class="post-read-more"><a href="/multidim-arrays/" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- end post -->
</div>
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

View file

@ -0,0 +1,267 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>java | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>java | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="java" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="What I might have failed to mention" />
<meta property="og:description" content="What I might have failed to mention" />
<link rel="canonical" href="http://localhost:4000/category/java/" />
<meta property="og:url" content="http://localhost:4000/category/java/" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="java" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"What I might have failed to mention","headline":"java","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"}},"url":"http://localhost:4000/category/java/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-archive">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<!-- Begin List Posts
================================================== -->
<section class="recent-posts">
<div class="section-title">
<h2>Archive of posts with <span>category 'java'</span></h2>
</div>
<div class="row listrecent">
<!-- begin post -->
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
<div class="maxthumb">
<a href="/multidim-arrays/">
</a>
</div>
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="/multidim-arrays/">The quirks and performance of java arrays</a>
</h2>
<h4 class="card-text">Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?
</h4>
</div>
<div class="card-footer bg-white">
<div class="wrapfooter">
<span class="meta-footer-thumb">
<img class="author-thumb" src="https://www.gravatar.com/avatar/c50cfcd38195af19d0f092b8d7dc15bc?s=250&d=mm&r=x" alt="Sander Hautvast">
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="https://sanderhautvast.github.io">Sander Hautvast</a></span><br/>
<span class="post-date">24 Aug 2023</span>
</span>
<span class="post-read-more"><a href="/multidim-arrays/" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- end post -->
</div>
</section>
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

View file

@ -0,0 +1,267 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>performance | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>performance | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="performance" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="What I might have failed to mention" />
<meta property="og:description" content="What I might have failed to mention" />
<link rel="canonical" href="http://localhost:4000/category/performance/" />
<meta property="og:url" content="http://localhost:4000/category/performance/" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="performance" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"What I might have failed to mention","headline":"performance","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"}},"url":"http://localhost:4000/category/performance/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-archive">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<!-- Begin List Posts
================================================== -->
<section class="recent-posts">
<div class="section-title">
<h2>Archive of posts with <span>category 'performance'</span></h2>
</div>
<div class="row listrecent">
<!-- begin post -->
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
<div class="maxthumb">
<a href="/multidim-arrays/">
</a>
</div>
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="/multidim-arrays/">The quirks and performance of java arrays</a>
</h2>
<h4 class="card-text">Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?
</h4>
</div>
<div class="card-footer bg-white">
<div class="wrapfooter">
<span class="meta-footer-thumb">
<img class="author-thumb" src="https://www.gravatar.com/avatar/c50cfcd38195af19d0f092b8d7dc15bc?s=250&d=mm&r=x" alt="Sander Hautvast">
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="https://sanderhautvast.github.io">Sander Hautvast</a></span><br/>
<span class="post-date">24 Aug 2023</span>
</span>
<span class="post-read-more"><a href="/multidim-arrays/" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- end post -->
</div>
</section>
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

7
_site/docker-compose.yml Normal file
View file

@ -0,0 +1,7 @@
jekyll:
image: jekyll/jekyll:latest
command: jekyll serve --force_polling
ports:
- 4000:4000
volumes:
- .:/srv/jekyll

BIN
_site/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

357
_site/feed.xml Normal file
View file

@ -0,0 +1,357 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Infinite Improbablity</title>
<description>What I might have failed to mention</description>
<link>http://localhost:4000/</link>
<atom:link href="http://localhost:4000/feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Thu, 24 Aug 2023 21:04:22 +0200</pubDate>
<lastBuildDate>Thu, 24 Aug 2023 21:04:22 +0200</lastBuildDate>
<generator>Jekyll v4.3.2</generator>
<item>
<title>The quirks and performance of java arrays</title>
<description>&lt;p&gt;Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?&lt;/p&gt;
&lt;p&gt;The only (active) memory I have of seeing arrays in an &lt;em&gt;actual&lt;/em&gt; codebase was in a situation where ideally youd used multiple return types (like in Python) or first-class tuples (like in rust). Please dont return multiple objects in an Object[].&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;What made you write this then?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Several reasons, one of which is a recent blog from oracle called &lt;a href=&quot;https://blogs.oracle.com/javamagazine/post/java-array-objects&quot;&gt;Inside the JVM: Arrays and how they differ from other objects&lt;/a&gt; which was disappointing because it failed to reveal any useful new information. This &lt;a href=&quot;https://blogs.oracle.com/javamagazine/post/quiz-yourself-evaluation-order-the-assignment-operator-and-array-access-in-java&quot;&gt;puzzler&lt;/a&gt; is whacky though!&lt;/p&gt;
&lt;p&gt;And, I had just written a blog post for &lt;a href=&quot;https://sanderhautvast.github.io.nl/multidim-arrays/&quot;&gt;my company site&lt;/a&gt; (in Dutch) about arrays. So I am all into them. This, by the way is the English translation of that post.&lt;/p&gt;
&lt;p&gt;A little while ago I stumbled over the &lt;em&gt;ghastlily&lt;/em&gt; poor performance of &lt;em&gt;java.lang.reflect.Array&lt;/em&gt;. That started the whole thing. See &lt;a href=&quot;https://bugs.openjdk.org/browse/JDK-8051447&quot;&gt;here&lt;/a&gt;. I wanted to create a better alternative (but I havent progressed much though).&lt;/p&gt;
&lt;p&gt;Arrays havent changed much (at all?) since java 1.0. Makes sense for backwards compatibility. And &lt;em&gt;java&lt;/em&gt; in those days was somewhat weird (&lt;em&gt;still is&lt;/em&gt;), or should I say: &lt;em&gt;C-like&lt;/em&gt;. Look at this for example:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3 ways to instantiate multi-dimensional arrays&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int[][] array = new int[3][2];&lt;/code&gt; // ok..&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int[] array[] = new int[2][2];&lt;/code&gt; // reminding of C pointer notations&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;int[][] array = new int[5][];&lt;/code&gt; // WTF?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;What does option #3 even mean?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And how can this not give an IndexOutOfBoundsException?&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[][][]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;array&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;];&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;];&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I couldnt google the answer straightaway, so I turned to &lt;a href=&quot;https://github.com/openjdk/jol&quot;&gt;Jol&lt;/a&gt; to find out more. NB. Jol does not work really well on macos (dunno about windows), so ran it in a linux vm and saw the following:
&lt;img src=&quot;/assets/images/arrays/screenshot-jol.png&quot; alt=&quot;jol&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/openjdk/jol&quot;&gt;Jol&lt;/a&gt; is a tool to investigate the memory internals of java objects. For a 2-dimensional String array youd have to do this:&lt;/p&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;java &lt;span class=&quot;nt&quot;&gt;-jar&lt;/span&gt; jol-cli.jar internals &lt;span class=&quot;s2&quot;&gt;&quot;[[Ljava.lang.String;&quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;BTW, notice the weird notation! I knew&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[[L&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;;&lt;/code&gt;. If you look at bytecode, this is all over the place. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;L&lt;/code&gt; indicates an object (as opposed to the primitives as in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;I&lt;/code&gt; for ints) and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[[&lt;/code&gt; is indeed an array of two dimensions. So those are the bytecode notations, but internally it also uses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/&lt;/code&gt; whereas here its the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.&lt;/code&gt; again. Its confusing, but it turns out this is just the way that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Class.forName&lt;/code&gt; wants it (if you need to need a Class object of that type). So theres a thing I didnt know.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then it dawned on me. The phrase &lt;em&gt;array of arrays&lt;/em&gt; means that the outer array really doesnt care about the lengths of the inner ones. The only thing the outer array knows is its own length.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/assets/images/arrays/screenshot-jol-length.png&quot; alt=&quot;jol&quot; /&gt;&lt;/p&gt;
&lt;p&gt;So &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;String[1][1]&lt;/code&gt; is in fact &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;String[1][]&lt;/code&gt;. Every element in the outer array is a 1-dimensional array, of any length! No runtime bounds checks here (C-like!). Of course once the inner array is initialized, there are checks again.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are no true multi-dimensional arrays in Java, just arrays of arrays. This is why int[][] is a subclass of Object[]. If you need a large multi-dimensional int[] in Java, it is a bit more efficient to allocate a large int[] and calculate the offset yourself. However, make sure to, if possible, navigate the int[] in such a way that 64 bytes at a time can be read. That is a lot more efficient than jumping around. &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;https://javaspecialists.teachable.com/courses/249332/lectures/3886639&quot;&gt;Heinz Kabutz&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Jumping around is not efficient because it hinders CPU caching and &lt;em&gt;prefetching&lt;/em&gt;. Random Access Memory is sloow! Its thanks to the L1/2/3 caches that processors can actually show off their speed while dealing with memory. They fetch more than needed at the time and cache it for future reads. The effect of this amplified when the CPU can also predict your &lt;em&gt;next &lt;del&gt;move&lt;/del&gt; read&lt;/em&gt;. So the way you read and write an array matters.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;But what performance gain can you actually achieve?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This question tripped me and I fell down the rabbithole of microbenchmarking. I learnt a lot more about JMH, but in the end I discarded all the measurements from my Mac M2 max and reran them on a standard Amazon linux AMI. The results were more in line with what I read elsewhere. Its also more generalisable in the sense that server applications rarely run on high-end laptop architectures. Most of the time, my laptop showed a less prominent effect of caching.&lt;/p&gt;
&lt;h4 id=&quot;benchmarking-with-jmh&quot;&gt;Benchmarking with JMH&lt;/h4&gt;
&lt;p&gt;Your friend, the JIT compiler becomes your adversary once you get into benchmarking. Initially I glowed observing a performance difference of 1342%, but that had more to do with unwanted removal of dead code, than the actual truth. Something to be very aware of.&lt;/p&gt;
&lt;p&gt;Also, testing your benchmarks makes sense. Verify you expectations of the actual functionality, to avoid the wrong conclusions about performance. Seems obvious but yeah, somebody had to point me to a mistake in my code…&lt;/p&gt;
&lt;p&gt;This is what I ended up with&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nd&quot;&gt;@Benchmark&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@BenchmarkMode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Mode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;AverageTime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nd&quot;&gt;@OutputTimeUnit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;TimeUnit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;NANOSECONDS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;classicArrayGetTDLR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ROWS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;COLS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;intArray&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;];&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;TDLR stands for Top Down (outer loop), then Left Right. This order means that the code traverses row by row, which is good, because the memory is layed out like this. LRTD on the other hand takes one column after another. This will result in cache misses most of the time.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Cnt&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Score&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Error&lt;/th&gt;
&lt;th&gt;Units&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;classic2DArrayGetLRTD&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;4184284.298&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 7651435.011&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;classic2DArrayGetTDLR&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;389369.258&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 4064.665&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;em&gt;Amazon Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Wow, 10x as fast! Exactly what &lt;a href=&quot;https://www.youtube.com/watch?v=247cXLkYt2M&quot;&gt;simondev&lt;/a&gt; found (using javascript). And what my laptop annoyingly failed to reproduce. There the difference was around a factor of 2.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Caveat:&lt;/strong&gt;
The individual numbers dont mean that much.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Another thing that Kabutz says is that it pays off to simulate multidimensional arrays using a one-dimensional one. This is easy to do. But is it useful?&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Cnt&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Score&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Error&lt;/th&gt;
&lt;th&gt;Units&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;seqMultArrayGetLRTD&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;1399817.940&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 271516.298&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;seqMultArrayGetTDLR&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;392543.679&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 3671.543&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;The code for this benchmark (see github in the link at the bottom) allows any dimensions. Surely we can do a little better with a specialised version for just two.&lt;/p&gt;
&lt;p&gt;Like this:&lt;/p&gt;
&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;row&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cols&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;];&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;row&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;cols&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;col&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;val&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Cnt&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Score&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Error&lt;/th&gt;
&lt;th&gt;Units&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;seq2DArrayGetLRTD&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;1362950.693&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 43153.084&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;seq2DArrayGetTDLR&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;390777.378&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 11339.226&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;no difference!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;So?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ok, there is an advantage in calculating your own indexes, BUT only if you for some reason cannot benefit from caching. All TDLR scores are roughly equal. Suppose you are reading random parts of images, in that case, it helps.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What about &lt;em&gt;writes&lt;/em&gt;?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Cnt&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Score&lt;/th&gt;
&lt;th style=&quot;text-align: right&quot;&gt;Error&lt;/th&gt;
&lt;th&gt;Units&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;classic2DArraySetLRTD&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;4212263.046&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 267087.769&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;classic2DArraySetTDLR&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;1032451.067&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 35040.403&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;seq2DArraySetLRTD&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;2569007.766&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 45255.561&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;seq2DArraySetTDLR&lt;/td&gt;
&lt;td&gt;avgt&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;5&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;721699.703&lt;/td&gt;
&lt;td style=&quot;text-align: right&quot;&gt;± 22605.344&lt;/td&gt;
&lt;td&gt;ns/op&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;3 to 4 times as fast for TDLR. Here index-calculation has more of an impact. So for editing random parts of images, especially for writing, use it.&lt;/p&gt;
&lt;p&gt;&amp;gt; But of course you should do your own measurements before embarking on any specific approach.&lt;/p&gt;
&lt;h5 id=&quot;compiler-blackholes&quot;&gt;&lt;em&gt;&lt;a href=&quot;https://shipilev.net/jvm/anatomy-quarks/27-compiler-blackholes/&quot;&gt;compiler blackholes&lt;/a&gt;&lt;/em&gt;&lt;/h5&gt;
&lt;p&gt;How to avoid dead code elimination with JMH?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;add a return parameter (like in the code example above)&lt;/li&gt;
&lt;li&gt;use &lt;em&gt;compiler blackholes&lt;/em&gt; (as of jdk-17)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Not using the return parameter in a benchmark makes the JIT compiler think it can help you by removing your precious code. Adding a sensible return parameter prohibits it from being that clever.
JMH will pick up whatever is returned and drops it into a black hole, and the information is lost. This in itself has some performance overhead and when the benchmark duration is in the same range, this will interfere with your measurements. Sounds like quantum physics, doesnt it?&lt;/p&gt;
&lt;p&gt;So &lt;em&gt;Compiler blackholes&lt;/em&gt; make sure that the JMH Blackhole is optimized away, but NOT your benchmark code. This is new a JVM feature that you have to enable as follows:&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;java -Djmh.blackhole.mode=COMPILER -jar benchmark.jar&lt;/code&gt;&lt;/p&gt;
&lt;h4 id=&quot;old-school&quot;&gt;Old School?&lt;/h4&gt;
&lt;p&gt;Returning to the start of this article? Are arrays irrelevant for most developers, building boring web applications? They wont often use them, but their JVM will, as arrays are used in String, ArrayList, and HashMap, in other words, the most prevalent classes (number of instances) in any running JVM.&lt;/p&gt;
&lt;p&gt;So iterating the characters in a String or the elements in an ArrayList follows the same performance laws as those for arrays. Oh, and dont use LinkedList. Practice differs from theory here, because of CPU caching. Most of the internet is still not aware of this, judging from a recent poll on LinkedIn. This &lt;a href=&quot;https://www.youtube.com/watch?v=YQs6IC-vgmo&amp;amp;t=0s&quot;&gt;video&lt;/a&gt; with Bjarne Stroustrup explains exactly why.&lt;/p&gt;
&lt;h3 id=&quot;diy&quot;&gt;DIY&lt;/h3&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;rouge-gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;rouge-code&quot;&gt;&lt;pre&gt;git clone https://github.com/shautvast/arraybench
mvn clean package
java &lt;span class=&quot;nt&quot;&gt;-Djmh&lt;/span&gt;.blackhole.mode&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;COMPILER &lt;span class=&quot;nt&quot;&gt;-jar&lt;/span&gt; target/benchmark.jar
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: right&quot;&gt;&lt;/div&gt;
</description>
<pubDate>Thu, 24 Aug 2023 00:00:00 +0200</pubDate>
<link>http://localhost:4000/multidim-arrays/</link>
<guid isPermaLink="true">http://localhost:4000/multidim-arrays/</guid>
<category>java</category>
<category>performance</category>
</item>
</channel>
</rss>

358
_site/index.html Normal file
View file

@ -0,0 +1,358 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>blog | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>blog | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="blog" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="What I might have failed to mention" />
<meta property="og:description" content="What I might have failed to mention" />
<link rel="canonical" href="http://localhost:4000/" />
<meta property="og:url" content="http://localhost:4000/" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="blog" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","description":"What I might have failed to mention","headline":"blog","name":"Infinite Improbablity","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"}},"url":"http://localhost:4000/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-default">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item active">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<!-- Featured
================================================== -->
<section class="featured-posts">
<div class="section-title">
<h2><span>Featured</span></h2>
</div>
<div class="row">
<!-- begin post -->
<div class="col-md-6 mb-30px">
<div class="listfeaturedtag h-100">
<div class="row h-100">
<div class="col-12 col-md-12 col-lg-5 pr-lg-0">
<div class="h-100">
<div class="wrapthumbnail">
<a href="/multidim-arrays/">
<img class="featured-box-img-cover" src="/">
</a>
</div>
</div>
</div>
<div class="col-12 col-md-12 col-lg-7">
<div class="h-100 card-group">
<div class="card">
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="/multidim-arrays/">The quirks and performance of java arrays</a>
</h2>
<h4 class="card-text">Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?
</h4>
</div>
<div class="card-footer b-0 bg-white mt-auto">
<div class="wrapfooter">
<span class="meta-footer-thumb">
<img class="author-thumb" src="https://www.gravatar.com/avatar/c50cfcd38195af19d0f092b8d7dc15bc?s=250&d=mm&r=x" alt="Sander Hautvast">
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="https://sanderhautvast.github.io">Sander Hautvast</a></span><br/>
<span class="post-date">24 Aug 2023</span>
</span>
<span class="post-read-more"><a href="//multidim-arrays/" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end post -->
</div>
</section>
<!-- Posts Index
================================================== -->
<section class="recent-posts">
<div class="section-title">
<h2><span>All Stories</span></h2>
</div>
<div class="row listrecent">
<!-- begin post -->
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
<div class="maxthumb">
<a href="/multidim-arrays/">
</a>
</div>
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="/multidim-arrays/">The quirks and performance of java arrays</a>
</h2>
<h4 class="card-text">Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?
</h4>
</div>
<div class="card-footer bg-white">
<div class="wrapfooter">
<span class="meta-footer-thumb">
<img class="author-thumb" src="https://www.gravatar.com/avatar/c50cfcd38195af19d0f092b8d7dc15bc?s=250&d=mm&r=x" alt="Sander Hautvast">
</span>
<span class="author-meta">
<span class="post-name"><a target="_blank" href="https://sanderhautvast.github.io">Sander Hautvast</a></span><br/>
<span class="post-date">24 Aug 2023</span>
</span>
<span class="post-read-more"><a href="/multidim-arrays/" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!-- end post -->
</div>
</section>
<!-- Pagination
================================================== -->
<div class="bottompagination">
<div class="pointerup"><i class="fa fa-caret-up"></i></div>
<span class="navigation" role="navigation">
</span>
</div>
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

View file

@ -0,0 +1,718 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>The quirks and performance of java arrays | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>The quirks and performance of java arrays | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="The quirks and performance of java arrays" />
<meta name="author" content="sander.hautvast" />
<meta property="og:locale" content="en" />
<meta name="description" content="Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?" />
<meta property="og:description" content="Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?" />
<link rel="canonical" href="http://localhost:4000/multidim-arrays/" />
<meta property="og:url" content="http://localhost:4000/multidim-arrays/" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2023-08-24T00:00:00+02:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="The quirks and performance of java arrays" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"sander.hautvast"},"dateModified":"2023-08-24T00:00:00+02:00","datePublished":"2023-08-24T00:00:00+02:00","description":"Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?","headline":"The quirks and performance of java arrays","mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:4000/multidim-arrays/"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"},"name":"sander.hautvast"},"url":"http://localhost:4000/multidim-arrays/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-post">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<!-- Begin Article
================================================== -->
<div class="container">
<div class="row">
<!-- Post Share -->
<div class="col-md-2 pl-0">
<div class="share sticky-top sticky-top-offset">
<p>
Share
</p>
<ul>
<li class="ml-1 mr-1">
<a target="_blank" href="https://twitter.com/intent/tweet?text=The quirks and performance of java arrays&url=http://localhost:4000/multidim-arrays/" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fab fa-twitter"></i>
</a>
</li>
<li class="ml-1 mr-1">
<a target="_blank" href="https://facebook.com/sharer.php?u=http://localhost:4000/multidim-arrays/" onclick="window.open(this.href, 'facebook-share', 'width=550,height=435');return false;">
<i class="fab fa-facebook-f"></i>
</a>
</li>
<li class="ml-1 mr-1">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=http://localhost:4000/multidim-arrays/" onclick="window.open(this.href, 'width=550,height=435');return false;">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
</ul>
<div class="sep">
</div>
<ul>
<li>
<a class="small smoothscroll" href="#disqus_thread"></a>
</li>
</ul>
</div>
</div>
<!-- Post -->
<div class="col-md-9 flex-first flex-md-unordered">
<div class="mainheading">
<!-- Author Box -->
<div class="row post-top-meta">
<div class="col-xs-12 col-md-3 col-lg-2 text-center text-md-left mb-4 mb-md-0">
<img class="author-thumb" src="https://www.gravatar.com/avatar/c50cfcd38195af19d0f092b8d7dc15bc?s=250&d=mm&r=x" alt="Sander Hautvast">
</div>
<div class="col-xs-12 col-md-9 col-lg-10 text-center text-md-left">
<a target="_blank" class="link-dark" href="https://sanderhautvast.github.io">Sander Hautvast</a><a target="_blank" href="" class="btn follow">Follow</a>
<span class="author-description"></span>
</div>
</div>
<!-- Post Title -->
<h1 class="posttitle">The quirks and performance of java arrays</h1>
</div>
<!-- Adsense if enabled from _config.yml (change your pub id and slot) -->
<!-- End Adsense -->
<!-- Post Featured Image -->
<!-- End Featured Image -->
<!-- Post Content -->
<div class="article-post">
<!-- Toc if any -->
<!-- End Toc -->
<p>Why a blog about the performance of arrays in java? They are old-school. Does anyone really need them?</p>
<p>The only (active) memory I have of seeing arrays in an <em>actual</em> codebase was in a situation where ideally youd used multiple return types (like in Python) or first-class tuples (like in rust). Please dont return multiple objects in an Object[].</p>
<blockquote>
<p>What made you write this then?</p>
</blockquote>
<p>Several reasons, one of which is a recent blog from oracle called <a href="https://blogs.oracle.com/javamagazine/post/java-array-objects">Inside the JVM: Arrays and how they differ from other objects</a> which was disappointing because it failed to reveal any useful new information. This <a href="https://blogs.oracle.com/javamagazine/post/quiz-yourself-evaluation-order-the-assignment-operator-and-array-access-in-java">puzzler</a> is whacky though!</p>
<p>And, I had just written a blog post for <a href="https://sanderhautvast.github.io.nl/multidim-arrays/">my company site</a> (in Dutch) about arrays. So I am all into them. This, by the way is the English translation of that post.</p>
<p>A little while ago I stumbled over the <em>ghastlily</em> poor performance of <em>java.lang.reflect.Array</em>. That started the whole thing. See <a href="https://bugs.openjdk.org/browse/JDK-8051447">here</a>. I wanted to create a better alternative (but I havent progressed much though).</p>
<p>Arrays havent changed much (at all?) since java 1.0. Makes sense for backwards compatibility. And <em>java</em> in those days was somewhat weird (<em>still is</em>), or should I say: <em>C-like</em>. Look at this for example:</p>
<p><strong>3 ways to instantiate multi-dimensional arrays</strong></p>
<ol>
<li><code class="language-plaintext highlighter-rouge">int[][] array = new int[3][2];</code> // ok..</li>
<li><code class="language-plaintext highlighter-rouge">int[] array[] = new int[2][2];</code> // reminding of C pointer notations</li>
<li><code class="language-plaintext highlighter-rouge">int[][] array = new int[5][];</code> // WTF?</li>
</ol>
<blockquote>
<p>What does option #3 even mean?</p>
</blockquote>
<p>And how can this not give an IndexOutOfBoundsException?</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
</pre></td><td class="rouge-code"><pre><span class="nc">String</span><span class="o">[][][]</span> <span class="n">array</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">String</span><span class="o">[</span><span class="mi">1</span><span class="o">][</span><span class="mi">1</span><span class="o">];</span>
<span class="n">array</span><span class="o">[</span><span class="mi">0</span><span class="o">]</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">String</span><span class="o">[</span><span class="mi">2</span><span class="o">];</span>
</pre></td></tr></tbody></table></code></pre></div></div>
<p>I couldnt google the answer straightaway, so I turned to <a href="https://github.com/openjdk/jol">Jol</a> to find out more. NB. Jol does not work really well on macos (dunno about windows), so ran it in a linux vm and saw the following:
<img src="/assets/images/arrays/screenshot-jol.png" alt="jol" /></p>
<p><a href="https://github.com/openjdk/jol">Jol</a> is a tool to investigate the memory internals of java objects. For a 2-dimensional String array youd have to do this:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
</pre></td><td class="rouge-code"><pre>java <span class="nt">-jar</span> jol-cli.jar internals <span class="s2">"[[Ljava.lang.String;"</span>
</pre></td></tr></tbody></table></code></pre></div></div>
<blockquote>
<p>BTW, notice the weird notation! I knew<code class="language-plaintext highlighter-rouge">[[L</code> and <code class="language-plaintext highlighter-rouge">;</code>. If you look at bytecode, this is all over the place. <code class="language-plaintext highlighter-rouge">L</code> indicates an object (as opposed to the primitives as in <code class="language-plaintext highlighter-rouge">I</code> for ints) and <code class="language-plaintext highlighter-rouge">[[</code> is indeed an array of two dimensions. So those are the bytecode notations, but internally it also uses <code class="language-plaintext highlighter-rouge">/</code> whereas here its the <code class="language-plaintext highlighter-rouge">.</code> again. Its confusing, but it turns out this is just the way that <code class="language-plaintext highlighter-rouge">Class.forName</code> wants it (if you need to need a Class object of that type). So theres a thing I didnt know.</p>
</blockquote>
<p>Then it dawned on me. The phrase <em>array of arrays</em> means that the outer array really doesnt care about the lengths of the inner ones. The only thing the outer array knows is its own length.</p>
<p><img src="/assets/images/arrays/screenshot-jol-length.png" alt="jol" /></p>
<p>So <code class="language-plaintext highlighter-rouge">String[1][1]</code> is in fact <code class="language-plaintext highlighter-rouge">String[1][]</code>. Every element in the outer array is a 1-dimensional array, of any length! No runtime bounds checks here (C-like!). Of course once the inner array is initialized, there are checks again.</p>
<blockquote>
<p>There are no true multi-dimensional arrays in Java, just arrays of arrays. This is why int[][] is a subclass of Object[]. If you need a large multi-dimensional int[] in Java, it is a bit more efficient to allocate a large int[] and calculate the offset yourself. However, make sure to, if possible, navigate the int[] in such a way that 64 bytes at a time can be read. That is a lot more efficient than jumping around. <strong><em><a href="https://javaspecialists.teachable.com/courses/249332/lectures/3886639">Heinz Kabutz</a></em></strong></p>
</blockquote>
<p>Jumping around is not efficient because it hinders CPU caching and <em>prefetching</em>. Random Access Memory is sloow! Its thanks to the L1/2/3 caches that processors can actually show off their speed while dealing with memory. They fetch more than needed at the time and cache it for future reads. The effect of this amplified when the CPU can also predict your <em>next <del>move</del> read</em>. So the way you read and write an array matters.</p>
<blockquote>
<p><strong>But what performance gain can you actually achieve?</strong></p>
</blockquote>
<p>This question tripped me and I fell down the rabbithole of microbenchmarking. I learnt a lot more about JMH, but in the end I discarded all the measurements from my Mac M2 max and reran them on a standard Amazon linux AMI. The results were more in line with what I read elsewhere. Its also more generalisable in the sense that server applications rarely run on high-end laptop architectures. Most of the time, my laptop showed a less prominent effect of caching.</p>
<h4 id="benchmarking-with-jmh">Benchmarking with JMH</h4>
<p>Your friend, the JIT compiler becomes your adversary once you get into benchmarking. Initially I glowed observing a performance difference of 1342%, but that had more to do with unwanted removal of dead code, than the actual truth. Something to be very aware of.</p>
<p>Also, testing your benchmarks makes sense. Verify you expectations of the actual functionality, to avoid the wrong conclusions about performance. Seems obvious but yeah, somebody had to point me to a mistake in my code…</p>
<p>This is what I ended up with</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="rouge-code"><pre><span class="nd">@Benchmark</span>
<span class="nd">@BenchmarkMode</span><span class="o">(</span><span class="nc">Mode</span><span class="o">.</span><span class="na">AverageTime</span><span class="o">)</span>
<span class="nd">@OutputTimeUnit</span><span class="o">(</span><span class="nc">TimeUnit</span><span class="o">.</span><span class="na">NANOSECONDS</span><span class="o">)</span>
<span class="kd">public</span> <span class="kt">long</span> <span class="nf">classicArrayGetTDLR</span><span class="o">()</span> <span class="o">{</span>
<span class="kt">long</span> <span class="n">t</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
<span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">r</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">r</span> <span class="o">&lt;</span> <span class="no">ROWS</span><span class="o">;</span> <span class="n">r</span><span class="o">++)</span> <span class="o">{</span>
<span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">c</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span> <span class="n">c</span> <span class="o">&lt;</span> <span class="no">COLS</span><span class="o">;</span> <span class="n">c</span><span class="o">++)</span> <span class="o">{</span>
<span class="n">t</span> <span class="o">+=</span> <span class="n">intArray</span><span class="o">[</span><span class="n">r</span><span class="o">][</span><span class="n">c</span><span class="o">];</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="k">return</span> <span class="n">t</span><span class="o">;</span>
<span class="o">}</span>
</pre></td></tr></tbody></table></code></pre></div></div>
<p>TDLR stands for Top Down (outer loop), then Left Right. This order means that the code traverses row by row, which is good, because the memory is layed out like this. LRTD on the other hand takes one column after another. This will result in cache misses most of the time.</p>
<table>
<thead>
<tr>
<th>Benchmark</th>
<th>Mode</th>
<th style="text-align: right">Cnt</th>
<th style="text-align: right">Score</th>
<th style="text-align: right">Error</th>
<th>Units</th>
</tr>
</thead>
<tbody>
<tr>
<td>classic2DArrayGetLRTD</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">4184284.298</td>
<td style="text-align: right">± 7651435.011</td>
<td>ns/op</td>
</tr>
<tr>
<td>classic2DArrayGetTDLR</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">389369.258</td>
<td style="text-align: right">± 4064.665</td>
<td>ns/op</td>
</tr>
</tbody>
</table>
<p><em>Amazon Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz</em></p>
<p>Wow, 10x as fast! Exactly what <a href="https://www.youtube.com/watch?v=247cXLkYt2M">simondev</a> found (using javascript). And what my laptop annoyingly failed to reproduce. There the difference was around a factor of 2.</p>
<blockquote>
<p><strong>Caveat:</strong>
The individual numbers dont mean that much.</p>
</blockquote>
<p>Another thing that Kabutz says is that it pays off to simulate multidimensional arrays using a one-dimensional one. This is easy to do. But is it useful?</p>
<table>
<thead>
<tr>
<th>Benchmark</th>
<th>Mode</th>
<th style="text-align: right">Cnt</th>
<th style="text-align: right">Score</th>
<th style="text-align: right">Error</th>
<th>Units</th>
</tr>
</thead>
<tbody>
<tr>
<td>seqMultArrayGetLRTD</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">1399817.940</td>
<td style="text-align: right">± 271516.298</td>
<td>ns/op</td>
</tr>
<tr>
<td>seqMultArrayGetTDLR</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">392543.679</td>
<td style="text-align: right">± 3671.543</td>
<td>ns/op</td>
</tr>
</tbody>
</table>
<blockquote>
</blockquote>
<p>The code for this benchmark (see github in the link at the bottom) allows any dimensions. Surely we can do a little better with a specialised version for just two.</p>
<p>Like this:</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
</pre></td><td class="rouge-code"><pre><span class="kd">public</span> <span class="kt">int</span> <span class="nf">get</span><span class="o">(</span><span class="kt">int</span> <span class="n">row</span><span class="o">,</span> <span class="kt">int</span> <span class="n">col</span><span class="o">)</span> <span class="o">{</span>
<span class="k">return</span> <span class="n">data</span><span class="o">[</span><span class="n">row</span> <span class="o">*</span> <span class="k">this</span><span class="o">.</span><span class="na">cols</span> <span class="o">+</span> <span class="n">col</span><span class="o">];</span>
<span class="o">}</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">set</span><span class="o">(</span><span class="kt">int</span> <span class="n">row</span><span class="o">,</span> <span class="kt">int</span> <span class="n">col</span><span class="o">,</span> <span class="kt">int</span> <span class="n">val</span><span class="o">)</span> <span class="o">{</span>
<span class="n">data</span><span class="o">[</span><span class="n">row</span> <span class="o">*</span> <span class="k">this</span><span class="o">.</span><span class="na">cols</span> <span class="o">+</span> <span class="n">col</span><span class="o">]</span> <span class="o">=</span> <span class="n">val</span><span class="o">;</span>
<span class="o">}</span>
</pre></td></tr></tbody></table></code></pre></div></div>
<table>
<thead>
<tr>
<th>Benchmark</th>
<th>Mode</th>
<th style="text-align: right">Cnt</th>
<th style="text-align: right">Score</th>
<th style="text-align: right">Error</th>
<th>Units</th>
</tr>
</thead>
<tbody>
<tr>
<td>seq2DArrayGetLRTD</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">1362950.693</td>
<td style="text-align: right">± 43153.084</td>
<td>ns/op</td>
</tr>
<tr>
<td>seq2DArrayGetTDLR</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">390777.378</td>
<td style="text-align: right">± 11339.226</td>
<td>ns/op</td>
</tr>
</tbody>
</table>
<blockquote>
</blockquote>
<blockquote>
<p>no difference!</p>
</blockquote>
<p><strong>So?</strong></p>
<p>Ok, there is an advantage in calculating your own indexes, BUT only if you for some reason cannot benefit from caching. All TDLR scores are roughly equal. Suppose you are reading random parts of images, in that case, it helps.</p>
<blockquote>
<p><strong>What about <em>writes</em>?</strong></p>
</blockquote>
<table>
<thead>
<tr>
<th>Benchmark</th>
<th>Mode</th>
<th style="text-align: right">Cnt</th>
<th style="text-align: right">Score</th>
<th style="text-align: right">Error</th>
<th>Units</th>
</tr>
</thead>
<tbody>
<tr>
<td>classic2DArraySetLRTD</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">4212263.046</td>
<td style="text-align: right">± 267087.769</td>
<td>ns/op</td>
</tr>
<tr>
<td>classic2DArraySetTDLR</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">1032451.067</td>
<td style="text-align: right">± 35040.403</td>
<td>ns/op</td>
</tr>
<tr>
<td>seq2DArraySetLRTD</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">2569007.766</td>
<td style="text-align: right">± 45255.561</td>
<td>ns/op</td>
</tr>
<tr>
<td>seq2DArraySetTDLR</td>
<td>avgt</td>
<td style="text-align: right">5</td>
<td style="text-align: right">721699.703</td>
<td style="text-align: right">± 22605.344</td>
<td>ns/op</td>
</tr>
</tbody>
</table>
<blockquote>
</blockquote>
<p>3 to 4 times as fast for TDLR. Here index-calculation has more of an impact. So for editing random parts of images, especially for writing, use it.</p>
<p>&gt; But of course you should do your own measurements before embarking on any specific approach.</p>
<h5 id="compiler-blackholes"><em><a href="https://shipilev.net/jvm/anatomy-quarks/27-compiler-blackholes/">compiler blackholes</a></em></h5>
<p>How to avoid dead code elimination with JMH?</p>
<ol>
<li>add a return parameter (like in the code example above)</li>
<li>use <em>compiler blackholes</em> (as of jdk-17)</li>
</ol>
<p>Not using the return parameter in a benchmark makes the JIT compiler think it can help you by removing your precious code. Adding a sensible return parameter prohibits it from being that clever.
JMH will pick up whatever is returned and drops it into a black hole, and the information is lost. This in itself has some performance overhead and when the benchmark duration is in the same range, this will interfere with your measurements. Sounds like quantum physics, doesnt it?</p>
<p>So <em>Compiler blackholes</em> make sure that the JMH Blackhole is optimized away, but NOT your benchmark code. This is new a JVM feature that you have to enable as follows:</p>
<p><code class="language-plaintext highlighter-rouge">java -Djmh.blackhole.mode=COMPILER -jar benchmark.jar</code></p>
<h4 id="old-school">Old School?</h4>
<p>Returning to the start of this article? Are arrays irrelevant for most developers, building boring web applications? They wont often use them, but their JVM will, as arrays are used in String, ArrayList, and HashMap, in other words, the most prevalent classes (number of instances) in any running JVM.</p>
<p>So iterating the characters in a String or the elements in an ArrayList follows the same performance laws as those for arrays. Oh, and dont use LinkedList. Practice differs from theory here, because of CPU caching. Most of the internet is still not aware of this, judging from a recent poll on LinkedIn. This <a href="https://www.youtube.com/watch?v=YQs6IC-vgmo&amp;t=0s">video</a> with Bjarne Stroustrup explains exactly why.</p>
<h3 id="diy">DIY</h3>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
</pre></td><td class="rouge-code"><pre>git clone https://github.com/shautvast/arraybench
mvn clean package
java <span class="nt">-Djmh</span>.blackhole.mode<span class="o">=</span>COMPILER <span class="nt">-jar</span> target/benchmark.jar
</pre></td></tr></tbody></table></code></pre></div></div>
<div style="text-align: right"></div>
</div>
<!-- Rating -->
<!-- Post Date -->
<p>
<small>
<span class="post-date"><time class="post-date" datetime="2023-08-24">24 Aug 2023</time></span>
</small>
</p>
<!-- Post Categories -->
<div class="after-post-cats">
<ul class="tags mb-4">
<li>
<a class="smoothscroll" href="/categories#java">java</a>
</li>
<li>
<a class="smoothscroll" href="/categories#performance">performance</a>
</li>
</ul>
</div>
<!-- End Categories -->
<!-- Post Tags -->
<div class="after-post-tags">
<ul class="tags">
</ul>
</div>
<!-- End Tags -->
<!-- Prev/Next -->
<div class="row PageNavigation d-flex justify-content-between font-weight-bold">
<div class="clearfix"></div>
</div>
<!-- End Categories -->
</div>
<!-- End Post -->
</div>
</div>
<!-- End Article
================================================== -->
<!-- Begin Comments
================================================== -->
<div class="container">
<div id="comments" class="row justify-content-center mb-5">
<div class="col-md-8">
<!--<section class="disqus">-->
<!-- <div id="disqus_thread"></div>-->
<!-- <script type="text/javascript">-->
<!-- var disqus_shortname = '';-->
<!-- var disqus_developer = 0;-->
<!-- (function() {-->
<!-- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;-->
<!-- dsq.src = window.location.protocol + '//' + disqus_shortname + '.disqus.com/embed.js';-->
<!-- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);-->
<!-- })();-->
<!-- </script>-->
<!-- <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>-->
<!-- <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>-->
<!--</section>-->
</div>
</div>
</div>
<!--End Comments
================================================== -->
<!-- Review with LD-JSON, adapt it for your needs if you like, but make sure you test the generated HTML source code first:
https://search.google.com/structured-data/testing-tool/u/0/
================================================== -->
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
<script id="dsq-count-scr" src="//.disqus.com/count.js"></script>
</body>
</html>

1
_site/robots.txt Normal file
View file

@ -0,0 +1 @@
Sitemap: http://localhost:4000/sitemap.xml

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

25
_site/sitemap.xml Normal file
View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://localhost:4000/multidim-arrays/</loc>
<lastmod>2023-08-24T00:00:00+02:00</lastmod>
</url>
<url>
<loc>http://localhost:4000/about</loc>
</url>
<url>
<loc>http://localhost:4000/categories</loc>
</url>
<url>
<loc>http://localhost:4000/</loc>
</url>
<url>
<loc>http://localhost:4000/tags</loc>
</url>
<url>
<loc>http://localhost:4000/category/java/</loc>
</url>
<url>
<loc>http://localhost:4000/category/performance/</loc>
</url>
</urlset>

216
_site/tags.html Normal file
View file

@ -0,0 +1,216 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="/">
<title>Tags | Sander's Blog</title>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Tags | Infinite Improbablity</title>
<meta name="generator" content="Jekyll v4.3.2" />
<meta property="og:title" content="Tags" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="What I might have failed to mention" />
<meta property="og:description" content="What I might have failed to mention" />
<link rel="canonical" href="http://localhost:4000/tags" />
<meta property="og:url" content="http://localhost:4000/tags" />
<meta property="og:site_name" content="Infinite Improbablity" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Tags" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebPage","description":"What I might have failed to mention","headline":"Tags","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"http://localhost:4000/"}},"url":"http://localhost:4000/tags"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link href="/assets/css/screen.css" rel="stylesheet">
<link href="/assets/css/main.css" rel="stylesheet">
<script src="/assets/js/jquery.min.js"></script>
</head>
<body class="layout-tags">
<!-- defer loading of font and font awesome -->
<noscript id="deferred-styles">
<link href="https://fonts.googleapis.com/css?family=Righteous%7CMerriweather:300,300i,400,400i,700,700i" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</noscript>
<!-- Begin Menu Navigation
================================================== -->
<nav class="navbar navbar-expand-lg navbar-light bg-white fixed-top mediumnavigation nav-down">
<div class="container pr-0">
<!-- Begin Logo -->
<a class="navbar-brand" href="https://sanderhautvast.github.io/">
<img src="/" alt="Sander's Blog">
</a>
<!-- End Logo -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMediumish" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMediumish">
<!-- Begin Menu -->
<ul class="navbar-nav ml-auto">
<!-- -->
<!-- <li class="nav-item">-->
<!-- -->
<!-- <a class="nav-link" href="/index.html">Blog</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a class="nav-link" href="/about">About</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://bootstrapstarter.com/bootstrap-templates/template-mediumish-bootstrap-jekyll/"> Docs</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-wordpress/"><i class="fab fa-wordpress-simple"></i> WP Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mediumish-ghost/"><i class="fab fa-snapchat-ghost"></i> Ghost Version</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a target="_blank" class="nav-link" href="https://github.com/wowthemesnet/mediumish-theme-jekyll"><i class="fab fa-github"></i> Fork on Github</a>-->
<!-- </li>-->
<script src="/assets/js/lunr.js"></script>
<style>
.lunrsearchresult .title {color: #d9230f;}
.lunrsearchresult .url {color: silver;}
.lunrsearchresult a {display: block; color: #777;}
.lunrsearchresult a:hover, .lunrsearchresult a:focus {text-decoration: none;}
.lunrsearchresult a:hover .title {text-decoration: underline;}
</style>
<form class="bd-search" onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
<input type="text" class="form-control text-small launch-modal-search" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Type and enter..."/>
</form>
<div id="lunrsearchresults">
<ul></ul>
</div>
<script src="/assets/js/lunrsearchengine.js"></script>
</ul>
<!-- End Menu -->
</div>
</div>
</nav>
<!-- End Navigation
================================================== -->
<div class="site-content">
<div class="container">
<!-- Site Title
================================================== -->
<div class="mainheading">
<h1 class="sitetitle">
Sander's Blog
</h1>
<p class="lead">
What I might have failed to mention
</p>
</div>
<!-- Content
================================================== -->
<div class="main-content">
<div class="row listrecent">
</div>
</div>
</div>
<!-- Categories Jumbotron
================================================== -->
<div class="jumbotron fortags">
<div class="d-md-flex h-100">
<div class="col-md-4 transpdark align-self-center text-center h-100">
<div class="d-md-flex align-items-center justify-content-center h-100">
<h2 class="d-md-block align-self-center py-1 font-weight-light">Explore <span class="d-none d-md-inline"></span></h2>
</div>
</div>
<div class="col-md-8 p-5 align-self-center text-center">
<a class="mt-1 mb-1" href="/categories#java">java (1)</a>
<a class="mt-1 mb-1" href="/categories#performance">performance (1)</a>
</div>
</div>
</div>
<!-- Begin Footer
================================================== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 text-center text-lg-left">
Copyright © 2023 Sander's Blog
</div>
<div class="col-md-6 col-sm-6 text-center text-lg-right">
<a target="_blank" href="https://www.wowthemes.net/mediumish-free-jekyll-template/">Mediumish Jekyll Theme</a> by WowThemes.net
</div>
</div>
</div>
</footer>
<!-- End Footer
================================================== -->
</div> <!-- /.site-content -->
<!-- Scripts
================================================== -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="/assets/js/mediumish.js"></script>
<script src="/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

BIN
assets/.DS_Store vendored Normal file

Binary file not shown.

15
assets/css/main.scss Normal file
View file

@ -0,0 +1,15 @@
---
# Add a comment to make this file sass-y.
# Change this file for any custom CSS.
---
/* We need to add display:inline in order to align the '>>' of the 'read more' link */
.post-excerpt p {
display:inline;
}
// Import partials from `sass_dir` (defaults to `_sass`)
@import
"syntax",
"starsnonscss"
;

907
assets/css/screen.css Normal file
View file

@ -0,0 +1,907 @@
/*
Template Name: Mediumish
Copyright: Sal, WowThemes.net, https://www.wowthemes.net
License: https://www.wowthemes.net/freebies-license/
*/
@media screen and (min-width:1500px) {
html { font-size:18px; } /* Increase the font size on higher resolutions */
.container {max-width:80%;}
}
.mainheading {
padding: 1rem 0rem;
}
a {
color: #00ab6b;
transition: all 0.2s;
}
a:hover {
color: #038252;
text-decoration: none;
}
pre {
-moz-box-sizing: border-box;
box-sizing: border-box;
border: #E3EDF3 1px solid;
width: 100%;
padding: 7px;
font-family: monospace, sans-serif;
font-size: .9rem;
white-space: pre;
overflow: auto;
background: #fff;
border-radius: 0px;
line-height: 1.6;
color: #333;
margin-bottom: -rem;
}
.mediumnavigation {
background: rgba(255, 255, 255, .97);
box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .15);
transition: top 0.2s ease-in-out;
}
.main-content {
min-height: 300px;
}
.site-content {
min-height: 60vh;
padding-top: 1.5rem;
margin-top: 57px;
transition: all 0.4s;
}
section {
margin-bottom: 20px;
}
section.recent-posts {
margin-bottom: 0;
}
.section-title h2 {
border-bottom: 1px solid rgba(0, 0, 0, .125);
margin-bottom: 25px;
font-weight: 700;
font-size: 1.4rem;
margin-bottom: 27px;
}
.section-title span {
border-bottom: 1px solid rgba(0, 0, 0, .44);
display: inline-block;
padding-bottom: 20px;
margin-bottom: -1px;
}
.article-post ol,
.article-post ul {
margin-bottom: 1.5rem;
}
.article-post ol ol,
.article-post ul ul {
list-style: disc;
margin-bottom: 0rem;
}
@media (min-width:576px) {
.card-columns.listfeaturedtag {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
}
@media (min-width:992px) {
.navbar-expand-lg .navbar-nav .nav-link {
padding-right: 0.8rem;
padding-left: 0.8rem;
}
}
.listfeaturedtag {
border: 1px solid rgba(0, 0, 0, .125);
border-radius: .25rem;
transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
}
.listfeaturedtag .wrapthumbnail {
height: 290px;
flex: 0 0 auto;
height: 100%;
}
.maxthumb {
max-height: 300px;
overflow: hidden;
}
.listfeaturedtag .card,
.card-footer {
border: 0;
}
.listfeaturedtag .thumbnail {
background-size: cover;
height: 100%;
display: block;
background-position: 38% 22% !important;
background-origin: border-box !important;
border-top-left-radius: .25rem;
border-bottom-left-radius: .25rem;
}
.listfeaturedtag .card-block {
padding-left: 0;
}
.listfeaturedtag h2.card-title,
.listrecent h2.card-title {
font-size: 1.3rem;
font-weight: 700;
line-height: 1.25;
}
.listfeaturedtag h4.card-text,
.listrecent h4.card-text {
color: rgba(0, 0, 0, .44);
font-size: 0.95rem;
line-height: 1.6;
font-weight: 400;
}
.featured-box-img-cover {
object-fit: cover;
width: 100%;
height: 100%;
max-height: 100%;
}
@media (max-width:991px) {
.featured-box-img-cover {
height: auto;
width: 100%;
}
}
.wrapfooter {
font-size: .8rem;
display: flex;
align-items: center;
margin-bottom: 15px;
}
.author-thumb {
width: 40px;
height: 40px;
margin-right: 13px;
border-radius: 100%;
}
.post-top-meta {
margin-bottom: 2rem;
}
.post-top-meta .author-thumb {
width: 72px;
height: 72px;
}
.post-top-meta.authorpage .author-thumb {
margin-top: 40px;
}
.post-top-meta span {
font-size: 0.9rem;
color: rgba(0, 0, 0, .44);
display: inline-block;
}
.post-top-meta .author-description {
margin-bottom: 5px;
margin-top: 5px;
font-size: 0.95rem;
}
.toc ul {
list-style: decimal;
font-weight: 400;
}
.author-meta {
flex: 1 1 auto;
white-space: nowrap !important;
text-overflow: ellipsis !important;
overflow: hidden !important;
}
span.post-name,
span.post-date,
span.author-meta {
display: inline-block;
}
span.post-date,
span.post-read {
color: rgba(0, 0, 0, .44);
}
span.post-read-more {
align-items: center;
display: inline-block;
float: right;
margin-top: 8px;
}
span.post-read-more a {
color: rgba(0, 0, 0, .44);
}
span.post-name a,
span.post-read-more a:hover {
color: rgba(0, 0, 0, .8);
}
.dot:after {
content: "·";
margin-left: 3px;
margin-right: 3px;
}
.mediumnavigation .form-control {
font-size: 0.8rem;
border-radius: 30px;
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.09);
min-width: 180px;
}
.mediumnavigation .form-inline {
margin-left: 15px;
}
.mediumnavigation .form-inline .btn {
margin-left: -50px;
border: 0;
border-radius: 30px;
cursor: pointer;
}
.mediumnavigation .form-inline .btn:hover,
.mediumnavigation .form-inline .btn:active {
background: transparent;
color: green;
}
.mediumnavigation .navbar-brand {
font-weight: 500;
}
.mediumnavigation .dropdown-menu {
border: 1px solid rgba(0, 0, 0, 0.08);
margin: .5rem 0 0;
}
.mediumnavigation .nav-item,
.dropdown-menu {
font-size: 0.9rem;
}
.mediumnavigation .search-icon {
margin-left: -40px;
display: inline-block;
margin-top: 3px;
cursor: pointer;
}
.mediumnavigation .navbar-brand img {
max-height: 30px;
margin-right: 5px;
}
.mainheading h1.sitetitle {
font-family: Righteous;
}
.mainheading h1.posttitle {
font-weight: 700;
margin-bottom: 1rem;
}
.footer {
border-top: 1px solid rgba(0, 0, 0, .05) !important;
padding-top: 15px;
padding-bottom: 12px;
font-size: 0.8rem;
color: rgba(0, 0, 0, .44);
margin-top: 50px;
margin-bottom: 62px;
position: relative;
background: #fff;
}
.link-dark {
color: rgba(0, 0, 0, .8);
}
.article-post {
font-family: Merriweather, source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
font-size: 1.1rem;
line-height: 1.84;
color: rgba(0, 0, 0, .8);
}
blockquote {
border-left: 4px solid #00ab6b;
padding: 0 20px;
font-style: italic;
color: rgba(0, 0, 0, .5);
}
.article-post p,
.article-post blockquote {
margin: 0 0 1.5rem 0;
}
.featured-image {
display: block;
margin-bottom: 1.5rem;
}
.share {
text-align: center;
}
.share p {
margin-bottom: 10px;
font-size: 0.95rem;
}
.share ul li {
display: inline-block;
margin-bottom: 9px;
}
.share ul {
padding-left: 0;
margin-left: 0;
}
.share ul li i.fa {
border: 1px solid #ddd;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 50%;
}
.svgIcon {
vertical-align: middle;
}
.sticky-top-offset {
top: 100px;
}
@media (min-width:1024px) {
.share ul li {
display: block;
}
}
@media (max-width:999px) {
.featured-box-img-cover {
height: 359px;
}
.alertbar {
position: relative !Important;
margin-bottom: 20px;
margin-top: 20px;
box-shadow: none !Important;
padding-right: 14px !Important;
}
#comments {
margin-right: 15px;
}
.jumbotron.fortags {
margin-bottom: 0 !Important;
}
.alertbar form {
margin-top: 20px;
}
.alertbar span,
.alertbar form {
display: block;
}
.alertbar input[type="submit"] {
border-radius: 3px !Important;
}
.alertbar input[type="email"] {
margin-right: 0px !Important;
display: block;
border-right: 1px solid #ddd !Important;
margin-bottom: 10px;
}
.jumbotron {
margin-bottom: 0;
border-radius: 0;
}
.listfeaturedtag .card {
height: auto;
}
.listfeaturedtag .wrapfooter {
position: relative;
margin-top: 30px;
}
.listfeaturedtag .card-block {
padding: 20px;
}
.footer {
margin-top: 0px;
margin-bottom: 0px;
}
}
@media (max-width:1024px) {
.post-top-meta .col-md-10 {
text-align: center;
}
}
@media (max-width:767px) {
.post-top-meta.authorpage {
text-align: center;
}
}
.share,
.share a {
color: rgba(0, 0, 0, .44);
fill: rgba(0, 0, 0, .44);
}
.graybg {
background-color: #fafafa;
padding: 40px 0 46px;
position: relative;
}
.listrelated .card {
box-shadow: 0 1px 7px rgba(0, 0, 0, .05);
border: 0;
}
ul.tags {
list-style: none;
padding-left: 0;
margin: 0 0 3rem 0;
}
ul.tags li {
display: inline-block;
font-size: 0.9rem;
}
ul.tags li a {
background: rgba(0, 0, 0, .05);
color: rgba(0, 0, 0, .6);
border-radius: 3px;
padding: 5px 10px;
}
ul.tags li a:hover {
background: rgba(0, 0, 0, .07);
text-decoration: none;
}
.margtop3rem {
margin-top: 3rem;
}
.sep {
height: 1px;
width: 20px;
background: #999;
margin: 0px auto;
margin-bottom: 1.2rem;
}
.btn.follow {
border-color: #02B875;
color: #1C9963;
padding: 3px 10px;
text-align: center;
border-radius: 999em;
font-size: 0.85rem;
display: inline-block;
}
.btn.subscribe {
background-color: #1C9963;
border-color: #1C9963;
color: rgba(255, 255, 255, 1);
fill: rgba(255, 255, 255, 1);
border-radius: 30px;
font-size: 0.85rem;
margin-left: 10px;
font-weight: 600;
text-transform: uppercase;
}
.post-top-meta .btn.follow {
margin-left: 5px;
margin-top: -4px;
}
.alertbar {
box-shadow: 0 -3px 10px 0 rgba(0, 0, 0, .0785);
position: fixed;
bottom: 0;
left: 0;
background-color: #fff;
width: 100%;
padding: 14px 0;
z-index: 1;
display: none;
}
.alertbar form {
display: inline-block;
}
.alertbar input[type="email"] {
font-size: 0.85rem;
padding: 3px 5px 3px 10px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border: 1px solid #ddd;
border-right: 0;
margin-right: -10px;
height: 34px;
letter-spacing: 0.5px;
margin-left: 5px;
}
.alertbar input[type="submit"] {
background-color: #1C9963;
border: 1px solid #1C9963;
color: rgba(255, 255, 255, 1);
fill: rgba(255, 255, 255, 1);
font-size: 0.85rem;
border-radius: 0;
padding: 4px 10px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
font-weight: 600;
height: 34px;
letter-spacing: 0.5px;
cursor: pointer;
}
.form-control::-webkit-input-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control:-moz-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control::-moz-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control:-ms-input-placeholder {
color: rgba(0, 0, 0, .5);
}
.form-control::-ms-input-placeholder {
color: rgba(0, 0, 0, .5);
}
.authorpage h1 {
font-weight: 700;
font-size: 30px;
}
.post-top-meta.authorpage .author-thumb {
float: none;
}
.authorpage .author-description {
font-size: 1rem;
color: rgba(0, 0, 0, .6);
}
.post-top-meta.authorpage .btn.follow {
padding: 7px 20px;
margin-top: 10px;
margin-left: 0;
font-size: 0.9rem;
}
.graybg.authorpage {
border-top: 1px solid #f0f0f0;
}
.authorpostbox {
width: 760px;
margin: 0px auto;
margin-bottom: 1.5rem;
max-width: 100%;
}
.authorpostbox .img-thumb {
width: 100%;
}
.sociallinks {
margin: 1rem 0;
}
.sociallinks a {
background: #666;
color: #fff;
width: 22px;
height: 22px;
display: inline-block;
text-align: center;
line-height: 22px;
border-radius: 50%;
font-size: 12px;
}
#comments {
margin-top: 3rem;
margin-bottom: 1.5rem;
}
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.article-post .h1,
.article-post .h2,
.article-post .h3,
.article-post .h4,
.article-post .h5,
.article-post .h6,
.article-post h1,
.article-post h2,
.article-post h3,
.article-post h4,
.article-post h5,
.article-post h6 {
font-weight: 700;
margin-bottom: 1.5rem;
}
.article-post img.shadow {
-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
-moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
}
.layout-page .article-post {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
}
.layout-page .article-post p {
margin-bottom: 1rem;
}
img {
max-width: 100%;
}
.bottompagination span.navigation {
display: block;
font-size: 0.93rem;
padding: 15px 0 0 0;
text-align: center;
margin-bottom: 0rem;
color: #999;
border-top: 1px solid #ddd;
}
.pointerup {
margin-bottom: -17px;
margin-left: 49%;
font-size: 30px;
}
.pointerup i.fa {
color: #eaeaea;
}
.bottompagination span.navigation i {
display: inline-block;
}
span.navigation {
display: inline-block;
font-size: 0.93rem;
font-weight: 700;
text-align: center;
}
.pagination {
display: block;
}
iframe {
max-width: 100%;
}
.transpdark {
background: rgba(0, 0, 0, 0.75);
color: #fff;
}
@media (min-width:768px) {
.jumbotron.fortags {
margin-bottom: -50px;
margin-top: 3rem;
padding: 0;
height: 350px;
border-radius: 0;
/*background-image: url(../images/jumbotron.jpg);*/
background-size: cover;
}
.jumbotron.fortags .col-md-4 {
background: rgba(0, 0, 0, 0.75);
color: #fff;
}
.jumbotron.fortags .row {
margin: 0;
}
}
.jumbotron.fortags {
margin-top: 3rem;
padding: 0;
border-radius: 0;
/*background-image: url(../images/jumbotron.jpg);*/
background-size: cover;
}
.jumbotron.fortags a {
padding: 5px 10px 7px;
background: #222;
border-radius: 30px;
color: #fff;
font-weight: 500;
text-transform: lowercase;
font-size: 0.8rem;
display: inline-block;
}
.layout-page .jumbotron.fortags {
display: none;
}
.mb-30px {
margin-bottom: 30px;
}
.flex-first {
-webkit-box-ordinal-group: 0;
-webkit-order: -1;
-ms-flex-order: -1;
order: -1;
}
@media (min-width: 768px) {
.flex-md-unordered {
-webkit-box-ordinal-group: 1;
-webkit-order: 1;
-ms-flex-order: 1;
order: 1;
}
.flex-first {
-webkit-box-ordinal-group: 0;
-webkit-order: 1;
-ms-flex-order: 1;
order: 1;
}
}
@media (max-width: 768px) {
.share {
margin-top: 30px;
}
}
.card .img-fluid {
width: 100%;
}
.sticky-top-80 {
top: 80px;
}
.spoiler {
color: transparent;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
transition: all .4s;
cursor: pointer;
position: relative;
}
.spoiler:after {
position: absolute;
opacity: 0;
content: 'Click to reveal spoiler';
top: 45%;
left: calc(50% - 100px);
text-shadow: none;
background: #222;
color: #fff;
display: inline-block;
font-size: 13px;
line-height: 1;
padding: 2px 3px;
width: 150px;
font-family: Arial;
text-align: center;
border-radius: 3px;
transition: all .4s;
}
.spoiler:hover:after {
opacity: 1;
}
/** Lazy img **/
.lazyimg {
display: block;
border: 0 none;
opacity: 1;
transition: opacity .25s;
background: #f2f2f2;
outline: 0 none;
}
.lazyimg[data-src],
.lazyimg[data-srcset] {
opacity: 0;
transition: opacity .25s;
}
table, th, td {
padding-right: 14px;
border: 1px solid rgba(0, 0, 0, .25);
font-family: Arial, Helvetica, sans-serif;
}

Binary file not shown.

View file

@ -0,0 +1,19 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="512">
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode="&#x20;" d="" horiz-adv-x="256" />
<glyph unicode="&#xf600;" d="M0 480v-102.4h307.2v102.4h-307.2zM0 275.2v-102.4h512v102.4h-512zM0 70.4v-102.4h204.8v102.4h-204.8zM307.2 70.4v-102.4h204.8v102.4h-204.8zM409.6 480v-102.4h102.4v102.4h-102.4z" />
<glyph unicode="&#xf601;" d="M421.344-32c-0.4 229.616-200.752 417.264-421.344 417.696v94.304c270.656 0 512-230.304 512-512h-90.656zM343.6-31.968h-90.608c0.304 56.384-28.336 119.488-73.664 166.736-45.072 47.632-124.96 77.648-179.104 77.36v94.272c169.040-3.648 339.936-163.312 343.376-338.368zM64.256 96.048c35.312 0 63.936-28.656 63.936-64 0-35.328-28.624-63.984-63.936-63.984s-63.936 28.656-63.936 63.984c0 35.344 28.624 64 63.936 64z" />
<glyph unicode="&#xf602;" d="M512 382.791c-18.838-8.354-39.082-14.001-60.33-16.54 21.686 13 38.343 33.585 46.186 58.115-20.298-12.039-42.778-20.78-66.705-25.49-19.16 20.415-46.461 33.17-76.673 33.17-58.011 0-105.044-47.029-105.044-105.039 0-8.233 0.929-16.25 2.72-23.939-87.3 4.382-164.701 46.2-216.509 109.753-9.042-15.514-14.223-33.558-14.223-52.809 0-36.444 18.544-68.596 46.73-87.433-17.219 0.546-33.416 5.271-47.577 13.139-0.010-0.438-0.010-0.878-0.010-1.321 0-50.894 36.209-93.348 84.261-103-8.813-2.4-18.094-3.686-27.674-3.686-6.769 0-13.349 0.66-19.764 1.886 13.368-41.73 52.16-72.103 98.126-72.948-35.95-28.175-81.243-44.967-130.458-44.967-8.479 0-16.84 0.497-25.058 1.47 46.486-29.805 101.701-47.197 161.021-47.197 193.211 0 298.868 160.062 298.868 298.872 0 4.554-0.103 9.084-0.305 13.59 20.528 14.81 38.336 33.31 52.418 54.374z" />
<glyph unicode="&#xf603;" d="M0.403 45.168c-0.122 1.266-0.226 2.535-0.292 3.815 0.065-1.28 0.17-2.549 0.292-3.815zM117.954 197.426c46.005-1.369 76.867 46.349 68.931 106.599-7.947 60.24-51.698 108.584-97.704 109.961-46.013 1.365-76.87-44.741-68.926-105 7.941-60.234 51.676-110.187 97.699-111.56zM512 352v42.655c0 46.94-38.391 85.345-85.329 85.345h-341.328c-46.138 0-84.006-37.116-85.282-82.963 29.181 25.693 69.662 47.158 111.437 47.158 44.652 0 178.622 0 178.622 0l-39.974-33.809h-56.634c37.565-14.402 57.578-58.062 57.578-102.861 0-37.624-20.905-69.977-50.444-92.984-28.822-22.451-34.286-31.854-34.286-50.939 0-16.289 30.873-44 47.016-55.394 47.191-33.269 62.458-64.156 62.458-115.728 0-8.214-1.021-16.415-3.033-24.48h153.871c46.937 0 85.328 38.375 85.328 85.345v266.654h-96v-95.999h-32v96h-95.999v32h95.999v96h32v-96h96zM92.943 97.032c10.807 0 20.711 0.295 30.968 0.295-13.573 13.167-24.313 29.3-24.313 49.19 0 11.804 3.782 23.168 9.067 33.26-5.391-0.385-10.895-0.497-16.563-0.497-37.178 0-68.753 12.038-92.102 31.927v-33.621l0.003-100.865c26.72 12.687 58.444 20.311 92.94 20.311zM1.71 36.371c-0.556 2.729-0.983 5.503-1.271 8.317 0.287-2.814 0.715-5.588 1.271-8.317zM227.725 3.577c-7.529 29.403-34.227 43.982-71.444 69.784-13.536 4.366-28.447 6.937-44.447 7.104-44.809 0.482-86.554-17.471-110.108-44.186 7.96-38.853 42.517-68.279 83.617-68.279h143.222c0.908 5.564 1.348 11.316 1.348 17.216 0 6.267-0.767 12.396-2.188 18.361z" />
<glyph unicode="&#xf604;" d="M426.672 480h-341.33c-46.936 0-85.342-38.407-85.342-85.344v-341.313c0-46.969 38.406-85.343 85.342-85.343l341.33 0.001c46.938 0 85.328 38.373 85.328 85.344v341.311c0 46.937-38.391 85.344-85.328 85.344zM435.296 224h-83.296v-224h-96v224h-46.263v73.282h46.263v47.593c0 64.671 27.896 103.125 103.935 103.125h87.622v-79.285h-71.565c-21.241 0.035-23.876-11.076-23.876-31.756l-0.116-39.677h96l-12.704-73.282z" />
<glyph unicode="&#xf605;" d="M368.615 34.099c6.861-6.938 6.861-18.125 0-25.063s-17.945-6.938-24.807 0l-200.448 202.419c-6.861 6.938-6.861 18.15 0 25.063l200.448 202.445c6.861 6.938 17.945 6.938 24.807 0s6.861-18.125 0-25.063l-182.784-189.901 182.784-189.901z" />
<glyph unicode="&#xf606;" d="M435.2 454.4h-56.32c-14.131 0-20.48-11.469-20.48-25.6v-435.2h102.4v435.2c0 14.131-11.443 25.6-25.6 25.6zM281.6 300.8h-56.32c-14.131 0-20.48-11.469-20.48-25.6v-281.6h102.4v281.6c0 14.131-11.443 25.6-25.6 25.6zM128 147.2h-56.32c-14.131 0-20.48-11.443-20.48-25.6v-128h102.4v128c0 14.157-11.469 25.6-25.6 25.6z" />
<glyph unicode="&#xf607;" d="M256 428.8c-70.707 0-128-57.319-128-128 0-122.214 128-281.6 128-281.6s128 159.386 128 281.6c0 70.681-57.293 128-128 128zM256 230.144c-38.169 0-69.12 30.951-69.12 69.12s30.951 69.12 69.12 69.12 69.12-30.951 69.12-69.12-30.95-69.12-69.12-69.12z" />
<glyph unicode="&#xf608;" d="M201.19 103.834l-20.736-20.582c-17.971-17.792-47.181-17.817-65.126 0-8.627 8.576-13.363 19.917-13.363 32.026s4.761 23.475 13.363 32.051l76.288 75.699c15.795 15.693 45.542 38.759 67.226 17.255 9.959-9.881 26.035-9.805 35.891 0.128 9.882 9.933 9.83 26.010-0.128 35.891-36.839 36.557-91.315 29.798-138.752-17.255l-76.288-75.699c-18.279-18.176-28.365-42.343-28.365-68.070 0-25.702 10.087-49.869 28.391-68.045 18.841-18.714 43.571-28.032 68.301-28.032s49.511 9.318 68.352 28.032l20.736 20.608c9.958 9.882 10.010 25.959 0.128 35.865-9.881 9.933-25.958 9.984-35.917 0.128zM432.409 397.85c-39.577 39.27-94.899 41.395-131.558 5.043l-25.831-25.626c-9.959-9.882-10.035-25.933-0.154-35.891 9.907-9.958 25.959-10.010 35.891-0.128l25.83 25.625c18.969 18.841 43.827 11.034 60.058-5.043 8.627-8.55 13.363-19.942 13.363-32.026 0-12.109-4.762-23.475-13.363-32.026l-81.408-80.742c-37.197-36.915-54.682-19.61-62.131-12.211-9.958 9.882-26.010 9.805-35.865-0.128-9.881-9.959-9.831-26.035 0.128-35.891 17.075-16.947 36.608-25.344 57.037-25.344 25.037 0 51.481 12.595 76.621 37.555l81.382 80.743c18.304 18.151 28.39 42.317 28.39 68.019s-10.087 49.894-28.39 68.070z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.2">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2023-08-21T19:24:33+02:00</updated><id>http://localhost:4000/feed.xml</id></feed>

View file

@ -0,0 +1 @@
Sitemap: http://localhost:4000/sitemap.xml

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
</urlset>

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

View file

@ -0,0 +1,24 @@
/*!
* IE10 viewport hack for Surface/desktop Windows 8 bug
* Copyright 2014-2017 The Bootstrap Authors
* Copyright 2014-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
// See the Getting Started docs for more information:
// https://getbootstrap.com/getting-started/#support-ie10-width
(function () {
'use strict'
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement('style')
msViewportStyle.appendChild(
document.createTextNode(
'@-ms-viewport{width:auto!important}'
)
)
document.head.appendChild(msViewportStyle)
}
}())

2
assets/js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

258
assets/js/lazyload.js Normal file
View file

@ -0,0 +1,258 @@
/*! lazyload - v2.1.1 - 2018-04-01
* https://github.com/13twelve/lazyload
* Copyright (c) 2018
* License: MIT
* Author: Mike Byrne @13twelve https://github.com/13twelve
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.lazyLoad = factory();
}
}(this, function () {
var options = {
pageUpdatedEventName: 'page:updated', // how your app tells the rest of the app an update happened
elements: 'img[data-src], img[data-srcset], source[data-srcset], iframe[data-src], video[data-src], [data-lazyload]', // maybe you just want images?
rootMargin: '0px', // IntersectionObserver option
threshold: 0, // IntersectionObserver option
maxFrameCount: 10, // 60fps / 10 = 6 times a second
};
// set up
var frameLoop;
var frameCount;
var els = [];
var elsLength;
var observer;
var checkType;
/**
* Converts HTML collections to an array
* @private
* @param {Array} array to convert
* a loop will work in more browsers than the slice method
*/
function _htmlCollectionToArray(collection) {
var a = [];
var i = 0;
for (a = [], i = collection.length; i;) {
a[--i] = collection[i];
}
return a;
}
/**
* Checks if an element is in the viewport
* @private
* @param {Node} element to check.
* @returns {Boolean} true/false.
*/
function _elInViewport(el) {
el = (el.tagName === 'SOURCE') ? el.parentNode : el;
var rect = el.getBoundingClientRect();
return rect.bottom > 0 && rect.right > 0 && rect.left < (window.innerWidth || document.documentElement.clientWidth) && rect.top < (window.innerHeight || document.documentElement.clientHeight);
}
/**
* Removes data- attributes
* @private
* @param {Node} element to update
*/
function _removeDataAttrs(el) {
el.removeAttribute('data-src');
el.removeAttribute('data-srcset');
el.removeAttribute('data-lazyload');
}
/**
* On loaded, removes event listener, removes data- attributes
* @private
*/
function _loaded() {
this.removeEventListener('load', _loaded);
_removeDataAttrs(this);
}
/**
* Update an element
* @private
* @param {Node} element to update
*/
function _updateEl(el) {
var srcset = el.getAttribute('data-srcset');
var src = el.getAttribute('data-src');
var dlazyload = el.getAttribute('data-lazyload') !== null;
//
if (srcset) {
// if source set, update and try picturefill
el.setAttribute('srcset', srcset);
if (window.picturefill) {
window.picturefill({
elements: [el]
});
}
}
if (src) {
// if source set, update
el.src = src;
}
if (dlazyload) {
el.setAttribute('data-lazyloaded','');
el.removeEventListener('load', _loaded);
_removeDataAttrs(el);
}
}
/**
* The callback from the IntersectionObserver
* @private
* @entries {Nodes} elements being observed by the IntersectionObserver
*/
function _intersection(entries) {
// Disconnect if we've already loaded all of the images
if (elsLength === 0) {
observer.disconnect();
}
// Loop through the entries
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
// Are we in viewport?
if (entry.intersectionRatio > 0) {
elsLength--;
// Stop watching this and load the image
observer.unobserve(entry.target);
entry.target.addEventListener('load', _loaded, false);
_updateEl(entry.target);
}
}
}
/**
* Loops images, checks if in viewport, updates src/src-set
* @private
*/
function _setSrcs() {
var i;
// browser capability check
if (checkType === 'really-old') {
elsLength = els.length;
for (i = 0; i < elsLength; i++) {
if (els[i]) {
_updateEl(els[i]);
_removeDataAttrs(els[i]);
}
}
els = [];
} else if (checkType === 'old') {
// debounce checking
if (frameCount === options.maxFrameCount) {
// update cache of this for the loop
elsLength = els.length;
for (i = 0; i < elsLength; i++) {
// check if this array item exists, hasn't been loaded already and is in the viewport
if (els[i] && els[i].lazyloaded === undefined && _elInViewport(els[i])) {
// cache this array item
var thisEl = els[i];
// set this array item to be undefined to be cleaned up later
els[i] = undefined;
// give this element a property to stop us running twice on one thing
thisEl.lazyloaded = true;
// add an event listener to remove data- attributes on load
thisEl.addEventListener('load', _loaded, false);
// update
_updateEl(thisEl);
}
}
// clean up array
for (i = 0; i < elsLength; i++) {
if (els[i] === undefined) {
els.splice(i, 1);
}
}
// reset var to decide if to continue running
elsLength = els.length;
// will shortly be set to 0 to start counting
frameCount = -1;
}
// run again? kill if not
if (elsLength > 0) {
frameCount++;
frameLoop = window.requestAnimationFrame(_setSrcs);
}
} else if (checkType === 'new') {
observer = new IntersectionObserver(_intersection, {
rootMargin: options.rootMargin,
threshold: options.threshold,
});
elsLength = els.length;
for (i = 0; i < elsLength; i++) {
if (els[i] && els[i].lazyloaded === undefined) {
observer.observe(els[i]);
}
}
}
}
/**
* Gets the show on the road
* @private
*/
function _init() {
// kill any old loops if there are any
if (checkType === 'old') {
try {
cancelAnimationFrame(frameLoop);
} catch(err) {}
} else if (checkType === 'new') {
try {
observer.disconnect();
} catch(err) {}
}
// grab elements to lazy load
els = _htmlCollectionToArray(document.querySelectorAll(options.elements));
elsLength = els.length;
frameCount = options.maxFrameCount;
// go go go
_setSrcs();
}
/**
* GO GO GO
* @public
* @param {object} options (see readme)
*/
var lazyLoad = function(opts) {
for(var item in opts) {
if(opts.hasOwnProperty(item)) {
options[item] = opts[item];
}
}
if(!('addEventListener' in window) || !window.requestAnimationFrame || typeof document.body.getBoundingClientRect === undefined) {
checkType = 'really-old';
} else if ('IntersectionObserver' in window) {
checkType = 'new';
} else {
checkType = 'old';
}
_init();
if (options.pageUpdatedEventName) {
document.addEventListener(options.pageUpdatedEventName, _init, true);
}
};
return lazyLoad;
}));
lazyLoad();

2977
assets/js/lunr.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,89 @@
---
layout: null
sitemap: false
---
{% assign counter = 0 %}
var documents = [{% for page in site.pages %}{% if page.url contains '.xml' or page.url contains 'assets' or page.url contains 'category' or page.url contains 'tag' %}{% else %}{
"id": {{ counter }},
"url": "{{ site.url }}{{site.baseurl}}{{ page.url }}",
"title": "{{ page.title }}",
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}, {% endif %}{% endfor %}{% for page in site.without-plugin %}{
"id": {{ counter }},
"url": "{{ site.url }}{{site.baseurl}}{{ page.url }}",
"title": "{{ page.title }}",
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}, {% endfor %}{% for page in site.posts %}{
"id": {{ counter }},
"url": "{{ site.url }}{{site.baseurl}}{{ page.url }}",
"title": "{{ page.title }}",
"body": "{{ page.date | date: "%Y/%m/%d" }} - {{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}];
var idx = lunr(function () {
this.ref('id')
this.field('title')
this.field('body')
documents.forEach(function (doc) {
this.add(doc)
}, this)
});
function lunr_search(term) {
document.getElementById('lunrsearchresults').innerHTML = '<ul></ul>';
if(term) {
document.getElementById('lunrsearchresults').innerHTML = "<p>Search results for '" + term + "'</p>" + document.getElementById('lunrsearchresults').innerHTML;
//put results on the screen.
var results = idx.search(term);
if(results.length>0){
//console.log(idx.search(term));
//if results
for (var i = 0; i < results.length; i++) {
// more statements
var ref = results[i]['ref'];
var url = documents[ref]['url'];
var title = documents[ref]['title'];
var body = documents[ref]['body'].substring(0,160)+'...';
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "<li class='lunrsearchresult'><a href='" + url + "'><span class='title'>" + title + "</span><br /><span class='body'>"+ body +"</span><br /><span class='url'>"+ url +"</span></a></li>";
}
} else {
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = "<li class='lunrsearchresult'>No results found...</li>";
}
}
return false;
}
function lunr_search(term) {
$('#lunrsearchresults').show( 400 );
$( "body" ).addClass( "modal-open" );
document.getElementById('lunrsearchresults').innerHTML = '<div id="resultsmodal" class="modal fade show d-block" tabindex="-1" role="dialog" aria-labelledby="resultsmodal"> <div class="modal-dialog shadow-lg" role="document"> <div class="modal-content"> <div class="modal-header" id="modtit"> <button type="button" class="close" id="btnx" data-dismiss="modal" aria-label="Close"> &times; </button> </div> <div class="modal-body"> <ul class="mb-0"> </ul> </div> <div class="modal-footer"><button id="btnx" type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Close</button></div></div> </div></div>';
if(term) {
document.getElementById('modtit').innerHTML = "<h5 class='modal-title'>Search results for '" + term + "'</h5>" + document.getElementById('modtit').innerHTML;
//put results on the screen.
var results = idx.search(term);
if(results.length>0){
//console.log(idx.search(term));
//if results
for (var i = 0; i < results.length; i++) {
// more statements
var ref = results[i]['ref'];
var url = documents[ref]['url'];
var title = documents[ref]['title'];
var body = documents[ref]['body'].substring(0,160)+'...';
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "<li class='lunrsearchresult'><a href='" + url + "'><span class='title'>" + title + "</span><br /><small><span class='body'>"+ body +"</span><br /><span class='url'>"+ url +"</span></small></a></li>";
}
} else {
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = "<li class='lunrsearchresult'>Sorry, no results found. Close & try a different search!</li>";
}
}
return false;
}
$(function() {
$("#lunrsearchresults").on('click', '#btnx', function () {
$('#lunrsearchresults').hide( 5 );
$( "body" ).removeClass( "modal-open" );
});
});

129
assets/js/mediumish.js Normal file
View file

@ -0,0 +1,129 @@
jQuery(document).ready(function($){
//fix for stupid ie object cover
if (document.documentMode || /Edge/.test(navigator.userAgent)) {
jQuery('.featured-box-img-cover').each(function(){
var t = jQuery(this),
s = 'url(' + t.attr('src') + ')',
p = t.parent(),
d = jQuery('<div></div>');
p.append(d);
d.css({
'height' : '290',
'background-size' : 'cover',
'background-repeat' : 'no-repeat',
'background-position' : '50% 20%',
'background-image' : s
});
t.hide();
});
}
// alertbar later
$(document).scroll(function () {
var y = $(this).scrollTop();
if (y > 280) {
$('.alertbar').fadeIn();
} else {
$('.alertbar').fadeOut();
}
});
// Smooth on external page
$(function() {
setTimeout(function() {
if (location.hash) {
/* we need to scroll to the top of the window first, because the browser will always jump to the anchor first before JavaScript is ready, thanks Stack Overflow: http://stackoverflow.com/a/3659116 */
window.scrollTo(0, 0);
target = location.hash.split('#');
smoothScrollTo($('#'+target[1]));
}
}, 1);
// taken from: https://css-tricks.com/snippets/jquery/smooth-scrolling/
$('a[href*=\\#]:not([href=\\#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
smoothScrollTo($(this.hash));
return false;
}
});
function smoothScrollTo(target) {
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
}
}
});
// Hide Header on on scroll down
var didScroll;
var lastScrollTop = 0;
var delta = 5;
var navbarHeight = $('nav').outerHeight();
$(window).scroll(function(event){
didScroll = true;
});
setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
}, 250);
function hasScrolled() {
var st = $(this).scrollTop();
// Make sure they scroll more than delta
if(Math.abs(lastScrollTop - st) <= delta)
return;
// If they scrolled down and are past the navbar, add class .nav-up.
// This is necessary so you never see what is "behind" the navbar.
if (st > lastScrollTop && st > navbarHeight){
// Scroll Down
$('nav').removeClass('nav-down').addClass('nav-up');
$('.nav-up').css('top', - $('nav').outerHeight() + 'px');
} else {
// Scroll Up
if(st + $(window).height() < $(document).height()) {
$('nav').removeClass('nav-up').addClass('nav-down');
$('.nav-up, .nav-down').css('top', '0px');
}
}
lastScrollTop = st;
}
$('.site-content').css('margin-top', $('header').outerHeight() + 'px');
// spoilers
$(document).on('click', '.spoiler', function() {
$(this).removeClass('spoiler');
});
});
// deferred style loading
var loadDeferredStyles = function () {
var addStylesNode = document.getElementById("deferred-styles");
var replacement = document.createElement("div");
replacement.innerHTML = addStylesNode.textContent;
document.body.appendChild(replacement);
addStylesNode.parentElement.removeChild(addStylesNode);
};
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (raf) raf(function () {
window.setTimeout(loadDeferredStyles, 0);
});
else window.addEventListener('load', loadDeferredStyles);

67
changelog.md Normal file
View file

@ -0,0 +1,67 @@
# Mediumish Jekyll Theme - Change Log
## 2019-05-16, v1.0.36
- docker-composer.yml
- better responsiveness for 1920x1080 resolution
## 2019-04-02, v1.0.35
- Fixed Github pages issue with ratings under 1
- Added support for local avatars
## 2019-03-22, v1.0.34
- Deferred font awesome and google fonts
## 2019-03-22, v1.0.33
- Added image lazy load (config.yml - lazyimages: "enabled/disabled")
- Added object cover images instead of background images for home featured cards
- Removed disqus count from homepage for better performance
## 2019-03-20, v1.0.32
- Centered avatar image on smaller devices
- Removed .html endings in cats/tags
- Added Linkedin share
- Added Table of Contents (toc:true)
- Added Paragraph before TOC (beforetoc: "My short description here")
## 2019-03-20, v1.0.31
- Added adsense support (activate via _config.yml)
- Fixed share for large headers
## 2019-03-20, v1.0.30
- Added Tags support
- Removed Google + sharing, no longer needed
## 2019-03-01, v1.0.29
- Fixed Jumbotron categories link
## 2019-03-01, v1.0.28
- Added blurred text on spoilers
- Added half stars for ratings
## 2019-03-01, v1.0.27
- Reveal hidden spoilers on click
- Syntax line numbers
- Post rating stars
- Fixed category links with more than 1 word
## 2019-02-14
- Fixed Feed site title not showing
- Added 404 page
## 2019-02-10
- Fixed CSS Jumbotron categories
## 2019-02-09
- Fixed Category links are now compatible with Github pages. Archive still available for non Github pages.
- Added Search
- Added SEO
## 2018-11-08
- Fixed reponsive footer jumbotron for tags
## 2018-11-07
- Added external image support
## 2018-09-12
- Added option to disable comments in a specific post with `comments: false` in YAML front matter

7
docker-compose.yml Normal file
View file

@ -0,0 +1,7 @@
jekyll:
image: jekyll/jekyll:latest
command: jekyll serve --force_polling
ports:
- 4000:4000
volumes:
- .:/srv/jekyll

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

30
feed.xml Normal file
View file

@ -0,0 +1,30 @@
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>
</rss>

61
index.html Normal file
View file

@ -0,0 +1,61 @@
---
layout: default
title: blog
---
{% if page.url == "/" %}
<!-- Featured
================================================== -->
<section class="featured-posts">
<div class="section-title">
<h2><span>Featured</span></h2>
</div>
<div class="row">
{% for post in site.posts %}
{% if post.featured == true %}
{% include featuredbox.html %}
{% endif %}
{% endfor %}
</div>
</section>
{% endif %}
<!-- Posts Index
================================================== -->
<section class="recent-posts">
<div class="section-title">
<h2><span>All Stories</span></h2>
</div>
<div class="row listrecent">
{% for post in paginator.posts %}
{% include postbox.html %}
{% endfor %}
</div>
</section>
<!-- Pagination
================================================== -->
<div class="bottompagination">
<div class="pointerup"><i class="fa fa-caret-up"></i></div>
<span class="navigation" role="navigation">
{% include pagination.html %}
</span>
</div>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

1
site/_config.yml Normal file
View file

@ -0,0 +1 @@
host: 0.0.0.0