Tutorial by Examples: c

Consider this structure: <cfset stFoo = { a = "one" , b = "two" , c = "three" , d = "foue" } /> Tag syntax Parameters Notice the use of the attribute item instead of index. AttributeRequiredTypeDefaultDescriptioncollection...
To split a JID into its component parts (the localpart, domainpart, and resourcepart), the following algorithm should be used (where the localpart is represented by lp, the resourcepart by rp, and the domainpart by dp and ∈ is used to check if the given character is included in the string): Note ...
In a module (library or application) where you need the aar file you have to add in your build.gradle the repository: repositories { flatDir { dirs 'libs' } } and add the dependency: dependencies { compile(name:'nameOfYourAARFileWithoutExtension', ext:'aar') } Pay a...
The aar file doesn't contain the transitive dependencies and doesn't have a pom file which describes the dependencies used by the library. It means that, if you are importing a aar file using a flatDir repo you have to specify the dependencies also in your project. You should use a maven repositor...
In some cases, you want to show your users a UIPickerView with predefined contents for a UITextField instead of a keyboard. Create a custom UIPickerView At first, you need a custom wrapper-class for UIPickerView conforming to the protocols UIPickerViewDataSource and UIPickerViewDelegate. class My...
NSString *someString = @" Objective-C Language \n"; NSString *trimmedString = [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; //Output will be - "Objective-C Language" Method stringByTrimmingCharactersInSet returns a new str...
Swift let color = UIColor.redColor() let size = CGSize(width: 200, height: 200) UIGraphicsBeginImageContextWithOptions(size, false, 0.0) CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(), color.CGColor) CGContextFillRect(UIGraphicsGetCurrentContext(), CGRect(origin: .zero, size: si...
The filesystem configuration file is located at config/filesystems.php. Within this file you may configure all of your "disks". Each disk represents a particular storage driver and storage location. Example configurations for each supported driver is included in the configuration file. So,...
The Storage facade may be used to interact with any of your configured disks. Alternatively, you may type-hint the Illuminate\Contracts\Filesystem\Factory contract on any class that is resolved via the Laravel service container. Retrieving A Particular Disk $disk = Storage::disk('s3'); $disk = ...
Laravel's Flysystem integration provides drivers for several "drivers" out of the box; however, Flysystem is not limited to these and has adapters for many other storage systems. You can create a custom driver if you want to use one of these additional adapters in your Laravel application....
[ServiceContract] public interface IBookService { [OperationContract] [WebGet] List<Book> GetBooksList(); [OperationContract] [WebGet(UriTemplate = "Book/{id}")] Book GetBookById(string id); [OperationContract] [WebInvoke(UriTemplate = &...
Object obj = new Object(); // Note the 'new' keyword Where: Object is a reference type. obj is the variable in which to store the new reference. Object() is the call to a constructor of Object. What happens: Space in memory is allocated for the object. The constructor Object() is call...
The CSS multi-column layout makes it easy to create multiple columns of text. Code <div id="multi-columns">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation...
The column-width property sets the minimum column width. If column-count is not defined the browser will make as many columns as fit in the available width. Code: <div id="multi-columns"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididun...
Simple Example (centering a single element) HTML <div class="aligner"> <div class="aligner-item">…</div> </div> CSS .aligner { display: flex; align-items: center; justify-content: center; } .aligner-item { max-width: 50%; /*for d...
This bidirectional mapping requires the mappedBy attribute on the OneToMany association and the inversedBy attribute on the ManyToOne association. A bidirectional relationship has both an owning and inverse side. OneToMany relationships can use join tables, so you have to specify an owning side. Th...
The @if control directive evaluates a given expression and if it returns anything other than false, it processes its block of styles. Sass Example $test-variable: true !default =test-mixin @if $test-variable display: block @else display: none .test-selector +test-mixin ...
Sass supports the following standard arithmetic operators: OperatorDescription+Addition–Subtraction*Multiplication/Division%Remainder Examples p { font-size: 16px + 4px; // 20px } h3 { width: 2px * 5 + 12px; // 22px } h2 { width: 8px + (12px / 2) * 3; // 26px } Norm...
Sass supports all the usual comparison operators: <,>,==,!=,<=,>=. Examples (10px == 10) // Returns true ("3" == 3) // Returns false $padding: 10px; $padding <= 8px; // Returns false
HTML <div class="wrap"> <img src="http://lorempixel.com/400/200/" /> </div> CSS .wrap { height: 50px;/* max image height */ width: 100px; border: 1px solid blue; text-align: center; } .wrap:before { content:""; di...

Page 242 of 826