George John has Published 1167 Articles

MySQL automatic conversion on lowercase? Is this possible?

George John

George John

Updated on 30-Jul-2019 22:30:26

286 Views

Yes, it is possible with triggers. You can create trigger for automatic conversion on lower case. Let us first create a table −mysql> create table DemoTable    (    StudentSubject text    ); Query OK, 0 rows affected (0.61 sec)Let us create a trigger for automatic conversion on lower case ... Read More

How can I view the indexes I have set up in MySQL?

George John

George John

Updated on 30-Jul-2019 22:30:26

76 Views

To view the indexes, you can use SHOW command.Following is the syntax −show index from yourTableName;Let us first create a table −mysql> create table DemoTable    (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    FirstName varchar(20),    LastName varchar(20)    ); Query OK, 0 rows affected (0.46 sec)Following ... Read More

How to disable close button on a JFrame in Java?

George John

George John

Updated on 30-Jul-2019 22:30:26

759 Views

To disable the close button, let us first create a frame −JFrame frame = new JFrame("Login!");Use the setDefaultCloseOperation() to set the status of the close button. Set it to DO_NOTHING_ON_CLOSE to disable it −frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);The following is an example to disable close button on a JFrame in Java −Examplepackage my; import ... Read More

HTML canvas strokeRect() Method

George John

George John

Updated on 30-Jul-2019 22:30:26

320 Views

The strokeRect() method of the HTML canvas is used to create a rectangle on a web page. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following ... Read More

Remove last char if it's a specific character in MySQL?

George John

George John

Updated on 30-Jul-2019 22:30:26

1K+ Views

To remove last char if it is a specific character then use SUBSTRING(). Let us first create a table −mysql> create table DemoTable    (    SubjectName varchar(100)    ); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('MySQL'); ... Read More

How to separate Components in a Row or Column with Box in Java

George John

George John

Updated on 30-Jul-2019 22:30:26

243 Views

To separate components in a row or column, use the createGlue() method. This creates an invisible "glue" component that separates components.The following is an example to separate components in a row or column with Box −Examplepackage my; import java.awt.BorderLayout; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JScrollPane; public ... Read More

HTML
  • value Attribute
  • George John

    George John

    Updated on 30-Jul-2019 22:30:26

    177 Views

    The value attribute of the element is used to set the value of the list item. Since the value is a number, it would be set only for the ol element in HTML i.e. the ordered list.Following is the syntax −Above, num is the value of the list item ... Read More

    Resolve Syntax error near “ORDER BY order DESC” in MySQL?

    George John

    George John

    Updated on 30-Jul-2019 22:30:26

    2K+ Views

    The word order is a reserved order in MySQL and you have used it in the query. To get rid of the syntax error, you need to use backticks(` `) around the order.The correct syntax is as follows −select *from yourTableName ORDER BY `order` DESC;Let us first create a table ... Read More

    HTML content Attribute

    George John

    George John

    Updated on 30-Jul-2019 22:30:26

    289 Views

    The content attribute of the element is used to set the meta information in an HTML document. This can be the information for the description or the keywords, for name attribute.Following is the syntax:Above, the text is the meta information.Let us now see an example to implement the content ... Read More

    How to create a GridLayout with rows and columns in Java?

    George John

    George John

    Updated on 30-Jul-2019 22:30:26

    642 Views

    While creating a GridLayout, you need to set the rows and columns as parenthesis. A GridLayout is used to create a layout the specified number of rows and columns.Let’s say we have a GridLayout, with 1 row and 4 columns −GridLayout layout = new GridLayout(1, 4);The following is an example ... Read More

    Advertisements