Tutorial by Examples: v

Built in functions can subset rows with columns that meet conditions. df <- data.frame(item = c(1:10), price_Elasticity = c(-0.57667, 0.03205, -0.04904, 0.10342, 0.04029, 0.0742, 0.1669, 0.0313, 0.22204, 0.06158), total...
Java Logging Api has 7 levels. The levels in descending order are: SEVERE (highest value) WARNING INFO CONFIG FINE FINER FINEST (lowest value) The default level is INFO (but this depends on the system and used a virtual machine). Note: There are also levels OFF (can be used to turn log...
The reserved word "void" is an alias of System.Void type, and has two uses: Declare a method that doesn't have a return value: public void DoSomething() { // Do some work, don't return any value to the caller. } A method with a return type of void can still have the return ...
It's also possible to use data binding within your RecyclerView Adapter. Data model public class Item { private String name; public String getName() { return name; } } XML Layout <TextView android:layout_width="wrap_content" android:layou...
The horizontally justified navigation (menu) bar has some number of items that should be justified. The first (left) item has no left margin within the container, the last (right) item has no right margin within the container. The distance between items is equal, independent on the individual item w...
The backface-visibility property relates to 3D transforms. With 3D transforms and the backface-visibility property, you're able to rotate an element such that the original front of an element no longer faces the screen. For example, this would flip an element away from the screen: JSFIDDLE <d...
To activate the developer mode: Log in to the ODOO front end Click on the User Name drop down at the top-right side Select 'About' Click on 'Activate developer mode' from the pop-up window.
#include <vector> #include <string> #include "agent_util.hpp" //this file can be found in Java SE Development Kit 8u101 Demos and Samples //see http://download.oracle.com/otn-pub/java/jdk/8u101-b13-demos/jdk-8u101-windows-x64-demos.zip //jdk1.8.0_101.zip!\demo\jvmti\v...
Inside Agent_OnLoad method: jvmtiEnv* jvmti; /* Get JVMTI environment */ vm->GetEnv(reinterpret_cast<void **>(&jvmti), JVMTI_VERSION);
When creating a nested class, you face a choice of having that nested class static: public class OuterClass1 { private static class StaticNestedClass { } } Or non-static: public class OuterClass2 { private class NestedClass { } } At its core, static nested c...
Note that many datatypes don't need to be quoted, since they evaluate to themselves. QUOTE is especially useful for symbols and lists, to prevent evaluation as Lisp forms. Example for other datatypes not needed to be quoted to prevent evaluation: strings, numbers, characters, CLOS objects, ... Her...
class MyHello { def sayHello() { "Hello, world" } } def cl = { sayHello() } cl() // groovy.lang.MissingMethodException cl.delegate = new MyHello() cl(); // "Hello, world" Used extensively by Groovy DSLs.
For sending and receiving events we first need an Event object. Event objects are actually simple POJOs. public class ArbitaryEvent{ public static final int TYPE_1 = 1; public static final int TYPE_2 = 2; private int eventType; public ArbitaryEvent(int eventType){ this....
For receiving events you need to register your class on the EventBus. @Override public void onStart() { super.onStart(); EventBus.getDefault().register(this); } @Override public void onStop() { EventBus.getDefault().unregister(this); super.onStop(); } And then subscribe ...
Sending events is as easy as creating the Event object and then posting it. EventBus.getDefault().post(new ArbitaryEvent(ArbitaryEvent.TYPE_1));
Running svn log will show you all the commit messages, you probably want to review only certain revisions. View the n most recent revisions: svn log -n View a specific revision: svn log -c rXXX View the paths affected: svn log -v -c rXXX
1. Passing integer data: SenderActivity Intent myIntent = new Intent(SenderActivity.this, ReceiverActivity.class); myIntent.putExtra("intVariableName", intValue); startActivity(myIntent); ReceiverActivity Intent mIntent = getIntent(); int intValue = mIntent.getIntExtra("intVa...
// Add active class to active navigation link $(document).ready(function () { $('ul.nav.navbar-nav').find('a[href="' + location.pathname + '"]') .closest('li').addClass('active'); });
Sometimes, you want your threads to simultaneously share data. When this happens it is important to be aware of the code and lock any parts that could go wrong. A simple example of two threads counting is shown below. Here is some dangerous (incorrect) code: using System.Threading; class MainCl...
Processing tabular data with awk is very easy, provided that the input is correctly formatted. Most software producing tabular data use specific features of this family of formats, and awk programs processing tabular data are often specific to a data produced by a specific software. If a more gener...

Page 91 of 296