Tutorial by Examples: is

public class ConnectSocketExample { private int HTTP_PORT = 80; /** * example method to create unconnected socket * then connect to it * at end return connected socket * * @param httpHostName - endpoint host name fot socket connection * @throws IOEx...
A macro is a series of keystrokes meant to be "played back" by Vim without any delay. Macros can be stored in registers or variables, bound to keys, or executed on the command line. Here is a simple macro that uppercases the third word on a line: 0wwgUiw That macro could be recorded i...
The SilverStripe CMS can be customised to change the CMS logo, link and application name. This can be achieved with the following config.yml settings LeftAndMain: application_name: 'My Application' application_link: 'http://www.example.com/' extra_requirements_css: - mysite/css/cms.c...
Some regex engines (such as .NET) can handle context-free expressions, and will work it out. But that's not the case for most standard engines. And even if they do, you'll end up having a complex hard-to-read expression, whereas using a parsing library could make the job easier. How to find all p...
Using alarm, user can schedule SIGALARM signal to be raised after specified interval. In case user did not blocked, ignored or specified explicit signal handler for this signal, the default action for this signal will be performed on arrival. Per specification default action for SIGALARM is to termi...
An example of code showing how nodes can be inserted at a doubly linked list, how the list can easily be reversed, and how it can be printed in reverse. #include <stdio.h> #include <stdlib.h> /* This data is not always stored in a structure, but it is sometimes for ease of use */ s...
ALTER TABLE person ADD CONSTRAINT pk_PersonSSN PRIMARY KEY (ssn) Note, if the primary key column (in this case ssn) has more than one row with the same candidate key, the above statement will fail, as primary key values must be unique.
SELECT COALESCE(NULL, NULL, 'TechOnTheNet.com', NULL, 'CheckYourMath.com'); Result: 'TechOnTheNet.com' SELECT COALESCE(NULL, 'TechOnTheNet.com', 'CheckYourMath.com'); Result: 'TechOnTheNet.com' SELECT COALESCE(NULL, NULL, 1, 2, 3, NULL, 4); Result: 1
USE msdb Go SELECT dbo.sysjobs.Name AS 'Job Name', 'Job Enabled' = CASE dbo.sysjobs.Enabled WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' END, 'Frequency' = CASE dbo.sysschedules.freq_type WHEN 1 THEN 'Once' WHEN 4 THEN 'Daily' ...
The array is one of Perl's basic variable types. It contains a list, which is an ordered sequence of zero or more scalars. The array is the variable holding (and providing access to) the list data, as is documented in perldata. You can assign a list to an array: my @foo = ( 4, 5, 6 ); You can u...
Lists can also be assigned to hash variables. When creating a list that will be assigned to a hash variable, it is recommended to use the fat comma => between keys and values to show their relationship: my %hash = ( foo => 42, bar => 43, baz => 44 ); The => is really only a specia...
As to pass list into a subroutine, you specify the subroutine's name and then supply the list to it: test_subroutine( 'item1', 'item2' ); test_subroutine 'item1', 'item2'; # same Internally Perl makes aliases to those arguments and put them into the array @_ which is available within the s...
USE AdventureWorks2012; GO CREATE FULLTEXT INDEX ON Production.Document ( Title Language 1033, DocumentSummary Language 1033, Document TYPE COLUMN FileExtension Language 1033 ) KEY INDEX PK_Document_DocumentID ...
Steps to Reproduce (Turbo Forms, CRM 2015.1, --> CRM 2016.2) Form (with or without other required fields) has one field that is empty and required. Lose focus on the empty field ("title" in this example), this triggers the Field Notification Icon: Wire up onChange Handler for emp...
After successfully installing Xamarin as described in the first example, it's time to launch the first sample application. Step 1: Creating a new Project. In Visual Studio, choose New -> Project -> Visual C# -> Cross-Platform -> Blank App (Xamarin.Forms Portable) Name the app "He...
In order for a program to react to a certain signal, other than using default action, custom signal handler can be installed using sigaction. sigaction receives three arguments - signal to act on, pointer to sigaction_t structure which, if not NULL, is describing new behaviour and pointer to sigacti...
Use git revert to revert existing commits, especially when those commits have been pushed to a remote repository. It records some new commits to reverse the effect of some earlier commits, which you can push safely without rewriting history. Don't use git push --force unless you wish to bring down ...
Javassist is a bytecode instrumentation library that allows you to modify bytecode injecting Java code that will be converted to bytecode by Javassist and added to the instrumented class/method at runtime. Lets write the first transformer that actually take an hypothetical class "com.my.to.be....
The following example illustrates how to use CullingGroups to get notifications according to the distance reference point. This script has been simplified for brevity and uses several performance heavy methods. using UnityEngine; using System.Linq; public class CullingGroupBehaviour : Mono...
Following script illustrates how to receive events according to visibility to a set camera. This script uses several performance heavy methods for brevity. using UnityEngine; using System.Linq; public class CullingGroupCameraBehaviour : MonoBehaviour { CullingGroup localCullingGroup;...

Page 50 of 109