Tutorial by Examples: c

<svg width="400px" height="400px"> <defs> <rect id="defrect" fill="blue" fill-opacity=".5" x="50" y="50" width="100" height="100"/> </defs> <rect fill="red" x="...
<svg width="600px" height="600px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <polyline points="10,10,50,40,80,30,120,90,130,10,180,50,250,100,300,10" fill="none" stroke="red" s...
<svg width="600px" height="400px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <line x1="10" y1="20" x2="300" y2="20" stroke="red" stroke-width="20"...
SVG Patterns behave significantly differently than CSS background images when filling equivalent shapes. This can lead to significant surprises for new-comers to SVG. Below are examples of a pattern defined in all possible combinations of patternUnits and patternContentUnits - showing how these sett...
To add a language to Sublime Text, you use Package Control. You can do this by pasting the correct Python code (available on the Package Control site linked above), or by downloading the .sublime-package file (also available for download on the site). Once you set up Package Control, restart Sublime...
element.style only reads CSS properties set inline, as an element attribute. However, styles are often set in an external stylesheet. The actual style of an element can be accessed with window.getComputedStyle(element). This function returns an object containing the actual computed value of all the ...
Scoped enumerations: ... enum class Status; // Forward declaration Status doWork(); // Use the forward declaration ... enum class Status { Invalid, Success, Fail }; Status doWork() // Full declaration required for implementation { return Status::Success; } Unscoped enumerations:...
In this example, we are going to create an image picker that previews your picture before uploading. The previewer also supports drag and dropping files into the input. In this example, I am only going to cover uploading single files, but you can tinker a bit to get multi file upload working. image...
For live demo click.. App index ts import {bootstrap} from '@angular/platform-browser-dynamic'; import {MyForm} from './my-form.component.ts'; bootstrap(MyForm); Custom validator import {Control} from @'angular/common'; export class CustomValidators { static emailFormat(control: Cont...
This is a basic example of a C Extension using C++ and Boost. C++ Code C++ code put in hello.cpp: #include <boost/python/module.hpp> #include <boost/python/list.hpp> #include <boost/python/class.hpp> #include <boost/python/def.hpp> // Return a hello world string. st...
M-x magit-status s RET <file-to-stage> RET c c <commit message> C-c C-c q
CALL "submodule" CALL "submodule" CANCEL "submodule" CALL "submodule" Any static data in the working set of submodule will be in an initial state on the last CALL statement above. The second CALL will have any initial values set as left overs from the...
COBOL can use static linkage for the following statement. GnuCOBOL uses dynamic linkage by default for all external symbols known at compile time, even when the symbol is a literal: CALL "subprogram" USING a b c *> run a (possibly static linked) sub program ...
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; NSURL *URL = [NSURL URLWithString:@"http://example.com/download.zip"]; NSURLReq...
This example will show how to make and use animation clips for game objects or players. Note, the models used in this example are downloaded from Unity Asset Store. The player was downloaded from the following link: https://www.assetstore.unity3d.com/en/#!/content/21874. To create animations, firs...
Vim has its own built-in Python interpreter. Thus it could use a different version of the default interpreter for the operating system. To check with which version of Python Vim was compiled, type the following command: :python import sys; print(sys.version) This imports the sys module and prin...
To be able to use vim commands in Python, the vim module should be imported. :python import vim After having this module imported, the user has access to the command function: :python vim.command("normal iText to insert") This command would execute i in normal mode then type Text t...
package example; import org.testng.annotations.*; // using TestNG annotations public class Test { @BeforeClass public void setUp() { // code that will be invoked when this test is instantiated } @Test(groups = { "fast" }) public void aFastTest() { System.out...
public class ViewAnimationUtils { public static void expand(final View v) { v.measure(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); final int targtetHeight = v.getMeasuredHeight(); v.getLayoutParams().height = 0; v...

Page 483 of 826