Arjun Thakur has Published 1025 Articles

HTML max Attribute

Arjun Thakur

Arjun Thakur

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

374 Views

The max attribute of the element is used to set the maximum value for . Both min and max are used to set a range of value for input element with type number, date, datetime, range, etc. It introduced in HTML5.Let us now see an example to implement the ... Read More

Designated Initializers in C

Arjun Thakur

Arjun Thakur

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

968 Views

In C90 standard we have to initialize the arrays in the fixed order, like initialize index at position 0, 1, 2 and so on. From C99 standard, they have introduced designated initializing feature in C. Here we can initialize elements in random order. Initialization can be done using the array ... Read More

How to right-align a menu in the menu bar with Java?

Arjun Thakur

Arjun Thakur

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

1K+ Views

Let’s say we added a menu to the MenuBar −JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic(KeyEvent.VK_F); menuBar.add(fileMenu);Add the glue component in between the menus to align some of them on the right, for example −menuBar.add(Box.createHorizontalGlue());The menu added after the usage of above method, would get right-aligned ... Read More

How to insert mm/dd/yyyy format dates in MySQL?

Arjun Thakur

Arjun Thakur

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

6K+ Views

For this, use STR_TO_DATE(). Following is the syntax −insert into yourTableName values(STR_TO_DATE(yourDateValue, yourFormatSpecifier));Let us first create a table −mysql> create table DemoTable    (    ShippingDate date    ); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command : Here, we are inserting formatted ... Read More

HTML target Attribute

Arjun Thakur

Arjun Thakur

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

632 Views

The target attribute of the element is used to set where the linked document will open. You can set the document to open in a new window, same frame, parent frame, etc.Following is the syntax −Here, _blank is used to open the linked document in new window or tab, _self ... Read More

I want to resize and position a JFrame in Java. How can I achieve that?

Arjun Thakur

Arjun Thakur

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

819 Views

To resize and position JFrame, use the Dimensions class. Here, we have set the bounds for the frame −int width = 500; int height = 400; Dimension size = Toolkit.getDefaultToolkit().getScreenSize(); frame.setBounds((int) size.getWidth() - width, 0, width, height);The following is an example to resize and poisiton a frame −Examplepackage my; import ... Read More

Output Iterators in C++

Arjun Thakur

Arjun Thakur

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

730 Views

Here we will see what are the Output iterators in C++. The Output iterators has some properties. These are like below:The output iterators are used to modify the value of the containers.We cannot read data from container using this kind of iteratorsThis is One-Way and Write only iteratorIt can be ... Read More

Check if table exists in MySQL and display the warning if it exists?

Arjun Thakur

Arjun Thakur

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

419 Views

To check if table exists, use the following syntax −CREATE TABLE IF NOT EXISTS yourTableName (    yourColumnName1 dataType,    .    .    .    .    N );Here, we will try to create a table that already exists and then it will produce a warning message “Table already ... Read More

HTML