Articles on Trending Technologies

Technical articles with clear explanations and examples

How to make iPhone vibrate using Swift?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 2K+ Views

To make an iPhone vibrate using swift we’ll use two different methods. First create a new project and add Four different buttons to the main View controller.Now import the AudioToolbox framework in your view controller class.For the first button add an action and write the following code as shown below:@IBAction func actionButtonOne(_ sender: Any) {    AudioServicesPlayAlertSound(SystemSoundID(kSystemSoundID_Vibrate)) }This will generate a long vibrating feedback on your device. Now to create more vibration effects on devices with iOS 10 or more we’ll add methods for all four different buttons.@IBAction func actionButtonTwo(_ sender: Any) {    let generator = UIImpactFeedbackGenerator(style: .heavy)   ...

Read More

What are the basic responsibilities you have for your country?

Ridhi Arora
Ridhi Arora
Updated on 30-Jul-2019 2K+ Views

'India is my country and all Indians are my brothers and sisters.' This is the oath we used to take every day when we were in school. This pledge and many more books and texts remind us of our moral and legal responsibilities. Our nation is our motherland. It never asks anything in return from us as it is our motherland and a mother is selfless in giving.Even if the nation does not expect anything from us, we hold an obligation ourselves.The first and foremost responsibility we have towards our country is to respect not only the land where we ...

Read More

What is the best iOS app for education?

Samrat T
Samrat T
Updated on 30-Jul-2019 271 Views

Apps have become an integral part of our daily lives. We depend on our iPhones more than our computers. There are many education apps that can improve your language, memory, and many skills in different categories. Let us look at such apps.DuolingoElevateLumosityTEDPeakCourseraMath 42UdemyCreative CloudCodecademy

Read More

How to select yesterday's date in MySQL?

Ankith Reddy
Ankith Reddy
Updated on 30-Jul-2019 785 Views

To select yesterday’s date, use the subdate() function from MySQL. The syntax is as followsselect subdate(yourDatetimeColumnName) as anyVariableName from yourTableName;To understand the above syntax, let us create a tablemysql> create table YesterdayDateDemo -> ( -> VisitedDateTime datetime -> ); Query OK, 0 rows affected (0.59 sec)Let us now insert date in the table using insert command. The query is as followsmysql> insert into YesterdayDateDemo values(now()); Query OK, 1 row affected (0.15 sec) mysql> insert into YesterdayDateDemo values('2012-12-26 13:24:35'); Query OK, 1 row affected (0.17 sec) mysql> insert into YesterdayDateDemo values('2013-10-22 12:20:32'); Query OK, 1 row affected (0.16 sec)Let ...

Read More

How to open and close a PDF file using Swift?

Anvi Jain
Anvi Jain
Updated on 30-Jul-2019 832 Views

In this article we’ll see how to open a pdf file using swift in iOS. Here we’ll do it with an example of opening pdf in webView in iOS. Let’s create a project and add WKWebView to the storyboard.Connect it’s outlet to the ViewController class.Now we’ll see two different thingsOpening a PDF file from a URL on the web.To open a web view from a url, first we need to have a url with a pdf file. In this example I’ll be using a dummy URL https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdfLet’s create a URL first, let url: URL! = URL(string: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf")Now the remaining steps ...

Read More

Equivalent of SQL Server IDENTITY Column in MySQL?

George John
George John
Updated on 30-Jul-2019 9K+ Views

Equivalent of Microsoft SQL Server IDENTITY column in MySQL is AUTO_INCREMENT. The IDENTITY in SQL Server acts like AUTO_INCREMENT in MySQL.The syntax is as follows −CREATE TABLE yourTableName (    yourColumnName1 dataType NOT NULL AUTO_INCREMENT,    yourColumnName2 dataType,    .    .    .    N,    PRIMARY KEY(yourColumnName1) );In MySQL, you need to use primary key if your column is auto_increment otherwise MySQL will give an error. Look at the error −mysql> create table EquivalentOfIdentityInMySQL    -> (    -> ProductId int NOT NULL AUTO_INCREMENT,    -> ProductName varchar(30)    -> ); ERROR 1075 (42000) − Incorrect table definition; ...

Read More

In the future, will it be possible for robots to develop feelings?

Knowledge base
Knowledge base
Updated on 30-Jul-2019 262 Views

Robotics is the fast emerging technology today. Robots are being designed to be used for various activities from daily domestic chores to military operations. These Robots are designed based on the idea of Artificial Intelligence.What is Artificial Intelligence?A machine is initially developed to take instructions from the user and process it according to a pre-designed program and give the output. Whereas if this machine can do something more extraordinary, other than simply taking the instructions and matching with previously fed data, that would be great. Such a thought is the basis for Artificial Intelligence. This can be understood as the ...

Read More

What is the data type for unix_timestamp in MySQL?

Arjun Thakur
Arjun Thakur
Updated on 30-Jul-2019 2K+ Views

The best data type for unix_timestamp in MySQL is integer. The integer data type is as followsint(11);The integer data type is useful for condition checking like ( > , create table UnixTime -> ( -> DueTime datetime -> ); Query OK, 0 rows affected (0.55 sec)Insert records in the form of date using insert command. The query is as followsmysql> insert into UnixTime values(now()); Query OK, 1 row affected (0.15 sec) mysql> insert into UnixTime values('2010-10-14'); Query OK, 1 row affected (0.15 sec) mysql> insert into UnixTime values('2020-09-24'); Query ...

Read More

Check if a string contains numbers in MySQL?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 3K+ Views

To check a string contains numbers, you can use regexp i.e. Regular Expressions. The syntax is as follows −SELECT *FROM yourTableName where yourColumnName REGEXP ‘[0-9]’;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table StringContainsNumber    -> (    -> Id int not null auto_increment,    -> Words text,    -> primary key(Id)    -> ); Query OK, 0 rows affected (0.53 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into StringContainsNumber(Words) values('He12345llo'); Query OK, 1 row affected (0.19 sec) ...

Read More

What is a Deemed University?

Ridhi Arora
Ridhi Arora
Updated on 30-Jul-2019 598 Views

Deemed university is the other name of Deemed-to-be-University, which is an accreditation of a university awarded to higher educational institutions in India by the Department of Higher education. So basically, any university which is ‘deemed to be a university’ by the UGC under Section 3 of the UGC Act of 1956, is called a deemed university.What is a Deemed University?The main feature of Deemed University is Autonomous Control. In a deemed college or university, the management has complete control over anything and everything ranging from the student curriculum to Examinations and issues related to administration and management.The setting of the ...

Read More
Showing 60291–60300 of 61,299 articles
Advertisements