Tutorial by Examples

You can create a Sequential model by passing a list of layer instances to the constructor: from keras.models import Sequential from keras.layers import Dense, Activation model = Sequential([ Dense(32, input_dim=784), Activation('relu'), Dense(10), Activation('softmax'), ]) ...
Usually, an HTML form element submitted to PHP results in a single value. For example: <pre> <?php print_r($_POST);?> </pre> <form method="post"> <input type="hidden" name="foo" value="bar"/> <button type="su...
One of the ways to think about the commands that should be executed, to edit a text in a certain manner, is as entire sentences. A command is an action performed on an object. Therefore it has a verb: :normal i " insert :normal a " append :normal c " overwrite :normal y ...
The idea is to measure a layout before and after each change and if there is a significant change you can be somewhat certain that its the softkeyboard. // A variable to hold the last content layout hight private int mLastContentHeight = 0; private ViewTreeObserver.OnGlobalLayoutListener keyboa...
P( glasses | reading ) = Count( reading glasses ) / Count( reading ) We count the sequences reading glasses and glasses from corpus and compute the probability.
//MySingletonClass.h @interface MYSingletonClass : NSObject + (instancetype)sharedInstance; -(instancetype)init NS_UNAVAILABLE; -(instancetype)new NS_UNAVAILABLE; @end //MySingletonClass.m @implementation MySingletonClass + (instancetype)sharedInstance { static MySingleto...
The following would work in IE9+ import React from 'react' class App extends React.Component { constructor () { super() this.state = {someData: null} } componentDidMount () { var request = new XMLHttpRequest(); request.open('GET', '/my/url', true); request...
/* This is a simple query which can generate a sequence of numbers. The following example generates a sequence of numbers from 1..100 */ select level from dual connect by level <= 100; /*The above query is useful in various scenarios like generating a sequence of dates from a given date. The ...
Consider the BST: Lowest common ancestor of 22 and 26 is 24 Lowest common ancestor of 26 and 49 is 46 Lowest common ancestor of 22 and 24 is 24 Binary search tree property can be used for finding nodes lowest ancestor Psuedo code: lowestCommonAncestor(root,node1, node2){ if(root == NULL) ...
This example demonstrates how to install Tomcat as a service on Ubuntu using the *.tar.gz releases of both Tomcat as well as Java. 1. Install the Java Runtime Environment (JRE) Download the desired jre .tar.gz release Extract to /opt/ This will create a directory /opt/jre1.Xxxx/ Create a sym...
This method allows non-implementation-specific code to be written and deployed across multiple jms platforms. Below basic example connects to activemq jms server and sends a message. import java.util.Properties; import javax.jms.JMSException; import javax.jms.Queue; import javax.jms.QueueConne...
PDO::setAttribute sets an attribute on the database handle. Desctiption of setAttribute is: public bool PDO::setAttribute ( int $attribute , mixed $value ) PDO::ATTR_ERRMODE: This attribute is used for error reporting. It can have one of the following values. PDO::ERRMODE_SILENT: If the ATTR...
You'll need Sitecore 6.6 or later (including Sitecore 8.x). Note that for Sitecore 6.6 compatibility you must have .NET 4.5 installed. Install Unicorn. This is as simple as adding the Unicorn NuGet package to your project. PM> Install-Package Unicorn When you install the NuGet package, a...
Clone the repository Place a copy of your Sitecore.Kernel.dll assembly in /lib/sitecore/v7 (for v7/v8) Build the project for your Sitecore version using Visual Studio 2012 or later Copy Unicorn.dll, Rainbow.dll, Rainbow.Storage.Sc.dll, Rainbow.Storage.Yaml.dll and Kamsar.WebConsole.dll to your ...
There are two components to the Unicorn data provider: the database-specific implementation, and the Unicorn implementation. The Unicorn implementation is an individual configuration of Unicorn dependencies that get automatic serialization. For example, if you were serializing two presets you'd nee...
General Description A formula in Acumatica is a DAC field that is calculated based on the values of other object fields. To calculate a formula, Aсumatiсa framework provides a set of various operations and functions (such as arithmetical, logical, and comparison operations and string processing fu...
Introduction The PXSelectorAttribute attribute (also referred to as the selector), while vital and frequently used, has however two major drawbacks: It gives an uninformative message "<object_name> cannot be found in the system" if no items are found to satisfy the selector condi...
An anonymous function can be defined without a name through a Lambda Expression. For defining these type of functions, the keyword lambda is used instead of the keyword defun. The following lines are all equivalent and define anonymous functions which output the sum of two numbers: (lambda (x y) (...
When your device connects to a network, an intent is sent. Many apps don’t check for these intents, but to make your application work properly, you can listen to network change intents that will tell you when communication is possible. To check for network connectivity you can, for example, use the ...
# Print the working directory import os print os.getcwd() # C:\Python27\Scripts # Set the working directory os.chdir('C:/Users/general1/Documents/simple Python files') print os.getcwd() # C:\Users\general1\Documents\simple Python files # load pandas import pandas as pd # read a csv d...

Page 1112 of 1336