Tutorial by Examples: c

Scalars are Perl's most basic data type. They're marked with the sigil $ and hold a single value of one of three types: a number (3, 42, 3.141, etc.) a string ('hi', "abc", etc.) a reference to a variable (see other examples). my $integer = 3; # number my $str...
HTML <div></div> CSS div { width: 100px; height: 100px; background-color: white; -webkit-filter: invert(100%); filter: invert(100%); } Result Turns from white to black.
A Bootstrap carousel is a Bootstrap component that creates a slideshow which cycles through elements within the carousel. Here is a basic HTML usage example: <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators --...
Carousel components can be instantiated via jQuery with the function $('.carousel').carousel(options), where $('.carousel') is a top-level reference to the specific carousel and options is a Javascript object specifying the carousel's default attributes. The options object allows for multiple prope...
Schema store: { "title": "JSON schema for the ASP.NET global configuration files", "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "additionalProperties": true, "required": [ &qu...
Generally you should avoid using the default database role (often postgres) in your application. You should instead create a user with lower levels of privileges. Here we make one called niceusername and give it a password very-strong-password CREATE ROLE niceusername with PASSWORD 'very-strong-pas...
The arc4random_uniform() function is the simplest way to get high-quality random integers. As per the manual: arc4random_uniform(upper_bound) will return a uniformly distributed random number less than upper_bound. arc4random_uniform() is recommended over constructions like ''arc4random() % uppe...
Create an instance of UIScrollView with a CGRect as frame. Swift let scrollview = UIScrollView.init(frame: CGRect(x: 0, y: 0, width: 320, height: 400)) Objective-C UIScrollView *scrollview = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 400)];
The contentSize property must be set to the size of the scrollable content. This specifies the size of the scrollable area. Scrolling is visible when scrollable area i.e. contentSize is larger than the UIScrollView frame size. With Autolayout: When the scroll view's content is set up using autolay...
When referring to a worksheet, a range or individual cells, it is important to fully qualify the reference. For example: ThisWorkbook.Worksheets("Sheet1").Range(Cells(1, 2), Cells(2, 3)).Copy Is not fully qualified: The Cells references do not have a workbook and worksheet associated ...
C# allows user-defined types to control assignment and casting through the use of the explicit and implicit keywords. The signature of the method takes the form: public static <implicit/explicit> operator <ResultingType>(<SourceType> myType) The method cannot take any more argu...
Command: adb devices Result example: List of devices attached emulator-5554 device PhoneRT45Fr54 offline 123.454.67.45 no device First column - device serial number Second column - connection status Android documentation
Enter these commands in Android device Terminal su setprop service.adb.tcp.port 5555 stop adbd start adbd After this, you can use CMD and ADB to connect using the following command adb connect 192.168.0.101.5555 And you can disable it and return ADB to listening on USB with setprop servi...
'if only one area (not multiple areas): With Range("A3:D20") Debug.Print .Cells(.Cells.CountLarge).Row Debug.Print .Item(.Cells.CountLarge).Row 'using .item is also possible End With 'Debug prints: 20 'with multiple areas (also works if only one area): Dim rngArea As Range,...
Many developers like to customize the font, text, and background color of their IDE's. You can do this in Xcode by opening the app preference pane, either by going to XCODE->Preferences, or by pressing '⌘,' With the preference pane open you can click on the 'Fonts and Colors' tab. From her...
Create an individual Localizable.strings file for each language. The right side would be different for each language. Think of it as a key-value pair: "str" = "str-language"; Access str in Objective-C: //Try to provide description on the localized string to be able to create...
In Python 3.x all classes are new-style classes; when defining a new class python implicitly makes it inherit from object. As such, specifying object in a class definition is a completely optional: Python 3.x3.0 class X: pass class Y(object): pass Both of these classes now contain object in ...
Here is an example of a method that would live inside a SQLiteOpenHelper subclass. It uses the searchTerm String to filter the results, iterates through the Cursor's contents, and returns those contents in a List of Product Objects. First, define the Product POJO class that will be the container f...
Arrays You can iterate over nested arrays: [[1, 2], [3, 4]].each { |(a, b)| p "a: #{ a }", "b: #{ b }" } The following syntax is allowed too: [[1, 2], [3, 4]].each { |a, b| "a: #{ a }", "b: #{ b }" } Will produce: "a: 1" "b: 2" ...
CSS can be applied in multiple places: inline (Node.setStyle) in a stylesheet to a Scene as user agent stylesheet (not demonstrated here) as "normal" stylesheet for the Scene to a Node This allows to change styleable properties of Nodes. The following example demonst...

Page 119 of 826