text:
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased](https://github.com/nlohmann/json/tree/HEAD)

[Full Changelog](https://github.com/nlohmann/json/compare/v1.1.0...HEAD)

- Unit test fails when doing a CMake out-of-tree build [\#241](https://github.com/nlohmann/json/issues/241)
- Additional integration options [\#237](https://github.com/nlohmann/json/issues/237)
- Can't use basic\_json::iterator as a base iterator for std::move\_iterator [\#233](https://github.com/nlohmann/json/issues/233)
- Provide a FAQ [\#163](https://github.com/nlohmann/json/issues/163)
- Create PULL\_REQUEST\_TEMPLATE.md [\#213](https://github.com/nlohmann/json/pull/213) ([whackashoe](https://github.com/whackashoe))
- fixed noexcept; added constexpr [\#208](https://github.com/nlohmann/json/pull/208) ([nlohmann](https://github.com/nlohmann))
- Add support for afl-fuzz testing [\#207](https://github.com/nlohmann/json/pull/207) ([mykter](https://github.com/mykter))
- Issue \#178 - Extending support to full uint64\_t/int64\_t range and unsigned type \(updated\) [\#193](https://github.com/nlohmann/json/pull/193) ([twelsby](https://github.com/twelsby))

- -Wconversion warnings [\#239](https://github.com/nlohmann/json/issues/239)
- ambiguous overload for 'push\_back' and 'operator+=' [\#235](https://github.com/nlohmann/json/issues/235)
- double values are serialized with commas as decimal points [\#228](https://github.com/nlohmann/json/issues/228)
- Move semantics with std::initializer\_list [\#225](https://github.com/nlohmann/json/issues/225)
- abort during getline in yyfill [\#223](https://github.com/nlohmann/json/issues/223)
- Wrong link in the README.md [\#217](https://github.com/nlohmann/json/issues/217)
- Small bugs in json.hpp \(get\_number\) and unit.cpp \(non-standard integer type test\) [\#199](https://github.com/nlohmann/json/issues/199)
- GCC/clang floating point parsing bug in strtod\(\) [\#195](https://github.com/nlohmann/json/issues/195)
- Bugs in miloyip/nativejson-benchmark: roundtrips [\#187](https://github.com/nlohmann/json/issues/187)
- Floating point exceptions [\#181](https://github.com/nlohmann/json/issues/181)
- In basic\_json::basic\_json\(const CompatibleArrayType& val\), the requirement of CompatibleArrayType is not strict enough. [\#174](https://github.com/nlohmann/json/issues/174)
- Implicit assignment to std::string fails [\#144](https://github.com/nlohmann/json/issues/144)
- Issue \#195 - update Travis to Trusty due to gcc/clang strtod\(\) bug [\#196](https://github.com/nlohmann/json/pull/196) ([twelsby](https://github.com/twelsby))

- Conflicting typedef of ssize\_t on Windows 32 bit when using Boost.Python [\#204](https://github.com/nlohmann/json/issues/204)
- Integer conversion to unsigned [\#178](https://github.com/nlohmann/json/issues/178)

- Out of tree builds and a few other miscellaneous CMake cleanups. [\#242](https://github.com/nlohmann/json/pull/242) ([ChrisKitching](https://github.com/ChrisKitching))
- Implement additional integration options [\#238](https://github.com/nlohmann/json/pull/238) ([robertmrk](https://github.com/robertmrk))
- make serialization locale-independent [\#232](https://github.com/nlohmann/json/pull/232) ([nlohmann](https://github.com/nlohmann))
- fixes \#223 by updating README.md [\#227](https://github.com/nlohmann/json/pull/227) ([kevin--](https://github.com/kevin--))
- Use namespace std for int64\_t and uint64\_t [\#226](https://github.com/nlohmann/json/pull/226) ([lv-zheng](https://github.com/lv-zheng))
- Added missing cerrno header to fix ERANGE compile error on android [\#222](https://github.com/nlohmann/json/pull/222) ([Teemperor](https://github.com/Teemperor))
- Corrected readme [\#218](https://github.com/nlohmann/json/pull/218) ([Annihil](https://github.com/Annihil))
- replaced ssize\_t occurrences with auto \(addresses \#204\) [\#205](https://github.com/nlohmann/json/pull/205) ([nlohmann](https://github.com/nlohmann))
- Fixed issue \#199 - Small bugs in json.hpp \(get\_number\) and unit.cpp \(non-standard integer type test\) [\#200](https://github.com/nlohmann/json/pull/200) ([twelsby](https://github.com/twelsby))
- Fix broken link [\#197](https://github.com/nlohmann/json/pull/197) ([vog](https://github.com/vog))

## [v1.1.0](https://github.com/nlohmann/json/releases/tag/v1.1.0) (2016-01-24)
[Full Changelog](https://github.com/nlohmann/json/compare/v1.0.0...v1.1.0)

- JSON performance benchmark comparision [\#177](https://github.com/nlohmann/json/issues/177)
- Since re2c is often ignored in pull requests, it may make sense to make a contributing.md file [\#175](https://github.com/nlohmann/json/issues/175)
- Add assertions [\#168](https://github.com/nlohmann/json/issues/168)
- range based for loop for objects [\#83](https://github.com/nlohmann/json/issues/83)
- Implementation of get\_ref\(\) [\#184](https://github.com/nlohmann/json/pull/184) ([dariomt](https://github.com/dariomt))

- Small error in pull \#185 [\#194](https://github.com/nlohmann/json/issues/194)
- Bugs in miloyip/nativejson-benchmark: floating-point parsing [\#186](https://github.com/nlohmann/json/issues/186)
- Cannot index by key of type static constexpr const char\* [\#171](https://github.com/nlohmann/json/issues/171)
- Fixed Issue \#171 - added two extra template overloads of operator\[\] for T\* arguments [\#189](https://github.com/nlohmann/json/pull/189) ([twelsby](https://github.com/twelsby))
- Fixed issue \#167 - removed operator ValueType\(\) condition for VS2015 [\#188](https://github.com/nlohmann/json/pull/188) ([twelsby](https://github.com/twelsby))

- Floating point equality [\#185](https://github.com/nlohmann/json/issues/185)
- Unused variables in catch [\#180](https://github.com/nlohmann/json/issues/180)
- Typo in documentation [\#179](https://github.com/nlohmann/json/issues/179)
- Android? [\#172](https://github.com/nlohmann/json/issues/172)
- MSVC 2015 build fails when attempting to compare object\_t [\#167](https://github.com/nlohmann/json/issues/167)
- Member detector is not portable [\#166](https://github.com/nlohmann/json/issues/166)
- Unnecessary const\_cast [\#162](https://github.com/nlohmann/json/issues/162)
- Consider submitting this to the Boost Library Incubator [\#66](https://github.com/nlohmann/json/issues/66)

- Fixed Issue \#186 - add strto\(f|d|ld\) overload wrappers, "-0.0" special case and FP trailing zero [\#191](https://github.com/nlohmann/json/pull/191) ([twelsby](https://github.com/twelsby))
- Issue \#185 - remove approx\(\) and use \#pragma to kill warnings [\#190](https://github.com/nlohmann/json/pull/190) ([twelsby](https://github.com/twelsby))
- Fixed some typos in CONTRIBUTING.md [\#182](https://github.com/nlohmann/json/pull/182) ([nibroc](https://github.com/nibroc))

## [v1.0.0](https://github.com/nlohmann/json/releases/tag/v1.0.0) (2015-12-27)
[Full Changelog](https://github.com/nlohmann/json/compare/v1.0.0-rc1...v1.0.0)

- add key name to exception [\#160](https://github.com/nlohmann/json/issues/160)
- prevent json.hpp from emitting compiler warnings [\#154](https://github.com/nlohmann/json/issues/154)
- json::parse\(string\) does not check utf8 bom [\#152](https://github.com/nlohmann/json/issues/152)
- unsigned 64bit values output as signed [\#151](https://github.com/nlohmann/json/issues/151)
- Wish feature: json5 [\#150](https://github.com/nlohmann/json/issues/150)
- overload of at\(\) with default value [\#133](https://github.com/nlohmann/json/issues/133)
- Memory leak in face of exceptions [\#118](https://github.com/nlohmann/json/issues/118)
- Find and Count for arrays [\#117](https://github.com/nlohmann/json/issues/117)
- dynamically constructing an arbitrarily nested object [\#114](https://github.com/nlohmann/json/issues/114)
- object field accessors [\#103](https://github.com/nlohmann/json/issues/103)
- v8pp and json [\#95](https://github.com/nlohmann/json/issues/95)
- Wishlist [\#65](https://github.com/nlohmann/json/issues/65)
- Windows/Visual Studio \(through 2013\) is unsupported [\#62](https://github.com/nlohmann/json/issues/62)

- Bug in basic\_json::operator\[\] const overload [\#135](https://github.com/nlohmann/json/issues/135)
- wrong enable\_if for const pointer \(instead of pointer-to-const\) [\#134](https://github.com/nlohmann/json/issues/134)
- Visual Studio 14 Debug assertion failed [\#125](https://github.com/nlohmann/json/issues/125)
- Compile error with g++ 4.9.3 cygwin 64-bit [\#112](https://github.com/nlohmann/json/issues/112)
- error: unterminated raw string [\#109](https://github.com/nlohmann/json/issues/109)
- \[clang-3.6.2\] string/sstream with number to json issue [\#107](https://github.com/nlohmann/json/issues/107)

- Getting member discarding qualifyer [\#159](https://github.com/nlohmann/json/issues/159)
- basic\_json::iterator::value\(\) output includes quotes while basic\_json::iterator::key\(\) doesn't [\#158](https://github.com/nlohmann/json/issues/158)
- Indexing `const basic\_json\<\>` with `const basic\_string\<char\>` [\#157](https://github.com/nlohmann/json/issues/157)
- token\_type\_name\(token\_type t\): not all control paths return a value [\#156](https://github.com/nlohmann/json/issues/156)
- Unable to compile on MSVC 2015 with SDL checking enabled: This function or variable may be unsafe. [\#149](https://github.com/nlohmann/json/issues/149)
- dump\(\)  convert strings encoded by utf-8 to shift-jis on windows 10.  [\#147](https://github.com/nlohmann/json/issues/147)
- Unable to get field names in a json object [\#145](https://github.com/nlohmann/json/issues/145)
- json.hpp:5746:32: error: 'to\_string' is not a member of 'std' [\#136](https://github.com/nlohmann/json/issues/136)
- Returning any data type [\#113](https://github.com/nlohmann/json/issues/113)
- vector\<json\> copy constructor really weird [\#108](https://github.com/nlohmann/json/issues/108)
- maintaining order of keys during iteration [\#106](https://github.com/nlohmann/json/issues/106)

- Replace sprintf with hex function, this fixes \#149 [\#153](https://github.com/nlohmann/json/pull/153) ([whackashoe](https://github.com/whackashoe))
- Fix character skipping after a surrogate pair [\#146](https://github.com/nlohmann/json/pull/146) ([robertmrk](https://github.com/robertmrk))
- Detect correctly pointer-to-const [\#137](https://github.com/nlohmann/json/pull/137) ([dariomt](https://github.com/dariomt))
- disabled "CopyAssignable" test for MSVC in Debug mode, see \#125 [\#131](https://github.com/nlohmann/json/pull/131) ([dariomt](https://github.com/dariomt))
- removed stream operator for iterator, resolution for \#125 [\#130](https://github.com/nlohmann/json/pull/130) ([dariomt](https://github.com/dariomt))
- fixed typos in comments for examples [\#129](https://github.com/nlohmann/json/pull/129) ([dariomt](https://github.com/dariomt))
- Remove superfluous inefficiency [\#126](https://github.com/nlohmann/json/pull/126) ([d-frey](https://github.com/d-frey))
- remove invalid parameter '-stdlib=libc++' in CMakeLists.txt [\#124](https://github.com/nlohmann/json/pull/124) ([emvivre](https://github.com/emvivre))
- exception-safe object creation, fixes \#118 [\#122](https://github.com/nlohmann/json/pull/122) ([d-frey](https://github.com/d-frey))
- Fix small oversight. [\#121](https://github.com/nlohmann/json/pull/121) ([ColinH](https://github.com/ColinH))
- Overload parse\(\) to accept an rvalue reference [\#120](https://github.com/nlohmann/json/pull/120) ([silverweed](https://github.com/silverweed))
- Use the right variable name in doc string [\#115](https://github.com/nlohmann/json/pull/115) ([whoshuu](https://github.com/whoshuu))

## [v1.0.0-rc1](https://github.com/nlohmann/json/releases/tag/v1.0.0-rc1) (2015-07-26)
- Adjust wording to JSON RFC [\#97](https://github.com/nlohmann/json/issues/97)
- access by \(const\) reference [\#91](https://github.com/nlohmann/json/issues/91)
- is\_integer and is\_float tests [\#90](https://github.com/nlohmann/json/issues/90)
- MinGW have no std::to\_string [\#80](https://github.com/nlohmann/json/issues/80)
- erase elements using iterators [\#57](https://github.com/nlohmann/json/issues/57)
- Removing item from array [\#56](https://github.com/nlohmann/json/issues/56)
- Serialize/Deserialize like PHP? [\#55](https://github.com/nlohmann/json/issues/55)
- Document erase, count, and iterators key and value [\#52](https://github.com/nlohmann/json/issues/52)
- Supported compilers [\#50](https://github.com/nlohmann/json/issues/50)
- Use non-member begin/end [\#48](https://github.com/nlohmann/json/issues/48)
- Erase key [\#47](https://github.com/nlohmann/json/issues/47)
- Key iterator [\#46](https://github.com/nlohmann/json/issues/46)
- Add count member function [\#45](https://github.com/nlohmann/json/issues/45)
- Printing attribute names [\#39](https://github.com/nlohmann/json/issues/39)
- Avoid using spaces when encoding without pretty print [\#31](https://github.com/nlohmann/json/issues/31)
- Cannot encode long numbers [\#30](https://github.com/nlohmann/json/issues/30)
- Creating an empty array [\#27](https://github.com/nlohmann/json/issues/27)
- Custom allocator support [\#25](https://github.com/nlohmann/json/issues/25)
- create a header-only version [\#16](https://github.com/nlohmann/json/issues/16)
- Add to\_string overload for indentation [\#13](https://github.com/nlohmann/json/issues/13)
- move code into namespace [\#9](https://github.com/nlohmann/json/issues/9)
- free functions for explicit objects and arrays in initializer lists [\#8](https://github.com/nlohmann/json/issues/8)
- Test case coverage [\#2](https://github.com/nlohmann/json/issues/2)
- Parse streams incrementally. [\#40](https://github.com/nlohmann/json/pull/40) ([aburgh](https://github.com/aburgh))

- Binary string causes numbers to be dumped as hex [\#101](https://github.com/nlohmann/json/issues/101)
- failed to iterator json object with reverse\_iterator [\#100](https://github.com/nlohmann/json/issues/100)
- static analysis warnings [\#94](https://github.com/nlohmann/json/issues/94)
- reverse\_iterator operator inheritance problem [\#93](https://github.com/nlohmann/json/issues/93)
- Nonstandard integer type [\#89](https://github.com/nlohmann/json/issues/89)
- lexer::get\_number return NAN [\#82](https://github.com/nlohmann/json/issues/82)
- Handle infinity and NaN cases [\#70](https://github.com/nlohmann/json/issues/70)
- errors in g++-4.8.1 [\#68](https://github.com/nlohmann/json/issues/68)
- Double quotation mark is not parsed correctly [\#60](https://github.com/nlohmann/json/issues/60)
- Do not use std::to\_string [\#51](https://github.com/nlohmann/json/issues/51)
- Confused about iterating through json objects [\#49](https://github.com/nlohmann/json/issues/49)
- Problem getting vector \(array\) of strings [\#44](https://github.com/nlohmann/json/issues/44)
- Compilation error due to assuming that private=public [\#43](https://github.com/nlohmann/json/issues/43)
- Use of deprecated implicit copy constructor [\#42](https://github.com/nlohmann/json/issues/42)
- dumping a small number\_float just outputs 0.000000 [\#37](https://github.com/nlohmann/json/issues/37)
- Avoid using spaces when encoding without pretty print [\#31](https://github.com/nlohmann/json/issues/31)
- Cannot encode long numbers [\#30](https://github.com/nlohmann/json/issues/30)
- segmentation fault when iterating over empty arrays/objects [\#28](https://github.com/nlohmann/json/issues/28)
- Improper parsing of JSON string "\\" [\#17](https://github.com/nlohmann/json/issues/17)
- Don't return "const values" [\#15](https://github.com/nlohmann/json/issues/15)
- string parser does not recognize uncompliant strings [\#12](https://github.com/nlohmann/json/issues/12)
- free functions for explicit objects and arrays in initializer lists [\#8](https://github.com/nlohmann/json/issues/8)
- Runtime error in Travis job [\#1](https://github.com/nlohmann/json/issues/1)
- Fix compilation of json\_unit with GCC 5 [\#59](https://github.com/nlohmann/json/pull/59) ([dkopecek](https://github.com/dkopecek))

- Finish documenting the public interface in Doxygen [\#102](https://github.com/nlohmann/json/issues/102)
- 'noexcept' : unknown override specifier [\#99](https://github.com/nlohmann/json/issues/99)
- Keys when iterating over objects [\#67](https://github.com/nlohmann/json/issues/67)
- Complete brief documentation [\#61](https://github.com/nlohmann/json/issues/61)
- Get coverage back to 100% [\#58](https://github.com/nlohmann/json/issues/58)
- possible double-free in find function [\#11](https://github.com/nlohmann/json/issues/11)
- UTF-8 encoding/deconding/testing [\#10](https://github.com/nlohmann/json/issues/10)
- Add unit tests [\#4](https://github.com/nlohmann/json/issues/4)
- Drop C++98 support [\#3](https://github.com/nlohmann/json/issues/3)

- Keyword 'inline' is useless when member functions are defined in headers [\#87](https://github.com/nlohmann/json/pull/87) ([ahamez](https://github.com/ahamez))
- Remove useless typename [\#86](https://github.com/nlohmann/json/pull/86) ([ahamez](https://github.com/ahamez))
- Avoid warning with Xcode's clang [\#85](https://github.com/nlohmann/json/pull/85) ([ahamez](https://github.com/ahamez))
-  Fix typos [\#73](https://github.com/nlohmann/json/pull/73) ([aqnouch](https://github.com/aqnouch))
- Replace `default\_callback` function with `nullptr` and check for null… [\#72](https://github.com/nlohmann/json/pull/72) ([aburgh](https://github.com/aburgh))
- support enum [\#71](https://github.com/nlohmann/json/pull/71) ([likebeta](https://github.com/likebeta))
- Fix performance regression introduced with the parsing callback feature. [\#69](https://github.com/nlohmann/json/pull/69) ([aburgh](https://github.com/aburgh))
- Improve the implementations of the comparission-operators [\#63](https://github.com/nlohmann/json/pull/63) ([Florianjw](https://github.com/Florianjw))
- Feature/small float serialization [\#38](https://github.com/nlohmann/json/pull/38) ([jrandall](https://github.com/jrandall))
- template version with re2c scanner [\#36](https://github.com/nlohmann/json/pull/36) ([nlohmann](https://github.com/nlohmann))
- more descriptive documentation in example [\#33](https://github.com/nlohmann/json/pull/33) ([luxe](https://github.com/luxe))
- Fix string conversion under Clang [\#26](https://github.com/nlohmann/json/pull/26) ([wancw](https://github.com/wancw))
- Fixed dumping of strings [\#24](https://github.com/nlohmann/json/pull/24) ([Teemperor](https://github.com/Teemperor))
- Added a remark to the readme that coverage is GCC only for now [\#23](https://github.com/nlohmann/json/pull/23) ([Teemperor](https://github.com/Teemperor))
- Unicode escaping [\#22](https://github.com/nlohmann/json/pull/22) ([Teemperor](https://github.com/Teemperor))
- Implemented the JSON spec for string parsing for everything but the \uXXXX escaping [\#21](https://github.com/nlohmann/json/pull/21) ([Teemperor](https://github.com/Teemperor))
- add the std iterator typedefs to iterator and const\_iterator [\#19](https://github.com/nlohmann/json/pull/19) ([kirkshoop](https://github.com/kirkshoop))
- Fixed escaped quotes [\#18](https://github.com/nlohmann/json/pull/18) ([Teemperor](https://github.com/Teemperor))
- Fix double delete on std::bad\_alloc exception [\#14](https://github.com/nlohmann/json/pull/14) ([elliotgoodrich](https://github.com/elliotgoodrich))
- Added CMake and lcov [\#6](https://github.com/nlohmann/json/pull/6) ([Teemperor](https://github.com/Teemperor))
- Version 2.0 [\#5](https://github.com/nlohmann/json/pull/5) ([nlohmann](https://github.com/nlohmann))

\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*


text:
namespace image_decoder {

namespace {

void OnConnectionLost(std::unique_ptr<service_manager::ServiceContextRef> ref) {
  // No-op. This merely takes ownership of |ref| so it can be destroyed when
  // this function is invoked.
}

void OnImageDecoderRequest(
    service_manager::ServiceContextRefFactory* ref_factory,
    mojom::ImageDecoderRequest request) {
  mojo::MakeStrongBinding(
      base::MakeUnique<ImageDecoderImpl>(ref_factory->CreateRef()),
      std::move(request));
}

}  // namespace

ImageDecoderService::ImageDecoderService() : weak_factory_(this) {}

ImageDecoderService::~ImageDecoderService() = default;

// static
std::unique_ptr<service_manager::Service> ImageDecoderService::Create() {
  return base::MakeUnique<ImageDecoderService>();
}

void ImageDecoderService::OnStart() {
  ref_factory_.reset(new service_manager::ServiceContextRefFactory(
      base::Bind(&ImageDecoderService::MaybeRequestQuitDelayed,
                 base::Unretained(this))));
}

bool ImageDecoderService::OnConnect(
    const service_manager::ServiceInfo& remote_info,
    service_manager::InterfaceRegistry* registry) {
  // Add a reference to the service and tie it to the lifetime of the
  // InterfaceRegistry's connection.
  std::unique_ptr<service_manager::ServiceContextRef> connection_ref =
      ref_factory_->CreateRef();
  registry->AddConnectionLostClosure(
      base::Bind(&OnConnectionLost, base::Passed(&connection_ref)));
  registry->AddInterface(
      base::Bind(&OnImageDecoderRequest, ref_factory_.get()));
  return true;
}

bool ImageDecoderService::OnStop() {
  return true;
}

void ImageDecoderService::MaybeRequestQuitDelayed() {
  base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
      FROM_HERE,
      base::Bind(&ImageDecoderService::MaybeRequestQuit,
                 weak_factory_.GetWeakPtr()),
      base::TimeDelta::FromSeconds(5));
}

void ImageDecoderService::MaybeRequestQuit() {
  DCHECK(ref_factory_);
  if (ref_factory_->HasNoRefs())
    context()->RequestQuit();
}

}  // namespace image_decoder

redpajama_set_name: RedPajamaGithub


text:
export declare function ensureBeginsWith(str: string | undefined | null, prefix: string): string;
export declare function stripPrefix(str: string, prefix: string): string;


text:
from django.contrib import admin
from django.db.models import Count

from premises.models import Contention, Premise, Comment, Report, Channel

class ReportAdmin(admin.ModelAdmin):
    list_display = ('reporter', 'premise', 'contention')

class ContentionAdmin(admin.ModelAdmin):
    list_display = ('title', 'channel', 'is_featured',
    				'is_published', 'premise_count')
    list_editable = ('channel', 'is_featured', )
    search_fields = ('title', )
    list_per_page = 10

    def premise_count(self, obj):
    	return obj.premises.count()

class PremiseAdmin(admin.ModelAdmin):
    list_display = ('text', 'argument', 'is_deleted')
    list_filter = ('is_deleted',)

    def get_queryset(self, request):
        return Premise.objects.all_with_deleted()

admin.site.register(Report, ReportAdmin)
admin.site.register(Contention, ContentionAdmin)
admin.site.register(Premise, PremiseAdmin)
admin.site.register(Comment)
admin.site.register(Channel)


text:
package carbon.widget;

import android.content.Context;
import android.content.res.ColorStateList;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import carbon.R;

/**
 * Created by Marcin on 2015-06-11.
 */
public class Spinner extends EditText {
    PopupMenu popupMenu;

    public Spinner(Context context) {
        this(context, null);
    }

    public Spinner(Context context, AttributeSet attrs) {
        this(context, attrs, R.attr.carbon_spinnerStyle);
    }

    public Spinner(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);

        popupMenu = new PopupMenu(context);
        defaultAdapter = new Adapter();
        popupMenu.setAdapter(defaultAdapter);
        popupMenu.setTint(getTint());

        setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                popupMenu.setWidth((int) (getWidth() + getResources().getDimension(R.dimen.carbon_padding) * 2));
                popupMenu.show(Spinner.this);
            }
        });
    }

    public void setAdapter(final RecyclerView.Adapter adapter) {
        if (adapter == null) {
            popupMenu.setAdapter(defaultAdapter);
            defaultAdapter.setOnItemClickedListener(onItemClickedListener);
        } else {
            popupMenu.setAdapter(adapter);
            adapter.setOnItemClickedListener(onItemClickedListener);
        }
    }

    public RecyclerView.Adapter getAdapter() {
        return popupMenu.getAdapter();
    }

    RecyclerView.OnItemClickedListener onItemClickedListener = new RecyclerView.OnItemClickedListener() {
        @Override
        public void onItemClicked(int position) {
            setText(popupMenu.getAdapter().getItem(position).toString());
            popupMenu.dismiss();
        }
    };

    Adapter defaultAdapter;

    public void setItems(String[] items) {
        popupMenu.setAdapter(defaultAdapter);
        defaultAdapter.setOnItemClickedListener(onItemClickedListener);
        defaultAdapter.setItems(items);
    }

    public static class Adapter extends RecyclerView.Adapter<ViewHolder, String> {

        private String[] items = new String[0];

        @Override
        public String getItem(int position) {
            return items[position];
        }

        @Override
        public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            LayoutInflater inflater = LayoutInflater.from(parent.getContext());
            View view = inflater.inflate(R.layout.carbon_popup_row, parent, false);
            return new ViewHolder(view);
        }

        @Override
        public void onBindViewHolder(ViewHolder holder, final int position) {
            super.onBindViewHolder(holder, position);
            holder.tv.setText(items[position]);
        }

        @Override
        public int getItemCount() {
            return items.length;
        }

        public void setItems(String[] items) {
            this.items = items;
            notifyDataSetChanged();
        }
    }

    public static class ViewHolder extends RecyclerView.ViewHolder {
        TextView tv;

        public ViewHolder(View itemView) {
            super(itemView);
            tv = (TextView) itemView.findViewById(R.id.carbon_itemText);
        }
    }

    // -------------------------------
    // tint
    // -------------------------------

    @Override
    public void setTint(ColorStateList list) {
        super.setTint(list);
        if (popupMenu != null)
            popupMenu.setTint(list);
    }
}


text:
#include "config.h"
#include "core/dom/TransitionEvent.h"

#include "core/dom/EventNames.h"

namespace WebCore {

TransitionEventInit::TransitionEventInit()
    : elapsedTime(0)
{
}

TransitionEvent::TransitionEvent()
    : m_elapsedTime(0)
{
    ScriptWrappable::init(this);
}

TransitionEvent::TransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
    : Event(type, true, true)
    , m_propertyName(propertyName)
    , m_elapsedTime(elapsedTime)
    , m_pseudoElement(pseudoElement)
{
    ScriptWrappable::init(this);
}

TransitionEvent::TransitionEvent(const AtomicString& type, const TransitionEventInit& initializer)
    : Event(type, initializer)
    , m_propertyName(initializer.propertyName)
    , m_elapsedTime(initializer.elapsedTime)
    , m_pseudoElement(initializer.pseudoElement)
{
    ScriptWrappable::init(this);
}

TransitionEvent::~TransitionEvent()
{
}

const String& TransitionEvent::propertyName() const
{
    return m_propertyName;
}

double TransitionEvent::elapsedTime() const
{
    return m_elapsedTime;
}

const String& TransitionEvent::pseudoElement() const
{
    return m_pseudoElement;
}

const AtomicString& TransitionEvent::interfaceName() const
{
    return eventNames().interfaceForTransitionEvent;
}

} // namespace WebCore


text:
{% extends 'base1c.html' %}

{% block title %}Edycja strony statycznej{% endblock title %}

{% block meta_desc %}Edycja strony statycznej{% endblock %}

{% block content %}

Edycja strony statycznej

Użyj "[TOC]" dla spisu treści, składnia Markdown

    {{ form() }}

{% endblock content %}


text:
package com.github.st1hy.countthemcalories.core.permissions;

import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;

import rx.Observable;

public interface RequestRationale {
    /**
     * Show rationale why app needs a permission. It may be a question to user.
     *
     * @return observable that provides user answer to the rationale. If answer is true proceed
     * with permission request.
     */
    @NonNull
    @CheckResult
    Observable<UserResponseForRationale> showRationale();

}


text:
package org.june.document;

import java.util.HashMap;
import java.util.Map;
import java.util.logging.Logger;

/**
 * @author Iroiso
 * Register and Discover {@link DocumentFactory} classes.
 */
public final class DocumentService {
    private static final Logger logger = Logger.getLogger("Universal::Document::API");
    private static Map<String, Class<? extends DocumentFactory>> types = new HashMap<>();

    /**
     * Returns a reference to the {@link Logger} used globally by this API.
     * @return
     */
    static Logger getLogger(){
        return logger;
    }

    /**
     * Register a DocumentFactory for a particular document type.
     * @param <T>
     * @param type
     * @param factory
     */
    public static  void registerDocumentFactory(String type, Class<? extends DocumentFactory> factory){
        logger.info(String.format("Registering Class: %s for Type: %s", factory.getName(), type));
        types.put(type, factory);
    }

    /**
     * Returns the {@link DocumentFactory} that is registered for this type
     * So if you needed to fetch the {@link DocumentFactory} for the Academia format
     *
     *
     *      MeDocument document = DocumentService.openDocument(new File("~/Documents/Data.me"), true);
     *      List<Course> courses = document.getCourses();
     *
     *
     *
     *
     * @param type
     * @return
     */
    public static <T  extends DocumentFactory> T  getDocumentFactory(String type){
        Class<? extends DocumentFactory> clasz = types.get(type);
        try{
            return (T) clasz.newInstance();
        }catch(InstantiationException | IllegalAccessException e){
            throw new IllegalStateException(String.format("No Registered Class for type: %s", type));
        }

    }

}


text:
#include "NrrdIO.h"

/*
** Until Teem has its own printf implementation, this will have to do;
** it is imperfect because these are not functionally identical.
*/
#if defined(WIN32) || defined(_WIN32)
#  define snprintf _snprintf
#endif

/*
******** airEnumUnknown
**
** return the value representing "unknown" in an enum
*/
int
airEnumUnknown(const airEnum *enm) {

  if (enm && enm->val) {
    return enm->val[0];
  } else {
    return 0;
  }
}

/*
** _airEnumIndex()
**
** given an enum "enm" and value "val", return the index into enm->str[]
** and enm->desc[] which correspond to that value.  To be safe, when
** given an invalid enum value, we return zero.
*/
static unsigned int
_airEnumIndex(const airEnum *enm, int val) {
  unsigned int ii, ret;

  ret = 0;
  if (enm->val) {
    for (ii=1; ii<=enm->M; ii++) {
      if (val == enm->val[ii]) {
        ret = ii;
        break;
      }
    }
  } else {
    unsigned int uval;
    uval = AIR_UINT(val);
    ret = (0 <= val && uval <= enm->M) ? uval : 0;
  }
  return ret;
}

/*
** returns non-zero if there is an error: given "val" is *not*
** a valid value of the airEnum "enm"
*/
int
airEnumValCheck(const airEnum *enm, int val) {

  return (0 == _airEnumIndex(enm, val));
}

const char *
airEnumStr(const airEnum *enm, int val) {
  unsigned int idx;

  idx = _airEnumIndex(enm, val);
  return enm->str[idx];
}

const char *
airEnumDesc(const airEnum *enm, int val) {
  unsigned int idx;

  idx = _airEnumIndex(enm, val);
  return enm->desc[idx];
}

int
airEnumVal(const airEnum *enm, const char *str) {
  char *strCpy, test[AIR_STRLEN_SMALL];
  unsigned int ii;

  if (!str) {
    return airEnumUnknown(enm);
  }

  strCpy = airStrdup(str);
  if (!enm->sense) {
    airToLower(strCpy);
  }

  if (enm->strEqv) {
    /* want strlen and not airStrlen here because the strEqv array
       should be terminated by a non-null empty string */
    for (ii=0; strlen(enm->strEqv[ii]); ii++) {
      airStrcpy(test, AIR_STRLEN_SMALL, enm->strEqv[ii]);
      if (!enm->sense) {
        airToLower(test);
      }
      if (!strcmp(test, strCpy)) {
        free(strCpy);
        return enm->valEqv[ii];
      }
    }
  } else {
    /* enm->strEqv NULL */
    for (ii=1; ii<=enm->M; ii++) {
      airStrcpy(test, AIR_STRLEN_SMALL, enm->str[ii]);
      if (!enm->sense) {
        airToLower(test);
      }
      if (!strcmp(test, strCpy)) {
        free(strCpy);
        return enm->val ? enm->val[ii] : (int)ii; /* HEY scrutinize cast */
      }
    }
  }

  /* else we never matched a string */
  free(strCpy);
  return airEnumUnknown(enm);
}

/*
******** airEnumFmtDesc()
**
** Formats a description line for one element "val" of airEnum "enm",
** and puts the result in a NEWLY ALLOCATED string which is the return
** of this function.  The formatting is done via sprintf(), as governed
** by "fmt", which should contain to "%s" conversion sequences, the
** first for the string version "val", and the second for the
** description If "canon", then the canonical string representation
** will be used (the one in enm->str[]), otherwise the shortest string
** representation will be used (which differs from the canonical one
** when there is a strEqv[]/valEqv[] pair defining a shorter string)
*/
char *
airEnumFmtDesc(const airEnum *enm, int val, int canon, const char *fmt) {
  const char *desc;
  char *buff, ident[AIR_STRLEN_SMALL];
  const char *_ident;
  int i;
  size_t len;

  if (!(enm && enm->desc && fmt)) {
    return airStrdup("(airEnumDesc: invalid args)");
  }
  if (airEnumValCheck(enm, val)) {
    val = airEnumUnknown(enm);
  }
  _ident = airEnumStr(enm, val);
  if (!canon && enm->strEqv) {
    len = airStrlen(_ident);
    for (i=0; airStrlen(enm->strEqv[i]); i++) {
      if (val != enm->valEqv[i]) {
        /* this isn't a string representing the value we care about */
        continue;
      }
      if (airStrlen(enm->strEqv[i]) < len) {
        /* this one is shorter */
        len = airStrlen(enm->strEqv[i]);
        _ident = enm->strEqv[i];
      }
    }
  }
  airStrcpy(ident, AIR_STRLEN_SMALL, _ident);
  if (!enm->sense) {
    airToLower(ident);
  }
  desc = enm->desc[_airEnumIndex(enm, val)];
  buff = AIR_CALLOC(airStrlen(fmt) + airStrlen(ident) +
                    airStrlen(desc) + 1, char);
  if (buff) {
    sprintf(buff, fmt, ident, desc);
  }
  return buff;
}

static void
_enumPrintVal(FILE *file, const airEnum *enm, int ii) {

  if (enm->desc) {
    fprintf(file, "desc: %s\n", enm->desc[ii]);
  }
  if (enm->strEqv) {
    unsigned int jj;
    fprintf(file, "eqv:"); fflush(file);
    jj = 0;
    while (airStrlen(enm->strEqv[jj])) {
      if (enm->valEqv[jj] == (enm->val
                              ? enm->val[ii]
                              : ii)) {
        fprintf(file, " \"%s\"", enm->strEqv[jj]);
      }
      jj++;
    }
    fprintf(file, "\n");
  }
}

void
airEnumPrint(FILE *file, const airEnum *enm) {
  int ii; /* this should arguable be unsigned int, but
             airEnum values were kept as "int", even after
             the great unsigned conversion */

  if (!(file && enm)) {
    return;
  }

  if (airStrlen(enm->name)) {
    fprintf(file, "airEnum \"%s\":\n", enm->name);
  } else {
    fprintf(file, "airEnum (NO NAME!):\n");
  }
  fprintf(file, "(%s case sensitive)\n", (enm->sense ? "yes, is" : "is not"));
  if (enm->val) {
    fprintf(file, "Values (%u valid) given explicitly\n", enm->M);
    fprintf(file, "--- (0) %d: \"%s\"\n", enm->val[0], enm->str[0]);
    for (ii=1; ii<=AIR_CAST(int, enm->M); ii++) {
      fprintf(file, "--- (%d) %d: \"%s\" == \"%s\"\n", ii,
              enm->val[ii], enm->str[ii],
              airEnumStr(enm, enm->val[ii]));
      _enumPrintVal(file, enm, ii);
    }
  } else {
    /* enm->val NULL */
    fprintf(file, "Values implicit; [1,%u] valid\n", enm->M);
    fprintf(file, "--- 0: \"%s\"\n", enm->str[0]);
    for (ii=1; ii<=AIR_CAST(int, enm->M); ii++) {
      fprintf(file, "--- %d: %s == %s\n", ii, enm->str[ii],
              airEnumStr(enm, ii));
      _enumPrintVal(file, enm, ii);
    }
  }
  return;
}

/* this is the end */


text:
#ifndef MSAVDECODER_H
#define MSAVDECODER_H

#include "msfilter.h"

#include <avcodec.h>

/*this is the class that implements a AVdecoder filter*/

#define MSAVDECODER_MAX_INPUTS  1 /* max output per filter*/

struct _MSAVDecoder
{
    /* the MSAVDecoder derivates from MSFilter, so the MSFilter object MUST be the first of the MSAVDecoder object
       in order to the object mechanism to work*/
    MSFilter filter;
    MSQueue *q_inputs[MSAVDECODER_MAX_INPUTS];
    MSQueue *q_outputs[MSAVDECODER_MAX_INPUTS];
	AVCodec *av_codec;  /*the AVCodec from which this MSFilter is related */
	AVCodecContext av_context;  /* the context of the AVCodec */
	gint av_opened;
	int output_pix_fmt;
	int width;
	int height;
	int skip_gob;
	unsigned char buf_compressed[100000];
	int buf_size;
	MSBuffer *obufwrap;		/* alternate buffer, when format change is needed*/
};

typedef struct _MSAVDecoder MSAVDecoder;

struct _MSAVDecoderClass
{
	/* the MSAVDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSAVDecoder class
       in order to the class mechanism to work*/
	MSFilterClass parent_class;
};

typedef struct _MSAVDecoderClass MSAVDecoderClass;

/* PUBLIC */
#define MS_AVDECODER(filter) ((MSAVDecoder*)(filter))
#define MS_AVDECODER_CLASS(klass) ((MSAVDecoderClass*)(klass))

MSFilter *ms_h263_decoder_new();
MSFilter *ms_mpeg_decoder_new();
MSFilter *ms_mpeg4_decoder_new();
MSFilter * ms_AVdecoder_new_with_codec(enum CodecID codec_id);

gint ms_AVdecoder_set_format(MSAVDecoder *dec, gchar *fmt);
void ms_AVdecoder_set_width(MSAVDecoder *av,gint w);
void ms_AVdecoder_set_height(MSAVDecoder *av,gint h);

/* FOR INTERNAL USE*/
void ms_AVdecoder_init(MSAVDecoder *r, AVCodec *codec);
void ms_AVdecoder_uninit(MSAVDecoder *enc);
void ms_AVdecoder_class_init(MSAVDecoderClass *klass);
void ms_AVdecoder_destroy( MSAVDecoder *obj);
void ms_AVdecoder_process(MSAVDecoder *r);

void ms_AVCodec_init();

#endif


text:
module Vagrant
  module Action
    module VM
      # Destroys the unused host only interfaces. This middleware cleans
      # up any created host only networks.
      class DestroyUnusedNetworkInterfaces
        def initialize(app, env)
          @app = app
        end

        def call(env)
          env[:vm].driver.delete_unused_host_only_networks

          # Continue along
          @app.call(env)
        end
      end
    end
  end
end


text:
<?php

/**
 * @file
 * Contains \Drupal\block_content\Plugin\Derivative\BlockContent.
 */

namespace Drupal\block_content\Plugin\Derivative;

use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Retrieves block plugin definitions for all custom blocks.
 */
class BlockContent extends DeriverBase implements ContainerDeriverInterface {

  /**
   * The custom block storage.
   *
   * @var \Drupal\Core\Entity\EntityStorageInterface
   */
  protected $blockContentStorage;

  /**
   * Constructs a BlockContent object.
   *
   * @param \Drupal\Core\Entity\EntityStorageInterface $block_content_storage
   *   The custom block storage.
   */
  public function __construct(EntityStorageInterface $block_content_storage) {
    $this->blockContentStorage = $block_content_storage;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, $base_plugin_id) {
    $entity_manager = $container->get('entity.manager');
    return new static(
      $entity_manager->getStorage('block_content')
    );
  }

  /**
   * {@inheritdoc}
   */
  public function getDerivativeDefinitions($base_plugin_definition) {
    $block_contents = $this->blockContentStorage->loadMultiple();
    /** @var $block_content \Drupal\block_content\Entity\BlockContent */
    foreach ($block_contents as $block_content) {
      $this->derivatives[$block_content->uuid()] = $base_plugin_definition;
      $this->derivatives[$block_content->uuid()]['admin_label'] = $block_content->label();
      $this->derivatives[$block_content->uuid()]['config_dependencies']['content'] = array(
        $block_content->getConfigDependencyName()
      );
    }
    return parent::getDerivativeDefinitions($base_plugin_definition);
  }
}


text:
namespace Alchemy.Plugins.Peek.Controllers
{
    public class PeekParameters
    {
        public string ItemUri { get; set; }
    }
}


text:
<?php
namespace Heartsentwined\CronExprParser\Exception;

use Heartsentwined\CronExprParser\ExceptionInterface;

class InvalidArgumentException
    extends \InvalidArgumentException
    implements ExceptionInterface
{
}


text:
layout: page
show_meta: false
title: "Media"
header:
   image_fullwidth: "wood_plank.jpg"
permalink: "/media/"
---

For more information on Data Carpentry, see some of our articles, podcasts and publications.

Our presentations and anything we publish is available through our Zotero group.

[Data Carpentry publications and presentations](https://www.zotero.org/groups/datacarpentry)

**Articles**

[Data Carpentry: Workshops to Increase Data Literacy for Researchers](http://ijdc.net/index.php/ijdc/article/view/10.1.135)
TK Teal, KA Cranston, H Lapp, E White, G Wilson, K Ram, A Pawlik
International Journal of Digital Curation 10 (1), 135-143

**Podcasts**

[PLOScast - Managing scientific data with Tracy Teal](http://blogs.plos.org/plospodcasts/2015/12/14/episode-3-managing-scientific-data-feat-tracy-teal/)
Good data management is so important to science, but learning how to use tools for handling data is a significant time investment. In December 2015's PLOScast, Elizabeth Seiver speaks with Tracy Teal, the Executive Director of Data Carpentry, a nonprofit organization that teaches researchers the fundamental skills for working more effectively with data. Together they talk about data management skills that can change how researchers do science and offer tips on how to make handling data easier for all.

[Podcast._init_ - Maneesha Sane on Software and Data Carpentry](http://pythonpodcast.com/maneesha-sane-software-data-carpentry.html)
The Software and Data Carpentry organizations have a mission of making it easier for scientists and data analysts in academia to replicate and review each others work. In order to achieve this goal they conduct training and workshops that teach modern best practices in software and data engineering, including version control and proper data management. In this episode we had the opportunity to speak with Maneesha Sane, the program coordinator for both organizations, so that we could learn more about how these projects are related and how they approach their mission.

**Videos**

[SciPy 2014 Lightning Talk - Introducing Data Carpentry](https://www.youtube.com/watch?v=SMyto7WHiNs) - starting at minute 13:30


text:
//
//  Created by Jesse Squires
//  http://www.jessesquires.com
//
//
//  Documentation
//  http://cocoadocs.org/docsets/JSQMessagesViewController
//
//
//  GitHub
//  https://github.com/jessesquires/JSQMessagesViewController
//
//
//  License
//  Copyright (c) 2014 Jesse Squires
//  Released under an MIT license: http://opensource.org/licenses/MIT
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/**
 *  An instance of `JSQMessagesTimestampFormatter` is a singleton object that provides an efficient means
 *  for creating attributed and non-attributed string representations of `NSDate` objects.
 *  It is intended to be used as the method by which you display timestamps in a `JSQMessagesCollectionView`.
 */
@interface JSQMessagesTimestampFormatter : NSObject

/**
 *  Returns the cached date formatter object used by the `JSQMessagesTimestampFormatter` shared instance.
 */
@property (strong, nonatomic, readonly) NSDateFormatter *dateFormatter;

/**
 *  The text attributes to apply to the day, month, and year components of the string representation of a given date.
 *  The default value is a dictionary containing attributes that specify centered, light gray text and `UIFontTextStyleBody` font.
 */
@property (copy, nonatomic) NSDictionary *dateTextAttributes;

/**
 *  The text attributes to apply to the minute and hour componenents of the string representation of a given date.
 *  The default value is a dictionary containing attributes that specify centered, light gray text and `UIFontTextStyleBody` font.
 */
@property (copy, nonatomic) NSDictionary *timeTextAttributes;

/**
 *  Returns the shared timestamp formatter object.
 *
 *  @return The shared timestamp formatter object.
 */
+ (JSQMessagesTimestampFormatter *)sharedFormatter;

/**
 *  Returns a string representation of the given date formatted in the current locale using `NSDateFormatterMediumStyle` for the date style
 *  and `NSDateFormatterShortStyle` for the time style. It uses relative date formatting where possible.
 *
 *  @param date The date to format.
 *
 *  @return A formatted string representation of date.
 */
- (NSString *)timestampForDate:(NSDate *)date;

/**
 *  Returns an attributed string representation of the given date formatted as described in `timestampForDate:`.
 *  It applies the attributes in `dateTextAttributes` and `timeTextAttributes`, respectively.
 *
 *  @param date The date to format.
 *
 *  @return A formatted, attributed string representation of date.
 *
 *  @see `timestampForDate:`.
 *  @see `dateTextAttributes`.
 *  @see `timeTextAttributes`.
 */
- (NSAttributedString *)attributedTimestampForDate:(NSDate *)date;

/**
 *  Returns a string representation of *only* the minute and hour components of the given date formatted in the current locale styled using `NSDateFormatterShortStyle`.
 *
 *  @param date The date to format.
 *
 *  @return A formatted string representation of the minute and hour components of date.
 */
- (NSString *)timeForDate:(NSDate *)date;

/**
 *  Returns a string representation of *only* the day, month, and year components of the given date formatted in the current locale styled using `NSDateFormatterMediumStyle`.
 *
 *  @param date The date to format.
 *
 *  @return A formatted string representation of the day, month, and year components of date.
 */
- (NSString *)relativeDateForDate:(NSDate *)date;

@end

NS_ASSUME_NONNULL_END


text:
package com.springsource.greenhouse.activity.badge;

import com.springsource.greenhouse.activity.action.Action;

/**
 * Determines if a badge should be awarded when an Action is performed.
 * @author Keith Donald
 */
public interface BadgeAwarder {

	/**
	 * Award a badge for the Action performed.
	 * Returns null if no badge is to be awarded for the Action.
	 */
	public AwardedBadge awardBadgeForAction(A action);

}


text:
title: Still Coding
layout: post
author: harry.longhurst
permalink: /still-coding/
tags:
-
source-id: 1m9pJ2RG4me6X1yxN_G7Wz6b5UWqx8IeacI1kD4_isw4
published: true
---

    Title
    Still Coding
    Date
    23/2/17

    Starting point:
    Exercise 6 on 28%

    Target for this lesson?
    Do 10 more exercises

    Did I reach my target?
(add details to "Lesson Review")
    Yes I did a lot more than 10 I did 20.

    Lesson Review

    How did I learn? What strategies were effective?

    I used the hint to give me an idea of what to do if I got confused. It helped a lot because I often get stuck on why it isn't working and the hint usually tells me what to do and what I did wrong.

    What limited my learning? Which habits do I need to work on?

    Nothing I sat down and did my work and tried to get through as much as possible and catch up with my friend who is 5% in front of me.

    What will I change for next time? How will I improve my learning?

    I will try and not use the hint as much and try and get the answer just from the instructions.


text:
#include <boost/preprocessor/cat.hpp>

#ifdef BOOST_FUSION_REVERSE_FOLD
#   ifdef BOOST_FUSION_ITER_FOLD
#       define BOOST_FUSION_FOLD_NAME reverse_iter_fold
#   else
#       define BOOST_FUSION_FOLD_NAME reverse_fold
#   endif

#   define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION end
#   define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION prior
#   define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT)                   \
        typename fusion::result_of::prior<IT>::type
#   define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) fusion::prior(IT)
#else
#   ifdef BOOST_FUSION_ITER_FOLD
#       define BOOST_FUSION_FOLD_NAME iter_fold
#   else
#       define BOOST_FUSION_FOLD_NAME fold
#   endif

#   define BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION begin
#   define BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION next
#   define BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(IT) IT
#   define BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(IT) IT
#endif
#ifdef BOOST_FUSION_ITER_FOLD
#   define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT) IT&
#   define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) IT
#else
#   define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(IT)                  \
        typename fusion::result_of::deref<IT>::type
#   define BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(IT) fusion::deref(IT)
#endif

namespace boost { namespace fusion
{
    namespace detail
    {
        template<typename State, typename It, typename F>
        struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)
          : boost::result_of<
                F(
                typename add_reference<typename add_const<State>::type>::type,
                BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(It))
            >
        {};

        template<typename Result,int N>
        struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)
        {
            template<typename State, typename It0, typename F>
            BOOST_FUSION_GPU_ENABLED
            static Result
            call(State const& state,It0 const& it0,F f)
            {
                typedef typename
                    result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        It0 const
                    >::type
                It1;
                It1 it1 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0);
                typedef typename
                    result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        It1
                    >::type
                It2;
                It2 it2 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1);
                typedef typename
                    result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        It2
                    >::type
                It3;
                It3 it3 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it2);

                typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
                State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));

                typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State1,It1,F>::type State2;
                State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1));

                typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State2,It2,F>::type State3;
                State3 const state3=f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2));

                return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
                    Result
                  , N-4
                >::call(
                    f(state3,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it3)),
                    fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it3),
                    f);
            }
        };

        template<typename Result>
        struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,3>
        {
            template<typename State, typename It0, typename F>
            BOOST_FUSION_GPU_ENABLED
            static Result
            call(State const& state,It0 const& it0,F f)
            {
                typedef typename
                    result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        It0 const
                    >::type
                It1;
                It1 it1 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0);
                typedef typename
                    result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        It1
                    >::type
                It2;
                It2 it2 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1);

                typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
                State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));

                typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State1,It1,F>::type State2;
                State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1));

                return f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2));
            }
        };

        template<typename Result>
        struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,2>
        {
            template<typename State, typename It0, typename F>
            BOOST_FUSION_GPU_ENABLED
            static Result
            call(State const& state,It0 const& it0,F f)
            {
                typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
                State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));

                return f(
                    state1,
                    BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
                        fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0)));
            }
        };

        template<typename Result>
        struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,1>
        {
            template<typename State, typename It0, typename F>
            BOOST_FUSION_GPU_ENABLED
            static Result
            call(State const& state,It0 const& it0,F f)
            {
                return f(state,
                    BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
            }
        };

        template<typename Result>
        struct BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<Result,0>
        {
            template<typename State, typename It0, typename F>
            BOOST_FUSION_GPU_ENABLED
            static Result
            call(State const& state,It0 const&, F)
            {
                return static_cast<Result>(state);
            }
        };

        template<typename StateRef, typename It0, typename F, int N>
        struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)
        {
            typedef typename
                BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                    StateRef
                  , It0 const
                  , F
                >::type
            rest1;
            typedef typename
                result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                    It0 const
                >::type
            it1;
            typedef typename
                BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                    rest1
                  , it1
                  , F
                >::type
            rest2;
            typedef typename
                result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<it1>::type
            it2;
            typedef typename
                BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                    rest2
                  , it2
                  , F
                >::type
            rest3;
            typedef typename
                result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<it2>::type
            it3;

            typedef typename
                BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
                    typename BOOST_PP_CAT(
                        BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                        rest3
                      , it3
                      , F
                    >::type
                  , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        it3
                    >::type
                  , F
                  , N-4
                >::type
            type;
        };

        template<typename StateRef, typename It0, typename F>
        struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
            StateRef
          , It0
          , F
          , 3
        >
        {
            typedef typename
                BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                    StateRef
                  , It0 const
                  , F
                >::type
            rest1;
            typedef typename
                result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                    It0 const
                >::type
            it1;

            typedef typename
                BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                    typename BOOST_PP_CAT(
                        BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                        rest1
                      , it1
                      , F
                    >::type
                  , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        it1 const
                    >::type const
                  , F
                >::type
            type;
        };

        template<typename StateRef, typename It0, typename F>
        struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
            StateRef
          , It0
          , F
          , 2
        >
          : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                    StateRef
                  , It0 const
                  , F
                >::type
              , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                    It0 const
                >::type const
              , F
            >
        {};

        template<typename StateRef, typename It0, typename F>
        struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
            StateRef
          , It0
          , F
          , 1
        >
          : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
                StateRef
              , It0 const
              , F
            >
        {};

        template<typename StateRef, typename It0, typename F>
        struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
            StateRef
          , It0
          , F
          , 0
        >
        {
            typedef StateRef type;
        };

        template<typename StateRef, typename It0, typename F, int SeqSize>
        struct BOOST_PP_CAT(result_of_first_unrolled,BOOST_FUSION_FOLD_NAME)
        {
            typedef typename
                BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
                    typename boost::result_of<
                        F(
                            StateRef,
                            BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM(
                                It0 const)
                        )
                    >::type
                  , typename result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<
                        It0 const
                    >::type
                  , F
                  , SeqSize-1
                >::type
            type;
        };

        template<int SeqSize, typename StateRef, typename Seq, typename F>
        struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)
        {
            typedef typename
                BOOST_PP_CAT(
                    result_of_first_unrolled,BOOST_FUSION_FOLD_NAME)<
                    StateRef
                  , BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(
                        typename result_of::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION<Seq>::type
                    )
                  , F
                  , SeqSize
                >::type
            type;

            BOOST_FUSION_GPU_ENABLED
            static type
            call(StateRef state, Seq& seq, F f)
            {
                typedef
                    BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
                        type
                      , SeqSize
                    >
                unrolled_impl;

                return unrolled_impl::call(
                    state,
                    BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(
                        fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq)),
                    f);
            }
        };

        template<typename StateRef, typename Seq, typename F>
        struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<0,StateRef,Seq,F>
        {
            typedef StateRef type;

            BOOST_FUSION_GPU_ENABLED
            static StateRef
            call(StateRef state, Seq&, F)
            {
                return static_cast<StateRef>(state);
            }
        };

        template<typename Seq, typename State, typename F, bool IsSegmented>
        struct BOOST_PP_CAT(result_of_, BOOST_FUSION_FOLD_NAME)
          : BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<
                result_of::size<Seq>::value
              , typename add_reference<
                    typename add_const<State>::type
                >::type
              , Seq
              , F
            >
        {};
    }

    namespace result_of
    {
        template<typename Seq, typename State, typename F>
        struct BOOST_FUSION_FOLD_NAME
          : detail::BOOST_PP_CAT(result_of_, BOOST_FUSION_FOLD_NAME)<
                Seq
              , State
              , F
              , traits::is_segmented<Seq>::type::value
            >
        {};
    }

    template<typename Seq, typename State, typename F>
    BOOST_FUSION_GPU_ENABLED
    inline typename result_of::BOOST_FUSION_FOLD_NAME<
        Seq
      , State const
      , F
    >::type
    BOOST_FUSION_FOLD_NAME(Seq& seq, State const& state, F f)
    {
        return result_of::BOOST_FUSION_FOLD_NAME<Seq,State const,F>::call(
            state,
            seq,
            f);
    }

    template<typename Seq, typename State, typename F>
    BOOST_FUSION_GPU_ENABLED
    inline typename result_of::BOOST_FUSION_FOLD_NAME<
        Seq const
      , State const
      , F
    >::type
    BOOST_FUSION_FOLD_NAME(Seq const& seq, State const& state, F f)
    {
        return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State const,F>::call(
            state,
            seq,
            f);
    }

    template<typename Seq, typename State, typename F>
    BOOST_FUSION_GPU_ENABLED
    inline typename result_of::BOOST_FUSION_FOLD_NAME<
        Seq
      , State const
      , F
    >::type
    BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F f)
    {
        return result_of::BOOST_FUSION_FOLD_NAME<Seq,State,F>::call(
            state,
            seq,
            f);
    }

    template<typename Seq, typename State, typename F>
    BOOST_FUSION_GPU_ENABLED
    inline typename result_of::BOOST_FUSION_FOLD_NAME<
        Seq const
      , State const
      , F
    >::type
    BOOST_FUSION_FOLD_NAME(Seq const& seq, State& state, F f)
    {
        return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State,F>::call(
            state,
            seq,
            f);
    }
}}

#undef BOOST_FUSION_FOLD_NAME
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION
#undef BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM
#undef BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM
#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_META_TRANSFORM
#undef BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM


text:
module TChart

  #
  # An x or y axis label on the chart.  X axis labels will be years, e.g.
  # "2014", "2015", etc., and y axis labels will be descriptions of the
  # items being plotted, e.g. "Ruby", "C", "C++", etc.  Responsible for
  # generating TikZ code to render the label.
  #
  class Label

    attr_reader :coord    # Horizontal and vertical mid-point of label location.
    attr_reader :width    # Required for text justification.
    attr_reader :style    # TikZ style, must be defined in encompasing TeX document.
    attr_reader :text

    #
    # The difference between an x axis label and a y axis label is the TikZ style;
    # x axis labels are generated with the style "xlabel", y axis labels use
    # "ylabel".  In the TeX document that embeds the chart, the x axis labels will
    # usually be styled with centered text, whereas y axis labels will be left
    # justified.
    #
    def self.build_xlabel(coord, width, text) # => Label
      Label.new(coord, width, "xlabel", text)
    end

    def self.build_ylabel(coord, width, text) # => Label
      Label.new(coord, width, "ylabel", text)
    end

    def initialize(coord, width, style, text)
      @coord = coord
      @width = width
      @style = style
      @text = text
    end

    def render(tex)
      tex.label @coord, @width, @style, @text
    end

  end
end


text:
<!doctype html>

    <title>Restaurant</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="app.css">

                    You are welcome to check the code here

                    Assignment Instructions


text:
// Code generated by glow (https://github.com/go-gl/glow). DO NOT EDIT.

// This file implements GlowGetProcAddress for every supported platform. The
// correct version is chosen automatically based on build tags:
//
// windows: WGL
// darwin: CGL
// linux freebsd netbsd openbsd: GLX
//
// Use of EGL instead of the platform's default (listed above) is made possible
// via the "egl" build tag.
//
// It is also possible to install your own function outside this package for
// retrieving OpenGL function pointers, to do this see InitWithProcAddrFunc.

package gl

/*
#cgo windows CFLAGS: -DTAG_WINDOWS
#cgo !gles2,windows       LDFLAGS: -lopengl32
#cgo gles2,windows        LDFLAGS: -lGLESv2
#cgo darwin CFLAGS: -DTAG_DARWIN
#cgo !gles2,darwin LDFLAGS: -framework OpenGL
#cgo gles2,darwin  LDFLAGS: -framework OpenGLES
#cgo linux freebsd netbsd openbsd CFLAGS: -DTAG_POSIX
#cgo !egl,linux !egl,freebsd !egl,netbsd !egl,openbsd pkg-config: gl
#cgo egl,linux egl,freebsd egl,netbsd egl,openbsd egl,windows CFLAGS: -DTAG_EGL
#cgo egl,linux egl,freebsd egl,netbsd egl,openbsd pkg-config: egl
#cgo egl,windows LDFLAGS: -lEGL
#cgo egl,darwin  LDFLAGS: -lEGL
// Check the EGL tag first as it takes priority over the platform's default
// configuration of WGL/GLX/CGL.
#if defined(TAG_EGL)
	#include <stdlib.h>
	#include <EGL/egl.h>
	void* GlowGetProcAddress_glcompatibility42(const char* name) {
		return eglGetProcAddress(name);
	}
#elif defined(TAG_WINDOWS)
	#define WIN32_LEAN_AND_MEAN 1
	#include <windows.h>
	#include <stdlib.h>
	static HMODULE ogl32dll = NULL;
	void* GlowGetProcAddress_glcompatibility42(const char* name) {
		void* pf = wglGetProcAddress((LPCSTR) name);
		if (pf) {
			return pf;
		}
		if (ogl32dll == NULL) {
			ogl32dll = LoadLibraryA("opengl32.dll");
		}
		return GetProcAddress(ogl32dll, (LPCSTR) name);
	}
#elif defined(TAG_DARWIN)
	#include <stdlib.h>
	#include <dlfcn.h>
	void* GlowGetProcAddress_glcompatibility42(const char* name) {
		return dlsym(RTLD_DEFAULT, name);
	}
#elif defined(TAG_POSIX)
	#include <stdlib.h>
	#include <GL/glx.h>
	void* GlowGetProcAddress_glcompatibility42(const char* name) {
		return glXGetProcAddress((const GLubyte *) name);
	}
#endif
*/
import "C"
import "unsafe"

func getProcAddress(namea string) unsafe.Pointer {
	cname := C.CString(namea)
	defer C.free(unsafe.Pointer(cname))
	return C.GlowGetProcAddress_glcompatibility42(cname)
}


text:
package twilightforest.structures.stronghold;

import java.util.List;
import java.util.Random;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.structure.StructureBoundingBox;
import net.minecraft.world.gen.structure.StructureComponent;
import twilightforest.structures.StructureTFDecorator;

public class ComponentTFStrongholdCrossing
  extends StructureTFStrongholdComponent
{
  public ComponentTFStrongholdCrossing() {}

  public ComponentTFStrongholdCrossing(int i, int facing, int x, int y, int z)
  {
    super(i, facing, x, y, z);
  }

  public StructureBoundingBox generateBoundingBox(int facing, int x, int y, int z)
  {
    return StructureTFStrongholdComponent.getComponentToAddBoundingBox(x, y, z, -13, -1, 0, 18, 7, 18, facing);
  }

  public void func_74861_a(StructureComponent parent, List list, Random random)
  {
    super.func_74861_a(parent, list, random);

    addDoor(13, 1, 0);
    addNewComponent(parent, list, random, 0, 4, 1, 18);
    addNewComponent(parent, list, random, 1, -1, 1, 13);
    addNewComponent(parent, list, random, 3, 18, 1, 4);
  }

  public boolean func_74875_a(World world, Random rand, StructureBoundingBox sbb)
  {
    placeStrongholdWalls(world, sbb, 0, 0, 0, 17, 6, 17, rand, deco.randomBlocks);

    placeCornerStatue(world, 2, 1, 2, 0, sbb);
    placeCornerStatue(world, 15, 1, 15, 3, sbb);

    fillBlocksRotated(world, sbb, 8, 1, 8, 9, 5, 9, deco.pillarID, deco.pillarMeta, 0);

    placeWallStatue(world, 8, 1, 7, 0, sbb);
    placeWallStatue(world, 7, 1, 9, 3, sbb);
    placeWallStatue(world, 9, 1, 10, 2, sbb);
    placeWallStatue(world, 10, 1, 8, 1, sbb);

    placeTableAndChairs(world, sbb, 0);
    placeTableAndChairs(world, sbb, 1);
    placeTableAndChairs(world, sbb, 2);
    placeTableAndChairs(world, sbb, 3);

    placeDoors(world, rand, sbb);

    return true;
  }

  private void placeTableAndChairs(World world, StructureBoundingBox sbb, int rotation)
  {
    placeBlockRotated(world, Blocks.field_150476_ad, getStairMeta(0 + rotation) + 4, 5, 1, 3, rotation, sbb);
    placeBlockRotated(world, Blocks.field_150476_ad, getStairMeta(3 + rotation) + 4, 5, 1, 4, rotation, sbb);
    placeBlockRotated(world, Blocks.field_150476_ad, getStairMeta(1 + rotation) + 4, 6, 1, 3, rotation, sbb);
    placeBlockRotated(world, Blocks.field_150476_ad, getStairMeta(2 + rotation) + 4, 6, 1, 4, rotation, sbb);

    placeBlockRotated(world, Blocks.field_150485_bF, getStairMeta(3 + rotation), 5, 1, 2, rotation, sbb);
    placeBlockRotated(world, Blocks.field_150485_bF, getStairMeta(0 + rotation), 7, 1, 3, rotation, sbb);
    placeBlockRotated(world, Blocks.field_150485_bF, getStairMeta(1 + rotation), 6, 1, 5, rotation, sbb);
    placeBlockRotated(world, Blocks.field_150485_bF, getStairMeta(2 + rotation), 4, 1, 4, rotation, sbb);
  }
}


text:
sap.ui.define([
	"sap/ui/model/json/JSONModel",
	"sap/ui/Device"
], function(JSONModel, Device) {
	"use strict";

	return {

		/**
		 * Create frontend device model
		 */
		createDeviceModel: function() {
			var oModel = new JSONModel(Device);
			oModel.setDefaultBindingMode("OneWay");
			return oModel;
		},

		createAppSettingsModel: function() {
			// load local web storage containing app configuration data
			jQuery.sap.require("jquery.sap.storage");
			var oStorage = jQuery.sap.storage(jQuery.sap.storage.Type.local);
			var oSettings = oStorage.get("appSettings");

			if (!oSettings) {
				// initialize storage
				oSettings = {
					"server": {
						"serverNameIp": "192.168.0.1"
					}
				}
			}

			// create model and set configuration data
			var oModel = new JSONModel(oSettings);
			oModel.setDefaultBindingMode("TwoWay");
			return oModel;
		}

	};
});


text:
Follow the links to read about the different topics.

- [Home](https://github.com/MaxHill/vue-starter/tree/master/docs)
- [Structure](https://github.com/MaxHill/vue-starter/tree/master/docs/structure.md)
- [Build Commands](https://github.com/MaxHill/vue-starter/tree/master/docs/commands.md)
- [Linter Configuration](https://github.com/MaxHill/vue-starter/tree/master/docs/linter.md)
- [Pre-processors](https://github.com/MaxHill/vue-starter/blob/master/docs/pre-processors.md)
- [Handle Static Assets](https://github.com/MaxHill/vue-starter/tree/master/docs/static.md)
- [Environment Variables](https://github.com/MaxHill/vue-starter/tree/master/docs/env.md)
- [Integrate with Backend Framework](https://github.com/MaxHill/vue-starter/tree/master/docs/backend.md)
- [API Proxying During Development](https://github.com/MaxHill/vue-starter/tree/master/docs/proxy.md)
- [Unit](https://github.com/MaxHill/vue-starter/tree/master/docs/unit.md)
- [E2e](https://github.com/MaxHill/vue-starter/tree/master/docs/e2e.md)
- [Prerender](https://github.com/MaxHill/vue-starter/tree/master/docs/prerender.md)

# Prerendering for SEO

If you want to prerender routes that will not significantly change once pushed to production, use this Webpack plugin: [prerender-spa-plugin](https://www.npmjs.com/package/prerender-spa-plugin), which has been tested for use with Vue. For pages that _do_ frequently change, [Prerender.io](https://prerender.io/) and [Netlify](https://www.netlify.com/pricing) both offer plans for regularly re-prerendering your content for search engines.


text:
using System;

namespace Manos.Http {

	public class HttpException : Exception {

		public HttpException (string error)
		{
		}

		public HttpException (string error, Exception cause) : base (error, cause)
		{
		}
	}
}


text:
title: Code splitting
shortDesc: 'Extract common dependencies into shared bundles'
---

Code splitting is an important part of delivering high-performance JavaScript applications, helping to avoid downloading and executing more JavaScript than is necessary for a given page. At a high level, "code splitting" refers to the process of breaking up bundled code into multiple smaller bundles that can be loaded and executed independently as needed.


text:
class CreateNycNoises < ActiveRecord::Migration
  def change
    create_table :nyc_noises do |t|
      t.datetime :created_date
      t.datetime :closed_date
      t.string :complaint_type
      t.string :descriptor
      t.string :city
      t.string :borough
      t.decimal :latitude, {:precision=>10, :scale=>6}
      t.decimal :longitude, {:precision=>10, :scale=>6}
      t.integer :weight, default: 1
    end
  end
end


text:
module ProfitBricksProvision
  class ServerGetIp
    include Server::Base
    include Server::Config
    include Server::DataCenter

    def self.run
      new.run
    end

    def run
      dc = ProfitBricks::Datacenter.find_by_name(dc_name)

      unless dc
        error "Datacenter #{dc_name.inspect} not exist"
      end

      server = dc.server_by_name(server_name)

      if server
        print server.ips.first
      else
        error "Server '#{server_name}' not found in data_center '#{dc_name}'"
      end
    end
  end
end


text:
using Codout.Framework.Domain.DAL;
using System;

namespace Codout.Framework.NetFull.Tests
{
    public abstract class Entity : EntityWithTypedId<Guid?>
    {
    }

    public class Customer : Entity
    {
        public string Nome { get; set; }
    }
}


text:
namespace BundlerMiddleware
{
    using System.Collections.Concurrent;
    using System.Collections.Generic;
    using System.IO;
    using System.Net;
    using System.Text.RegularExpressions;
    using System.Threading.Tasks;

    using Microsoft.Owin;

    /// <summary>
    /// Used to resolve the bunlde tokens into html
    /// </summary>
    public class BundlerMiddleware : BundlerMiddlewareBase
    {
        private readonly BundleMatcher bundleMatcher;
        private readonly IFileResolver fileResolver;
        private readonly Replacer replacer = new Replacer();

        public BundlerMiddleware(OwinMiddleware next, IFileResolver fileResolver, IBundlerResolver bundleResolver, BundlerRouteTable routes) : base(next, routes)
        {
            this.fileResolver = fileResolver;
            this.bundleMatcher = new BundleMatcher(bundleResolver);
            this.replacer.AddMatcher(bundleMatcher.Matcher, bundleMatcher.BundleMatchReplace);
        }

        public override async Task<string> GetContent(IOwinContext context, IBundlerRoute route)
        {
            return await this.replacer.MatchReplacer(this.fileResolver.GetFilePath(context, route));
        }
    }
}


text:
package garden

import proto "github.com/gogo/protobuf/proto"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf

type TTY struct {
	WindowSize       *TTY_WindowSize `protobuf:"bytes,1,opt,name=window_size" json:"window_size,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

func (m *TTY) Reset()         { *m = TTY{} }
func (m *TTY) String() string { return proto.CompactTextString(m) }
func (*TTY) ProtoMessage()    {}

func (m *TTY) GetWindowSize() *TTY_WindowSize {
	if m != nil {
		return m.WindowSize
	}
	return nil
}

type TTY_WindowSize struct {
	Columns          *uint32 `protobuf:"varint,1,req,name=columns" json:"columns,omitempty"`
	Rows             *uint32 `protobuf:"varint,2,req,name=rows" json:"rows,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *TTY_WindowSize) Reset()         { *m = TTY_WindowSize{} }
func (m *TTY_WindowSize) String() string { return proto.CompactTextString(m) }
func (*TTY_WindowSize) ProtoMessage()    {}

func (m *TTY_WindowSize) GetColumns() uint32 {
	if m != nil && m.Columns != nil {
		return *m.Columns
	}
	return 0
}

func (m *TTY_WindowSize) GetRows() uint32 {
	if m != nil && m.Rows != nil {
		return *m.Rows
	}
	return 0
}

func init() {
}


text:
<?php
/**
 * Created by Daniel Mellum <mellum@gmail.com>
 * Date: 8/18/2018
 * Time: 11:24 AM
 */

namespace danielme85\CConverter\Providers;

use GuzzleHttp\Client;

class BaseProvider
{
    public $api;
    public $logEnabled;

    protected $date;
    protected $currency;
    protected $baseRates;

    protected $runastest;
    protected $settings;

    protected $url;

    /**
     * BaseProvider constructor.
     *
     * @param array $settings
     */
    public function __construct($settings)
    {
        $this->settings = $settings;
        $this->api = $settings['api-source'];
        $this->logEnabled = $settings['enable-log'];
        $this->runastest = $settings['runastest'];
    }

    /**
     * Connect to the providers API
     *
     * @param string $url
     * @param array $headers
     *
     * @return string
     */
    protected function connect($url, $headers = null)
    {
        if (!empty($headers)) {
            $client = new Client(['headers' => $headers]);
        }
        else {
            $client = new Client();
        }
        $request = $client->get($url);
        $response = $request->getBody()->getContents();

        return $response;
    }

    /**
     * Set rates
     *
     * @param Rates $rates
     *
     * @return bool
     */
    protected function setBaseRates(Rates $rates) : bool
    {
        if (!empty($rates)) {
            if (isset($rates->base) and isset($rates->date)) {
                $this->baseRates[$rates->base][$rates->date] = $rates;

                if (!empty($this->baseRates[$rates->base][$rates->date])) {
                    return true;
                }
            }
        }

        return false;
    }

    /**
     * Get rates
     *
     * @param string $currency
     * @param string $date
     *
     * @return Rates|null
     */
    protected function getBaseRates(string $currency, string $date)
    {
        $this->currency = $currency;
        $this->date = $date;

        if (isset($this->baseRates[strtoupper($currency)][$date])) {

            return $this->baseRates[strtoupper($currency)][$date];
        }

        return null;
    }

}


text:
<!doctype html>

    <meta charset="utf-8">
    <title>code bro</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="shortcut icon" type="image/png" href="/images/favicon.png?v=2">
    <link rel="stylesheet" type="text/css" href="/components.css">

<%- renderedRoot %>


text:
Add HTTPS to an existing website
------------------------

Setting up a very simple proxy to serve your existing site over **HTTPS** without changing your existing installation
*(other than the port its served on)*.

The Caddyfile shows how you can use caddy to listen on ports 80 & 443 and sit in front of another webserver such as apache which is serving on a different port (3333 in this case; see Caddyfile).


text:
<?php

namespace SilverShop\Tests\Checkout\Component;

use SilverShop\Checkout\CheckoutComponentConfig;
use SilverShop\Checkout\CheckoutConfig;
use SilverShop\Checkout\Component\AddressBookBilling;
use SilverShop\Model\Address;
use SilverShop\Model\Order;
use SilverShop\Tests\ShopTest;
use SilverStripe\Security\Member;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Security\Security;

class AddressBookCheckoutComponentTest extends SapphireTest
{
    // Component namespace
    const COMPONENT_NS = 'SilverShop-Checkout-Component-AddressBookBilling';

    protected static $fixture_file = array(
        '../../Fixtures/Orders.yml',
        '../../Fixtures/ShopMembers.yml',
    );

    /**
     * @var Order $cart
     */
    protected $cart;

    /**
     * @var Member $member
     */
    protected $member;

    /**
     * @var Address $address1
     */
    protected $address1;

    /**
     * @var Address $address2
     */
    protected $address2;

    /**
     * @var CheckoutComponentConfig $config
     */
    protected $config;

    protected $fixtureNewAddress = array(
        self::COMPONENT_NS . '_BillingAddressID' => 'newaddress',
        self::COMPONENT_NS . '_Country'          => 'US',
        self::COMPONENT_NS . '_Address'          => '123 Test St',
        self::COMPONENT_NS . '_AddressLine2'     => 'Apt 4',
        self::COMPONENT_NS . '_City'             => 'Siloam Springs',
        self::COMPONENT_NS . '_State'            => 'AR',
        self::COMPONENT_NS . '_PostalCode'       => '72761',
        self::COMPONENT_NS . '_Phone'            => '11231231234',
    );

    public function setUp()
    {
        ShopTest::setConfiguration();
        CheckoutConfig::config()->membership_required = false;
        parent::setUp();

        $this->member = $this->objFromFixture(Member::class, "jeremyperemy");
        $this->cart = $this->objFromFixture(Order::class, "cart1");
        $this->address1 = $this->objFromFixture(Address::class, "address1");
        $this->address2 = $this->objFromFixture(Address::class, "address2");
        $this->config = new CheckoutComponentConfig($this->cart, true);

        $this->config->addComponent(new AddressBookBilling());

        $this->address1->MemberID = $this->member->ID;
        $this->address1->write();
    }

    public function testCreateNewAddress()
    {
        $this->assertTrue(
            $this->config->validateData($this->fixtureNewAddress)
        );
    }

    public function testIncompleteNewAddress()
    {
        $this->expectException(ValidationException::class);
        $data = $this->fixtureNewAddress;
        $data[self::COMPONENT_NS . '_Country'] = '';

        $this->config->validateData($data);
    }

    public function testUseExistingAddress()
    {
        Security::setCurrentUser($this->member);
        $this->assertTrue(
            $this->config->validateData(
                array(
                    self::COMPONENT_NS . '_BillingAddressID' => $this->address1->ID,
                )
            )
        );
    }

    public function testShouldRejectExistingIfNotLoggedIn()
    {
        $this->expectException(ValidationException::class);
        $this->assertTrue(
            $this->config->validateData(
                array(
                    self::COMPONENT_NS . '_BillingAddressID' => $this->address1->ID,
                )
            )
        );
    }

    public function testShouldRejectExistingIfNotOwnedByMember()
    {
        $this->expectException(ValidationException::class);
        Security::setCurrentUser($this->member);
        $this->address1->MemberID = 0;
        $this->address1->write();

        $this->assertTrue(
            $this->config->validateData(
                array(
                    self::COMPONENT_NS . '_BillingAddressID' => $this->address1->ID,
                )
            )
        );
    }

    public function testShouldNotCreateBlankAddresses()
    {
        $beforeCount = Address::get()->count();
        $this->config->setData(
            array(
                self::COMPONENT_NS . '_BillingAddressID' => $this->address1->ID,
            )
        );

        $this->assertEquals($this->cart->BillingAddressID, $this->address1->ID);
        $this->assertEquals($beforeCount, Address::get()->count());
    }
}


text:
<html>
<head>
  <style>
    input {
      font-size: 13px;
      font: Ahem;
    }
  </style>
</head>
<body>
  <input id="EditBoxWithText" style=" position: absolute; left: 200px; top: 200px; width: 250px; height:20" value = "Long long long long text to fill the edit box" type="text">
  <input id="EditBoxWithNoText" style=" position: absolute; left: 200px; top: 250px; width: 250px; height:20" type="text">
</body>
</html>


text:
.class final Landroid/nfc/NdefMessage$1;
.super Ljava/lang/Object;
.source "NdefMessage.java"

# interfaces
.implements Landroid/os/Parcelable$Creator;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/nfc/NdefMessage;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/os/Parcelable$Creator",
        "<",
        "Landroid/nfc/NdefMessage;",
        ">;"
    }
.end annotation

# direct methods
.method constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public createFromParcel(Landroid/os/Parcel;)Landroid/nfc/NdefMessage;
    .locals 3

    invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I

    move-result v1

    new-array v0, v1, [Landroid/nfc/NdefRecord;

    sget-object v2, Landroid/nfc/NdefRecord;->CREATOR:Landroid/os/Parcelable$Creator;

    invoke-virtual {p1, v0, v2}, Landroid/os/Parcel;->readTypedArray([Ljava/lang/Object;Landroid/os/Parcelable$Creator;)V

    new-instance v2, Landroid/nfc/NdefMessage;

    invoke-direct {v2, v0}, Landroid/nfc/NdefMessage;-><init>([Landroid/nfc/NdefRecord;)V

    return-object v2
.end method

.method public bridge synthetic createFromParcel(Landroid/os/Parcel;)Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Landroid/nfc/NdefMessage$1;->createFromParcel(Landroid/os/Parcel;)Landroid/nfc/NdefMessage;

    move-result-object v0

    return-object v0
.end method

.method public newArray(I)[Landroid/nfc/NdefMessage;
    .locals 1

    new-array v0, p1, [Landroid/nfc/NdefMessage;

    return-object v0
.end method

.method public bridge synthetic newArray(I)[Ljava/lang/Object;
    .locals 1

    invoke-virtual {p0, p1}, Landroid/nfc/NdefMessage$1;->newArray(I)[Landroid/nfc/NdefMessage;

    move-result-object v0

    return-object v0
.end method


text:
class C16BitGrayDoc : public VoxelFilePair
{
protected:
	C16BitGrayDoc();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(C16BitGrayDoc)

// Overrides
public:
	virtual void Serialize(CArchive& ar);   // overridden for document i/o
protected:
	virtual BOOL OnNewDocument();

// Implementation
public:
	virtual ~C16BitGrayDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
};


text:
import psycopg2 #PostgreSQL DB Connection

# configure your DB connection here
DB_CONN_STRING="host='myhost' dbname='mydb' port='5432' user='myuser' password='secret'"

def getConnection(environ, start_response):
  #SQL database connection
  try:
    conn = psycopg2.connect(DB_CONN_STRING)
    return conn
  except:
    errorText = 'error: database connection failed!'
    # write the error message to the error.log
    print >> environ['wsgi.errors'], "%s" % errorText
    response_headers = [('Content-type', 'text/plain'),
                        ('Content-Length', str(len(errorText)))]
    start_response('500 INTERNAL SERVER ERROR', response_headers)

    return None


text:
import { WINDOW } from './../constants/index'
import * as jsSHA from 'jssha'
type IdGenerator = () => string

const shaObj = new jsSHA('SHA-512', 'ARRAYBUFFER')

export const genId: IdGenerator = () => {
  const getRandomValues: (size: number) => ArrayBufferView = (size: number) => WINDOW ?
    window.crypto.getRandomValues(new Uint8Array(size))
  : require('crypto').randomBytes(size)
  const arr: any = getRandomValues(256)

  shaObj.update(arr)
  return shaObj.getHash('HEX')
}


text:
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}

{-# LANGUAGE MultiParamTypeClasses #-}

module LiftMe.Training.ApiTypes where

import Data.Aeson
import Data.Aeson.Types (typeMismatch)

import Data.Convertible
import Data.Time
import qualified Data.Text as Text
import Data.Typeable

-- GHC specific imports
import GHC.Generics

-- HDBC
import Database.HDBC

unexpected :: (Show a, Typeable a, Typeable b) => a -> ConvertResult b
unexpected = convError "Unexpected SQL value"

--------------------------------------------------------------------------------
-- Workout types

data Workout = Workout
  { workoutDate :: LocalTime
  , workoutExercises :: [WorkoutExercise]
  }
  deriving Generic

instance FromJSON Workout where
  parseJSON (Object o) = Workout <$> o .: "date" <*> o .: "exercises"
  parseJSON invalid    = typeMismatch "Workout" invalid

data WorkoutExercise = WorkoutExercise
  { workoutExerciseName :: Text.Text
  , workoutExerciseSets :: [WorkoutSet]
  }
  deriving Generic

instance FromJSON WorkoutExercise where
  parseJSON (Object o) = WorkoutExercise <$> o .: "name" <*> o .: "sets"
  parseJSON invalid    = typeMismatch "WorkoutExercise" invalid

data WorkoutSet = WorkoutSet
  { workoutSetReps :: Integer
  , workoutSetWeight :: Rational
  }
  deriving Generic

instance FromJSON WorkoutSet where
  parseJSON (Object o) = WorkoutSet <$> o .: "reps" <*> o .: "weight"
  parseJSON invalid    = typeMismatch "WorkoutSet" invalid


text:
var utils = require('../../../../utils.js');
var is = require('joi');

module.exports = is.object({
  name: 'Friends',
  type: 'object',
  file: is.string(),
  root: is.string(),
  is_dependency: is.boolean(),
  dependants: is.array(),
  key: '_id',
  seed: 0,
  data: {
    min: 0,
    max: 0,
    count: 1,
    dependencies: is.array().items(is.string()).length(1),
    inputs: is.array().items(is.string()).length(0),
    pre_run: is.func(),
  },
  properties: {
    _id: utils.check('string', 'The document id', { post_build: is.func(), }),
    doc_type: utils.check('string', 'The document type', { value: is.string(), }),
    user_id: utils.check('integer', 'The user_id the lookup is for', { build: is.func(), }),
    friends: utils.check('array', 'An array of friends (user_id)', { post_build: is.func(), }),
  },
});


text:
import React, { PropTypes } from 'react';
import { MenuPaneHeading } from './menu_pane_heading';
import { Link } from 'react-router'

export default class Navbar extends React.Component {
  constructor(props) {
    super(props);
  }

  render () {
    const { children } = this.props;
    return (

<Link to="/"> Home </Link>

<Link to="/about"> About </Link>

Layne McNish

<Link to="/"> Portfolio </Link>

<Link to="/about"> Contact </Link>

        {children}

    );
  }
}


text:
package com.example

import akka.actor.{Actor, ActorLogging, ActorRef, Props}
import java.io._
import akka.serialization._
import java.nio.ByteBuffer

import Disruptor._

class JournalActor(journaler: Journaler) extends Actor with ActorLogging {
  import JournalActor._

  val random = new scala.util.Random
  var counter = 1L

  val serialization = SerializationExtension(context.system)
  val db = journaler.init(serialization)
  val actor = db.actor(context)

  var disruptor: ActorRef = _

  def receive: PartialFunction[Any, Unit] = {
    case ReplayNext(disruptor) =>
      actor ! ReplayNext(disruptor)

    case Process(seqNr, index, id, command: Command) =>
      log.debug("JournalActor - process command")
      sender ! Processed(index, id, None)

    case Process(seqNr, index, id, others: Seq[AnyRef @unchecked]) =>
      val (replayed, remains) = others.filter {
        _ != Terminate
      } partition {
        case Replayed(elem) => true
        case _ => false
      }
      if (replayed.size > 0) {
        counter += replayed.size
        sender ! Processed(index - remains.size, id, None)
      }
      log.debug("JournalActor - Replayed: {}", replayed mkString ", ")
      log.debug("JournalActor - Remains: {}", remains mkString ", ")
      if (remains.size > 0) {
        process(Process(seqNr + replayed.size, index, id, remains))
      }

    case Processed(index, id, Replayed(data)) =>
      actor ! ReplayNext(disruptor)

    case Processed(index, id, command: Command) =>
      log.debug("JournalActor - received command message: {}, {}, {}",
        index, counter, command)

    case Processed(index, id, data) =>
      log.debug("JournalActor - received process message: {}, {}, {}",
        index, counter, data)

    case msg =>
      log.debug("JournalActor - process: {}", msg)
      process(msg)
  }

  def process: PartialFunction[Any, Unit] = {
    case Replay(d, count) =>
      log.debug("Start replay (count: {})", count)

      disruptor = d
      actor ! Replay(d, count)

    case Process(seqNr, index, id, Terminate) =>
      sender ! Processed(index, id, Terminate)

    case Process(seqNr, index, id, Replayed(data)) =>
      log.debug("In JournalActor - Replayed: {}", data)
      counter += 1
      sender ! Processed(index, id, None)

    case Process(seqNr, index, id, data: Seq[AnyRef @unchecked]) =>
      log.debug("JournalActor - received process message: {}, {}", index, data)
      val serializer = serialization.findSerializerFor(data)
//      var i = index - data.size
      db.writeSeqData(seqNr, data)
      if (counter != seqNr) {
        log.info("Key is invalid. {} vs {}", seqNr, counter)
      }
      counter += data.length
      sender ! Processed(index, id, None)

    case Process(seqNr, index, id, data) =>
      log.debug("JournalActor save {}", seqNr)
      log.debug("JournalActor - received process message: {}, {}", index, data)
      db.writeData(seqNr, data)
      if (counter != seqNr) {
        log.info("Key 2 is invalid. {} vs {}", seqNr, counter)
      }
      counter += 1
      sender ! Processed(index, id, None)

    case msg =>
      log.debug("JournalActor - received message: {}", msg)
  }
}

object JournalActor {
  def props(journaler: Journaler) = Props(new JournalActor(journaler))

  case object Initialize
  case object ReplayFinished extends Command
  case class Replayed(msg: AnyRef)
  case class Replay(disruptor: ActorRef, count: Long)
  case class ReplayNext(disruptor: ActorRef)
}


text:
<?php
namespace falkirks\minereset\task;

use pocketmine\command\CommandSender;
use pocketmine\scheduler\AsyncTask;
use pocketmine\Server;
use pocketmine\utils\Internet;
use pocketmine\utils\Utils;

class AboutPullTask extends AsyncTask {

    const ABOUT_URL = "http://falkirks.com/pmabout.txt";

    /**
     * AboutPullTask constructor.
     * @param CommandSender $sender
     */
    public function __construct(CommandSender $sender){
        $this->storeLocal($sender);
    }

    public function onRun() : void {
        if(method_exists(Utils::class, "getURL")){
            $this->setResult(Utils::getURL(AboutPullTask::ABOUT_URL));
        }
        else {
            $this->setResult(Internet::getURL(AboutPullTask::ABOUT_URL));
        }

    }

    public function onCompletion(Server $server = null) : void {
        $sender = $this->fetchLocal();
        if($sender instanceof CommandSender) {
            $result = $this->getResult();
            if ($result !== false) {
                $sender->sendMessage($this->getResult());
            } else {
                $sender->sendMessage("MineReset by Falkirks. This is a fancy plugin that allows you to make resettable mines.");
            }
        }
    }

}


text:
export class Hero {
  constructor(public id: number,
              public name: string,
              public description?: string) { }
}