Tutorial by Examples: er

public DateTime SomeCalculation() { return DateTime.Now.AddDays(3); } vs public DateTime SomeCalculation(DateTime inputDate) { return inputDate.AddDays(3); }
> chmod 644 example.txt > ls -l example.txt -rw-r--r-- 1 owner ogroup 57 Jul 3 10:13 example.txt The above command changes the file permissions to allow the file owner to read and write to a file. It also allows users in the owner's group and other users in the system to read the file....
function createNewFolderInGoogleDrive() { var folderName,newFolder;//Declare variable names folderName = "Test Folder " + new Date().toString().slice(0,15);//Create a new folder name with date on end newFolder = DriveApp.createFolder(folderName);//Create a new folder in the ro...
function createGoogleDriveFileOfMimeType() { var content,fileName,newFile;//Declare variable names fileName = "Test File " + new Date().toString().slice(0,15);//Create a new file name with date on end content = "This is the file Content"; newFile = DriveApp.crea...
function createGoogleDriveTextFile() { var content,fileName,newFile;//Declare variable names fileName = "Test Doc " + new Date().toString().slice(0,15);//Create a new file name with date on end content = "This is the file Content"; newFile = DriveApp.createFile(...
function processGoogleDriveFolders() { var arrayAllFolderNames,continuationToken,folders,foldersFromToken,thisFolder;//Declare variable names arrayAllFolderNames = [];//Create an empty array and assign it to this variable name folders = DriveApp.getFolders();//Get all folders from G...
Imports System.Data.OleDb Private WithEvents _connection As OleDbConnection Private _connectionString As String = "myConnectionString" Public ReadOnly Property Connection As OleDbConnection Get If _connection Is Nothing Then _co...
Two useful higher-order functions are the binary application (@@) and reverse-application or "pipe" (|>) operators. Although since 4.01 they're available as primitives, it might still be instructive to define them here: let (|>) x f = f x let (@@) f x = f x Consider the problem ...
UI-Router: .state('profile', { url: '/profile', controller: 'profileCtrl as vm' resolve: { module: function($ocLazyLoad) { return $ocLazyLoad.load([ 'path/to/profile/module.js', 'path/to/profile/style.css' ]); } } }); ngRoute: .when('/profile', { controlle...
You need to import System.ComponentModel for using background worker Imports System.ComponentModel Then Declare a private variable Private bgWorker As New BackgroundWorker You need to create two methods for background worker's DoWork and RunWorkerCompleted events and assign them. Private Su...
A common mistake is to declare a slice and start requesting indexes from it without initializing it, which leads to an "index out of range" panic. The following code explains how to recover from the panic without exiting the program, which is the normal behavior for a panic. In most situat...
You need to decide what your forest structure is going to look like before you install Active Directory for the first time. Are you to have just one domain in your forest, or are you going to have multiple domains in your forest? Active Directory can support multiple sites. Generally sites are spl...
To simulate paging using REST you can do the following: Use the $skip=n parameter to skip the first n entries according to the $orderby parameter Use the $top=n parameter to return the top n entries according to the $orderby and $skip parameters. var endpointUrl = "/_api/lists('g...
Very often it happens to deal with models which have something like a published field. Such kind of fields are almost always used when retrieving objects, so that you will find yourself to write something like: my_news = News.objects.filter(published=True) too many times. You can use custom mana...
<ul class="nav nav-pills nav-stacked"> <li role="presentation" class="active"><a href="#">Home</a></li> <li role="presentation"><a href="#">Profile</a></li> <li role="pr...
For the layout above your customrow.axml file is as shown below <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_heigh...
Usually to use the converter, we have to define it as resource in the following way: <converters:SomeConverter x:Key="SomeConverter"/> It is possible to skip this step by defining a converter as MarkupExtension and implementing the method ProvideValue. The following example conve...
It is possible to pass multiple bound values as a CommandParameter using MultiBinding with a very simple IMultiValueConverter: namespace MyProject.Converters { public class Converter_MultipleCommandParameters : MarkupExtension, IMultiValueConverter { public object Convert(object...
<img src="{{ asset('static/images/logo-default.png') }}" alt="Logo"/> <!--Generates path for the file "/web/static/images/logo-default.png" -->
In ExtJS, you can override nearly any method of the framework and replace it with your own. This allows you to modify existing classes without directly modifying the ExtJS source code. Sometimes, you may want to enhance an existing class or provide a sane default property on a class. For example, ...

Page 276 of 417