Tutorial by Examples: n

groups username More detailed information about user and group numerical IDs can be found with id username.
This can be useful if you're writing a game or something that needs to execute a piece of code every a few seconds. import android.os.Handler; public class Timer { private Handler handler; private boolean paused; private int interval; private Runnable task = new Runnable ...
// World physics self.physicsWorld.gravity = CGVectorMake(0, -9.8);
Firstly, we set node category let groundBody: UInt32 = 0x1 << 0 let boxBody: UInt32 = 0x1 << 1 Then add Ground type node and Box type node. let ground = SKSpriteNode(color: UIColor.cyanColor(), size: CGSizeMake(self.frame.width, 50)) ground.position = CGPointMake(CGRectGetMidX(sel...
Set scene as delegate //set your scene as SKPhysicsContactDelegate class yourScene: SKScene, SKPhysicsContactDelegate self.physicsWorld.contactDelegate = self; Then you have to implement one or the other of the contact functions: optional func didBegin(contact:) and/or optional fund didEnd...
MSBuild evaluates PropertyGroup, Choose and ItemGroup elements that are directly under the Project element before those that are in Target elements. Directly under the Project element, PropertyGroup and Choose elements are evaluated in the order in which they appear, and then ItemGroup elements a...
=SUMPRODUCT((A1:A100<>"")/COUNTIF(A1:A100,A1:A100&"")) counts unique cell values within A1:A100, excluding blank cells and ones with an empty string (""). How does it do that? Example: A1:A100 = [1, 1, 2, "apple", "peach", &qu...
=SUMPRODUCT(IF(FREQUENCY(MATCH(A1:A100,A1:A100,0),MATCH(A1:A100,A1:A100,0))>0,1))
add_action( 'init', function() { // do something here } ); Using a function block to hook a set of instructions. With the init hook, the set of instructions will be executed right after wordpress has finished loading the necessary components.
function my_init_function() { // do something here } add_action( 'init', 'my_init_function' ); Using the name of the function to hook a set of instructions. With the init hook, the set of instructions will be executed right after wordpress has finished loading the necessary components. ...
n % 2 == 0 ? trace("n is even!") : trace("n is odd!"); // Assigning the evaluated expression to a variable var message = n % 2 == 0 ? "n is even!" : "n is odd!"; trace(message); Reference "If", Haxe manual
If different users need different datetime format then you may need to parse your incoming date string to actual date according to the format. In this case this snippet may help you. public class DateTimeBinder : DefaultModelBinder { public override object BindModel(ControllerContext control...
In this example you'll learn how to share a file with other apps. We'll use a pdf file in this example although the code works with every other format as well. The roadmap: Specify the directories in which the files you want to share are placed To share files we'll use a FileProvider, a class all...
public void doSomething() { DialogTestBinding binding = DataBindingUtil .inflate(LayoutInflater.from(context), R.layout.dialog_test, null, false); Dialog dialog = new Dialog(context); dialog.setContentView(binding.getRoot()); dialog.show(); }
Pulls the code from a certain specified file into another file where the call was made. E.g. inside example.php <h1>Hello World!</h1> Inside page.php // header code get_template_part('example'); // rest of page code Output: // header code <h1>Hello World</h1> /...
When the command-line syntax for an application is simple, it is reasonable to do the command argument processing entirely in custom code. In this example, we will present a series of simple case studies. In each case, the code will produce error messages if the arguments are unacceptable, and the...
This example shows how to use the Firebase Cloud Messaging(FCM) platform. FCM is a successor of Google Cloud Messaging(GCM). It does not require C2D_MESSAGE permissions from the app users. Steps to integrate FCM are as follows. Create sample hello world project in Android Studio Your Android...
Angular 1 is at heart a DOM compiler. We can pass it HTML, either as a template or just as a regular web page, and then have it compile an app. We can tell Angular to treat a region of the page as an expression using the {{ }} handlebars style syntax. Anything between the curly braces will be compi...
To start Alfresco: Switch to the alfresco user Change to the $ALFRESCO_HOME directory Run ./alfresco.sh start To stop Alfresco: Switch to the alfresco user Change to the $ALFRESCO_HOME directory Run ./alfresco.sh start
Alfresco logs live in $ALFRESCO_HOME/tomcat/logs/catalina.out.

Page 701 of 1088