In this tutorial, we want to apply settings that when the user wants to enter a value into EditText, the Hint in it is not removed and moved upwards like an animation. So, we knew that in EditText there are hints that if the user wants to enter some value, the Hint will be lost, and in this article, we want to apply the settings so that the Hint is moved upwards in animation.1- We create a new project in Android Studio with the desired name TextInputLayout.2- I create an Empty Activity type.3- We add the design library to the project. Like the following:
dependencies { implementation fileTree (dir: 'libs', include: ['* .jar']) implementation 'com. android. support: appcompat-v7:27.1.1' implementation 'com. android. support:design:27.1.1' } 4- We add two EditText to the project and Active dT to receive the username and password from the user.5- The codes that should be in the activity_main.xml section are as follows:
</LinearLayout> 6- EditText is placed inside the TextInputLayout tag.7- We will implement the project.8- After executing the project, we will see that the first EditText, which is related to receiving the username, is in Focus mode and is waiting to enter the value in it.9- Items that are in Focus mode, the Hint color inside it and the line below it is red and the rest are gray.10- If we want to define an item and apply settings that are in Focus mode, we do the following:
There are different programming languages, each of which has different features that programmers use in order to achieve their goal, and ultimately lead to the optimization of different sites that cause the user to gain a positive user experience by entering these sites and different programs, that can help you a lot in the field of attracting users so that you can be more successful day by day due to the fact that users will share this good experience with their friends, which will increase the number of visits to the created program or website so that you will be able to earn a good income through this.In order to be able to achieve your goals as a programmer, you need to have the necessary mastery of all the features available in a language and be able to use each of the available features at the right time and place, one of the programming languages that has a lot of fans among different programmers is JavaScript, which will make it possible to convert a page from static to dynamic and cause different users to be able to establish an interactive page. Website developers are always trying to increase their site traffic and attract more users to your website day by day, and with the help of this language they can greatly achieve their goal, in JS, like all existing programming languages, there are various features that if you want to take advantages of them, you have to know each of which as good as possible, some coding in this language may seem complicated, or it may take a long time to write, in which case you can use the libraries available in this language.One of the libraries in this language is jQuery , and if you use it, you can easily enter very complex code and do other things with it, which in this article we are going to mention the elements in it and as well as the way to select elements based on ID, class, attribute, and inheritance , but before we get into that, we need to give you a general definition of jQuery.
What is jQuery?
It is a JavaScript library that has many fans among programmers which allows you to easily navigate files and access predefined features, by using jQuery , it is possible to use existing to make everything simpler due to the fact that you can perform many complex tasks with simple solutions, and with just one line of code you can achieve the desired goals and there is no need to write multiple lines of code, it can also simplify a lot of complicated things from JavaScript, like AJAX calls and DOM manipulation.
What are elements in jQuery?
In this library and any other language, there are different elements that create the content together and all the different changes are implemented on them, in order to apply changes to each of the different elements, we first need to select the elements on which we intend to make different changes, jQuery Selectors lets you select and manipulate HTML elements, they may use names, IDs, classes, etc., in order to select HTML elements, some of which are discussed below, all selectors in jQuery start with a dollar sign and parentheses: $ ().
How to select elements based on ID?
One of the ways in which jQuery selectors can select their desired element, is through ID, in fact, in this case, the selector uses the id attribute of an HTML tag to find the specific element, as you know, the ID is unique to a page, so that, this method is used when you want to select a unique element from all other ones, in order to find out more, review the following example that when a user clicks on a button, the element with id = "test" will be hidden:
There are many programming languages, each of which has many fans among programmers, and different programmers prefer to use them in order to do their jobs and create different programs depending on their goals, one of the most popular programming languages among users is called JavaScript programming language, which we are going to describe briefly in the following, one of the most popular front-end JavaScript libraries for building web applications is ReactJS, which we are going to give you a brief explanation of it as well as ReactJS environment set up , so that you can be more aware of each item.
What is JavaScript?
JS which stands for JavaScript allows you to create dynamic content on the web , which ultimately has a high interaction with the user which can be considered as an important factor which help you reach success as soon as possible, due to the fact that when the users have good interaction with the website, they will ultimately gain a positive user experience which can make them introduce your website to their friends which, as you know, can increase the traffic to your website and improve the ranking of your website as well, so that you should pay more attention to this factor more than before, also with the help of this language, features that are very complex can be easily implemented on the web, so that there is no need to waste your time and energy due to the fact that this language will make the process easier for you, so that if you are not into solving complicated problems, this language can be considered as the best choice for you, you should also note that any program written in JavaScript is known as a "script", this language can be run on both browsers and servers which means that it is not limited, and you can take the advantages of it easier compared to other languages, and there are JavaScript engines in various browsers, which are actually embedded by JavaScript scripts and can be used in order to convert the script into a language that can be understood by different devices, as a result, you can use this language in any device due to the fact that it can be understood by them which can be considered as a great possibility of this language.Now consider the following example:<! DOCTYPE html> <html> <body>
<h2> My First JavaScript </h2>
<button type = "button" onclick = "document.getElementById ('demo'). innerHTML = Date ()"> Click me to display Date and Time. </button>
<p id = "demo"> </p>
</body> </html> In order to understand programming topics better, you need to be familiar with the following terms, so that, it is better to pay attention to the definition of each of them in order to be more aware of the topic.
- Frontend Development:
One of the most common terms in this field is Frontend Development , which is actually the part that the user is in direct contact with and can experience on the page, three of the most popular frontend frameworks available are React, Angular, and Vue.js.React is the main topic of this article, but we are also going to give a brief overview of the other two as well due to the fact that each of them are of a great importance.
Angular:
Another popular framework is angular, which became obsolete with the advent of Reiki, and due to its many advantages over the version described above, many fans preferred to use it.
Both online and offline games have advantages and disadvantages. Offline games have less cost and in online games you can play with other people.
Online and offline meaning:
Two of the most common words used in different places are online and offline. Every day we hear words like online store, online education, online and offline games and so on. In fact, the word online means connected to the Internet and any service that uses the Internet is online. The opposite point of online is offline. In other words, there is no internet connection in offline services and the internet is not used.Of course, there are similar phrases and alternatives for online and offline, for example, terms such as real and virtual are used. If we are in a real environment such as a classroom for an activity such as training, the training is real and if the training is done on the Internet, it is called virtual training.
Meaning of online and offline games:
The world of computer games and smartphone games are like this too. Games can be played online using the Internet or offline without the internet. In the past, the Internet was not as widespread as it is today, and in most places people did not have access to the Internet, which is why most games were played offline. Even game consoles often offered offline games . But today, because of the availability of the Internet in most parts of the world; People can easily play online and online games have become very popular. Online games usually interact with other people in real time and players play against each other. Each of the online and offline games has its own advantages and disadvantages, which we will describe below.
Advantages of offline games:
In offline games , we can play the game alone and without the Internet. This means that each person can be the hero of the game world alone and does not have to communicate with other people. In these games, the gamer does not have to waste time with beginners who do not have much experience in the game. Also, you will not be harassed by solid players, for example, you do not have to hide from other players during the game so as not to kill you.Another important benefit of offline games is the cost reduction. In offline games, you only pay once to install the game on your computer or smartphone, or it may even be free game software. After that, you will not pay any fees for each game.These games are also very suitable for times when you are in a place where the Internet is not available or the Internet speed is low. Also, offline games are a good option when you feel you need more solitude and do not want to communicate with others.
Advantages of online games:
In an online game, the game software usually consists of two parts, the server and the client. The software server part is installed on the mobile phone or gamer computer and the server part is located on a remote server. All people who want to participate in an online game must install the client version of the game. The connection between the gamers and the server computer is established via the Internet. Here it is necessary that the internet be fast enough; otherwise, the players will face delays in the game and the game may become boring for them.
The type of font used in Android system applications may not be liked by users and many users may want to change them to use other fonts, in which case we need to make some adjustments. And use some features of Android systems so that we can finally change the fonts used in Android systems and applications (change font in android app ). Different types of fonts can be used in Android systems. In this tutorial, we will learn how to change fonts and apply related settings. If you want to know how to change fonts in Android systems and applications, it is recommended that you follow this article.
Here is what you will learn in this tutorial:
- How to change fonts in Android apps - How to change Widget fonts in XML- How to set fonts using Typeface- Use the Calligraphy library to change all fonts in the program- Review and answer common problems and questions in Android programming with their solutions
How to change Widget fonts in XML?
In order to be able to change the fonts and use different types of fonts available in Android systems, we must do the following.
change font in android studio project
1- Open a new project in Android Studio and select the desired name for it. The custom name selected in this tutorial is CustomFont. (change font in android studio)2- The type of activity that we must choose in this part of the training for this project is Empty Activity.3- It should be noted that font change settings can be applied without using Java language and methods, which is why there is no emphasis on choosing Java language in this part of training and project creation.4- With the introduction of API 26 in the three versions of Android, a new feature has been added that can specify different types of fonts for the widget. Specifying fonts for the widget using this method eliminates the need to use Java methods.5- In this method of specifying fonts, you can add the fontFamily property for each of the widgets and specify the fonts for them.6- To do this, we must add the appcompat-v7 library to the project. Because the appcompat-v7 library is one of the most essential to apply these settings to change the font.7- Add a directory with the desired font name to res. Res> New> Android Resource Directory 8- Then we have to save our desired font file using .ttf or .otf extensions and add it to this directory. It is better to be careful in choosing fonts and use fonts that are slang and have a positive effect on user interface design.
Note:
It is better to use lower case letters, numbers and lines in naming and choosing names for fonts. We can choose the names we want for the fonts and we will use the names we have chosen for them in the definition in this project.
StackLayout can also be used to define StackOrientation properties and distances. StackOrientation is used to orient it, the values that can be placed in it are general and horizontal, the default value is vertical. Distance is also used to determine the distances between child views.
In this tutorial you will learn that:
- How to create a StackLayout in Xamarin.Forms using XAML files?
- How to set the direction for the created StackLayout?
- How to control alignments and expansions for child views in StackLayout?
The requirements for doing this training and building and controlling StackLayouts are as follows:
- Install the latest version of Visual Studio 2019 on the system
- Install the latest version of Mobile development with.NET on the system
Learn how to create a StackLayout in Xamarin.Forms using Visual Studio
1- Open Visual Studio.After opening Visual Studio, you need to create a new black Xamarin.Forms app.
2- Choose a name for which you create.
3- The name chosen in this article is StackLayoutTutorial.
Note:
It is best to be careful in choosing names for projects and classes created.
Note:
The name chosen for the project must be the same as the name chosen for the solution, so choose the solution name StackLayoutTutorial as well.- After naming, you must make sure that the system and application support the .NET Standard mechanism for shared code.This mechanism is used to share code written in Xamarin.Forms with the C # programming language. If your system and app do not support this mechanism, it cannot have multiple outputs on multiple platforms at once. So that you can have multiple outputs on several different platforms at the same time.- Click on MainPage.xaml in the Solution Explorer section of the StackLayoutTutorial project and replace the code below with all the code in that section.
<! -? xml version = "1.0" encoding = "utf-8"? ->
<contentpage xmlns = "http://xamarin.com/schemas/2014/forms" xmlns: x = "http://schemas.microsoft.com/winfx/2009/xaml" x: class = "StackLayoutTutorial.MainPage">
<stacklayout margin = "20,35,20,25">
<label text = "The StackLayout has its Margin property set, to control the rendering position of the StackLayout.">
<label text = "The Padding property can be set to specify the distance between the StackLayout and its children.">
<label text = "The Spacing property can be set to specify the distance between views in the StackLayout.">
</label></label></label> </stacklayout>
</contentpage>By entering this code, you specify a UI for the page. This UI consists of three labels in one StackLayout , the UIThe page you specify has a StackLayout and this StackLayout also has three Labels. These labels are for StackLayout as child view. This means that the labels inside the StackLayouts are the same as the child views.Inserting this code causes StackLayout to place existing labels in one line and in the vertical line by default.
Hackers as well as hacking have become a topic of interest for all users today, and every day a large number of users search for topics related to hacking, there are different types of hackers, each of which has many special abilities and manners and may use their expertise in a positive or negative direction, the history of hacking goes back a long way, in fact since the invention of computers, there have been some people who have tried to act against the rules and want to do things that other users don’t prefer to do while working with the computer, three are different types of hackers, which we are going to mention different types of hackers in the following.
Different types of hackers:
1- Black hat hacker:
These hackers break the existing rules and gain a lot of money by infiltrating the system of various users and organizations, but the path of black hat hackers is full of obstacles that prevent these hackers from accessing the information they need, among these obstacles we can mention white hat hackers as well as red hat hackers.
2- White hat hacker:
Unlike black hat hackers, white hat hackers do their best to help large organizations as well as users, and find all the security holes in the systems before malicious hackers, in order to prevent other hackers from infiltrating the system and increase the security of it and the information contained in it as much as possible.
3- Gray hat hacker:
These hackers, like black hat hackers , have no bad intentions and only use Internet systems to publish large, specific datasets of information which may be useful for other people to be aware of.
4- Blue hat hacker:
These hackers have pathological behaviors, for example they may use their knowledge to take revenge.
5- Script kiddie:
As the name implies, these hackers are novices and mostly cause disorder in people's systems and do not pose a great danger to their systems.
6- Green hat hacker:
These people are very interested in learning tips about hacking and try their best to learn more about hacking by joining learning forums.
7- Social engineering hackers:
These hackers use special tricks to influence users in order to provide them with important information.
8- Hactivists:
These people enter systems and networks only to draw attention to a social warning target.
9- Cyber terrorist:
These hackers are politically motivated and do their best to pursue their goals.
10- State / Nation Sponsored Hackers:
These hackers are hired to steal war information and attack the cyberspace.
11- Elite hackers:
These people have a very high level of expertise in hacking.
Hybrid app development is a new trend that has seen growth with a rapid speed within the last few years. Developers are adopting Hybrid apps because it is easy to develop them for multiple platforms. Moreover, hybrid apps also save expenses by reducing the development time and required resources.In this blog, we are discussing a few leading hybrid mobile app development frameworks. These hybrid frameworks are being used by the best app developers for startups .As per a report by Statista, React Native lead the market in 2019 and 2020, both. The hybrid mobile app development framework had 42 percent of the market share in both years. On the second number, Flutter maintained its position in 2019- 2020 both with a market share of 30 and 39 percent respectively in each year.Furthermore, we will discuss a few top hybrid mobile app development frameworks that are leading the market currently.
1- React Native
One of the most popular hybrid frameworks in the market, React Native is quite popular among new and expert developers. The platform gives developers the freedom to write codes once to develop apps for multiple platforms. The app development platform is also known for the flexibility it provides to mobile apps. Moreover, locating bad codes and fixing them is also a piece of cake for React Native. A few brands like Facebook, Skype, Airbnb, and Walmart among others are using React Native app development platform.
The Benefits of React Native
- Saves development time by reducing the need of re-writing 95 percent of codes for separate platforms- Allows iOS and Android apps to have stunning features like Native apps- Apps built on React Native are faster in terms of performance- Developers can use the same app to move them on other platforms in the future without having to rewrite the codes- Modifications made in the app can be reviewed in real-time
2- Flutter
Launched in 2018, Flutter is dominating the market quite fast. One of the many reasons for its popularity is that Google released Flutter. Leading apps in the market such as Google Ads, Nubank, Xianyu, and more are developed on Flutter.
Every year, people have to pay a lot of compensation for not paying attention to various security departments, which has led all organizations to pay more attention to the security of any system from the beginning of its establishment and to follow all the necessary principles properly, due to the existence of security holes, as a result, hackers cannot penetrate the system and its information, physical security is very important and a lot of facilities are needed to be able to fully ensure the physical security of a system as a result, profiteers cannot penetrate your information and system through the existence of a security hole in this section, which we intend to give you some examples of physical security in this article, of course, first, we should give you a brief explanation about physical security.
What is physical security?
Physical security includes protection of computers (hardware and software), employees, information, etc., against natural disasters (floods, earthquakes, fires), theft, terrorism, and so on, which being protected against this kind of disasters is of great importance, most of the time, when we talk to people about the security of information on the computer and the protection of the system, generally, the first thought that comes to people's minds is that they should protect their system from viruses, phishing attacks and so on.You should definitely follow all the necessary strategies to increase the security of your system , and any amount of strong passwords for your system, use of strong antivirus, not receiving software from unreliable sources, etc., you should also pay attention to the physical security and follow the tips related to it, imagine that you have spent a lot of money to increase the security of your information and system, but you have not paid attention to physical security, in which case all your efforts can be ignored and profiteers can easily infiltrate your information or as a result of your negligence, a cup of coffee will be spilled on your system, and you will lose all your information. In the following, we are going to give examples of physical security in more detail.
Examples of physical security:
- Observing physical security in relation to the building:
An important example of physical security is providing adequate facilities to build a secure building, to do this you should prefer to use strong locks, anti-theft doors for the building as well as strong and anti-theft doors for the room where the computer is located, ensuring the reliability of windows, use of warning signs, having a fire extinguisher for emergencies, use safe locks for doors, etc., all of which, ultimately help maintain information and system security.
- Access control:
Another example of physical security is to have full control over the people who have access to the system, which you can use to increase your control over everything, which we will mention later, one of the things you can do is constantly monitor the organization's CCTV cameras, which will definitely take a lot of time as well as allocating a workforce to do it, but in the end, there is a possibility that information will be stolen and shared with profiteers.As a result, it is better to use features such as ID card scanners or biometric security , which you can easily control the entry and exit of people, ID card scanners may provide lower security than biometric security, which is why we recommend using biometric security, biometric security is actually methods that can easily identify the real employees by examining physiological or even behavioral characteristics, and if a thief intends to enter your system as an employee, it will quickly identify that person and will inform you.Biometric security is used in most large organizations today, and this method has led to a significant reduction in data theft, in fact, people who want to enter a system without a license can easily obtain a fake ID card and go through the ID card scanners, but if an organization has used biometric security, it is definitely much harder to go through a fake iris and or a fake fingerprint, it should be noted that there are some reports of hackers who could go through all the limitations provided in biometric security, but it is definitely more difficult to go through this equipment, and it requires specialized people who can go through all these cases.
To be able to design a web application , you need to use a large number of programming languages, JS is the most popular among all the programming languages out there, and many programmers prefer to use it in order to achieve their desired goals, there are several commands in this language that need to be placed in the right place in order to be executed correctly, which we are going to discuss below, but before that we need to get a little familiar with the language itself.
What is JavaScript?
It is one of the programming languages that is used to control the behavior of web pages along with other languages which are used for the basic structure of web pages , in order to turn the page into a page that users can interact with, this language can be used for different purposes, each of which is very important, and we need to focus more on learning them in programming, by mastering this language, it is possible to implement features that are very complex on the web.There are JavaScript engines in various browsers, which are actually embedded by JS scripts and can be used to convert the script into a language that can be understood by different devices, the most important terms in the field of programming are Frontend Development and Backend Development , which we have explained in previous articles on this field.
Where are JavaScript web programming language commands located?
Its commands in HTML code can be placed in 3 general places, which we are going to mention in the following.
1. Between the <head> ... </head> tag
2. Between the <body> ... </body> tag
3. In the external file with an extension ".js"
- Between the <head> ... </head> and <body> ... </body> tags:
Consider the following example, which is another example of it.
<html> <head> <title> JavaScipt Example </title> <Script type = "text / javascript"> // function to add two numbers Function sum (a, b) { Return (a + b); } </script> </head>
<body> <Script type = "text / javascript"> // function to subtract two numbers Function sub (a, b) { Return (a-b); } </script> <p> Here, we are printing sum & sum ... </p> <P id = "result1"> </p> <P id = "result2"> </p>
<Script type = "text / javascript"> // calling functions & printing the values Document.getElementById ("result1"). InnerHTML = "sum =" + sum (10,20); Document.getElementById ("result2"). InnerHTML = "sub =" + sub (10,20); </script> </body> </html>
- In the external file with an extension ".js":
Another place where you can enter JavaScript commands is to write them in an external file and then import them into an HTML file, now, consider the following example.