Tutorial by Examples: c

A classic use of here documents is to create a file by typing its content: cat > fruits.txt << EOF apple orange lemon EOF The here-document is the lines between the << EOF and EOF. This here document becomes the input of the cat command. The cat command simply outputs its in...
You can override 4 methods of SKScene to detect user touch class GameScene: SKScene { override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { } override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) { ...
If you need to add custom headers to your volley requests, you can't do this after initialisation, as the headers are saved in a private variable. Instead, you need to override the getHeaders() method of Request.class as such: new JsonObjectRequest(REQUEST_METHOD, REQUEST_URL, REQUEST_BODY, RESP_L...
Due to not being Excel-VBA exclusive contents this Example has been moved to VBA documentation. Link: Dynamic Arrays (Array Resizing and Dynamic Handling)
// Shows the author and commit per line of specified file git blame test.c // Shows the author email and commit per line of specified git blame -e test.c file // Limits the selection of lines by specified range git blame -L 1,10 test.c
Configure your app's URLconf to automatically use a URL namespace by setting the app_name attribute: # In <myapp>/urls.py from django.conf.urls import url from .views import overview app_name = 'myapp' urlpatterns = [ url(r'^$', overview, name='overview'), ] This will set t...
Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members. In the example below, sayHello() and sayGoodbye() are using self and $this difference can be observed here. cl...
The factorial of a number (denoted with !, as for instance 9!) is the multiplication of that number with the factorial of one lower. So, for instance, 9! = 9 x 8! = 9 x 8 x 7! = 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1. So in code that becomes, using recursion: long Factorial(long x) { if (x < 1...
The dot operator repeats the last action performed, for instance: file test.tx helo, World! helo, David! (cursor at [1][1]) Now perform a cwHello<Esc> (Change Word helo to Hello) Now the buffer looks like that: Hello, World! helo, David! (cursor at [1][5]) After typing j_ the cur...
You can create temporary files which has a visible name on the file system which can be accessed via the name property. The file can, on unix systems, be configured to delete on closure (set by delete param, default is True) or can be reopened later. The following will create and open a named temp...
You might have heard that everything in Python is an object, even literals. This means, for example, 7 is an object as well, which means it has attributes. For example, one of these attributes is the bit_length. It returns the amount of bits needed to represent the value it is called upon. x = 7 ...
<svg width="900px" height="400px" viewBox="900 400"> <defs> <filter id="GaussianHardEdge" x="0%" y="0%" width="100%" height="100%"> <feGaussianBlur stdDeviation="5"/&gt...
<svg width="900px" height="400px" viewBox="0 0 900 400"> <defs> <filter id="BokehBlur" color-interpolation-filters="sRGB"> <feGaussianBlur stdDeviation="2" result="blurSource"/> <feCol...
<svg width="800px" height="600px"> <defs> <filter id="drop-shadow"> <feGaussianBlur in="SourceAlpha" stdDeviation="4"/> <feOffset dx="5" dy="5" result="offsetblur"/> <f...
<svg width="800px" height="600px"> <defs> <filter id="complex-shadow" color-interpolation-filters="sRGB" x="-50%" y="-50%" height="200%" width="200%"> <!-- Take source alpha, offset it by angle/...
<svg width="800px" height="600px"> <defs> <filter id="greyscale"> <feColorMatrix type="matrix" values="0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0...
<svg width="800px" height="600px"> <defs> <filter id="greyscale"> <feColorMatrix type="matrix" values="0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 ...
<svg width="800px" height="600px"> <defs> <filter id="greyscale"> <feColorMatrix type="matrix" values=".2 .2 .2 0 0 .6 .6 .6 0 0 .2 .2 .2 0 0 ...
<svg width="800px" height="600px"> <defs> <filter id="focus-blur" > <feDiffuseLighting result = "diffOut" diffuseConstant = "1" lighting-color="white"> <feSpotLight id="spotlight" x =...
OVERVIEW cocos2d-x is an open source, cross-platform game engine. It allows developers to code in C++, Lua and Javascript deployment into iOS, Android, Windows Phone, Mac OS X, Windows Desktop and Linux. PREREQUISITES Build Requirements Mac OS X 10.7+, Xcode 4.6+ Windows 7+, VS 2012+ Ubunt...

Page 301 of 826