Tutorial by Examples: ee

Getting a reference to a named sheet tab var spread_sheet = SpreadsheetApp.getActiveSpreadsheet();//Get active spreadsheet var sheet_with_name_a = spread_sheet.getSheetByName("sheet_tab_name"); Getting active sheet tab var spread_sheet = SpreadsheetApp.getActiveSpreadsheet(); var ac...
If you aren't sure whether a value is of the type you think it is, you can safely cast it using the as operator. If the value is not of that type, the resulting value will be null. object value = "-1"; int? number = value as int?; if(number != null) { Console.WriteLine(Math.Abs(nu...
It is sometimes useful to verify that your work on Developer edition hasn't introduced a dependency on any features restricted to Enterprise edition. You can do this using the sys.dm_db_persisted_sku_features system view, like so: SELECT * FROM sys.dm_db_persisted_sku_features Against the datab...
generate sample DF In [39]: df = pd.DataFrame(np.random.randint(0, 10, size=(5, 6)), columns=['a10','a20','a25','b','c','d']) In [40]: df Out[40]: a10 a20 a25 b c d 0 2 3 7 5 4 7 1 3 1 5 7 2 6 2 7 4 9 0 8 7 3 5 8 8 9 6 8 4 8 1 ...
Maps and keyword lists have different application. For instance, a map cannot have two keys with the same value and it's not ordered. Conversely, a Keyword list can be a little bit hard to use in pattern matching in some cases. Here's a few use cases for maps vs keyword lists. Use keyword lists wh...
Inline expansion can be disabled with the go:noinline pragma. For example, if we build the following simple program: package main func printhello() { println("Hello") } func main() { printhello() } we get output that looks like this (trimmed for readability): $ go ...
This example shows how to configure multiple environments with different Dependency Injection configuration and separate middlewares in one Startup class. Alongside of public void Configure(IApplicationBuilder app) and public void ConfigureServices(IServiceCollection services) methods one can use C...
A type of live region where non-essential information changes frequently. <ul role="marquee"> <li>Dow +0.26%</li> <li>Nasdaq +0.54%</li> <li>S&P +0.44%</li> </ul>
A type of list that may contain sub-level nested groups that can be collapsed and expanded. <ul role="tree"> <li role="treeitem"> Part 1 <ul> <li role="treeitem">Chapter 1</li> <li role="treeitem"&gt...
A grid whose rows can be expanded and collapsed in the same manner as for a tree.
An option item of a tree. This is an element within a tree that may be expanded or collapsed if it contains a sub-level group of treeitems. <ul role="tree"> <li role="treeitem"> Part 1 <ul> <li role="treeitem">Chapter 1</l...
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; public class ReadingUTF8TextFile { public static void main(String[] args) throws IOException { ...
Even when all your work is directed at a single worksheet, it's still a very good practice to explicitly specify the worksheet in your code. This habit makes it much easier to expand your code later, or to lift parts (or all) of a Sub or Function to be re-used someplace else. Many developers establi...
A simple context tree (containing some common values that might be request scoped and included in a context) built from Go code like the following: // Pseudo-Go ctx := context.WithValue( context.WithDeadline( context.WithValue(context.Background(), sidKey, sid), time.Now().A...
Directives, as the name suggests, are direction or instructions for the container to follow when translating a JSP to a servlet. There are 3 directives namely page, include and taglib which you can use in your JSP. Below is a simple example of using page directive: <%@ page isErrorPage="tr...
The most feasible way is to use, the DateTime class. An example: <?php // Create a date time object, which has the value of ~ two years ago $twoYearsAgo = new DateTime("2014-01-18 20:05:56"); // Create a date time object, which has the value of ~ now $now = new DateTime("2016...
The DATEDIF function returns the difference between two date values, based on the interval specified. It is provided for compatibility with Lotus 1-2-3. The DATEDIF function cannot be found on the function list and autocomplete and screen tips are unavailable. Note: It is pronounced "date diff&...
This illustrates that union members shares memory and that struct members does not share memory. #include <stdio.h> #include <string.h> union My_Union { int variable_1; int variable_2; }; struct My_Struct { int variable_1; int variable_2; }; int main (void) { ...
// RawRepresentable has an associatedType RawValue. // For this struct, we will make the compiler infer the type // by implementing the rawValue variable with a type of String // // Compiler infers RawValue = String without needing typealias // struct NotificationName: RawRepresentable { ...
Pattern matching allows to deconstruct complex values and it is by no way limited to the “outer most” level of the representation of a value. To illustrate this, we implement the function transforming a boolean expression into a boolean expression where all negations are only on atoms, the so calle...

Page 13 of 54