Tutorial by Examples

These are the simplest starter pages with a Header, Call-to-Action, and Icon Features. Starter TemplateParallax TemplateDemo or DownloadDemo or Download
Update: TensorFlow now supports 1D convolution since version r0.11, using tf.nn.conv1d. Consider a basic example with an input of length 10, and dimension 16. The batch size is 32. We therefore have a placeholder with input shape [batch_size, 10, 16]. batch_size = 32 x = tf.placeholder(tf.float...
This code shows a simple example of animation in Unity. For this example, you should have 2 animation clips; Run and Idle. Those animations should be Stand-In-Place motions. Once the animation clips are selected, create an Animator Controller. Add this Controller to the player or game object you w...
As of Kafka 0.9, the new high level KafkaConsumer client is availalbe. It exploits a new built-in Kafka protocol that allows to combine multiple consumers in a so-called Consumer Group. A Consumer Group can be describes as a single logical consumer that subscribes to a set of topics. The partions ov...
KafkaConsumers request messages from a Kafka broker via a call to poll() and their progress is tracked via offsets. Each message within each partition of each topic, has a so-called offset assigned—its logical sequence number within the partition. A KafkaConsumer tracks its current offset for each p...
KafkaConsumers can commit offsets automatically in the background (configuration parameter enable.auto.commit = true) what is the default setting. Those auto commits are done within poll() (which is typically called in a loop). How frequently offsets should be committed, can be configured via auto.c...
There are multiple strategies to read a topic from its beginning. To explain those, we first need to understand what happens at consumer startup. On startup of a consumer, the following happens: join the configured consumer group, which triggers a rebalance and assigns partitions to the consumer ...
The easiest and recommended way to install SymPy is to install Anaconda. If you already have Anaconda or Miniconda installed, you can install the latest version with conda: conda install sympy Another way of installing SymPy is using pip: pip install sympy Note that this might require root ...
from django.contrib.auth.models import User from rest_framework import authentication from rest_framework import exceptions This example authentication is straight from the official docs here. class ExampleAuthentication(BaseAuthentication): def authenticate(self, request): usernam...
This is a snippet of master report. Two parameters and the connection (for example, jdbc) are passing to the subreport. One value is returned from the subreport back to the master report, this value (variable) can be used in master report <subreport> <reportElement x="0" y=&...
This is a snippet of master report. The datasource is passed to the subreport with help of net.sf.jasperreports.engine.data.JRBeanCollectionDataSource constructor <field name="someFieldWithList" class="java.util.List"/> <!-- ...... --> <subreport> <r...
The JasperReports-plugin by Alex Nederlof is a good alternative of abandoned org.codehaus.mojo:jasperreports-maven-plugin plugin. The adding of plugin is a typical, simple procedure: <build> <plugins> <plugin> <groupId>com.alexnederlof</groupId...
The CLOS MOP provides the hook slot-value-using-class, that is called when a slot is value is accessed, read or modified. Because we only care for modifications in this case we define a method for (setf slot-value-using-class). (defclass document () ((id :reader id :documentation "A hash co...
Classification in Machine Learning is the problem that identifies to which set of categories does a new observation belong. Classification falls under the category of Supervised Machine Learning. Any algorithm that implements classification is known as classifier The classifiers supported in P...
In classification using PHP-ML we assigned labels to new observation. Regression is almost the same with difference being that the output value is not a class label but a continuous value. It is widely used for predictions and forecasting. PHP-ML supports the following regression algorithms Suppo...
This topic explains the concept of an object reference; it is targeted at people who are new to programming in Java. You should already be familiar with some terms and meanings: class definition, main method, object instance, and the calling of methods "on" an object, and passing parameter...
Every custom loader must directly or indirectly extend the java.lang.ClassLoader class. The main extension points are the following methods: findClass(String) - overload this method if your classloader follows the standard delegation model for class loading. loadClass(String, boolean) - overloa...
Clustering is about grouping similar objects together. It is widely used for pattern recognition. Clustering comes under unsupervised machine learning, therefore there is no training needed. PHP-ML has support for the following clustering algorithms k-Means dbscan k-Means k-Means separates ...
The Java language allows you to use new to create instances Integer, Boolean and so on, but it is generally a bad idea. It is better to either use autoboxing (Java 5 and later) or the valueOf method. Integer i1 = new Integer(1); // BAD Integer i2 = 2; // BEST (autoboxing)...
Using new String(String) to duplicate a string is inefficient and almost always unnecessary. String objects are immutable, so there is no need to copy them to protect against changes. In some older versions of Java, String objects can share backing arrays with other String objects. In those ver...

Page 760 of 1336