Tutorial by Examples: is

public class MainApplication extends Application { private static Context context; //application context private Handler mainThreadHandler; private Toast toast; public Handler getMainThreadHandler() { if (mainThreadHandler == null) { mainThreadHand...
Because iota is incremented after each ConstSpec, values within the same expression list will have the same value for iota: const ( bit0, mask0 = 1 << iota, 1<<iota - 1 // bit0 == 1, mask0 == 0 bit1, mask1 // bit1 == 2, mask1 == 1 _, _ ...
Type erasure is a way to hide the type of an object from code using it, even though it is not derived from a common base class. In doing so, it provides a bridge between the worlds of static polymorphism (templates; at the place of use, the exact type must be known at compile time, but it need not b...
import random probability = 0.3 if random.random() < probability: print("Decision with probability 0.3") else: print("Decision with probability 0.7")
To the average R user, the list structure may appear to be the one of the more complicated data structures to manipulate. There are no guarantees that all the elements within it are of the same type; There is no guaranteed structure of how complicated/non-complicated that the list would be (An eleme...
Comparing string in a case insensitive way seems like something that's trivial, but it's not. This section only considers unicode strings (the default in Python 3). Note that Python 2 may have subtle weaknesses relative to Python 3 - the later's unicode handling is much more complete. The first thi...
Logistic regression is a particular case of the generalized linear model, used to model dichotomous outcomes (probit and complementary log-log models are closely related). The name comes from the link function used, the logit or log-odds function. The inverse function of the logit is called the lo...
If the file does not contain a header row, File: 1;str_data;12;1.4 3;str_data;22;42.33 4;str_data;2;3.44 2;str_data;43;43.34 7; str_data; 25; 23.32 you can use the keyword names to provide column names: df = pandas.read_csv('data_file.csv', sep=';', index_col=0, ski...
wget http://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable make
redis-cli ping This should return PONG
Common Lisp has a standard, which was initially published in 1994 as an ANSI standard. The Common Lisp HyperSpec, short CLHS, provided by LispWorks is an often used HTML documentation, which is derived from the standard document. The HyperSpec can also be downloaded and locally used. Common Lisp d...
This book is known as CLtL2. This is the second edition of the book Common Lisp the Language. It was published in 1990, before the ANSI CL standard was final. It took the original language definition from the first edition (published in 1984) and described all changes in the standardization process...
On CLiki, a Wiki for Common Lisp and free Common Lisp software, a list of Proposed ANSI Revisions and Clarifications is being maintained. Since the Common Lisp standard has not changed since 1994, users have found several problems with the specification document. These are documented on the CLiki p...
The Common Lisp Quick Reference is a document which can be printed and bound as a booklet in various layouts to have a printed quick reference for Common Lisp.
redis-cli is the Redis command line interface program that allows to send commands to Redis and read the replies sent by the server, directly from the terminal. Basic command line usage is below: Access to redis: $ redis-cli 127.0.0.1:6379> Access to redis with authentication: $ redis-cli ...
The dir() function can be used to get a list of the members of a class: dir(Class) For example: >>> dir(list) ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__...
By default, most of the information is hidden from the user. You can use -v switches to get a verbose log of the connection attempt, which will usually pinpoint the problem by showing why the behavior is different than you expect. Let's assume you are connecting to the server example.com using ssh ...
Add the following code to functions.php to remove it from everyone except the Administrator user level: add_action('after_setup_theme', 'no_admin_bar'); function no_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); ...
val list = listOf(1,2,3,4,5,6) //filter out even numbers val even = list.filter { it % 2 == 0 } println(even) //returns [2,4]

Page 31 of 109