Tutorial by Examples: sin

This example uses the official Google .net Client library. PM> Install-Package Google.Apis.AnalyticsReporting.v4 Authorization Requires one of the following OAuth scopes: https://www.googleapis.com/auth/analytics.readonly https://www.googleapis.com/auth/analytics Oauth2 // The...
API requests are HTTP POST with the access token attached at the end of the API end point. Authorization Requires one of the following OAuth scopes: https://www.googleapis.com/auth/analytics.readonly https://www.googleapis.com/auth/analytics Note when posting the data use ContentType = &...
// Let's take an arbitrary piece of data, a 4-byte integer in this case let some_data: u32 = 14; // Create a constant raw pointer pointing to the data above let data_ptr: *const u32 = &some_data as *const u32; // Note: creating a raw pointer is totally safe but dereferencing a raw pointe...
// Let's take a mutable piece of data, a 4-byte integer in this case let mut some_data: u32 = 14; // Create a mutable raw pointer pointing to the data above let data_ptr: *mut u32 = &mut some_data as *mut u32; // Note: creating a raw pointer is totally safe but dereferencing a raw pointe...
Unlike normal Rust references, raw pointers are allowed to take null values. use std::ptr; // Create a const NULL pointer let null_ptr: *const u16 = ptr::null(); // Create a mutable NULL pointer let mut_null_ptr: *mut u16 = ptr::null_mut();
Uses C standard format codes. from datetime import datetime datetime_string = 'Oct 1 2016, 00:00:00' datetime_string_format = '%b %d %Y, %H:%M:%S' datetime.strptime(datetime_string, datetime_string_format) # datetime.datetime(2016, 10, 1, 0, 0)
Instances have a lot of metadata that gets returned from a call to describe-instances, but often times you just want to see the basics. You can use a JMESPath query combined with table output to show concise instance information in an easily readable way. aws ec2 describe-instances --output table -...
There are several packages which can run Processing sketches in the Atom editor. These instructions use the Script package. There are also available packages for syntax highlighting and autocomplete, which are required for Script to identify Processing filetypes. Install the Script plugin. Either b...
First of all, Merged Cells are there only to improve the look of your sheets. So it is literally the last thing that you should do, once your sheet and workbook are totally functional! Where is the data in a Merged Range? When you merge a Range, you'll only display one block. The data will be ...
For example: You are going to migrate an existing column from non-required to required. In this case you might need to fill some default values in your migration for rows where the altered fields are actually NULL. In case the default value is simple (e.g. "0") you might use a default or d...
You can read content of file using OPENROWSET(BULK) function and store content in some table: INSERT INTO myTable(content) SELECT BulkColumn FROM OPENROWSET(BULK N'C:\Text1.txt', SINGLE_BLOB) AS Document; SINGLE_BLOB option will read entire content from a file as single cell. ...
Yu can define format of the file that will be imported using FORMATFILE option: INSERT INTO mytable SELECT a.* FROM OPENROWSET(BULK 'c:\test\values.txt', FORMATFILE = 'c:\test\values.fmt') AS a; The format file, format_file.fmt, describes the columns in values.txt: 9.0 2 1 SQ...
You can use OPENROWSET to read content of file and pass it to some other function that will parse results. The following example shows hot to read entire content of JSON file using OPENROWSET(BULK) and then provide BulkColumn to OPENJSON function that will parse JSON and return columns: SELECT boo...
A basic implementation for singly-linked-list in java - that can add integer values to the end of the list, remove the first value encountered value from list, return an array of values at a given instant and determine whether a given value is present in the list. Node.java package com.example.so....
Following setup ensures that testing framework (PHPUnit) uses :memory: database. config/database.php 'connections' => [ 'sqlite_testing' => [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ], . . . ./phpun...
a = [1, 2, 3, 4, 5] # steps through the list backwards (step=-1) b = a[::-1] # built-in list method to reverse 'a' a.reverse() if a = b: print(True) print(b) # Output: # True # [5, 4, 3, 2, 1]
def shift_list(array, s): """Shifts the elements of a list to the left or right. Args: array - the list to shift s - the amount to shift the list ('+': right-shift, '-': left-shift) Returns: shifted_array - the shifted list "&quo...
select owner, table_name from all_tables ALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. COLS is a synonym for USER_TAB_COLUMNS. select * from all_tab_columns where table_name = :tname
While declaring a function in the $rootscope has it's advantages, we can also declare a $scope function any part of the code that is injected by the $scope service. Controller, for instance. Controller myApp.controller('myController', ['$scope', function($scope){ $scope.myFunction = function ...

Page 118 of 161