The document discusses trading strategies using open source tools. It presents a trading system called OSDC Trading System that uses random numbers generated by rolling dice to determine trading signals. Backtesting results of two strategies are shown, with the second strategy implementing a stop loss that performs better by reducing losses. However, both strategies resulted in overall negative returns compared to a buy and hold strategy.
This document provides an overview of machine learning in R. It discusses R's capabilities for statistical analysis and visualization. It describes key R concepts like objects, data structures, plots, and packages. It explains how to import and work with data, perform basic statistics and machine learning algorithms like linear models, naive Bayes, and decision trees. The document serves as an introduction for using R for machine learning tasks.
This document provides an overview of using Git and GUI tools for Git. It discusses initializing and committing to a local repository, adding a remote repository, resolving conflicts, branching models like master/develop/feature branches, writing commit messages, generating SSH keys, ignoring files, and migrating from SVN to Git. Links are provided to resources on GitBook, branching models, SSH keys, writing commit messages, hosted version control services and more.
Lambdas and streams are key new features in Java 8. Lambdas allow blocks of code to be passed around as if they were objects. Streams provide an abstraction for processing collections of objects in a declarative way using lambdas. Optional is a new class that represents null-safe references and helps avoid null pointer exceptions. Checked exceptions can cause issues with lambdas, so helper methods are recommended to convert checked exceptions to unchecked exceptions.
This document introduces G1GC and summarizes its key features:
1. G1GC was introduced in Java SE 7 and became the default GC in Java SE 9. It aims to reduce pause times while maintaining relatively high throughput.
2. The heap is divided into fixed-size regions that may be assigned to different generations (young, old). Young GC collections only involve the young regions while mixed GCs involve both young and some old regions.
3. Concurrent marking identifies live data in the heap to inform later compaction. It involves initial marking, concurrent scanning of root regions, and final marking phases.
4. Collection set construction aims to balance GC pause time and throughput by selecting an
The document discusses trading strategies using open source tools. It presents a trading system called OSDC Trading System that uses random numbers generated by rolling dice to determine trading signals. Backtesting results of two strategies are shown, with the second strategy implementing a stop loss that performs better by reducing losses. However, both strategies resulted in overall negative returns compared to a buy and hold strategy.
This document provides an overview of machine learning in R. It discusses R's capabilities for statistical analysis and visualization. It describes key R concepts like objects, data structures, plots, and packages. It explains how to import and work with data, perform basic statistics and machine learning algorithms like linear models, naive Bayes, and decision trees. The document serves as an introduction for using R for machine learning tasks.
This document provides an overview of using Git and GUI tools for Git. It discusses initializing and committing to a local repository, adding a remote repository, resolving conflicts, branching models like master/develop/feature branches, writing commit messages, generating SSH keys, ignoring files, and migrating from SVN to Git. Links are provided to resources on GitBook, branching models, SSH keys, writing commit messages, hosted version control services and more.
Lambdas and streams are key new features in Java 8. Lambdas allow blocks of code to be passed around as if they were objects. Streams provide an abstraction for processing collections of objects in a declarative way using lambdas. Optional is a new class that represents null-safe references and helps avoid null pointer exceptions. Checked exceptions can cause issues with lambdas, so helper methods are recommended to convert checked exceptions to unchecked exceptions.
This document introduces G1GC and summarizes its key features:
1. G1GC was introduced in Java SE 7 and became the default GC in Java SE 9. It aims to reduce pause times while maintaining relatively high throughput.
2. The heap is divided into fixed-size regions that may be assigned to different generations (young, old). Young GC collections only involve the young regions while mixed GCs involve both young and some old regions.
3. Concurrent marking identifies live data in the heap to inform later compaction. It involves initial marking, concurrent scanning of root regions, and final marking phases.
4. Collection set construction aims to balance GC pause time and throughput by selecting an
The document discusses annotation processing and code generation. It describes using annotation processing to automatically generate retry logic for HTTP requests by creating a $$RetryStale interface with the same methods as the original interface but adding cache headers. The processing is done at compile time using the ProcessingEnvironment API to access elements, generate code with JavaPoet, and write the generated files. It recommends libraries like AutoService, Truth, and Compile testing to make annotation processors easier to write.
The document discusses Taiwan's first Java Community Conference (JCConf) held in 2014. It provides details about the conference such as its website, ticket price of 800 TWD, 400 attendees and 80 staff members. It also lists 17 sessions and 8 sponsors. The conference was a community-driven event aimed at collaborating with other Java user groups to cover wider topics of interest to Java developers throughout their careers, and to learn from other technology communities.
This document discusses Java 8 Streams. It explains that Streams support functional-style operations on elements and provide internal iteration rather than external iteration. It covers Stream sources, intermediate operations like filter and map, terminal operations like forEach and collect, and how Streams are lazy and support parallel processing. Examples are provided for common tasks like filtering, mapping, reducing and collecting Stream elements.
Java SE 8 introduces significant features like lambda expressions, the Stream API, and the Date and Time API, enhancing functional programming capabilities. It enables more efficient utilization of multicore processors and simplifies code through anonymous functions and method references. Additionally, it maintains backward compatibility with default methods in interfaces and improves type inference.
The document introduces CompletableFuture in Java, which is a library that allows asynchronous and non-blocking operations to be performed and chained together. It provides methods to chain dependent tasks together without blocking or callback hell. CompletableFuture implements Future and CompletionStage interfaces and provides various methods to handle results, errors, chaining and composition of asynchronous operations.
The document discusses the Raspberry Pi, a small single-board computer developed in the UK for education purposes. Key details include its Broadcom SoC, 512MB of memory, HDMI and USB ports, and ability to run operating systems like Raspbian. The Raspberry Pi is useful for tasks like media centers, networking, programming, and running Minecraft. It also supports Java programming through tools like Pi4J, which provides examples of using the Raspberry Pi's GPIO pins to control devices.
Threads allow programs to execute multiple tasks simultaneously. In Java, threads are lightweight processes that exist within a process and share its resources. The key benefits of multithreading include taking advantage of multiprocessor systems and simplifying programming models. However, multithreading also introduces risks like race conditions and deadlocks that must be addressed through synchronization and thread safety.
The document discusses the steps needed to develop a basic location-based Android application. It covers creating a fake GPS path for the emulator, required APIs like getting the device's location and displaying it on a map, and registering listeners to receive location updates. It also introduces an example location-based game application called "Bomberman".
26. Time zone data
?tz database 有世界時區的分類和命名
?IANA Time Zone Database (TZDB)
?$JDK_HOME/jre/lib/tzdb.dat
?透過 ZoneRulesProvider 讀取
?一直有更新,所以記得要持續更新 JRE 或透
過 Oracle 提供的工具更新
46. plus, minus
?Adds/Subtracts an amount to an object
LocalDate.now().plusDays(4)?
.plusYear(2);
LocalTime.now().plusMinutes(30)?
.plusHours(4)?
.minusSeconds(30);?
48. until, between
?Amount of time until another
LocalDate.of(2014, 12, 3).until(?
LocalDate.of(2014, 12, 7),?
ChronoUnit.WEEKS);
ChronoUnit.DAYS.between(?
LocalDate.of(2014, 12, 3), ?
LocalDate.of(2014, 12, 7));