Tutorial by Examples: l

This example limits SELECT result to 15 percentage of total row count. SELECT TOP 15 PERCENT * FROM table_name
You can define implementation for specific instantiations of a template class/method. For example if you have: template <typename T> T sqrt(T t) { /* Some generic implementation */ } You can then write: template<> int sqrt<int>(int i) { /* Highly optimized integer implement...
Filter an enumeration by using a conditional expression Synonyms: Where-Object where ? Example: $names = @( "Aaron", "Albert", "Alphonse","Bernie", "Charlie", "Danny", "Ernie", "Frank") $names | Where-Object {...
Projecting an enumeration allows you to extract specific members of each object, to extract all the details, or to compute values for each object Synonyms: Select-Object select Selecting a subset of the properties: $dir = dir "C:\MyFolder" $dir | Select-Object Name, FullName, Att...
Class methods present alternate ways to build instances of classes. To illustrate, let's look at an example. Let's suppose we have a relatively simple Person class: class Person(object): def __init__(self, first_name, last_name, age): self.first_name = first_name self.last...
raw_data = {'first_name': ['John', 'Jane', 'Jim'], 'last_name': ['Doe', 'Smith', 'Jones'], 'department': ['Accounting', 'Sales', 'Engineering'],} df = pd.DataFrame(raw_data,columns=raw_data.keys()) df.to_csv('data_file.csv')
The cx and cy values designate the location of the center of the circle. The r attribute specifies the size of the radius of the circle. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle cx="40" cy="40&q...
class Car { public position: number = 0; private speed: number = 42; move() { this.position += this.speed; } } In this example, we declare a simple class Car. The class has three members: a private property speed, a public property position and a public met...
Create a directory called ansible-helloworld-playbook mkdir ansible-helloworld-playbook Create a file hosts and add remote systems how want to manage. As ansible relies on ssh to connect the machines, you should make sure they are already accessible to you in ssh from your computer. 192.168.1.1...
public class Singleton { private static final Singleton INSTANCE = new Singleton(); private Singleton() {} public static Singleton getInstance() { return INSTANCE; } } It can be argued that this example is effectively lazy initialization. Section 12.4.1 of ...
To implement an item click listener and/or an item long click listener, you can create an interface in your adapter: public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder> { public interface OnItemClickListener { void onItemSeleted(int position, Vi...
Start with an iterable which needs to be grouped lst = [("a", 5, 6), ("b", 2, 4), ("a", 2, 5), ("c", 2, 6)] Generate the grouped generator, grouping by the second element in each tuple: def testGroupBy(lst): groups = itertools.groupby(lst, key=lambda...
Scalars are Perl's most basic data type. They're marked with the sigil $ and hold a single value of one of three types: a number (3, 42, 3.141, etc.) a string ('hi', "abc", etc.) a reference to a variable (see other examples). my $integer = 3; # number my $str...
HTML <p>My shadow always follows me.</p> CSS p { -webkit-filter: drop-shadow(10px 10px 1px green); filter: drop-shadow(10px 10px 1px green); } Result
To use multiple filters, separate each value with a space. HTML <img src='donald-duck.png' alt='Donald Duck' title='Donald Duck' /> CSS img { -webkit-filter: brightness(200%) grayscale(100%) sepia(100%) invert(100%); filter: brightness(200%) grayscale(100%) sepia(100%) invert(1...
HTML <div></div> CSS div { width: 100px; height: 100px; background-color: white; -webkit-filter: invert(100%); filter: invert(100%); } Result Turns from white to black.
HTML <img src='donald-duck.png' alt='Donald Duck' title='Donald Duck' /> CSS img { -webkit-filter: blur(1px); filter: blur(1px); } Result Makes you wanna rub your glasses.
A Bootstrap carousel is a Bootstrap component that creates a slideshow which cycles through elements within the carousel. Here is a basic HTML usage example: <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators --...
Carousel components can be instantiated via jQuery with the function $('.carousel').carousel(options), where $('.carousel') is a top-level reference to the specific carousel and options is a Javascript object specifying the carousel's default attributes. The options object allows for multiple prope...
using System; using Xamarin.Forms; namespace NavigationApp { public class App : Application { public App() { MainPage = new NavigationPage(new FirstPage()); } } public class FirstPage : ContentPage { Label FirstPage...

Page 120 of 861