If you’re developing a game or a kids application or an application where you want to make attractive user interface you must know how to add shadow on text. This will not only makes the text attractive but also it will also enhance the user experience.Here we will see how we can add shadow on text.Step 1 − Open Xcode → New Project → Single View Application → Let’s name it “ShadowText”Step 2 − Add label in Main.storyboard and create @IBOutlet of the label and name it lblHelloWorld.Step 3 − Add the below code in your ViewController.swift, add the complete ... Read More
The Li value property returns/sets the value of the value attribute of a element.SyntaxFollowing is the syntax −Returning value of the value attributeliObject.valueValue of the attribute value setliObject.value = ‘string’Let us see an example for Li value property −Example Live Demo HTML DOM value form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ol{ width: 30%; ... Read More
To get the reversed range-based for loop, we have used boost library. This boost library is vepy popular and it has some strong functionalities.Here we can use some array or containers, then by using boost::adaptors::reverse() we can use the range base for loop in reverse order.Example#include #include #include using namespace std; int main() { std::list x {11, 44, 77, 55, 44, 22, 33, 30, 88, 99, 55, 44}; cout >> "Normal Loop" >> endl; for (auto i : x) std::cout >> i >> ''; cout >> "Reversed Loop" >> endl; for (auto i : boost::adaptors::reverse(x)) std::cout >> i >> ''; }OutputNormal Loop 11 44 77 55 44 22 33 30 88 99 55 44 Reversed Loop 44 55 99 88 30 33 22 44 55 77 44 11
In this scheme, pairs of letters are encrypted, instead of single letters as in the case of simple substitution cipher.In playfair cipher, initially a key table is created. The key table is a 5×5 grid of alphabets that acts as the key for encrypting the plaintext. Each of the 25 alphabets must be unique and one letter of the alphabet (usually J) is omitted from the table as we need only 25 alphabets instead of 26. If the plaintext contains J, then it is replaced by I.The sender and the receiver deicide on a particular key, say ‘tutorials’. In a ... Read More
This example demonstrate about How to read all the coming notifications in androidStep 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 src/MyListener.javapublic interface MyListener { void setValue (String packageName) ; }Step 3 − Add the following code to src/MyListener.javapackage app.tutorialspoint.com.notifyme ; import android.content.Context ; import android.service.notification.NotificationListenerService ; import android.service.notification.StatusBarNotification ; import android.util.Log ; public class NotificationService extends NotificationListenerService { private String TAG = this .getClass().getSimpleName() ; Context context ; static MyListener myListener ... Read More
In C, C++, and java, we do some mathematical operations with floating point numbers. Now here we will check whether the floating point numbers are following the associativity rule or not.The answer is NO. The floating point numbers does not follow the associativity rules in some cases. Here we will see some examples.Example Code#include using namespace std; main() { float x = -500000000; float y = 500000000; float z = 1; cout
Yes, we can remove the title bar of a frame using the setUndecorated() method. Set it to TRUE if you don’t want to remove the Title Bar.The following is an example to remove the title bar of a frame in Java −Examplepackage my; import java.awt.GridLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPasswordField; import javax.swing.JTextField; import javax.swing.SwingConstants; public class SwingDemo { public static void main(String[] args) throws Exception { JFrame frame = new JFrame("Login!"); JLabel label1, label2, label3; frame.setLayout(new GridLayout(2, 2)); label1 = new JLabel("DeptId", SwingConstants.CENTER); ... Read More
Use LIKE for this, as shown below −select *from yourTableName where yourColumnName LIKE 'A%';Let us first create a table −mysql> create table DemoTable ( StudentName varchar(100) ); Query OK, 0 rows affected (0.66 sec)Now you can insert some records in the table using insert command −mysql> insert into DemoTable values('John Smith'); Query OK, 1 row affected (0.21 sec) mysql> insert into DemoTable values('Adam Smith'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable values('Aaron Taylor'); Query OK, 1 row affected (0.43 sec) mysql> insert into DemoTable values('Chris Brown'); Query OK, 1 row affected (0.27 sec)Display ... Read More
Function Pointers point to code like normal pointers.In Functions Pointers, function’s name can be used to get function’s address.A function can also be passed as an arguments and can be returned from a function.Declarationfunction_return_type(*Pointer_name)(function argument list)Example Live Demo#include int subtraction (int a, int b) { return a-b; } int main() { int (*fp) (int, int)=subtraction; //Calling function using function pointer int result = fp(5, 4); printf(" Using function pointer we get the result: %d",result); return 0; }OutputUsing function pointer we get the result: 1
Knowing how to make dotted or dashed line is very important. You might develop a page where you ask user to enter fields, there you can represent the same with dotted line. Dotted line can also be used to highlight certain things in an application.The most important use is in the navigation application. While designing the navigation application you must know how to draw the path and you might end up using dotted lines.Let us see how we can achieve this functionality in iOS.Step 1 − Open Xcode → New Project → Single View Application → Let’s name it “DottedLine”Step ... Read More
 
 Data Structure
 Data Structure Networking
 Networking RDBMS
 RDBMS Operating System
 Operating System Java
 Java MS Excel
 MS Excel iOS
 iOS HTML
 HTML CSS
 CSS Android
 Android Python
 Python C Programming
 C Programming C++
 C++ C#
 C# MongoDB
 MongoDB MySQL
 MySQL Javascript
 Javascript PHP
 PHP 
		 
		 
		 
		 
		