Skip to main content

Posts

Showing posts from April, 2019

Copy text or html to clipboard js php

How to copy text or HTML to clipboard using JS/jQuery Today we learn how to copy texts and html into the clipboard by using js, we can copy content on button click or any event through JS. Here are the few simple methods for it. Please follow the below methods 1) Copy data-attribute value to clipboard   If you have an html element like a button with data value and you want to copy value on button click then use below function HTML CODE <a class="cls_copy_pg_action copyAction copy-action-btn" data-value="THIS TEXT WILL BE COPIED" > <i class="far fa-copy"></i> Copy</a> JQUERY CODE $(document).on("click", ".copy-action-btn", function() {       var trigger = $(this);       $(".copy-action-btn").removeClass("text-success");       var $tempElement = $("<input>");         $("body").append($tempElement);     ...

Solution-windows 'expo' is not recognized as an internal or external command

Solution for expo is not recognized as an internal or external command,operable program or batch file in Windows 10 Sometimes expo will not work globally mostly in windows 10, If you are facing same issue then follow the below Steps 1) Click on windows button and search for  " Environment variables"  and click on "Edit the system environment variables" 2) Now you will see a popup like below screen. Then you need to click on Environment Variables. (Please see highlight part in below image)     3)Then click on new button that i have highlighted in below image 4. Then a popup will open and you need to fill details like below mentioned Variable Name :Path Variable Value: %USERPROFILE%\AppData\Roaming\npm Here we are creating a new path variable and passing location of npm.   Now Click on OK and close all the terminal windows and open new CMD or terminal and type Expo . Great now you can access expo from any...

How to install React native expo cli properly in windows

How to install React native expo in windows   Hello today we learn how to install react native  expo-cli in windows system. Expo Expo-CLI  is a React Native tool that creates a development server on local so we can create react native apps and run locally for testing. Please follow below steps to install expo-cli on your local server:- 1) Install Node JS    To create and run react native apps, we need NodeJS . You can check our other tutorials to learn how to install node JS. Here we will focus on Expo. 2) Open Terminal as administrator 3)  Run the below command    npm install -g expo-cli The above command will install expo globally and you can access expo by using >expo in command prompt(CMD).   If you face any issue like " expo is not recognized as an internal or external command,operable program or batch file. " then click here . I hope it will be helpful for many readers. Thanks :)

Android studio kotlin java change status bar color

Android studio kotlin/java change status bar background color Hello Today we learn how to change status bar background color in android studio. What is status bar ? In android phones , status bar contains notifications and system icons. As you can see in above image that area is status bar. Here we will change background color through xml so it will be work with both java and kotlin. You can change status bar color by many ways but here we are using very simple way to do this. So please follow below steps:- Please open your project folder and navigate to app/src/main/res/values/styles.xml or just search styles.xml file and then add below line in it < item name= "android:statusBarColor" > #333</ item > Here we are using dark color code #333 but you can use any color code according to you and it will be good if you use color according to your app theme. So after adding this code your code will be look like this < resources > ...