Posts

Showing posts from August, 2013

How To Make The Background Image Full Screen In Html Code Example

Example 1: set background image full screen css #mainBackground { width : 100 % ; height : 100 % ; max-height : 100 % ; margin : 0 ; padding : 0 ; background-image : url ( "https://images.unsplash.com/photo-1487058792275-0ad4aaf24ca7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80" ) ; background-size : 100 % 100 % ; background-repeat : no-repeat ; } html , body { height : 100 % ; margin : 0 ; padding : 0 ; } Example 2: css background image full screen responsive html { background : url ( images/bg.jpg ) no-repeat center center fixed ; -webkit-background-size : cover ; -moz-background-size : cover ; -o-background-size : cover ; background-size : cover ; } Example 3: html background image fit to screen body { background-position : center ; background-repeat : no-repeat ; background-size : contain ; }

C String Compare C Programming Code Example

Example 1: statement o compare two strings in c # include <stdio.h> # include <string.h> int main ( ) { char str1 [ ] = "abcd" , str2 [ ] = "abCd" , str3 [ ] = "abcd" ; int result ; // comparing strings str1 and str2 result = strcmp ( str1 , str2 ) ; printf ( "strcmp(str1, str2) = %d\n" , result ) ; // comparing strings str1 and str3 result = strcmp ( str1 , str3 ) ; printf ( "strcmp(str1, str3) = %d\n" , result ) ; return 0 ; } Example 2: string compare in c strcmp ( leftStr , rightStr ) ; //compares ascii value and gives positive, negative or zero.

Std Swap C++ Code Example

Example: swap in cpp int a { } , b { } , temp { } ; cin >> a >> b ; //===================== METHOD-1 temp = a ; a = b ; b = temp ; //===================== METHOD-2 ( XOR ^ ) // example: a^b = 5^7 a = a ^ b ; // 5^7 b = a ^ b ; // 5 ^ 7 ^ 7 //5 ( 7 & 7 dismissed) a = a ^ b ; // 5 ^ 7 ^ 5 //7 ( 5 & 5 dismissed) //===================== METHOD-3 ( swap() ) swap ( a , b ) ; cout << "a " << a << endl ; cout << "b " << b << endl ;

Cannot Enable Gradle's Offline Mode On Android Studio 3.6

Image
Answer : From the Android Studio 3.6 new features blog post: New location to toggle Gradle's offline mode To enable or disable Gradle's offline mode, first select View > Tool Windows > Gradle from the menu bar. Then, near the top of the Gradle window, click Toggle Offline Mode Gradle offline button in the Gradle panel.. Here is the link -- hope that helps! To enable or disable Gradle's offline mode, select View > Tool Windows > Gradle from the menu bar and near the top of the Gradle window, click Toggle Offline Mode To clarify it. In your Android Studio... View > Tool Windows > Gradle And then this... And this...

Bootstrap Util.js Cdn Code Example

Example 1: bootstrap cdn link < ! - - Latest compiled and minified CSS - -> < link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity = "sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin = "anonymous" > < ! - - Optional theme - -> < link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity = "sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin = "anonymous" > < ! - - Latest compiled and minified JavaScript - -> < script src = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity = "sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin = "anonymous" > < / script > Example 2: b

Add Image In Box Decoration Flutter Code Example

Example 1: how to add image from assets inside as a decoration image in container new Container( width: 100.00, height: 100.00, decoration: new BoxDecoration( image: new DecorationImage( image: ExactAssetImage('assets/example.png'), fit: BoxFit.fitHeight, ), )); Example 2: how to add image from assets inside as a decoration image in container Container( height: 120.0, width: 120.0, decoration: BoxDecoration( image: DecorationImage( image: AssetImage( 'assets/assets/alucard.jpg'), fit: BoxFit.fill, ), shape: BoxShape.circle, ), )

How To Import Math.pi In Python Code Example

Example: pi python # import built in math module import math # Showing usage of pi function print ( math.pi )

Line Spacing Between Lines Css Code Example

Example 1: line spacing css line-height : 20 px ; /* 4px +12px + 4px */ /* OR */ line-height : 1.7 em ; /* 1em = 12px in this case. 20/12 == 1.666666 */ Example 2: css line spacing line-height : 1.5 ; /* Prefered */ line-height : 1.5 em ; line-height : 150 % ; line-height : 24 px ;

Ado Stands For Code Example

Example: ado stands for ActiveX Data Objects

Angular Cli Create Component In Folder Code Example

Example 1: ng cli generate component ng g c componentName Example 2: generate component angular without folder Angular: Add --flat flag. ng g c yourcomponentname --flat --flat=true|false When true, creates the new files at the top level of the current project. Default: false Example 3: auto generate component angular ng g component [directory-where-you-want-to-save-the-component]/[new-component-name] ng generate component [directory-where-you-want-to-save-the-component]/[new-component-name]

Square In C Programming Code Example

Example 1: square in c # include <stdio.h> int main ( ) { float number ; printf ( "Enter a number: " ) ; scanf ( "%f" , & number ) ; square = number * number ; printf ( "square of the given number %f is %f" , number , square ) ; return 0 ; } Example 2: square in c # include <math.h> int main ( ) { float number ; square = pow ( number , 2 ) ; //This returns number raised to the power 2 printf ( "The square of %f is %f" , number , square ) ; return 0 ; }

Get First Match Regex Javascript Code Example

Example 1: javascript regex for firstname var nameRegex = / ^ [ a - zA - Z\ - ] + $ / ; Example 2: js match any number string const match = 'some/path/123' . match ( / \ / ( \d + ) / ) const id = match [ 1 ] // '123'