Posts

Make First Letter Capital In Css Code Example

Example: css all caps .uppercase { text-transform : uppercase ; } #example { text-transform : none ; /* No capitalization, the text renders as it is (default) */ text-transform : capitalize ; /* Transforms the first character of each word to uppercase */ text-transform : uppercase ; /* Transforms all characters to uppercase */ text-transform : lowercase ; /* Transforms all characters to lowercase */ text-transform : initial ; /* Sets this property to its default value */ text-transform : inherit ; /* Inherits this property from its parent element */ }

React Native Expo Vector Icons Code Example

Example: expo vector icons install npm install @expo/vector-icons

Css To Change Hr Color Code Example

Example 1: how to change the color of the hr tag in html < style > hr { height : 1 px ; background-color : #ccc ; border : none ; } </ style > Example 2: html horizontal line style <!-- HTML --> <!-- You can change the style of the horizontal line like this: --> < hr style = " width : 50 % " , size = " 3 " , color = black > <!-- Or like this: --> < hr style = " height : 2 px ; width : 50 % ; border-width : 0 ; color : red ; background-color : red " >

Fixed Left Menu In Page Css Code Example

Example: how to fix the nav bar to the left of the page .sidenav { height : 100 % ; width : 160 px ; position : fixed ; z-index : 1 ; top : 0 ; left : 0 ; overflow-x : hidden ; }

Angular 5 Download Excel File With Post Request

Answer : I struggle with this one all day. Replace angular HttpClient and use XMLHttpRequest as follows: var oReq = new XMLHttpRequest(); oReq.open("POST", url, true); oReq.setRequestHeader("content-type", "application/json"); oReq.responseType = "arraybuffer"; oReq.onload = function (oEvent) { var arrayBuffer = oReq.response; if (arrayBuffer) { var byteArray = new Uint8Array(arrayBuffer); console.log(byteArray, byteArray.length); this.downloadFile(byteArray, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'export.xlsx'); } }; oReq.send(body); Then modified the creation of the Blob in your downloadFile function: const url = window.URL.createObjectURL(new Blob([binaryData])); In your case the service will look something like this: DownloadData(model:requiredParams):Observable<any>{ return new Observable(obs => { var oReq = new XMLHttpReques...

Python Length Array Code Example

Example 1: size array python size = len ( myList ) Example 2: python get array length # To get the length of a Python array , use 'len()' a = arr . array ( ‘d’ , [ 1.1 , 2.1 , 3.1 ] ) len ( a ) # Output : 3 Example 3: find array length python array = [ 1 , 2 , 3 , 4 , 5 ] print ( len ( arr ) ) Example 4: python array length len ( my_array ) Example 5: find array length in python a = arr . array ( 'd' , [ 1.1 , 2.1 , 3.1 ] ) len ( a )

How To Place Cards Side By Side In Html Code Example

Example: css card grid /* https://codepen.io/travishorn/pen/bzXEjd */ <---------------------------------- HTML -------------------------------- > <div class="cards" > <div class="card" > ONE</div > <div class="card" > TWO</div > <div class="card" > THREE</div > <div class="card" > FOUR</div > <div class="card" > FIVE</div > <div class="card" > SIX</div > <div class="card" > SEVEN</div > <div class="card" > EIGHT</div > <div class="card" > NINE</div > <div class="card" > TEN</div > <div class="card" > ELEVEN</div > <div class="card" > TWELVE</div > </div > <---------------------------------- CSS ---------------------------------- > html { font-size : 22 px ; } bod...

Html Scroll To W3 Code Example

Example: smooth scroll css html { scroll-behavior : smooth ; } /* No support in IE, or Safari You can use this JS polyfill for those */ http : //iamdustan.com/smoothscroll/

C Program To Print Individual Digits Of A Number Code Example

Example 1: print digits of a number in c # include <stdio.h> int main ( ) { int num = 1024 ; while ( num != 0 ) { int digit = num % 10 ; num = num / 10 ; printf ( "%d\n" , digit ) ; } return 0 ; } Example 2: print digits of a number in c # include <stdio.h> int printDigits ( int n ) { int digit ; if ( n < 10 ) { //caso base digit = n ; printf ( "%d\n" , digit ) ; } else { digit = printDigits ( n / 10 ) ; digit = printDigits ( n % 10 ) ; } return digit ; } int main ( ) { int num = 3467678 ; printDigits ( num ) ; return 0 ; }

Can't Push Refs To Remote Try Running Pull First To Integrate Your Changes

Answer : You get this try running pull first to integrate your changes whenever your local branch and your remote branch are not on the same point, before your changes. remote branch commits : A -> B -> C -> D local branch commits : A -> B -> C -> Local_Commits Now clearly, there's a change D that you don't have integrated locally. So you need to rebase , then push, which will lead to the following. remote branch commits : A -> B -> C -> D local branch commits : A -> B -> C -> D -> Local_Commits To solve your issue, do the following git pull --rebase origin branchname git push origin branchname I was getting this message in my Azure DevOps Repos environment because the server had a branch policy on the master branch that requires pull request approval and I was trying to push to master directly. Even after pull and rebase the same message appears. I don't think VS Code really knows how to interpret this specific err...

Android: How Do You Check If A Particular AccessibilityService Is Enabled

Answer : I worked this one out myself in the end: public boolean isAccessibilityEnabled() { int accessibilityEnabled = 0; final String LIGHTFLOW_ACCESSIBILITY_SERVICE = "com.example.test/com.example.text.ccessibilityService"; boolean accessibilityFound = false; try { accessibilityEnabled = Settings.Secure.getInt(this.getContentResolver(),android.provider.Settings.Secure.ACCESSIBILITY_ENABLED); Log.d(LOGTAG, "ACCESSIBILITY: " + accessibilityEnabled); } catch (SettingNotFoundException e) { Log.d(LOGTAG, "Error finding setting, default accessibility to not found: " + e.getMessage()); } TextUtils.SimpleStringSplitter mStringColonSplitter = new TextUtils.SimpleStringSplitter(':'); if (accessibilityEnabled==1) { Log.d(LOGTAG, "***ACCESSIBILIY IS ENABLED***: "); String settingValue = Settings.Secure.getString(getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILIT...

How To Make Text Bold In Css Code Example

Example 1: css bold text .text { font-weight : bold ; } Example 2: css text bold font-weight : bold ; Example 3: how bold text in css p .normal { font-weight : normal ; } p .thick { font-weight : bold ; } p .thicker { font-weight : 900 ; } Example 4: css bold text /* Keyword values */ font-weight : bold ; /* Keyword values relative to the parent */ font-weight : bolder ; /* Numeric keyword values */ font-weight : 700 ; // bold font-weight : 800 ; font-weight : 900 ; Example 5: how to bold text css inline <p style= "font-weight:bold" >Hey there</p> Example 6: css bold text we can set text bold using css property named 'font-weight' Syntax: selector { font-weight : bold ; }

Css Text Overflow Ellipsis Dynamic Width Code Example

Example 1: css ellipsis div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Example 2: overflow ellipsis css .truncate { width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Example 3: css paragraph ellipsis max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; Example 4: show ellipsis after text length max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; // div in a flex - assign width% , no need of even max-width !

Android Notification SetSound Is Not Working

Answer : below code will help you: String CHANNEL_ID="1234"; Uri soundUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+ getApplicationContext().getPackageName() + "/" + R.raw.mysound); NotificationManager mNotificationManager = (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE); //For API 26+ you need to put some additional code like below: NotificationChannel mChannel; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { mChannel = new NotificationChannel(CHANNEL_ID, Utils.CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH); mChannel.setLightColor(Color.GRAY); mChannel.enableLights(true); mChannel.setDescription(Utils.CHANNEL_SIREN_DESCRIPTION); AudioAttributes audioAttributes = new AudioAttributes.Builder() .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATIO...

Image Overlay Online Code Example

Example: overlapping picture with the background position : relative ; top : -168 px ;

37 Inch To Cm Code Example

Example: inch to cm 1 inch = 2.54 cm