Role of CSS flex-wrap Property: wrap-reverse Value

Smita Kapse
Updated on 03-Jul-2020 07:36:20

184 Views

Use the flex-wrap property with wrap-reverse value to wrap flex-items in reverse order.ExampleYou can try to run the following code to implement the wrap-reverse value −Live Demo                    .mycontainer {             display: flex;             background-color: orange;             flex-wrap: wrap-reverse;          }          .mycontainer > div {             background-color: white;             text-align: center;             line-height: 40px;             font-size: 25px;             width: 100px;             margin: 5px;          }                     Quiz                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          Q9          

Update Records in a Column with Random Numbers in MySQL

AmitDiwan
Updated on 03-Jul-2020 07:24:13

295 Views

Let us first create a table −mysql> create table DemoTable746 (    Number int ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert into DemoTable746 values(100); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable746 values(200); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable746 values(300); Query OK, 1 row affected (0.31 sec) mysql> insert into DemoTable746 values(400); Query OK, 1 row affected (0.20 sec)Display all records from the table using select statement −mysql> select *from DemoTable746;This will produce the following output -+--------+ | Number | +--------+ ... Read More

Convert Image to Base64 String on Android

Azhar
Updated on 03-Jul-2020 07:20:49

1K+ Views

This example demonstrates how do I convert an image to Base 64 string on android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 – Copy paste an image in the res/drawable. Example: res/drawable/logo.pngStep 4 − Add the following code to src/MainActivity.javaimport android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Base64; import android.widget.TextView; import java.io.ByteArrayOutputStream; public class MainActivity extends AppCompatActivity {    TextView textView;    String string;    Bitmap ... Read More

Can We Have an Empty Catch Block in Java?

raja
Updated on 03-Jul-2020 07:18:31

6K+ Views

Yes, we can have an empty catch block. But this is a bad practice to implement in Java.Generally, the try block has the code which is capable of producing exceptions, if anything wrong in the try block, for instance,  divide by zero, file not found,  etc. It will generate an exception that is caught by the catch block. The catch block catches and handles the exception. If the catch block is empty then we will have no idea what went wrong within our code.Examplepublic class EmptyCatchBlockTest {    public static void main(String[] args) {       try {          int a ... Read More

Set Color of TextView Span in Android

Azhar
Updated on 03-Jul-2020 07:17:54

822 Views

This example demonstrates how do I set the color of a textView span in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add the following code to src/MainActivity.javaimport android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.SpannableString; import android.text.Spanned; import android.text.style.ForegroundColorSpan; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    TextView textView;    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);     ... Read More

Create CollectionView Layout in an iOS App

Mohtashim M
Updated on 03-Jul-2020 07:17:17

455 Views

CollectionView with TableView are two of many fundamental concept of iOS development, every developer should master both to be a good developer.In this post we will be focussing mainly on CollectionView, CollectionView is same as table view with some difference, Collection View supports both horizontal and vertical scrolling which looks like a grid. CollectionView in iOS is also referred to grid view in Android.To read more about it you can refer https://developer.apple.com/documentation/uikit/uicollectionviewAs you can see Collection View consists of Supplementary View and Cell, The collection view presents items onscreen using a cell, which is an instance of the UICollectionViewCell class ... Read More

Parse HTML in Android

Azhar
Updated on 03-Jul-2020 07:15:35

2K+ Views

This example demonstrates how do I parse HTML in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 – Add the given dependency in the build.gradle (Module: app)implementation 'org.jsoup:jsoup:1.11.2'Step 4 − Add the following code to src/MainActivity.javaimport android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.TextView; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.io.IOException; public class MainActivity extends AppCompatActivity {    Button button;    TextView textView; ... Read More

Remove Button or Make It Invisible in Android

Azhar
Updated on 03-Jul-2020 07:14:01

1K+ Views

This example demonstrates how remove a button or make it invisible in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.               Step 3 − Add the following code to src/MainActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.app.Activity; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MainActivity extends AppCompatActivity {    OnClickListener listener1=null;    OnClickListener listener2=null;    Button button1;    Button button2;    @Override    protected void onCreate(Bundle ... Read More

Display Toast in Android

Azhar
Updated on 03-Jul-2020 07:10:11

1K+ Views

This example demonstrates how to display Toast in Android.Step 1 − Create a new project in Android Studio, go to File rArr; New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml     Step 3 − Add the following code to src/MainActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.Toast; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);       //Displaying Toast with Hello World message       Toast.makeText(getApplicationContext(), "Hello World", Toast.LENGTH_SHORT).show();   ... Read More

Load and Display an Image in ImageView on Android App

Azhar
Updated on 03-Jul-2020 07:01:48

4K+ Views

This example demonstrates how to load and display an image in ImageView on Android App.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MyAndroidAppActivity.javapackage com.example.sample; import android.support.v7.app.AppCompatActivity; import android.app.Activity; import android.os.Bundle; import android.widget.Button; import android.widget.ImageView; import android.view.View; import android.view.View.OnClickListener; public class MyAndroidAppActivity extends AppCompatActivity {    Button button;    ImageView image;    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState); ... Read More

Advertisements