Posts

Showing posts from March, 2018

How do you change text to bold in Android?

Programmatically: You can do programmatically using setTypeface() : textView . setTypeface ( null , Typeface . NORMAL ); // for Normal Text textView . setTypeface ( null , Typeface . BOLD ); // for Bold only textView . setTypeface ( null , Typeface . ITALIC ); // for Italic textView . setTypeface ( null , Typeface . BOLD_ITALIC ); // for Bold and Italic XML: You can set Directly in XML file in <TextView /> like: android : textStyle = "normal" android : textStyle = "normal|bold" android : textStyle = "normal|italic" android : textStyle = "bold" android : textStyle = "bold|italic" Source: here Programmatically: You can do programmatically using setTypeface() method: Below is the code for default Typeface textView . setTypeface ( null , Typeface . NORMAL ); // for Normal Text textView . setTypeface ( null , Typeface . BOLD ); // for Bold only textVie...

Can't import database through phpmyadmin file size too large xampp

 Here is what I've done: Gone to my XAMPP installed directoy C:\xampp\php Open the "Configuration Settings" file named php.ini using your text editor, preferably you can also you Notepad for Windows machine. Somewhere nearby on line no 886, please update it to upload_max_filesize = 128M Similarly on line no 735 post_max_size = 128M On line no 442 max_execution_time = 300 On line no 452 max_input_time = 60 Restart your Apache from either XAMPP Control Panel or using CMD in Windows https://stackoverflow.com/a/6723485/969092 Done! Source: here

Gradle project refresh failed android studio

These steps work for me : Close android studio first Go to folder C:\Users\.gradle and delete that folder. Then in gradle folder create gradle.properties file and add following lines. org . gradle . daemon = true org . gradle . parallel = true Open android studio source: here

how to create SplashScreen android studeio

splash Screen Android Studio

How to indent android studio xml and java code

Indent code in  Android Studio : Windows Ctrl + Alt + L Mac: Option  +  Command  +  L  Stack Overflow

how to use text box in android studio

Image
-------------------------------buttonbox--------------------- <? xml version= "1.0" encoding= "utf-8" ?> < shape xmlns: android = "http://schemas.android.com/apk/res/android" android :shape= "rectangle" > < gradient android :startColor= "@android:color/transparent" android :endColor= "@android:color/transparent" android :angle= "270" /> < corners android :radius= "30dp" /> < stroke android :width= "5px" android :color= "@android:color/white" /> </ shape > ===========================end button box===================== -----------------------------textboxes.xml-------------------- <? xml version= "1.0" encoding= "utf-8" ?> < shape xmlns: android = "http://schemas.android.com/apk/res/android" android :shape= "rectangle" android :padding= "10dp...

laravel update and delete function using Resource controller

We can update and delete from database using  laravel 5.5 .  public function update(Request $request, $id)     {          $this->validate($request,[             'title' => 'required',             'sub_title' => 'required',             'image' => 'mimes:jpeg,jpg,bmp,png',         ]);         $image = $request->file('image');         $slug = str_slug($request->title);         $slider = Slider::find($id);         if (isset($image))         {             $currentDate = Carbon::now()->toDateString();             $imagename = $slug .'-'. $currentDate .'-'. uniqid() .'.'. $image->getClientOriginalExtension();       ...

Laravel: how i can use store function in laravel 5.5

we have 3 fields like title, subtitle, image we can save data to public directory Upload/slider folder a logic implementation like this public function store(Request $request)     {          $this->validate($request,[             'title' => 'required',             'subtitle' => 'required',             'image' => 'mimes:jpeg,jpg,bmp,png',         ]);         $image = $request->file('image');         $slug = str_slug($request->title);         if (isset($image))         {             $currentDate = Carbon::now()->toDateString();             $imagename = $slug .'-'. $currentDate .'-'. uniqid() .'.'. $image->getClientOriginalExtension();         ...

Detect and extract url from a string?

We can get URL from the text or String. /** * Returns a list with all links contained in the input */ public static List < String > extractUrls ( String text ) { List < String > containedUrls = new ArrayList < String >(); String urlRegex = "((https?|ftp|gopher|telnet|file):((//)|(\\\\))+[\\w\\d:#@%/;$()~_?\\+-=\\\\\\.&]*)" ; Pattern pattern = Pattern . compile ( urlRegex , Pattern . CASE_INSENSITIVE ); Matcher urlMatcher = pattern . matcher ( text ); while ( urlMatcher . find ()) { containedUrls . add ( text . substring ( urlMatcher . start ( 0 ), urlMatcher . end ( 0 ))); } return containedUrls ; } Example: List < String > extractedUrls = extractUrls ( "Welcome to https://stackoverflow.com/ and here is another link http://www.google.com/ \n which is a great search engine" ); for ( String url : extractedUrls ) { System . out . ...